@fluxo-dev/shell 0.0.40 → 0.0.42

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.
@@ -0,0 +1,433 @@
1
+ import { d as defineComponent, c as computed, U as openBlock, $ as createBlock, G as unref, a1 as c$1, cV as C$1, V as createElementBlock, W as createVNode, ac as withCtx, Z as createBaseVNode, a2 as createCommentVNode, ad as createTextVNode, a3 as normalizeClass, ay as $, _ as renderSlot, ap as w$1, aq as Te, ab as toDisplayString, F as Fragment, aa as renderList, cW as E, X as normalizeStyle, r as ref, bf as resolveDynamicComponent } from './index.esm2.js';
2
+ import { x, a } from './ViewLayoutContent.vue.esm.js';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import 'react-redux';
6
+ import 'react-router-dom';
7
+ import '@fluxo-dev/ui-components';
8
+ import '@fluxo-dev/shell-mfe';
9
+ import '@mantine/core';
10
+ import '@fluxo-dev/shell-ravify';
11
+ import '@fluxo-dev/state';
12
+ import '@mantine/hooks';
13
+ import '@mantine/spotlight';
14
+ import '@fluxo-dev/api-client-base';
15
+ import '@mantine/notifications';
16
+ import 'react-dom';
17
+ import '@mantine/form';
18
+ import '@mantine/dates';
19
+ import '@mantine/dropzone';
20
+ import '@fluxo-dev/shell-reporting';
21
+ import '@fluxo-dev/shell-workflow';
22
+ import '@fluxo-dev/shell-bi';
23
+ import '@fluxo-dev/shell-hub';
24
+ import '@fluxo-dev/shell-printing';
25
+ import 'node:crypto';
26
+ import 'util';
27
+
28
+ const I = /* @__PURE__ */ defineComponent({
29
+ __name: "IntegrationLogo",
30
+ props: {
31
+ integration: {}
32
+ },
33
+ setup(n) {
34
+ const a = n, r = [
35
+ "adonisjs",
36
+ "dotnet",
37
+ "elysiajs",
38
+ "express",
39
+ "fastapi",
40
+ "fastify",
41
+ "go",
42
+ "hono",
43
+ "laravel",
44
+ "litestar",
45
+ "nestjs",
46
+ "nextjs",
47
+ "nitro",
48
+ "nuxt",
49
+ "platformatic",
50
+ "react",
51
+ "rust"
52
+ ], s = computed(() => {
53
+ var e;
54
+ const o = "Openapi", t = (e = a.integration) == null ? void 0 : e.toLocaleLowerCase();
55
+ if (!t) return o;
56
+ const c = t.charAt(0).toUpperCase() + t.slice(1);
57
+ return r.includes(t) ? c : o;
58
+ });
59
+ return (o, t) => (openBlock(), createBlock(unref(c$1), {
60
+ class: "w-full h-full rounded-lg",
61
+ logo: s.value
62
+ }, null, 8, ["logo"]));
63
+ }
64
+ });
65
+
66
+ const g = { class: "flex flex-col gap-2" }, y = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, w = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, C = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, z = /* @__PURE__ */ defineComponent({
67
+ __name: "SettingsAppearance",
68
+ setup(h) {
69
+ const { colorMode: s, setColorMode: r } = C$1();
70
+ return (v, t) => (openBlock(), createElementBlock("div", g, [
71
+ createVNode(unref($), {
72
+ class: normalizeClass([
73
+ "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
74
+ unref(s) === "system" ? "bg-b-2 text-c-1" : "bg-b-1"
75
+ ]),
76
+ onClick: t[0] || (t[0] = (p) => unref(r)("system"))
77
+ }, {
78
+ default: withCtx(() => [
79
+ createBaseVNode("div", y, [
80
+ unref(s) === "system" ? (openBlock(), createBlock(unref(c$1), {
81
+ key: 0,
82
+ icon: "Checkmark",
83
+ size: "xs",
84
+ thickness: "3.5"
85
+ })) : createCommentVNode("", !0)
86
+ ]),
87
+ t[3] || (t[3] = createTextVNode(" System Preference (default) "))
88
+ ]),
89
+ _: 1
90
+ }, 8, ["class"]),
91
+ createVNode(unref($), {
92
+ class: normalizeClass([
93
+ "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
94
+ unref(s) === "light" ? "bg-b-2 text-c-1" : "bg-b-1"
95
+ ]),
96
+ onClick: t[1] || (t[1] = (p) => unref(r)("light"))
97
+ }, {
98
+ default: withCtx(() => [
99
+ createBaseVNode("div", w, [
100
+ unref(s) === "light" ? (openBlock(), createBlock(unref(c$1), {
101
+ key: 0,
102
+ icon: "Checkmark",
103
+ size: "xs",
104
+ thickness: "3.5"
105
+ })) : createCommentVNode("", !0)
106
+ ]),
107
+ t[4] || (t[4] = createTextVNode(" Light Mode Always "))
108
+ ]),
109
+ _: 1
110
+ }, 8, ["class"]),
111
+ createVNode(unref($), {
112
+ class: normalizeClass([
113
+ "w-full shadow-none text-c-1 justify-start pl-2 gap-2 mb-8 border-1/2",
114
+ unref(s) === "dark" ? "bg-b-2 text-c-1" : "bg-b-1"
115
+ ]),
116
+ onClick: t[2] || (t[2] = (p) => unref(r)("dark"))
117
+ }, {
118
+ default: withCtx(() => [
119
+ createBaseVNode("div", C, [
120
+ unref(s) === "dark" ? (openBlock(), createBlock(unref(c$1), {
121
+ key: 0,
122
+ icon: "Checkmark",
123
+ size: "xs",
124
+ thickness: "3.5"
125
+ })) : createCommentVNode("", !0)
126
+ ]),
127
+ t[5] || (t[5] = createTextVNode(" Dark Mode Always "))
128
+ ]),
129
+ _: 1
130
+ }, 8, ["class"])
131
+ ]));
132
+ }
133
+ });
134
+
135
+ const i = { class: "flex flex-col gap-2" }, r = {
136
+ key: 0,
137
+ class: "font-bold"
138
+ }, c = {
139
+ key: 1,
140
+ class: "text-c-2 mb-4 leading-[21px]"
141
+ }, m = /* @__PURE__ */ defineComponent({
142
+ __name: "SettingsSection",
143
+ setup(a) {
144
+ return (e, d) => (openBlock(), createElementBlock("div", i, [
145
+ e.$slots.title ? (openBlock(), createElementBlock("h3", r, [
146
+ renderSlot(e.$slots, "title")
147
+ ])) : createCommentVNode("", !0),
148
+ e.$slots.description ? (openBlock(), createElementBlock("p", c, [
149
+ renderSlot(e.$slots, "description")
150
+ ])) : createCommentVNode("", !0),
151
+ renderSlot(e.$slots, "default")
152
+ ]));
153
+ }
154
+ });
155
+
156
+ const N = { class: "bg-b-1 w-full h-full overflow-auto" }, R = { class: "px-5 py-5 max-w-[720px] ml-auto mr-auto w-full" }, V = { class: "flex flex-col gap-8" }, W = { class: "flex flex-col gap-2" }, F = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, O = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, P = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, D = { class: "flex flex-col gap-2" }, G = { class: "grid grid-cols-2 gap-2" }, q = { class: "flex items-center gap-2" }, H = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, M = { class: "flex items-center gap-1" }, X = { class: "grid grid-cols-2 gap-2" }, Y = { class: "flex items-center gap-2" }, J = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, K = { class: "flex items-center gap-1" }, Q = { class: "rounded-xl size-7" }, b = "https://proxy.scalar.com", ne = /* @__PURE__ */ defineComponent({
157
+ __name: "SettingsGeneral",
158
+ setup(Z) {
159
+ const { activeWorkspace: o } = w$1(), { proxyUrl: u, workspaceMutators: x } = Te(), S = [
160
+ "default",
161
+ "alternate",
162
+ // 'moon',
163
+ "purple",
164
+ "solarized",
165
+ // 'bluePlanet',
166
+ "saturn",
167
+ "kepler"
168
+ // 'mars',
169
+ // 'deepSpace',
170
+ ], z$1 = ["elysiajs", "fastify"], y = (k) => ({
171
+ default: { light: "#fff", dark: "#0f0f0f", accent: "#0099ff" },
172
+ alternate: { light: "#f9f9f9", dark: "#131313", accent: "#e7e7e7" },
173
+ moon: { light: "#ccc9b3", dark: "#313332", accent: "#645b0f" },
174
+ purple: { light: "#f5f6f8", dark: "#22252b", accent: "#5469d4" },
175
+ solarized: { light: "#fdf6e3", dark: "#00212b", accent: "#007acc" },
176
+ bluePlanet: { light: "#f0f2f5", dark: "#000e23", accent: "#e0e2e6" },
177
+ saturn: { light: "#e4e4df", dark: "#2c2c30", accent: "#1763a6" },
178
+ kepler: { light: "#f6f6f6", dark: "#0d0f1e", accent: "#7070ff" },
179
+ mars: { light: "#f2efe8", dark: "#321116", accent: "#c75549" },
180
+ deepSpace: { light: "#f4f4f5", dark: "#09090b", accent: "#8ab4f8" },
181
+ none: { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }
182
+ })[k] || { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }, _ = (k) => {
183
+ x.edit(o.value.uid, "themeId", k);
184
+ };
185
+ return (k, t) => (openBlock(), createElementBlock("div", N, [
186
+ createBaseVNode("div", R, [
187
+ createBaseVNode("div", V, [
188
+ t[13] || (t[13] = createBaseVNode("div", null, [
189
+ createBaseVNode("h2", { class: "font-bold text-xl mt-10" }, "Settings")
190
+ ], -1)),
191
+ createVNode(m, null, {
192
+ title: withCtx(() => t[3] || (t[3] = [
193
+ createTextVNode("CORS Proxy")
194
+ ])),
195
+ description: withCtx(() => t[4] || (t[4] = [
196
+ createTextVNode(" Browsers block cross-origin requests for security. We provide a public proxy to "),
197
+ createBaseVNode("a", {
198
+ class: "hover:text-c-1 underline-offset-2",
199
+ href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
200
+ target: "_blank"
201
+ }, " bypass CORS issues ", -1),
202
+ createTextVNode(" . Check the "),
203
+ createBaseVNode("a", {
204
+ class: "hover:text-c-1 underline-offset-2",
205
+ href: "https://github.com/scalar/scalar/tree/main/examples/proxy-server",
206
+ target: "_blank"
207
+ }, " source code on GitHub ", -1),
208
+ createTextVNode(" . ")
209
+ ])),
210
+ default: withCtx(() => [
211
+ createBaseVNode("div", W, [
212
+ createVNode(unref($), {
213
+ class: normalizeClass(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", {
214
+ "bg-b-2 text-c-1": unref(o).proxyUrl === b
215
+ }]),
216
+ variant: unref(o).proxyUrl === b ? "primary" : "secondary",
217
+ onClick: t[0] || (t[0] = (s) => unref(x).edit(
218
+ unref(o).uid,
219
+ "proxyUrl",
220
+ b
221
+ ))
222
+ }, {
223
+ default: withCtx(() => [
224
+ createBaseVNode("div", F, [
225
+ unref(o).proxyUrl === b ? (openBlock(), createBlock(unref(c$1), {
226
+ key: 0,
227
+ icon: "Checkmark",
228
+ size: "xs",
229
+ thickness: "3.5"
230
+ })) : createCommentVNode("", !0)
231
+ ]),
232
+ t[5] || (t[5] = createTextVNode(" Use proxy.scalar.com (default) "))
233
+ ]),
234
+ _: 1
235
+ }, 8, ["class", "variant"]),
236
+ unref(u) && unref(u) !== b ? (openBlock(), createBlock(unref($), {
237
+ key: 0,
238
+ class: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2",
239
+ variant: "primary",
240
+ onClick: t[1] || (t[1] = (s) => unref(x).edit(
241
+ unref(o).uid,
242
+ "proxyUrl",
243
+ unref(u)
244
+ ))
245
+ }, {
246
+ default: withCtx(() => [
247
+ createBaseVNode("div", O, [
248
+ unref(o).proxyUrl === unref(u) ? (openBlock(), createBlock(unref(c$1), {
249
+ key: 0,
250
+ icon: "Checkmark",
251
+ size: "xs",
252
+ thickness: "3.5"
253
+ })) : createCommentVNode("", !0)
254
+ ]),
255
+ createTextVNode(" Use custom proxy (" + toDisplayString(unref(u)) + ") ", 1)
256
+ ]),
257
+ _: 1
258
+ })) : createCommentVNode("", !0),
259
+ createVNode(unref($), {
260
+ class: normalizeClass(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", { "bg-b-2 text-c-1": !unref(o).proxyUrl }]),
261
+ variant: unref(o).proxyUrl ? "secondary" : "primary",
262
+ onClick: t[2] || (t[2] = (s) => unref(x).edit(unref(o).uid, "proxyUrl", ""))
263
+ }, {
264
+ default: withCtx(() => [
265
+ createBaseVNode("div", P, [
266
+ unref(o).proxyUrl ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(c$1), {
267
+ key: 0,
268
+ icon: "Checkmark",
269
+ size: "xs",
270
+ thickness: "3.5"
271
+ }))
272
+ ]),
273
+ t[6] || (t[6] = createTextVNode(" Skip the proxy "))
274
+ ]),
275
+ _: 1
276
+ }, 8, ["class", "variant"])
277
+ ])
278
+ ]),
279
+ _: 1
280
+ }),
281
+ createVNode(m, null, {
282
+ title: withCtx(() => t[7] || (t[7] = [
283
+ createTextVNode("Themes")
284
+ ])),
285
+ description: withCtx(() => t[8] || (t[8] = [
286
+ createTextVNode(" We’ve got a whole rainbow of themes for you to play with: ")
287
+ ])),
288
+ default: withCtx(() => [
289
+ createBaseVNode("div", D, [
290
+ createBaseVNode("div", G, [
291
+ (openBlock(), createElementBlock(Fragment, null, renderList(S, (s) => createVNode(unref($), {
292
+ key: s,
293
+ class: normalizeClass(["px-2 flex items-center justify-between gap-2 text-c-1 border-1/2", [
294
+ unref(o).themeId === s ? "bg-b-2" : "bg-b-1"
295
+ ]]),
296
+ variant: "ghost",
297
+ onClick: ($) => _(s)
298
+ }, {
299
+ default: withCtx(() => [
300
+ createBaseVNode("div", q, [
301
+ createBaseVNode("div", {
302
+ class: normalizeClass(["flex items-center justify-center w-5 h-5 rounded-full border-2 border-c-3", {
303
+ "bg-primary": unref(o).themeId === s
304
+ }])
305
+ }, [
306
+ createBaseVNode("div", H, [
307
+ unref(o).themeId === s ? (openBlock(), createBlock(unref(c$1), {
308
+ key: 0,
309
+ icon: "Checkmark",
310
+ size: "xs",
311
+ thickness: "3.5"
312
+ })) : createCommentVNode("", !0)
313
+ ])
314
+ ], 2),
315
+ createTextVNode(" " + toDisplayString(unref(E)[s]), 1)
316
+ ]),
317
+ createBaseVNode("div", M, [
318
+ createBaseVNode("span", {
319
+ class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
320
+ style: normalizeStyle({
321
+ backgroundColor: y(s).light
322
+ })
323
+ }, null, 4),
324
+ createBaseVNode("span", {
325
+ class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
326
+ style: normalizeStyle({
327
+ backgroundColor: y(s).dark
328
+ })
329
+ }, null, 4),
330
+ createBaseVNode("span", {
331
+ class: "inline-block w-5 h-5 rounded-full border-c-3",
332
+ style: normalizeStyle({
333
+ backgroundColor: y(s).accent
334
+ })
335
+ }, null, 4)
336
+ ])
337
+ ]),
338
+ _: 2
339
+ }, 1032, ["class", "onClick"])), 64))
340
+ ])
341
+ ])
342
+ ]),
343
+ _: 1
344
+ }),
345
+ createVNode(m, null, {
346
+ title: withCtx(() => t[9] || (t[9] = [
347
+ createTextVNode("Framework Themes")
348
+ ])),
349
+ description: withCtx(() => t[10] || (t[10] = [
350
+ createTextVNode(" Are you a real fan? Show your support by using your favorite framework’s theme! ")
351
+ ])),
352
+ default: withCtx(() => [
353
+ createBaseVNode("div", X, [
354
+ (openBlock(), createElementBlock(Fragment, null, renderList(z$1, (s) => createVNode(unref($), {
355
+ key: s,
356
+ class: normalizeClass(["px-2 flex items-center justify-between gap-2 text-c-1 border-1/2", [
357
+ unref(o).themeId === s ? "bg-b-2" : "bg-b-1"
358
+ ]]),
359
+ variant: "ghost",
360
+ onClick: ($) => _(s)
361
+ }, {
362
+ default: withCtx(() => [
363
+ createBaseVNode("div", Y, [
364
+ createBaseVNode("div", {
365
+ class: normalizeClass(["flex items-center justify-center w-5 h-5 rounded-full border-2 border-c-3", {
366
+ "bg-primary": unref(o).themeId === s
367
+ }])
368
+ }, [
369
+ createBaseVNode("div", J, [
370
+ unref(o).themeId === s ? (openBlock(), createBlock(unref(c$1), {
371
+ key: 0,
372
+ icon: "Checkmark",
373
+ size: "xs",
374
+ thickness: "3.5"
375
+ })) : createCommentVNode("", !0)
376
+ ])
377
+ ], 2),
378
+ createTextVNode(" " + toDisplayString(unref(E)[s]), 1)
379
+ ]),
380
+ createBaseVNode("div", K, [
381
+ createBaseVNode("div", Q, [
382
+ createVNode(I, { integration: s }, null, 8, ["integration"])
383
+ ])
384
+ ])
385
+ ]),
386
+ _: 2
387
+ }, 1032, ["class", "onClick"])), 64))
388
+ ])
389
+ ]),
390
+ _: 1
391
+ }),
392
+ createVNode(m, null, {
393
+ title: withCtx(() => t[11] || (t[11] = [
394
+ createTextVNode("Appearance")
395
+ ])),
396
+ description: withCtx(() => t[12] || (t[12] = [
397
+ createTextVNode(" Choose between light, dark, or system-based appearance for your workspace. ")
398
+ ])),
399
+ default: withCtx(() => [
400
+ createVNode(z)
401
+ ]),
402
+ _: 1
403
+ })
404
+ ])
405
+ ])
406
+ ]));
407
+ }
408
+ });
409
+
410
+ const v = /* @__PURE__ */ defineComponent({
411
+ __name: "Settings",
412
+ setup(f) {
413
+ const n = {
414
+ general: {
415
+ component: ne,
416
+ title: "general"
417
+ }
418
+ }, r = ref("general");
419
+ return (_, u) => (openBlock(), createBlock(a, null, {
420
+ default: withCtx(() => [
421
+ createVNode(x, { class: "flex-1" }, {
422
+ default: withCtx(() => [
423
+ (openBlock(), createBlock(resolveDynamicComponent(n[r.value].component)))
424
+ ]),
425
+ _: 1
426
+ })
427
+ ]),
428
+ _: 1
429
+ }));
430
+ }
431
+ });
432
+
433
+ export { v as default };