@zeng-alt/vue-spel-query-builder 1.0.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Loyd Emslie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # Vue SpEL Query Builder
2
+
3
+ A Vue 3 component library for building SpEL (Spring Expression Language) expressions with a visual rule tree and code editor.
4
+
5
+ ## Features
6
+
7
+ - **SpEL Editor**: Code editor with syntax highlighting and autocomplete for SpEL expressions
8
+ - **Rule Tree**: Visual drag-and-drop interface for building complex boolean expressions
9
+ - **Vue 3**: Built with Vue 3 Composition API
10
+ - **TypeScript**: Full TypeScript support
11
+ - **Theme Support**: Light and dark theme support
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @zeng-alt/vue-spel-query-builder
17
+ # or
18
+ yarn add @zeng-alt/vue-spel-query-builder
19
+ # or
20
+ pnpm add @zeng-alt/vue-spel-query-builder
21
+ ```
22
+
23
+ ## Peer Dependencies
24
+
25
+ This package requires the following peer dependencies:
26
+
27
+ ```bash
28
+ npm install vue@^3.5.0 naive-ui@^2.44.0
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ### SpEL Editor
34
+
35
+ ```vue
36
+ <script setup lang="ts">
37
+ import { ref } from 'vue'
38
+ import { SpelEditor } from '@zeng-alt/vue-spel-query-builder'
39
+ import '@zeng-alt/vue-spel-query-builder/style.css'
40
+
41
+ const expression = ref('authentication.details.name')
42
+
43
+ const authentication = {
44
+ details: {
45
+ name: 'John',
46
+ email: 'john@example.com'
47
+ }
48
+ }
49
+
50
+ const principal = {
51
+ id: '12345'
52
+ }
53
+
54
+ const locals = {
55
+ user: {
56
+ name: 'John',
57
+ age: 25
58
+ }
59
+ }
60
+ </script>
61
+
62
+ <template>
63
+ <SpelEditor
64
+ v-model="expression"
65
+ :authentication="authentication"
66
+ :principal="principal"
67
+ :locals="locals"
68
+ :height="300"
69
+ theme="dark"
70
+ />
71
+ </template>
72
+ ```
73
+
74
+ ### Rule Tree
75
+
76
+ ```vue
77
+ <script setup lang="ts">
78
+ import { ref } from 'vue'
79
+ import { RuleTree, createEmptyGroup } from '@zeng-alt/vue-spel-query-builder'
80
+ import type { RuleNode } from '@zeng-alt/vue-spel-query-builder'
81
+ import '@zeng-alt/vue-spel-query-builder/style.css'
82
+
83
+ const ruleData = ref<RuleNode>(createEmptyGroup('and'))
84
+
85
+ const context = {
86
+ user: {
87
+ name: '张三',
88
+ age: 28,
89
+ email: 'zhangsan@example.com',
90
+ roles: ['admin', 'user'],
91
+ active: true
92
+ }
93
+ }
94
+ </script>
95
+
96
+ <template>
97
+ <RuleTree
98
+ v-model="ruleData"
99
+ :context="context"
100
+ :authentication="{ details: { name: 'John' } }"
101
+ :principal="{ id: '123' }"
102
+ :locals="context"
103
+ theme="dark"
104
+ />
105
+ </template>
106
+ ```
107
+
108
+ ## API
109
+
110
+ ### SpelEditor Props
111
+
112
+ | Prop | Type | Default | Description |
113
+ |------|------|---------|-------------|
114
+ | `modelValue` | `string` | `''` | SpEL expression value |
115
+ | `authentication` | `object` | `{}` | Authentication context |
116
+ | `principal` | `object` | `{}` | Principal context |
117
+ | `locals` | `object` | `{}` | Local variables (accessed with # prefix) |
118
+ | `height` | `number` | `300` | Editor height in pixels |
119
+ | `theme` | `'light' \| 'dark'` | `'light'` | Editor theme |
120
+ | `disabled` | `boolean` | `false` | Disable the editor |
121
+
122
+ ### RuleTree Props
123
+
124
+ | Prop | Type | Default | Description |
125
+ |------|------|---------|-------------|
126
+ | `modelValue` | `RuleNode` | - | Rule tree data |
127
+ | `context` | `object` | `{}` | Context for field options |
128
+ | `authentication` | `object` | `{}` | Authentication context |
129
+ | `principal` | `object` | `{}` | Principal context |
130
+ | `locals` | `object` | `{}` | Local variables |
131
+ | `disabled` | `boolean` | `false` | Disable the rule tree |
132
+ | `theme` | `'light' \| 'dark'` | `'light'` | Theme |
133
+
134
+ ### Utility Functions
135
+
136
+ ```typescript
137
+ import {
138
+ createEmptyGroup,
139
+ createEmptyCondition,
140
+ validateSpelExpression,
141
+ evalSpelExpression,
142
+ ruleNodeToSpel
143
+ } from '@zeng-alt/vue-spel-query-builder'
144
+
145
+ // Create an empty group
146
+ const group = createEmptyGroup('and') // or 'or'
147
+
148
+ // Create an empty condition
149
+ const condition = createEmptyCondition()
150
+
151
+ // Validate SpEL expression
152
+ const isValid = validateSpelExpression('user.name == "John"')
153
+
154
+ // Evaluate SpEL expression
155
+ const result = evalSpelExpression('user.age > 18', { user: { age: 25 } })
156
+
157
+ // Convert rule node to SpEL string
158
+ const spel = ruleNodeToSpel(ruleNode)
159
+ ```
160
+
161
+ ## License
162
+
163
+ MIT
@@ -0,0 +1,480 @@
1
+
2
+ .spel-editor-wrap[data-v-cb26e4f6] { display:flex; flex-direction:column;
3
+ }
4
+ .spel-cm-wrap[data-v-cb26e4f6] { flex:1; overflow:hidden;
5
+ }
6
+ [data-v-cb26e4f6] .cm-editor { height:100%;
7
+ }
8
+ [data-v-cb26e4f6] .cm-editor.cm-focused { outline:none;
9
+ }
10
+ [data-v-cb26e4f6] .cm-scroller { overflow:auto;
11
+ }
12
+ .spel-err-enter-active[data-v-cb26e4f6],.spel-err-leave-active[data-v-cb26e4f6] { transition:all .2s ease;
13
+ }
14
+ .spel-err-enter-from[data-v-cb26e4f6],.spel-err-leave-to[data-v-cb26e4f6] { opacity:0; transform:translateY(-4px);
15
+ }
16
+ .size--tiny[data-v-cb26e4f6] .cm-content { padding:8px !important;
17
+ }
18
+ .size--small[data-v-cb26e4f6] .cm-content { padding:12px !important;
19
+ }
20
+ .size--medium[data-v-cb26e4f6] .cm-content { padding:16px !important;
21
+ }
22
+ .size--large[data-v-cb26e4f6] .cm-content { padding:20px !important;
23
+ }
24
+ .size--tiny[data-v-cb26e4f6] .cm-gutters { min-width:36px;
25
+ }
26
+ .size--tiny[data-v-cb26e4f6] .cm-lineNumbers .cm-gutterElement { font-size:10px; padding:0 6px;
27
+ }
28
+ .size--small[data-v-cb26e4f6] .cm-gutters { min-width:48px;
29
+ }
30
+ .size--medium[data-v-cb26e4f6] .cm-gutters { min-width:52px;
31
+ }
32
+ .size--large[data-v-cb26e4f6] .cm-gutters { min-width:56px;
33
+ }
34
+
35
+ /* ─── Slide transition ─────────────────────────────────────────── */
36
+ .slide-down-enter-active[data-v-41249d75],
37
+ .slide-down-leave-active[data-v-41249d75] {
38
+ transition: max-height 0.2s ease, opacity 0.15s ease;
39
+ max-height: 400px;
40
+ overflow: hidden;
41
+ }
42
+ .slide-down-enter-from[data-v-41249d75],
43
+ .slide-down-leave-to[data-v-41249d75] {
44
+ max-height: 0;
45
+ opacity: 0;
46
+ }
47
+
48
+ /* ─── Condition card ───────────────────────────────────────────── */
49
+ .theme--light.is-idle[data-v-41249d75],
50
+ .theme--dark.is-idle[data-v-41249d75] {
51
+ background: var(--card-bg);
52
+ border-color: var(--card-border-idle);
53
+ }
54
+ .theme--light.is-idle[data-v-41249d75]:hover,
55
+ .theme--dark.is-idle[data-v-41249d75]:hover {
56
+ border-color: var(--card-border-hover);
57
+ }
58
+ .theme--light.is-editing[data-v-41249d75],
59
+ .theme--dark.is-editing[data-v-41249d75] {
60
+ background: var(--card-bg);
61
+ border-color: var(--card-border-editing);
62
+ box-shadow: var(--card-shadow-editing);
63
+ }
64
+
65
+ /* ─── Icon & text helpers ──────────────────────────────────────── */
66
+ .icon-muted[data-v-41249d75] { color: var(--icon-muted);
67
+ }
68
+ .text-placeholder[data-v-41249d75] { color: var(--text-placeholder);
69
+ }
70
+ .text-secondary[data-v-41249d75] { color: var(--text-secondary);
71
+ }
72
+
73
+ /* ─── Expression chips ─────────────────────────────────────────── */
74
+ .expr-chip[data-v-41249d75] {
75
+ display: inline-flex;
76
+ align-items: center;
77
+ padding: 1px 6px;
78
+ border-radius: 4px;
79
+ white-space: nowrap;
80
+ overflow: hidden;
81
+ text-overflow: ellipsis;
82
+ }
83
+ .expr-chip--field[data-v-41249d75] {
84
+ background: var(--expr-field-bg);
85
+ color: var(--expr-field-fg);
86
+ border: 1px solid var(--expr-field-border);
87
+ }
88
+ .expr-chip--op[data-v-41249d75] {
89
+ background: var(--expr-op-bg);
90
+ color: var(--expr-op-fg);
91
+ border: 1px solid var(--expr-op-border);
92
+ }
93
+ .expr-chip--val[data-v-41249d75] {
94
+ background: var(--expr-val-bg);
95
+ color: var(--expr-val-fg);
96
+ border: 1px solid var(--expr-val-border);
97
+ }
98
+
99
+ /* ─── Expression block ─────────────────────────────────────────── */
100
+ .expr-block[data-v-41249d75] {
101
+ display: flex;
102
+ flex-direction: column;
103
+ gap: 4px;
104
+ }
105
+ .expr-block__label[data-v-41249d75] {
106
+ font-size: 10px;
107
+ color: var(--expr-block-label);
108
+ padding-left: 2px;
109
+ letter-spacing: 0.3px;
110
+ }
111
+ .expr-block__body[data-v-41249d75] {
112
+ display: flex;
113
+ align-items: center;
114
+ gap: 4px;
115
+ flex-wrap: wrap;
116
+ padding: 5px 8px;
117
+ background: var(--expr-block-body-bg);
118
+ border: 1px solid var(--expr-block-body-border);
119
+ border-radius: 6px;
120
+ min-height: 36px;
121
+ }
122
+
123
+ /* ─── Edit panel ───────────────────────────────────────────────── */
124
+ .edit-panel[data-v-41249d75] {
125
+ background: var(--edit-panel-bg);
126
+ border-color: var(--edit-panel-border);
127
+ }
128
+
129
+ /* ─── Preview block ────────────────────────────────────────────── */
130
+ .preview-block[data-v-41249d75] {
131
+ background: var(--preview-bg);
132
+ border: 1px solid var(--preview-border);
133
+ }
134
+ .preview-code[data-v-41249d75] {
135
+ color: var(--preview-text);
136
+ }
137
+ .preview-left[data-v-41249d75] {
138
+ color: var(--preview-left);
139
+ }
140
+ .preview-op[data-v-41249d75] {
141
+ color: var(--preview-op);
142
+ }
143
+ .preview-right[data-v-41249d75] {
144
+ color: var(--preview-right);
145
+ }
146
+
147
+ /* ─── Operator toggle ──────────────────────────────────────────── */
148
+ .op-toggle[data-v-41249d75] {
149
+ display: inline-flex;
150
+ border: 1px solid var(--op-toggle-border);
151
+ border-radius: 5px;
152
+ overflow: hidden;
153
+ box-shadow: var(--op-toggle-shadow);
154
+ }
155
+ .op-toggle__btn[data-v-41249d75] {
156
+ padding: 0 12px;
157
+ height: 26px;
158
+ font-size: 12px;
159
+ font-weight: 600;
160
+ border: none;
161
+ border-right: 1px solid var(--op-toggle-btn-border);
162
+ background: var(--op-toggle-btn-bg);
163
+ color: var(--op-toggle-btn-fg);
164
+ cursor: pointer;
165
+ transition: background 0.1s, color 0.1s;
166
+ }
167
+ .op-toggle__btn[data-v-41249d75]:last-child { border-right: none;
168
+ }
169
+ .op-toggle__btn[data-v-41249d75]:disabled { cursor: not-allowed; opacity: 0.5;
170
+ }
171
+ .op-toggle__btn--off[data-v-41249d75]:not(:disabled):hover {
172
+ background: var(--op-toggle-btn-hover-bg);
173
+ color: var(--op-toggle-btn-hover-fg);
174
+ }
175
+ .op-toggle__btn--and[data-v-41249d75]:not(.op-toggle__btn--off) {
176
+ background: var(--op-toggle-and-bg);
177
+ color: var(--op-toggle-active-fg);
178
+ }
179
+ .op-toggle__btn--or[data-v-41249d75]:not(.op-toggle__btn--off) {
180
+ background: var(--op-toggle-or-bg);
181
+ color: var(--op-toggle-active-fg);
182
+ }
183
+ .op-toggle__btn--not[data-v-41249d75]:not(.op-toggle__btn--off) {
184
+ background: var(--op-toggle-not-bg);
185
+ color: var(--op-toggle-active-fg);
186
+ }
187
+
188
+ /* ─── Connectors & lines ───────────────────────────────────────── */
189
+ .group-vline[data-v-41249d75] {
190
+ position: absolute;
191
+ left: 7px;
192
+ top: 0;
193
+ bottom: 12px;
194
+ width: 1px;
195
+ background: var(--connector-color);
196
+ }
197
+ .group-hline[data-v-41249d75] {
198
+ position: absolute;
199
+ left: -13px;
200
+ top: 17px;
201
+ width: 13px;
202
+ height: 1px;
203
+ background: var(--connector-color);
204
+ }
205
+ .group-connector[data-v-41249d75] {
206
+ position: absolute;
207
+ left: -9px;
208
+ top: 17px;
209
+ width: 9px;
210
+ height: 1px;
211
+ background: var(--connector-color);
212
+ }
213
+
214
+ /* ─── Empty state ──────────────────────────────────────────────── */
215
+ .empty-state[data-v-41249d75] {
216
+ border-color: var(--empty-border);
217
+ color: var(--empty-fg);
218
+ }
219
+
220
+ /* ─── Divider ──────────────────────────────────────────────────── */
221
+ .divider[data-v-41249d75] {
222
+ background: var(--divider-bg);
223
+ }
224
+
225
+ /* ─── Action buttons ───────────────────────────────────────────── */
226
+ .action-btn[data-v-41249d75] {
227
+ background: #7c3aed !important;
228
+ border-color: #7c3aed !important;
229
+ color: #ffffff !important;
230
+
231
+ transition:
232
+ background 0.2s ease,
233
+ border-color 0.2s ease,
234
+ box-shadow 0.2s ease;
235
+ }
236
+ .action-btn[data-v-41249d75]:hover {
237
+ background: #6d28d9 !important;
238
+ border-color: #6d28d9 !important;
239
+
240
+ box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28);
241
+ }
242
+ .action-btn[data-v-41249d75]:active {
243
+ background: #5b21b6 !important;
244
+ border-color: #5b21b6 !important;
245
+ }
246
+ .action-btn[data-v-41249d75]:disabled {
247
+ opacity: 0.5 !important;
248
+ box-shadow: none !important;
249
+ }
250
+
251
+ /* ─── Size variants ───────────────────────────────────────────── */
252
+ /* tiny */
253
+ .size--tiny .group\/row[data-v-41249d75] { min-height: 28px; padding-left: 6px; padding-right: 6px;
254
+ }
255
+ .size--tiny .edit-panel[data-v-41249d75] { padding: 6px 8px;
256
+ }
257
+ .size--tiny .expr-block__body[data-v-41249d75] { padding: 3px 6px; min-height: 28px;
258
+ }
259
+ .size--tiny .expr-block__label[data-v-41249d75] { font-size: 9px;
260
+ }
261
+ .size--tiny .expr-chip[data-v-41249d75] { padding: 0 4px; font-size: 10px !important;
262
+ }
263
+ .size--tiny .op-toggle__btn[data-v-41249d75] { padding: 0 8px; height: 22px; font-size: 11px;
264
+ }
265
+ .size--tiny .action-btn[data-v-41249d75] { font-size: 11px !important;
266
+ }
267
+ .size--tiny .preview-block[data-v-41249d75] { padding: 4px 6px;
268
+ }
269
+ .size--tiny .preview-code[data-v-41249d75] { font-size: 10px !important;
270
+ }
271
+ .size--tiny .empty-state[data-v-41249d75] { padding: 12px 0;
272
+ }
273
+ .size--tiny .empty-state p[data-v-41249d75] { font-size: 10px;
274
+ }
275
+
276
+ /* small (default) */
277
+ .size--small .group\/row[data-v-41249d75] { min-height: 34px; padding-left: 10px; padding-right: 10px;
278
+ }
279
+ .size--small .edit-panel[data-v-41249d75] { padding: 12px;
280
+ }
281
+ .size--small .expr-block__body[data-v-41249d75] { padding: 5px 8px; min-height: 36px;
282
+ }
283
+ .size--small .expr-block__label[data-v-41249d75] { font-size: 10px;
284
+ }
285
+ .size--small .expr-chip[data-v-41249d75] { padding: 1px 6px; font-size: 11px !important;
286
+ }
287
+ .size--small .op-toggle__btn[data-v-41249d75] { padding: 0 12px; height: 26px; font-size: 12px;
288
+ }
289
+ .size--small .preview-block[data-v-41249d75] { padding: 6px 8px;
290
+ }
291
+ .size--small .preview-code[data-v-41249d75] { font-size: 11px !important;
292
+ }
293
+ .size--small .empty-state[data-v-41249d75] { padding: 24px 0;
294
+ }
295
+
296
+ /* medium */
297
+ .size--medium .group\/row[data-v-41249d75] { min-height: 40px; padding-left: 14px; padding-right: 14px;
298
+ }
299
+ .size--medium .edit-panel[data-v-41249d75] { padding: 16px;
300
+ }
301
+ .size--medium .expr-block__body[data-v-41249d75] { padding: 8px 12px; min-height: 44px;
302
+ }
303
+ .size--medium .expr-block__label[data-v-41249d75] { font-size: 11px;
304
+ }
305
+ .size--medium .expr-chip[data-v-41249d75] { padding: 2px 8px; font-size: 12px !important;
306
+ }
307
+ .size--medium .op-toggle__btn[data-v-41249d75] { padding: 0 16px; height: 30px; font-size: 13px;
308
+ }
309
+ .size--medium .preview-block[data-v-41249d75] { padding: 8px 12px;
310
+ }
311
+ .size--medium .preview-code[data-v-41249d75] { font-size: 12px !important;
312
+ }
313
+ .size--medium .empty-state[data-v-41249d75] { padding: 32px 0;
314
+ }
315
+
316
+ /* large */
317
+ .size--large .group\/row[data-v-41249d75] { min-height: 48px; padding-left: 18px; padding-right: 18px;
318
+ }
319
+ .size--large .edit-panel[data-v-41249d75] { padding: 20px;
320
+ }
321
+ .size--large .expr-block__body[data-v-41249d75] { padding: 10px 16px; min-height: 52px;
322
+ }
323
+ .size--large .expr-block__label[data-v-41249d75] { font-size: 12px;
324
+ }
325
+ .size--large .expr-chip[data-v-41249d75] { padding: 3px 10px; font-size: 13px !important;
326
+ }
327
+ .size--large .op-toggle__btn[data-v-41249d75] { padding: 0 20px; height: 34px; font-size: 14px;
328
+ }
329
+ .size--large .preview-block[data-v-41249d75] { padding: 10px 16px;
330
+ }
331
+ .size--large .preview-code[data-v-41249d75] { font-size: 13px !important;
332
+ }
333
+ .size--large .empty-state[data-v-41249d75] { padding: 40px 0;
334
+ }
335
+
336
+ /* ===================================================================
337
+ Container
338
+ =================================================================== */
339
+ .rule-tree-container[data-v-6f5f2d8f] {
340
+ padding: 16px;
341
+ border-radius: 8px;
342
+ min-height: 200px;
343
+ transition: background 0.2s, border-color 0.2s;
344
+ }
345
+
346
+ /* ===================================================================
347
+ CSS Custom Properties — Light & Dark themes
348
+ Defined at the root container so all descendants inherit the correct values.
349
+ =================================================================== */
350
+ .rule-tree-container.theme--light[data-v-6f5f2d8f] {
351
+ background: #f8fafc;
352
+
353
+ --card-bg: #ffffff;
354
+ --card-border-idle: #e5e7eb;
355
+ --card-border-hover: #d1d5db;
356
+ --card-border-editing: #60a5fa;
357
+ --card-shadow-editing: 0 1px 3px rgba(0,0,0,.08);
358
+
359
+ --edit-panel-bg: rgba(249, 250, 251, 0.8);
360
+ --edit-panel-border: #f3f4f6;
361
+
362
+ --preview-bg: #ffffff;
363
+ --preview-border: #f3f4f6;
364
+ --preview-text: #6b7280;
365
+ --preview-left: #2563eb;
366
+ --preview-op: #4b5563;
367
+ --preview-right: #065f46;
368
+
369
+ --text-primary: #1f2937;
370
+ --text-secondary: #6b7280;
371
+ --text-placeholder: #9ca3af;
372
+ --text-muted: #d1d5db;
373
+ --icon-muted: #9ca3af;
374
+
375
+ --expr-field-bg: #eff6ff;
376
+ --expr-field-fg: #1d4ed8;
377
+ --expr-field-border: #bfdbfe;
378
+
379
+ --expr-op-bg: #f3f4f6;
380
+ --expr-op-fg: #1f2937;
381
+ --expr-op-border: #d1d5db;
382
+
383
+ --expr-val-bg: #ecfdf5;
384
+ --expr-val-fg: #065f46;
385
+ --expr-val-border: #a7f3d0;
386
+
387
+ --expr-block-body-bg: #ffffff;
388
+ --expr-block-body-border: #e5e7eb;
389
+ --expr-block-label: #9ca3af;
390
+
391
+ --op-toggle-border: #d1d5db;
392
+ --op-toggle-shadow: 0 1px 2px rgba(0,0,0,.04);
393
+ --op-toggle-btn-bg: #ffffff;
394
+ --op-toggle-btn-fg: #6b7280;
395
+ --op-toggle-btn-border: #e5e7eb;
396
+ --op-toggle-btn-hover-bg: #f9fafb;
397
+ --op-toggle-btn-hover-fg: #374151;
398
+ --op-toggle-and-bg: #1d4ed8;
399
+ --op-toggle-or-bg: #d97706;
400
+ --op-toggle-not-bg: #dc2626;
401
+ --op-toggle-active-fg: #ffffff;
402
+
403
+ --connector-color: #e5e7eb;
404
+
405
+ --empty-border: #e5e7eb;
406
+ --empty-fg: #9ca3af;
407
+
408
+ --divider-bg: #e5e7eb;
409
+ }
410
+ .rule-tree-container.theme--dark[data-v-6f5f2d8f] {
411
+ background: #1a1a2e;
412
+
413
+ --card-bg: #1e1e32;
414
+ --card-border-idle: #3e3e5c;
415
+ --card-border-hover: #5c5c7a;
416
+ --card-border-editing: #60a5fa;
417
+ --card-shadow-editing: 0 1px 6px rgba(96, 165, 250, 0.15);
418
+
419
+ --edit-panel-bg: rgba(30, 30, 50, 0.85);
420
+ --edit-panel-border: #3e3e5c;
421
+
422
+ --preview-bg: #252545;
423
+ --preview-border: #3e3e5c;
424
+ --preview-text: #9ca3af;
425
+ --preview-left: #93c5fd;
426
+ --preview-op: #d1d5db;
427
+ --preview-right: #6ee7b7;
428
+
429
+ --text-primary: #e5e5e5;
430
+ --text-secondary: #9ca3af;
431
+ --text-placeholder: #6b7280;
432
+ --text-muted: #4b5563;
433
+ --icon-muted: #6b7280;
434
+
435
+ --expr-field-bg: rgba(59, 130, 246, 0.15);
436
+ --expr-field-fg: #93c5fd;
437
+ --expr-field-border: rgba(59, 130, 246, 0.3);
438
+
439
+ --expr-op-bg: rgba(107, 114, 128, 0.2);
440
+ --expr-op-fg: #d1d5db;
441
+ --expr-op-border: rgba(107, 114, 128, 0.3);
442
+
443
+ --expr-val-bg: rgba(16, 185, 129, 0.15);
444
+ --expr-val-fg: #6ee7b7;
445
+ --expr-val-border: rgba(16, 185, 129, 0.3);
446
+
447
+ --expr-block-body-bg: #252545;
448
+ --expr-block-body-border: #3e3e5c;
449
+ --expr-block-label: #6b7280;
450
+
451
+ --op-toggle-border: #3e3e5c;
452
+ --op-toggle-shadow: 0 1px 2px rgba(0,0,0,.2);
453
+ --op-toggle-btn-bg: #252545;
454
+ --op-toggle-btn-fg: #9ca3af;
455
+ --op-toggle-btn-border: #3e3e5c;
456
+ --op-toggle-btn-hover-bg: #2e2e52;
457
+ --op-toggle-btn-hover-fg: #e5e5e5;
458
+ --op-toggle-and-bg: #2563eb;
459
+ --op-toggle-or-bg: #d97706;
460
+ --op-toggle-not-bg: #dc2626;
461
+ --op-toggle-active-fg: #ffffff;
462
+
463
+ --connector-color: #3e3e5c;
464
+
465
+ --empty-border: #3e3e5c;
466
+ --empty-fg: #6b7280;
467
+
468
+ --divider-bg: #3e3e5c;
469
+ }
470
+
471
+ /* ─── Size variants ────────────────────────────────────────────── */
472
+ .rule-tree-container.size--tiny[data-v-6f5f2d8f] { padding: 8px;
473
+ }
474
+ .rule-tree-container.size--small[data-v-6f5f2d8f] { padding: 12px;
475
+ }
476
+ .rule-tree-container.size--medium[data-v-6f5f2d8f] { padding: 20px;
477
+ }
478
+ .rule-tree-container.size--large[data-v-6f5f2d8f] { padding: 28px;
479
+ }
480
+ /*$vite$:1*/
Binary file