windmill-components 1.352.6 → 1.352.7

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.
@@ -28,33 +28,6 @@
28
28
  list-style-type: '- ';
29
29
  padding-left: 3rem;
30
30
  }
31
- .splitpanes--vertical > .splitpanes__pane {
32
- transition: none !important;
33
- }
34
-
35
- .splitpanes--horizontal > .splitpanes__pane {
36
- transition: none !important;
37
- }
38
-
39
- .monaco-workbench > .notifications-toasts.visible {
40
- display: none !important;
41
- }
42
-
43
- .monaco-editor .suggest-widget {
44
- z-index: 10001 !important;
45
- }
46
-
47
- .nowrap pre code.hljs {
48
- whitespace: normal !important;
49
- }
50
-
51
- .z5000 {
52
- z-index: 5000 !important;
53
- }
54
-
55
- .foo {
56
- color: red !important;
57
- }
58
31
  .autocomplete-list-item-create {
59
32
  @apply !text-primary-inverse !bg-surface-inverse;
60
33
  }
@@ -74,25 +47,23 @@
74
47
  .autocomplete-list {
75
48
  @apply !bg-surface;
76
49
  }
77
- pre code.hljs {
78
- overflow: visible !important;
79
- }
80
50
 
81
- svelte-virtual-list-row {
82
- overflow: visible !important;
51
+ .ol-overlaycontainer-stopevent {
52
+ @apply flex flex-col justify-start items-end;
83
53
  }
84
-
85
- svelte-virtual-list-contents > * + * {
86
- border-top-width: 1px !important;
87
- border-bottom-width: 0px !important;
54
+ .ol-control button {
55
+ @apply w-7 h-7 center-center bg-surface border text-secondary
56
+ rounded mt-1 mr-1 shadow duration-200 hover:bg-surface-hover focus:bg-surface-hover;
88
57
  }
89
58
 
90
- .monaco-editor textarea:focus {
91
- box-shadow: none !important;
59
+ /* Components */
60
+ .component-wrapper {
61
+ @apply rounded-component border overflow-hidden border-gray-300 dark:border-gray-600;
92
62
  }
93
63
 
94
- .Template-editor span.mtk20 {
95
- color: black !important;
64
+ .app-editor-input {
65
+ @apply rounded-component border border-gray-300 dark:border-gray-500 focus:border-gray-300 focus:dark:border-gray-500 focus:!ring-1 focus:!ring-blue-300;
66
+ @apply placeholder:text-gray-400 dark:placeholder:text-gray-600;
96
67
  }
97
68
  }
98
69
 
@@ -117,6 +88,47 @@
117
88
  }
118
89
  }
119
90
 
91
+ .splitpanes--vertical > .splitpanes__pane {
92
+ transition: none !important;
93
+ }
94
+
95
+ .splitpanes--horizontal > .splitpanes__pane {
96
+ transition: none !important;
97
+ }
98
+
99
+ .monaco-workbench > .notifications-toasts.visible {
100
+ display: none !important;
101
+ }
102
+
103
+ .monaco-editor .suggest-widget {
104
+ z-index: 10001 !important;
105
+ }
106
+
107
+ .z5000 {
108
+ z-index: 5000 !important;
109
+ }
110
+
111
+ .foo {
112
+ color: red !important;
113
+ }
114
+
115
+ svelte-virtual-list-row {
116
+ overflow: visible !important;
117
+ }
118
+
119
+ svelte-virtual-list-contents > * + * {
120
+ border-top-width: 1px !important;
121
+ border-bottom-width: 0px !important;
122
+ }
123
+
124
+ .monaco-editor textarea:focus {
125
+ box-shadow: none !important;
126
+ }
127
+
128
+ .Template-editor span.mtk20 {
129
+ color: black !important;
130
+ }
131
+
120
132
  .grid-cell-centered {
121
133
  display: flex;
122
134
  align-items: center;
@@ -129,21 +141,3 @@
129
141
  .grid-cell-centered .selected-item {
130
142
  margin-top: -4px;
131
143
  }
132
-
133
- .ol-overlaycontainer-stopevent {
134
- @apply flex flex-col justify-start items-end;
135
- }
136
- .ol-control button {
137
- @apply w-7 h-7 center-center bg-surface border text-secondary
138
- rounded mt-1 mr-1 shadow duration-200 hover:bg-surface-hover focus:bg-surface-hover;
139
- }
140
-
141
- /* Components */
142
- .component-wrapper {
143
- @apply rounded-component border overflow-hidden border-gray-300 dark:border-gray-600;
144
- }
145
-
146
- .app-editor-input {
147
- @apply rounded-component border border-gray-300 dark:border-gray-500 focus:border-gray-300 focus:dark:border-gray-500 focus:!ring-1 focus:!ring-blue-300;
148
- @apply placeholder:text-gray-400 dark:placeholder:text-gray-600;
149
- }
@@ -19,6 +19,7 @@ import Popover from './Popover.svelte';
19
19
  import DownloadCsv from './table/DownloadCsv.svelte';
20
20
  import { convertJsonToCsv } from './table/tableUtils';
21
21
  import Tooltip from './Tooltip.svelte';
22
+ import HighlightTheme from './HighlightTheme.svelte';
22
23
  export let result;
23
24
  export let requireHtmlApproval = false;
24
25
  export let filename = undefined;
@@ -260,6 +261,7 @@ let globalForceJson = false;
260
261
  let seeS3PreviewFileFromList = '';
261
262
  </script>
262
263
 
264
+ <HighlightTheme />
263
265
  {#if is_render_all}
264
266
  <div class="flex flex-col w-full gap-6">
265
267
  {#if !noControls}
@@ -13,11 +13,14 @@ import { hubBaseUrlStore } from '../stores';
13
13
  import { twMerge } from 'tailwind-merge';
14
14
  import FlowModuleScript from './flows/content/FlowModuleScript.svelte';
15
15
  import { Copy } from 'lucide-svelte';
16
+ import HighlightTheme from './HighlightTheme.svelte';
16
17
  export let schema = undefined;
17
18
  export let stepDetail = undefined;
18
19
  let codeViewer;
19
20
  </script>
20
21
 
22
+ <HighlightTheme />
23
+
21
24
  <Drawer bind:this={codeViewer} size="900px">
22
25
  <DrawerContent title={'Expanded Code'} on:close={codeViewer.closeDrawer}>
23
26
  {#if stepDetail && typeof stepDetail != 'string'}
@@ -8,6 +8,7 @@ import FlowGraphViewer from './FlowGraphViewer.svelte';
8
8
  import { Clipboard } from 'lucide-svelte';
9
9
  import YAML from 'yaml';
10
10
  import { yaml } from 'svelte-highlight/languages';
11
+ import HighlightTheme from './HighlightTheme.svelte';
11
12
  export let flow;
12
13
  export let initialOpen = undefined;
13
14
  export let noSide = false;
@@ -30,6 +31,8 @@ function toAny(x) {
30
31
  }
31
32
  </script>
32
33
 
34
+ <HighlightTheme />
35
+
33
36
  <Tabs bind:selected={tab}>
34
37
  {#if !noGraph}
35
38
  <Tab value="ui">Graph</Tab>
@@ -11,6 +11,7 @@ import php from 'svelte-highlight/languages/php';
11
11
  import { Button } from './common';
12
12
  import { copyToClipboard } from '../utils';
13
13
  import { ClipboardCopy } from 'lucide-svelte';
14
+ import HighlightTheme from './HighlightTheme.svelte';
14
15
  export let code = '';
15
16
  export let language;
16
17
  export let lines = false;
@@ -51,6 +52,8 @@ function getLang(lang) {
51
52
  $: lang = getLang(language);
52
53
  </script>
53
54
 
55
+ <HighlightTheme />
56
+
54
57
  <div class="relative overflow-x-auto">
55
58
  <Button
56
59
  wrapperClasses="absolute top-2 right-2 z-20"
@@ -0,0 +1,318 @@
1
+ <script>"use strict";
2
+ </script>
3
+
4
+ <style global>
5
+ :global(pre) :global(code.hljs) {
6
+ display: block;
7
+ overflow-x: auto;
8
+ padding: 1em;
9
+ overflow: visible !important;
10
+ }
11
+
12
+ :global(code.hljs) {
13
+ padding: 3px 5px;
14
+ }
15
+
16
+ :global(.dark) :global(.hljs) {
17
+ background: #2e3440;
18
+ }
19
+ :global(.dark) :global(.hljs),
20
+ :global(.dark) :global(.hljs-subst) {
21
+ color: #d8dee9;
22
+ }
23
+ :global(.dark) :global(.hljs-selector-tag) {
24
+ color: #81a1c1;
25
+ }
26
+ :global(.dark) :global(.hljs-selector-id) {
27
+ color: #8fbcbb;
28
+ font-weight: bold;
29
+ }
30
+ :global(.dark) :global(.hljs-selector-class) {
31
+ color: #8fbcbb;
32
+ }
33
+ :global(.dark) :global(.hljs-selector-attr) {
34
+ color: #8fbcbb;
35
+ }
36
+ :global(.dark) :global(.hljs-property) {
37
+ color: #88c0d0;
38
+ }
39
+ :global(.dark) :global(.hljs-selector-pseudo) {
40
+ color: #88c0d0;
41
+ }
42
+ :global(.dark) :global(.hljs-addition) {
43
+ background-color: rgba(163, 190, 140, 0.5);
44
+ }
45
+ :global(.dark) :global(.hljs-deletion) {
46
+ background-color: rgba(191, 97, 106, 0.5);
47
+ }
48
+ :global(.dark) :global(.hljs-built_in),
49
+ :global(.dark) :global(.hljs-type) {
50
+ color: #8fbcbb;
51
+ }
52
+ :global(.dark) :global(.hljs-class) {
53
+ color: #8fbcbb;
54
+ }
55
+ :global(.dark) :global(.hljs-function) {
56
+ color: #88c0d0;
57
+ }
58
+ :global(.dark) :global(.hljs-title.hljs-function),
59
+ :global(.dark) :global(.hljs-function) > :global(.hljs-title) {
60
+ color: #88c0d0;
61
+ }
62
+ :global(.dark) :global(.hljs-keyword),
63
+ :global(.dark) :global(.hljs-literal),
64
+ :global(.dark) :global(.hljs-symbol) {
65
+ color: #81a1c1;
66
+ }
67
+ :global(.dark) :global(.hljs-number) {
68
+ color: #b48ead;
69
+ }
70
+ :global(.dark) :global(.hljs-regexp) {
71
+ color: #ebcb8b;
72
+ }
73
+ :global(.dark) :global(.hljs-string) {
74
+ color: #a3be8c;
75
+ }
76
+ :global(.dark) :global(.hljs-title) {
77
+ color: #8fbcbb;
78
+ }
79
+ :global(.dark) :global(.hljs-params) {
80
+ color: #d8dee9;
81
+ }
82
+ :global(.dark) :global(.hljs-bullet) {
83
+ color: #81a1c1;
84
+ }
85
+ :global(.dark) :global(.hljs-code) {
86
+ color: #8fbcbb;
87
+ }
88
+ :global(.dark) :global(.hljs-emphasis) {
89
+ font-style: italic;
90
+ }
91
+ :global(.dark) :global(.hljs-formula) {
92
+ color: #8fbcbb;
93
+ }
94
+ :global(.dark) :global(.hljs-strong) {
95
+ font-weight: bold;
96
+ }
97
+ :global(.dark) :global(.hljs-link:hover) {
98
+ -webkit-text-decoration: underline;
99
+ text-decoration: underline;
100
+ }
101
+ :global(.dark) :global(.hljs-quote) {
102
+ color: #4c566a;
103
+ }
104
+ :global(.dark) :global(.hljs-comment) {
105
+ color: #4c566a;
106
+ }
107
+ :global(.dark) :global(.hljs-doctag) {
108
+ color: #8fbcbb;
109
+ }
110
+ :global(.dark) :global(.hljs-meta),
111
+ :global(.dark) :global(.hljs-meta) :global(.hljs-keyword) {
112
+ color: #5e81ac;
113
+ }
114
+ :global(.dark) :global(.hljs-meta) :global(.hljs-string) {
115
+ color: #a3be8c;
116
+ }
117
+ :global(.dark) :global(.hljs-attr) {
118
+ color: #8fbcbb;
119
+ }
120
+ :global(.dark) :global(.hljs-attribute) {
121
+ color: #d8dee9;
122
+ }
123
+ :global(.dark) :global(.hljs-name) {
124
+ color: #81a1c1;
125
+ }
126
+ :global(.dark) :global(.hljs-section) {
127
+ color: #88c0d0;
128
+ }
129
+ :global(.dark) :global(.hljs-tag) {
130
+ color: #81a1c1;
131
+ }
132
+ :global(.dark) :global(.hljs-variable) {
133
+ color: #d8dee9;
134
+ }
135
+ :global(.dark) :global(.hljs-template-variable) {
136
+ color: #d8dee9;
137
+ }
138
+ :global(.dark) :global(.hljs-template-tag) {
139
+ color: #5e81ac;
140
+ }
141
+ :global(.dark) :global(.language-abnf) :global(.hljs-attribute) {
142
+ color: #88c0d0;
143
+ }
144
+ :global(.dark) :global(.language-abnf) :global(.hljs-symbol) {
145
+ color: #ebcb8b;
146
+ }
147
+ :global(.dark) :global(.language-apache) :global(.hljs-attribute) {
148
+ color: #88c0d0;
149
+ }
150
+ :global(.dark) :global(.language-apache) :global(.hljs-section) {
151
+ color: #81a1c1;
152
+ }
153
+ :global(.dark) :global(.language-arduino) :global(.hljs-built_in) {
154
+ color: #88c0d0;
155
+ }
156
+ :global(.dark) :global(.language-aspectj) :global(.hljs-meta) {
157
+ color: #d08770;
158
+ }
159
+ :global(.dark) :global(.language-aspectj) > :global(.hljs-title) {
160
+ color: #88c0d0;
161
+ }
162
+ :global(.dark) :global(.language-bnf) :global(.hljs-attribute) {
163
+ color: #8fbcbb;
164
+ }
165
+ :global(.dark) :global(.language-clojure) :global(.hljs-name) {
166
+ color: #88c0d0;
167
+ }
168
+ :global(.dark) :global(.language-clojure) :global(.hljs-symbol) {
169
+ color: #ebcb8b;
170
+ }
171
+ :global(.dark) :global(.language-coq) :global(.hljs-built_in) {
172
+ color: #88c0d0;
173
+ }
174
+ :global(.dark) :global(.language-cpp) :global(.hljs-meta) :global(.hljs-string) {
175
+ color: #8fbcbb;
176
+ }
177
+ :global(.dark) :global(.language-css) :global(.hljs-built_in) {
178
+ color: #88c0d0;
179
+ }
180
+ :global(.dark) :global(.language-css) :global(.hljs-keyword) {
181
+ color: #d08770;
182
+ }
183
+ :global(.dark) :global(.language-diff) :global(.hljs-meta) {
184
+ color: #8fbcbb;
185
+ }
186
+ :global(.dark) :global(.language-ebnf) :global(.hljs-attribute) {
187
+ color: #8fbcbb;
188
+ }
189
+ :global(.dark) :global(.language-glsl) :global(.hljs-built_in) {
190
+ color: #88c0d0;
191
+ }
192
+ :global(.dark) :global(.language-groovy) :global(.hljs-meta:not(:first-child)) {
193
+ color: #d08770;
194
+ }
195
+ :global(.dark) :global(.language-haxe) :global(.hljs-meta) {
196
+ color: #d08770;
197
+ }
198
+ :global(.dark) :global(.language-java) :global(.hljs-meta) {
199
+ color: #d08770;
200
+ }
201
+ :global(.dark) :global(.language-ldif) :global(.hljs-attribute) {
202
+ color: #8fbcbb;
203
+ }
204
+ :global(.dark) :global(.language-lisp) :global(.hljs-name) {
205
+ color: #88c0d0;
206
+ }
207
+ :global(.dark) :global(.language-lua) :global(.hljs-built_in) {
208
+ color: #88c0d0;
209
+ }
210
+ :global(.dark) :global(.language-moonscript) :global(.hljs-built_in) {
211
+ color: #88c0d0;
212
+ }
213
+ :global(.dark) :global(.language-nginx) :global(.hljs-attribute) {
214
+ color: #88c0d0;
215
+ }
216
+ :global(.dark) :global(.language-nginx) :global(.hljs-section) {
217
+ color: #5e81ac;
218
+ }
219
+ :global(.dark) :global(.language-pf) :global(.hljs-built_in) {
220
+ color: #88c0d0;
221
+ }
222
+ :global(.dark) :global(.language-processing) :global(.hljs-built_in) {
223
+ color: #88c0d0;
224
+ }
225
+ :global(.dark) :global(.language-scss) :global(.hljs-keyword) {
226
+ color: #81a1c1;
227
+ }
228
+ :global(.dark) :global(.language-stylus) :global(.hljs-keyword) {
229
+ color: #81a1c1;
230
+ }
231
+ :global(.dark) :global(.language-swift) :global(.hljs-meta) {
232
+ color: #d08770;
233
+ }
234
+ :global(.dark) :global(.language-vim) :global(.hljs-built_in) {
235
+ color: #88c0d0;
236
+ font-style: italic;
237
+ }
238
+ :global(.dark) :global(.language-yaml) :global(.hljs-meta) {
239
+ color: #d08770;
240
+ }
241
+
242
+ :global(.hljs) {
243
+ color: #24292e;
244
+ background: #ffffff;
245
+ }
246
+ :global(.hljs-doctag),
247
+ :global(.hljs-keyword),
248
+ :global(.hljs-meta) :global(.hljs-keyword),
249
+ :global(.hljs-template-tag),
250
+ :global(.hljs-template-variable),
251
+ :global(.hljs-type),
252
+ :global(.hljs-variable.language_) {
253
+ color: #d73a49;
254
+ }
255
+ :global(.hljs-title),
256
+ :global(.hljs-title.class_),
257
+ :global(.hljs-title.class_.inherited__),
258
+ :global(.hljs-title.function_) {
259
+ color: #6f42c1;
260
+ }
261
+ :global(.hljs-attr),
262
+ :global(.hljs-attribute),
263
+ :global(.hljs-literal),
264
+ :global(.hljs-meta),
265
+ :global(.hljs-number),
266
+ :global(.hljs-operator),
267
+ :global(.hljs-variable),
268
+ :global(.hljs-selector-attr),
269
+ :global(.hljs-selector-class),
270
+ :global(.hljs-selector-id) {
271
+ color: #005cc5;
272
+ }
273
+ :global(.hljs-regexp),
274
+ :global(.hljs-string),
275
+ :global(.hljs-meta) :global(.hljs-string) {
276
+ color: #032f62;
277
+ }
278
+ :global(.hljs-built_in),
279
+ :global(.hljs-symbol) {
280
+ color: #e36209;
281
+ }
282
+ :global(.hljs-comment),
283
+ :global(.hljs-code),
284
+ :global(.hljs-formula) {
285
+ color: #6a737d;
286
+ }
287
+ :global(.hljs-name),
288
+ :global(.hljs-quote),
289
+ :global(.hljs-selector-tag),
290
+ :global(.hljs-selector-pseudo) {
291
+ color: #22863a;
292
+ }
293
+ :global(.hljs-subst) {
294
+ color: #24292e;
295
+ }
296
+ :global(.hljs-section) {
297
+ color: #005cc5;
298
+ font-weight: bold;
299
+ }
300
+ :global(.hljs-bullet) {
301
+ color: #735c0f;
302
+ }
303
+ :global(.hljs-emphasis) {
304
+ color: #24292e;
305
+ font-style: italic;
306
+ }
307
+ :global(.hljs-strong) {
308
+ color: #24292e;
309
+ font-weight: bold;
310
+ }
311
+ :global(.hljs-addition) {
312
+ color: #22863a;
313
+ background-color: #f0fff4;
314
+ }
315
+ :global(.hljs-deletion) {
316
+ color: #b31d28;
317
+ background-color: #ffeef0;
318
+ }</style>
@@ -0,0 +1,14 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type HighlightThemeProps = typeof __propDef.props;
10
+ export type HighlightThemeEvents = typeof __propDef.events;
11
+ export type HighlightThemeSlots = typeof __propDef.slots;
12
+ export default class HighlightTheme extends SvelteComponent<HighlightThemeProps, HighlightThemeEvents, HighlightThemeSlots> {
13
+ }
14
+ export {};
@@ -8,6 +8,7 @@ import DataTable from './table/DataTable.svelte';
8
8
  import Cell from './table/Cell.svelte';
9
9
  import Head from './table/Head.svelte';
10
10
  import Row from './table/Row.svelte';
11
+ import HighlightTheme from './HighlightTheme.svelte';
11
12
  export let args;
12
13
  export let argLabel = undefined;
13
14
  let jsonViewer;
@@ -85,6 +86,8 @@ ${Object.entries(args)
85
86
  </DataTable>
86
87
  </div>
87
88
 
89
+ <HighlightTheme />
90
+
88
91
  <Drawer bind:this={jsonViewer} size="900px">
89
92
  <DrawerContent title="Expanded Args" on:close={jsonViewer.closeDrawer}>
90
93
  <svelte:fragment slot="actions">
@@ -70,9 +70,13 @@ const zoomOptions = {
70
70
  }
71
71
  }
72
72
  };
73
+ function isDark() {
74
+ return document.documentElement.classList.contains('dark');
75
+ }
76
+ ChartJS.defaults.color = isDark() ? '#ccc' : '#666';
77
+ ChartJS.defaults.borderColor = isDark() ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)';
73
78
  function getBackgorundColor() {
74
- const isDark = document.documentElement.classList.contains('dark');
75
- return isDark ? '#2e3440' : '#ffffff';
79
+ return isDark() ? '#2e3440' : '#ffffff';
76
80
  }
77
81
  function hexToRgb(hexColor) {
78
82
  hexColor = hexColor.replace(/^#/, '');
@@ -6,6 +6,7 @@ import Tab from './common/tabs/Tab.svelte';
6
6
  import TabContent from './common/tabs/TabContent.svelte';
7
7
  import Tabs from './common/tabs/Tabs.svelte';
8
8
  import { Badge } from './common';
9
+ import HighlightTheme from './HighlightTheme.svelte';
9
10
  export let schema = emptySchema();
10
11
  function getProperties(schema) {
11
12
  if (schema.properties) {
@@ -15,6 +16,8 @@ function getProperties(schema) {
15
16
  }
16
17
  </script>
17
18
 
19
+ <HighlightTheme />
20
+
18
21
  <div class="w-full">
19
22
  <Tabs selected="arguments">
20
23
  <Tab value="arguments">Arguments</Tab>
@@ -10,6 +10,7 @@ import { ResourceService, VariableService } from '../gen';
10
10
  import { oauthStore, workspaceStore } from '../stores';
11
11
  import Password from './Password.svelte';
12
12
  import { createEventDispatcher } from 'svelte';
13
+ import HighlightTheme from './HighlightTheme.svelte';
13
14
  let drawer;
14
15
  let token = undefined;
15
16
  export async function open() {
@@ -81,6 +82,8 @@ async function save() {
81
82
  }
82
83
  </script>
83
84
 
85
+ <HighlightTheme />
86
+
84
87
  <Drawer bind:this={drawer} size="800px">
85
88
  <DrawerContent title="Add a Supabase Database" on:close={drawer.closeDrawer}>
86
89
  {#if step === 'init' || selectedDatabase == undefined}
@@ -9,6 +9,7 @@ import { yaml } from 'svelte-highlight/languages';
9
9
  import YAML from 'yaml';
10
10
  import Tabs from '../../common/tabs/Tabs.svelte';
11
11
  import Tab from '../../common/tabs/Tab.svelte';
12
+ import HighlightTheme from '../../HighlightTheme.svelte';
12
13
  let jsonViewerDrawer;
13
14
  let app = undefined;
14
15
  let rawType = 'yaml';
@@ -18,6 +19,8 @@ export function open(app_l) {
18
19
  }
19
20
  </script>
20
21
 
22
+ <HighlightTheme />
23
+
21
24
  <Drawer bind:this={jsonViewerDrawer} size="800px">
22
25
  <DrawerContent title="App Export" on:close={() => jsonViewerDrawer.toggleDrawer()}>
23
26
  <div>
@@ -3,6 +3,7 @@ import { Highlight } from 'svelte-highlight';
3
3
  import css from 'svelte-highlight/languages/css';
4
4
  import { resolveTheme } from './themeUtils';
5
5
  import { workspaceStore } from '../../../../stores';
6
+ import HighlightTheme from '../../../HighlightTheme.svelte';
6
7
  export let theme;
7
8
  let code = undefined;
8
9
  let codeDrawer;
@@ -12,6 +13,8 @@ export async function openDrawer() {
12
13
  }
13
14
  </script>
14
15
 
16
+ <HighlightTheme />
17
+
15
18
  <Drawer bind:this={codeDrawer}>
16
19
  <DrawerContent title="Theme viewer" on:close={codeDrawer.closeDrawer}>
17
20
  <div class="p-2 border rounded-sm">
@@ -10,6 +10,7 @@ import { MoveRight } from 'lucide-svelte';
10
10
  import { customisationByComponent } from '../componentsPanel/cssUtils';
11
11
  import { sendUserToast } from '../../../../toast';
12
12
  import CloseButton from '../../../common/CloseButton.svelte';
13
+ import HighlightTheme from '../../../HighlightTheme.svelte';
13
14
  export let component;
14
15
  const { app } = getContext('AppViewerContext');
15
16
  function fadeFast(node) {
@@ -94,6 +95,8 @@ function hasStyles(customCss) {
94
95
  let type = component?.type;
95
96
  </script>
96
97
 
98
+ <HighlightTheme />
99
+
97
100
  {#if migrationModalOpen}
98
101
  <div
99
102
  transition:fadeFast|local
@@ -4,11 +4,14 @@ import { getComponentControl } from '../componentsPanel/componentControlUtils';
4
4
  import { Highlight } from 'svelte-highlight';
5
5
  import typescript from 'svelte-highlight/languages/typescript';
6
6
  import { Button } from '../../../common';
7
+ import HighlightTheme from '../../../HighlightTheme.svelte';
7
8
  export let type;
8
9
  const componentControls = getComponentControl(type);
9
10
  let collapsed = true;
10
11
  </script>
11
12
 
13
+ <HighlightTheme />
14
+
12
15
  {#if componentControls?.length > 0}
13
16
  <PanelSection title="Controls">
14
17
  <div slot="action" class="flex justify-end flex-wrap gap-1">
@@ -6,6 +6,7 @@ import { yaml } from 'svelte-highlight/languages';
6
6
  import json from 'svelte-highlight/languages/json';
7
7
  import { Pane, Splitpanes } from 'svelte-splitpanes';
8
8
  import YAML from 'yaml';
9
+ import HighlightTheme from '../HighlightTheme.svelte';
9
10
  export let triggerSelected = 'webhooks';
10
11
  export let flow_json = undefined;
11
12
  export let hasStepDetails = false;
@@ -19,6 +20,8 @@ $: if (hasStepDetails) {
19
20
  $: !hasStepDetails && selected === 'flow_step' && (selected = 'saved_inputs');
20
21
  </script>
21
22
 
23
+ <HighlightTheme />
24
+
22
25
  <Splitpanes horizontal class="h-full">
23
26
  <Pane size={100}>
24
27
  <Tabs bind:selected>
@@ -12,6 +12,7 @@ import { Highlight } from 'svelte-highlight';
12
12
  import { typescript } from 'svelte-highlight/languages';
13
13
  import ClipboardPanel from './ClipboardPanel.svelte';
14
14
  import { copyToClipboard, generateRandomString } from '../../utils';
15
+ import HighlightTheme from '../HighlightTheme.svelte';
15
16
  let userSettings;
16
17
  export let webhooks;
17
18
  export let token;
@@ -138,6 +139,8 @@ done`}`;
138
139
  }
139
140
  </script>
140
141
 
142
+ <HighlightTheme />
143
+
141
144
  <UserSettings
142
145
  bind:this={userSettings}
143
146
  on:tokenCreated={(e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-components",
3
- "version": "1.352.6",
3
+ "version": "1.352.7",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",
@@ -204,6 +204,11 @@
204
204
  "svelte": "./package/components/common/tabs/Tab.svelte",
205
205
  "default": "./package/components/common/tabs/Tab.svelte"
206
206
  },
207
+ "./components/common/tabs/AppTheme.svelte": {
208
+ "types": "./package/components/AppTheme.svelte.d.ts",
209
+ "svelte": "./package/components/AppTheme.svelte",
210
+ "default": "./package/components/AppTheme.svelte"
211
+ },
207
212
  "./components/common/alert/Alert.svelte": {
208
213
  "types": "./package/components/common/alert/Alert.svelte.d.ts",
209
214
  "svelte": "./package/components/common/alert/Alert.svelte",
@@ -394,6 +399,9 @@
394
399
  "components/SchemaEditor.svelte": [
395
400
  "./package/components/SchemaEditor.svelte.d.ts"
396
401
  ],
402
+ "components/AppTheme.svelte": [
403
+ "./package/components/AppTheme.svelte.d.ts"
404
+ ],
397
405
  "components/EditableSchemaWrapper.svelte": [
398
406
  "./package/components/schema/EditableSchemaWrapper.svelte.d.ts"
399
407
  ],
@@ -1,65 +0,0 @@
1
- <script>import { onMount } from 'svelte';
2
- import DarkModeObserver from './DarkModeObserver.svelte';
3
- import github from 'svelte-highlight/styles/github';
4
- import nord from 'svelte-highlight/styles/nord';
5
- import { each } from 'chart.js/helpers';
6
- import { Chart } from 'chart.js';
7
- let darkMode = false;
8
- function onThemeChange() {
9
- if (document.documentElement.classList.contains('dark')) {
10
- darkMode = true;
11
- each(Chart.instances, (instance) => {
12
- if (instance.options.scales?.y?.ticks?.color !== undefined) {
13
- instance.options.scales.y.ticks.color = '#e0e7ed';
14
- }
15
- if (instance.options.scales?.y?.grid?.color !== undefined) {
16
- instance.options.scales.y.grid.color = '#4a5568';
17
- }
18
- if (instance.options.scales?.x?.ticks?.color !== undefined) {
19
- instance.options.scales.x.ticks.color = '#e0e7ed';
20
- }
21
- if (instance.options.scales?.x?.grid?.color !== undefined) {
22
- instance.options.scales.x.grid.color = '#4a5568';
23
- }
24
- if (instance.options.plugins?.legend?.labels?.color !== undefined) {
25
- instance.options.plugins.legend.labels.color = '#e0e7ed';
26
- }
27
- instance.update();
28
- });
29
- }
30
- else {
31
- darkMode = false;
32
- each(Chart.instances, (instance) => {
33
- if (instance.options.scales?.y?.ticks?.color !== undefined) {
34
- instance.options.scales.y.ticks.color = '#4a5568';
35
- }
36
- if (instance.options.scales?.y?.grid?.color !== undefined) {
37
- instance.options.scales.y.grid.color = '#e0e7ed';
38
- }
39
- if (instance.options.scales?.x?.ticks?.color !== undefined) {
40
- instance.options.scales.x.ticks.color = '#4a5568';
41
- }
42
- if (instance.options.scales?.x?.grid?.color !== undefined) {
43
- instance.options.scales.x.grid.color = '#e0e7ed';
44
- }
45
- if (instance.options.plugins?.legend?.labels?.color !== undefined) {
46
- instance.options.plugins.legend.labels.color = '#4a5568';
47
- }
48
- instance.update();
49
- });
50
- }
51
- }
52
- onMount(() => {
53
- onThemeChange();
54
- });
55
- </script>
56
-
57
- <DarkModeObserver on:change={onThemeChange} />
58
-
59
- <svelte:head>
60
- {#if darkMode}
61
- {@html nord}
62
- {:else}
63
- {@html github}
64
- {/if}
65
- </svelte:head>
@@ -1,14 +0,0 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: Record<string, never>;
4
- events: {
5
- [evt: string]: CustomEvent<any>;
6
- };
7
- slots: {};
8
- };
9
- export type ChartHighlightThemeProps = typeof __propDef.props;
10
- export type ChartHighlightThemeEvents = typeof __propDef.events;
11
- export type ChartHighlightThemeSlots = typeof __propDef.slots;
12
- export default class ChartHighlightTheme extends SvelteComponent<ChartHighlightThemeProps, ChartHighlightThemeEvents, ChartHighlightThemeSlots> {
13
- }
14
- export {};