@adcops/autocore-react 3.5.13 → 3.6.3
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/components/tis-editor/DeleteMethodDialog.d.ts +43 -0
- package/dist/components/tis-editor/DeleteMethodDialog.d.ts.map +1 -0
- package/dist/components/tis-editor/DeleteMethodDialog.js +1 -0
- package/dist/components/tis-editor/MethodTransfer.d.ts +69 -0
- package/dist/components/tis-editor/MethodTransfer.d.ts.map +1 -0
- package/dist/components/tis-editor/MethodTransfer.js +1 -0
- package/dist/components/tis-editor/TisConfigEditor.css +31 -0
- package/dist/components/tis-editor/TisConfigEditor.d.ts +9 -1
- package/dist/components/tis-editor/TisConfigEditor.d.ts.map +1 -1
- package/dist/components/tis-editor/TisConfigEditor.js +1 -1
- package/dist/components/tis-editor/editor/IdentitySection.d.ts.map +1 -1
- package/dist/components/tis-editor/editor/IdentitySection.js +1 -1
- package/dist/components/tis-editor/types.d.ts +11 -0
- package/dist/components/tis-editor/types.d.ts.map +1 -1
- package/dist/components/varpick/VariableInput.d.ts.map +1 -1
- package/dist/components/varpick/VariableInput.js +1 -1
- package/dist/components/varpick/VariablePicker.d.ts.map +1 -1
- package/dist/components/varpick/VariablePicker.js +1 -1
- package/dist/components/varpick/varpick.css +84 -30
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useMethodSequence.d.ts +60 -0
- package/dist/hooks/useMethodSequence.d.ts.map +1 -0
- package/dist/hooks/useMethodSequence.js +1 -0
- package/package.json +2 -1
- package/src/components/tis-editor/DeleteMethodDialog.tsx +162 -0
- package/src/components/tis-editor/MethodTransfer.ts +138 -0
- package/src/components/tis-editor/TisConfigEditor.css +31 -0
- package/src/components/tis-editor/TisConfigEditor.tsx +305 -7
- package/src/components/tis-editor/editor/IdentitySection.tsx +33 -1
- package/src/components/tis-editor/types.ts +11 -0
- package/src/components/varpick/VariableInput.tsx +9 -2
- package/src/components/varpick/VariablePicker.tsx +4 -0
- package/src/components/varpick/varpick.css +84 -30
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useMethodSequence.ts +128 -0
- package/tools/tests/dist/{TestFieldDialog-C4mKVh7q.js → TestFieldDialog-Dph2oPfe.js} +159 -2
- package/tools/tests/dist/autocore-react.css +84 -30
- package/tools/tests/dist/tis-editor.entry.js +1 -1
- package/tools/tests/dist/varpick.entry.js +1 -1
- package/tools/tests/varpick.test.mjs +12 -0
|
@@ -1,12 +1,66 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Variable picker.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* ## The token bridge
|
|
5
|
+
*
|
|
6
|
+
* Every colour resolves `--ac-*` first, then the PrimeReact theme variable,
|
|
7
|
+
* then a literal. That ordering is the whole point:
|
|
8
|
+
*
|
|
9
|
+
* - **`--ac-*`** is autocore's own design-token layer, which 4.0 supplies.
|
|
10
|
+
* When it exists, this file needs no edit to follow it.
|
|
11
|
+
* - **PrimeReact's `--surface-*` / `--text-color`** is what 3.5 actually
|
|
12
|
+
* defines today, so the picker matches whatever theme the machine runs,
|
|
13
|
+
* light or dark.
|
|
14
|
+
* - **The literal** keeps an un-themed host legible — the playground, the
|
|
15
|
+
* jsdom test harness — rather than rendering black on black.
|
|
16
|
+
*
|
|
17
|
+
* The token NAMES and their fallbacks are copied deliberately from
|
|
18
|
+
* `@adcops/autocore-seq-react`'s `styles.css`. The sequence editor's picker and
|
|
19
|
+
* this one sit one tab apart doing the identical thing; if they read different
|
|
20
|
+
* token names, 4.0 would have to satisfy two sets and the two panels could
|
|
21
|
+
* drift to different colours while both looked "correct".
|
|
22
|
+
*
|
|
23
|
+
* ## Why the tokens are declared twice
|
|
24
|
+
*
|
|
25
|
+
* The field lives inside the TIS editor's form, but PrimeReact renders the
|
|
26
|
+
* Dialog through a PORTAL to `<body>` — so the two halves are not in one
|
|
27
|
+
* subtree and a single scoping root cannot cover both. Hence the declaration on
|
|
28
|
+
* `.ac-varpick` (the dialog, which passes that className) and on
|
|
29
|
+
* `.ac-varpick__input` (the field). Declaring them on `:root` instead would
|
|
30
|
+
* push a dozen names into every consuming application's global scope for the
|
|
31
|
+
* benefit of one component.
|
|
8
32
|
*/
|
|
9
33
|
|
|
34
|
+
.ac-varpick,
|
|
35
|
+
.ac-varpick__input {
|
|
36
|
+
/* -- surfaces ---------------------------------------------------- */
|
|
37
|
+
--vp-sunk: var(--ac-surface-sunk, var(--surface-50, #f8f9fa));
|
|
38
|
+
--vp-overlay: var(--ac-surface-overlay, var(--surface-overlay,#ffffff));
|
|
39
|
+
--vp-hover: var(--ac-hover, var(--surface-hover, rgba(127, 127, 127, 0.08)));
|
|
40
|
+
|
|
41
|
+
/* -- ink --------------------------------------------------------- */
|
|
42
|
+
--vp-ink: var(--ac-on-surface, var(--text-color, #111827));
|
|
43
|
+
--vp-ink-muted: var(--ac-on-surface-muted, var(--text-color-secondary, #6b7280));
|
|
44
|
+
--vp-ink-subtle: var(--ac-on-surface-subtle, var(--text-color-secondary, #8b95a1));
|
|
45
|
+
|
|
46
|
+
/* -- lines ------------------------------------------------------- */
|
|
47
|
+
--vp-border: var(--ac-border, var(--surface-border, rgba(127, 127, 127, 0.25)));
|
|
48
|
+
--vp-divider: var(--ac-divider, var(--surface-border, rgba(127, 127, 127, 0.18)));
|
|
49
|
+
|
|
50
|
+
/* -- accents ----------------------------------------------------- */
|
|
51
|
+
--vp-primary: var(--ac-primary, var(--primary-color, #2563eb));
|
|
52
|
+
--vp-primary-subtle: var(--ac-primary-subtle, var(--highlight-bg, rgba(37, 99, 235, 0.14)));
|
|
53
|
+
--vp-success: var(--ac-success, var(--green-500, #15803d));
|
|
54
|
+
--vp-warning: var(--ac-warning, var(--orange-500, #b45309));
|
|
55
|
+
--vp-info: var(--ac-info, var(--blue-500, #0369a1));
|
|
56
|
+
--vp-focus-ring: var(--ac-focus-ring, rgba(37, 99, 235, 0.45));
|
|
57
|
+
|
|
58
|
+
/* -- type -------------------------------------------------------- */
|
|
59
|
+
--vp-mono: var(--ac-font-mono, ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace);
|
|
60
|
+
--vp-font-sm: var(--ac-text-sm, 0.8125rem);
|
|
61
|
+
--vp-font-xs: var(--ac-text-xs, 0.75rem);
|
|
62
|
+
}
|
|
63
|
+
|
|
10
64
|
.ac-varpick__input {
|
|
11
65
|
display: flex;
|
|
12
66
|
align-items: stretch;
|
|
@@ -31,8 +85,8 @@
|
|
|
31
85
|
}
|
|
32
86
|
|
|
33
87
|
.ac-varpick__hint {
|
|
34
|
-
font-size:
|
|
35
|
-
color: var(--
|
|
88
|
+
font-size: var(--vp-font-sm);
|
|
89
|
+
color: var(--vp-ink-muted);
|
|
36
90
|
margin-bottom: 0.75rem;
|
|
37
91
|
line-height: 1.4;
|
|
38
92
|
}
|
|
@@ -41,7 +95,7 @@
|
|
|
41
95
|
|
|
42
96
|
.ac-varpick__empty {
|
|
43
97
|
padding: 1.5rem 0.25rem;
|
|
44
|
-
color: var(--
|
|
98
|
+
color: var(--vp-ink-muted);
|
|
45
99
|
font-size: 0.875rem;
|
|
46
100
|
}
|
|
47
101
|
|
|
@@ -64,24 +118,24 @@
|
|
|
64
118
|
gap: 0.5rem;
|
|
65
119
|
padding-bottom: 0.25rem;
|
|
66
120
|
margin-bottom: 0.25rem;
|
|
67
|
-
border-bottom: 1px solid var(--
|
|
121
|
+
border-bottom: 1px solid var(--vp-divider);
|
|
68
122
|
position: sticky;
|
|
69
123
|
top: 0;
|
|
70
|
-
background: var(--
|
|
124
|
+
background: var(--vp-overlay);
|
|
71
125
|
z-index: 1;
|
|
72
126
|
}
|
|
73
127
|
|
|
74
128
|
.ac-varpick__grouptitle {
|
|
75
|
-
font-size:
|
|
129
|
+
font-size: var(--vp-font-xs);
|
|
76
130
|
font-weight: 700;
|
|
77
131
|
letter-spacing: 0.04em;
|
|
78
132
|
text-transform: uppercase;
|
|
79
|
-
color: var(--
|
|
133
|
+
color: var(--vp-ink-muted);
|
|
80
134
|
}
|
|
81
135
|
|
|
82
136
|
.ac-varpick__grouphint {
|
|
83
|
-
font-size:
|
|
84
|
-
color: var(--
|
|
137
|
+
font-size: var(--vp-font-xs);
|
|
138
|
+
color: var(--vp-ink-subtle);
|
|
85
139
|
}
|
|
86
140
|
|
|
87
141
|
/*
|
|
@@ -102,21 +156,21 @@
|
|
|
102
156
|
border: 1px solid transparent;
|
|
103
157
|
border-radius: 3px;
|
|
104
158
|
background: transparent;
|
|
105
|
-
color: var(--
|
|
159
|
+
color: var(--vp-ink);
|
|
106
160
|
font: inherit;
|
|
107
161
|
cursor: pointer;
|
|
108
162
|
}
|
|
109
163
|
|
|
110
|
-
.ac-varpick__row:hover { background: var(--
|
|
164
|
+
.ac-varpick__row:hover { background: var(--vp-hover); }
|
|
111
165
|
|
|
112
166
|
.ac-varpick__row:focus-visible {
|
|
113
|
-
outline: 2px solid var(--
|
|
167
|
+
outline: 2px solid var(--vp-focus-ring);
|
|
114
168
|
outline-offset: -2px;
|
|
115
169
|
}
|
|
116
170
|
|
|
117
171
|
.ac-varpick__row--on {
|
|
118
|
-
background: var(--
|
|
119
|
-
border-color: var(--primary
|
|
172
|
+
background: var(--vp-primary-subtle);
|
|
173
|
+
border-color: var(--vp-primary);
|
|
120
174
|
}
|
|
121
175
|
|
|
122
176
|
.ac-varpick__row--off { opacity: 0.55; cursor: default; }
|
|
@@ -130,19 +184,19 @@
|
|
|
130
184
|
}
|
|
131
185
|
|
|
132
186
|
.ac-varpick__name {
|
|
133
|
-
font-family: var(--
|
|
187
|
+
font-family: var(--vp-mono);
|
|
134
188
|
font-weight: 600;
|
|
135
189
|
}
|
|
136
190
|
|
|
137
191
|
.ac-varpick__label { font-size: 0.875rem; }
|
|
138
192
|
|
|
139
193
|
.ac-varpick__chip {
|
|
140
|
-
font-size:
|
|
194
|
+
font-size: var(--vp-font-xs);
|
|
141
195
|
padding: 0 6px;
|
|
142
196
|
border-radius: 999px;
|
|
143
|
-
background: var(--
|
|
144
|
-
border: 1px solid var(--
|
|
145
|
-
color: var(--
|
|
197
|
+
background: var(--vp-sunk);
|
|
198
|
+
border: 1px solid var(--vp-border);
|
|
199
|
+
color: var(--vp-ink-muted);
|
|
146
200
|
/* A unit symbol's case is meaningful: "mm/s", "N", "MPa". */
|
|
147
201
|
text-transform: none;
|
|
148
202
|
}
|
|
@@ -150,18 +204,18 @@
|
|
|
150
204
|
/* The current reading. Nothing turns an unfamiliar name into an obvious one
|
|
151
205
|
* faster than seeing what it says right now. */
|
|
152
206
|
.ac-varpick__live {
|
|
153
|
-
font-family: var(--
|
|
154
|
-
font-size:
|
|
155
|
-
color: var(--
|
|
207
|
+
font-family: var(--vp-mono);
|
|
208
|
+
font-size: var(--vp-font-xs);
|
|
209
|
+
color: var(--vp-success);
|
|
156
210
|
}
|
|
157
211
|
|
|
158
212
|
.ac-varpick__desc {
|
|
159
|
-
font-size:
|
|
160
|
-
color: var(--
|
|
213
|
+
font-size: var(--vp-font-sm);
|
|
214
|
+
color: var(--vp-ink-muted);
|
|
161
215
|
line-height: 1.35;
|
|
162
216
|
}
|
|
163
217
|
|
|
164
|
-
.ac-varpick__why { font-size:
|
|
165
|
-
.ac-varpick__note { font-size:
|
|
218
|
+
.ac-varpick__why { font-size: var(--vp-font-sm); color: var(--vp-warning); }
|
|
219
|
+
.ac-varpick__note { font-size: var(--vp-font-sm); color: var(--vp-info); }
|
|
166
220
|
|
|
167
221
|
.ac-varpick__foot { display: flex; justify-content: flex-end; gap: 0.5rem; }
|
package/src/hooks/index.ts
CHANGED
|
@@ -22,3 +22,7 @@ export type { UseGmVariablesResult, UseGmVariablesOptions, GmIpcInvoker } from '
|
|
|
22
22
|
// a TIS cycle column, and the one nothing used to check.
|
|
23
23
|
export { useSequenceProducers, collectStoredNames } from './useSequenceProducers';
|
|
24
24
|
export type { UseSequenceProducersResult, UseSequenceProducersOptions } from './useSequenceProducers';
|
|
25
|
+
export {
|
|
26
|
+
useMethodSequence, sequenceTopic, emptySequence, isSequenceShaped,
|
|
27
|
+
} from './useMethodSequence';
|
|
28
|
+
export type { MethodSequenceIo, UseMethodSequenceOptions } from './useMethodSequence';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useMethodSequence — read, write and delete the `.seq.json` half of a test
|
|
3
|
+
* method.
|
|
4
|
+
*
|
|
5
|
+
* ## One method, two files
|
|
6
|
+
*
|
|
7
|
+
* A sequence-backed test method is its `test_methods.json` schema entry PLUS
|
|
8
|
+
* `methods/<method_id>.seq.json`, the procedure the sequence engine runs. The
|
|
9
|
+
* filename is DERIVED from the method id and never stored, so the two halves
|
|
10
|
+
* cannot point at different things — see `autocore_tis::config::sequence_file`
|
|
11
|
+
* and `method_path()` in gen4_ac's `process_main.rs`, which spell the same
|
|
12
|
+
* derivation.
|
|
13
|
+
*
|
|
14
|
+
* Every method-lifecycle action therefore has to move both halves together:
|
|
15
|
+
*
|
|
16
|
+
* New — scaffold a blank procedure, or the method is unrunnable and
|
|
17
|
+
* Start refuses with "has no sequence on this machine".
|
|
18
|
+
* Duplicate — copy the procedure under the new id, or the copy silently runs
|
|
19
|
+
* nothing.
|
|
20
|
+
* Delete — remove the procedure, or an orphan file is left behind that a
|
|
21
|
+
* later method of the same name would inherit.
|
|
22
|
+
* Im/Export — carry the procedure, because a schema whose cycle columns
|
|
23
|
+
* nothing produces records blank rows forever.
|
|
24
|
+
*
|
|
25
|
+
* That last one is why import/export is a METHOD operation and not a sequence
|
|
26
|
+
* operation: half a method is not portable.
|
|
27
|
+
*
|
|
28
|
+
* The control program has no filesystem access, so all of this rides the
|
|
29
|
+
* datastore servelet over IPC, exactly as {@link useSequenceProducers} reads it.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import { useCallback, useContext, useMemo } from 'react';
|
|
33
|
+
import { EventEmitterContext } from '../core/EventEmitterContext';
|
|
34
|
+
import { MessageType } from '../hub/CommandMessage';
|
|
35
|
+
|
|
36
|
+
/** Where the sequence library lives in the datastore. Keep in step with
|
|
37
|
+
* `useSequenceProducers`, `autocore_tis::config::sequence_file`, and
|
|
38
|
+
* gen4_ac's `method_path()`. */
|
|
39
|
+
const METHOD_DIR = 'methods';
|
|
40
|
+
const METHOD_EXT = '.seq.json';
|
|
41
|
+
|
|
42
|
+
/** The datastore topic for a method's procedure. */
|
|
43
|
+
export function sequenceTopic(methodId: string): string {
|
|
44
|
+
return `datastore.${METHOD_DIR}/${methodId}${METHOD_EXT}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A blank procedure, shaped so `validateMethod` and the editor accept it. */
|
|
48
|
+
export function emptySequence(methodId: string): Record<string, unknown> {
|
|
49
|
+
return { name: methodId, format_version: 1, steps: [] };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Is this datastore payload plausibly a `.seq.json` method? */
|
|
53
|
+
export function isSequenceShaped(v: any): boolean {
|
|
54
|
+
return !!v && Array.isArray(v.steps);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface UseMethodSequenceOptions {
|
|
58
|
+
/** Override the IPC layer (tests, playground). */
|
|
59
|
+
invoker?: (topic: string, messageType: number, payload: object) => Promise<any>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface MethodSequenceIo {
|
|
63
|
+
/** The procedure for `methodId`, or null when there is none. */
|
|
64
|
+
read: (methodId: string) => Promise<any | null>;
|
|
65
|
+
/**
|
|
66
|
+
* Write `sequence` as the procedure for `methodId`.
|
|
67
|
+
*
|
|
68
|
+
* `name` is rewritten to `methodId` on the way out, unconditionally. The
|
|
69
|
+
* method id owns the identity; the `name` inside the file is a leftover
|
|
70
|
+
* from when the sequence library named itself, and a copy that keeps its
|
|
71
|
+
* source's name is a file claiming to be a method it is not.
|
|
72
|
+
*/
|
|
73
|
+
write: (methodId: string, sequence: any) => Promise<void>;
|
|
74
|
+
/** Remove the procedure for `methodId`. Resolves even if there was none. */
|
|
75
|
+
remove: (methodId: string) => Promise<void>;
|
|
76
|
+
/** Copy `from`'s procedure to `to`. No-op when `from` has none. */
|
|
77
|
+
copy: (from: string, to: string) => Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function useMethodSequence(options?: UseMethodSequenceOptions): MethodSequenceIo {
|
|
81
|
+
const ctx = useContext(EventEmitterContext);
|
|
82
|
+
const invoke = options?.invoker
|
|
83
|
+
?? ((topic: string, messageType: number, payload: object) =>
|
|
84
|
+
ctx.invoke(topic as any, messageType as any, payload as any));
|
|
85
|
+
|
|
86
|
+
const read = useCallback(async (methodId: string) => {
|
|
87
|
+
if (!methodId) return null;
|
|
88
|
+
try {
|
|
89
|
+
const resp: any = await invoke(sequenceTopic(methodId), MessageType.Read, {});
|
|
90
|
+
if (resp?.success === false) return null;
|
|
91
|
+
const seq = resp?.data ?? resp;
|
|
92
|
+
return isSequenceShaped(seq) ? seq : null;
|
|
93
|
+
} catch {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
97
|
+
}, [ctx]);
|
|
98
|
+
|
|
99
|
+
const write = useCallback(async (methodId: string, sequence: any) => {
|
|
100
|
+
const value = { ...(sequence ?? {}), name: methodId };
|
|
101
|
+
await invoke(sequenceTopic(methodId), MessageType.Write, {
|
|
102
|
+
value,
|
|
103
|
+
options: { create_dirs: true },
|
|
104
|
+
});
|
|
105
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
|
+
}, [ctx]);
|
|
107
|
+
|
|
108
|
+
const remove = useCallback(async (methodId: string) => {
|
|
109
|
+
try {
|
|
110
|
+
await invoke(sequenceTopic(methodId), MessageType.Control, { action: 'delete' });
|
|
111
|
+
} catch {
|
|
112
|
+
// A method with no procedure is a legitimate state (a control-backed
|
|
113
|
+
// method, or one that was never authored). Failing the delete of the
|
|
114
|
+
// schema because the file it never had could not be removed would
|
|
115
|
+
// leave the operator unable to finish.
|
|
116
|
+
}
|
|
117
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
118
|
+
}, [ctx]);
|
|
119
|
+
|
|
120
|
+
const copy = useCallback(async (from: string, to: string) => {
|
|
121
|
+
const seq = await read(from);
|
|
122
|
+
if (seq) await write(to, seq);
|
|
123
|
+
}, [read, write]);
|
|
124
|
+
|
|
125
|
+
return useMemo(() => ({ read, write, remove, copy }), [read, write, remove, copy]);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export default useMethodSequence;
|
|
@@ -31489,6 +31489,7 @@ var VariablePicker = ({ visible, catalog, title, hint, initialQuery, onCancel, o
|
|
|
31489
31489
|
visible,
|
|
31490
31490
|
onHide: onCancel,
|
|
31491
31491
|
footer,
|
|
31492
|
+
className: "ac-varpick",
|
|
31492
31493
|
style: {
|
|
31493
31494
|
width: "44rem",
|
|
31494
31495
|
maxWidth: "95vw"
|
|
@@ -31580,6 +31581,159 @@ var VariablePicker = ({ visible, catalog, title, hint, initialQuery, onCancel, o
|
|
|
31580
31581
|
});
|
|
31581
31582
|
};
|
|
31582
31583
|
//#endregion
|
|
31584
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
31585
|
+
/**
|
|
31586
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31587
|
+
*
|
|
31588
|
+
* This source code is licensed under the ISC license.
|
|
31589
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31590
|
+
*/
|
|
31591
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
31592
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
31593
|
+
}).join(" ").trim();
|
|
31594
|
+
//#endregion
|
|
31595
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
31596
|
+
/**
|
|
31597
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31598
|
+
*
|
|
31599
|
+
* This source code is licensed under the ISC license.
|
|
31600
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31601
|
+
*/
|
|
31602
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
31603
|
+
//#endregion
|
|
31604
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
31605
|
+
/**
|
|
31606
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31607
|
+
*
|
|
31608
|
+
* This source code is licensed under the ISC license.
|
|
31609
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31610
|
+
*/
|
|
31611
|
+
var toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
|
|
31612
|
+
//#endregion
|
|
31613
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
|
|
31614
|
+
/**
|
|
31615
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31616
|
+
*
|
|
31617
|
+
* This source code is licensed under the ISC license.
|
|
31618
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31619
|
+
*/
|
|
31620
|
+
var toPascalCase = (string) => {
|
|
31621
|
+
const camelCase = toCamelCase(string);
|
|
31622
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
31623
|
+
};
|
|
31624
|
+
//#endregion
|
|
31625
|
+
//#region node_modules/lucide-react/dist/esm/defaultAttributes.mjs
|
|
31626
|
+
/**
|
|
31627
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31628
|
+
*
|
|
31629
|
+
* This source code is licensed under the ISC license.
|
|
31630
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31631
|
+
*/
|
|
31632
|
+
var defaultAttributes = {
|
|
31633
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
31634
|
+
width: 24,
|
|
31635
|
+
height: 24,
|
|
31636
|
+
viewBox: "0 0 24 24",
|
|
31637
|
+
fill: "none",
|
|
31638
|
+
stroke: "currentColor",
|
|
31639
|
+
strokeWidth: 2,
|
|
31640
|
+
strokeLinecap: "round",
|
|
31641
|
+
strokeLinejoin: "round"
|
|
31642
|
+
};
|
|
31643
|
+
//#endregion
|
|
31644
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
31645
|
+
/**
|
|
31646
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31647
|
+
*
|
|
31648
|
+
* This source code is licensed under the ISC license.
|
|
31649
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31650
|
+
*/
|
|
31651
|
+
var hasA11yProp = (props) => {
|
|
31652
|
+
for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
|
|
31653
|
+
return false;
|
|
31654
|
+
};
|
|
31655
|
+
//#endregion
|
|
31656
|
+
//#region node_modules/lucide-react/dist/esm/context.mjs
|
|
31657
|
+
/**
|
|
31658
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31659
|
+
*
|
|
31660
|
+
* This source code is licensed under the ISC license.
|
|
31661
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31662
|
+
*/
|
|
31663
|
+
var LucideContext = (0, import_react.createContext)({});
|
|
31664
|
+
var useLucideContext = () => (0, import_react.useContext)(LucideContext);
|
|
31665
|
+
//#endregion
|
|
31666
|
+
//#region node_modules/lucide-react/dist/esm/Icon.mjs
|
|
31667
|
+
/**
|
|
31668
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31669
|
+
*
|
|
31670
|
+
* This source code is licensed under the ISC license.
|
|
31671
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31672
|
+
*/
|
|
31673
|
+
var Icon = (0, import_react.forwardRef)(({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
31674
|
+
const { size: contextSize = 24, strokeWidth: contextStrokeWidth = 2, absoluteStrokeWidth: contextAbsoluteStrokeWidth = false, color: contextColor = "currentColor", className: contextClass = "" } = useLucideContext() ?? {};
|
|
31675
|
+
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
31676
|
+
return (0, import_react.createElement)("svg", {
|
|
31677
|
+
ref,
|
|
31678
|
+
...defaultAttributes,
|
|
31679
|
+
width: size ?? contextSize ?? defaultAttributes.width,
|
|
31680
|
+
height: size ?? contextSize ?? defaultAttributes.height,
|
|
31681
|
+
stroke: color ?? contextColor,
|
|
31682
|
+
strokeWidth: calculatedStrokeWidth,
|
|
31683
|
+
className: mergeClasses("lucide", contextClass, className),
|
|
31684
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
31685
|
+
...rest
|
|
31686
|
+
}, [...iconNode.map(([tag, attrs]) => (0, import_react.createElement)(tag, attrs)), ...Array.isArray(children) ? children : [children]]);
|
|
31687
|
+
});
|
|
31688
|
+
//#endregion
|
|
31689
|
+
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
31690
|
+
/**
|
|
31691
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31692
|
+
*
|
|
31693
|
+
* This source code is licensed under the ISC license.
|
|
31694
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31695
|
+
*/
|
|
31696
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
31697
|
+
const Component = (0, import_react.forwardRef)(({ className, ...props }, ref) => (0, import_react.createElement)(Icon, {
|
|
31698
|
+
ref,
|
|
31699
|
+
iconNode,
|
|
31700
|
+
className: mergeClasses(`lucide-${toKebabCase(toPascalCase(iconName))}`, `lucide-${iconName}`, className),
|
|
31701
|
+
...props
|
|
31702
|
+
}));
|
|
31703
|
+
Component.displayName = toPascalCase(iconName);
|
|
31704
|
+
return Component;
|
|
31705
|
+
};
|
|
31706
|
+
/**
|
|
31707
|
+
* @license lucide-react v1.39.0 - ISC
|
|
31708
|
+
*
|
|
31709
|
+
* This source code is licensed under the ISC license.
|
|
31710
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31711
|
+
*/
|
|
31712
|
+
var Variable = createLucideIcon("variable", [
|
|
31713
|
+
["path", {
|
|
31714
|
+
d: "M8 21s-4-3-4-9 4-9 4-9",
|
|
31715
|
+
key: "uto9ud"
|
|
31716
|
+
}],
|
|
31717
|
+
["path", {
|
|
31718
|
+
d: "M16 3s4 3 4 9-4 9-4 9",
|
|
31719
|
+
key: "4w2vsq"
|
|
31720
|
+
}],
|
|
31721
|
+
["line", {
|
|
31722
|
+
x1: "15",
|
|
31723
|
+
x2: "9",
|
|
31724
|
+
y1: "9",
|
|
31725
|
+
y2: "15",
|
|
31726
|
+
key: "f7djnv"
|
|
31727
|
+
}],
|
|
31728
|
+
["line", {
|
|
31729
|
+
x1: "9",
|
|
31730
|
+
x2: "15",
|
|
31731
|
+
y1: "9",
|
|
31732
|
+
y2: "15",
|
|
31733
|
+
key: "1shsy8"
|
|
31734
|
+
}]
|
|
31735
|
+
]);
|
|
31736
|
+
//#endregion
|
|
31583
31737
|
//#region src/components/varpick/VariableInput.tsx
|
|
31584
31738
|
/**
|
|
31585
31739
|
* VariableInput — a text input with a picker button.
|
|
@@ -31638,14 +31792,17 @@ var VariableInput = ({ value, onChange, catalog, mode = "replace", pickerTitle,
|
|
|
31638
31792
|
}),
|
|
31639
31793
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
31640
31794
|
type: "button",
|
|
31641
|
-
icon: "pi pi-list",
|
|
31642
31795
|
"aria-label": ariaLabel,
|
|
31643
31796
|
disabled,
|
|
31644
31797
|
className: "p-button-outlined",
|
|
31645
31798
|
onClick: () => {
|
|
31646
31799
|
setBuilt(catalog());
|
|
31647
31800
|
setOpen(true);
|
|
31648
|
-
}
|
|
31801
|
+
},
|
|
31802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Variable, {
|
|
31803
|
+
size: 16,
|
|
31804
|
+
"aria-hidden": true
|
|
31805
|
+
})
|
|
31649
31806
|
}),
|
|
31650
31807
|
open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VariablePicker, {
|
|
31651
31808
|
visible: true,
|