@zhin.js/client 1.0.4 → 1.0.5
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/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/router/index.d.ts +25 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +49 -0
- package/dist/router/index.js.map +1 -0
- package/dist/store/index.d.ts +19 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +67 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/reducers/config.d.ts +54 -0
- package/dist/store/reducers/config.d.ts.map +1 -0
- package/dist/store/reducers/config.js +78 -0
- package/dist/store/reducers/config.js.map +1 -0
- package/dist/store/reducers/index.d.ts +13 -0
- package/dist/store/reducers/index.d.ts.map +1 -0
- package/dist/store/reducers/index.js +11 -0
- package/dist/store/reducers/index.js.map +1 -0
- package/dist/store/reducers/route.d.ts +37 -0
- package/dist/store/reducers/route.d.ts.map +1 -0
- package/dist/store/reducers/route.js +85 -0
- package/dist/store/reducers/route.js.map +1 -0
- package/dist/store/reducers/script.d.ts +17 -0
- package/dist/store/reducers/script.d.ts.map +1 -0
- package/dist/store/reducers/script.js +74 -0
- package/dist/store/reducers/script.js.map +1 -0
- package/dist/store/reducers/ui.d.ts +14 -0
- package/dist/store/reducers/ui.d.ts.map +1 -0
- package/dist/store/reducers/ui.js +23 -0
- package/dist/store/reducers/ui.js.map +1 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/websocket/hooks.d.ts +55 -0
- package/dist/websocket/hooks.d.ts.map +1 -0
- package/dist/websocket/hooks.js +225 -0
- package/dist/websocket/hooks.js.map +1 -0
- package/dist/websocket/index.d.ts +13 -0
- package/dist/websocket/index.d.ts.map +1 -0
- package/dist/websocket/index.js +31 -0
- package/dist/websocket/index.js.map +1 -0
- package/dist/websocket/instance.d.ts +18 -0
- package/dist/websocket/instance.d.ts.map +1 -0
- package/dist/websocket/instance.js +39 -0
- package/dist/websocket/instance.js.map +1 -0
- package/dist/websocket/manager.d.ts +110 -0
- package/dist/websocket/manager.d.ts.map +1 -0
- package/dist/websocket/manager.js +341 -0
- package/dist/websocket/manager.js.map +1 -0
- package/dist/websocket/messageHandler.d.ts +48 -0
- package/dist/websocket/messageHandler.d.ts.map +1 -0
- package/dist/websocket/messageHandler.js +140 -0
- package/dist/websocket/messageHandler.js.map +1 -0
- package/dist/websocket/types.d.ts +125 -0
- package/dist/websocket/types.d.ts.map +1 -0
- package/dist/websocket/types.js +43 -0
- package/dist/websocket/types.js.map +1 -0
- package/package.json +8 -18
- package/app/index.html +0 -13
- package/app/postcss.config.js +0 -5
- package/app/src/components/PluginConfigForm/BasicFieldRenderers.tsx +0 -253
- package/app/src/components/PluginConfigForm/CollectionFieldRenderers.tsx +0 -261
- package/app/src/components/PluginConfigForm/CompositeFieldRenderers.tsx +0 -105
- package/app/src/components/PluginConfigForm/FieldRenderer.tsx +0 -110
- package/app/src/components/PluginConfigForm/NestedFieldRenderer.tsx +0 -95
- package/app/src/components/PluginConfigForm/index.tsx +0 -237
- package/app/src/components/PluginConfigForm/types.ts +0 -46
- package/app/src/components/ThemeToggle.tsx +0 -21
- package/app/src/hooks/useTheme.ts +0 -17
- package/app/src/layouts/dashboard.tsx +0 -259
- package/app/src/main.tsx +0 -121
- package/app/src/pages/dashboard-bots.tsx +0 -198
- package/app/src/pages/dashboard-home.tsx +0 -301
- package/app/src/pages/dashboard-logs.tsx +0 -298
- package/app/src/pages/dashboard-plugin-detail.tsx +0 -360
- package/app/src/pages/dashboard-plugins.tsx +0 -166
- package/app/src/style.css +0 -1105
- package/app/src/theme/index.ts +0 -92
- package/app/tailwind.config.js +0 -70
- package/app/tsconfig.json +0 -16
- /package/{src → client}/index.ts +0 -0
- /package/{src → client}/router/index.tsx +0 -0
- /package/{src → client}/store/index.ts +0 -0
- /package/{src → client}/store/reducers/config.ts +0 -0
- /package/{src → client}/store/reducers/index.ts +0 -0
- /package/{src → client}/store/reducers/route.ts +0 -0
- /package/{src → client}/store/reducers/script.ts +0 -0
- /package/{src → client}/store/reducers/ui.ts +0 -0
- /package/{src → client}/types.ts +0 -0
- /package/{src → client}/websocket/hooks.ts +0 -0
- /package/{src → client}/websocket/index.ts +0 -0
- /package/{src → client}/websocket/instance.ts +0 -0
- /package/{src → client}/websocket/manager.ts +0 -0
- /package/{src → client}/websocket/messageHandler.ts +0 -0
- /package/{src → client}/websocket/types.ts +0 -0
package/app/src/theme/index.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// Theme configuration
|
|
2
|
-
export const themes = {
|
|
3
|
-
light: {
|
|
4
|
-
background: '0 0% 100%',
|
|
5
|
-
foreground: '222.2 84% 4.9%',
|
|
6
|
-
card: '0 0% 100%',
|
|
7
|
-
'card-foreground': '222.2 84% 4.9%',
|
|
8
|
-
popover: '0 0% 100%',
|
|
9
|
-
'popover-foreground': '222.2 84% 4.9%',
|
|
10
|
-
primary: '221.2 83.2% 53.3%',
|
|
11
|
-
'primary-foreground': '210 40% 98%',
|
|
12
|
-
secondary: '210 40% 96.1%',
|
|
13
|
-
'secondary-foreground': '222.2 47.4% 11.2%',
|
|
14
|
-
muted: '210 40% 96.1%',
|
|
15
|
-
'muted-foreground': '215.4 16.3% 46.9%',
|
|
16
|
-
accent: '210 40% 96.1%',
|
|
17
|
-
'accent-foreground': '222.2 47.4% 11.2%',
|
|
18
|
-
destructive: '0 84.2% 60.2%',
|
|
19
|
-
'destructive-foreground': '210 40% 98%',
|
|
20
|
-
border: '214.3 31.8% 91.4%',
|
|
21
|
-
input: '214.3 31.8% 91.4%',
|
|
22
|
-
ring: '221.2 83.2% 53.3%',
|
|
23
|
-
radius: '0.5rem',
|
|
24
|
-
},
|
|
25
|
-
dark: {
|
|
26
|
-
background: '222.2 84% 4.9%',
|
|
27
|
-
foreground: '210 40% 98%',
|
|
28
|
-
card: '222.2 84% 4.9%',
|
|
29
|
-
'card-foreground': '210 40% 98%',
|
|
30
|
-
popover: '222.2 84% 4.9%',
|
|
31
|
-
'popover-foreground': '210 40% 98%',
|
|
32
|
-
primary: '217.2 91.2% 59.8%',
|
|
33
|
-
'primary-foreground': '222.2 47.4% 11.2%',
|
|
34
|
-
secondary: '217.2 32.6% 17.5%',
|
|
35
|
-
'secondary-foreground': '210 40% 98%',
|
|
36
|
-
muted: '217.2 32.6% 17.5%',
|
|
37
|
-
'muted-foreground': '215 20.2% 65.1%',
|
|
38
|
-
accent: '217.2 32.6% 17.5%',
|
|
39
|
-
'accent-foreground': '210 40% 98%',
|
|
40
|
-
destructive: '0 62.8% 30.6%',
|
|
41
|
-
'destructive-foreground': '210 40% 98%',
|
|
42
|
-
border: '217.2 32.6% 17.5%',
|
|
43
|
-
input: '217.2 32.6% 17.5%',
|
|
44
|
-
ring: '224.3 76.3% 48%',
|
|
45
|
-
radius: '0.5rem',
|
|
46
|
-
},
|
|
47
|
-
} as const
|
|
48
|
-
|
|
49
|
-
export type Theme = keyof typeof themes
|
|
50
|
-
export type ThemeColors = typeof themes.light
|
|
51
|
-
|
|
52
|
-
// Apply theme to document
|
|
53
|
-
export function applyTheme(theme: Theme) {
|
|
54
|
-
const root = document.documentElement
|
|
55
|
-
const colors = themes[theme]
|
|
56
|
-
|
|
57
|
-
// Remove old theme class
|
|
58
|
-
root.classList.remove('light', 'dark')
|
|
59
|
-
// Add new theme class
|
|
60
|
-
root.classList.add(theme)
|
|
61
|
-
|
|
62
|
-
// Apply CSS variables
|
|
63
|
-
Object.entries(colors).forEach(([key, value]) => {
|
|
64
|
-
root.style.setProperty(`--${key}`, value)
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
// Save to localStorage
|
|
68
|
-
localStorage.setItem('theme', theme)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Get current theme from localStorage or system preference
|
|
72
|
-
export function getInitialTheme(): Theme {
|
|
73
|
-
const stored = localStorage.getItem('theme') as Theme | null
|
|
74
|
-
if (stored && (stored === 'light' || stored === 'dark')) {
|
|
75
|
-
return stored
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Check system preference
|
|
79
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
80
|
-
return 'dark'
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return 'light'
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Initialize theme on app load
|
|
87
|
-
export function initializeTheme() {
|
|
88
|
-
const theme = getInitialTheme()
|
|
89
|
-
applyTheme(theme)
|
|
90
|
-
return theme
|
|
91
|
-
}
|
|
92
|
-
|
package/app/tailwind.config.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
const cwd = process.cwd();
|
|
3
|
-
export default {
|
|
4
|
-
content: [
|
|
5
|
-
"./index.html",
|
|
6
|
-
'./src/**/*.{js,ts,jsx,tsx,mdx}',
|
|
7
|
-
`${cwd}/**/radix-ui/**/*.{js,ts,jsx,tsx}`,
|
|
8
|
-
`${cwd}/**/@radix-ui/themes/**/*.{js,ts,jsx,tsx}`,
|
|
9
|
-
],
|
|
10
|
-
theme: {
|
|
11
|
-
extend: {
|
|
12
|
-
colors: {
|
|
13
|
-
border: 'hsl(var(--border))',
|
|
14
|
-
input: 'hsl(var(--input))',
|
|
15
|
-
ring: 'hsl(var(--ring))',
|
|
16
|
-
background: 'hsl(var(--background))',
|
|
17
|
-
foreground: 'hsl(var(--foreground))',
|
|
18
|
-
primary: {
|
|
19
|
-
DEFAULT: 'hsl(var(--primary))',
|
|
20
|
-
foreground: 'hsl(var(--primary-foreground))',
|
|
21
|
-
},
|
|
22
|
-
secondary: {
|
|
23
|
-
DEFAULT: 'hsl(var(--secondary))',
|
|
24
|
-
foreground: 'hsl(var(--secondary-foreground))',
|
|
25
|
-
},
|
|
26
|
-
destructive: {
|
|
27
|
-
DEFAULT: 'hsl(var(--destructive))',
|
|
28
|
-
foreground: 'hsl(var(--destructive-foreground))',
|
|
29
|
-
},
|
|
30
|
-
muted: {
|
|
31
|
-
DEFAULT: 'hsl(var(--muted))',
|
|
32
|
-
foreground: 'hsl(var(--muted-foreground))',
|
|
33
|
-
},
|
|
34
|
-
accent: {
|
|
35
|
-
DEFAULT: 'hsl(var(--accent))',
|
|
36
|
-
foreground: 'hsl(var(--accent-foreground))',
|
|
37
|
-
},
|
|
38
|
-
popover: {
|
|
39
|
-
DEFAULT: 'hsl(var(--popover))',
|
|
40
|
-
foreground: 'hsl(var(--popover-foreground))',
|
|
41
|
-
},
|
|
42
|
-
card: {
|
|
43
|
-
DEFAULT: 'hsl(var(--card))',
|
|
44
|
-
foreground: 'hsl(var(--card-foreground))',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
borderRadius: {
|
|
48
|
-
lg: 'var(--radius)',
|
|
49
|
-
md: 'calc(var(--radius) - 2px)',
|
|
50
|
-
sm: 'calc(var(--radius) - 4px)',
|
|
51
|
-
},
|
|
52
|
-
keyframes: {
|
|
53
|
-
"accordion-down": {
|
|
54
|
-
from: { height: "0" },
|
|
55
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
56
|
-
},
|
|
57
|
-
"accordion-up": {
|
|
58
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
59
|
-
to: { height: "0" },
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
animation: {
|
|
63
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
64
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
darkMode: "class",
|
|
69
|
-
plugins: [],
|
|
70
|
-
}
|
package/app/tsconfig.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"jsx": "react-jsx",
|
|
9
|
-
"paths": {
|
|
10
|
-
"@/*": ["src/*"],
|
|
11
|
-
"@zhin.js/client": [
|
|
12
|
-
"../src"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
/package/{src → client}/index.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{src → client}/types.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|