@scalio-cloud/ui 0.108.0 → 0.109.0

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.
Files changed (61) hide show
  1. package/dist/app-kit/ScalioAuditPages.d.ts +37 -0
  2. package/dist/app-kit/ScalioAuditPages.d.ts.map +1 -0
  3. package/dist/app-kit/ScalioBackupSection.d.ts +27 -0
  4. package/dist/app-kit/ScalioBackupSection.d.ts.map +1 -0
  5. package/dist/app-kit/ScalioInvitePage.d.ts +24 -0
  6. package/dist/app-kit/ScalioInvitePage.d.ts.map +1 -0
  7. package/dist/app-kit/ScalioLoginPage.d.ts +31 -0
  8. package/dist/app-kit/ScalioLoginPage.d.ts.map +1 -0
  9. package/dist/app-kit/ScalioPasswordChangePage.d.ts +21 -0
  10. package/dist/app-kit/ScalioPasswordChangePage.d.ts.map +1 -0
  11. package/dist/app-kit/ScalioProfilePage.d.ts +39 -0
  12. package/dist/app-kit/ScalioProfilePage.d.ts.map +1 -0
  13. package/dist/app-kit/ScalioSaasUpdatesSection.d.ts +23 -0
  14. package/dist/app-kit/ScalioSaasUpdatesSection.d.ts.map +1 -0
  15. package/dist/app-kit/ScalioSecurityFactors.d.ts +28 -0
  16. package/dist/app-kit/ScalioSecurityFactors.d.ts.map +1 -0
  17. package/dist/app-kit/ScalioSelfTestPage.d.ts +14 -0
  18. package/dist/app-kit/ScalioSelfTestPage.d.ts.map +1 -0
  19. package/dist/app-kit/ScalioSupportCard.d.ts +13 -0
  20. package/dist/app-kit/ScalioSupportCard.d.ts.map +1 -0
  21. package/dist/app-kit/ScalioUsersPage.d.ts +48 -0
  22. package/dist/app-kit/ScalioUsersPage.d.ts.map +1 -0
  23. package/dist/app-kit/index.d.ts +27 -0
  24. package/dist/app-kit/index.d.ts.map +1 -0
  25. package/dist/app-kit/index.js +931 -0
  26. package/dist/app-kit/index.js.map +1 -0
  27. package/dist/app-kit/index.mjs +878 -0
  28. package/dist/app-kit/index.mjs.map +1 -0
  29. package/dist/chunk-A7O3P4YV.mjs +457 -0
  30. package/dist/chunk-A7O3P4YV.mjs.map +1 -0
  31. package/dist/config/index.d.ts +35 -0
  32. package/dist/config/index.d.ts.map +1 -0
  33. package/dist/config/index.js +85 -0
  34. package/dist/config/index.js.map +1 -0
  35. package/dist/config/index.mjs +59 -0
  36. package/dist/config/index.mjs.map +1 -0
  37. package/dist/core/afterLogin.d.ts +6 -0
  38. package/dist/core/afterLogin.d.ts.map +1 -0
  39. package/dist/core/api.d.ts +48 -0
  40. package/dist/core/api.d.ts.map +1 -0
  41. package/dist/core/auditActions.d.ts +17 -0
  42. package/dist/core/auditActions.d.ts.map +1 -0
  43. package/dist/core/datetime.d.ts +18 -0
  44. package/dist/core/datetime.d.ts.map +1 -0
  45. package/dist/core/i18n.d.ts +51 -0
  46. package/dist/core/i18n.d.ts.map +1 -0
  47. package/dist/core/index.d.ts +14 -0
  48. package/dist/core/index.d.ts.map +1 -0
  49. package/dist/core/index.js +509 -0
  50. package/dist/core/index.js.map +1 -0
  51. package/dist/core/index.mjs +39 -0
  52. package/dist/core/index.mjs.map +1 -0
  53. package/dist/core/legal.d.ts +17 -0
  54. package/dist/core/legal.d.ts.map +1 -0
  55. package/dist/core/mailReady.d.ts +12 -0
  56. package/dist/core/mailReady.d.ts.map +1 -0
  57. package/dist/core/passkeys.d.ts +30 -0
  58. package/dist/core/passkeys.d.ts.map +1 -0
  59. package/dist/core/permissions.d.ts +10 -0
  60. package/dist/core/permissions.d.ts.map +1 -0
  61. package/package.json +47 -3
