local-operator-ui 0.1.0 → 0.1.2-beta.2
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/LICENSE +619 -21
- package/README.md +69 -5
- package/out/main/index.jsc +0 -0
- package/out/preload/index.jsc +0 -0
- package/out/renderer/assets/clear-icon-with-text-uwwUBaIu.png +0 -0
- package/out/renderer/assets/{index-BCnP7htg.js → index-BZbB6xQT.js} +22691 -48339
- package/out/renderer/assets/{index-c_zC2NkJ.css → index-BkBEAEYS.css} +0 -15
- package/out/renderer/assets/installer-BqeUmucy.js +786 -0
- package/out/renderer/assets/theme-B9KBGB-g.css +15 -0
- package/out/renderer/assets/theme-CpOz1dKx.js +28155 -0
- package/out/renderer/index.html +6 -3
- package/out/renderer/installer.html +20 -0
- package/package.json +129 -9
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
import { h as generateUtilityClass, i as generateUtilityClasses, a as reactExports, k as useDefaultProps, F as useRtl, j as jsxRuntimeExports, s as styled, b as clsx, e as capitalize, f as composeClasses, m as memoTheme, x as createSimplePaletteValueFilter, z as lighten, y as darken, bf as css, aT as keyframes, Y as Box, J as Typography, q as useTheme, a1 as Button, bc as ThemeProvider, bd as theme, ba as CssBaseline, bb as ReactDOM, R as React, be as ErrorBoundary } from "./theme-CpOz1dKx.js";
|
|
2
|
+
function getLinearProgressUtilityClass(slot) {
|
|
3
|
+
return generateUtilityClass("MuiLinearProgress", slot);
|
|
4
|
+
}
|
|
5
|
+
generateUtilityClasses("MuiLinearProgress", ["root", "colorPrimary", "colorSecondary", "determinate", "indeterminate", "buffer", "query", "dashed", "dashedColorPrimary", "dashedColorSecondary", "bar", "bar1", "bar2", "barColorPrimary", "barColorSecondary", "bar1Indeterminate", "bar1Determinate", "bar1Buffer", "bar2Indeterminate", "bar2Buffer"]);
|
|
6
|
+
const TRANSITION_DURATION = 4;
|
|
7
|
+
const indeterminate1Keyframe = keyframes`
|
|
8
|
+
0% {
|
|
9
|
+
left: -35%;
|
|
10
|
+
right: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
60% {
|
|
14
|
+
left: 100%;
|
|
15
|
+
right: -90%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
100% {
|
|
19
|
+
left: 100%;
|
|
20
|
+
right: -90%;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const indeterminate1Animation = typeof indeterminate1Keyframe !== "string" ? css`
|
|
24
|
+
animation: ${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
25
|
+
` : null;
|
|
26
|
+
const indeterminate2Keyframe = keyframes`
|
|
27
|
+
0% {
|
|
28
|
+
left: -200%;
|
|
29
|
+
right: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
60% {
|
|
33
|
+
left: 107%;
|
|
34
|
+
right: -8%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
100% {
|
|
38
|
+
left: 107%;
|
|
39
|
+
right: -8%;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
const indeterminate2Animation = typeof indeterminate2Keyframe !== "string" ? css`
|
|
43
|
+
animation: ${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
44
|
+
` : null;
|
|
45
|
+
const bufferKeyframe = keyframes`
|
|
46
|
+
0% {
|
|
47
|
+
opacity: 1;
|
|
48
|
+
background-position: 0 -23px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
60% {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
background-position: 0 -23px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
100% {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
background-position: -200px -23px;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
const bufferAnimation = typeof bufferKeyframe !== "string" ? css`
|
|
62
|
+
animation: ${bufferKeyframe} 3s infinite linear;
|
|
63
|
+
` : null;
|
|
64
|
+
const useUtilityClasses = (ownerState) => {
|
|
65
|
+
const {
|
|
66
|
+
classes,
|
|
67
|
+
variant,
|
|
68
|
+
color
|
|
69
|
+
} = ownerState;
|
|
70
|
+
const slots = {
|
|
71
|
+
root: ["root", `color${capitalize(color)}`, variant],
|
|
72
|
+
dashed: ["dashed", `dashedColor${capitalize(color)}`],
|
|
73
|
+
bar1: ["bar", "bar1", `barColor${capitalize(color)}`, (variant === "indeterminate" || variant === "query") && "bar1Indeterminate", variant === "determinate" && "bar1Determinate", variant === "buffer" && "bar1Buffer"],
|
|
74
|
+
bar2: ["bar", "bar2", variant !== "buffer" && `barColor${capitalize(color)}`, variant === "buffer" && `color${capitalize(color)}`, (variant === "indeterminate" || variant === "query") && "bar2Indeterminate", variant === "buffer" && "bar2Buffer"]
|
|
75
|
+
};
|
|
76
|
+
return composeClasses(slots, getLinearProgressUtilityClass, classes);
|
|
77
|
+
};
|
|
78
|
+
const getColorShade = (theme2, color) => {
|
|
79
|
+
if (theme2.vars) {
|
|
80
|
+
return theme2.vars.palette.LinearProgress[`${color}Bg`];
|
|
81
|
+
}
|
|
82
|
+
return theme2.palette.mode === "light" ? lighten(theme2.palette[color].main, 0.62) : darken(theme2.palette[color].main, 0.5);
|
|
83
|
+
};
|
|
84
|
+
const LinearProgressRoot = styled("span", {
|
|
85
|
+
name: "MuiLinearProgress",
|
|
86
|
+
slot: "Root",
|
|
87
|
+
overridesResolver: (props, styles) => {
|
|
88
|
+
const {
|
|
89
|
+
ownerState
|
|
90
|
+
} = props;
|
|
91
|
+
return [styles.root, styles[`color${capitalize(ownerState.color)}`], styles[ownerState.variant]];
|
|
92
|
+
}
|
|
93
|
+
})(memoTheme(({
|
|
94
|
+
theme: theme2
|
|
95
|
+
}) => ({
|
|
96
|
+
position: "relative",
|
|
97
|
+
overflow: "hidden",
|
|
98
|
+
display: "block",
|
|
99
|
+
height: 4,
|
|
100
|
+
// Fix Safari's bug during composition of different paint.
|
|
101
|
+
zIndex: 0,
|
|
102
|
+
"@media print": {
|
|
103
|
+
colorAdjust: "exact"
|
|
104
|
+
},
|
|
105
|
+
variants: [...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
106
|
+
props: {
|
|
107
|
+
color
|
|
108
|
+
},
|
|
109
|
+
style: {
|
|
110
|
+
backgroundColor: getColorShade(theme2, color)
|
|
111
|
+
}
|
|
112
|
+
})), {
|
|
113
|
+
props: ({
|
|
114
|
+
ownerState
|
|
115
|
+
}) => ownerState.color === "inherit" && ownerState.variant !== "buffer",
|
|
116
|
+
style: {
|
|
117
|
+
"&::before": {
|
|
118
|
+
content: '""',
|
|
119
|
+
position: "absolute",
|
|
120
|
+
left: 0,
|
|
121
|
+
top: 0,
|
|
122
|
+
right: 0,
|
|
123
|
+
bottom: 0,
|
|
124
|
+
backgroundColor: "currentColor",
|
|
125
|
+
opacity: 0.3
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
props: {
|
|
130
|
+
variant: "buffer"
|
|
131
|
+
},
|
|
132
|
+
style: {
|
|
133
|
+
backgroundColor: "transparent"
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
props: {
|
|
137
|
+
variant: "query"
|
|
138
|
+
},
|
|
139
|
+
style: {
|
|
140
|
+
transform: "rotate(180deg)"
|
|
141
|
+
}
|
|
142
|
+
}]
|
|
143
|
+
})));
|
|
144
|
+
const LinearProgressDashed = styled("span", {
|
|
145
|
+
name: "MuiLinearProgress",
|
|
146
|
+
slot: "Dashed",
|
|
147
|
+
overridesResolver: (props, styles) => {
|
|
148
|
+
const {
|
|
149
|
+
ownerState
|
|
150
|
+
} = props;
|
|
151
|
+
return [styles.dashed, styles[`dashedColor${capitalize(ownerState.color)}`]];
|
|
152
|
+
}
|
|
153
|
+
})(memoTheme(({
|
|
154
|
+
theme: theme2
|
|
155
|
+
}) => ({
|
|
156
|
+
position: "absolute",
|
|
157
|
+
marginTop: 0,
|
|
158
|
+
height: "100%",
|
|
159
|
+
width: "100%",
|
|
160
|
+
backgroundSize: "10px 10px",
|
|
161
|
+
backgroundPosition: "0 -23px",
|
|
162
|
+
variants: [{
|
|
163
|
+
props: {
|
|
164
|
+
color: "inherit"
|
|
165
|
+
},
|
|
166
|
+
style: {
|
|
167
|
+
opacity: 0.3,
|
|
168
|
+
backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`
|
|
169
|
+
}
|
|
170
|
+
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {
|
|
171
|
+
const backgroundColor = getColorShade(theme2, color);
|
|
172
|
+
return {
|
|
173
|
+
props: {
|
|
174
|
+
color
|
|
175
|
+
},
|
|
176
|
+
style: {
|
|
177
|
+
backgroundImage: `radial-gradient(${backgroundColor} 0%, ${backgroundColor} 16%, transparent 42%)`
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
})]
|
|
181
|
+
})), bufferAnimation || {
|
|
182
|
+
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
183
|
+
animation: `${bufferKeyframe} 3s infinite linear`
|
|
184
|
+
});
|
|
185
|
+
const LinearProgressBar1 = styled("span", {
|
|
186
|
+
name: "MuiLinearProgress",
|
|
187
|
+
slot: "Bar1",
|
|
188
|
+
overridesResolver: (props, styles) => {
|
|
189
|
+
const {
|
|
190
|
+
ownerState
|
|
191
|
+
} = props;
|
|
192
|
+
return [styles.bar, styles.bar1, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === "indeterminate" || ownerState.variant === "query") && styles.bar1Indeterminate, ownerState.variant === "determinate" && styles.bar1Determinate, ownerState.variant === "buffer" && styles.bar1Buffer];
|
|
193
|
+
}
|
|
194
|
+
})(memoTheme(({
|
|
195
|
+
theme: theme2
|
|
196
|
+
}) => ({
|
|
197
|
+
width: "100%",
|
|
198
|
+
position: "absolute",
|
|
199
|
+
left: 0,
|
|
200
|
+
bottom: 0,
|
|
201
|
+
top: 0,
|
|
202
|
+
transition: "transform 0.2s linear",
|
|
203
|
+
transformOrigin: "left",
|
|
204
|
+
variants: [{
|
|
205
|
+
props: {
|
|
206
|
+
color: "inherit"
|
|
207
|
+
},
|
|
208
|
+
style: {
|
|
209
|
+
backgroundColor: "currentColor"
|
|
210
|
+
}
|
|
211
|
+
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
212
|
+
props: {
|
|
213
|
+
color
|
|
214
|
+
},
|
|
215
|
+
style: {
|
|
216
|
+
backgroundColor: (theme2.vars || theme2).palette[color].main
|
|
217
|
+
}
|
|
218
|
+
})), {
|
|
219
|
+
props: {
|
|
220
|
+
variant: "determinate"
|
|
221
|
+
},
|
|
222
|
+
style: {
|
|
223
|
+
transition: `transform .${TRANSITION_DURATION}s linear`
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
props: {
|
|
227
|
+
variant: "buffer"
|
|
228
|
+
},
|
|
229
|
+
style: {
|
|
230
|
+
zIndex: 1,
|
|
231
|
+
transition: `transform .${TRANSITION_DURATION}s linear`
|
|
232
|
+
}
|
|
233
|
+
}, {
|
|
234
|
+
props: ({
|
|
235
|
+
ownerState
|
|
236
|
+
}) => ownerState.variant === "indeterminate" || ownerState.variant === "query",
|
|
237
|
+
style: {
|
|
238
|
+
width: "auto"
|
|
239
|
+
}
|
|
240
|
+
}, {
|
|
241
|
+
props: ({
|
|
242
|
+
ownerState
|
|
243
|
+
}) => ownerState.variant === "indeterminate" || ownerState.variant === "query",
|
|
244
|
+
style: indeterminate1Animation || {
|
|
245
|
+
animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
|
|
246
|
+
}
|
|
247
|
+
}]
|
|
248
|
+
})));
|
|
249
|
+
const LinearProgressBar2 = styled("span", {
|
|
250
|
+
name: "MuiLinearProgress",
|
|
251
|
+
slot: "Bar2",
|
|
252
|
+
overridesResolver: (props, styles) => {
|
|
253
|
+
const {
|
|
254
|
+
ownerState
|
|
255
|
+
} = props;
|
|
256
|
+
return [styles.bar, styles.bar2, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === "indeterminate" || ownerState.variant === "query") && styles.bar2Indeterminate, ownerState.variant === "buffer" && styles.bar2Buffer];
|
|
257
|
+
}
|
|
258
|
+
})(memoTheme(({
|
|
259
|
+
theme: theme2
|
|
260
|
+
}) => ({
|
|
261
|
+
width: "100%",
|
|
262
|
+
position: "absolute",
|
|
263
|
+
left: 0,
|
|
264
|
+
bottom: 0,
|
|
265
|
+
top: 0,
|
|
266
|
+
transition: "transform 0.2s linear",
|
|
267
|
+
transformOrigin: "left",
|
|
268
|
+
variants: [...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
269
|
+
props: {
|
|
270
|
+
color
|
|
271
|
+
},
|
|
272
|
+
style: {
|
|
273
|
+
"--LinearProgressBar2-barColor": (theme2.vars || theme2).palette[color].main
|
|
274
|
+
}
|
|
275
|
+
})), {
|
|
276
|
+
props: ({
|
|
277
|
+
ownerState
|
|
278
|
+
}) => ownerState.variant !== "buffer" && ownerState.color !== "inherit",
|
|
279
|
+
style: {
|
|
280
|
+
backgroundColor: "var(--LinearProgressBar2-barColor, currentColor)"
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
props: ({
|
|
284
|
+
ownerState
|
|
285
|
+
}) => ownerState.variant !== "buffer" && ownerState.color === "inherit",
|
|
286
|
+
style: {
|
|
287
|
+
backgroundColor: "currentColor"
|
|
288
|
+
}
|
|
289
|
+
}, {
|
|
290
|
+
props: {
|
|
291
|
+
color: "inherit"
|
|
292
|
+
},
|
|
293
|
+
style: {
|
|
294
|
+
opacity: 0.3
|
|
295
|
+
}
|
|
296
|
+
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
297
|
+
props: {
|
|
298
|
+
color,
|
|
299
|
+
variant: "buffer"
|
|
300
|
+
},
|
|
301
|
+
style: {
|
|
302
|
+
backgroundColor: getColorShade(theme2, color),
|
|
303
|
+
transition: `transform .${TRANSITION_DURATION}s linear`
|
|
304
|
+
}
|
|
305
|
+
})), {
|
|
306
|
+
props: ({
|
|
307
|
+
ownerState
|
|
308
|
+
}) => ownerState.variant === "indeterminate" || ownerState.variant === "query",
|
|
309
|
+
style: {
|
|
310
|
+
width: "auto"
|
|
311
|
+
}
|
|
312
|
+
}, {
|
|
313
|
+
props: ({
|
|
314
|
+
ownerState
|
|
315
|
+
}) => ownerState.variant === "indeterminate" || ownerState.variant === "query",
|
|
316
|
+
style: indeterminate2Animation || {
|
|
317
|
+
animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
|
|
318
|
+
}
|
|
319
|
+
}]
|
|
320
|
+
})));
|
|
321
|
+
const LinearProgress = /* @__PURE__ */ reactExports.forwardRef(function LinearProgress2(inProps, ref) {
|
|
322
|
+
const props = useDefaultProps({
|
|
323
|
+
props: inProps,
|
|
324
|
+
name: "MuiLinearProgress"
|
|
325
|
+
});
|
|
326
|
+
const {
|
|
327
|
+
className,
|
|
328
|
+
color = "primary",
|
|
329
|
+
value,
|
|
330
|
+
valueBuffer,
|
|
331
|
+
variant = "indeterminate",
|
|
332
|
+
...other
|
|
333
|
+
} = props;
|
|
334
|
+
const ownerState = {
|
|
335
|
+
...props,
|
|
336
|
+
color,
|
|
337
|
+
variant
|
|
338
|
+
};
|
|
339
|
+
const classes = useUtilityClasses(ownerState);
|
|
340
|
+
const isRtl = useRtl();
|
|
341
|
+
const rootProps = {};
|
|
342
|
+
const inlineStyles = {
|
|
343
|
+
bar1: {},
|
|
344
|
+
bar2: {}
|
|
345
|
+
};
|
|
346
|
+
if (variant === "determinate" || variant === "buffer") {
|
|
347
|
+
if (value !== void 0) {
|
|
348
|
+
rootProps["aria-valuenow"] = Math.round(value);
|
|
349
|
+
rootProps["aria-valuemin"] = 0;
|
|
350
|
+
rootProps["aria-valuemax"] = 100;
|
|
351
|
+
let transform = value - 100;
|
|
352
|
+
if (isRtl) {
|
|
353
|
+
transform = -transform;
|
|
354
|
+
}
|
|
355
|
+
inlineStyles.bar1.transform = `translateX(${transform}%)`;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if (variant === "buffer") {
|
|
359
|
+
if (valueBuffer !== void 0) {
|
|
360
|
+
let transform = (valueBuffer || 0) - 100;
|
|
361
|
+
if (isRtl) {
|
|
362
|
+
transform = -transform;
|
|
363
|
+
}
|
|
364
|
+
inlineStyles.bar2.transform = `translateX(${transform}%)`;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(LinearProgressRoot, {
|
|
368
|
+
className: clsx(classes.root, className),
|
|
369
|
+
ownerState,
|
|
370
|
+
role: "progressbar",
|
|
371
|
+
...rootProps,
|
|
372
|
+
ref,
|
|
373
|
+
...other,
|
|
374
|
+
children: [variant === "buffer" ? /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressDashed, {
|
|
375
|
+
className: classes.dashed,
|
|
376
|
+
ownerState
|
|
377
|
+
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressBar1, {
|
|
378
|
+
className: classes.bar1,
|
|
379
|
+
ownerState,
|
|
380
|
+
style: inlineStyles.bar1
|
|
381
|
+
}), variant === "determinate" ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressBar2, {
|
|
382
|
+
className: classes.bar2,
|
|
383
|
+
ownerState,
|
|
384
|
+
style: inlineStyles.bar2
|
|
385
|
+
})]
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
const AppContainer = styled(Box)(() => ({
|
|
389
|
+
display: "flex",
|
|
390
|
+
height: "100vh",
|
|
391
|
+
width: "100vw",
|
|
392
|
+
overflow: "hidden",
|
|
393
|
+
backgroundColor: "#0A0A0A"
|
|
394
|
+
}));
|
|
395
|
+
const InstallerLayout = styled(Box)(() => ({
|
|
396
|
+
display: "flex",
|
|
397
|
+
width: "100%",
|
|
398
|
+
height: "100%",
|
|
399
|
+
"@media (max-width: 900px)": {
|
|
400
|
+
flexDirection: "column"
|
|
401
|
+
}
|
|
402
|
+
}));
|
|
403
|
+
const FeatureSection = styled(Box)(({ theme: theme2 }) => ({
|
|
404
|
+
flex: "1 1 50%",
|
|
405
|
+
display: "flex",
|
|
406
|
+
flexDirection: "column",
|
|
407
|
+
justifyContent: "center",
|
|
408
|
+
alignItems: "center",
|
|
409
|
+
padding: "48px",
|
|
410
|
+
background: `linear-gradient(135deg, ${theme2.palette.background.default} 0%, #111111 100%)`,
|
|
411
|
+
position: "relative",
|
|
412
|
+
overflow: "hidden",
|
|
413
|
+
"&::after": {
|
|
414
|
+
content: '""',
|
|
415
|
+
position: "absolute",
|
|
416
|
+
top: 0,
|
|
417
|
+
right: 0,
|
|
418
|
+
bottom: 0,
|
|
419
|
+
width: "1px",
|
|
420
|
+
background: "rgba(255, 255, 255, 0.1)"
|
|
421
|
+
},
|
|
422
|
+
"@media (max-width: 900px)": {
|
|
423
|
+
flex: "1 1 auto",
|
|
424
|
+
padding: "32px 24px",
|
|
425
|
+
"&::after": {
|
|
426
|
+
width: "100%",
|
|
427
|
+
height: "1px",
|
|
428
|
+
bottom: 0,
|
|
429
|
+
right: "auto"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}));
|
|
433
|
+
const ProgressSection = styled(Box)(() => ({
|
|
434
|
+
flex: "1 1 50%",
|
|
435
|
+
display: "flex",
|
|
436
|
+
flexDirection: "column",
|
|
437
|
+
justifyContent: "center",
|
|
438
|
+
alignItems: "center",
|
|
439
|
+
padding: "48px",
|
|
440
|
+
"@media (max-width: 900px)": {
|
|
441
|
+
flex: "1 1 auto",
|
|
442
|
+
padding: "32px 24px"
|
|
443
|
+
}
|
|
444
|
+
}));
|
|
445
|
+
const SpinnerContainer = styled(Box)(() => ({
|
|
446
|
+
display: "flex",
|
|
447
|
+
justifyContent: "center",
|
|
448
|
+
margin: "16px 0"
|
|
449
|
+
}));
|
|
450
|
+
const Spinner = styled(Box)(({ theme: theme2 }) => ({
|
|
451
|
+
width: "48px",
|
|
452
|
+
height: "48px",
|
|
453
|
+
border: `3px solid ${theme2.palette.primary.main}20`,
|
|
454
|
+
borderRadius: "50%",
|
|
455
|
+
borderTopColor: theme2.palette.primary.main,
|
|
456
|
+
animation: "spin 1s ease-in-out infinite",
|
|
457
|
+
"@keyframes spin": {
|
|
458
|
+
to: { transform: "rotate(360deg)" }
|
|
459
|
+
}
|
|
460
|
+
}));
|
|
461
|
+
const LogoContainer = styled(Box)(() => ({
|
|
462
|
+
marginBottom: "24px",
|
|
463
|
+
display: "flex",
|
|
464
|
+
justifyContent: "center",
|
|
465
|
+
alignItems: "center",
|
|
466
|
+
height: "120px"
|
|
467
|
+
}));
|
|
468
|
+
const FeatureIconContainer = styled(Box)(({ theme: theme2 }) => ({
|
|
469
|
+
width: "80px",
|
|
470
|
+
height: "80px",
|
|
471
|
+
borderRadius: "50%",
|
|
472
|
+
display: "flex",
|
|
473
|
+
justifyContent: "center",
|
|
474
|
+
alignItems: "center",
|
|
475
|
+
marginBottom: "24px",
|
|
476
|
+
background: `linear-gradient(135deg, ${theme2.palette.primary.dark} 0%, ${theme2.palette.primary.main} 100%)`,
|
|
477
|
+
boxShadow: "0 8px 32px rgba(56, 201, 106, 0.2)",
|
|
478
|
+
fontSize: "2.5rem"
|
|
479
|
+
}));
|
|
480
|
+
const fadeIn = keyframes`
|
|
481
|
+
from {
|
|
482
|
+
opacity: 0;
|
|
483
|
+
transform: translateY(10px);
|
|
484
|
+
}
|
|
485
|
+
to {
|
|
486
|
+
opacity: 1;
|
|
487
|
+
transform: translateY(0);
|
|
488
|
+
}
|
|
489
|
+
`;
|
|
490
|
+
const fadeOut = keyframes`
|
|
491
|
+
from {
|
|
492
|
+
opacity: 1;
|
|
493
|
+
transform: translateY(0);
|
|
494
|
+
}
|
|
495
|
+
to {
|
|
496
|
+
opacity: 0;
|
|
497
|
+
transform: translateY(-10px);
|
|
498
|
+
}
|
|
499
|
+
`;
|
|
500
|
+
const FeatureContent = styled(Box)(
|
|
501
|
+
({ isActive }) => ({
|
|
502
|
+
display: "flex",
|
|
503
|
+
flexDirection: "column",
|
|
504
|
+
alignItems: "center",
|
|
505
|
+
textAlign: "center",
|
|
506
|
+
maxWidth: "480px",
|
|
507
|
+
animation: isActive ? `${fadeIn} 0.5s ease-out forwards` : `${fadeOut} 0.5s ease-out forwards`,
|
|
508
|
+
position: "absolute"
|
|
509
|
+
})
|
|
510
|
+
);
|
|
511
|
+
const FeatureTitle = styled(Typography)(({ theme: theme2 }) => ({
|
|
512
|
+
fontSize: "1.75rem",
|
|
513
|
+
fontWeight: 600,
|
|
514
|
+
marginBottom: "16px",
|
|
515
|
+
background: `linear-gradient(90deg, ${theme2.palette.primary.main}, ${theme2.palette.secondary.main})`,
|
|
516
|
+
WebkitBackgroundClip: "text",
|
|
517
|
+
WebkitTextFillColor: "transparent"
|
|
518
|
+
}));
|
|
519
|
+
const FeatureDescription = styled(Typography)(() => ({
|
|
520
|
+
fontSize: "1rem",
|
|
521
|
+
lineHeight: 1.6,
|
|
522
|
+
color: "rgba(255, 255, 255, 0.8)"
|
|
523
|
+
}));
|
|
524
|
+
const ProgressDots = styled(Box)(() => ({
|
|
525
|
+
display: "flex",
|
|
526
|
+
justifyContent: "center",
|
|
527
|
+
gap: "8px",
|
|
528
|
+
marginTop: "0",
|
|
529
|
+
position: "relative",
|
|
530
|
+
bottom: "0"
|
|
531
|
+
}));
|
|
532
|
+
const ProgressDot = styled(Box)(
|
|
533
|
+
({ active, theme: theme2 }) => ({
|
|
534
|
+
width: "8px",
|
|
535
|
+
height: "8px",
|
|
536
|
+
borderRadius: "50%",
|
|
537
|
+
background: active ? theme2.palette.primary.main : "rgba(255, 255, 255, 0.2)",
|
|
538
|
+
transition: "background 0.3s ease"
|
|
539
|
+
})
|
|
540
|
+
);
|
|
541
|
+
const BackgroundPattern = styled(Box)(() => ({
|
|
542
|
+
position: "absolute",
|
|
543
|
+
top: 0,
|
|
544
|
+
left: 0,
|
|
545
|
+
right: 0,
|
|
546
|
+
bottom: 0,
|
|
547
|
+
opacity: 0.05,
|
|
548
|
+
backgroundImage: "radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px)",
|
|
549
|
+
backgroundSize: "30px 30px",
|
|
550
|
+
pointerEvents: "none"
|
|
551
|
+
}));
|
|
552
|
+
const features = [
|
|
553
|
+
{
|
|
554
|
+
icon: "🎯",
|
|
555
|
+
title: "Plans & Executes",
|
|
556
|
+
description: "Breaks down complex goals into manageable steps and executes them with precision."
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
icon: "🔒",
|
|
560
|
+
title: "Prioritizes Security",
|
|
561
|
+
description: "Built-in safety checks by independent AI review and user confirmations keep your system protected."
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
icon: "🌐",
|
|
565
|
+
title: "Flexible Deployment",
|
|
566
|
+
description: "Run completely locally with Ollama models or leverage cloud providers like OpenAI."
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
icon: "🔧",
|
|
570
|
+
title: "Problem Solving",
|
|
571
|
+
description: "Intelligently handles errors and roadblocks by adapting approaches and finding alternative solutions."
|
|
572
|
+
}
|
|
573
|
+
];
|
|
574
|
+
const FeatureCarousel = () => {
|
|
575
|
+
const [activeFeature, setActiveFeature] = reactExports.useState(0);
|
|
576
|
+
reactExports.useEffect(() => {
|
|
577
|
+
const interval = setInterval(() => {
|
|
578
|
+
setActiveFeature((prev) => (prev + 1) % features.length);
|
|
579
|
+
}, 5e3);
|
|
580
|
+
return () => clearInterval(interval);
|
|
581
|
+
}, []);
|
|
582
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
583
|
+
Box,
|
|
584
|
+
{
|
|
585
|
+
sx: {
|
|
586
|
+
position: "relative",
|
|
587
|
+
height: "300px",
|
|
588
|
+
width: "100%",
|
|
589
|
+
display: "flex",
|
|
590
|
+
flexDirection: "column",
|
|
591
|
+
justifyContent: "center",
|
|
592
|
+
alignItems: "center"
|
|
593
|
+
},
|
|
594
|
+
children: [
|
|
595
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
596
|
+
Box,
|
|
597
|
+
{
|
|
598
|
+
sx: {
|
|
599
|
+
position: "relative",
|
|
600
|
+
height: "240px",
|
|
601
|
+
width: "100%",
|
|
602
|
+
display: "flex",
|
|
603
|
+
justifyContent: "center",
|
|
604
|
+
alignItems: "center",
|
|
605
|
+
mb: 4
|
|
606
|
+
},
|
|
607
|
+
children: features.map((feature, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
608
|
+
FeatureContent,
|
|
609
|
+
{
|
|
610
|
+
isActive: index === activeFeature,
|
|
611
|
+
sx: {
|
|
612
|
+
opacity: index === activeFeature ? 1 : 0,
|
|
613
|
+
pointerEvents: index === activeFeature ? "auto" : "none"
|
|
614
|
+
},
|
|
615
|
+
children: [
|
|
616
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FeatureIconContainer, { children: feature.icon }),
|
|
617
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FeatureTitle, { variant: "h4", children: feature.title }),
|
|
618
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FeatureDescription, { children: feature.description })
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
feature.title
|
|
622
|
+
))
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ProgressDots, { children: features.map((feature, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
626
|
+
ProgressDot,
|
|
627
|
+
{
|
|
628
|
+
active: index === activeFeature,
|
|
629
|
+
onClick: () => setActiveFeature(index),
|
|
630
|
+
sx: { cursor: "pointer" }
|
|
631
|
+
},
|
|
632
|
+
`dot-${feature.title}`
|
|
633
|
+
)) })
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
};
|
|
638
|
+
const InstallationProgress = () => {
|
|
639
|
+
const theme2 = useTheme();
|
|
640
|
+
const handleCancel = () => {
|
|
641
|
+
window.api.ipcRenderer.send("cancel-installation");
|
|
642
|
+
};
|
|
643
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
644
|
+
Box,
|
|
645
|
+
{
|
|
646
|
+
sx: {
|
|
647
|
+
display: "flex",
|
|
648
|
+
flexDirection: "column",
|
|
649
|
+
gap: 4,
|
|
650
|
+
width: "100%",
|
|
651
|
+
maxWidth: "520px"
|
|
652
|
+
},
|
|
653
|
+
children: [
|
|
654
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Box, { sx: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "gradientTitle", children: "🚀 Setting Up Your Environment" }) }),
|
|
655
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { width: "100%" }, children: [
|
|
656
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
657
|
+
Typography,
|
|
658
|
+
{
|
|
659
|
+
variant: "body1",
|
|
660
|
+
color: "text.secondary",
|
|
661
|
+
sx: { textAlign: "center", mb: 3 },
|
|
662
|
+
children: "We're preparing the magic behind the scenes! This one-time setup ensures you'll have the best experience with Local Operator."
|
|
663
|
+
}
|
|
664
|
+
),
|
|
665
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
666
|
+
LinearProgress,
|
|
667
|
+
{
|
|
668
|
+
sx: {
|
|
669
|
+
height: 8,
|
|
670
|
+
borderRadius: 2,
|
|
671
|
+
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
|
672
|
+
"& .MuiLinearProgress-bar": {
|
|
673
|
+
borderRadius: 2,
|
|
674
|
+
background: `linear-gradient(90deg, ${theme2.palette.primary.main}, ${theme2.palette.secondary.main})`
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
] }),
|
|
680
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SpinnerContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, {}) }),
|
|
681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
682
|
+
Typography,
|
|
683
|
+
{
|
|
684
|
+
variant: "body2",
|
|
685
|
+
sx: { textAlign: "center", color: "text.secondary", mb: 2 },
|
|
686
|
+
children: "Installing dependencies and configuring your environment..."
|
|
687
|
+
}
|
|
688
|
+
),
|
|
689
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
690
|
+
Button,
|
|
691
|
+
{
|
|
692
|
+
variant: "contained",
|
|
693
|
+
color: "error",
|
|
694
|
+
onClick: handleCancel,
|
|
695
|
+
sx: {
|
|
696
|
+
alignSelf: "center",
|
|
697
|
+
px: 4,
|
|
698
|
+
py: 1,
|
|
699
|
+
borderRadius: 2,
|
|
700
|
+
boxShadow: "0 4px 12px rgba(211, 47, 47, 0.2)"
|
|
701
|
+
},
|
|
702
|
+
children: "Cancel Setup"
|
|
703
|
+
}
|
|
704
|
+
)
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
};
|
|
709
|
+
const logo = "" + new URL("clear-icon-with-text-uwwUBaIu.png", import.meta.url).href;
|
|
710
|
+
const LogoSection = () => {
|
|
711
|
+
const theme2 = useTheme();
|
|
712
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
713
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LogoContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
714
|
+
Box,
|
|
715
|
+
{
|
|
716
|
+
component: "img",
|
|
717
|
+
src: logo,
|
|
718
|
+
alt: "Local Operator Logo",
|
|
719
|
+
sx: {
|
|
720
|
+
width: "auto",
|
|
721
|
+
height: 120,
|
|
722
|
+
objectFit: "contain",
|
|
723
|
+
display: "block"
|
|
724
|
+
},
|
|
725
|
+
onError: (e) => {
|
|
726
|
+
e.currentTarget.src = "../assets/icon.png";
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
) }),
|
|
730
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
731
|
+
Typography,
|
|
732
|
+
{
|
|
733
|
+
variant: "h3",
|
|
734
|
+
sx: {
|
|
735
|
+
textAlign: "center",
|
|
736
|
+
mb: 4,
|
|
737
|
+
fontWeight: 600,
|
|
738
|
+
background: `linear-gradient(90deg, ${theme2.palette.primary.main}, ${theme2.palette.secondary.main})`,
|
|
739
|
+
WebkitBackgroundClip: "text",
|
|
740
|
+
WebkitTextFillColor: "transparent"
|
|
741
|
+
},
|
|
742
|
+
children: "Local Operator"
|
|
743
|
+
}
|
|
744
|
+
),
|
|
745
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
746
|
+
Typography,
|
|
747
|
+
{
|
|
748
|
+
variant: "h6",
|
|
749
|
+
sx: {
|
|
750
|
+
textAlign: "center",
|
|
751
|
+
mb: 6,
|
|
752
|
+
color: "rgba(255, 255, 255, 0.7)",
|
|
753
|
+
maxWidth: "600px"
|
|
754
|
+
},
|
|
755
|
+
children: "Your Personal Assistant that Gets Things Done with Python"
|
|
756
|
+
}
|
|
757
|
+
)
|
|
758
|
+
] });
|
|
759
|
+
};
|
|
760
|
+
const InstallerContent = () => {
|
|
761
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(InstallerLayout, { children: [
|
|
762
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FeatureSection, { children: [
|
|
763
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BackgroundPattern, {}),
|
|
764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LogoSection, {}),
|
|
765
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FeatureCarousel, {})
|
|
766
|
+
] }),
|
|
767
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ProgressSection, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(InstallationProgress, {}) })
|
|
768
|
+
] });
|
|
769
|
+
};
|
|
770
|
+
const InstallerApp = () => {
|
|
771
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(ThemeProvider, { theme, children: [
|
|
772
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
|
|
773
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AppContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(InstallerContent, {}) })
|
|
774
|
+
] });
|
|
775
|
+
};
|
|
776
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
777
|
+
const root = ReactDOM.createRoot(
|
|
778
|
+
document.getElementById("app")
|
|
779
|
+
);
|
|
780
|
+
root.render(
|
|
781
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(React.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ThemeProvider, { theme, children: [
|
|
782
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
|
|
783
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(InstallerApp, {}) })
|
|
784
|
+
] }) })
|
|
785
|
+
);
|
|
786
|
+
});
|