@mhmttosun/dnd 0.0.0-stage → 1.1.1

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/css/stage.css ADDED
@@ -0,0 +1,490 @@
1
+ /* ==========================================================================
2
+ STAGE CSS - 1200x675 Mantıksal Tuval, Nesneler ve Dönüşüm Tutamaçları
3
+ ========================================================================== */
4
+
5
+ .stage {
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ width: 1200px;
10
+ height: 675px;
11
+ background-color: #ffffff;
12
+ border: 1px solid #e2e8f0;
13
+ border-radius: 16px;
14
+ overflow: visible;
15
+ touch-action: none;
16
+ user-select: none;
17
+ -webkit-user-select: none;
18
+ transform-origin: top left;
19
+ }
20
+
21
+ /* Izgara (Grid) Çizgileri */
22
+ .stage.grid-visible::before {
23
+ content: '';
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ pointer-events: none;
30
+ background-size: 20px 20px;
31
+ background-image:
32
+ linear-gradient(to right, rgba(203, 213, 225, 0.4) 1px, transparent 1px),
33
+ linear-gradient(to bottom, rgba(203, 213, 225, 0.4) 1px, transparent 1px);
34
+ z-index: 0;
35
+ }
36
+
37
+ /* SVG Bağlantı ve Çizim Katmanı */
38
+ .stage-svg-overlay {
39
+ position: absolute;
40
+ top: 0;
41
+ left: 0;
42
+ width: 100%;
43
+ height: 100%;
44
+ pointer-events: none;
45
+ z-index: 500;
46
+ overflow: visible;
47
+ }
48
+
49
+ /* Nesneler Katmanı */
50
+ .stage-objects {
51
+ position: absolute;
52
+ top: 0;
53
+ left: 0;
54
+ width: 100%;
55
+ height: 100%;
56
+ pointer-events: none;
57
+ }
58
+
59
+ /* ==========================================
60
+ SAHNE NESNELERİ (.stage-object)
61
+ ========================================== */
62
+ .stage-object {
63
+ position: absolute;
64
+ top: 0;
65
+ left: 0;
66
+ pointer-events: auto;
67
+ box-sizing: border-box;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ user-select: none;
72
+ -webkit-user-select: none;
73
+ cursor: move;
74
+ }
75
+
76
+ .stage-object.is-locked {
77
+ cursor: pointer;
78
+ }
79
+
80
+ .stage-object.is-hidden {
81
+ display: none !important;
82
+ }
83
+
84
+ /* Metin Kutusu Nesnesi Stilleri (Tasarım Modunda Ayırt Edilebilirlik) */
85
+ .stage-object[data-type="text"][data-role="decorative"] {
86
+ transition: outline 0.15s ease;
87
+ }
88
+
89
+ .stage-object[data-type="text"][data-role="decorative"]:hover {
90
+ outline: 1px dashed rgba(59, 130, 246, 0.45);
91
+ outline-offset: 2px;
92
+ }
93
+
94
+ /* Çizgi Nesnesi Stilleri */
95
+ .stage-object[data-type="line"] {
96
+ background-color: transparent !important;
97
+ border: none !important;
98
+ box-shadow: none !important;
99
+ overflow: visible !important;
100
+ }
101
+
102
+ .stage-object[data-type="line"] .object-inner-content {
103
+ width: 100%;
104
+ height: 100%;
105
+ padding: 0 !important;
106
+ overflow: visible !important;
107
+ }
108
+
109
+ .object-line-bar {
110
+ width: 100%;
111
+ height: 100%;
112
+ display: block;
113
+ pointer-events: none;
114
+ box-sizing: border-box;
115
+ overflow: visible;
116
+ }
117
+
118
+ /* İçerik Kutusu */
119
+ .object-inner-content {
120
+ width: 100%;
121
+ height: 100%;
122
+ display: flex;
123
+ flex-direction: column;
124
+ align-items: center;
125
+ justify-content: center;
126
+ pointer-events: none;
127
+ word-break: break-word;
128
+ white-space: pre-wrap;
129
+ }
130
+
131
+ .object-inner-content span,
132
+ .object-inner-content .object-text-span {
133
+ width: 100%;
134
+ display: block;
135
+ text-align: inherit;
136
+ box-sizing: border-box;
137
+ }
138
+
139
+ .object-text-span:empty::before {
140
+ content: 'Metin girin...';
141
+ color: #94a3b8;
142
+ font-style: italic;
143
+ pointer-events: none;
144
+ }
145
+
146
+ /* ==========================================
147
+ YERİNDE METİN DÜZENLEME (INLINE EDITING)
148
+ ========================================== */
149
+ .stage-object.is-editing-text {
150
+ cursor: text !important;
151
+ }
152
+
153
+ .stage-object.is-editing-text .object-inner-content {
154
+ pointer-events: auto !important;
155
+ user-select: text !important;
156
+ -webkit-user-select: text !important;
157
+ }
158
+
159
+ .stage-object.is-editing-text [contenteditable="true"] {
160
+ pointer-events: auto !important;
161
+ user-select: text !important;
162
+ -webkit-user-select: text !important;
163
+ cursor: text !important;
164
+ outline: 2px dashed #0ea5e9 !important;
165
+ outline-offset: 4px !important;
166
+ border-radius: 4px !important;
167
+ min-height: 1.2em;
168
+ }
169
+
170
+ /* Seçim kutusunun düzenleme sırasında tıklamaları engellememesi */
171
+ .selection-box.is-editing-text {
172
+ pointer-events: none !important;
173
+ }
174
+
175
+ .selection-box.is-editing-text .selection-border {
176
+ pointer-events: none !important;
177
+ border-color: rgba(14, 165, 233, 0.3) !important;
178
+ border-style: dotted !important;
179
+ }
180
+
181
+ .selection-box.is-editing-text .resize-handle,
182
+ .selection-box.is-editing-text .rotate-handle,
183
+ .selection-box.is-editing-text .rotate-stem {
184
+ display: none !important;
185
+ }
186
+
187
+ .object-inner-content img {
188
+ max-width: 100%;
189
+ max-height: 100%;
190
+ object-fit: contain;
191
+ pointer-events: none;
192
+ }
193
+
194
+ .image-caption {
195
+ margin-top: 4px;
196
+ font-size: 0.82rem;
197
+ font-weight: 600;
198
+ }
199
+
200
+ /* Kategori Başlığı ve Alanı */
201
+ .category-header {
202
+ font-size: 1.15rem;
203
+ font-weight: 800;
204
+ color: #065f46;
205
+ margin-bottom: 6px;
206
+ }
207
+
208
+ .category-drop-hint {
209
+ font-size: 0.8rem;
210
+ color: #10b981;
211
+ font-style: italic;
212
+ }
213
+
214
+ /* Sıralama Kutusu */
215
+ .sequence-slot-number {
216
+ font-size: 1.6rem;
217
+ font-weight: 800;
218
+ color: #6d28d9;
219
+ }
220
+
221
+ .sequence-slot-label {
222
+ font-size: 0.85rem;
223
+ font-weight: 600;
224
+ color: #64748b;
225
+ }
226
+
227
+ /* Kilit İkonu (Tıklanabilir buton) */
228
+ .lock-indicator {
229
+ position: absolute;
230
+ top: 4px;
231
+ right: 4px;
232
+ font-size: 0.85rem;
233
+ background: #ffffff;
234
+ border: 1px solid #cbd5e1;
235
+ border-radius: 6px;
236
+ padding: 2px 5px;
237
+ cursor: pointer;
238
+ pointer-events: auto;
239
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
240
+ transition: all 0.15s ease;
241
+ z-index: 101;
242
+ display: inline-flex;
243
+ align-items: center;
244
+ justify-content: center;
245
+ }
246
+
247
+ .lock-indicator:hover {
248
+ background: #fef2f2;
249
+ border-color: #ef4444;
250
+ transform: scale(1.15);
251
+ }
252
+
253
+ /* ==========================================
254
+ SEÇİM VE DÖNÜŞÜM ÇERÇEVESİ (.selection-box)
255
+ ========================================== */
256
+ .selection-box {
257
+ position: absolute;
258
+ top: 0;
259
+ left: 0;
260
+ pointer-events: auto;
261
+ z-index: 1000;
262
+ display: none;
263
+ }
264
+
265
+ .selection-border {
266
+ position: absolute;
267
+ top: -1px;
268
+ left: -1px;
269
+ width: calc(100% + 2px);
270
+ height: calc(100% + 2px);
271
+ border: 1.5px solid #0ea5e9;
272
+ pointer-events: auto;
273
+ cursor: move;
274
+ }
275
+
276
+ .selection-box.multi-select .selection-border {
277
+ border: 1.5px dashed #0ea5e9;
278
+ }
279
+
280
+ .selection-border.group-border {
281
+ border: 1.5px solid #6366f1 !important;
282
+ }
283
+
284
+ .multi-count-badge.is-group-badge {
285
+ background: #6366f1 !important;
286
+ }
287
+
288
+ /* Kilitli Nesne Seçim Stili */
289
+ .selection-box.is-locked-selection .locked-border {
290
+ border: 1.5px dashed #f59e0b;
291
+ cursor: default;
292
+ }
293
+
294
+ .selection-lock-floating-pill {
295
+ position: absolute;
296
+ top: -38px;
297
+ left: 50%;
298
+ transform: translateX(-50%);
299
+ display: flex;
300
+ align-items: center;
301
+ justify-content: center;
302
+ pointer-events: auto;
303
+ white-space: nowrap;
304
+ z-index: 1020;
305
+ }
306
+
307
+ .lock-pill-unlock-btn {
308
+ background: #1e293b;
309
+ color: #ffffff;
310
+ border: 1px solid rgba(255, 255, 255, 0.15);
311
+ border-radius: 9999px;
312
+ padding: 5px 12px;
313
+ font-size: 0.76rem;
314
+ font-weight: 600;
315
+ cursor: pointer;
316
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
317
+ display: inline-flex;
318
+ align-items: center;
319
+ gap: 6px;
320
+ transition: all 0.15s ease;
321
+ user-select: none;
322
+ }
323
+
324
+ .lock-pill-unlock-btn:hover {
325
+ background: #0f172a;
326
+ transform: scale(1.05);
327
+ border-color: #f59e0b;
328
+ color: #fbbf24;
329
+ }
330
+
331
+ /* 8 Yönlü Boyutlandırma Tutamaçları */
332
+ .resize-handle {
333
+ position: absolute;
334
+ width: 8px;
335
+ height: 8px;
336
+ background-color: #ffffff;
337
+ border: 1.5px solid #0ea5e9;
338
+ border-radius: 1px;
339
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
340
+ z-index: 1010;
341
+ pointer-events: auto;
342
+ }
343
+
344
+ .handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
345
+ .handle-n { top: -5px; left: calc(50% - 4px); cursor: ns-resize; }
346
+ .handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
347
+ .handle-e { top: calc(50% - 4px); right: -5px; cursor: ew-resize; }
348
+ .handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
349
+ .handle-s { bottom: -5px; left: calc(50% - 4px); cursor: ns-resize; }
350
+ .handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
351
+ .handle-w { top: calc(50% - 4px); left: -5px; cursor: ew-resize; }
352
+
353
+ /* Döndürme Tutamacı */
354
+ .rotate-stem {
355
+ position: absolute;
356
+ top: -22px;
357
+ left: 50%;
358
+ width: 1px;
359
+ height: 18px;
360
+ background-color: #0ea5e9;
361
+ pointer-events: none;
362
+ }
363
+
364
+ .rotate-handle {
365
+ position: absolute;
366
+ top: -30px;
367
+ left: calc(50% - 6px);
368
+ width: 12px;
369
+ height: 12px;
370
+ background-color: #ffffff;
371
+ border: 1.5px solid #0ea5e9;
372
+ border-radius: 50%;
373
+ cursor: grab;
374
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
375
+ z-index: 1020;
376
+ pointer-events: auto;
377
+ }
378
+
379
+ .rotate-handle:active {
380
+ cursor: grabbing;
381
+ }
382
+
383
+ /* Çizgi Seçim Tutamaçları ve Çerçevesi */
384
+ .selection-box.is-line-selection {
385
+ pointer-events: none;
386
+ }
387
+
388
+ .selection-box.is-line-selection .selection-border {
389
+ display: none !important;
390
+ }
391
+
392
+ .line-endpoint-handle {
393
+ position: absolute;
394
+ width: 18px;
395
+ height: 18px;
396
+ border-radius: 50% !important;
397
+ background-color: #ffffff !important;
398
+ border: 3px solid #f97316 !important;
399
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
400
+ z-index: 1010;
401
+ pointer-events: auto;
402
+ cursor: grab;
403
+ transition: transform 0.12s ease;
404
+ box-sizing: border-box;
405
+ }
406
+
407
+ .line-endpoint-handle:hover {
408
+ transform: scale(1.2);
409
+ border-color: #ea580c !important;
410
+ }
411
+
412
+ .line-endpoint-handle:active {
413
+ cursor: grabbing;
414
+ }
415
+
416
+ .line-endpoint-handle.handle-start {
417
+ left: -9px;
418
+ top: calc(50% - 9px);
419
+ }
420
+
421
+ .line-endpoint-handle.handle-end {
422
+ right: -9px;
423
+ top: calc(50% - 9px);
424
+ }
425
+
426
+ .line-rotate-stem {
427
+ top: -24px;
428
+ height: 20px;
429
+ }
430
+
431
+ .line-rotate-handle {
432
+ top: -32px;
433
+ }
434
+
435
+ /* Çoklu Seçim Sayacı */
436
+ .multi-count-badge {
437
+ position: absolute;
438
+ top: -26px;
439
+ left: 0;
440
+ background: #0ea5e9;
441
+ color: #ffffff;
442
+ font-size: 0.72rem;
443
+ font-weight: 700;
444
+ padding: 2px 8px;
445
+ border-radius: 4px;
446
+ pointer-events: none;
447
+ }
448
+
449
+ /* ==========================================
450
+ MARQUEE (ALAN SEÇİMİ) KUTUSU
451
+ ========================================== */
452
+ .stage-marquee-selection {
453
+ position: absolute;
454
+ border: 1px solid #0ea5e9;
455
+ background-color: rgba(14, 165, 233, 0.12);
456
+ pointer-events: none;
457
+ z-index: 999;
458
+ display: none;
459
+ }
460
+
461
+ /* ==========================================
462
+ AKILLI KILAVUZ ÇİZGİLERİ (GUIDELINES)
463
+ ========================================== */
464
+ .stage-guidelines {
465
+ position: absolute;
466
+ top: 0;
467
+ left: 0;
468
+ width: 100%;
469
+ height: 100%;
470
+ pointer-events: none;
471
+ z-index: 998;
472
+ }
473
+
474
+ .guideline {
475
+ position: absolute;
476
+ background-color: #06b6d4;
477
+ box-shadow: 0 0 4px #06b6d4;
478
+ }
479
+
480
+ .guideline-h {
481
+ left: 0;
482
+ width: 100%;
483
+ height: 1px;
484
+ }
485
+
486
+ .guideline-v {
487
+ top: 0;
488
+ height: 100%;
489
+ width: 1px;
490
+ }