@shakerquiz/utilities 0.4.7 → 0.4.8
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
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const Domains: readonly ["Asset", "User", "Role", "City", "Venue", "Theme", "ThemeAsset", "Game", "GameAsset", "Registration", "Mailing"];
|
|
2
2
|
/**
|
|
3
|
-
* @type {Record<
|
|
3
|
+
* @type {Record<Domain, Icon>}
|
|
4
4
|
*/
|
|
5
|
-
export const DomainIcon: Record<
|
|
5
|
+
export const DomainIcon: Record<Domain, Icon>;
|
|
6
6
|
export namespace DomainKindPathname {
|
|
7
7
|
namespace User {
|
|
8
8
|
let Unit: "/user/:user?";
|
|
@@ -53,9 +53,9 @@ export namespace DomainKindPathname {
|
|
|
53
53
|
}
|
|
54
54
|
export const Procedures: readonly ["Checkin", "Redirect"];
|
|
55
55
|
/**
|
|
56
|
-
* @type {Record<
|
|
56
|
+
* @type {Record<Procedure, Icon>}
|
|
57
57
|
*/
|
|
58
|
-
export const ProcedureIcon: Record<
|
|
58
|
+
export const ProcedureIcon: Record<Procedure, Icon>;
|
|
59
59
|
export namespace ProcedureKindPathname {
|
|
60
60
|
namespace Checkin {
|
|
61
61
|
let Unit_8: "/checkin";
|
|
@@ -70,11 +70,14 @@ export namespace ProcedureKindPathname {
|
|
|
70
70
|
export { Set_9 as Set };
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
export const Features: ("Asset" | "User" | "Role" | "City" | "Venue" | "Theme" | "ThemeAsset" | "Game" | "GameAsset" | "Registration" | "Mailing")[];
|
|
74
73
|
/**
|
|
75
|
-
* @type {
|
|
74
|
+
* @type {Array<Domain | Procedure>}
|
|
76
75
|
*/
|
|
77
|
-
export const
|
|
76
|
+
export const Features: Array<Domain | Procedure>;
|
|
77
|
+
/**
|
|
78
|
+
* @type {Record<Feature, Icon>}
|
|
79
|
+
*/
|
|
80
|
+
export const FeatureIcon: Record<Feature, Icon>;
|
|
78
81
|
export namespace FeatureKindPathname {
|
|
79
82
|
export namespace Checkin_1 { }
|
|
80
83
|
export { Checkin_1 as Checkin };
|
|
@@ -98,6 +101,10 @@ export namespace FeatureKindPathname {
|
|
|
98
101
|
export { Mailing_1 as Mailing };
|
|
99
102
|
}
|
|
100
103
|
/**
|
|
101
|
-
* @type {Array<[feature:
|
|
104
|
+
* @type {Array<[feature: Feature, kind: Kind, pathname: string]>}
|
|
105
|
+
*/
|
|
106
|
+
export const FeatureKindPathnames: Array<[feature: Feature, kind: Kind, pathname: string]>;
|
|
107
|
+
/**
|
|
108
|
+
* @type {Array<[feature: Feature, kind: Kind, pattern: URLPattern]>}
|
|
102
109
|
*/
|
|
103
|
-
export const
|
|
110
|
+
export const FeatureKindPatterns: Array<[feature: Feature, kind: Kind, pattern: URLPattern]>;
|
|
@@ -13,7 +13,7 @@ export var Domains = /** @type {const} */ ([
|
|
|
13
13
|
])
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @type {Record<
|
|
16
|
+
* @type {Record<Domain, Icon>}
|
|
17
17
|
*/
|
|
18
18
|
export var DomainIcon = {
|
|
19
19
|
'User': 'users',
|
|
@@ -27,7 +27,7 @@ export var DomainIcon = {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* @satisfies {Record<
|
|
30
|
+
* @satisfies {Record<Domain, Record<Kind, string>>}
|
|
31
31
|
*/
|
|
32
32
|
export var DomainKindPathname = /** @type {const} */ ({
|
|
33
33
|
'User': {
|
|
@@ -77,7 +77,7 @@ export var Procedures = /** @type {const} */ ([
|
|
|
77
77
|
])
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* @type {Record<
|
|
80
|
+
* @type {Record<Procedure, Icon>}
|
|
81
81
|
*/
|
|
82
82
|
export var ProcedureIcon = {
|
|
83
83
|
'Checkin': 'arrow-right-end-on-rectangle',
|
|
@@ -85,7 +85,7 @@ export var ProcedureIcon = {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* @satisfies {Record<
|
|
88
|
+
* @satisfies {Record<Procedure, Record<Kind, string>>}
|
|
89
89
|
*/
|
|
90
90
|
export var ProcedureKindPathname = /** @type {const} */ ({
|
|
91
91
|
'Checkin': {
|
|
@@ -99,10 +99,13 @@ export var ProcedureKindPathname = /** @type {const} */ ({
|
|
|
99
99
|
},
|
|
100
100
|
})
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* @type {Array<Domain | Procedure>}
|
|
104
|
+
*/
|
|
102
105
|
export var Features = Domains.concat(Procedures)
|
|
103
106
|
|
|
104
107
|
/**
|
|
105
|
-
* @type {Record<
|
|
108
|
+
* @type {Record<Feature, Icon>}
|
|
106
109
|
*/
|
|
107
110
|
export var FeatureIcon = {
|
|
108
111
|
...DomainIcon,
|
|
@@ -110,7 +113,7 @@ export var FeatureIcon = {
|
|
|
110
113
|
}
|
|
111
114
|
|
|
112
115
|
/**
|
|
113
|
-
* @satisfies {Record<
|
|
116
|
+
* @satisfies {Record<Feature, Record<Kind, string>>}
|
|
114
117
|
*/
|
|
115
118
|
export var FeatureKindPathname = {
|
|
116
119
|
...DomainKindPathname,
|
|
@@ -118,7 +121,7 @@ export var FeatureKindPathname = {
|
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
/**
|
|
121
|
-
* @type {Array<[feature:
|
|
124
|
+
* @type {Array<[feature: Feature, kind: Kind, pathname: string]>}
|
|
122
125
|
*/
|
|
123
126
|
export var FeatureKindPathnames = Object
|
|
124
127
|
.keys(FeatureKindPathname)
|
|
@@ -127,3 +130,13 @@ export var FeatureKindPathnames = Object
|
|
|
127
130
|
.keys(FeatureKindPathname[feature])
|
|
128
131
|
.map(kind => [feature, kind, FeatureKindPathname[feature][kind]])
|
|
129
132
|
)
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @type {Array<[feature: Feature, kind: Kind, pattern: URLPattern]>}
|
|
136
|
+
*/
|
|
137
|
+
export var FeatureKindPatterns = FeatureKindPathnames
|
|
138
|
+
.map(([feature, kind, pathname]) => [
|
|
139
|
+
feature,
|
|
140
|
+
kind,
|
|
141
|
+
new URLPattern({ pathname }),
|
|
142
|
+
])
|
package/source/globals.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ interface RequestInit {
|
|
|
13
13
|
* React
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
type UseState<
|
|
17
|
-
|
|
18
|
-
import('react').Dispatch<import('react').SetStateAction<
|
|
16
|
+
type UseState<T> = [
|
|
17
|
+
T,
|
|
18
|
+
import('react').Dispatch<import('react').SetStateAction<T>>,
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
/**
|