@elevasis/ui 1.19.0 → 1.20.1
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/api/index.js +2 -2
- package/dist/auth/index.js +3 -3
- package/dist/charts/index.css +14 -0
- package/dist/charts/index.js +8 -6
- package/dist/{chunk-7ATCF6UL.js → chunk-3DIU726S.js} +11 -4
- package/dist/chunk-4SY4EQSK.js +68 -0
- package/dist/{chunk-2Z7LYTIX.js → chunk-AQ5MQDSS.js} +30 -17
- package/dist/chunk-AWMZCYKH.js +639 -0
- package/dist/{chunk-BVNAC4SQ.js → chunk-C7AD6N23.js} +38 -48
- package/dist/{chunk-ZFCG5SHW.js → chunk-COTI2QPO.js} +1 -1
- package/dist/{chunk-WAPZN2U3.js → chunk-EMN755L5.js} +7 -41
- package/dist/{chunk-LBY7FVFD.js → chunk-ERVB3QJQ.js} +31 -715
- package/dist/chunk-GBMNCNHX.js +105 -0
- package/dist/{chunk-MBZDE6UT.js → chunk-IOKL7BKE.js} +9 -1
- package/dist/{chunk-35UWYH2A.js → chunk-JFRG2JJE.js} +8 -2
- package/dist/chunk-JIABC3AE.js +2622 -0
- package/dist/chunk-JZEXFQ6N.js +671 -0
- package/dist/chunk-LGKLC5MG.js +44 -0
- package/dist/chunk-MG3NF7QL.js +63 -0
- package/dist/{chunk-KBLGVZBD.js → chunk-NNKKBSJN.js} +2 -22
- package/dist/{chunk-JNBHUCKW.js → chunk-NVOCKXUQ.js} +1 -1
- package/dist/chunk-OFAXUZPZ.js +2411 -0
- package/dist/chunk-PDHTXPSF.js +12 -0
- package/dist/chunk-QJ2S46NI.js +23 -0
- package/dist/{chunk-NUULWBAD.js → chunk-R3R367QY.js} +1 -1
- package/dist/{chunk-UANJP5P7.js → chunk-R7WLWGPO.js} +5 -5
- package/dist/{chunk-CC3SDRIF.js → chunk-RWQIFKMJ.js} +1 -1
- package/dist/chunk-UMFPUM7Q.js +1281 -0
- package/dist/{chunk-KNJKCD73.js → chunk-VLTVZXP6.js} +4 -4
- package/dist/chunk-WWEMNIHW.js +37 -0
- package/dist/{chunk-UTWJZEOJ.js → chunk-XOTN3X3Z.js} +3 -3
- package/dist/components/index.css +14 -0
- package/dist/components/index.d.ts +41 -7
- package/dist/components/index.js +564 -5023
- package/dist/components/navigation/index.js +2 -63
- package/dist/features/auth/index.css +579 -0
- package/dist/features/auth/index.d.ts +2557 -0
- package/dist/features/auth/index.js +125 -0
- package/dist/features/dashboard/index.css +579 -0
- package/dist/features/dashboard/index.d.ts +244 -0
- package/dist/features/dashboard/index.js +650 -0
- package/dist/features/monitoring/index.css +579 -0
- package/dist/features/monitoring/index.d.ts +121 -0
- package/dist/features/monitoring/index.js +538 -0
- package/dist/features/operations/index.css +14 -0
- package/dist/features/operations/index.d.ts +1675 -2
- package/dist/features/operations/index.js +2148 -28
- package/dist/features/settings/index.css +579 -0
- package/dist/features/settings/index.d.ts +2589 -0
- package/dist/features/settings/index.js +1437 -0
- package/dist/hooks/index.css +14 -0
- package/dist/hooks/index.d.ts +29 -11
- package/dist/hooks/index.js +13 -13
- package/dist/hooks/published.css +14 -0
- package/dist/hooks/published.d.ts +29 -11
- package/dist/hooks/published.js +12 -12
- package/dist/index.css +14 -0
- package/dist/index.d.ts +41 -12
- package/dist/index.js +15 -15
- package/dist/initialization/index.js +2 -2
- package/dist/layout/index.d.ts +7 -1
- package/dist/layout/index.js +7 -5
- package/dist/organization/index.js +2 -2
- package/dist/provider/index.css +14 -0
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.js +10 -10
- package/dist/provider/published.d.ts +1 -1
- package/dist/provider/published.js +6 -6
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
- package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
- package/dist/theme/presets/__tests__/getPreset.test.js +92 -0
- package/dist/theme/presets/cyber-volt.d.ts +12 -0
- package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
- package/dist/theme/presets/cyber-volt.js +70 -0
- package/dist/theme/presets/regal.d.ts +8 -0
- package/dist/theme/presets/regal.d.ts.map +1 -0
- package/dist/theme/presets/regal.js +69 -0
- package/dist/theme/presets/rose-gold.d.ts +12 -0
- package/dist/theme/presets/rose-gold.d.ts.map +1 -0
- package/dist/theme/presets/rose-gold.js +76 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.d.ts +12 -1
- package/dist/utils/index.js +1 -1
- package/dist/zustand/index.d.ts +80 -0
- package/dist/zustand/index.js +105 -0
- package/package.json +55 -4
- package/dist/chunk-2YW3LDFT.js +0 -1542
- package/dist/theme/presets/cyber-void.d.ts +0 -12
- package/dist/theme/presets/cyber-void.d.ts.map +0 -1
- package/dist/theme/presets/cyber-void.js +0 -75
- package/dist/{chunk-DVKEEY5J.js → chunk-TUXTSEAF.js} +1 -1
- package/dist/{chunk-U2522LSW.js → chunk-V7XHGJQZ.js} +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// src/zustand/slices/sse.ts
|
|
2
|
+
function resetSSEState(state) {
|
|
3
|
+
state.sse.notificationCount = null;
|
|
4
|
+
state.sse.notificationConnected = false;
|
|
5
|
+
state.sse.notificationError = null;
|
|
6
|
+
state.sse.activityConnected = false;
|
|
7
|
+
state.sse.activityError = null;
|
|
8
|
+
state.sse.commandQueueConnected = false;
|
|
9
|
+
state.sse.commandQueueError = null;
|
|
10
|
+
}
|
|
11
|
+
function createSSESlice(set) {
|
|
12
|
+
return {
|
|
13
|
+
sse: {
|
|
14
|
+
notificationCount: null,
|
|
15
|
+
notificationConnected: false,
|
|
16
|
+
notificationError: null,
|
|
17
|
+
activityConnected: false,
|
|
18
|
+
activityError: null,
|
|
19
|
+
commandQueueConnected: false,
|
|
20
|
+
commandQueueError: null
|
|
21
|
+
},
|
|
22
|
+
setNotificationCount: (count) => set((state) => {
|
|
23
|
+
state.sse.notificationCount = count;
|
|
24
|
+
}),
|
|
25
|
+
setNotificationConnected: (connected) => set((state) => {
|
|
26
|
+
state.sse.notificationConnected = connected;
|
|
27
|
+
}),
|
|
28
|
+
setNotificationError: (error) => set((state) => {
|
|
29
|
+
state.sse.notificationError = error;
|
|
30
|
+
}),
|
|
31
|
+
setActivityConnected: (connected) => set((state) => {
|
|
32
|
+
state.sse.activityConnected = connected;
|
|
33
|
+
}),
|
|
34
|
+
setActivityError: (error) => set((state) => {
|
|
35
|
+
state.sse.activityError = error;
|
|
36
|
+
}),
|
|
37
|
+
setCommandQueueConnected: (connected) => set((state) => {
|
|
38
|
+
state.sse.commandQueueConnected = connected;
|
|
39
|
+
}),
|
|
40
|
+
setCommandQueueError: (error) => set((state) => {
|
|
41
|
+
state.sse.commandQueueError = error;
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/zustand/slices/theme.ts
|
|
47
|
+
var THEME_STORAGE_KEY = "elevasis-theme";
|
|
48
|
+
var VALID_SCHEMES = ["light", "dark", "auto"];
|
|
49
|
+
function loadThemeFromStorage(defaultPreset, defaultColorScheme) {
|
|
50
|
+
try {
|
|
51
|
+
const raw = localStorage.getItem(THEME_STORAGE_KEY);
|
|
52
|
+
if (raw) {
|
|
53
|
+
const parsed = JSON.parse(raw);
|
|
54
|
+
return {
|
|
55
|
+
preset: typeof parsed.preset === "string" ? parsed.preset : defaultPreset,
|
|
56
|
+
colorScheme: VALID_SCHEMES.includes(parsed.colorScheme) ? parsed.colorScheme : defaultColorScheme
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
return { preset: defaultPreset, colorScheme: defaultColorScheme };
|
|
62
|
+
}
|
|
63
|
+
function saveThemeToStorage(theme) {
|
|
64
|
+
try {
|
|
65
|
+
localStorage.setItem(THEME_STORAGE_KEY, JSON.stringify(theme));
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function resetThemeState(state, options = {}) {
|
|
70
|
+
state.theme.preset = options.defaultPreset ?? "tactical";
|
|
71
|
+
state.theme.colorScheme = options.defaultColorScheme ?? "dark";
|
|
72
|
+
}
|
|
73
|
+
function createThemeSlice(set, options = {}) {
|
|
74
|
+
const defaultPreset = options.defaultPreset ?? "tactical";
|
|
75
|
+
const defaultColorScheme = options.defaultColorScheme ?? "dark";
|
|
76
|
+
return {
|
|
77
|
+
theme: loadThemeFromStorage(defaultPreset, defaultColorScheme),
|
|
78
|
+
setTheme: (updates) => set((state) => {
|
|
79
|
+
if (updates.preset !== void 0) {
|
|
80
|
+
state.theme.preset = updates.preset;
|
|
81
|
+
}
|
|
82
|
+
if (updates.colorScheme !== void 0) {
|
|
83
|
+
state.theme.colorScheme = VALID_SCHEMES.includes(updates.colorScheme) ? updates.colorScheme : state.theme.colorScheme;
|
|
84
|
+
}
|
|
85
|
+
saveThemeToStorage(state.theme);
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// src/zustand/slices/timeRange.ts
|
|
91
|
+
function resetTimeRangeState(state) {
|
|
92
|
+
state.timeRange.value = "24h";
|
|
93
|
+
}
|
|
94
|
+
function createTimeRangeSlice(set) {
|
|
95
|
+
return {
|
|
96
|
+
timeRange: {
|
|
97
|
+
value: "24h"
|
|
98
|
+
},
|
|
99
|
+
setTimeRange: (value) => set((state) => {
|
|
100
|
+
state.timeRange.value = value;
|
|
101
|
+
})
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { createSSESlice, createThemeSlice, createTimeRangeSlice, resetSSEState, resetThemeState, resetTimeRangeState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,10 +43,26 @@
|
|
|
43
43
|
"types": "./dist/organization/index.d.ts",
|
|
44
44
|
"import": "./dist/organization/index.js"
|
|
45
45
|
},
|
|
46
|
+
"./features/auth": {
|
|
47
|
+
"types": "./dist/features/auth/index.d.ts",
|
|
48
|
+
"import": "./dist/features/auth/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./features/dashboard": {
|
|
51
|
+
"types": "./dist/features/dashboard/index.d.ts",
|
|
52
|
+
"import": "./dist/features/dashboard/index.js"
|
|
53
|
+
},
|
|
46
54
|
"./features/operations": {
|
|
47
55
|
"types": "./dist/features/operations/index.d.ts",
|
|
48
56
|
"import": "./dist/features/operations/index.js"
|
|
49
57
|
},
|
|
58
|
+
"./features/monitoring": {
|
|
59
|
+
"types": "./dist/features/monitoring/index.d.ts",
|
|
60
|
+
"import": "./dist/features/monitoring/index.js"
|
|
61
|
+
},
|
|
62
|
+
"./features/settings": {
|
|
63
|
+
"types": "./dist/features/settings/index.d.ts",
|
|
64
|
+
"import": "./dist/features/settings/index.js"
|
|
65
|
+
},
|
|
50
66
|
"./types": {
|
|
51
67
|
"types": "./dist/types/index.d.ts",
|
|
52
68
|
"import": "./dist/types/index.js"
|
|
@@ -101,7 +117,11 @@
|
|
|
101
117
|
},
|
|
102
118
|
"./components/index.css": "./dist/components/index.css",
|
|
103
119
|
"./graph/index.css": "./dist/graph/index.css",
|
|
104
|
-
"./provider/index.css": "./dist/provider/index.css"
|
|
120
|
+
"./provider/index.css": "./dist/provider/index.css",
|
|
121
|
+
"./zustand": {
|
|
122
|
+
"types": "./dist/zustand/index.d.ts",
|
|
123
|
+
"import": "./dist/zustand/index.js"
|
|
124
|
+
}
|
|
105
125
|
},
|
|
106
126
|
"publishConfig": {
|
|
107
127
|
"name": "@elevasis/ui",
|
|
@@ -117,6 +137,11 @@
|
|
|
117
137
|
"@mantine/charts": "8.2.7",
|
|
118
138
|
"@mantine/notifications": "8.2.7",
|
|
119
139
|
"@mantine/form": "8.2.7",
|
|
140
|
+
"@mantine/tiptap": "8.2.7",
|
|
141
|
+
"@tiptap/extension-link": "^2.11.7",
|
|
142
|
+
"@tiptap/extension-placeholder": "^2.11.7",
|
|
143
|
+
"@tiptap/react": "^2.11.7",
|
|
144
|
+
"@tiptap/starter-kit": "^2.11.7",
|
|
120
145
|
"@tabler/icons-react": "^3.27.0",
|
|
121
146
|
"@xyflow/react": "^12.8.5",
|
|
122
147
|
"recharts": "^3.2.1",
|
|
@@ -149,6 +174,21 @@
|
|
|
149
174
|
},
|
|
150
175
|
"date-fns": {
|
|
151
176
|
"optional": true
|
|
177
|
+
},
|
|
178
|
+
"@mantine/tiptap": {
|
|
179
|
+
"optional": true
|
|
180
|
+
},
|
|
181
|
+
"@tiptap/extension-link": {
|
|
182
|
+
"optional": true
|
|
183
|
+
},
|
|
184
|
+
"@tiptap/extension-placeholder": {
|
|
185
|
+
"optional": true
|
|
186
|
+
},
|
|
187
|
+
"@tiptap/react": {
|
|
188
|
+
"optional": true
|
|
189
|
+
},
|
|
190
|
+
"@tiptap/starter-kit": {
|
|
191
|
+
"optional": true
|
|
152
192
|
}
|
|
153
193
|
}
|
|
154
194
|
},
|
|
@@ -158,6 +198,11 @@
|
|
|
158
198
|
"@mantine/form": "8.2.7",
|
|
159
199
|
"@mantine/hooks": "8.2.7",
|
|
160
200
|
"@mantine/notifications": "8.2.7",
|
|
201
|
+
"@mantine/tiptap": "8.2.7",
|
|
202
|
+
"@tiptap/extension-link": "^2.11.7",
|
|
203
|
+
"@tiptap/extension-placeholder": "^2.11.7",
|
|
204
|
+
"@tiptap/react": "^2.11.7",
|
|
205
|
+
"@tiptap/starter-kit": "^2.11.7",
|
|
161
206
|
"@supabase/supabase-js": "^2.49.4",
|
|
162
207
|
"@tabler/icons-react": "^3.27.0",
|
|
163
208
|
"@tanstack/react-query": "^5.76.2",
|
|
@@ -174,6 +219,12 @@
|
|
|
174
219
|
"devDependencies": {
|
|
175
220
|
"@mantine/charts": "8.2.7",
|
|
176
221
|
"@mantine/notifications": "8.2.7",
|
|
222
|
+
"@mantine/tiptap": "8.2.7",
|
|
223
|
+
"@tiptap/extension-link": "^2.11.7",
|
|
224
|
+
"@tiptap/extension-placeholder": "^2.11.7",
|
|
225
|
+
"@tiptap/react": "^2.11.7",
|
|
226
|
+
"@tiptap/starter-kit": "^2.11.7",
|
|
227
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
177
228
|
"@types/react": "^19.2.2",
|
|
178
229
|
"@types/react-dom": "^19.1.9",
|
|
179
230
|
"globals": "^16.3.0",
|
|
@@ -192,9 +243,9 @@
|
|
|
192
243
|
"@microsoft/fetch-event-source": "^2.0.1"
|
|
193
244
|
},
|
|
194
245
|
"scripts": {
|
|
195
|
-
"build": "tsc",
|
|
246
|
+
"build": "tsc --noEmit",
|
|
196
247
|
"build:publish": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && node -e \"require('fs').rmSync('dist/_dts',{recursive:true,force:true})\"",
|
|
197
|
-
"dev": "tsc --watch",
|
|
248
|
+
"dev": "tsc --noEmit --watch",
|
|
198
249
|
"lint": "eslint src --max-warnings 0",
|
|
199
250
|
"check-types": "tsc --noEmit",
|
|
200
251
|
"test": "vitest run --passWithNoTests",
|