@@ -0,0 +1,12 @@
1
+ export interface MailSettingsLike {
2
+ readonly provider?: string | null;
3
+ readonly default?: {
4
+ readonly available?: boolean | null;
5
+ } | null;
6
+ }
7
+ /**
8
+ * Returns whether outbound mail (e.g. invitations) can be sent:
9
+ * a provider is configured and, for `"default"`, the default transport is available.
10
+ */
11
+ export declare function mailReady(settings: MailSettingsLike | null | undefined): boolean;
12
+ //# sourceMappingURL=mailReady.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailReady.d.ts","sourceRoot":"","sources":["../../src/core/mailReady.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACrC,GAAG,IAAI,CAAC;CACV;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIhF"}
@@ -0,0 +1,30 @@
1
+ export interface PasskeyApiClient {
2
+ post<T = unknown>(url: string, data?: unknown): Promise<{
3
+ data: T;
4
+ }>;
5
+ }
6
+ export interface PasskeyOptionsResponse {
7
+ readonly options: unknown;
8
+ readonly challenge_id: string;
9
+ }
10
+ export interface CreatePasskeyClientOptions {
11
+ readonly api: PasskeyApiClient;
12
+ readonly browserSupportsWebAuthn: () => boolean;
13
+ readonly startAuthentication: (opts: {
14
+ optionsJSON: unknown;
15
+ }) => Promise<unknown>;
16
+ }
17
+ export interface PasskeyClient {
18
+ readonly passkeysSupported: () => boolean;
19
+ readonly signInWithPasskey: <T = unknown>() => Promise<T>;
20
+ readonly passkeyCancelled: (error: unknown) => boolean;
21
+ }
22
+ /**
23
+ * Returns true when the user dismissed or cancelled the browser's WebAuthn dialog.
24
+ */
25
+ export declare function passkeyCancelled(error: unknown): boolean;
26
+ /**
27
+ * Creates passkey sign-in helpers bound to an app's API client and `@simplewebauthn/browser`.
28
+ */
29
+ export declare function createPasskeyClient(options: CreatePasskeyClientOptions): PasskeyClient;
30
+ //# sourceMappingURL=passkeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passkeys.d.ts","sourceRoot":"","sources":["../../src/core/passkeys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,uBAAuB,EAAE,MAAM,OAAO,CAAC;IAChD,QAAQ,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE;QAAE,WAAW,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACpF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,OAAO,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC,GAAG,OAAO,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1D,QAAQ,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIxD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,aAAa,CAoBtF"}
@@ -0,0 +1,10 @@
1
+ export interface ScalioUserLike {
2
+ readonly role?: string | null;
3
+ readonly permissions?: readonly string[] | null;
4
+ }
5
+ /**
6
+ * Checks whether the signed-in user has a given permission.
7
+ * Administrators (`role === "admin"`) always have all permissions.
8
+ */
9
+ export declare function can(user: ScalioUserLike | null | undefined, permission: string): boolean;
10
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/core/permissions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CACjD;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAIxF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalio-cloud/ui",
3
- "version": "0.108.0",
3
+ "version": "0.109.0",
4
4
  "description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "private": false,
@@ -43,9 +43,28 @@
43
43
  "types": "./shadcn/*.d.mts",
44
44
  "import": "./shadcn/*.mjs",
45
45
  "default": "./shadcn/*.mjs"
