@koine/next 2.0.0-alpha.4 → 2.0.0-beta.2
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/package.json +12 -3
- package/typings.d.ts +60 -0
package/package.json
CHANGED
|
@@ -69,8 +69,13 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@hookform/resolvers": "^3.1.0",
|
|
71
71
|
"@kuus/yup": "1.0.0-beta.7",
|
|
72
|
+
"@mui/base": "5.0.0-beta.4",
|
|
73
|
+
"@mui/utils": "5.13.1",
|
|
74
|
+
"@tiptap/react": "2.0.3",
|
|
75
|
+
"@tiptap/starter-kit": "2.0.3",
|
|
72
76
|
"clsx": "1.2.1",
|
|
73
77
|
"date-fns": "^2.30.0",
|
|
78
|
+
"date-fns-tz": "^2.0.0",
|
|
74
79
|
"framer-motion": "^10.12.16",
|
|
75
80
|
"next": "^13.4.4",
|
|
76
81
|
"next-auth": "^4.22.1",
|
|
@@ -78,16 +83,20 @@
|
|
|
78
83
|
"next-translate": "^2.0.6",
|
|
79
84
|
"react": "^18.2.0",
|
|
80
85
|
"react-hook-form": "^7.44.3",
|
|
86
|
+
"react-icons": "^4.9.0",
|
|
87
|
+
"react-swipeable": "^7.0.1",
|
|
81
88
|
"styled-components": "^5.3.11",
|
|
82
89
|
"ts-debounce": "^4.0.0",
|
|
90
|
+
"tslib": "^2.5.3",
|
|
83
91
|
"type-fest": "^3.11.1"
|
|
84
92
|
},
|
|
85
93
|
"peerDependencies": {
|
|
86
|
-
"@koine/
|
|
87
|
-
"
|
|
94
|
+
"@koine/browser": "2.0.0-beta.2",
|
|
95
|
+
"@koine/dom": "2.0.0-beta.2",
|
|
96
|
+
"@koine/utils": "2.0.0-beta.2"
|
|
88
97
|
},
|
|
89
98
|
"main": "./index.js",
|
|
90
99
|
"types": "./index.d.ts",
|
|
91
|
-
"version": "2.0.0-
|
|
100
|
+
"version": "2.0.0-beta.2",
|
|
92
101
|
"module": "./index.mjs"
|
|
93
102
|
}
|
package/typings.d.ts
CHANGED
|
@@ -10,3 +10,63 @@ declare module "*.svg" {
|
|
|
10
10
|
>;
|
|
11
11
|
export default content;
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Extend NodeJS `process.env` with variables used by @koine
|
|
16
|
+
*/
|
|
17
|
+
declare namespace NodeJS {
|
|
18
|
+
interface ProcessEnv {
|
|
19
|
+
NEXT_PUBLIC_APP_URL: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Types specifically related to `@koine/next` exposed on the global unique
|
|
25
|
+
* namespace `Koine`. Most of the types here should be prefixed by `Next`, e.g.
|
|
26
|
+
* `NextSomeFeature` accessible anywhere from `Koine.NextSomeFeature`
|
|
27
|
+
*/
|
|
28
|
+
declare namespace Koine {
|
|
29
|
+
/**
|
|
30
|
+
* Default SEO data structure expected by the `<Seo>` component's prop `seo`
|
|
31
|
+
*/
|
|
32
|
+
type NextSeo = import("./12/types-seo").SeoData;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Translations dictionary extracted from JSON files.
|
|
36
|
+
* You need to augment this type with something like:
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* declare namespace Koine {
|
|
40
|
+
* interface Translations {
|
|
41
|
+
* "~": typeof import("./locales/en/~.json");
|
|
42
|
+
* "_": typeof import("./locales/en/_.json");
|
|
43
|
+
* "$team": typeof import("./locales/en/$team.json");
|
|
44
|
+
* "home": typeof import("./locales/en/home.json");
|
|
45
|
+
* "Header": typeof import("./locales/en/Header.json");
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* Best to follow a convention to name the files which become the namespaces:
|
|
51
|
+
*
|
|
52
|
+
* - `~`: for app wide **urls** translated definitions
|
|
53
|
+
* - `_`: for app wide **common** translations
|
|
54
|
+
* - `${data}`: dollar prefix for static **data** like arrays, objects, .etc
|
|
55
|
+
* - `{route-name}`: lower cased for **route** specific data
|
|
56
|
+
* - `{ComponentName}`: pascal cased for **components** specific data
|
|
57
|
+
*
|
|
58
|
+
* This works through using [type augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)
|
|
59
|
+
* and [merging interfaces](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces).
|
|
60
|
+
*/
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
62
|
+
interface Translations {}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* List here the global variables used by third party scripts supported within
|
|
67
|
+
* the `koine` ecosystem. For instance Google Analytics globally available
|
|
68
|
+
* variables.
|
|
69
|
+
*/
|
|
70
|
+
declare interface Window {
|
|
71
|
+
gtag: (...args: Record<string, unknown>[]) => Record<string, unknown>;
|
|
72
|
+
}
|