@gustavolmo/react-window-manager 0.1.1 → 0.1.300
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/index.css +81 -10
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +381 -250
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/dist/index.css
CHANGED
|
@@ -332,18 +332,37 @@ video {
|
|
|
332
332
|
[hidden]:where(:not([hidden="until-found"])) {
|
|
333
333
|
display: none;
|
|
334
334
|
}
|
|
335
|
+
.pointer-events-none {
|
|
336
|
+
pointer-events: none;
|
|
337
|
+
}
|
|
338
|
+
.pointer-events-auto {
|
|
339
|
+
pointer-events: auto;
|
|
340
|
+
}
|
|
335
341
|
.fixed {
|
|
336
342
|
position: fixed;
|
|
337
343
|
}
|
|
338
344
|
.absolute {
|
|
339
345
|
position: absolute;
|
|
340
346
|
}
|
|
347
|
+
.relative {
|
|
348
|
+
position: relative;
|
|
349
|
+
}
|
|
350
|
+
.top-2 {
|
|
351
|
+
top: 0.5rem;
|
|
352
|
+
}
|
|
341
353
|
.z-10 {
|
|
342
354
|
z-index: 10;
|
|
343
355
|
}
|
|
344
356
|
.z-20 {
|
|
345
357
|
z-index: 20;
|
|
346
358
|
}
|
|
359
|
+
.z-50 {
|
|
360
|
+
z-index: 50;
|
|
361
|
+
}
|
|
362
|
+
.mx-auto {
|
|
363
|
+
margin-left: auto;
|
|
364
|
+
margin-right: auto;
|
|
365
|
+
}
|
|
347
366
|
.block {
|
|
348
367
|
display: block;
|
|
349
368
|
}
|
|
@@ -354,21 +373,21 @@ video {
|
|
|
354
373
|
width: 1.5rem;
|
|
355
374
|
height: 1.5rem;
|
|
356
375
|
}
|
|
376
|
+
.h-10 {
|
|
377
|
+
height: 2.5rem;
|
|
378
|
+
}
|
|
357
379
|
.h-2 {
|
|
358
380
|
height: 0.5rem;
|
|
359
381
|
}
|
|
360
382
|
.h-3 {
|
|
361
383
|
height: 0.75rem;
|
|
362
384
|
}
|
|
363
|
-
.h-
|
|
364
|
-
height: 1.
|
|
385
|
+
.h-5 {
|
|
386
|
+
height: 1.25rem;
|
|
365
387
|
}
|
|
366
388
|
.h-8 {
|
|
367
389
|
height: 2rem;
|
|
368
390
|
}
|
|
369
|
-
.h-\[10px\] {
|
|
370
|
-
height: 10px;
|
|
371
|
-
}
|
|
372
391
|
.h-\[32px\] {
|
|
373
392
|
height: 32px;
|
|
374
393
|
}
|
|
@@ -378,14 +397,24 @@ video {
|
|
|
378
397
|
.h-full {
|
|
379
398
|
height: 100%;
|
|
380
399
|
}
|
|
400
|
+
.w-12 {
|
|
401
|
+
width: 3rem;
|
|
402
|
+
}
|
|
381
403
|
.w-2 {
|
|
382
404
|
width: 0.5rem;
|
|
383
405
|
}
|
|
384
406
|
.w-3 {
|
|
385
407
|
width: 0.75rem;
|
|
386
408
|
}
|
|
387
|
-
.w-
|
|
388
|
-
width:
|
|
409
|
+
.w-7 {
|
|
410
|
+
width: 1.75rem;
|
|
411
|
+
}
|
|
412
|
+
.w-8 {
|
|
413
|
+
width: 2rem;
|
|
414
|
+
}
|
|
415
|
+
.w-fit {
|
|
416
|
+
width: -moz-fit-content;
|
|
417
|
+
width: fit-content;
|
|
389
418
|
}
|
|
390
419
|
.w-full {
|
|
391
420
|
width: 100%;
|
|
@@ -408,6 +437,12 @@ video {
|
|
|
408
437
|
.cursor-w-resize {
|
|
409
438
|
cursor: w-resize;
|
|
410
439
|
}
|
|
440
|
+
.cursor-nw-resize {
|
|
441
|
+
cursor: nw-resize;
|
|
442
|
+
}
|
|
443
|
+
.cursor-ne-resize {
|
|
444
|
+
cursor: ne-resize;
|
|
445
|
+
}
|
|
411
446
|
.touch-none {
|
|
412
447
|
touch-action: none;
|
|
413
448
|
}
|
|
@@ -423,9 +458,15 @@ video {
|
|
|
423
458
|
.justify-center {
|
|
424
459
|
justify-content: center;
|
|
425
460
|
}
|
|
461
|
+
.gap-0\.5 {
|
|
462
|
+
gap: 0.125rem;
|
|
463
|
+
}
|
|
426
464
|
.gap-1 {
|
|
427
465
|
gap: 0.25rem;
|
|
428
466
|
}
|
|
467
|
+
.gap-3 {
|
|
468
|
+
gap: 0.75rem;
|
|
469
|
+
}
|
|
429
470
|
.overflow-auto {
|
|
430
471
|
overflow: auto;
|
|
431
472
|
}
|
|
@@ -437,12 +478,19 @@ video {
|
|
|
437
478
|
text-overflow: ellipsis;
|
|
438
479
|
white-space: nowrap;
|
|
439
480
|
}
|
|
481
|
+
.rounded-md {
|
|
482
|
+
border-radius: 0.375rem;
|
|
483
|
+
}
|
|
440
484
|
.rounded-sm {
|
|
441
485
|
border-radius: 0.125rem;
|
|
442
486
|
}
|
|
443
487
|
.border {
|
|
444
488
|
border-width: 1px;
|
|
445
489
|
}
|
|
490
|
+
.border-zinc-500 {
|
|
491
|
+
--tw-border-opacity: 1;
|
|
492
|
+
border-color: rgb(113 113 122 / var(--tw-border-opacity, 1));
|
|
493
|
+
}
|
|
446
494
|
.border-zinc-600 {
|
|
447
495
|
--tw-border-opacity: 1;
|
|
448
496
|
border-color: rgb(82 82 91 / var(--tw-border-opacity, 1));
|
|
@@ -455,17 +503,33 @@ video {
|
|
|
455
503
|
--tw-bg-opacity: 1;
|
|
456
504
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
457
505
|
}
|
|
506
|
+
.bg-yellow-400 {
|
|
507
|
+
--tw-bg-opacity: 1;
|
|
508
|
+
background-color: rgb(250 204 21 / var(--tw-bg-opacity, 1));
|
|
509
|
+
}
|
|
510
|
+
.bg-zinc-600 {
|
|
511
|
+
--tw-bg-opacity: 1;
|
|
512
|
+
background-color: rgb(82 82 91 / var(--tw-bg-opacity, 1));
|
|
513
|
+
}
|
|
514
|
+
.bg-zinc-800 {
|
|
515
|
+
--tw-bg-opacity: 1;
|
|
516
|
+
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
517
|
+
}
|
|
458
518
|
.px-2 {
|
|
459
519
|
padding-left: 0.5rem;
|
|
460
520
|
padding-right: 0.5rem;
|
|
461
521
|
}
|
|
522
|
+
.px-4 {
|
|
523
|
+
padding-left: 1rem;
|
|
524
|
+
padding-right: 1rem;
|
|
525
|
+
}
|
|
462
526
|
.px-5 {
|
|
463
527
|
padding-left: 1.25rem;
|
|
464
528
|
padding-right: 1.25rem;
|
|
465
529
|
}
|
|
466
|
-
.
|
|
467
|
-
padding-
|
|
468
|
-
padding-
|
|
530
|
+
.py-2 {
|
|
531
|
+
padding-top: 0.5rem;
|
|
532
|
+
padding-bottom: 0.5rem;
|
|
469
533
|
}
|
|
470
534
|
.text-sm {
|
|
471
535
|
font-size: 0.875rem;
|
|
@@ -478,6 +542,9 @@ video {
|
|
|
478
542
|
.opacity-100 {
|
|
479
543
|
opacity: 1;
|
|
480
544
|
}
|
|
545
|
+
.opacity-50 {
|
|
546
|
+
opacity: 0.5;
|
|
547
|
+
}
|
|
481
548
|
.opacity-60 {
|
|
482
549
|
opacity: 0.6;
|
|
483
550
|
}
|
|
@@ -535,6 +602,10 @@ video {
|
|
|
535
602
|
--tw-bg-opacity: 1;
|
|
536
603
|
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
|
|
537
604
|
}
|
|
605
|
+
.hover\:bg-zinc-300:hover {
|
|
606
|
+
--tw-bg-opacity: 1;
|
|
607
|
+
background-color: rgb(212 212 216 / var(--tw-bg-opacity, 1));
|
|
608
|
+
}
|
|
538
609
|
.hover\:bg-opacity-20:hover {
|
|
539
610
|
--tw-bg-opacity: 0.2;
|
|
540
611
|
}
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\r\n.fixed {\n position: fixed;\n}\r\n.absolute {\n position: absolute;\n}\r\n.z-10 {\n z-index: 10;\n}\r\n.z-20 {\n z-index: 20;\n}\r\n.block {\n display: block;\n}\r\n.flex {\n display: flex;\n}\r\n.size-6 {\n width: 1.5rem;\n height: 1.5rem;\n}\r\n.h-2 {\n height: 0.5rem;\n}\r\n.h-3 {\n height: 0.75rem;\n}\r\n.h-6 {\n height: 1.5rem;\n}\r\n.h-8 {\n height: 2rem;\n}\r\n.h-\\[10px\\] {\n height: 10px;\n}\r\n.h-\\[32px\\] {\n height: 32px;\n}\r\n.h-\\[calc\\(100\\%-32px\\)\\] {\n height: calc(100% - 32px);\n}\r\n.h-full {\n height: 100%;\n}\r\n.w-2 {\n width: 0.5rem;\n}\r\n.w-3 {\n width: 0.75rem;\n}\r\n.w-4 {\n width: 1rem;\n}\r\n.w-full {\n width: 100%;\n}\r\n.shrink-0 {\n flex-shrink: 0;\n}\r\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\r\n.cursor-s-resize {\n cursor: s-resize;\n}\r\n.cursor-se-resize {\n cursor: se-resize;\n}\r\n.cursor-sw-resize {\n cursor: sw-resize;\n}\r\n.cursor-w-resize {\n cursor: w-resize;\n}\r\n.touch-none {\n touch-action: none;\n}\r\n.resize {\n resize: both;\n}\r\n.flex-col {\n flex-direction: column;\n}\r\n.items-center {\n align-items: center;\n}\r\n.justify-center {\n justify-content: center;\n}\r\n.gap-1 {\n gap: 0.25rem;\n}\r\n.overflow-auto {\n overflow: auto;\n}\r\n.overflow-hidden {\n overflow: hidden;\n}\r\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\r\n.rounded-sm {\n border-radius: 0.125rem;\n}\r\n.border {\n border-width: 1px;\n}\r\n.border-zinc-600 {\n --tw-border-opacity: 1;\n border-color: rgb(82 82 91 / var(--tw-border-opacity, 1));\n}\r\n.bg-neutral-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity, 1));\n}\r\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\r\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\r\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\r\n.px-\\[1px\\] {\n padding-left: 1px;\n padding-right: 1px;\n}\r\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\r\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\r\n.opacity-100 {\n opacity: 1;\n}\r\n.opacity-60 {\n opacity: 0.6;\n}\r\n.opacity-90 {\n opacity: 0.9;\n}\r\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\r\n.brightness-100 {\n --tw-brightness: brightness(1);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.brightness-150 {\n --tw-brightness: brightness(1.5);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.brightness-75 {\n --tw-brightness: brightness(.75);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.brightness-\\[85\\%\\] {\n --tw-brightness: brightness(85%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\r\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\r\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\r\n.hover\\:bg-red-500:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\r\n.hover\\:bg-opacity-20:hover {\n --tw-bg-opacity: 0.2;\n}\r\n@media (min-width: 1280px) {\n\n .xl\\:p-0 {\n padding: 0px;\n }\n}"],"mappings":";AAAA;AAAA;AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAQF;AAAA;AAAA;AAGE;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AAAA;AAaF;AAAA;AAEE;AACA;AACA;AACA;AACG;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAQF;AACE;AACA;AAAA;AASF;AACE;AACA;AACA;AAAA;AAOF;AACE;AACQ;AAAA;AAOV;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AACA;AAAA;AAOF;AACE;AACA;AAAA;AAOF;AAAA;AAEE;AAAA;AAUF;AAAA;AAAA;AAAA;AAIE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAOF;AACE;AAAA;AAOF;AAAA;AAEE;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AASF;AACE;AACA;AACA;AAAA;AASF;AAAA;AAAA;AAAA;AAAA;AAKE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAOF;AAAA;AAEE;AAAA;AAQF;AAAA;AAAA;AAAA;AAIE;AACA;AACA;AAAA;AAOF;AACE;AAAA;AAOF;AACE;AAAA;AAOF;AACE;AAAA;AAOF;AAAA;AAEE;AAAA;AAQF;AACE;AACA;AAAA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AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AAEE;AACE;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\r\n.pointer-events-none {\n pointer-events: none;\n}\r\n.pointer-events-auto {\n pointer-events: auto;\n}\r\n.fixed {\n position: fixed;\n}\r\n.absolute {\n position: absolute;\n}\r\n.relative {\n position: relative;\n}\r\n.top-2 {\n top: 0.5rem;\n}\r\n.z-10 {\n z-index: 10;\n}\r\n.z-20 {\n z-index: 20;\n}\r\n.z-50 {\n z-index: 50;\n}\r\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\r\n.block {\n display: block;\n}\r\n.flex {\n display: flex;\n}\r\n.size-6 {\n width: 1.5rem;\n height: 1.5rem;\n}\r\n.h-10 {\n height: 2.5rem;\n}\r\n.h-2 {\n height: 0.5rem;\n}\r\n.h-3 {\n height: 0.75rem;\n}\r\n.h-5 {\n height: 1.25rem;\n}\r\n.h-8 {\n height: 2rem;\n}\r\n.h-\\[32px\\] {\n height: 32px;\n}\r\n.h-\\[calc\\(100\\%-32px\\)\\] {\n height: calc(100% - 32px);\n}\r\n.h-full {\n height: 100%;\n}\r\n.w-12 {\n width: 3rem;\n}\r\n.w-2 {\n width: 0.5rem;\n}\r\n.w-3 {\n width: 0.75rem;\n}\r\n.w-7 {\n width: 1.75rem;\n}\r\n.w-8 {\n width: 2rem;\n}\r\n.w-fit {\n width: -moz-fit-content;\n width: fit-content;\n}\r\n.w-full {\n width: 100%;\n}\r\n.shrink-0 {\n flex-shrink: 0;\n}\r\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\r\n.cursor-s-resize {\n cursor: s-resize;\n}\r\n.cursor-se-resize {\n cursor: se-resize;\n}\r\n.cursor-sw-resize {\n cursor: sw-resize;\n}\r\n.cursor-w-resize {\n cursor: w-resize;\n}\r\n.cursor-nw-resize {\n cursor: nw-resize;\n}\r\n.cursor-ne-resize {\n cursor: ne-resize;\n}\r\n.touch-none {\n touch-action: none;\n}\r\n.resize {\n resize: both;\n}\r\n.flex-col {\n flex-direction: column;\n}\r\n.items-center {\n align-items: center;\n}\r\n.justify-center {\n justify-content: center;\n}\r\n.gap-0\\.5 {\n gap: 0.125rem;\n}\r\n.gap-1 {\n gap: 0.25rem;\n}\r\n.gap-3 {\n gap: 0.75rem;\n}\r\n.overflow-auto {\n overflow: auto;\n}\r\n.overflow-hidden {\n overflow: hidden;\n}\r\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\r\n.rounded-md {\n border-radius: 0.375rem;\n}\r\n.rounded-sm {\n border-radius: 0.125rem;\n}\r\n.border {\n border-width: 1px;\n}\r\n.border-zinc-500 {\n --tw-border-opacity: 1;\n border-color: rgb(113 113 122 / var(--tw-border-opacity, 1));\n}\r\n.border-zinc-600 {\n --tw-border-opacity: 1;\n border-color: rgb(82 82 91 / var(--tw-border-opacity, 1));\n}\r\n.bg-neutral-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity, 1));\n}\r\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\r\n.bg-yellow-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(250 204 21 / var(--tw-bg-opacity, 1));\n}\r\n.bg-zinc-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(82 82 91 / var(--tw-bg-opacity, 1));\n}\r\n.bg-zinc-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));\n}\r\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\r\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\r\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\r\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\r\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\r\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\r\n.opacity-100 {\n opacity: 1;\n}\r\n.opacity-50 {\n opacity: 0.5;\n}\r\n.opacity-60 {\n opacity: 0.6;\n}\r\n.opacity-90 {\n opacity: 0.9;\n}\r\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\r\n.brightness-100 {\n --tw-brightness: brightness(1);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.brightness-150 {\n --tw-brightness: brightness(1.5);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.brightness-75 {\n --tw-brightness: brightness(.75);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.brightness-\\[85\\%\\] {\n --tw-brightness: brightness(85%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\r\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\r\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\r\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\r\n.hover\\:bg-red-500:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\r\n.hover\\:bg-zinc-300:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(212 212 216 / var(--tw-bg-opacity, 1));\n}\r\n.hover\\:bg-opacity-20:hover {\n --tw-bg-opacity: 0.2;\n}\r\n@media (min-width: 1280px) {\n\n .xl\\:p-0 {\n padding: 0px;\n }\n}"],"mappings":";AAAA;AAAA;AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAQF;AAAA;AAAA;AAGE;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AAAA;AAaF;AAAA;AAEE;AACA;AACA;AACA;AACG;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAQF;AACE;AACA;AAAA;AASF;AACE;AACA;AACA;AAAA;AAOF;AACE;AACQ;AAAA;AAOV;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AACA;AAAA;AAOF;AACE;AACA;AAAA;AAOF;AAAA;AAEE;AAAA;AAUF;AAAA;AAAA;AAAA;AAIE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAOF;AACE;AAAA;AAOF;AAAA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AAEF;AACE;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AAAA;AAEF;AAEE;AACE;AAAA;AAAA;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ type Coord = {
|
|
|
7
7
|
pointX: number;
|
|
8
8
|
pointY: number;
|
|
9
9
|
};
|
|
10
|
-
type ResizeState = false | 'bottom-height' | 'right-width' | 'top-height' | 'left-width' | 'bottom-right-all' | 'bottom-left-all';
|
|
10
|
+
type ResizeState = false | 'bottom-height' | 'right-width' | 'top-height' | 'left-width' | 'bottom-right-all' | 'bottom-left-all' | 'top-right-all' | 'top-left-all';
|
|
11
11
|
type WindowStore = {
|
|
12
12
|
windowId: string;
|
|
13
13
|
isActive: boolean;
|
|
@@ -41,6 +41,8 @@ type WindowStore = {
|
|
|
41
41
|
demaximizeWindow: () => void;
|
|
42
42
|
dockWindowRight: () => void;
|
|
43
43
|
dockWindowLeft: () => void;
|
|
44
|
+
dockWindowTop: () => void;
|
|
45
|
+
dockWindowBottom: () => void;
|
|
44
46
|
dockWindowBottomRight: () => void;
|
|
45
47
|
dockWindowTopRight: () => void;
|
|
46
48
|
dockWindowBottomLeft: () => void;
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,22 @@ var createWindowStore = (windowId, bottomOffsetPx) => {
|
|
|
72
72
|
winVisualState: "demaximized"
|
|
73
73
|
});
|
|
74
74
|
},
|
|
75
|
+
dockWindowTop: () => {
|
|
76
|
+
set({
|
|
77
|
+
winCoord: { pointX: 0, pointY: 0 },
|
|
78
|
+
winWidth: window.innerWidth,
|
|
79
|
+
winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,
|
|
80
|
+
winVisualState: "demaximized"
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
dockWindowBottom: () => {
|
|
84
|
+
set({
|
|
85
|
+
winCoord: { pointX: 0, pointY: window.innerHeight / 2 - bottomOffsetPx / 2 },
|
|
86
|
+
winWidth: window.innerWidth,
|
|
87
|
+
winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,
|
|
88
|
+
winVisualState: "demaximized"
|
|
89
|
+
});
|
|
90
|
+
},
|
|
75
91
|
dockWindowBottomRight: () => set({
|
|
76
92
|
winCoord: {
|
|
77
93
|
pointX: window.innerWidth / 2,
|
|
@@ -108,7 +124,7 @@ var createWindowStore = (windowId, bottomOffsetPx) => {
|
|
|
108
124
|
return storeInstance;
|
|
109
125
|
};
|
|
110
126
|
|
|
111
|
-
// src/window-manager/window-global-actions.ts
|
|
127
|
+
// src/window-manager/global-actions/window-global-actions.ts
|
|
112
128
|
var stopAllDragAndResize = () => {
|
|
113
129
|
for (const key of Object.keys(windowRegistry)) {
|
|
114
130
|
windowRegistry[key].getState().stopDragAndResize();
|
|
@@ -229,7 +245,7 @@ function WorkspaceLayout({ children }) {
|
|
|
229
245
|
}
|
|
230
246
|
|
|
231
247
|
// src/window-manager/window-layout.tsx
|
|
232
|
-
import { useEffect as
|
|
248
|
+
import { useEffect as useEffect4, useRef } from "react";
|
|
233
249
|
|
|
234
250
|
// src/window-assets/svg-win-icons.tsx
|
|
235
251
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -299,38 +315,123 @@ function iconWinMinimize() {
|
|
|
299
315
|
);
|
|
300
316
|
}
|
|
301
317
|
|
|
302
|
-
// src/window-manager/
|
|
318
|
+
// src/window-manager/components/docking-controls.tsx
|
|
319
|
+
import { useEffect as useEffect2, useState } from "react";
|
|
303
320
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
321
|
+
function DockingControls({ useWindowStore }) {
|
|
322
|
+
const {
|
|
323
|
+
isDragging,
|
|
324
|
+
dockWindowRight,
|
|
325
|
+
dockWindowLeft,
|
|
326
|
+
dockWindowBottom,
|
|
327
|
+
dockWindowTop,
|
|
328
|
+
dockWindowTopLeft,
|
|
329
|
+
dockWindowBottomLeft,
|
|
330
|
+
dockWindowTopRight,
|
|
331
|
+
dockWindowBottomRight
|
|
332
|
+
} = useWindowStore();
|
|
333
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
334
|
+
useEffect2(() => {
|
|
335
|
+
let dealy;
|
|
336
|
+
if (isDragging) {
|
|
337
|
+
dealy = setTimeout(() => {
|
|
338
|
+
setIsVisible(true);
|
|
339
|
+
}, 400);
|
|
340
|
+
} else {
|
|
341
|
+
setIsVisible(false);
|
|
342
|
+
}
|
|
343
|
+
return () => clearTimeout(dealy);
|
|
344
|
+
}, [isDragging]);
|
|
345
|
+
const cornerDockControl = /* @__PURE__ */ jsxs3("div", { className: `flex xl:p-0 shrink-0 gap-0.5`, children: [
|
|
346
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col justify-center gap-0.5", children: [
|
|
347
|
+
/* @__PURE__ */ jsx5(
|
|
348
|
+
"button",
|
|
349
|
+
{
|
|
350
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
|
|
351
|
+
onMouseUp: dockWindowTopLeft
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ jsx5(
|
|
355
|
+
"button",
|
|
356
|
+
{
|
|
357
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
|
|
358
|
+
onMouseUp: dockWindowBottomLeft
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
] }),
|
|
362
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col justify-center gap-0.5", children: [
|
|
363
|
+
/* @__PURE__ */ jsx5(
|
|
364
|
+
"button",
|
|
365
|
+
{
|
|
366
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
|
|
367
|
+
onMouseUp: dockWindowTopRight
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ jsx5(
|
|
371
|
+
"button",
|
|
372
|
+
{
|
|
373
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
|
|
374
|
+
onMouseUp: dockWindowBottomRight
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
] })
|
|
378
|
+
] });
|
|
379
|
+
const sideDideControl = /* @__PURE__ */ jsxs3("div", { className: `flex shrink-0 items-center gap-1`, children: [
|
|
380
|
+
/* @__PURE__ */ jsx5(
|
|
381
|
+
"button",
|
|
382
|
+
{
|
|
383
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-7 h-10 rounded-sm",
|
|
384
|
+
onMouseUp: dockWindowLeft
|
|
385
|
+
}
|
|
386
|
+
),
|
|
387
|
+
/* @__PURE__ */ jsx5(
|
|
388
|
+
"button",
|
|
389
|
+
{
|
|
390
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-7 h-10 rounded-sm",
|
|
391
|
+
onMouseUp: dockWindowRight
|
|
392
|
+
}
|
|
393
|
+
)
|
|
394
|
+
] });
|
|
395
|
+
const horizontalDockControl = /* @__PURE__ */ jsxs3("div", { className: `flex flex-col shrink-0 items-center gap-0.5`, children: [
|
|
396
|
+
/* @__PURE__ */ jsx5(
|
|
397
|
+
"button",
|
|
398
|
+
{
|
|
399
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-12 h-5 rounded-sm",
|
|
400
|
+
onMouseUp: dockWindowTop
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
/* @__PURE__ */ jsx5(
|
|
404
|
+
"button",
|
|
405
|
+
{
|
|
406
|
+
className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-12 h-5 rounded-sm",
|
|
407
|
+
onMouseUp: dockWindowBottom
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
] });
|
|
411
|
+
const windowDockPannel = /* @__PURE__ */ jsxs3(
|
|
412
|
+
"section",
|
|
413
|
+
{
|
|
414
|
+
className: `
|
|
415
|
+
flex w-fit border border-zinc-600 rounded-md bg-zinc-800 opacity-50
|
|
416
|
+
overflow-hidden px-4 gap-3 h-full py-2 pointer-events-auto
|
|
417
|
+
`,
|
|
418
|
+
children: [
|
|
419
|
+
cornerDockControl,
|
|
420
|
+
horizontalDockControl,
|
|
421
|
+
sideDideControl
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
);
|
|
425
|
+
return /* @__PURE__ */ jsx5("div", { className: "absolute z-50 flex items-center justify-center top-2 w-full mx-auto pointer-events-none", children: isVisible && windowDockPannel });
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// src/window-manager/components/resizing-controls.tsx
|
|
429
|
+
import { useEffect as useEffect3 } from "react";
|
|
430
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
431
|
+
function ResizingControls({ useWindowStore, windowRef }) {
|
|
319
432
|
const { x, y } = useScreenState();
|
|
320
|
-
const windowRef = useRef(null);
|
|
321
433
|
const {
|
|
322
|
-
windowId,
|
|
323
|
-
zIndex,
|
|
324
|
-
isActive,
|
|
325
|
-
setSelf,
|
|
326
|
-
resetFlag,
|
|
327
|
-
winVisualState,
|
|
328
434
|
setWinVisualState,
|
|
329
|
-
isWinMinimized,
|
|
330
|
-
dragClickOffset,
|
|
331
|
-
setDragClickOffset,
|
|
332
|
-
isDragging,
|
|
333
|
-
setIsDragging,
|
|
334
435
|
winCoord,
|
|
335
436
|
setWinCoord,
|
|
336
437
|
isResizing,
|
|
@@ -339,47 +440,10 @@ function WindowLayout({
|
|
|
339
440
|
setWinWidth,
|
|
340
441
|
winHeight,
|
|
341
442
|
setWinHeight,
|
|
342
|
-
minimizeWindow,
|
|
343
|
-
maximizeWindow,
|
|
344
|
-
demaximizeWindow,
|
|
345
|
-
dockWindowRight,
|
|
346
|
-
dockWindowLeft,
|
|
347
|
-
dockWindowTopLeft,
|
|
348
|
-
dockWindowBottomLeft,
|
|
349
|
-
dockWindowTopRight,
|
|
350
|
-
dockWindowBottomRight,
|
|
351
443
|
WIN_MIN_WIDTH,
|
|
352
444
|
WIN_MIN_HEIGHT
|
|
353
445
|
} = useWindowStore();
|
|
354
|
-
|
|
355
|
-
setSelf(windowRef);
|
|
356
|
-
if (isMobile())
|
|
357
|
-
maximizeWindow();
|
|
358
|
-
else if (defaultDock === "left")
|
|
359
|
-
dockWindowLeft();
|
|
360
|
-
else if (defaultDock === "right")
|
|
361
|
-
dockWindowRight();
|
|
362
|
-
else if (defaultDock === "full")
|
|
363
|
-
maximizeWindow();
|
|
364
|
-
else
|
|
365
|
-
demaximizeWindow();
|
|
366
|
-
}, [setSelf, windowRef, resetFlag]);
|
|
367
|
-
useEffect2(() => {
|
|
368
|
-
if (isMobile())
|
|
369
|
-
return;
|
|
370
|
-
if (!isDragging)
|
|
371
|
-
return;
|
|
372
|
-
if (winVisualState === "maximized")
|
|
373
|
-
demaximizeWindow();
|
|
374
|
-
let adjustedX = x - dragClickOffset.pointX;
|
|
375
|
-
if (x > window.innerWidth || x < 0)
|
|
376
|
-
adjustedX = winCoord.pointX;
|
|
377
|
-
let adjustedY = y - dragClickOffset.pointY;
|
|
378
|
-
if (y > window.innerHeight || y < 0)
|
|
379
|
-
adjustedY = winCoord.pointY;
|
|
380
|
-
setWinCoord({ pointX: adjustedX, pointY: adjustedY });
|
|
381
|
-
}, [isDragging, x, y]);
|
|
382
|
-
useEffect2(() => {
|
|
446
|
+
useEffect3(() => {
|
|
383
447
|
if (!isResizing)
|
|
384
448
|
return;
|
|
385
449
|
setWinVisualState("demaximized");
|
|
@@ -395,14 +459,11 @@ function WindowLayout({
|
|
|
395
459
|
resizeRightBottomWidthAndHeight();
|
|
396
460
|
if (isResizing === "bottom-left-all")
|
|
397
461
|
resizeLeftBottomWidthAndHeight();
|
|
462
|
+
if (isResizing === "top-right-all")
|
|
463
|
+
resizeRightTopWidthAndHeight();
|
|
464
|
+
if (isResizing === "top-left-all")
|
|
465
|
+
resizeLeftTopWidthAndHeight();
|
|
398
466
|
}, [isResizing, x, y]);
|
|
399
|
-
const handleNavbarClick = (isDragging2) => {
|
|
400
|
-
setDragClickOffset({ pointX: x - winCoord.pointX, pointY: y - winCoord.pointY });
|
|
401
|
-
setIsDragging(isDragging2);
|
|
402
|
-
};
|
|
403
|
-
const isMobile = () => {
|
|
404
|
-
return window.innerWidth < responsiveBreakInPx[responsiveBreak];
|
|
405
|
-
};
|
|
406
467
|
const resizeRightWinWidth = () => {
|
|
407
468
|
const winBox = windowRef.current?.getBoundingClientRect();
|
|
408
469
|
if (!winBox)
|
|
@@ -430,32 +491,33 @@ function WindowLayout({
|
|
|
430
491
|
setWinWidth(winWidth + sizeDiff);
|
|
431
492
|
setWinCoord({ pointX: x, pointY: winCoord.pointY });
|
|
432
493
|
};
|
|
433
|
-
const
|
|
494
|
+
const resizeTopWinHeight = (winXOverride) => {
|
|
434
495
|
const winBox = windowRef.current?.getBoundingClientRect();
|
|
435
496
|
if (!winBox)
|
|
436
497
|
return;
|
|
437
|
-
const minWinHeight =
|
|
498
|
+
const minWinHeight = winBox.bottom - y < WIN_MIN_HEIGHT;
|
|
438
499
|
if (minWinHeight)
|
|
439
500
|
return;
|
|
440
501
|
const cursorOutOfBounds = y > window.innerHeight || y < 0;
|
|
441
502
|
if (cursorOutOfBounds)
|
|
442
503
|
return;
|
|
443
|
-
const sizeDiff =
|
|
504
|
+
const sizeDiff = winBox.top - y;
|
|
444
505
|
setWinHeight(winHeight + sizeDiff);
|
|
506
|
+
const winX = winXOverride ? winXOverride : winCoord.pointX;
|
|
507
|
+
setWinCoord({ pointX: winX, pointY: y });
|
|
445
508
|
};
|
|
446
|
-
const
|
|
509
|
+
const resizeBottomWinHeight = () => {
|
|
447
510
|
const winBox = windowRef.current?.getBoundingClientRect();
|
|
448
511
|
if (!winBox)
|
|
449
512
|
return;
|
|
450
|
-
const minWinHeight =
|
|
513
|
+
const minWinHeight = y - winBox.top < WIN_MIN_HEIGHT;
|
|
451
514
|
if (minWinHeight)
|
|
452
515
|
return;
|
|
453
516
|
const cursorOutOfBounds = y > window.innerHeight || y < 0;
|
|
454
517
|
if (cursorOutOfBounds)
|
|
455
518
|
return;
|
|
456
|
-
const sizeDiff =
|
|
519
|
+
const sizeDiff = y - winBox.bottom;
|
|
457
520
|
setWinHeight(winHeight + sizeDiff);
|
|
458
|
-
setWinCoord({ pointX: winCoord.pointX, pointY: y });
|
|
459
521
|
};
|
|
460
522
|
const resizeRightBottomWidthAndHeight = () => {
|
|
461
523
|
resizeRightWinWidth();
|
|
@@ -465,67 +527,209 @@ function WindowLayout({
|
|
|
465
527
|
resizeLeftWinWidth();
|
|
466
528
|
resizeBottomWinHeight();
|
|
467
529
|
};
|
|
530
|
+
const resizeRightTopWidthAndHeight = () => {
|
|
531
|
+
resizeRightWinWidth();
|
|
532
|
+
resizeTopWinHeight();
|
|
533
|
+
};
|
|
534
|
+
const resizeLeftTopWidthAndHeight = () => {
|
|
535
|
+
resizeLeftWinWidth();
|
|
536
|
+
resizeTopWinHeight(x);
|
|
537
|
+
};
|
|
468
538
|
const handleResizeClick = (isResizing2) => {
|
|
469
539
|
setIsResizing(isResizing2);
|
|
470
540
|
};
|
|
471
|
-
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
541
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
542
|
+
/* @__PURE__ */ jsx6(
|
|
543
|
+
"span",
|
|
544
|
+
{
|
|
545
|
+
onMouseDown: () => handleResizeClick("right-width"),
|
|
546
|
+
id: "win-resize-width",
|
|
547
|
+
className: "fixed w-2 opacity-60 cursor-w-resize z-10",
|
|
548
|
+
style: {
|
|
549
|
+
top: `${winCoord.pointY}px`,
|
|
550
|
+
left: `${winCoord.pointX + winWidth - 4}px`,
|
|
551
|
+
height: `${winHeight}px`
|
|
478
552
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
553
|
+
}
|
|
554
|
+
),
|
|
555
|
+
/* @__PURE__ */ jsx6(
|
|
556
|
+
"span",
|
|
557
|
+
{
|
|
558
|
+
onMouseDown: () => handleResizeClick("left-width"),
|
|
559
|
+
id: "win-resize-width",
|
|
560
|
+
className: "fixed w-2 opacity-60 cursor-w-resize z-10",
|
|
561
|
+
style: {
|
|
562
|
+
top: `${winCoord.pointY}px`,
|
|
563
|
+
left: `${winCoord.pointX - 4}px`,
|
|
564
|
+
height: `${winHeight}px`
|
|
485
565
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ jsx6(
|
|
569
|
+
"span",
|
|
570
|
+
{
|
|
571
|
+
onMouseDown: () => handleResizeClick("bottom-height"),
|
|
572
|
+
id: "win-resize-height",
|
|
573
|
+
className: "fixed h-2 opacity-60 cursor-s-resize z-10",
|
|
574
|
+
style: {
|
|
575
|
+
top: `${winCoord.pointY + winHeight - 6}px`,
|
|
576
|
+
left: `${winCoord.pointX}px`,
|
|
577
|
+
width: `${winWidth}px`
|
|
494
578
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
579
|
+
}
|
|
580
|
+
),
|
|
581
|
+
/* @__PURE__ */ jsx6(
|
|
582
|
+
"span",
|
|
583
|
+
{
|
|
584
|
+
onMouseDown: () => handleResizeClick("top-height"),
|
|
585
|
+
id: "win-resize-height",
|
|
586
|
+
className: "fixed h-2 opacity-60 cursor-s-resize z-10",
|
|
587
|
+
style: {
|
|
588
|
+
top: `${winCoord.pointY - 6}px`,
|
|
589
|
+
left: `${winCoord.pointX}px`,
|
|
590
|
+
width: `${winWidth}px`
|
|
501
591
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
/* @__PURE__ */ jsx5(
|
|
507
|
-
"button",
|
|
592
|
+
}
|
|
593
|
+
),
|
|
594
|
+
/* @__PURE__ */ jsx6(
|
|
595
|
+
"span",
|
|
508
596
|
{
|
|
509
|
-
|
|
510
|
-
|
|
597
|
+
onMouseDown: () => handleResizeClick("bottom-right-all"),
|
|
598
|
+
id: "win-resize-all",
|
|
599
|
+
className: "fixed h-3 w-3 opacity-60 cursor-se-resize z-20",
|
|
600
|
+
style: {
|
|
601
|
+
top: `${winCoord.pointY + winHeight - 8}px`,
|
|
602
|
+
left: `${winCoord.pointX + winWidth - 8}px`
|
|
603
|
+
}
|
|
511
604
|
}
|
|
512
605
|
),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
"
|
|
606
|
+
/* @__PURE__ */ jsx6(
|
|
607
|
+
"span",
|
|
515
608
|
{
|
|
516
|
-
|
|
517
|
-
|
|
609
|
+
onMouseDown: () => handleResizeClick("bottom-left-all"),
|
|
610
|
+
id: "win-resize-all",
|
|
611
|
+
className: "fixed h-3 w-3 opacity-60 cursor-sw-resize z-20",
|
|
612
|
+
style: {
|
|
613
|
+
top: `${winCoord.pointY + winHeight - 8}px`,
|
|
614
|
+
left: `${winCoord.pointX - 8}px`
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
/* @__PURE__ */ jsx6(
|
|
619
|
+
"span",
|
|
620
|
+
{
|
|
621
|
+
onMouseDown: () => handleResizeClick("top-right-all"),
|
|
622
|
+
id: "win-resize-all",
|
|
623
|
+
className: "fixed h-3 w-3 opacity-60 cursor-ne-resize z-20",
|
|
624
|
+
style: {
|
|
625
|
+
top: `${winCoord.pointY - 6}px`,
|
|
626
|
+
left: `${winCoord.pointX + winWidth - 6}px`
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
),
|
|
630
|
+
/* @__PURE__ */ jsx6(
|
|
631
|
+
"span",
|
|
632
|
+
{
|
|
633
|
+
onMouseDown: () => handleResizeClick("top-left-all"),
|
|
634
|
+
id: "win-resize-all",
|
|
635
|
+
className: "fixed h-3 w-3 opacity-60 cursor-nw-resize z-20",
|
|
636
|
+
style: {
|
|
637
|
+
top: `${winCoord.pointY - 6}px`,
|
|
638
|
+
left: `${winCoord.pointX - 6}px`
|
|
639
|
+
}
|
|
518
640
|
}
|
|
519
641
|
)
|
|
520
642
|
] });
|
|
521
|
-
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// src/window-manager/window-layout.tsx
|
|
646
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
647
|
+
var responsiveBreakInPx = {
|
|
648
|
+
sm: 640,
|
|
649
|
+
md: 768,
|
|
650
|
+
lg: 1024,
|
|
651
|
+
xl: 1280,
|
|
652
|
+
never: 0
|
|
653
|
+
};
|
|
654
|
+
function WindowLayout({
|
|
655
|
+
responsiveBreak = "lg",
|
|
656
|
+
children,
|
|
657
|
+
windowName,
|
|
658
|
+
navbarChildren,
|
|
659
|
+
useWindowStore,
|
|
660
|
+
defaultDock
|
|
661
|
+
}) {
|
|
662
|
+
const { x, y } = useScreenState();
|
|
663
|
+
const windowRef = useRef(null);
|
|
664
|
+
const {
|
|
665
|
+
windowId,
|
|
666
|
+
zIndex,
|
|
667
|
+
isActive,
|
|
668
|
+
setSelf,
|
|
669
|
+
resetFlag,
|
|
670
|
+
winVisualState,
|
|
671
|
+
isWinMinimized,
|
|
672
|
+
dragClickOffset,
|
|
673
|
+
setDragClickOffset,
|
|
674
|
+
isDragging,
|
|
675
|
+
setIsDragging,
|
|
676
|
+
winCoord,
|
|
677
|
+
setWinCoord,
|
|
678
|
+
setIsResizing,
|
|
679
|
+
winWidth,
|
|
680
|
+
winHeight,
|
|
681
|
+
minimizeWindow,
|
|
682
|
+
maximizeWindow,
|
|
683
|
+
demaximizeWindow,
|
|
684
|
+
dockWindowRight,
|
|
685
|
+
dockWindowLeft
|
|
686
|
+
} = useWindowStore();
|
|
687
|
+
useEffect4(() => {
|
|
688
|
+
setSelf(windowRef);
|
|
689
|
+
if (isMobile())
|
|
690
|
+
maximizeWindow();
|
|
691
|
+
else if (defaultDock === "left")
|
|
692
|
+
dockWindowLeft();
|
|
693
|
+
else if (defaultDock === "right")
|
|
694
|
+
dockWindowRight();
|
|
695
|
+
else if (defaultDock === "full")
|
|
696
|
+
maximizeWindow();
|
|
697
|
+
else
|
|
698
|
+
demaximizeWindow();
|
|
699
|
+
}, [setSelf, windowRef, resetFlag]);
|
|
700
|
+
useEffect4(() => {
|
|
701
|
+
if (isMobile())
|
|
702
|
+
return;
|
|
703
|
+
if (!isDragging)
|
|
704
|
+
return;
|
|
705
|
+
if (winVisualState === "maximized")
|
|
706
|
+
demaximizeWindow();
|
|
707
|
+
let adjustedX = x - dragClickOffset.pointX;
|
|
708
|
+
if (x > window.innerWidth || x < 0)
|
|
709
|
+
adjustedX = winCoord.pointX;
|
|
710
|
+
let adjustedY = y - dragClickOffset.pointY;
|
|
711
|
+
if (y > window.innerHeight || y < 0)
|
|
712
|
+
adjustedY = winCoord.pointY;
|
|
713
|
+
setWinCoord({ pointX: adjustedX, pointY: adjustedY });
|
|
714
|
+
}, [isDragging, x, y]);
|
|
715
|
+
const handleNavbarClick = (isDragging2) => {
|
|
716
|
+
setDragClickOffset({ pointX: x - winCoord.pointX, pointY: y - winCoord.pointY });
|
|
717
|
+
setIsDragging(isDragging2);
|
|
718
|
+
};
|
|
719
|
+
const isMobile = () => {
|
|
720
|
+
return window.innerWidth < responsiveBreakInPx[responsiveBreak];
|
|
721
|
+
};
|
|
722
|
+
const handleResizeClick = (isResizing) => {
|
|
723
|
+
setIsResizing(isResizing);
|
|
724
|
+
};
|
|
725
|
+
const maximizeControl = winVisualState === "maximized" ? /* @__PURE__ */ jsx7(
|
|
522
726
|
"button",
|
|
523
727
|
{
|
|
524
728
|
className: `block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`,
|
|
525
729
|
onClick: demaximizeWindow,
|
|
526
730
|
children: iconWinDemaximize()
|
|
527
731
|
}
|
|
528
|
-
) : /* @__PURE__ */
|
|
732
|
+
) : /* @__PURE__ */ jsx7(
|
|
529
733
|
"button",
|
|
530
734
|
{
|
|
531
735
|
className: `block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`,
|
|
@@ -533,136 +737,63 @@ function WindowLayout({
|
|
|
533
737
|
children: iconWinMaximize()
|
|
534
738
|
}
|
|
535
739
|
);
|
|
536
|
-
const minimizeControl = /* @__PURE__ */
|
|
537
|
-
return /* @__PURE__ */
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
740
|
+
const minimizeControl = /* @__PURE__ */ jsx7("button", { className: "hover:bg-red-500 hover:bg-opacity-20 px-5 h-full", onClick: minimizeWindow, children: iconWinMinimize() });
|
|
741
|
+
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
742
|
+
!isMobile() && /* @__PURE__ */ jsx7(DockingControls, { useWindowStore }),
|
|
743
|
+
/* @__PURE__ */ jsxs5(
|
|
744
|
+
"div",
|
|
745
|
+
{
|
|
746
|
+
onMouseDown: () => bringTargetWindowToFront(windowId),
|
|
747
|
+
id: windowId,
|
|
748
|
+
ref: windowRef,
|
|
749
|
+
style: {
|
|
750
|
+
top: `${winCoord.pointY}px`,
|
|
751
|
+
left: `${winCoord.pointX}px`,
|
|
752
|
+
width: `${winWidth}px`,
|
|
753
|
+
height: `${winHeight}px`,
|
|
754
|
+
zIndex: `${zIndex}`,
|
|
755
|
+
/* MINIMIZE LOGIC */
|
|
756
|
+
transition: "transform 0.2s ease-in-out, opacity 0.3s ease-in-out",
|
|
757
|
+
opacity: isWinMinimized ? 0 : 1,
|
|
758
|
+
transform: isWinMinimized ? `translate(${window.innerWidth / 2 - winCoord.pointX - winWidth / 2}px,
|
|
553
759
|
${window.innerHeight - winCoord.pointY - winHeight / 2}px) scale(0.02)` : ""
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
760
|
+
},
|
|
761
|
+
onMouseUp: () => {
|
|
762
|
+
handleNavbarClick(false);
|
|
763
|
+
handleResizeClick(false);
|
|
764
|
+
},
|
|
765
|
+
className: `fixed bg-white shadow-lg border border-zinc-600`,
|
|
766
|
+
children: [
|
|
767
|
+
/* @__PURE__ */ jsxs5(
|
|
768
|
+
"nav",
|
|
769
|
+
{
|
|
770
|
+
className: `h-[32px] w-full bg-neutral-800 flex items-center
|
|
565
771
|
${isActive ? "brightness-100 opacity-100" : "brightness-75 opacity-90"}`,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
minimizeControl
|
|
583
|
-
]
|
|
584
|
-
}
|
|
585
|
-
),
|
|
586
|
-
/* @__PURE__ */ jsx5(
|
|
587
|
-
"span",
|
|
588
|
-
{
|
|
589
|
-
onMouseDown: () => handleResizeClick("right-width"),
|
|
590
|
-
id: "win-resize-width",
|
|
591
|
-
className: "fixed w-2 opacity-60 cursor-w-resize z-10",
|
|
592
|
-
style: {
|
|
593
|
-
top: `${winCoord.pointY}px`,
|
|
594
|
-
left: `${winCoord.pointX + winWidth - 4}px`,
|
|
595
|
-
height: `${winHeight}px`
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
),
|
|
599
|
-
/* @__PURE__ */ jsx5(
|
|
600
|
-
"span",
|
|
601
|
-
{
|
|
602
|
-
onMouseDown: () => handleResizeClick("left-width"),
|
|
603
|
-
id: "win-resize-width",
|
|
604
|
-
className: "fixed w-2 opacity-60 cursor-w-resize z-10",
|
|
605
|
-
style: {
|
|
606
|
-
top: `${winCoord.pointY}px`,
|
|
607
|
-
left: `${winCoord.pointX - 4}px`,
|
|
608
|
-
height: `${winHeight}px`
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
),
|
|
612
|
-
/* @__PURE__ */ jsx5(
|
|
613
|
-
"span",
|
|
614
|
-
{
|
|
615
|
-
onMouseDown: () => handleResizeClick("bottom-height"),
|
|
616
|
-
id: "win-resize-height",
|
|
617
|
-
className: "fixed h-2 opacity-60 cursor-s-resize z-10",
|
|
618
|
-
style: {
|
|
619
|
-
top: `${winCoord.pointY + winHeight - 6}px`,
|
|
620
|
-
left: `${winCoord.pointX}px`,
|
|
621
|
-
width: `${winWidth}px`
|
|
772
|
+
children: [
|
|
773
|
+
/* @__PURE__ */ jsxs5("div", { className: "w-fit shrink-0 h-8 px-2 text-white flex items-center text-sm truncate", children: [
|
|
774
|
+
windowName,
|
|
775
|
+
navbarChildren
|
|
776
|
+
] }),
|
|
777
|
+
/* @__PURE__ */ jsx7(
|
|
778
|
+
"div",
|
|
779
|
+
{
|
|
780
|
+
onMouseDown: () => handleNavbarClick(true),
|
|
781
|
+
onDoubleClick: maximizeWindow,
|
|
782
|
+
className: "w-full h-8 px-2 text-white flex items-center text-sm truncate"
|
|
783
|
+
}
|
|
784
|
+
),
|
|
785
|
+
!isMobile() && maximizeControl,
|
|
786
|
+
minimizeControl
|
|
787
|
+
]
|
|
622
788
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
style: {
|
|
632
|
-
top: `${winCoord.pointY - 6}px`,
|
|
633
|
-
left: `${winCoord.pointX}px`,
|
|
634
|
-
width: `${winWidth}px`
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
),
|
|
638
|
-
/* @__PURE__ */ jsx5(
|
|
639
|
-
"span",
|
|
640
|
-
{
|
|
641
|
-
onMouseDown: () => handleResizeClick("bottom-right-all"),
|
|
642
|
-
id: "win-resize-all",
|
|
643
|
-
className: "fixed h-3 w-3 opacity-60 cursor-se-resize z-20",
|
|
644
|
-
style: {
|
|
645
|
-
top: `${winCoord.pointY + winHeight - 8}px`,
|
|
646
|
-
left: `${winCoord.pointX + winWidth - 8}px`
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
),
|
|
650
|
-
/* @__PURE__ */ jsx5(
|
|
651
|
-
"span",
|
|
652
|
-
{
|
|
653
|
-
onMouseDown: () => handleResizeClick("bottom-left-all"),
|
|
654
|
-
id: "win-resize-all",
|
|
655
|
-
className: "fixed h-3 w-3 opacity-60 cursor-sw-resize z-20",
|
|
656
|
-
style: {
|
|
657
|
-
top: `${winCoord.pointY + winHeight - 8}px`,
|
|
658
|
-
left: `${winCoord.pointX - 8}px`
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
),
|
|
662
|
-
/* @__PURE__ */ jsx5("div", { className: `w-full h-[calc(100%-32px)] overflow-auto`, children })
|
|
663
|
-
]
|
|
664
|
-
}
|
|
665
|
-
);
|
|
789
|
+
),
|
|
790
|
+
!isMobile() && /* @__PURE__ */ jsx7(ResizingControls, { useWindowStore, windowRef }),
|
|
791
|
+
/* @__PURE__ */ jsx7("div", { className: `relative w-full h-[calc(100%-32px)] overflow-auto`, children })
|
|
792
|
+
]
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
" "
|
|
796
|
+
] });
|
|
666
797
|
}
|
|
667
798
|
export {
|
|
668
799
|
WindowButton,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/window-manager/window-store-factory.tsx","../src/window-manager/window-global-actions.ts","../src/window-manager/window-button.tsx","../src/screen-manager/screen-state.ts","../src/screen-manager/screen-listeners.tsx","../src/window-manager/workspace-layout.tsx","../src/window-manager/window-layout.tsx","../src/window-assets/svg-win-icons.tsx"],"sourcesContent":["import { create, StoreApi, UseBoundStore } from 'zustand'\r\nimport { RefObject } from 'react'\r\nimport { Coord, ResizeState, WindowStates, WindowStore } from './window-types'\r\n\r\nexport const windowRegistry: Record<string, UseBoundStore<StoreApi<WindowStore>>> = {}\r\n\r\nexport const createWindowStore = (windowId: string, bottomOffsetPx: number) => {\r\n if (windowRegistry[windowId]) console.error('This store ID is already in use: ' + windowId)\r\n\r\n const zIndexAtLaunch = Object.keys(windowRegistry).length + 1\r\n\r\n const storeInstance = create<WindowStore>((set, get) => ({\r\n windowId: windowId,\r\n\r\n isActive: false,\r\n setIsActive: (isActive: boolean) => set({ isActive: isActive }),\r\n\r\n resetFlag: false,\r\n reset: () => set({ resetFlag: !get().resetFlag, isWinMinimized: true }),\r\n\r\n zIndex: zIndexAtLaunch,\r\n setZIndex: (newIndex: number) => set({ zIndex: newIndex }),\r\n\r\n self: undefined,\r\n setSelf: (ref: RefObject<HTMLDivElement | null>) => set({ self: ref }),\r\n\r\n winVisualState: 'demaximized',\r\n setWinVisualState: (newState: WindowStates) => set({ winVisualState: newState }),\r\n\r\n isWinMinimized: true,\r\n setIsWinMinimized: (isMini: boolean) => set({ isWinMinimized: isMini }),\r\n\r\n dragClickOffset: { pointX: 0, pointY: 0 },\r\n setDragClickOffset: (newCoord: Coord) =>\r\n set({ dragClickOffset: { pointX: newCoord.pointX, pointY: newCoord.pointY } }),\r\n\r\n isDragging: false,\r\n setIsDragging: (updatedIsDragging: boolean) => set({ isDragging: updatedIsDragging }),\r\n\r\n winCoord: { pointX: 40, pointY: 40 },\r\n setWinCoord: (newWinCoord: Coord) =>\r\n set({ winCoord: { pointX: newWinCoord.pointX, pointY: newWinCoord.pointY } }),\r\n\r\n isResizing: false,\r\n setIsResizing: (updatedIsResizing: ResizeState) => set({ isResizing: updatedIsResizing }),\r\n\r\n winWidth: window.innerWidth * 0.95,\r\n setWinWidth: (newWinWidth: number) => set({ winWidth: newWinWidth }),\r\n\r\n winHeight: window.innerHeight * 0.75,\r\n setWinHeight: (newWinHeight: number) => set({ winHeight: newWinHeight }),\r\n\r\n stopDragAndResize: () => set({ isDragging: false, isResizing: false }),\r\n\r\n maximizeWindow: () => {\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winHeight: window.innerHeight - bottomOffsetPx,\r\n winWidth: window.innerWidth,\r\n winVisualState: 'maximized',\r\n })\r\n },\r\n demaximizeWindow: () => {\r\n set({\r\n winCoord: { pointX: 40, pointY: 40 },\r\n winWidth: window.innerWidth * 0.95,\r\n winHeight: window.innerHeight * 0.75,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n\r\n minimizeWindow: () => set({ isWinMinimized: true }),\r\n openWindow: () => {\r\n const winRef = get().self\r\n if (get().isWinMinimized && winRef?.current) {\r\n set({ isWinMinimized: false })\r\n winRef.current.style.transform = 'translate(0, 0) scale(1)'\r\n }\r\n },\r\n\r\n dockWindowRight: () => {\r\n set({\r\n winCoord: { pointX: window.innerWidth / 2, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight - bottomOffsetPx,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n dockWindowLeft: () => {\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight - bottomOffsetPx,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n\r\n dockWindowBottomRight: () =>\r\n set({\r\n winCoord: {\r\n pointX: window.innerWidth / 2,\r\n pointY: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n dockWindowTopRight: () =>\r\n set({\r\n winCoord: { pointX: window.innerWidth / 2, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n\r\n dockWindowBottomLeft: () =>\r\n set({\r\n winCoord: { pointX: 0, pointY: window.innerHeight / 2 - bottomOffsetPx / 2 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n dockWindowTopLeft: () =>\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n\r\n WIN_MIN_WIDTH: 360,\r\n WIN_MIN_HEIGHT: 240,\r\n setWIN_MIN_WIDTH: (w: number) => set({ WIN_MIN_WIDTH: w }),\r\n setWIN_MIN_HEIGHT: (h: number) => set({ WIN_MIN_HEIGHT: h }),\r\n }))\r\n\r\n windowRegistry[windowId] = storeInstance\r\n\r\n return storeInstance\r\n}\r\n","import { windowRegistry } from './window-store-factory'\r\n\r\nexport const stopAllDragAndResize = () => {\r\n for (const key of Object.keys(windowRegistry)) {\r\n windowRegistry[key].getState().stopDragAndResize()\r\n }\r\n}\r\n\r\nexport const resetAllWindows = () => {\r\n for (const key of Object.keys(windowRegistry)) {\r\n windowRegistry[key].getState().reset()\r\n }\r\n}\r\n\r\nexport const bringTargetWindowToFront = (targetId: string) => {\r\n const targetWindow = windowRegistry[targetId].getState()\r\n\r\n for (const key of Object.keys(windowRegistry)) {\r\n const window = windowRegistry[key].getState()\r\n\r\n if (window.windowId === targetWindow.windowId) {\r\n continue\r\n }\r\n\r\n window.setIsActive(false)\r\n if (window.zIndex >= targetWindow.zIndex) {\r\n window.setZIndex(window.zIndex - 1)\r\n }\r\n }\r\n\r\n targetWindow.setZIndex(Object.keys(windowRegistry).length)\r\n targetWindow.setIsActive(true)\r\n}\r\n","import { StoreApi, UseBoundStore } from 'zustand'\r\nimport { WindowStore } from './window-types'\r\nimport { bringTargetWindowToFront } from './window-global-actions'\r\n\r\ntype StoreProp = {\r\n children: React.ReactNode\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n styles?: string\r\n closedStyle?: string\r\n openStyle?: string\r\n}\r\n\r\nexport default function WindowButton({\r\n children,\r\n useWindowStore,\r\n styles,\r\n closedStyle = 'brightness-[85%]',\r\n openStyle = 'brightness-150',\r\n}: StoreProp) {\r\n const { openWindow, minimizeWindow, isWinMinimized, windowId, isActive } = useWindowStore()\r\n\r\n const handleOpenCloseWin = () => {\r\n if (isWinMinimized) {\r\n bringTargetWindowToFront(windowId)\r\n openWindow()\r\n return\r\n }\r\n\r\n if (isActive) {\r\n minimizeWindow()\r\n }\r\n\r\n bringTargetWindowToFront(windowId)\r\n }\r\n\r\n return (\r\n <button\r\n id={`${windowId}_button`}\r\n onClick={handleOpenCloseWin}\r\n className={`\r\n ${styles} \r\n ${isWinMinimized ? closedStyle : openStyle}`}\r\n >\r\n {children}\r\n </button>\r\n )\r\n}\r\n","import { create } from 'zustand'\r\n\r\n/** @Note\r\n *The word SCREEN is being used to distinguish between the\r\n * window feature in this library and the real browser window\r\n * SCREEN == BROWSER REAL WINDOW\r\n */\r\ntype ScreenState = {\r\n x: number\r\n y: number\r\n setX: (x: number) => void\r\n setY: (y: number) => void\r\n}\r\n\r\nexport const useScreenState = create<ScreenState>((set) => ({\r\n x: 10,\r\n y: 10,\r\n setX: (newX: number) => set({ x: newX }),\r\n setY: (newY: number) => set({ y: newY }),\r\n}))\r\n","import { resetAllWindows } from '../window-manager/window-global-actions'\r\nimport { useScreenState } from './screen-state'\r\nimport { useEffect } from 'react'\r\n\r\nexport default function ScreenListeners() {\r\n return (\r\n <>\r\n <CursorCoordinates />\r\n <WindowResizeReset />\r\n </>\r\n )\r\n}\r\n\r\n/* FIX ME: Until I find a better way to handle window resize, the state restes on resize */\r\nfunction WindowResizeReset() {\r\n useEffect(() => {\r\n const handleWindowResize = () => {\r\n resetAllWindows()\r\n }\r\n\r\n window.addEventListener('resize', handleWindowResize)\r\n\r\n return () => document.removeEventListener('pointermove', handleWindowResize)\r\n }, [])\r\n\r\n return <></>\r\n}\r\n\r\nfunction CursorCoordinates() {\r\n const { setX, setY } = useScreenState()\r\n\r\n useEffect(() => {\r\n const handleWindowPosition = (e: MouseEvent) => {\r\n e.preventDefault()\r\n setX(e.clientX)\r\n setY(e.clientY)\r\n }\r\n\r\n document.addEventListener('pointermove', handleWindowPosition)\r\n\r\n return () => document.removeEventListener('pointermove', handleWindowPosition)\r\n }, [setX, setY])\r\n\r\n return <></>\r\n}\r\n","import ScreenListeners from '../screen-manager/screen-listeners'\r\nimport { stopAllDragAndResize } from './window-global-actions'\r\n\r\ntype Props = {\r\n children: React.ReactNode\r\n}\r\n\r\nexport default function WorkspaceLayout({ children }: Props) {\r\n return (\r\n <main\r\n onMouseLeave={stopAllDragAndResize}\r\n onMouseUp={stopAllDragAndResize}\r\n className=\"absolute overflow-hidden h-full w-full touch-none\"\r\n >\r\n <ScreenListeners />\r\n {children}\r\n </main>\r\n )\r\n}\r\n","import { useScreenState } from '../screen-manager/screen-state'\r\nimport { useEffect, useRef } from 'react'\r\nimport { StoreApi, UseBoundStore } from 'zustand'\r\nimport { WindowStore, ResizeState } from './window-types'\r\nimport { iconWinMinimize, iconWinDemaximize, iconWinMaximize } from '../window-assets/svg-win-icons'\r\nimport { bringTargetWindowToFront } from './window-global-actions'\r\n\r\ntype StoreProp = {\r\n responsiveBreak?: 'sm' | 'md' | 'lg' | 'xl' | 'never'\r\n children: React.ReactNode\r\n windowName: string | React.ReactNode\r\n navbarChildren?: React.ReactNode\r\n defaultDock?: 'right' | 'left' | 'full'\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n}\r\n\r\nconst responsiveBreakInPx = {\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n never: 0,\r\n}\r\n\r\nexport default function WindowLayout({\r\n responsiveBreak = 'lg',\r\n children,\r\n windowName,\r\n navbarChildren,\r\n useWindowStore,\r\n defaultDock,\r\n}: StoreProp) {\r\n const { x, y } = useScreenState()\r\n const windowRef = useRef<HTMLDivElement>(null)\r\n const {\r\n windowId,\r\n zIndex,\r\n isActive,\r\n setSelf,\r\n\r\n resetFlag,\r\n\r\n winVisualState,\r\n setWinVisualState,\r\n\r\n isWinMinimized,\r\n\r\n dragClickOffset,\r\n setDragClickOffset,\r\n\r\n isDragging,\r\n setIsDragging,\r\n\r\n winCoord,\r\n setWinCoord,\r\n\r\n isResizing,\r\n setIsResizing,\r\n\r\n winWidth,\r\n setWinWidth,\r\n\r\n winHeight,\r\n setWinHeight,\r\n\r\n minimizeWindow,\r\n maximizeWindow,\r\n demaximizeWindow,\r\n\r\n dockWindowRight,\r\n dockWindowLeft,\r\n\r\n dockWindowTopLeft,\r\n dockWindowBottomLeft,\r\n dockWindowTopRight,\r\n dockWindowBottomRight,\r\n\r\n WIN_MIN_WIDTH,\r\n WIN_MIN_HEIGHT,\r\n } = useWindowStore()\r\n\r\n useEffect(() => {\r\n setSelf(windowRef)\r\n\r\n if (isMobile()) maximizeWindow()\r\n else if (defaultDock === 'left') dockWindowLeft()\r\n else if (defaultDock === 'right') dockWindowRight()\r\n else if (defaultDock === 'full') maximizeWindow()\r\n else demaximizeWindow()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [setSelf, windowRef, resetFlag])\r\n\r\n useEffect(() => {\r\n if (isMobile()) return\r\n if (!isDragging) return\r\n\r\n if (winVisualState === 'maximized') demaximizeWindow()\r\n\r\n let adjustedX = x - dragClickOffset.pointX\r\n if (x > window.innerWidth || x < 0) adjustedX = winCoord.pointX\r\n\r\n let adjustedY = y - dragClickOffset.pointY\r\n if (y > window.innerHeight || y < 0) adjustedY = winCoord.pointY\r\n\r\n setWinCoord({ pointX: adjustedX, pointY: adjustedY })\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isDragging, x, y])\r\n\r\n useEffect(() => {\r\n if (!isResizing) return\r\n\r\n setWinVisualState('demaximized')\r\n if (isResizing === 'bottom-height') resizeBottomWinHeight()\r\n if (isResizing === 'top-height') resizeTopWinHeight()\r\n\r\n if (isResizing === 'right-width') resizeRightWinWidth()\r\n if (isResizing === 'left-width') resizeLeftWinWidth()\r\n\r\n if (isResizing === 'bottom-right-all') resizeRightBottomWidthAndHeight()\r\n if (isResizing === 'bottom-left-all') resizeLeftBottomWidthAndHeight()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isResizing, x, y])\r\n\r\n const handleNavbarClick = (isDragging: boolean) => {\r\n setDragClickOffset({ pointX: x - winCoord.pointX, pointY: y - winCoord.pointY })\r\n setIsDragging(isDragging)\r\n }\r\n\r\n const isMobile = (): boolean => {\r\n return window.innerWidth < responsiveBreakInPx[responsiveBreak]\r\n }\r\n\r\n const resizeRightWinWidth = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinWidth = x - winBox.left < WIN_MIN_WIDTH\r\n if (minWinWidth) return\r\n\r\n const cursorOutOfBounds = x > window.innerWidth || x < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = x - winBox.right\r\n setWinWidth(winWidth + sizeDiff)\r\n }\r\n\r\n const resizeLeftWinWidth = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinWidth = winBox.right - x < WIN_MIN_WIDTH\r\n if (minWinWidth) return\r\n\r\n const cursorOutOfBounds = x > window.innerWidth || x < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = winBox.left - x\r\n setWinWidth(winWidth + sizeDiff)\r\n setWinCoord({ pointX: x, pointY: winCoord.pointY })\r\n }\r\n\r\n const resizeBottomWinHeight = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinHeight = y - winBox.top < WIN_MIN_HEIGHT\r\n if (minWinHeight) return\r\n\r\n const cursorOutOfBounds = y > window.innerHeight || y < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = y - winBox.bottom\r\n setWinHeight(winHeight + sizeDiff)\r\n }\r\n\r\n const resizeTopWinHeight = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinHeight = winBox.bottom - y < WIN_MIN_HEIGHT\r\n if (minWinHeight) return\r\n\r\n const cursorOutOfBounds = y > window.innerHeight || y < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = winBox.top - y\r\n setWinHeight(winHeight + sizeDiff)\r\n setWinCoord({ pointX: winCoord.pointX, pointY: y })\r\n }\r\n\r\n const resizeRightBottomWidthAndHeight = () => {\r\n resizeRightWinWidth()\r\n resizeBottomWinHeight()\r\n }\r\n\r\n const resizeLeftBottomWidthAndHeight = () => {\r\n resizeLeftWinWidth()\r\n resizeBottomWinHeight()\r\n }\r\n\r\n const handleResizeClick = (isResizing: ResizeState) => {\r\n setIsResizing(isResizing)\r\n }\r\n\r\n const cornerDockControl = (\r\n <div className={`flex xl:p-0 px-2 shrink-0 gap-1`}>\r\n {/* LEFT SIDE */}\r\n <div className=\"flex flex-col justify-center gap-1\">\r\n <button\r\n className=\"hover:bg-gray-100 hover:bg-opacity-20 border w-4 h-[10px] rounded-sm\"\r\n onClick={dockWindowTopLeft}\r\n ></button>\r\n <button\r\n className=\"hover:bg-gray-100 hover:bg-opacity-20 border w-4 h-[10px] rounded-sm\"\r\n onClick={dockWindowBottomLeft}\r\n ></button>\r\n </div>\r\n {/* RIGHT SIDE */}\r\n <div className=\"flex flex-col justify-center gap-1\">\r\n <button\r\n className=\"hover:bg-gray-100 hover:bg-opacity-20 border w-4 h-[10px] rounded-sm\"\r\n onClick={dockWindowTopRight}\r\n ></button>\r\n <button\r\n className=\"hover:bg-gray-100 hover:bg-opacity-20 border w-4 h-[10px] rounded-sm\"\r\n onClick={dockWindowBottomRight}\r\n ></button>\r\n </div>\r\n </div>\r\n )\r\n\r\n const sideDideControl = (\r\n <div className={`flex px-2 shrink-0 items-center gap-1`}>\r\n <button\r\n className=\"hover:bg-gray-100 hover:bg-opacity-20 px-[1px] border w-4 h-6 rounded-sm\"\r\n onClick={dockWindowLeft}\r\n ></button>\r\n <button\r\n className=\"hover:bg-gray-100 hover:bg-opacity-20 px-[1px] border w-4 h-6 rounded-sm\"\r\n onClick={dockWindowRight}\r\n ></button>\r\n </div>\r\n )\r\n\r\n const maximizeControl =\r\n winVisualState === 'maximized' ? (\r\n <button\r\n className={`block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`}\r\n onClick={demaximizeWindow}\r\n >\r\n {iconWinDemaximize()}\r\n </button>\r\n ) : (\r\n <button\r\n className={`block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`}\r\n onClick={maximizeWindow}\r\n >\r\n {iconWinMaximize()}\r\n </button>\r\n )\r\n\r\n const minimizeControl = (\r\n <button className=\"hover:bg-red-500 hover:bg-opacity-20 px-5 h-full\" onClick={minimizeWindow}>\r\n {iconWinMinimize()}\r\n </button>\r\n )\r\n\r\n return (\r\n <div\r\n onMouseDown={() => bringTargetWindowToFront(windowId)}\r\n id={windowId}\r\n ref={windowRef}\r\n style={{\r\n top: `${winCoord.pointY}px`,\r\n left: `${winCoord.pointX}px`,\r\n width: `${winWidth}px`,\r\n height: `${winHeight}px`,\r\n zIndex: `${zIndex}`,\r\n\r\n /* MINIMIZE LOGIC */\r\n transition: 'transform 0.2s ease-in-out, opacity 0.3s ease-in-out',\r\n opacity: isWinMinimized ? 0 : 1,\r\n transform: isWinMinimized\r\n ? `translate(${window.innerWidth / 2 - winCoord.pointX - winWidth / 2}px,\r\n ${window.innerHeight - winCoord.pointY - winHeight / 2}px) scale(0.02)`\r\n : '',\r\n }}\r\n onMouseUp={() => {\r\n handleNavbarClick(false)\r\n handleResizeClick(false)\r\n }}\r\n className={`fixed bg-white shadow-lg border border-zinc-600`}\r\n >\r\n <nav\r\n className={`h-[32px] w-full bg-neutral-800 flex items-center\r\n ${isActive ? 'brightness-100 opacity-100' : 'brightness-75 opacity-90'}`}\r\n >\r\n <div\r\n onMouseDown={() => handleNavbarClick(true)}\r\n onDoubleClick={maximizeWindow}\r\n className=\"w-full h-8 px-2 text-white flex items-center text-sm truncate\"\r\n >\r\n {windowName}\r\n {navbarChildren}\r\n </div>\r\n\r\n {!isMobile() && cornerDockControl}\r\n {!isMobile() && sideDideControl}\r\n {!isMobile() && maximizeControl}\r\n {minimizeControl}\r\n </nav>\r\n\r\n {/* FIX ME: Add resize on top right and left? */}\r\n <span\r\n onMouseDown={() => handleResizeClick('right-width')}\r\n id=\"win-resize-width\"\r\n className=\"fixed w-2 opacity-60 cursor-w-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY}px`,\r\n left: `${winCoord.pointX + winWidth - 4}px`,\r\n height: `${winHeight}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('left-width')}\r\n id=\"win-resize-width\"\r\n className=\"fixed w-2 opacity-60 cursor-w-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY}px`,\r\n left: `${winCoord.pointX - 4}px`,\r\n height: `${winHeight}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('bottom-height')}\r\n id=\"win-resize-height\"\r\n className=\"fixed h-2 opacity-60 cursor-s-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY + winHeight - 6}px`,\r\n left: `${winCoord.pointX}px`,\r\n width: `${winWidth}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('top-height')}\r\n id=\"win-resize-height\"\r\n className=\"fixed h-2 opacity-60 cursor-s-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY - 6}px`,\r\n left: `${winCoord.pointX}px`,\r\n width: `${winWidth}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('bottom-right-all')}\r\n id=\"win-resize-all\"\r\n className=\"fixed h-3 w-3 opacity-60 cursor-se-resize z-20\"\r\n style={{\r\n top: `${winCoord.pointY + winHeight - 8}px`,\r\n left: `${winCoord.pointX + winWidth - 8}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('bottom-left-all')}\r\n id=\"win-resize-all\"\r\n className=\"fixed h-3 w-3 opacity-60 cursor-sw-resize z-20\"\r\n style={{\r\n top: `${winCoord.pointY + winHeight - 8}px`,\r\n left: `${winCoord.pointX - 8}px`,\r\n }}\r\n ></span>\r\n\r\n {/* Offset the navbar => 'h-[calc(100%-32px)]' */}\r\n <div className={`w-full h-[calc(100%-32px)] overflow-auto`}>{children}</div>\r\n </div>\r\n )\r\n}\r\n","export function iconWinMaximize() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n width={24}\r\n height={24}\r\n strokeWidth={1.5}\r\n stroke=\"white\"\r\n color=\"white\"\r\n className=\"size-6\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n d=\"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z\"\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport function iconWinDemaximize() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n width={24}\r\n height={24}\r\n strokeWidth={1.5}\r\n stroke=\"white\"\r\n color=\"white\"\r\n className=\"size-6\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n d=\"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6\"\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport function iconWinMinimize() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n width={24}\r\n height={24}\r\n strokeWidth={1.5}\r\n stroke=\"white\"\r\n color=\"white\"\r\n className=\"size-6\"\r\n >\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\r\n </svg>\r\n )\r\n}\r\n"],"mappings":";AAAA,SAAS,cAAuC;AAIzC,IAAM,iBAAuE,CAAC;AAE9E,IAAM,oBAAoB,CAAC,UAAkB,mBAA2B;AAC7E,MAAI,eAAe,QAAQ;AAAG,YAAQ,MAAM,sCAAsC,QAAQ;AAE1F,QAAM,iBAAiB,OAAO,KAAK,cAAc,EAAE,SAAS;AAE5D,QAAM,gBAAgB,OAAoB,CAAC,KAAK,SAAS;AAAA,IACvD;AAAA,IAEA,UAAU;AAAA,IACV,aAAa,CAAC,aAAsB,IAAI,EAAE,SAAmB,CAAC;AAAA,IAE9D,WAAW;AAAA,IACX,OAAO,MAAM,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,WAAW,gBAAgB,KAAK,CAAC;AAAA,IAEtE,QAAQ;AAAA,IACR,WAAW,CAAC,aAAqB,IAAI,EAAE,QAAQ,SAAS,CAAC;AAAA,IAEzD,MAAM;AAAA,IACN,SAAS,CAAC,QAA0C,IAAI,EAAE,MAAM,IAAI,CAAC;AAAA,IAErE,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,aAA2B,IAAI,EAAE,gBAAgB,SAAS,CAAC;AAAA,IAE/E,gBAAgB;AAAA,IAChB,mBAAmB,CAAC,WAAoB,IAAI,EAAE,gBAAgB,OAAO,CAAC;AAAA,IAEtE,iBAAiB,EAAE,QAAQ,GAAG,QAAQ,EAAE;AAAA,IACxC,oB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,YACV,OAAO;AAAA,cACL,KAAK,GAAG,SAAS,SAAS,YAAY;AAAA,cACtC,MAAM,GAAG,SAAS;AAAA,cAClB,OAAO,GAAG;AAAA,YACZ;AAAA;AAAA,QACD;AAAA,QACD,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACC,aAAa,MAAM,kBAAkB,YAAY;AAAA,YACjD,IAAG;AAAA,YACH,WAAU;AAAA,YACV,OAAO;AAAA,cACL,KAAK,GAAG,SAAS,SAAS;AAAA,cAC1B,MAAM,GAAG,SAAS;AAAA,cAClB,OAAO,GAAG;AAAA,YACZ;AAAA;AAAA,QACD;AAAA,QACD,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACC,aAAa,MAAM,kBAAkB,kBAAkB;AAAA,YACvD,IAAG;AAAA,YACH,WAAU;AAAA,YACV,OAAO;AAAA,cACL,KAAK,GAAG,SAAS,SAAS,YAAY;AAAA,cACtC,MAAM,GAAG,SAAS,SAAS,WAAW;AAAA,YACxC;AAAA;AAAA,QACD;AAAA,QACD,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACC,aAAa,MAAM,kBAAkB,iBAAiB;AAAA,YACtD,IAAG;AAAA,YACH,WAAU;AAAA,YACV,OAAO;AAAA,cACL,KAAK,GAAG,SAAS,SAAS,YAAY;AAAA,cACtC,MAAM,GAAG,SAAS,SAAS;AAAA,YAC7B;AAAA;AAAA,QACD;AAAA,QAGD,gBAAAA,KAAC,SAAI,WAAW,4CAA6C,UAAS;AAAA;AAAA;AAAA,EACxE;AAEJ;","names":["window","create","jsx","jsx","jsxs","useEffect","jsx","jsx","jsxs","useEffect","isDragging","isResizing"]}
|
|
1
|
+
{"version":3,"sources":["../src/window-manager/window-store-factory.tsx","../src/window-manager/global-actions/window-global-actions.ts","../src/window-manager/window-button.tsx","../src/screen-manager/screen-state.ts","../src/screen-manager/screen-listeners.tsx","../src/window-manager/workspace-layout.tsx","../src/window-manager/window-layout.tsx","../src/window-assets/svg-win-icons.tsx","../src/window-manager/components/docking-controls.tsx","../src/window-manager/components/resizing-controls.tsx"],"sourcesContent":["import { create, StoreApi, UseBoundStore } from 'zustand'\r\nimport { RefObject } from 'react'\r\nimport { Coord, ResizeState, WindowStates, WindowStore } from './window-types'\r\n\r\nexport const windowRegistry: Record<string, UseBoundStore<StoreApi<WindowStore>>> = {}\r\n\r\nexport const createWindowStore = (windowId: string, bottomOffsetPx: number) => {\r\n if (windowRegistry[windowId]) console.error('This store ID is already in use: ' + windowId)\r\n\r\n const zIndexAtLaunch = Object.keys(windowRegistry).length + 1\r\n\r\n const storeInstance = create<WindowStore>((set, get) => ({\r\n windowId: windowId,\r\n\r\n isActive: false,\r\n setIsActive: (isActive: boolean) => set({ isActive: isActive }),\r\n\r\n resetFlag: false,\r\n reset: () => set({ resetFlag: !get().resetFlag, isWinMinimized: true }),\r\n\r\n zIndex: zIndexAtLaunch,\r\n setZIndex: (newIndex: number) => set({ zIndex: newIndex }),\r\n\r\n self: undefined,\r\n setSelf: (ref: RefObject<HTMLDivElement | null>) => set({ self: ref }),\r\n\r\n winVisualState: 'demaximized',\r\n setWinVisualState: (newState: WindowStates) => set({ winVisualState: newState }),\r\n\r\n isWinMinimized: true,\r\n setIsWinMinimized: (isMini: boolean) => set({ isWinMinimized: isMini }),\r\n\r\n dragClickOffset: { pointX: 0, pointY: 0 },\r\n setDragClickOffset: (newCoord: Coord) =>\r\n set({ dragClickOffset: { pointX: newCoord.pointX, pointY: newCoord.pointY } }),\r\n\r\n isDragging: false,\r\n setIsDragging: (updatedIsDragging: boolean) => set({ isDragging: updatedIsDragging }),\r\n\r\n winCoord: { pointX: 40, pointY: 40 },\r\n setWinCoord: (newWinCoord: Coord) =>\r\n set({ winCoord: { pointX: newWinCoord.pointX, pointY: newWinCoord.pointY } }),\r\n\r\n isResizing: false,\r\n setIsResizing: (updatedIsResizing: ResizeState) => set({ isResizing: updatedIsResizing }),\r\n\r\n winWidth: window.innerWidth * 0.95,\r\n setWinWidth: (newWinWidth: number) => set({ winWidth: newWinWidth }),\r\n\r\n winHeight: window.innerHeight * 0.75,\r\n setWinHeight: (newWinHeight: number) => set({ winHeight: newWinHeight }),\r\n\r\n stopDragAndResize: () => set({ isDragging: false, isResizing: false }),\r\n\r\n maximizeWindow: () => {\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winHeight: window.innerHeight - bottomOffsetPx,\r\n winWidth: window.innerWidth,\r\n winVisualState: 'maximized',\r\n })\r\n },\r\n demaximizeWindow: () => {\r\n set({\r\n winCoord: { pointX: 40, pointY: 40 },\r\n winWidth: window.innerWidth * 0.95,\r\n winHeight: window.innerHeight * 0.75,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n\r\n minimizeWindow: () => set({ isWinMinimized: true }),\r\n openWindow: () => {\r\n const winRef = get().self\r\n if (get().isWinMinimized && winRef?.current) {\r\n set({ isWinMinimized: false })\r\n winRef.current.style.transform = 'translate(0, 0) scale(1)'\r\n }\r\n },\r\n\r\n dockWindowRight: () => {\r\n set({\r\n winCoord: { pointX: window.innerWidth / 2, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight - bottomOffsetPx,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n dockWindowLeft: () => {\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight - bottomOffsetPx,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n\r\n dockWindowTop: () => {\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winWidth: window.innerWidth,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n dockWindowBottom: () => {\r\n set({\r\n winCoord: { pointX: 0, pointY: window.innerHeight / 2 - bottomOffsetPx / 2 },\r\n winWidth: window.innerWidth,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n })\r\n },\r\n\r\n dockWindowBottomRight: () =>\r\n set({\r\n winCoord: {\r\n pointX: window.innerWidth / 2,\r\n pointY: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n dockWindowTopRight: () =>\r\n set({\r\n winCoord: { pointX: window.innerWidth / 2, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n\r\n dockWindowBottomLeft: () =>\r\n set({\r\n winCoord: { pointX: 0, pointY: window.innerHeight / 2 - bottomOffsetPx / 2 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n dockWindowTopLeft: () =>\r\n set({\r\n winCoord: { pointX: 0, pointY: 0 },\r\n winWidth: window.innerWidth / 2,\r\n winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,\r\n winVisualState: 'demaximized',\r\n }),\r\n\r\n WIN_MIN_WIDTH: 360,\r\n WIN_MIN_HEIGHT: 240,\r\n setWIN_MIN_WIDTH: (w: number) => set({ WIN_MIN_WIDTH: w }),\r\n setWIN_MIN_HEIGHT: (h: number) => set({ WIN_MIN_HEIGHT: h }),\r\n }))\r\n\r\n windowRegistry[windowId] = storeInstance\r\n\r\n return storeInstance\r\n}\r\n","import { windowRegistry } from '../window-store-factory'\r\n\r\nexport const stopAllDragAndResize = () => {\r\n for (const key of Object.keys(windowRegistry)) {\r\n windowRegistry[key].getState().stopDragAndResize()\r\n }\r\n}\r\n\r\nexport const resetAllWindows = () => {\r\n for (const key of Object.keys(windowRegistry)) {\r\n windowRegistry[key].getState().reset()\r\n }\r\n}\r\n\r\nexport const bringTargetWindowToFront = (targetId: string) => {\r\n const targetWindow = windowRegistry[targetId].getState()\r\n\r\n for (const key of Object.keys(windowRegistry)) {\r\n const window = windowRegistry[key].getState()\r\n\r\n if (window.windowId === targetWindow.windowId) {\r\n continue\r\n }\r\n\r\n window.setIsActive(false)\r\n if (window.zIndex >= targetWindow.zIndex) {\r\n window.setZIndex(window.zIndex - 1)\r\n }\r\n }\r\n\r\n targetWindow.setZIndex(Object.keys(windowRegistry).length)\r\n targetWindow.setIsActive(true)\r\n}\r\n","import { StoreApi, UseBoundStore } from 'zustand'\r\nimport { WindowStore } from './window-types'\r\nimport { bringTargetWindowToFront } from './global-actions/window-global-actions'\r\n\r\ntype StoreProp = {\r\n children: React.ReactNode\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n styles?: string\r\n closedStyle?: string\r\n openStyle?: string\r\n}\r\n\r\nexport default function WindowButton({\r\n children,\r\n useWindowStore,\r\n styles,\r\n closedStyle = 'brightness-[85%]',\r\n openStyle = 'brightness-150',\r\n}: StoreProp) {\r\n const { openWindow, minimizeWindow, isWinMinimized, windowId, isActive } = useWindowStore()\r\n\r\n const handleOpenCloseWin = () => {\r\n if (isWinMinimized) {\r\n bringTargetWindowToFront(windowId)\r\n openWindow()\r\n return\r\n }\r\n\r\n if (isActive) {\r\n minimizeWindow()\r\n }\r\n\r\n bringTargetWindowToFront(windowId)\r\n }\r\n\r\n return (\r\n <button\r\n id={`${windowId}_button`}\r\n onClick={handleOpenCloseWin}\r\n className={`\r\n ${styles} \r\n ${isWinMinimized ? closedStyle : openStyle}`}\r\n >\r\n {children}\r\n </button>\r\n )\r\n}\r\n","import { create } from 'zustand'\r\n\r\n/** @Note\r\n *The word SCREEN is being used to distinguish between the\r\n * window feature in this library and the real browser window\r\n * SCREEN == BROWSER REAL WINDOW\r\n */\r\ntype ScreenState = {\r\n x: number\r\n y: number\r\n setX: (x: number) => void\r\n setY: (y: number) => void\r\n}\r\n\r\nexport const useScreenState = create<ScreenState>((set) => ({\r\n x: 10,\r\n y: 10,\r\n setX: (newX: number) => set({ x: newX }),\r\n setY: (newY: number) => set({ y: newY }),\r\n}))\r\n","import { resetAllWindows } from '../window-manager/global-actions/window-global-actions'\r\nimport { useScreenState } from './screen-state'\r\nimport { useEffect } from 'react'\r\n\r\nexport default function ScreenListeners() {\r\n return (\r\n <>\r\n <CursorCoordinates />\r\n <WindowResizeReset />\r\n </>\r\n )\r\n}\r\n\r\n/* FIX ME: Until I find a better way to handle browser resize, the react window state resets if the browser resizes */\r\nfunction WindowResizeReset() {\r\n useEffect(() => {\r\n const handleWindowResize = () => {\r\n resetAllWindows()\r\n }\r\n\r\n window.addEventListener('resize', handleWindowResize)\r\n\r\n return () => document.removeEventListener('pointermove', handleWindowResize)\r\n }, [])\r\n\r\n return <></>\r\n}\r\n\r\nfunction CursorCoordinates() {\r\n const { setX, setY } = useScreenState()\r\n\r\n useEffect(() => {\r\n const handleWindowPosition = (e: MouseEvent) => {\r\n e.preventDefault()\r\n setX(e.clientX)\r\n setY(e.clientY)\r\n }\r\n\r\n document.addEventListener('pointermove', handleWindowPosition)\r\n\r\n return () => document.removeEventListener('pointermove', handleWindowPosition)\r\n }, [setX, setY])\r\n\r\n return <></>\r\n}\r\n","import ScreenListeners from '../screen-manager/screen-listeners'\r\nimport { stopAllDragAndResize } from './global-actions/window-global-actions'\r\n\r\ntype Props = {\r\n children: React.ReactNode\r\n}\r\n\r\nexport default function WorkspaceLayout({ children }: Props) {\r\n return (\r\n <main\r\n onMouseLeave={stopAllDragAndResize}\r\n onMouseUp={stopAllDragAndResize}\r\n className=\"absolute overflow-hidden h-full w-full touch-none\"\r\n >\r\n <ScreenListeners />\r\n {children}\r\n </main>\r\n )\r\n}\r\n","import { useScreenState } from '../screen-manager/screen-state'\r\nimport { useEffect, useRef, useState } from 'react'\r\nimport { StoreApi, UseBoundStore } from 'zustand'\r\nimport { WindowStore, ResizeState } from './window-types'\r\nimport { iconWinMinimize, iconWinDemaximize, iconWinMaximize } from '../window-assets/svg-win-icons'\r\nimport { bringTargetWindowToFront } from './global-actions/window-global-actions'\r\nimport DockingControls from './components/docking-controls'\r\nimport ResizingControls from './components/resizing-controls'\r\n\r\ntype StoreProp = {\r\n responsiveBreak?: 'sm' | 'md' | 'lg' | 'xl' | 'never'\r\n children: React.ReactNode\r\n windowName: string | React.ReactNode\r\n navbarChildren?: React.ReactNode\r\n defaultDock?: 'right' | 'left' | 'full'\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n}\r\n\r\nconst responsiveBreakInPx = {\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n never: 0,\r\n}\r\n\r\nexport default function WindowLayout({\r\n responsiveBreak = 'lg',\r\n children,\r\n windowName,\r\n navbarChildren,\r\n useWindowStore,\r\n defaultDock,\r\n}: StoreProp) {\r\n const { x, y } = useScreenState()\r\n const windowRef = useRef<HTMLDivElement>(null)\r\n const {\r\n windowId,\r\n zIndex,\r\n isActive,\r\n setSelf,\r\n\r\n resetFlag,\r\n\r\n winVisualState,\r\n\r\n isWinMinimized,\r\n\r\n dragClickOffset,\r\n setDragClickOffset,\r\n\r\n isDragging,\r\n setIsDragging,\r\n\r\n winCoord,\r\n setWinCoord,\r\n\r\n setIsResizing,\r\n\r\n winWidth,\r\n winHeight,\r\n\r\n minimizeWindow,\r\n maximizeWindow,\r\n demaximizeWindow,\r\n\r\n dockWindowRight,\r\n dockWindowLeft,\r\n\r\n } = useWindowStore()\r\n\r\n useEffect(() => {\r\n setSelf(windowRef)\r\n\r\n if (isMobile()) maximizeWindow()\r\n else if (defaultDock === 'left') dockWindowLeft()\r\n else if (defaultDock === 'right') dockWindowRight()\r\n else if (defaultDock === 'full') maximizeWindow()\r\n else demaximizeWindow()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [setSelf, windowRef, resetFlag])\r\n\r\n useEffect(() => {\r\n if (isMobile()) return\r\n if (!isDragging) return\r\n\r\n if (winVisualState === 'maximized') demaximizeWindow()\r\n\r\n let adjustedX = x - dragClickOffset.pointX\r\n if (x > window.innerWidth || x < 0) adjustedX = winCoord.pointX\r\n\r\n let adjustedY = y - dragClickOffset.pointY\r\n if (y > window.innerHeight || y < 0) adjustedY = winCoord.pointY\r\n\r\n setWinCoord({ pointX: adjustedX, pointY: adjustedY })\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isDragging, x, y])\r\n\r\n const handleNavbarClick = (isDragging: boolean) => {\r\n setDragClickOffset({ pointX: x - winCoord.pointX, pointY: y - winCoord.pointY })\r\n setIsDragging(isDragging)\r\n }\r\n\r\n const isMobile = (): boolean => {\r\n return window.innerWidth < responsiveBreakInPx[responsiveBreak]\r\n }\r\n\r\n const handleResizeClick = (isResizing: ResizeState) => {\r\n setIsResizing(isResizing)\r\n }\r\n\r\n const maximizeControl =\r\n winVisualState === 'maximized' ? (\r\n <button\r\n className={`block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`}\r\n onClick={demaximizeWindow}\r\n >\r\n {iconWinDemaximize()}\r\n </button>\r\n ) : (\r\n <button\r\n className={`block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`}\r\n onClick={maximizeWindow}\r\n >\r\n {iconWinMaximize()}\r\n </button>\r\n )\r\n\r\n const minimizeControl = (\r\n <button className=\"hover:bg-red-500 hover:bg-opacity-20 px-5 h-full\" onClick={minimizeWindow}>\r\n {iconWinMinimize()}\r\n </button>\r\n )\r\n\r\n return (\r\n <>\r\n {!isMobile() && <DockingControls useWindowStore={useWindowStore} />}\r\n <div\r\n onMouseDown={() => bringTargetWindowToFront(windowId)}\r\n id={windowId}\r\n ref={windowRef}\r\n style={{\r\n top: `${winCoord.pointY}px`,\r\n left: `${winCoord.pointX}px`,\r\n width: `${winWidth}px`,\r\n height: `${winHeight}px`,\r\n zIndex: `${zIndex}`,\r\n\r\n /* MINIMIZE LOGIC */\r\n transition: 'transform 0.2s ease-in-out, opacity 0.3s ease-in-out',\r\n opacity: isWinMinimized ? 0 : 1,\r\n transform: isWinMinimized\r\n ? `translate(${window.innerWidth / 2 - winCoord.pointX - winWidth / 2}px,\r\n ${window.innerHeight - winCoord.pointY - winHeight / 2}px) scale(0.02)`\r\n : '',\r\n }}\r\n onMouseUp={() => {\r\n handleNavbarClick(false)\r\n handleResizeClick(false)\r\n }}\r\n className={`fixed bg-white shadow-lg border border-zinc-600`}\r\n >\r\n <nav\r\n className={`h-[32px] w-full bg-neutral-800 flex items-center\r\n ${isActive ? 'brightness-100 opacity-100' : 'brightness-75 opacity-90'}`}\r\n >\r\n <div className=\"w-fit shrink-0 h-8 px-2 text-white flex items-center text-sm truncate\">\r\n {windowName}\r\n {navbarChildren}\r\n </div>\r\n <div\r\n onMouseDown={() => handleNavbarClick(true)}\r\n onDoubleClick={maximizeWindow}\r\n className=\"w-full h-8 px-2 text-white flex items-center text-sm truncate\"\r\n ></div>\r\n\r\n {!isMobile() && maximizeControl}\r\n {minimizeControl}\r\n </nav>\r\n\r\n {!isMobile() && <ResizingControls useWindowStore={useWindowStore} windowRef={windowRef} />}\r\n\r\n {/* Offset the navbar => 'h-[calc(100%-32px)]' */}\r\n <div className={`relative w-full h-[calc(100%-32px)] overflow-auto`}>{children}</div>\r\n </div>{' '}\r\n </>\r\n )\r\n}\r\n","export function iconWinMaximize() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n width={24}\r\n height={24}\r\n strokeWidth={1.5}\r\n stroke=\"white\"\r\n color=\"white\"\r\n className=\"size-6\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n d=\"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z\"\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport function iconWinDemaximize() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n width={24}\r\n height={24}\r\n strokeWidth={1.5}\r\n stroke=\"white\"\r\n color=\"white\"\r\n className=\"size-6\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n d=\"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6\"\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport function iconWinMinimize() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n width={24}\r\n height={24}\r\n strokeWidth={1.5}\r\n stroke=\"white\"\r\n color=\"white\"\r\n className=\"size-6\"\r\n >\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\r\n </svg>\r\n )\r\n}\r\n","import { useEffect, useState } from 'react'\r\nimport { StoreApi, UseBoundStore } from 'zustand'\r\nimport { WindowStore } from '../window-types'\r\n\r\ntype Props = {\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n}\r\n\r\nexport default function DockingControls({ useWindowStore }: Props) {\r\n const {\r\n isDragging,\r\n\r\n dockWindowRight,\r\n dockWindowLeft,\r\n\r\n dockWindowBottom,\r\n dockWindowTop,\r\n\r\n dockWindowTopLeft,\r\n dockWindowBottomLeft,\r\n dockWindowTopRight,\r\n dockWindowBottomRight,\r\n } = useWindowStore()\r\n\r\n const [isVisible, setIsVisible] = useState(false)\r\n useEffect(() => {\r\n let dealy: ReturnType<typeof setTimeout>\r\n\r\n if (isDragging) {\r\n dealy = setTimeout(() => {\r\n setIsVisible(true)\r\n }, 400)\r\n } else {\r\n setIsVisible(false)\r\n }\r\n\r\n return () => clearTimeout(dealy)\r\n }, [isDragging])\r\n\r\n const cornerDockControl = (\r\n <div className={`flex xl:p-0 shrink-0 gap-0.5`}>\r\n {/* LEFT SIDE */}\r\n <div className=\"flex flex-col justify-center gap-0.5\">\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm\"\r\n onMouseUp={dockWindowTopLeft}\r\n ></button>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm\"\r\n onMouseUp={dockWindowBottomLeft}\r\n ></button>\r\n </div>\r\n {/* RIGHT SIDE */}\r\n <div className=\"flex flex-col justify-center gap-0.5\">\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm\"\r\n onMouseUp={dockWindowTopRight}\r\n ></button>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm\"\r\n onMouseUp={dockWindowBottomRight}\r\n ></button>\r\n </div>\r\n </div>\r\n )\r\n\r\n const sideDideControl = (\r\n <div className={`flex shrink-0 items-center gap-1`}>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-7 h-10 rounded-sm\"\r\n onMouseUp={dockWindowLeft}\r\n ></button>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-7 h-10 rounded-sm\"\r\n onMouseUp={dockWindowRight}\r\n ></button>\r\n </div>\r\n )\r\n\r\n const horizontalDockControl = (\r\n <div className={`flex flex-col shrink-0 items-center gap-0.5`}>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-12 h-5 rounded-sm\"\r\n onMouseUp={dockWindowTop}\r\n ></button>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-12 h-5 rounded-sm\"\r\n onMouseUp={dockWindowBottom}\r\n ></button>\r\n </div>\r\n )\r\n\r\n const windowDockPannel = (\r\n <section\r\n className={`\r\n flex w-fit border border-zinc-600 rounded-md bg-zinc-800 opacity-50\r\n overflow-hidden px-4 gap-3 h-full py-2 pointer-events-auto\r\n `}\r\n >\r\n {cornerDockControl}\r\n {horizontalDockControl}\r\n {sideDideControl}\r\n </section>\r\n )\r\n\r\n return (\r\n true && (\r\n <div className=\"absolute z-50 flex items-center justify-center top-2 w-full mx-auto pointer-events-none\">\r\n {isVisible && windowDockPannel}\r\n </div>\r\n )\r\n )\r\n}\r\n","import { StoreApi, UseBoundStore } from 'zustand'\r\nimport { ResizeState, WindowStore } from '../window-types'\r\nimport { useScreenState } from '../../screen-manager/screen-state'\r\nimport { RefObject, useEffect } from 'react'\r\n\r\ntype Props = {\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n windowRef: RefObject<HTMLDivElement | null>\r\n}\r\n\r\nexport default function ResizingControls({ useWindowStore, windowRef }: Props) {\r\n const { x, y } = useScreenState()\r\n const {\r\n setWinVisualState,\r\n\r\n winCoord,\r\n setWinCoord,\r\n\r\n isResizing,\r\n setIsResizing,\r\n\r\n winWidth,\r\n setWinWidth,\r\n\r\n winHeight,\r\n setWinHeight,\r\n\r\n WIN_MIN_WIDTH,\r\n WIN_MIN_HEIGHT,\r\n } = useWindowStore()\r\n\r\n useEffect(() => {\r\n if (!isResizing) return\r\n\r\n setWinVisualState('demaximized')\r\n if (isResizing === 'bottom-height') resizeBottomWinHeight()\r\n if (isResizing === 'top-height') resizeTopWinHeight()\r\n\r\n if (isResizing === 'right-width') resizeRightWinWidth()\r\n if (isResizing === 'left-width') resizeLeftWinWidth()\r\n\r\n if (isResizing === 'bottom-right-all') resizeRightBottomWidthAndHeight()\r\n if (isResizing === 'bottom-left-all') resizeLeftBottomWidthAndHeight()\r\n\r\n if (isResizing === 'top-right-all') resizeRightTopWidthAndHeight()\r\n if (isResizing === 'top-left-all') resizeLeftTopWidthAndHeight()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isResizing, x, y])\r\n\r\n const resizeRightWinWidth = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinWidth = x - winBox.left < WIN_MIN_WIDTH\r\n if (minWinWidth) return\r\n\r\n const cursorOutOfBounds = x > window.innerWidth || x < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = x - winBox.right\r\n setWinWidth(winWidth + sizeDiff)\r\n }\r\n\r\n const resizeLeftWinWidth = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinWidth = winBox.right - x < WIN_MIN_WIDTH\r\n if (minWinWidth) return\r\n\r\n const cursorOutOfBounds = x > window.innerWidth || x < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = winBox.left - x\r\n setWinWidth(winWidth + sizeDiff)\r\n setWinCoord({ pointX: x, pointY: winCoord.pointY })\r\n }\r\n\r\n /** @winXOverride we need to override windowX if another function that also sets windowX is called at the same time */\r\n const resizeTopWinHeight = (winXOverride?: number) => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinHeight = winBox.bottom - y < WIN_MIN_HEIGHT\r\n if (minWinHeight) return\r\n\r\n const cursorOutOfBounds = y > window.innerHeight || y < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = winBox.top - y\r\n setWinHeight(winHeight + sizeDiff)\r\n const winX = winXOverride ? winXOverride : winCoord.pointX\r\n setWinCoord({ pointX: winX, pointY: y })\r\n }\r\n\r\n const resizeBottomWinHeight = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const minWinHeight = y - winBox.top < WIN_MIN_HEIGHT\r\n if (minWinHeight) return\r\n\r\n const cursorOutOfBounds = y > window.innerHeight || y < 0\r\n if (cursorOutOfBounds) return\r\n\r\n const sizeDiff = y - winBox.bottom\r\n setWinHeight(winHeight + sizeDiff)\r\n }\r\n\r\n const resizeRightBottomWidthAndHeight = () => {\r\n resizeRightWinWidth()\r\n resizeBottomWinHeight()\r\n }\r\n\r\n const resizeLeftBottomWidthAndHeight = () => {\r\n resizeLeftWinWidth()\r\n resizeBottomWinHeight()\r\n }\r\n\r\n const resizeRightTopWidthAndHeight = () => {\r\n resizeRightWinWidth()\r\n resizeTopWinHeight()\r\n }\r\n\r\n const resizeLeftTopWidthAndHeight = () => {\r\n resizeLeftWinWidth()\r\n resizeTopWinHeight(x)\r\n }\r\n\r\n const handleResizeClick = (isResizing: ResizeState) => {\r\n setIsResizing(isResizing)\r\n }\r\n\r\n return (\r\n <>\r\n <span\r\n onMouseDown={() => handleResizeClick('right-width')}\r\n id=\"win-resize-width\"\r\n className=\"fixed w-2 opacity-60 cursor-w-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY}px`,\r\n left: `${winCoord.pointX + winWidth - 4}px`,\r\n height: `${winHeight}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('left-width')}\r\n id=\"win-resize-width\"\r\n className=\"fixed w-2 opacity-60 cursor-w-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY}px`,\r\n left: `${winCoord.pointX - 4}px`,\r\n height: `${winHeight}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('bottom-height')}\r\n id=\"win-resize-height\"\r\n className=\"fixed h-2 opacity-60 cursor-s-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY + winHeight - 6}px`,\r\n left: `${winCoord.pointX}px`,\r\n width: `${winWidth}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('top-height')}\r\n id=\"win-resize-height\"\r\n className=\"fixed h-2 opacity-60 cursor-s-resize z-10\"\r\n style={{\r\n top: `${winCoord.pointY - 6}px`,\r\n left: `${winCoord.pointX}px`,\r\n width: `${winWidth}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('bottom-right-all')}\r\n id=\"win-resize-all\"\r\n className=\"fixed h-3 w-3 opacity-60 cursor-se-resize z-20\"\r\n style={{\r\n top: `${winCoord.pointY + winHeight - 8}px`,\r\n left: `${winCoord.pointX + winWidth - 8}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('bottom-left-all')}\r\n id=\"win-resize-all\"\r\n className=\"fixed h-3 w-3 opacity-60 cursor-sw-resize z-20\"\r\n style={{\r\n top: `${winCoord.pointY + winHeight - 8}px`,\r\n left: `${winCoord.pointX - 8}px`,\r\n }}\r\n ></span>\r\n\r\n <span\r\n onMouseDown={() => handleResizeClick('top-right-all')}\r\n id=\"win-resize-all\"\r\n className=\"fixed h-3 w-3 opacity-60 cursor-ne-resize z-20\"\r\n style={{\r\n top: `${winCoord.pointY - 6}px`,\r\n left: `${winCoord.pointX + winWidth - 6}px`,\r\n }}\r\n ></span>\r\n <span\r\n onMouseDown={() => handleResizeClick('top-left-all')}\r\n id=\"win-resize-all\"\r\n className=\"fixed h-3 w-3 opacity-60 cursor-nw-resize z-20\"\r\n style={{\r\n top: `${winCoord.pointY - 6}px`,\r\n left: `${winCoord.pointX - 6}px`,\r\n }}\r\n ></span>\r\n </>\r\n )\r\n}\r\n"],"mappings":";AAAA,SAAS,cAAuC;AAIzC,IAAM,iBAAuE,CAAC;AAE9E,IAAM,oBAAoB,CAAC,UAAkB,mBAA2B;AAC7E,MAAI,eAAe,QAAQ;AAAG,YAAQ,MAAM,sCAAsC,QAAQ;AAE1F,QAAM,iBAAiB,OAAO,KAAK,cAAc,EAAE,SAAS;AAE5D,QAAM,gBAAgB,OAAoB,CAAC,KAAK,SAAS;AAAA,IACvD;AAAA,IAEA,UAAU;AAAA,IACV,aAAa,CAAC,aAAsB,IAAI,EAAE,SAAmB,CAAC;AAAA,IAE9D,WAAW;AAAA,IACX,OAAO,MAAM,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,WAAW,gBAAgB,KAAK,CA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AM,kBAAkB,IAAI;AAAA,oBACzC,eAAe;AAAA,oBACf,WAAU;AAAA;AAAA,gBACX;AAAA,gBAEA,CAAC,SAAS,KAAK;AAAA,gBACf;AAAA;AAAA;AAAA,UACH;AAAA,UAEC,CAAC,SAAS,KAAK,gBAAAA,KAAC,oBAAiB,gBAAgC,WAAsB;AAAA,UAGxF,gBAAAA,KAAC,SAAI,WAAW,qDAAsD,UAAS;AAAA;AAAA;AAAA,IACjF;AAAA,IAAO;AAAA,KACT;AAEJ;","names":["window","create","jsx","jsx","jsxs","useEffect","jsx","useEffect","jsx","jsxs","useEffect","Fragment","jsx","jsxs","isResizing","Fragment","jsx","jsxs","useEffect","isDragging"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gustavolmo/react-window-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.300",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
"build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
37
37
|
"build:css": "tailwindcss -c tailwind.config.js -i ./src/index.css -o ./dist/index.css --minify",
|
|
38
38
|
"clean": "rimraf dist",
|
|
39
|
-
"dev": "
|
|
40
|
-
"
|
|
39
|
+
"dev": "pnpm run dev:js & pnpm run dev:css",
|
|
40
|
+
"dev:js": "tsup --watch",
|
|
41
|
+
"dev:css": "tailwindcss -c tailwind.config.js -i ./src/index.css -o ./dist/index.css --watch",
|
|
42
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
43
|
+
"publish": "npm publish --access public"
|
|
41
44
|
}
|
|
42
45
|
}
|