46
+ },
47
+ "./core": {
48
+ "types": "./dist/core/index.d.ts",
49
+ "import": "./dist/core/index.mjs",
50
+ "require": "./dist/core/index.js",
51
+ "default": "./dist/core/index.mjs"
52
+ },
53
+ "./app-kit": {
54
+ "types": "./dist/app-kit/index.d.ts",
55
+ "import": "./dist/app-kit/index.mjs",
56
+ "require": "./dist/app-kit/index.js",
57
+ "default": "./dist/app-kit/index.mjs"
58
+ },
59
+ "./config": {
60
+ "types": "./dist/config/index.d.ts",
61
+ "import": "./dist/config/index.mjs",
62
+ "require": "./dist/config/index.js",
63
+ "default": "./dist/config/index.mjs"
46
64
  }
47
65
  },
48
66
  "files": [
67
+ "dist/",
49
68
  "tokens.js",
50
69
  "tokens.d.ts",
51
70
  "tailwind-preset.js",
@@ -81,12 +100,15 @@
81
100
  "@radix-ui/react-slot": "^1.1.0",
82
101
  "@radix-ui/react-switch": "^1.1.0",
83
102
  "@radix-ui/react-tabs": "^1.1.0",
103
+ "@tanstack/react-query": "^5.0.0",
104
+ "axios": ">=1.7.0 <2",
84
105
  "class-variance-authority": "^0.7.0",
85
106
  "clsx": "^2.1.0",
86
107
  "cmdk": "^1.1.0",
87
108
  "lucide-react": ">=0.400.0",
88
109
  "react": ">=18",
89
110
  "react-dom": ">=18",
111
+ "react-router-dom": ">=6.0.0 <8",
90
112
  "sonner": "^2.0.0",
91
113
  "tailwind-merge": "^3.0.0",
92
114
  "tailwindcss": ">=3.3 <4"
@@ -125,6 +147,12 @@
125
147
  "@radix-ui/react-tabs": {
126
148
  "optional": true
127
149
  },
150
+ "@tanstack/react-query": {
151
+ "optional": true
152
+ },
153
+ "axios": {
154
+ "optional": true
155
+ },
128
156
  "class-variance-authority": {
129
157
  "optional": true
130
158
  },
@@ -143,6 +171,9 @@
143
171
  "react-dom": {
144
172
  "optional": true
145
173
  },
174
+ "react-router-dom": {
175
+ "optional": true
176
+ },
146
177
  "sonner": {
147
178
  "optional": true
148
179
  },
@@ -154,7 +185,12 @@
154
185
  }
155
186
  },
156
187
  "scripts": {
157
- "test": "node --test test/*.test.js"
188
+ "build": "tsup && tsc -p tsconfig.build.json",
189
+ "typecheck": "tsc --noEmit",
190
+ "test:legacy": "node --test test/*.test.js",
191
+ "test:unit": "vitest run",
192
+ "test": "npm run build && npm run typecheck && npm run test:legacy && npm run test:unit",
193
+ "prepack": "npm run build"
158
194
  },
159
195
  "engines": {
160
196
  "node": ">=18"
@@ -171,6 +207,10 @@
171
207
  "@radix-ui/react-slot": "1.5.0",
172
208
  "@radix-ui/react-switch": "1.4.1",
173
209
  "@radix-ui/react-tabs": "1.2.1",
210
+ "@types/node": "^26.6.11",
211
+ "@types/react": "^19.3.3",
212
+ "@types/react-dom": "^19.3.0",
213
+ "axios": "^1.22.0",
174
214
  "class-variance-authority": "0.7.1",
175
215
  "clsx": "2.1.1",
176
216
  "cmdk": "1.1.1",
@@ -178,7 +218,11 @@
178
218
  "lucide-react": "1.72.0",
179
219
  "react": "19.3.1",
180
220
  "react-dom": "19.3.1",
221
+ "react-router-dom": "^7.18.7",
181
222
  "sonner": "2.0.8",
182
- "tailwind-merge": "3.7.0"
223
+ "tailwind-merge": "3.7.0",
224
+ "tsup": "^9.0.0",
225
+ "typescript": "^7.0.2",
226
+ "vitest": "^5.1.2"
183
227
  }
184
228
  }