pi-kiosk-shared 2.1.86 → 2.1.87
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/dist/analyticsEmitterManifest.js +1 -1
- package/dist/analyticsEmitterManifest.js.map +1 -1
- package/dist/analyticsEventLabels.d.ts +1 -1
- package/dist/analyticsEventLabels.d.ts.map +1 -1
- package/dist/analyticsEventLabels.js +83 -5
- package/dist/analyticsEventLabels.js.map +1 -1
- package/dist/catalog/createCoalescedRefetchScheduler.d.ts +12 -0
- package/dist/catalog/createCoalescedRefetchScheduler.d.ts.map +1 -0
- package/dist/catalog/createCoalescedRefetchScheduler.js +59 -0
- package/dist/catalog/createCoalescedRefetchScheduler.js.map +1 -0
- package/dist/checkout/resolvePickupHandoffModeForCheckout.d.ts +3 -0
- package/dist/checkout/resolvePickupHandoffModeForCheckout.d.ts.map +1 -0
- package/dist/checkout/resolvePickupHandoffModeForCheckout.js +18 -0
- package/dist/checkout/resolvePickupHandoffModeForCheckout.js.map +1 -0
- package/dist/errors/formatRateLimitMessage.d.ts +5 -0
- package/dist/errors/formatRateLimitMessage.d.ts.map +1 -0
- package/dist/errors/formatRateLimitMessage.js +8 -0
- package/dist/errors/formatRateLimitMessage.js.map +1 -0
- package/dist/getAnalyticsEventLabel.d.ts +1 -1
- package/dist/getAnalyticsEventLabel.d.ts.map +1 -1
- package/dist/getAnalyticsEventLabel.js +2 -1
- package/dist/getAnalyticsEventLabel.js.map +1 -1
- package/dist/hooks/databaseHealthCoordinator.d.ts +31 -0
- package/dist/hooks/databaseHealthCoordinator.d.ts.map +1 -0
- package/dist/hooks/databaseHealthCoordinator.js +371 -0
- package/dist/hooks/databaseHealthCoordinator.js.map +1 -0
- package/dist/hooks/useDatabaseHealth.d.ts +2 -6
- package/dist/hooks/useDatabaseHealth.d.ts.map +1 -1
- package/dist/hooks/useDatabaseHealth.js +22 -143
- package/dist/hooks/useDatabaseHealth.js.map +1 -1
- package/dist/hooks/useSubmitCooldown.d.ts +11 -0
- package/dist/hooks/useSubmitCooldown.d.ts.map +1 -0
- package/dist/hooks/useSubmitCooldown.js +46 -0
- package/dist/hooks/useSubmitCooldown.js.map +1 -0
- package/dist/http/rateLimitError.d.ts +9 -0
- package/dist/http/rateLimitError.d.ts.map +1 -0
- package/dist/http/rateLimitError.js +97 -0
- package/dist/http/rateLimitError.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/sentry/captureRateLimitBreadcrumb.d.ts +12 -0
- package/dist/sentry/captureRateLimitBreadcrumb.d.ts.map +1 -0
- package/dist/sentry/captureRateLimitBreadcrumb.js +23 -0
- package/dist/sentry/captureRateLimitBreadcrumb.js.map +1 -0
- package/dist/sentry/initSentry.d.ts +1 -1
- package/dist/sentry/initSentry.d.ts.map +1 -1
- package/dist/ui/Button/Button.d.ts +18 -0
- package/dist/ui/Button/Button.d.ts.map +1 -0
- package/dist/ui/Button/Button.js +151 -0
- package/dist/ui/Button/Button.js.map +1 -0
- package/dist/ui/Card/Card.d.ts +14 -0
- package/dist/ui/Card/Card.d.ts.map +1 -0
- package/dist/ui/Card/Card.js +56 -0
- package/dist/ui/Card/Card.js.map +1 -0
- package/dist/ui/FormField/FormField.d.ts +8 -0
- package/dist/ui/FormField/FormField.d.ts.map +1 -0
- package/dist/ui/FormField/FormField.js +43 -0
- package/dist/ui/FormField/FormField.js.map +1 -0
- package/dist/ui/LanguageToggle/LanguageToggle.d.ts +8 -0
- package/dist/ui/LanguageToggle/LanguageToggle.d.ts.map +1 -0
- package/dist/ui/LanguageToggle/LanguageToggle.js +89 -0
- package/dist/ui/LanguageToggle/LanguageToggle.js.map +1 -0
- package/dist/ui/Turnstile/TurnstileExecuteWidget.d.ts +11 -0
- package/dist/ui/Turnstile/TurnstileExecuteWidget.d.ts.map +1 -0
- package/dist/ui/Turnstile/TurnstileExecuteWidget.js +28 -0
- package/dist/ui/Turnstile/TurnstileExecuteWidget.js.map +1 -0
- package/dist/ui/Turnstile/TurnstileWidget.d.ts +9 -0
- package/dist/ui/Turnstile/TurnstileWidget.d.ts.map +1 -0
- package/dist/ui/Turnstile/TurnstileWidget.js +18 -0
- package/dist/ui/Turnstile/TurnstileWidget.js.map +1 -0
- package/dist/ui/Turnstile/useTurnstileAuth.d.ts +14 -0
- package/dist/ui/Turnstile/useTurnstileAuth.d.ts.map +1 -0
- package/dist/ui/Turnstile/useTurnstileAuth.js +35 -0
- package/dist/ui/Turnstile/useTurnstileAuth.js.map +1 -0
- package/dist/ui/Turnstile/useTurnstileExecute.d.ts +16 -0
- package/dist/ui/Turnstile/useTurnstileExecute.d.ts.map +1 -0
- package/dist/ui/Turnstile/useTurnstileExecute.js +73 -0
- package/dist/ui/Turnstile/useTurnstileExecute.js.map +1 -0
- package/dist/ui/index.d.ts +12 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +12 -0
- package/dist/ui/index.js.map +1 -0
- package/package.json +168 -133
- package/src/tokens/__tests__/theme-exports.test.mjs +24 -0
- package/src/tokens/admin-theme.css +37 -0
- package/src/tokens/theme.css +49 -0
package/package.json
CHANGED
|
@@ -1,133 +1,168 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-kiosk-shared",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"private": false,
|
|
6
|
-
"description": "Shared types, API contracts, and error classes for Pi Kiosk system",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"kiosk",
|
|
9
|
-
"typescript",
|
|
10
|
-
"types",
|
|
11
|
-
"api"
|
|
12
|
-
],
|
|
13
|
-
"author": "tehacko@seznam.cz",
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/tehacko/pi-kiosk-shared.git"
|
|
18
|
-
},
|
|
19
|
-
"main": "dist/index.js",
|
|
20
|
-
"module": "dist/index.js",
|
|
21
|
-
"types": "dist/index.d.ts",
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"import": "./dist/index.js",
|
|
25
|
-
"require": "./dist/index.js",
|
|
26
|
-
"types": "./dist/index.d.ts"
|
|
27
|
-
},
|
|
28
|
-
"./analyticsExploreCaps": {
|
|
29
|
-
"import": "./dist/analyticsExploreCaps.js",
|
|
30
|
-
"require": "./dist/analyticsExploreCaps.js",
|
|
31
|
-
"types": "./dist/analyticsExploreCaps.d.ts"
|
|
32
|
-
},
|
|
33
|
-
"./analyticsApiTypes": {
|
|
34
|
-
"import": "./dist/analyticsApiTypes.js",
|
|
35
|
-
"require": "./dist/analyticsApiTypes.js",
|
|
36
|
-
"types": "./dist/analyticsApiTypes.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"./analyticsEvents": {
|
|
39
|
-
"import": "./dist/analyticsEvents.js",
|
|
40
|
-
"require": "./dist/analyticsEvents.js",
|
|
41
|
-
"types": "./dist/analyticsEvents.d.ts"
|
|
42
|
-
},
|
|
43
|
-
"./analyticsEmitterManifest": {
|
|
44
|
-
"import": "./dist/analyticsEmitterManifest.js",
|
|
45
|
-
"require": "./dist/analyticsEmitterManifest.js",
|
|
46
|
-
"types": "./dist/analyticsEmitterManifest.d.ts"
|
|
47
|
-
},
|
|
48
|
-
"./crossTab": {
|
|
49
|
-
"import": "./dist/crossTab/index.js",
|
|
50
|
-
"require": "./dist/crossTab/index.js",
|
|
51
|
-
"types": "./dist/crossTab/index.d.ts"
|
|
52
|
-
},
|
|
53
|
-
"./analyticsDevLog": {
|
|
54
|
-
"import": "./dist/analyticsDevLog.js",
|
|
55
|
-
"require": "./dist/analyticsDevLog.js",
|
|
56
|
-
"types": "./dist/analyticsDevLog.d.ts"
|
|
57
|
-
},
|
|
58
|
-
"./analyticsConsentAllowlist": {
|
|
59
|
-
"import": "./dist/analyticsConsentAllowlist.js",
|
|
60
|
-
"require": "./dist/analyticsConsentAllowlist.js",
|
|
61
|
-
"types": "./dist/analyticsConsentAllowlist.d.ts"
|
|
62
|
-
},
|
|
63
|
-
"./analyticsCatalogVersion": {
|
|
64
|
-
"import": "./dist/analyticsCatalogVersion.js",
|
|
65
|
-
"require": "./dist/analyticsCatalogVersion.js",
|
|
66
|
-
"types": "./dist/analyticsCatalogVersion.d.ts"
|
|
67
|
-
},
|
|
68
|
-
"./analyticsAnonymousIdentity": {
|
|
69
|
-
"import": "./dist/analyticsAnonymousIdentity.js",
|
|
70
|
-
"require": "./dist/analyticsAnonymousIdentity.js",
|
|
71
|
-
"types": "./dist/analyticsAnonymousIdentity.d.ts"
|
|
72
|
-
},
|
|
73
|
-
"./analyticsEmitDedup": {
|
|
74
|
-
"import": "./dist/analyticsEmitDedup.js",
|
|
75
|
-
"require": "./dist/analyticsEmitDedup.js",
|
|
76
|
-
"types": "./dist/analyticsEmitDedup.d.ts"
|
|
77
|
-
},
|
|
78
|
-
"./clientLogRedaction": {
|
|
79
|
-
"import": "./dist/clientLogRedaction.js",
|
|
80
|
-
"require": "./dist/clientLogRedaction.js",
|
|
81
|
-
"types": "./dist/clientLogRedaction.d.ts"
|
|
82
|
-
},
|
|
83
|
-
"./loyalty/loyaltySessionHandoff": {
|
|
84
|
-
"import": "./dist/loyalty/loyaltySessionHandoff.js",
|
|
85
|
-
"require": "./dist/loyalty/loyaltySessionHandoff.js",
|
|
86
|
-
"types": "./dist/loyalty/loyaltySessionHandoff.d.ts"
|
|
87
|
-
},
|
|
88
|
-
"./checkout/sessionMetadataV4": {
|
|
89
|
-
"import": "./dist/checkout/sessionMetadataV4.js",
|
|
90
|
-
"require": "./dist/checkout/sessionMetadataV4.js",
|
|
91
|
-
"types": "./dist/checkout/sessionMetadataV4.d.ts"
|
|
92
|
-
},
|
|
93
|
-
"./sentry": {
|
|
94
|
-
"import": "./dist/sentry/initSentry.js",
|
|
95
|
-
"require": "./dist/sentry/initSentry.js",
|
|
96
|
-
"types": "./dist/sentry/initSentry.d.ts"
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-kiosk-shared",
|
|
3
|
+
"version": "2.1.87",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"description": "Shared types, API contracts, and error classes for Pi Kiosk system",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"kiosk",
|
|
9
|
+
"typescript",
|
|
10
|
+
"types",
|
|
11
|
+
"api"
|
|
12
|
+
],
|
|
13
|
+
"author": "tehacko@seznam.cz",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/tehacko/pi-kiosk-shared.git"
|
|
18
|
+
},
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"module": "dist/index.js",
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"require": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./analyticsExploreCaps": {
|
|
29
|
+
"import": "./dist/analyticsExploreCaps.js",
|
|
30
|
+
"require": "./dist/analyticsExploreCaps.js",
|
|
31
|
+
"types": "./dist/analyticsExploreCaps.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./analyticsApiTypes": {
|
|
34
|
+
"import": "./dist/analyticsApiTypes.js",
|
|
35
|
+
"require": "./dist/analyticsApiTypes.js",
|
|
36
|
+
"types": "./dist/analyticsApiTypes.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./analyticsEvents": {
|
|
39
|
+
"import": "./dist/analyticsEvents.js",
|
|
40
|
+
"require": "./dist/analyticsEvents.js",
|
|
41
|
+
"types": "./dist/analyticsEvents.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./analyticsEmitterManifest": {
|
|
44
|
+
"import": "./dist/analyticsEmitterManifest.js",
|
|
45
|
+
"require": "./dist/analyticsEmitterManifest.js",
|
|
46
|
+
"types": "./dist/analyticsEmitterManifest.d.ts"
|
|
47
|
+
},
|
|
48
|
+
"./crossTab": {
|
|
49
|
+
"import": "./dist/crossTab/index.js",
|
|
50
|
+
"require": "./dist/crossTab/index.js",
|
|
51
|
+
"types": "./dist/crossTab/index.d.ts"
|
|
52
|
+
},
|
|
53
|
+
"./analyticsDevLog": {
|
|
54
|
+
"import": "./dist/analyticsDevLog.js",
|
|
55
|
+
"require": "./dist/analyticsDevLog.js",
|
|
56
|
+
"types": "./dist/analyticsDevLog.d.ts"
|
|
57
|
+
},
|
|
58
|
+
"./analyticsConsentAllowlist": {
|
|
59
|
+
"import": "./dist/analyticsConsentAllowlist.js",
|
|
60
|
+
"require": "./dist/analyticsConsentAllowlist.js",
|
|
61
|
+
"types": "./dist/analyticsConsentAllowlist.d.ts"
|
|
62
|
+
},
|
|
63
|
+
"./analyticsCatalogVersion": {
|
|
64
|
+
"import": "./dist/analyticsCatalogVersion.js",
|
|
65
|
+
"require": "./dist/analyticsCatalogVersion.js",
|
|
66
|
+
"types": "./dist/analyticsCatalogVersion.d.ts"
|
|
67
|
+
},
|
|
68
|
+
"./analyticsAnonymousIdentity": {
|
|
69
|
+
"import": "./dist/analyticsAnonymousIdentity.js",
|
|
70
|
+
"require": "./dist/analyticsAnonymousIdentity.js",
|
|
71
|
+
"types": "./dist/analyticsAnonymousIdentity.d.ts"
|
|
72
|
+
},
|
|
73
|
+
"./analyticsEmitDedup": {
|
|
74
|
+
"import": "./dist/analyticsEmitDedup.js",
|
|
75
|
+
"require": "./dist/analyticsEmitDedup.js",
|
|
76
|
+
"types": "./dist/analyticsEmitDedup.d.ts"
|
|
77
|
+
},
|
|
78
|
+
"./clientLogRedaction": {
|
|
79
|
+
"import": "./dist/clientLogRedaction.js",
|
|
80
|
+
"require": "./dist/clientLogRedaction.js",
|
|
81
|
+
"types": "./dist/clientLogRedaction.d.ts"
|
|
82
|
+
},
|
|
83
|
+
"./loyalty/loyaltySessionHandoff": {
|
|
84
|
+
"import": "./dist/loyalty/loyaltySessionHandoff.js",
|
|
85
|
+
"require": "./dist/loyalty/loyaltySessionHandoff.js",
|
|
86
|
+
"types": "./dist/loyalty/loyaltySessionHandoff.d.ts"
|
|
87
|
+
},
|
|
88
|
+
"./checkout/sessionMetadataV4": {
|
|
89
|
+
"import": "./dist/checkout/sessionMetadataV4.js",
|
|
90
|
+
"require": "./dist/checkout/sessionMetadataV4.js",
|
|
91
|
+
"types": "./dist/checkout/sessionMetadataV4.d.ts"
|
|
92
|
+
},
|
|
93
|
+
"./sentry": {
|
|
94
|
+
"import": "./dist/sentry/initSentry.js",
|
|
95
|
+
"require": "./dist/sentry/initSentry.js",
|
|
96
|
+
"types": "./dist/sentry/initSentry.d.ts"
|
|
97
|
+
},
|
|
98
|
+
"./sentry/captureRateLimitBreadcrumb": {
|
|
99
|
+
"import": "./dist/sentry/captureRateLimitBreadcrumb.js",
|
|
100
|
+
"require": "./dist/sentry/captureRateLimitBreadcrumb.js",
|
|
101
|
+
"types": "./dist/sentry/captureRateLimitBreadcrumb.d.ts"
|
|
102
|
+
},
|
|
103
|
+
"./theme.css": "./src/tokens/theme.css",
|
|
104
|
+
"./admin-theme.css": "./src/tokens/admin-theme.css",
|
|
105
|
+
"./ui": {
|
|
106
|
+
"import": "./dist/ui/index.js",
|
|
107
|
+
"require": "./dist/ui/index.js",
|
|
108
|
+
"types": "./dist/ui/index.d.ts"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"peerDependencies": {
|
|
112
|
+
"@marsidev/react-turnstile": "^1.0.0",
|
|
113
|
+
"@sentry/react": "^8.0.0",
|
|
114
|
+
"@tanstack/react-query": "^5.0.0",
|
|
115
|
+
"react": "^18.0.0",
|
|
116
|
+
"react-i18next": "^14.0.0"
|
|
117
|
+
},
|
|
118
|
+
"dependencies": {
|
|
119
|
+
"tailwind-variants": "^0.3.0",
|
|
120
|
+
"@tanstack/react-query": "^5.66.0"
|
|
121
|
+
},
|
|
122
|
+
"scripts": {
|
|
123
|
+
"build": "npm run clean && tsc",
|
|
124
|
+
"dev": "tsc --watch",
|
|
125
|
+
"type-check": "tsc --noEmit",
|
|
126
|
+
"lint": "npm run type-check",
|
|
127
|
+
"test": "jest --config jest.config.cjs --passWithNoTests && node --test src/tokens/__tests__/*.test.mjs",
|
|
128
|
+
"test:watch": "jest --config jest.config.cjs --watch",
|
|
129
|
+
"test:coverage": "jest --config jest.config.cjs --coverage",
|
|
130
|
+
"storybook": "storybook dev -p 6006",
|
|
131
|
+
"build-storybook": "storybook build",
|
|
132
|
+
"clean": "rimraf dist",
|
|
133
|
+
"publish:local": "npm run build && npm pack --pack-destination ../",
|
|
134
|
+
"prepublishOnly": "npm run build",
|
|
135
|
+
"preversion": "npm run test -- --passWithNoTests",
|
|
136
|
+
"postversion": "echo 'Version updated. Run git push && git push --tags manually if needed.'",
|
|
137
|
+
"audit:deps": "npm audit --audit-level=high",
|
|
138
|
+
"export:catalog": "npm run build && node scripts/exportAnalyticsCatalog.mjs"
|
|
139
|
+
},
|
|
140
|
+
"files": [
|
|
141
|
+
"dist",
|
|
142
|
+
"src/tokens",
|
|
143
|
+
"README.md"
|
|
144
|
+
],
|
|
145
|
+
"devDependencies": {
|
|
146
|
+
"@marsidev/react-turnstile": "^1.1.0",
|
|
147
|
+
"@sentry/react": "^8.55.0",
|
|
148
|
+
"@storybook/addon-essentials": "^8.6.0",
|
|
149
|
+
"@storybook/react-vite": "^8.6.0",
|
|
150
|
+
"@tanstack/react-query": "^5.66.0",
|
|
151
|
+
"@testing-library/jest-dom": "^6.6.0",
|
|
152
|
+
"@testing-library/react": "^16.0.0",
|
|
153
|
+
"@testing-library/user-event": "^14.6.0",
|
|
154
|
+
"@types/jest": "^29.5.0",
|
|
155
|
+
"@types/node": "^20.19.41",
|
|
156
|
+
"@types/react": "^18.2.0",
|
|
157
|
+
"jest": "^29.5.0",
|
|
158
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
159
|
+
"react": "^18.3.1",
|
|
160
|
+
"react-dom": "^18.3.1",
|
|
161
|
+
"react-i18next": "^14.1.0",
|
|
162
|
+
"rimraf": "^5.0.0",
|
|
163
|
+
"storybook": "^8.6.0",
|
|
164
|
+
"ts-jest": "^29.1.0",
|
|
165
|
+
"typescript": "^5.0.0",
|
|
166
|
+
"vite": "^6.0.0"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
2
|
+
import { join, dirname } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { test } from 'node:test';
|
|
5
|
+
import assert from 'node:assert/strict';
|
|
6
|
+
|
|
7
|
+
const tokensDir = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
8
|
+
|
|
9
|
+
test('theme.css and admin-theme.css exist and export @theme tokens', () => {
|
|
10
|
+
const theme = readFileSync(join(tokensDir, 'theme.css'), 'utf8');
|
|
11
|
+
const admin = readFileSync(join(tokensDir, 'admin-theme.css'), 'utf8');
|
|
12
|
+
assert.match(theme, /@theme/);
|
|
13
|
+
assert.match(theme, /--color-surface/);
|
|
14
|
+
assert.match(admin, /--color-an-bg/);
|
|
15
|
+
assert.match(admin, /--color-rail-sidebar-bg/);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('package.json exports token CSS paths', () => {
|
|
19
|
+
const pkgPath = join(tokensDir, '..', '..', 'package.json');
|
|
20
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
21
|
+
assert.ok(pkg.exports['./theme.css']);
|
|
22
|
+
assert.ok(pkg.exports['./admin-theme.css']);
|
|
23
|
+
assert.ok(existsSync(join(tokensDir, 'theme.css')));
|
|
24
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin analytics / shell design tokens — import from pi-kiosk-shared/admin-theme.css
|
|
3
|
+
* Apps: @import "pi-kiosk-shared/admin-theme.css" in admin tailwind entry.
|
|
4
|
+
*/
|
|
5
|
+
@theme {
|
|
6
|
+
--color-an-bg: var(--color-gray-50);
|
|
7
|
+
--color-an-bg-elevated: #ffffff;
|
|
8
|
+
--color-an-surface: #ffffff;
|
|
9
|
+
--color-an-text: var(--color-gray-900);
|
|
10
|
+
--color-an-text-muted: var(--color-gray-500);
|
|
11
|
+
--color-an-border: var(--color-gray-200);
|
|
12
|
+
--color-an-primary: var(--color-primary);
|
|
13
|
+
--color-an-primary-soft: var(--color-primary-light);
|
|
14
|
+
--color-an-success: var(--color-success);
|
|
15
|
+
--color-an-warn: var(--color-warning);
|
|
16
|
+
--color-an-danger: var(--color-error);
|
|
17
|
+
--color-an-info: var(--color-info);
|
|
18
|
+
--color-an-chart-1: #6366f1;
|
|
19
|
+
--color-an-chart-2: #14b8a6;
|
|
20
|
+
--color-an-chart-3: #f59e0b;
|
|
21
|
+
--color-an-chart-4: #ef4444;
|
|
22
|
+
--color-an-chart-5: #8b5cf6;
|
|
23
|
+
--color-an-chart-6: #06b6d4;
|
|
24
|
+
--color-shell-bg: var(--color-an-bg);
|
|
25
|
+
--color-shell-surface: var(--color-an-surface);
|
|
26
|
+
--color-shell-border: var(--color-an-border);
|
|
27
|
+
--color-shell-text: var(--color-an-text);
|
|
28
|
+
--color-rail-sidebar-bg: #1e1b4b;
|
|
29
|
+
--color-rail-sidebar-text: #e0e7ff;
|
|
30
|
+
--color-rail-sidebar-muted: #a5b4fc;
|
|
31
|
+
--color-rail-sidebar-active: #7c3aed;
|
|
32
|
+
--color-rail-sidebar-hover: rgba(124, 58, 237, 0.2);
|
|
33
|
+
--color-rail-page-bg: #f1f5f9;
|
|
34
|
+
--color-rail-card-border: #e2e8f0;
|
|
35
|
+
--color-rail-kpi-up: #059669;
|
|
36
|
+
--color-rail-kpi-down: #dc2626;
|
|
37
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Customer / kiosk / pickup design tokens — import from pi-kiosk-shared/theme.css
|
|
3
|
+
* Apps: @import "pi-kiosk-shared/theme.css" after tailwindcss in globals entry.
|
|
4
|
+
*/
|
|
5
|
+
@theme {
|
|
6
|
+
--color-surface: #ffffff;
|
|
7
|
+
--color-surface-muted: #f8fafc;
|
|
8
|
+
--color-surface-elevated: #ffffff;
|
|
9
|
+
--color-on-surface: #0f172a;
|
|
10
|
+
--color-on-surface-muted: #475569;
|
|
11
|
+
--color-primary: #0f172a;
|
|
12
|
+
--color-primary-foreground: #f8fafc;
|
|
13
|
+
--color-accent: #2563eb;
|
|
14
|
+
--color-accent-foreground: #ffffff;
|
|
15
|
+
--color-success: #16a34a;
|
|
16
|
+
--color-success-foreground: #ecfdf5;
|
|
17
|
+
--color-danger: #dc2626;
|
|
18
|
+
--color-danger-foreground: #fef2f2;
|
|
19
|
+
--color-warning: #d97706;
|
|
20
|
+
--color-warning-foreground: #fffbeb;
|
|
21
|
+
--color-border: #e2e8f0;
|
|
22
|
+
--color-border-strong: #cbd5e1;
|
|
23
|
+
--color-focus-ring: #2563eb;
|
|
24
|
+
--radius-sm: 0.375rem;
|
|
25
|
+
--radius-md: 0.5rem;
|
|
26
|
+
--radius-lg: 0.75rem;
|
|
27
|
+
--radius-xl: 1rem;
|
|
28
|
+
--shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
|
|
29
|
+
--shadow-popover: 0 6px 24px rgba(15, 23, 42, 0.12);
|
|
30
|
+
--motion-duration-fast: 120ms;
|
|
31
|
+
--motion-duration-base: 200ms;
|
|
32
|
+
--motion-easing-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-color-scheme: dark) {
|
|
36
|
+
@theme {
|
|
37
|
+
--color-surface: #0b1220;
|
|
38
|
+
--color-surface-muted: #0f172a;
|
|
39
|
+
--color-surface-elevated: #111a2e;
|
|
40
|
+
--color-on-surface: #e2e8f0;
|
|
41
|
+
--color-on-surface-muted: #94a3b8;
|
|
42
|
+
--color-primary: #f8fafc;
|
|
43
|
+
--color-primary-foreground: #0f172a;
|
|
44
|
+
--color-accent: #60a5fa;
|
|
45
|
+
--color-accent-foreground: #0b1220;
|
|
46
|
+
--color-border: #1f2937;
|
|
47
|
+
--color-border-strong: #334155;
|
|
48
|
+
}
|
|
49
|
+
}
|