@inf-monkeys-tech/monkeys-design 0.4.50 → 0.4.52

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.
Files changed (49) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +335 -335
  3. package/dist/components/base/index.js +1 -1
  4. package/dist/components/base/index.js.map +1 -1
  5. package/dist/components/base/index.mjs +1 -1
  6. package/dist/components/base/index.mjs.map +1 -1
  7. package/dist/components/data-explorer/index.js.map +1 -1
  8. package/dist/components/data-explorer/index.mjs.map +1 -1
  9. package/dist/components/layout/index.js +5 -5
  10. package/dist/components/layout/index.js.map +1 -1
  11. package/dist/components/layout/index.mjs +5 -5
  12. package/dist/components/layout/index.mjs.map +1 -1
  13. package/dist/components/login/index.js.map +1 -1
  14. package/dist/components/login/index.mjs.map +1 -1
  15. package/dist/components/toast/index.js.map +1 -1
  16. package/dist/components/toast/index.mjs.map +1 -1
  17. package/dist/components/toolbar/index.js.map +1 -1
  18. package/dist/components/toolbar/index.mjs.map +1 -1
  19. package/dist/components/workbench/index.js +1 -1
  20. package/dist/components/workbench/index.js.map +1 -1
  21. package/dist/components/workbench/index.mjs +1 -1
  22. package/dist/components/workbench/index.mjs.map +1 -1
  23. package/dist/icons/oauth/index.js.map +1 -1
  24. package/dist/icons/oauth/index.mjs.map +1 -1
  25. package/dist/index.js +5 -5
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +5 -5
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/palette/index.js.map +1 -1
  30. package/dist/palette/index.mjs.map +1 -1
  31. package/dist/registry/index.js.map +1 -1
  32. package/dist/registry/index.mjs.map +1 -1
  33. package/dist/styles/global.scss +21 -21
  34. package/dist/styles/login-page.scss +518 -518
  35. package/dist/styles/workflow-board.scss +440 -440
  36. package/dist/styles/workflow-nodes.css +340 -340
  37. package/dist/theme-system/index.js +1 -1
  38. package/dist/theme-system/index.js.map +1 -1
  39. package/dist/theme-system/index.mjs +1 -1
  40. package/dist/theme-system/index.mjs.map +1 -1
  41. package/dist/themes/artist/index.js.map +1 -1
  42. package/dist/themes/artist/index.mjs.map +1 -1
  43. package/dist/themes/bsd/index.js.map +1 -1
  44. package/dist/themes/bsd/index.mjs.map +1 -1
  45. package/dist/themes/concept/index.js.map +1 -1
  46. package/dist/themes/concept/index.mjs.map +1 -1
  47. package/dist/themes/default/index.js.map +1 -1
  48. package/dist/themes/default/index.mjs.map +1 -1
  49. package/package.json +151 -151
