nitro-web 0.0.89 → 0.0.91
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 +2 -1
- package/types.ts +60 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.91",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"components",
|
|
28
28
|
"server",
|
|
29
29
|
"types",
|
|
30
|
+
"types.ts",
|
|
30
31
|
"util.js",
|
|
31
32
|
"webpack.config.js"
|
|
32
33
|
],
|
package/types.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
|
|
3
|
+
type InjectedConfig = {
|
|
4
|
+
awsUrl?: string
|
|
5
|
+
clientUrl: string
|
|
6
|
+
countries: { [key: string]: { name: string, numberFormats: { currency: string } } } // for input-currency.tsx
|
|
7
|
+
currencies: { [key: string]: { name: string, symbol: string, digits: number } } // for input-currency.tsx
|
|
8
|
+
env: string
|
|
9
|
+
googleMapsApiKey?: string
|
|
10
|
+
isDemo: boolean // implicitly defined by webpack
|
|
11
|
+
isStatic: boolean // implicitly defined by webpack
|
|
12
|
+
jwtName: string // implicitly defined by webpack
|
|
13
|
+
name: string
|
|
14
|
+
placeholderEmail?: string
|
|
15
|
+
stripePublishableKey?: string
|
|
16
|
+
titleSeparator?: string
|
|
17
|
+
version: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type Config = InjectedConfig & {
|
|
21
|
+
// Non-injectable config on the client
|
|
22
|
+
beforeApp?: () => Promise<object>
|
|
23
|
+
beforeStoreUpdate?: (prevStore: Store | null, newData: Store) => Store
|
|
24
|
+
middleware?: {[key: string]: (route: any, store: any) => undefined | { redirect: string }}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type User = {
|
|
28
|
+
_id?: string
|
|
29
|
+
firstName?: string
|
|
30
|
+
lastName?: string
|
|
31
|
+
name?: string
|
|
32
|
+
avatar?: MonasteryImage
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Error = { title: string, detail: string }
|
|
36
|
+
export type Errors = Error[]
|
|
37
|
+
|
|
38
|
+
export type MonasteryImage = {
|
|
39
|
+
url: string
|
|
40
|
+
filename: string
|
|
41
|
+
path: string
|
|
42
|
+
bucket: string
|
|
43
|
+
date?: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type MessageObject = {
|
|
47
|
+
date?: number
|
|
48
|
+
text: string | React.ReactNode
|
|
49
|
+
type?: 'error' | 'info' | 'success' | 'warning'
|
|
50
|
+
timeout?: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type Store = {
|
|
54
|
+
apiAvailable?: boolean
|
|
55
|
+
jwt?: string
|
|
56
|
+
message?: MessageObject | string
|
|
57
|
+
user?: User,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type Svg = React.FC<React.SVGProps<SVGElement>>
|