@dickpy/dsh-imagegen 1.5.6 → 1.5.8
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/README.md +7 -5
- package/lib/client.js +36396 -847
- package/lib/client.js.map +1 -1
- package/lib/index.js +183 -7
- package/package.json +2 -1
- package/src/canvas-store.ts +3 -2
- package/src/client/CanvasWorkspace.tsx +417 -77
- package/src/client/ImageGenPanel.tsx +2823 -2807
- package/src/client/SettingsCard.tsx +1128 -1128
- package/src/client/canvas-workspace.module.css +157 -33
- package/src/client/locales.ts +1524 -1509
- package/src/client/panel.module.css +7 -0
- package/src/engine.ts +998 -845
- package/src/gallery-store.ts +311 -311
- package/src/history-store.ts +275 -275
- package/src/image-storage-path.ts +12 -12
- package/src/index.ts +430 -429
- package/src/model-catalog.ts +149 -124
- package/src/presets.ts +95 -86
- package/src/prompt-enhancer.ts +151 -137
- package/src/protocol.ts +2 -2
|
@@ -130,6 +130,39 @@
|
|
|
130
130
|
opacity: 0.5;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
/* Interactive fluid flowmap dot field lives in a <canvas>; aurora is pure CSS.
|
|
134
|
+
* Both render themselves at full strength (the 0.5 grid dimming stays off). */
|
|
135
|
+
.flowCanvas {
|
|
136
|
+
position: absolute;
|
|
137
|
+
inset: 0;
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.grid[data-mode="flow"],
|
|
143
|
+
.grid[data-mode="aurora"] {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.grid[data-mode="aurora"] {
|
|
148
|
+
background-image:
|
|
149
|
+
radial-gradient(560px 380px at 22% 28%, color-mix(in srgb, var(--dsw-alias-brand-primary) 24%, transparent), transparent 72%),
|
|
150
|
+
radial-gradient(680px 480px at 78% 62%, rgb(167 139 250 / 20%), transparent 72%),
|
|
151
|
+
radial-gradient(520px 400px at 48% 88%, rgb(34 211 238 / 17%), transparent 74%);
|
|
152
|
+
background-size: 220% 220%;
|
|
153
|
+
background-position: 0% 0%;
|
|
154
|
+
animation: auroraDrift 20s ease-in-out infinite alternate;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@keyframes auroraDrift {
|
|
158
|
+
from { background-position: 0% 0%; }
|
|
159
|
+
to { background-position: 100% 100%; }
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@media (prefers-reduced-motion: reduce) {
|
|
163
|
+
.grid[data-mode="aurora"] { animation: none; }
|
|
164
|
+
}
|
|
165
|
+
|
|
133
166
|
.grid[data-mode="dots"] {
|
|
134
167
|
background-image: radial-gradient(circle, color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent) 1.1px, transparent 1.4px);
|
|
135
168
|
}
|
|
@@ -180,7 +213,7 @@
|
|
|
180
213
|
.backgroundMenu button {
|
|
181
214
|
display: flex;
|
|
182
215
|
align-items: center;
|
|
183
|
-
justify-content:
|
|
216
|
+
justify-content: flex-start;
|
|
184
217
|
border: none;
|
|
185
218
|
border-radius: 7px;
|
|
186
219
|
background: transparent;
|
|
@@ -383,6 +416,9 @@
|
|
|
383
416
|
color: var(--dsw-alias-label-tertiary);
|
|
384
417
|
font-size: 12px;
|
|
385
418
|
cursor: pointer;
|
|
419
|
+
/* .nodeBody disables pointer events for node dragging; the upload button
|
|
420
|
+
* inside must opt back in or its onClick never fires. */
|
|
421
|
+
pointer-events: auto;
|
|
386
422
|
}
|
|
387
423
|
|
|
388
424
|
.nodeEmpty:hover {
|
|
@@ -432,45 +468,26 @@
|
|
|
432
468
|
backdrop-filter: blur(10px);
|
|
433
469
|
}
|
|
434
470
|
|
|
471
|
+
/* macOS-dock magnification: the pointermove handler on .dock feeds a gaussian
|
|
472
|
+
* falloff into --dock-scale / --dock-lift, so the hovered icon swells and lifts
|
|
473
|
+
* while neighbours rise and fall like a zipper as the pointer slides across. */
|
|
435
474
|
.dock .iconButton {
|
|
436
475
|
position: relative;
|
|
437
|
-
overflow: hidden;
|
|
438
476
|
width: 40px;
|
|
439
477
|
height: 40px;
|
|
440
478
|
border-radius: 11px;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
/* water-wave sheen sweeping across + gentle lift on hover */
|
|
445
|
-
.dock .iconButton::before {
|
|
446
|
-
content: '';
|
|
447
|
-
position: absolute;
|
|
448
|
-
top: -4px;
|
|
449
|
-
bottom: -4px;
|
|
450
|
-
left: -150%;
|
|
451
|
-
width: 65%;
|
|
452
|
-
background: linear-gradient(105deg, transparent, color-mix(in srgb, currentColor 26%, transparent), transparent);
|
|
453
|
-
transform: skewX(-18deg);
|
|
454
|
-
opacity: 0;
|
|
455
|
-
pointer-events: none;
|
|
479
|
+
transform: translateY(var(--dock-lift, 0px)) scale(var(--dock-scale, 1));
|
|
480
|
+
transform-origin: 50% 100%;
|
|
481
|
+
transition: transform 0.16s cubic-bezier(0.33, 1, 0.68, 1), background 0.15s ease, color 0.15s ease, box-shadow 0.18s ease;
|
|
456
482
|
}
|
|
457
483
|
|
|
458
484
|
.dock .iconButton:not(:disabled):hover {
|
|
459
|
-
|
|
485
|
+
z-index: 2;
|
|
460
486
|
box-shadow: 0 6px 14px color-mix(in srgb, var(--dsw-alias-label-primary) 20%, transparent);
|
|
461
487
|
}
|
|
462
488
|
|
|
463
|
-
.dock .iconButton:not(:disabled):hover::before {
|
|
464
|
-
animation: dockShine 0.55s ease forwards;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
489
|
.dock .iconButton:not(:disabled):active {
|
|
468
|
-
transform: translateY(-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
@keyframes dockShine {
|
|
472
|
-
0% { left: -150%; opacity: 1; }
|
|
473
|
-
100% { left: 170%; opacity: 1; }
|
|
490
|
+
transform: translateY(var(--dock-lift, 0px)) scale(0.94);
|
|
474
491
|
}
|
|
475
492
|
|
|
476
493
|
.dock .iconButton[data-active] {
|
|
@@ -553,6 +570,70 @@
|
|
|
553
570
|
max-width: 128px;
|
|
554
571
|
}
|
|
555
572
|
|
|
573
|
+
/* custom dropdown button + popup (styled replacement for native <select>) */
|
|
574
|
+
.composerSelect {
|
|
575
|
+
display: inline-flex;
|
|
576
|
+
align-items: center;
|
|
577
|
+
gap: 6px;
|
|
578
|
+
height: 28px;
|
|
579
|
+
padding: 0 8px 0 11px;
|
|
580
|
+
border-radius: 999px;
|
|
581
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
582
|
+
background: transparent;
|
|
583
|
+
color: var(--dsw-alias-label-primary);
|
|
584
|
+
font-size: 11.5px;
|
|
585
|
+
min-width: 0;
|
|
586
|
+
max-width: 138px;
|
|
587
|
+
cursor: pointer;
|
|
588
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.composerSelect:hover { background: var(--dsw-alias-interactive-bg-hover); }
|
|
592
|
+
.composerSelect[data-open] { border-color: var(--dsw-alias-brand-primary); color: var(--dsw-alias-brand-primary); }
|
|
593
|
+
.composerSelect svg { flex: none; opacity: 0.65; }
|
|
594
|
+
.composerSelect[data-open] svg { opacity: 0.9; }
|
|
595
|
+
|
|
596
|
+
.composerSelectValue {
|
|
597
|
+
overflow: hidden;
|
|
598
|
+
text-overflow: ellipsis;
|
|
599
|
+
white-space: nowrap;
|
|
600
|
+
min-width: 0;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.composerSelectMenu {
|
|
604
|
+
position: fixed;
|
|
605
|
+
z-index: 95;
|
|
606
|
+
max-height: 264px;
|
|
607
|
+
overflow: auto;
|
|
608
|
+
padding: 5px;
|
|
609
|
+
border-radius: 11px;
|
|
610
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
611
|
+
background: color-mix(in srgb, var(--dsw-alias-bg-layer-1) 97%, transparent);
|
|
612
|
+
box-shadow: 0 14px 38px rgb(15 23 42 / 18%);
|
|
613
|
+
backdrop-filter: blur(10px);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.composerSelectMenu button {
|
|
617
|
+
display: block;
|
|
618
|
+
width: 100%;
|
|
619
|
+
border: none;
|
|
620
|
+
border-radius: 7px;
|
|
621
|
+
background: transparent;
|
|
622
|
+
color: var(--dsw-alias-label-primary);
|
|
623
|
+
font-size: 12.5px;
|
|
624
|
+
line-height: 1.45;
|
|
625
|
+
padding: 7px 10px;
|
|
626
|
+
cursor: pointer;
|
|
627
|
+
text-align: left;
|
|
628
|
+
white-space: nowrap;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.composerSelectMenu button:hover { background: var(--dsw-alias-interactive-bg-hover); }
|
|
632
|
+
.composerSelectMenu button[data-selected] {
|
|
633
|
+
color: var(--dsw-alias-brand-primary);
|
|
634
|
+
background: color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent);
|
|
635
|
+
}
|
|
636
|
+
|
|
556
637
|
.composerSend {
|
|
557
638
|
margin-left: auto;
|
|
558
639
|
width: 34px;
|
|
@@ -631,6 +712,25 @@
|
|
|
631
712
|
|
|
632
713
|
.handle:hover { background: var(--dsw-alias-brand-primary); }
|
|
633
714
|
|
|
715
|
+
/* The source handle doubles as a quick-add button (hover opens the node
|
|
716
|
+
* picker, drag connects) so it reads as a Dify-style big ⊕. */
|
|
717
|
+
.handleRight {
|
|
718
|
+
display: flex;
|
|
719
|
+
align-items: center;
|
|
720
|
+
justify-content: center;
|
|
721
|
+
width: 20px;
|
|
722
|
+
height: 20px;
|
|
723
|
+
right: -10px;
|
|
724
|
+
font-size: 13px;
|
|
725
|
+
font-weight: 600;
|
|
726
|
+
line-height: 1;
|
|
727
|
+
color: var(--dsw-alias-brand-primary);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.handleRight::after { content: '+'; }
|
|
731
|
+
|
|
732
|
+
.handleRight:hover { color: var(--dsw-alias-bg-layer-1); transform: translateY(-50%) scale(1.12); }
|
|
733
|
+
|
|
634
734
|
.resizeHandle {
|
|
635
735
|
position: absolute;
|
|
636
736
|
right: -5px;
|
|
@@ -681,15 +781,13 @@
|
|
|
681
781
|
|
|
682
782
|
.connectionPath {
|
|
683
783
|
fill: none;
|
|
684
|
-
stroke:
|
|
685
|
-
stroke-
|
|
686
|
-
stroke-opacity: 0.85;
|
|
784
|
+
stroke-width: 1.8;
|
|
785
|
+
stroke-opacity: 0.9;
|
|
687
786
|
pointer-events: none;
|
|
688
787
|
}
|
|
689
788
|
|
|
690
789
|
.connectionActive {
|
|
691
|
-
stroke:
|
|
692
|
-
stroke-width: 3;
|
|
790
|
+
stroke-width: 2.6;
|
|
693
791
|
stroke-opacity: 1;
|
|
694
792
|
filter: drop-shadow(0 0 6px color-mix(in srgb, var(--dsw-alias-brand-primary) 45%, transparent));
|
|
695
793
|
}
|
|
@@ -702,6 +800,32 @@
|
|
|
702
800
|
pointer-events: none;
|
|
703
801
|
}
|
|
704
802
|
|
|
803
|
+
/* Flow overlay: a soft light band glides from the path start (source) toward
|
|
804
|
+
* its end (target), echoing the direction of the gradient and arrowhead. */
|
|
805
|
+
.connectionFlow {
|
|
806
|
+
fill: none;
|
|
807
|
+
stroke: var(--dsw-alias-brand-primary);
|
|
808
|
+
stroke-width: 2;
|
|
809
|
+
stroke-linecap: round;
|
|
810
|
+
stroke-dasharray: 30 90;
|
|
811
|
+
opacity: 0.4;
|
|
812
|
+
pointer-events: none;
|
|
813
|
+
animation: connectionFlow 1.6s linear infinite;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.connectionFlowActive {
|
|
817
|
+
stroke: var(--dsw-alias-brand-primary);
|
|
818
|
+
opacity: 0.85;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
@keyframes connectionFlow {
|
|
822
|
+
to { stroke-dashoffset: -120; }
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
@media (prefers-reduced-motion: reduce) {
|
|
826
|
+
.connectionFlow { animation: none; opacity: 0.35; }
|
|
827
|
+
}
|
|
828
|
+
|
|
705
829
|
/* --------------------------------------------------------- empty hint */
|
|
706
830
|
|
|
707
831
|
.emptyHint {
|