@@ -1,440 +1,440 @@
1
- /**
2
- * Monkeys UI Workflow Board Styles
3
- *
4
- * Contains styles for the workflow editor/canvas area including:
5
- * - tldraw theme CSS variables (light/dark mode)
6
- * - Vertical toolbar component
7
- * - Mini tools toolbar component
8
- *
9
- * Requirements for the consuming app:
10
- * - The monkeys color scale (--monkeys-* CSS vars set by setTailwindTheme from the palette module)
11
- * - Tailwind CSS (for .dark class dark mode switching)
12
- */
13
-
14
- // ============================================================
15
- // tldraw Theme: CSS variable overrides for light / dark mode
16
- // ============================================================
17
-
18
- .tl-theme__light * {
19
- color: revert;
20
- --color-selected: rgb(var(--monkeys-500));
21
- --color-panel: #ffffff;
22
- --color-panel-border: rgba(0, 0, 0, 0.1);
23
- --color-text: #000000;
24
- --color-hover: #f2f3f5;
25
- --color-selected-text: #ffffff;
26
- --shadow-l: 0 2px 8px rgba(0, 0, 0, 0.1);
27
- }
28
-
29
- .tl-theme__dark {
30
- color: revert;
31
- --color-selected: rgb(var(--monkeys-500));
32
- --color-panel: #151a23;
33
- --color-panel-border: rgba(255, 255, 255, 0.08);
34
- --color-text: #e0e0e0;
35
- --color-hover: rgba(255, 255, 255, 0.06);
36
- --color-selected-text: #ffffff;
37
- --shadow-l: 0 2px 8px rgba(0, 0, 0, 0.4);
38
-
39
- /* tldraw 画布主题微调 */
40
- --tl-color-background: hsl(222, 18%, 11.5%);
41
- /* 网格再淡一点,避免"脏/颗粒感" */
42
- --tl-color-grid: hsla(220, 12%, 82%, 0.06);
43
- --tl-color-selected: hsl(258, 89%, 66%);
44
- /* 更接近 #8B5CF6 */
45
- --tl-color-selection-stroke: hsl(258, 89%, 66%);
46
- --tl-color-selection-fill: hsla(258, 89%, 66%, 0.18);
47
- --tl-color-brush-fill: hsla(220, 10%, 80%, 0.05);
48
- --tl-color-brush-stroke: hsla(220, 10%, 80%, 0.14);
49
- }
50
-
51
- /* 通用 dark 类支持(适配 Tailwind 等) */
52
- .dark {
53
- --color-panel: #151a23;
54
- --color-panel-border: rgba(255, 255, 255, 0.08);
55
- --color-text: #e0e0e0;
56
- --color-hover: rgba(255, 255, 255, 0.06);
57
- --color-selected-text: #ffffff;
58
- --shadow-l: 0 2px 8px rgba(0, 0, 0, 0.4);
59
-
60
- /* tldraw 画布主题微调 */
61
- --tl-color-background: hsl(222, 18%, 11.5%);
62
- --tl-color-grid: hsla(220, 12%, 82%, 0.06);
63
- --tl-color-selected: hsl(258, 89%, 66%);
64
- --tl-color-selection-stroke: hsl(258, 89%, 66%);
65
- --tl-color-selection-fill: hsla(258, 89%, 66%, 0.18);
66
- --tl-color-brush-fill: hsla(220, 10%, 80%, 0.05);
67
- --tl-color-brush-stroke: hsla(220, 10%, 80%, 0.14);
68
- }
69
-
70
- // ============================================================
71
- // Vertical Toolbar
72
- // ============================================================
73
-
74
- .vertical-toolbar {
75
- z-index: 9999;
76
- pointer-events: auto;
77
-
78
- /* 左侧位置样式 */
79
- &.vertical-toolbar--left {
80
- .custom-toolbar {
81
- flex-direction: column;
82
-
83
- .dropdown-menu {
84
- left: 100%;
85
- bottom: auto;
86
- top: 0;
87
- margin-bottom: 0;
88
- margin-left: 15px;
89
- }
90
- }
91
- }
92
-
93
- .custom-toolbar {
94
- display: flex;
95
- flex-direction: row;
96
- gap: 4px;
97
- padding: 8px;
98
- border-radius: 12px;
99
- background: var(--color-panel, #ffffff);
100
- box-shadow: var(--shadow-l, 0 2px 8px rgba(0, 0, 0, 0.1));
101
- border: 1px solid var(--color-panel-border, rgba(0, 0, 0, 0.1));
102
- backdrop-filter: blur(8px);
103
-
104
- .tool-button {
105
- width: 40px;
106
- height: 40px;
107
- display: flex;
108
- align-items: center;
109
- justify-content: center;
110
- border-radius: 8px;
111
- border: 1px solid transparent;
112
- background: transparent;
113
- color: var(--color-text);
114
- transition: all 0.15s ease;
115
- cursor: pointer;
116
- outline: none;
117
- pointer-events: auto;
118
- z-index: 10000;
119
- position: relative;
120
-
121
- &:hover {
122
- background: #f2f3f5;
123
- border-color: transparent;
124
- transform: none;
125
- }
126
-
127
- /* 深色外观覆盖:使用站点主题标记,避免误判系统偏好导致浅色也变化 */
128
- /* 1) data-theme='dark' 容器 */
129
- :root[data-theme='dark'] & {
130
- &:hover {
131
- background: #2b2f33;
132
- }
133
- }
134
-
135
- /* 2) 常见 .dark 容器 */
136
- .dark & {
137
- &:hover {
138
- background: #2b2f33;
139
- }
140
- }
141
-
142
- &:active {
143
- transform: scale(0.95);
144
- }
145
-
146
- &.selected {
147
- background: var(--color-selected);
148
- border-color: transparent;
149
- color: #fff !important;
150
- box-shadow: none;
151
-
152
- svg {
153
- color: #fff !important;
154
- fill: currentColor;
155
- stroke: currentColor;
156
- }
157
- }
158
-
159
- /* 只约束按钮"直接子元素"的 svg 尺寸,避免影响 MonkeysIcon / TldrawUiIcon 等内部 svg 导致不居中 */
160
- > svg {
161
- width: 18px;
162
- height: 18px;
163
- pointer-events: none;
164
- }
165
-
166
- /* 工具栏里使用 MonkeysIcon 的按钮(palette / workflow / agent 等)统一到 18px 视觉尺寸 */
167
- .toolbar-monkeys-icon {
168
- width: 18px !important;
169
- height: 18px !important;
170
- line-height: 0;
171
-
172
- /* 内部的 lucide/custom icon wrapper(size-*)强制为 18px */
173
- .size-3,
174
- .size-4,
175
- .size-5,
176
- .size-6,
177
- .size-7 {
178
- width: 18px !important;
179
- height: 18px !important;
180
- }
181
-
182
- svg {
183
- width: 18px !important;
184
- height: 18px !important;
185
- display: block;
186
- }
187
- }
188
- }
189
-
190
- .tool-group {
191
- position: relative;
192
-
193
- &.menu-open .caret {
194
- animation: caret-pop 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
195
- filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
196
- transform-origin: 100% 100%;
197
- }
198
-
199
- &:hover .caret {
200
- transform: translate(-0.5px, -0.5px) scale(1.05);
201
- filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
202
- }
203
- }
204
-
205
- .caret {
206
- position: absolute;
207
- right: 4px;
208
- top: 4px;
209
- width: 5px;
210
- height: 5px;
211
- background: currentColor;
212
- clip-path: polygon(100% 0, 0 0, 100% 100%);
213
- box-shadow: 0 0 0 1px var(--color-panel);
214
- pointer-events: none;
215
- }
216
-
217
- @keyframes caret-pop {
218
- 0% {
219
- transform: translate(0, 0) scale(0.85) rotate(0.0001deg);
220
- opacity: 0.6;
221
- }
222
-
223
- 60% {
224
- transform: translate(-1px, -1px) scale(1.15) rotate(0.0001deg);
225
- opacity: 1;
226
- }
227
-
228
- 100% {
229
- transform: translate(0, 0) scale(1) rotate(0.0001deg);
230
- opacity: 1;
231
- }
232
- }
233
-
234
- /* 命中区域:悬停或点击展开菜单 */
235
- .caret-hit {
236
- position: absolute;
237
- right: 2px;
238
- top: 2px;
239
- width: 16px;
240
- height: 12px;
241
- cursor: default;
242
- }
243
-
244
- .tool-button {
245
- position: relative;
246
- }
247
-
248
- .dropdown-menu {
249
- position: absolute;
250
- left: 0;
251
- bottom: 100%;
252
- margin-bottom: 15px;
253
- min-width: 140px;
254
- display: flex;
255
- flex-direction: column;
256
- gap: 2px;
257
- padding: 6px;
258
- border-radius: 8px;
259
- background: var(--color-panel, #ffffff);
260
- border: 1px solid var(--color-panel-border, rgba(0, 0, 0, 0.1));
261
- box-shadow: var(--shadow-l, 0 2px 8px rgba(0, 0, 0, 0.1));
262
- z-index: 10001;
263
- max-height: 256px;
264
- overflow-y: auto;
265
- }
266
-
267
- .dropdown-item {
268
- display: flex;
269
- align-items: center;
270
- justify-content: center;
271
- gap: 0;
272
- padding: 8px;
273
- border-radius: 6px;
274
- cursor: pointer;
275
- color: var(--color-text);
276
-
277
- &:hover {
278
- background: var(--color-hover);
279
- }
280
-
281
- &.active {
282
- background: var(--color-selected);
283
- color: var(--color-selected-text);
284
- }
285
-
286
- svg {
287
- width: 20px;
288
- height: 20px;
289
- }
290
- }
291
-
292
- /* workflow 下拉菜单:图标更小一些 */
293
- .dropdown-menu.workflow-list {
294
- .dropdown-item {
295
- justify-content: flex-start;
296
- gap: 4px;
297
-
298
- [data-alt='icon'] {
299
- transform: translateY(-3px);
300
- flex-shrink: 0;
301
- }
302
-
303
- svg {
304
- width: 16px;
305
- height: 16px;
306
- }
307
- }
308
- }
309
-
310
- /* 形状菜单改为四列网格,仅展示图标 */
311
- .shapes-grid {
312
- display: grid;
313
- grid-template-columns: repeat(4, 1fr);
314
- grid-auto-rows: 40px;
315
- gap: 4px;
316
- min-width: 200px;
317
- padding: 8px;
318
- height: 276px;
319
- /* 6*40 + 5*4 + 16(padding) */
320
- max-height: none;
321
- overflow-y: hidden;
322
- }
323
- }
324
- }
325
-
326
- // ============================================================
327
- // Mini Tools Toolbar
328
- // ============================================================
329
-
330
- .mini-tools-toolbar {
331
- position: fixed !important;
332
- left: var(--toolbar-left, 16px) !important;
333
- top: calc(72px + var(--global-spacing) * 3.5 + 10px) !important;
334
- bottom: calc(var(--global-spacing) * 3.5 + 10px) !important;
335
- display: flex !important;
336
- align-items: center !important;
337
- justify-content: flex-start !important;
338
- z-index: 9999;
339
- pointer-events: auto;
340
-
341
- .custom-toolbar {
342
- display: flex;
343
- flex-direction: column;
344
- gap: 8px;
345
- padding: 8px;
346
- border-radius: 12px;
347
- background: var(--color-panel, #ffffff);
348
- box-shadow: var(--shadow-l, 0 2px 8px rgba(0, 0, 0, 0.1));
349
- border: 1px solid var(--color-panel-border, rgba(0, 0, 0, 0.1));
350
- backdrop-filter: blur(8px);
351
-
352
- .tool-button {
353
- min-width: 40px;
354
- height: 40px;
355
- display: flex;
356
- flex-direction: row;
357
- align-items: center;
358
- justify-content: flex-start;
359
- gap: 8px;
360
- padding: 0 12px;
361
- border-radius: 8px;
362
- border: 1px solid transparent;
363
- background: transparent;
364
- color: var(--color-text);
365
- transition: all 0.15s ease;
366
- cursor: pointer;
367
- outline: none;
368
- pointer-events: auto;
369
- z-index: 10000;
370
- position: relative;
371
- white-space: nowrap;
372
-
373
- &:hover {
374
- background: #f2f3f5;
375
- border-color: transparent;
376
- transform: none;
377
- }
378
-
379
- /* 深色外观覆盖 */
380
- /* 1) data-theme='dark' 容器 */
381
- :root[data-theme='dark'] & {
382
- &:hover {
383
- background: #2b2f33;
384
- }
385
- }
386
-
387
- /* 2) 常见 .dark 容器 */
388
- .dark & {
389
- &:hover {
390
- background: #2b2f33;
391
- }
392
- }
393
-
394
- &:active {
395
- transform: scale(0.95);
396
- }
397
-
398
- &.selected {
399
- background: var(--color-selected);
400
- border-color: transparent;
401
- color: #fff !important;
402
- box-shadow: none;
403
-
404
- svg {
405
- color: #fff !important;
406
- fill: currentColor;
407
- stroke: currentColor;
408
- }
409
-
410
- .tool-button-label {
411
- color: #fff !important;
412
- }
413
- }
414
-
415
- svg {
416
- width: 18px;
417
- height: 18px;
418
- pointer-events: none;
419
- display: block;
420
- margin: 0;
421
- padding: 0;
422
- }
423
-
424
- // 确保MonkeysIcon组件内部也居中
425
- .monkeys-icon {
426
- display: flex !important;
427
- align-items: center !important;
428
- justify-content: center !important;
429
- flex-shrink: 0;
430
- }
431
-
432
- .tool-button-label {
433
- font-size: 12px;
434
- line-height: 1;
435
- color: inherit;
436
- pointer-events: none;
437
- }
438
- }
439
- }
440
- }
1
+ /**
2
+ * Monkeys UI Workflow Board Styles
3
+ *
4
+ * Contains styles for the workflow editor/canvas area including:
5
+ * - tldraw theme CSS variables (light/dark mode)
6
+ * - Vertical toolbar component
7
+ * - Mini tools toolbar component
8
+ *
9
+ * Requirements for the consuming app:
10
+ * - The monkeys color scale (--monkeys-* CSS vars set by setTailwindTheme from the palette module)
11
+ * - Tailwind CSS (for .dark class dark mode switching)
12
+ */
13
+
14
+ // ============================================================
15
+ // tldraw Theme: CSS variable overrides for light / dark mode
16
+ // ============================================================
17
+
18
+ .tl-theme__light * {
19
+ color: revert;
20
+ --color-selected: rgb(var(--monkeys-500));
21
+ --color-panel: #ffffff;
22
+ --color-panel-border: rgba(0, 0, 0, 0.1);
23
+ --color-text: #000000;
24
+ --color-hover: #f2f3f5;
25
+ --color-selected-text: #ffffff;
26
+ --shadow-l: 0 2px 8px rgba(0, 0, 0, 0.1);
27
+ }
28
+
29
+ .tl-theme__dark {
30
+ color: revert;
31
+ --color-selected: rgb(var(--monkeys-500));
32
+ --color-panel: #151a23;
33
+ --color-panel-border: rgba(255, 255, 255, 0.08);
34
+ --color-text: #e0e0e0;
35
+ --color-hover: rgba(255, 255, 255, 0.06);
36
+ --color-selected-text: #ffffff;
37
+ --shadow-l: 0 2px 8px rgba(0, 0, 0, 0.4);
38
+
39
+ /* tldraw 画布主题微调 */
40
+ --tl-color-background: hsl(222, 18%, 11.5%);
41
+ /* 网格再淡一点,避免"脏/颗粒感" */
42
+ --tl-color-grid: hsla(220, 12%, 82%, 0.06);
43
+ --tl-color-selected: hsl(258, 89%, 66%);
44
+ /* 更接近 #8B5CF6 */
45
+ --tl-color-selection-stroke: hsl(258, 89%, 66%);
46
+ --tl-color-selection-fill: hsla(258, 89%, 66%, 0.18);
47
+ --tl-color-brush-fill: hsla(220, 10%, 80%, 0.05);
48
+ --tl-color-brush-stroke: hsla(220, 10%, 80%, 0.14);
49
+ }
50
+
51
+ /* 通用 dark 类支持(适配 Tailwind 等) */
52
+ .dark {
53
+ --color-panel: #151a23;
54
+ --color-panel-border: rgba(255, 255, 255, 0.08);
55
+ --color-text: #e0e0e0;
56
+ --color-hover: rgba(255, 255, 255, 0.06);
57
+ --color-selected-text: #ffffff;
58
+ --shadow-l: 0 2px 8px rgba(0, 0, 0, 0.4);
59
+
60
+ /* tldraw 画布主题微调 */
61
+ --tl-color-background: hsl(222, 18%, 11.5%);
62
+ --tl-color-grid: hsla(220, 12%, 82%, 0.06);
63
+ --tl-color-selected: hsl(258, 89%, 66%);
64
+ --tl-color-selection-stroke: hsl(258, 89%, 66%);
65
+ --tl-color-selection-fill: hsla(258, 89%, 66%, 0.18);
66
+ --tl-color-brush-fill: hsla(220, 10%, 80%, 0.05);
67
+ --tl-color-brush-stroke: hsla(220, 10%, 80%, 0.14);
68
+ }
69
+
70
+ // ============================================================
71
+ // Vertical Toolbar
72
+ // ============================================================
73
+
74
+ .vertical-toolbar {
75
+ z-index: 9999;
76
+ pointer-events: auto;
77
+
78
+ /* 左侧位置样式 */
79
+ &.vertical-toolbar--left {
80
+ .custom-toolbar {
81
+ flex-direction: column;
82
+
83
+ .dropdown-menu {
84
+ left: 100%;
85
+ bottom: auto;
86
+ top: 0;
87
+ margin-bottom: 0;
88
+ margin-left: 15px;
89
+ }
90
+ }
91
+ }
92
+
93
+ .custom-toolbar {
94
+ display: flex;
95
+ flex-direction: row;
96
+ gap: 4px;
97
+ padding: 8px;
98
+ border-radius: 12px;
99
+ background: var(--color-panel, #ffffff);
100
+ box-shadow: var(--shadow-l, 0 2px 8px rgba(0, 0, 0, 0.1));
101
+ border: 1px solid var(--color-panel-border, rgba(0, 0, 0, 0.1));
102
+ backdrop-filter: blur(8px);
103
+
104
+ .tool-button {
105
+ width: 40px;
106
+ height: 40px;
107
+ display: flex;
108
+ align-items: center;
109
+ justify-content: center;
110
+ border-radius: 8px;
111
+ border: 1px solid transparent;
112
+ background: transparent;
113
+ color: var(--color-text);
114
+ transition: all 0.15s ease;
115
+ cursor: pointer;
116
+ outline: none;
117
+ pointer-events: auto;
118
+ z-index: 10000;
119
+ position: relative;
120
+
121
+ &:hover {
122
+ background: #f2f3f5;
123
+ border-color: transparent;
124
+ transform: none;
125
+ }
126
+
127
+ /* 深色外观覆盖:使用站点主题标记,避免误判系统偏好导致浅色也变化 */
128
+ /* 1) data-theme='dark' 容器 */
129
+ :root[data-theme='dark'] & {
130
+ &:hover {
131
+ background: #2b2f33;
132
+ }
133
+ }
134
+
135
+ /* 2) 常见 .dark 容器 */
136
+ .dark & {
137
+ &:hover {
138
+ background: #2b2f33;
139
+ }
140
+ }
141
+
142
+ &:active {
143
+ transform: scale(0.95);
144
+ }
145
+
146
+ &.selected {
147
+ background: var(--color-selected);
148
+ border-color: transparent;
149
+ color: #fff !important;
150
+ box-shadow: none;
151
+
152
+ svg {
153
+ color: #fff !important;
154
+ fill: currentColor;
155
+ stroke: currentColor;
156
+ }
157
+ }
158
+
159
+ /* 只约束按钮"直接子元素"的 svg 尺寸,避免影响 MonkeysIcon / TldrawUiIcon 等内部 svg 导致不居中 */
160
+ > svg {
161
+ width: 18px;
162
+ height: 18px;
163
+ pointer-events: none;
164
+ }
165
+
166
+ /* 工具栏里使用 MonkeysIcon 的按钮(palette / workflow / agent 等)统一到 18px 视觉尺寸 */
167
+ .toolbar-monkeys-icon {
168
+ width: 18px !important;
169
+ height: 18px !important;
170
+ line-height: 0;
171
+
172
+ /* 内部的 lucide/custom icon wrapper(size-*)强制为 18px */
173
+ .size-3,
174
+ .size-4,
175
+ .size-5,
176
+ .size-6,
177
+ .size-7 {
178
+ width: 18px !important;
179
+ height: 18px !important;
180
+ }
181
+
182
+ svg {
183
+ width: 18px !important;
184
+ height: 18px !important;
185
+ display: block;
186
+ }
187
+ }
188
+ }
189
+
190
+ .tool-group {
191
+ position: relative;
192
+
193
+ &.menu-open .caret {
194
+ animation: caret-pop 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
195
+ filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
196
+ transform-origin: 100% 100%;
197
+ }
198
+
199
+ &:hover .caret {
200
+ transform: translate(-0.5px, -0.5px) scale(1.05);
201
+ filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
202
+ }
203
+ }
204
+
205
+ .caret {
206
+ position: absolute;
207
+ right: 4px;
208
+ top: 4px;
209
+ width: 5px;
210
+ height: 5px;
211
+ background: currentColor;
212
+ clip-path: polygon(100% 0, 0 0, 100% 100%);
213
+ box-shadow: 0 0 0 1px var(--color-panel);
214
+ pointer-events: none;
215
+ }
216
+
217
+ @keyframes caret-pop {
218
+ 0% {
219
+ transform: translate(0, 0) scale(0.85) rotate(0.0001deg);
220
+ opacity: 0.6;
221
+ }
222
+
223
+ 60% {
224
+ transform: translate(-1px, -1px) scale(1.15) rotate(0.0001deg);
225
+ opacity: 1;
226
+ }
227
+
228
+ 100% {
229
+ transform: translate(0, 0) scale(1) rotate(0.0001deg);
230
+ opacity: 1;
231
+ }
232
+ }
233
+
234
+ /* 命中区域:悬停或点击展开菜单 */
235
+ .caret-hit {
236
+ position: absolute;
237
+ right: 2px;
238
+ top: 2px;
239
+ width: 16px;
240
+ height: 12px;
241
+ cursor: default;
242
+ }
243
+
244
+ .tool-button {
245
+ position: relative;
246
+ }
247
+
248
+ .dropdown-menu {
249
+ position: absolute;
250
+ left: 0;
251
+ bottom: 100%;
252
+ margin-bottom: 15px;
253
+ min-width: 140px;
254
+ display: flex;
255
+ flex-direction: column;
256
+ gap: 2px;
257
+ padding: 6px;
258
+ border-radius: 8px;
259
+ background: var(--color-panel, #ffffff);
260
+ border: 1px solid var(--color-panel-border, rgba(0, 0, 0, 0.1));
261
+ box-shadow: var(--shadow-l, 0 2px 8px rgba(0, 0, 0, 0.1));
262
+ z-index: 10001;
263
+ max-height: 256px;
264
+ overflow-y: auto;
265
+ }
266
+
267
+ .dropdown-item {
268
+ display: flex;
269
+ align-items: center;
270
+ justify-content: center;
271
+ gap: 0;
272
+ padding: 8px;
273
+ border-radius: 6px;
274
+ cursor: pointer;
275
+ color: var(--color-text);
276
+
277
+ &:hover {
278
+ background: var(--color-hover);
279
+ }
280
+
281
+ &.active {
282
+ background: var(--color-selected);
283
+ color: var(--color-selected-text);
284
+ }
285
+
286
+ svg {
287
+ width: 20px;
288
+ height: 20px;
289
+ }
290
+ }
291
+
292
+ /* workflow 下拉菜单:图标更小一些 */
293
+ .dropdown-menu.workflow-list {
294
+ .dropdown-item {
295
+ justify-content: flex-start;
296
+ gap: 4px;
297
+
298
+ [data-alt='icon'] {
299
+ transform: translateY(-3px);
300
+ flex-shrink: 0;
301
+ }
302
+
303
+ svg {
304
+ width: 16px;
305
+ height: 16px;
306
+ }
307
+ }
308
+ }
309
+
310
+ /* 形状菜单改为四列网格,仅展示图标 */
311
+ .shapes-grid {
312
+ display: grid;
313
+ grid-template-columns: repeat(4, 1fr);
314
+ grid-auto-rows: 40px;
315
+ gap: 4px;
316
+ min-width: 200px;
317
+ padding: 8px;
318
+ height: 276px;
319
+ /* 6*40 + 5*4 + 16(padding) */
320
+ max-height: none;
321
+ overflow-y: hidden;
322
+ }
323
+ }
324
+ }
325
+
326
+ // ============================================================
327
+ // Mini Tools Toolbar
328
+ // ============================================================
329
+
330
+ .mini-tools-toolbar {
331
+ position: fixed !important;
332
+ left: var(--toolbar-left, 16px) !important;
333
+ top: calc(72px + var(--global-spacing) * 3.5 + 10px) !important;
334
+ bottom: calc(var(--global-spacing) * 3.5 + 10px) !important;
335
+ display: flex !important;
336
+ align-items: center !important;
337
+ justify-content: flex-start !important;
338
+ z-index: 9999;
339
+ pointer-events: auto;
340
+
341
+ .custom-toolbar {
342
+ display: flex;
343
+ flex-direction: column;
344
+ gap: 8px;
345
+ padding: 8px;
346
+ border-radius: 12px;
347
+ background: var(--color-panel, #ffffff);
348
+ box-shadow: var(--shadow-l, 0 2px 8px rgba(0, 0, 0, 0.1));
349
+ border: 1px solid var(--color-panel-border, rgba(0, 0, 0, 0.1));
350
+ backdrop-filter: blur(8px);
351
+
352
+ .tool-button {
353
+ min-width: 40px;
354
+ height: 40px;
355
+ display: flex;
356
+ flex-direction: row;
357
+ align-items: center;
358
+ justify-content: flex-start;
359
+ gap: 8px;
360
+ padding: 0 12px;
361
+ border-radius: 8px;
362
+ border: 1px solid transparent;
363
+ background: transparent;
364
+ color: var(--color-text);
365
+ transition: all 0.15s ease;
366
+ cursor: pointer;
367
+ outline: none;
368
+ pointer-events: auto;
369
+ z-index: 10000;
370
+ position: relative;
371
+ white-space: nowrap;
372
+
373
+ &:hover {
374
+ background: #f2f3f5;
375
+ border-color: transparent;
376
+ transform: none;
377
+ }
378
+
379
+ /* 深色外观覆盖 */
380
+ /* 1) data-theme='dark' 容器 */
381
+ :root[data-theme='dark'] & {
382
+ &:hover {
383
+ background: #2b2f33;
384
+ }
385
+ }
386
+
387
+ /* 2) 常见 .dark 容器 */
388
+ .dark & {
389
+ &:hover {
390
+ background: #2b2f33;
391
+ }
392
+ }
393
+
394
+ &:active {
395
+ transform: scale(0.95);
396
+ }
397
+
398
+ &.selected {
399
+ background: var(--color-selected);
400
+ border-color: transparent;
401
+ color: #fff !important;
402
+ box-shadow: none;
403
+
404
+ svg {
405
+ color: #fff !important;
406
+ fill: currentColor;
407
+ stroke: currentColor;
408
+ }
409
+
410
+ .tool-button-label {
411
+ color: #fff !important;
412
+ }
413
+ }
414
+
415
+ svg {
416
+ width: 18px;
417
+ height: 18px;
418
+ pointer-events: none;
419
+ display: block;
420
+ margin: 0;
421
+ padding: 0;
422
+ }
423
+
424
+ // 确保MonkeysIcon组件内部也居中
425
+ .monkeys-icon {
426
+ display: flex !important;
427
+ align-items: center !important;
428
+ justify-content: center !important;
429
+ flex-shrink: 0;
430
+ }
431
+
432
+ .tool-button-label {
433
+ font-size: 12px;
434
+ line-height: 1;
435
+ color: inherit;
436
+ pointer-events: none;
437
+ }
438
+ }
439
+ }
440
+ }