@gustavolmo/react-window-manager 0.1.301 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -347,8 +347,14 @@ video {
347
347
  .relative {
348
348
  position: relative;
349
349
  }
350
- .top-2 {
351
- top: 0.5rem;
350
+ .top-0 {
351
+ top: 0px;
352
+ }
353
+ .top-\[-104px\] {
354
+ top: -104px;
355
+ }
356
+ .top-\[-68px\] {
357
+ top: -68px;
352
358
  }
353
359
  .z-10 {
354
360
  z-index: 10;
@@ -373,8 +379,8 @@ video {
373
379
  width: 1.5rem;
374
380
  height: 1.5rem;
375
381
  }
376
- .h-10 {
377
- height: 2.5rem;
382
+ .h-12 {
383
+ height: 3rem;
378
384
  }
379
385
  .h-2 {
380
386
  height: 0.5rem;
@@ -382,8 +388,8 @@ video {
382
388
  .h-3 {
383
389
  height: 0.75rem;
384
390
  }
385
- .h-5 {
386
- height: 1.25rem;
391
+ .h-6 {
392
+ height: 1.5rem;
387
393
  }
388
394
  .h-8 {
389
395
  height: 2rem;
@@ -397,8 +403,11 @@ video {
397
403
  .h-full {
398
404
  height: 100%;
399
405
  }
400
- .w-12 {
401
- width: 3rem;
406
+ .w-10 {
407
+ width: 2.5rem;
408
+ }
409
+ .w-14 {
410
+ width: 3.5rem;
402
411
  }
403
412
  .w-2 {
404
413
  width: 0.5rem;
@@ -406,9 +415,6 @@ video {
406
415
  .w-3 {
407
416
  width: 0.75rem;
408
417
  }
409
- .w-7 {
410
- width: 1.75rem;
411
- }
412
418
  .w-8 {
413
419
  width: 2rem;
414
420
  }
@@ -419,12 +425,24 @@ video {
419
425
  .w-full {
420
426
  width: 100%;
421
427
  }
428
+ .min-w-8 {
429
+ min-width: 2rem;
430
+ }
422
431
  .shrink-0 {
423
432
  flex-shrink: 0;
424
433
  }
434
+ .grow {
435
+ flex-grow: 1;
436
+ }
425
437
  .transform {
426
438
  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));
427
439
  }
440
+ .cursor-ne-resize {
441
+ cursor: ne-resize;
442
+ }
443
+ .cursor-nw-resize {
444
+ cursor: nw-resize;
445
+ }
428
446
  .cursor-s-resize {
429
447
  cursor: s-resize;
430
448
  }
@@ -437,12 +455,6 @@ video {
437
455
  .cursor-w-resize {
438
456
  cursor: w-resize;
439
457
  }
440
- .cursor-nw-resize {
441
- cursor: nw-resize;
442
- }
443
- .cursor-ne-resize {
444
- cursor: ne-resize;
445
- }
446
458
  .touch-none {
447
459
  touch-action: none;
448
460
  }
@@ -461,11 +473,8 @@ video {
461
473
  .gap-0\.5 {
462
474
  gap: 0.125rem;
463
475
  }
464
- .gap-1 {
465
- gap: 0.25rem;
466
- }
467
- .gap-3 {
468
- gap: 0.75rem;
476
+ .gap-4 {
477
+ gap: 1rem;
469
478
  }
470
479
  .overflow-auto {
471
480
  overflow: auto;
@@ -478,15 +487,19 @@ video {
478
487
  text-overflow: ellipsis;
479
488
  white-space: nowrap;
480
489
  }
481
- .rounded-md {
482
- border-radius: 0.375rem;
483
- }
484
490
  .rounded-sm {
485
491
  border-radius: 0.125rem;
486
492
  }
493
+ .rounded-b-md {
494
+ border-bottom-right-radius: 0.375rem;
495
+ border-bottom-left-radius: 0.375rem;
496
+ }
487
497
  .border {
488
498
  border-width: 1px;
489
499
  }
500
+ .border-t-0 {
501
+ border-top-width: 0px;
502
+ }
490
503
  .border-zinc-500 {
491
504
  --tw-border-opacity: 1;
492
505
  border-color: rgb(113 113 122 / var(--tw-border-opacity, 1));
@@ -503,10 +516,6 @@ video {
503
516
  --tw-bg-opacity: 1;
504
517
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
505
518
  }
506
- .bg-yellow-400 {
507
- --tw-bg-opacity: 1;
508
- background-color: rgb(250 204 21 / var(--tw-bg-opacity, 1));
509
- }
510
519
  .bg-zinc-600 {
511
520
  --tw-bg-opacity: 1;
512
521
  background-color: rgb(82 82 91 / var(--tw-bg-opacity, 1));
@@ -527,9 +536,16 @@ video {
527
536
  padding-left: 1.25rem;
528
537
  padding-right: 1.25rem;
529
538
  }
530
- .py-2 {
531
- padding-top: 0.5rem;
532
- padding-bottom: 0.5rem;
539
+ .px-8 {
540
+ padding-left: 2rem;
541
+ padding-right: 2rem;
542
+ }
543
+ .py-4 {
544
+ padding-top: 1rem;
545
+ padding-bottom: 1rem;
546
+ }
547
+ .pb-4 {
548
+ padding-bottom: 1rem;
533
549
  }
534
550
  .text-sm {
535
551
  font-size: 0.875rem;
@@ -539,6 +555,9 @@ video {
539
555
  --tw-text-opacity: 1;
540
556
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
541
557
  }
558
+ .opacity-0 {
559
+ opacity: 0;
560
+ }
542
561
  .opacity-100 {
543
562
  opacity: 1;
544
563
  }
@@ -548,8 +567,8 @@ video {
548
567
  .opacity-60 {
549
568
  opacity: 0.6;
550
569
  }
551
- .opacity-90 {
552
- opacity: 0.9;
570
+ .opacity-80 {
571
+ opacity: 0.8;
553
572
  }
554
573
  .shadow-lg {
555
574
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
@@ -591,6 +610,14 @@ video {
591
610
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
592
611
  transition-duration: 150ms;
593
612
  }
613
+ .transition-all {
614
+ transition-property: all;
615
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
616
+ transition-duration: 150ms;
617
+ }
618
+ .duration-500 {
619
+ transition-duration: 500ms;
620
+ }
594
621
  .ease-in-out {
595
622
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
596
623
  }
@@ -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.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;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;AAOF;AACE;AAAA;AAQF;AACE;AACA;AAAA;AAOF;AACE;AAAA;AAOF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE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A;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":[]}
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-0 {\n top: 0px;\n}\r\n.top-\\[-104px\\] {\n top: -104px;\n}\r\n.top-\\[-68px\\] {\n top: -68px;\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-12 {\n height: 3rem;\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-\\[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-10 {\n width: 2.5rem;\n}\r\n.w-14 {\n width: 3.5rem;\n}\r\n.w-2 {\n width: 0.5rem;\n}\r\n.w-3 {\n width: 0.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.min-w-8 {\n min-width: 2rem;\n}\r\n.shrink-0 {\n flex-shrink: 0;\n}\r\n.grow {\n flex-grow: 1;\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-ne-resize {\n cursor: ne-resize;\n}\r\n.cursor-nw-resize {\n cursor: nw-resize;\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-0\\.5 {\n gap: 0.125rem;\n}\r\n.gap-4 {\n gap: 1rem;\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.rounded-b-md {\n border-bottom-right-radius: 0.375rem;\n border-bottom-left-radius: 0.375rem;\n}\r\n.border {\n border-width: 1px;\n}\r\n.border-t-0 {\n border-top-width: 0px;\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-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.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\r\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\r\n.pb-4 {\n padding-bottom: 1rem;\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-0 {\n opacity: 0;\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-80 {\n opacity: 0.8;\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.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\r\n.duration-500 {\n transition-duration: 500ms;\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;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AACA;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;AAEF;AACE;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;AACA;AACA;AAAA;AAEF;AACE;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
@@ -53,31 +53,49 @@ type WindowStore = {
53
53
  setWIN_MIN_HEIGHT: (h: number) => void;
54
54
  };
55
55
 
56
- type StoreProp$1 = {
56
+ type Prop = {
57
57
  children: React.ReactNode;
58
58
  useWindowStore: UseBoundStore<StoreApi<WindowStore>>;
59
- styles?: string;
60
- closedStyle?: string;
61
- openStyle?: string;
59
+ className?: string;
60
+ /** @default 'brightness-[85%]' */
61
+ isClosedClassName?: string;
62
+ /** @default 'brightness-150' */
63
+ isOpenClassName?: string;
62
64
  };
63
- declare function WindowButton({ children, useWindowStore, styles, closedStyle, openStyle, }: StoreProp$1): react_jsx_runtime.JSX.Element;
65
+ declare function WindowButton({ children, useWindowStore, className, isClosedClassName, isOpenClassName, }: Prop): react_jsx_runtime.JSX.Element;
64
66
 
65
67
  type Props = {
66
68
  children: React.ReactNode;
67
69
  };
68
70
  declare function WorkspaceLayout({ children }: Props): react_jsx_runtime.JSX.Element;
69
71
 
72
+ type ResponsiveSizes = 'sm' | 'md' | 'lg' | 'xl' | 'never' | 'always' | number;
70
73
  type StoreProp = {
71
- responsiveBreak?: 'sm' | 'md' | 'lg' | 'xl' | 'never';
72
74
  children: React.ReactNode;
73
75
  windowName: string | React.ReactNode;
76
+ useWindowStore: UseBoundStore<StoreApi<WindowStore>>;
77
+ /**
78
+ * @default 'lg'
79
+ * @param sm uses mobile format at 640px
80
+ * @param md uses mobile format at 768px
81
+ * @param lg uses mobile format at 1024px
82
+ * @param xl uses mobile format at 1280px
83
+ * @param never never uses mobile format
84
+ * @param always always uses mobile format
85
+ * @param number set custom break point value in px */
86
+ responsiveBreak?: ResponsiveSizes;
74
87
  navbarChildren?: React.ReactNode;
75
88
  defaultDock?: 'right' | 'left' | 'full';
76
- useWindowStore: UseBoundStore<StoreApi<WindowStore>>;
89
+ /** @note use CSS values such as hex or supported color names */
90
+ style?: {
91
+ navBackgroundColor?: string;
92
+ windowBackgroundColor?: string;
93
+ navControlsColor?: string;
94
+ };
77
95
  };
78
- declare function WindowLayout({ responsiveBreak, children, windowName, navbarChildren, useWindowStore, defaultDock, }: StoreProp): react_jsx_runtime.JSX.Element;
96
+ declare function WindowLayout({ responsiveBreak, children, windowName, navbarChildren, useWindowStore, defaultDock, style, }: StoreProp): react_jsx_runtime.JSX.Element;
79
97
 
80
98
  declare const windowRegistry: Record<string, UseBoundStore<StoreApi<WindowStore>>>;
81
99
  declare const createWindowStore: (windowId: string, bottomOffsetPx: number) => UseBoundStore<StoreApi<WindowStore>>;
82
100
 
83
- export { WindowButton, WindowLayout, WorkspaceLayout, createWindowStore, windowRegistry };
101
+ export { Coord, ResizeState, WindowButton, WindowLayout, WindowStates, WindowStore, WorkspaceLayout, createWindowStore, windowRegistry };
package/dist/index.js CHANGED
@@ -115,8 +115,8 @@ var createWindowStore = (windowId, bottomOffsetPx) => {
115
115
  winHeight: window.innerHeight / 2 - bottomOffsetPx / 2,
116
116
  winVisualState: "demaximized"
117
117
  }),
118
- WIN_MIN_WIDTH: 360,
119
- WIN_MIN_HEIGHT: 240,
118
+ WIN_MIN_WIDTH: 232,
119
+ WIN_MIN_HEIGHT: 128,
120
120
  setWIN_MIN_WIDTH: (w) => set({ WIN_MIN_WIDTH: w }),
121
121
  setWIN_MIN_HEIGHT: (h) => set({ WIN_MIN_HEIGHT: h })
122
122
  }));
@@ -150,15 +150,23 @@ var bringTargetWindowToFront = (targetId) => {
150
150
  targetWindow.setZIndex(Object.keys(windowRegistry).length);
151
151
  targetWindow.setIsActive(true);
152
152
  };
153
+ var getOpenedWindowCount = () => {
154
+ let openWnidowCount = 0;
155
+ for (const key of Object.keys(windowRegistry)) {
156
+ if (!windowRegistry[key].getState().isWinMinimized)
157
+ openWnidowCount++;
158
+ }
159
+ return openWnidowCount;
160
+ };
153
161
 
154
162
  // src/window-manager/window-button.tsx
155
163
  import { jsx } from "react/jsx-runtime";
156
164
  function WindowButton({
157
165
  children,
158
166
  useWindowStore,
159
- styles,
160
- closedStyle = "brightness-[85%]",
161
- openStyle = "brightness-150"
167
+ className,
168
+ isClosedClassName = "brightness-[85%]",
169
+ isOpenClassName = "brightness-150"
162
170
  }) {
163
171
  const { openWindow, minimizeWindow, isWinMinimized, windowId, isActive } = useWindowStore();
164
172
  const handleOpenCloseWin = () => {
@@ -178,16 +186,16 @@ function WindowButton({
178
186
  id: `${windowId}_button`,
179
187
  onClick: handleOpenCloseWin,
180
188
  className: `
181
- ${styles}
182
- ${isWinMinimized ? closedStyle : openStyle}`,
189
+ ${className}
190
+ ${isWinMinimized ? isClosedClassName : isOpenClassName}`,
183
191
  children
184
192
  }
185
193
  );
186
194
  }
187
195
 
188
- // src/screen-manager/screen-state.ts
196
+ // src/screen-manager/cursor-state.ts
189
197
  import { create as create2 } from "zustand";
190
- var useScreenState = create2((set) => ({
198
+ var useCursorState = create2((set) => ({
191
199
  x: 10,
192
200
  y: 10,
193
201
  setX: (newX) => set({ x: newX }),
@@ -214,7 +222,7 @@ function WindowResizeReset() {
214
222
  return /* @__PURE__ */ jsx2(Fragment, {});
215
223
  }
216
224
  function CursorCoordinates() {
217
- const { setX, setY } = useScreenState();
225
+ const { setX, setY } = useCursorState();
218
226
  useEffect(() => {
219
227
  const handleWindowPosition = (e) => {
220
228
  e.preventDefault();
@@ -249,7 +257,7 @@ import { useEffect as useEffect4, useRef } from "react";
249
257
 
250
258
  // src/window-assets/svg-win-icons.tsx
251
259
  import { jsx as jsx4 } from "react/jsx-runtime";
252
- function iconWinMaximize() {
260
+ function iconWinMaximize(color) {
253
261
  return /* @__PURE__ */ jsx4(
254
262
  "svg",
255
263
  {
@@ -259,8 +267,8 @@ function iconWinMaximize() {
259
267
  width: 24,
260
268
  height: 24,
261
269
  strokeWidth: 1.5,
262
- stroke: "white",
263
- color: "white",
270
+ stroke: color ? color : "#cccccc",
271
+ color: color ? color : "#cccccc",
264
272
  className: "size-6",
265
273
  children: /* @__PURE__ */ jsx4(
266
274
  "path",
@@ -273,7 +281,7 @@ function iconWinMaximize() {
273
281
  }
274
282
  );
275
283
  }
276
- function iconWinDemaximize() {
284
+ function iconWinDemaximize(color) {
277
285
  return /* @__PURE__ */ jsx4(
278
286
  "svg",
279
287
  {
@@ -283,8 +291,8 @@ function iconWinDemaximize() {
283
291
  width: 24,
284
292
  height: 24,
285
293
  strokeWidth: 1.5,
286
- stroke: "white",
287
- color: "white",
294
+ stroke: color ? color : "#cccccc",
295
+ color: color ? color : "#cccccc",
288
296
  className: "size-6",
289
297
  children: /* @__PURE__ */ jsx4(
290
298
  "path",
@@ -297,7 +305,7 @@ function iconWinDemaximize() {
297
305
  }
298
306
  );
299
307
  }
300
- function iconWinMinimize() {
308
+ function iconWinMinimize(color) {
301
309
  return /* @__PURE__ */ jsx4(
302
310
  "svg",
303
311
  {
@@ -307,8 +315,8 @@ function iconWinMinimize() {
307
315
  width: 24,
308
316
  height: 24,
309
317
  strokeWidth: 1.5,
310
- stroke: "white",
311
- color: "white",
318
+ stroke: color ? color : "#cccccc",
319
+ color: color ? color : "#cccccc",
312
320
  className: "size-6",
313
321
  children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
314
322
  }
@@ -331,12 +339,13 @@ function DockingControls({ useWindowStore }) {
331
339
  dockWindowBottomRight
332
340
  } = useWindowStore();
333
341
  const [isVisible, setIsVisible] = useState(false);
342
+ const [isHovering, setIsHovering] = useState(false);
334
343
  useEffect2(() => {
335
344
  let dealy;
336
345
  if (isDragging) {
337
346
  dealy = setTimeout(() => {
338
347
  setIsVisible(true);
339
- }, 400);
348
+ }, 100);
340
349
  } else {
341
350
  setIsVisible(false);
342
351
  }
@@ -347,14 +356,14 @@ function DockingControls({ useWindowStore }) {
347
356
  /* @__PURE__ */ jsx5(
348
357
  "button",
349
358
  {
350
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
359
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-10 h-6 rounded-sm",
351
360
  onMouseUp: dockWindowTopLeft
352
361
  }
353
362
  ),
354
363
  /* @__PURE__ */ jsx5(
355
364
  "button",
356
365
  {
357
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
366
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-10 h-6 rounded-sm",
358
367
  onMouseUp: dockWindowBottomLeft
359
368
  }
360
369
  )
@@ -363,31 +372,31 @@ function DockingControls({ useWindowStore }) {
363
372
  /* @__PURE__ */ jsx5(
364
373
  "button",
365
374
  {
366
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
375
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-10 h-6 rounded-sm",
367
376
  onMouseUp: dockWindowTopRight
368
377
  }
369
378
  ),
370
379
  /* @__PURE__ */ jsx5(
371
380
  "button",
372
381
  {
373
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-5 rounded-sm",
382
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-10 h-6 rounded-sm",
374
383
  onMouseUp: dockWindowBottomRight
375
384
  }
376
385
  )
377
386
  ] })
378
387
  ] });
379
- const sideDideControl = /* @__PURE__ */ jsxs3("div", { className: `flex shrink-0 items-center gap-1`, children: [
388
+ const sideDideControl = /* @__PURE__ */ jsxs3("div", { className: `flex shrink-0 items-center gap-0.5`, children: [
380
389
  /* @__PURE__ */ jsx5(
381
390
  "button",
382
391
  {
383
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-7 h-10 rounded-sm",
392
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-12 rounded-sm",
384
393
  onMouseUp: dockWindowLeft
385
394
  }
386
395
  ),
387
396
  /* @__PURE__ */ jsx5(
388
397
  "button",
389
398
  {
390
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-7 h-10 rounded-sm",
399
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-12 rounded-sm",
391
400
  onMouseUp: dockWindowRight
392
401
  }
393
402
  )
@@ -396,41 +405,60 @@ function DockingControls({ useWindowStore }) {
396
405
  /* @__PURE__ */ jsx5(
397
406
  "button",
398
407
  {
399
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-12 h-5 rounded-sm",
408
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-14 h-6 rounded-sm",
400
409
  onMouseUp: dockWindowTop
401
410
  }
402
411
  ),
403
412
  /* @__PURE__ */ jsx5(
404
413
  "button",
405
414
  {
406
- className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-12 h-5 rounded-sm",
415
+ className: "hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-14 h-6 rounded-sm",
407
416
  onMouseUp: dockWindowBottom
408
417
  }
409
418
  )
410
419
  ] });
411
- const windowDockPannel = /* @__PURE__ */ jsxs3(
412
- "section",
420
+ const windowDockPannel = /* @__PURE__ */ jsx5(
421
+ "span",
413
422
  {
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
423
+ className: "pointer-events-auto px-4 pb-4",
424
+ onMouseOver: () => setIsHovering(true),
425
+ onMouseLeave: () => setIsHovering(false),
426
+ children: /* @__PURE__ */ jsxs3(
427
+ "section",
428
+ {
429
+ className: `
430
+ flex w-fit border border-zinc-600 border-t-0 rounded-b-md bg-zinc-800
431
+ overflow-hidden px-8 gap-4 h-full py-4
417
432
  `,
418
- children: [
419
- cornerDockControl,
420
- horizontalDockControl,
421
- sideDideControl
422
- ]
433
+ children: [
434
+ cornerDockControl,
435
+ horizontalDockControl,
436
+ sideDideControl
437
+ ]
438
+ }
439
+ )
440
+ }
441
+ );
442
+ return /* @__PURE__ */ jsx5(
443
+ "div",
444
+ {
445
+ className: `
446
+ ${isVisible ? isHovering ? "top-0 opacity-50" : "top-[-68px] opacity-80" : "top-[-104px] opacity-0"}
447
+ transition-all duration-500
448
+ absolute z-50 flex items-center justify-center
449
+ w-full mx-auto pointer-events-none`,
450
+ children: windowDockPannel
423
451
  }
424
452
  );
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
453
  }
427
454
 
428
455
  // src/window-manager/components/resizing-controls.tsx
429
456
  import { useEffect as useEffect3 } from "react";
430
457
  import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
431
458
  function ResizingControls({ useWindowStore, windowRef }) {
432
- const { x, y } = useScreenState();
459
+ const { x, y } = useCursorState();
433
460
  const {
461
+ windowId,
434
462
  setWinVisualState,
435
463
  winCoord,
436
464
  setWinCoord,
@@ -481,7 +509,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
481
509
  const winBox = windowRef.current?.getBoundingClientRect();
482
510
  if (!winBox)
483
511
  return;
484
- const minWinWidth = winBox.right - x < WIN_MIN_WIDTH;
512
+ const minWinWidth = winBox.right - x <= WIN_MIN_WIDTH;
485
513
  if (minWinWidth)
486
514
  return;
487
515
  const cursorOutOfBounds = x > window.innerWidth || x < 0;
@@ -491,11 +519,11 @@ function ResizingControls({ useWindowStore, windowRef }) {
491
519
  setWinWidth(winWidth + sizeDiff);
492
520
  setWinCoord({ pointX: x, pointY: winCoord.pointY });
493
521
  };
494
- const resizeTopWinHeight = (winXOverride) => {
522
+ const resizeTopWinHeight = () => {
495
523
  const winBox = windowRef.current?.getBoundingClientRect();
496
524
  if (!winBox)
497
525
  return;
498
- const minWinHeight = winBox.bottom - y < WIN_MIN_HEIGHT;
526
+ const minWinHeight = winBox.bottom - y <= WIN_MIN_HEIGHT;
499
527
  if (minWinHeight)
500
528
  return;
501
529
  const cursorOutOfBounds = y > window.innerHeight || y < 0;
@@ -503,8 +531,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
503
531
  return;
504
532
  const sizeDiff = winBox.top - y;
505
533
  setWinHeight(winHeight + sizeDiff);
506
- const winX = winXOverride ? winXOverride : winCoord.pointX;
507
- setWinCoord({ pointX: winX, pointY: y });
534
+ setWinCoord({ pointX: winCoord.pointX, pointY: y });
508
535
  };
509
536
  const resizeBottomWinHeight = () => {
510
537
  const winBox = windowRef.current?.getBoundingClientRect();
@@ -532,18 +559,114 @@ function ResizingControls({ useWindowStore, windowRef }) {
532
559
  resizeTopWinHeight();
533
560
  };
534
561
  const resizeLeftTopWidthAndHeight = () => {
535
- resizeLeftWinWidth();
536
- resizeTopWinHeight(x);
562
+ const winBox = windowRef.current?.getBoundingClientRect();
563
+ if (!winBox)
564
+ return;
565
+ const cursorOutOfBoundsY = y > window.innerHeight || y < 0;
566
+ const cursorOutOfBoundsX = x > window.innerWidth || x < 0;
567
+ if (cursorOutOfBoundsY || cursorOutOfBoundsX)
568
+ return;
569
+ const minWinHeight = winBox.bottom - y <= WIN_MIN_HEIGHT;
570
+ const minWinWidth = winBox.right - x <= WIN_MIN_WIDTH;
571
+ setWinCoord({
572
+ pointX: minWinWidth ? winCoord.pointX : x,
573
+ pointY: minWinHeight ? winCoord.pointY : y
574
+ });
575
+ if (!minWinHeight) {
576
+ const sizeDiffY = winBox.top - y;
577
+ setWinHeight(winHeight + sizeDiffY);
578
+ }
579
+ if (!minWinWidth) {
580
+ const sizeDiffX = winBox.left - x;
581
+ setWinWidth(winWidth + sizeDiffX);
582
+ }
537
583
  };
538
584
  const handleResizeClick = (isResizing2) => {
539
585
  setIsResizing(isResizing2);
586
+ setRemoteIsResizing(isResizing2);
587
+ };
588
+ const setRemoteIsResizing = (currentResize) => {
589
+ const tolerance = 4;
590
+ const allowDistantResize = getOpenedWindowCount() >= 3;
591
+ for (const key of Object.keys(windowRegistry)) {
592
+ const remoteWin = windowRegistry[key].getState();
593
+ const thisWin = windowRegistry[windowId].getState();
594
+ if (remoteWin.windowId === thisWin.windowId) {
595
+ continue;
596
+ }
597
+ const thisWinStartY = thisWin.winCoord.pointY;
598
+ const thisWinEndY = thisWin.winCoord.pointY + thisWin.winHeight;
599
+ const remoteWinStartY = remoteWin.winCoord.pointY;
600
+ const remoteWinEndY = remoteWin.winCoord.pointY + remoteWin.winHeight;
601
+ const thisWinStartX = thisWin.winCoord.pointX;
602
+ const thisWinEndX = thisWin.winCoord.pointX + thisWin.winWidth;
603
+ const remoteWinStartX = remoteWin.winCoord.pointX;
604
+ const remoteWinEndX = remoteWin.winCoord.pointX + remoteWin.winWidth;
605
+ const isRemoteOutside = remoteWinEndY !== thisWinEndY || remoteWinEndX !== thisWinEndX || remoteWinStartY !== thisWinStartY || remoteWinStartX !== thisWinStartX;
606
+ if (currentResize === "right-width") {
607
+ const isEdgeAlignedOnXAxis = Math.abs(thisWinEndX - remoteWinStartX) <= tolerance;
608
+ const isOverlapOnYAxis = thisWinStartY <= remoteWinEndY && thisWinEndY >= remoteWinStartY;
609
+ const isEdgeResize = allowDistantResize ? isEdgeAlignedOnXAxis : isEdgeAlignedOnXAxis && isOverlapOnYAxis;
610
+ if (isEdgeResize) {
611
+ remoteWin.setIsResizing("left-width");
612
+ }
613
+ const isRemoteOnSameLane = Math.abs(thisWinEndX - remoteWinEndX) < tolerance && Math.abs(thisWinStartX - remoteWinStartX) < tolerance;
614
+ const isRemoteEdgeConnected = Math.abs(thisWinEndY - remoteWinStartY) < tolerance || Math.abs(thisWinStartY - remoteWinEndY) < tolerance;
615
+ const isStackResize = allowDistantResize ? isRemoteOnSameLane && isRemoteOutside : isRemoteOnSameLane && isRemoteEdgeConnected;
616
+ if (isStackResize) {
617
+ remoteWin.setIsResizing("right-width");
618
+ }
619
+ }
620
+ if (currentResize === "left-width") {
621
+ const isEdgeAlignedOnXAxis = Math.abs(thisWinStartX - remoteWinEndX) <= tolerance;
622
+ const isOverlapOnYAxis = thisWinStartY <= remoteWinEndY && thisWinEndY >= remoteWinStartY;
623
+ const isEdgeResize = allowDistantResize ? isEdgeAlignedOnXAxis : isEdgeAlignedOnXAxis && isOverlapOnYAxis;
624
+ if (isEdgeResize) {
625
+ remoteWin.setIsResizing("right-width");
626
+ }
627
+ const isRemoteOnSameLane = Math.abs(thisWinEndX - remoteWinEndX) < tolerance && Math.abs(thisWinStartX - remoteWinStartX) < tolerance;
628
+ const isRemoteEdgeConnected = Math.abs(thisWinEndY - remoteWinStartY) < tolerance || Math.abs(thisWinStartY - remoteWinEndY) < tolerance;
629
+ const isStackResize = allowDistantResize ? isRemoteOnSameLane && isRemoteOutside : isRemoteOnSameLane && isRemoteEdgeConnected;
630
+ if (isStackResize) {
631
+ remoteWin.setIsResizing("left-width");
632
+ }
633
+ }
634
+ if (currentResize === "top-height") {
635
+ const isEdgeAlignedOnYAxis = Math.abs(thisWinStartY - remoteWinEndY) <= tolerance;
636
+ const isOverlapOnXAxis = thisWinStartX <= remoteWinEndX && thisWinEndX >= remoteWinStartX;
637
+ const isEdgeResize = allowDistantResize ? isEdgeAlignedOnYAxis : isEdgeAlignedOnYAxis && isOverlapOnXAxis;
638
+ if (isEdgeResize) {
639
+ remoteWin.setIsResizing("bottom-height");
640
+ }
641
+ const isRemoteOnSameLane = Math.abs(thisWinEndY - remoteWinEndY) < tolerance && Math.abs(thisWinStartY - remoteWinStartY) < tolerance;
642
+ const isRemoteEdgeConnected = Math.abs(thisWinEndX - remoteWinStartX) < tolerance || Math.abs(thisWinStartX - remoteWinEndX) < tolerance;
643
+ const isStackResize = allowDistantResize ? isRemoteOnSameLane && isRemoteOutside : isRemoteOnSameLane && isRemoteEdgeConnected;
644
+ if (isStackResize) {
645
+ remoteWin.setIsResizing("top-height");
646
+ }
647
+ }
648
+ if (currentResize === "bottom-height") {
649
+ const isEdgeAlignedOnYAxis = Math.abs(thisWinEndY - remoteWinStartY) <= tolerance;
650
+ const isOverlapOnXAxis = thisWinStartX <= remoteWinEndX && thisWinEndX >= remoteWinStartX;
651
+ const isEdgeResize = allowDistantResize ? isEdgeAlignedOnYAxis : isEdgeAlignedOnYAxis && isOverlapOnXAxis;
652
+ if (isEdgeResize) {
653
+ remoteWin.setIsResizing("top-height");
654
+ }
655
+ const isRemoteOnSameLane = Math.abs(thisWinEndY - remoteWinEndY) < tolerance && Math.abs(thisWinStartY - remoteWinStartY) < tolerance;
656
+ const isRemoteEdgeConnected = Math.abs(thisWinEndX - remoteWinStartX) < tolerance || Math.abs(thisWinStartX - remoteWinEndX) < tolerance;
657
+ const isStackResize = allowDistantResize ? isRemoteOnSameLane && isRemoteOutside : isRemoteOnSameLane && isRemoteEdgeConnected;
658
+ if (isStackResize) {
659
+ remoteWin.setIsResizing("bottom-height");
660
+ }
661
+ }
662
+ }
540
663
  };
541
664
  return /* @__PURE__ */ jsxs4(Fragment2, { children: [
542
665
  /* @__PURE__ */ jsx6(
543
666
  "span",
544
667
  {
545
668
  onMouseDown: () => handleResizeClick("right-width"),
546
- id: "win-resize-width",
669
+ id: "win-resize-right-width",
547
670
  className: "fixed w-2 opacity-60 cursor-w-resize z-10",
548
671
  style: {
549
672
  top: `${winCoord.pointY}px`,
@@ -556,7 +679,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
556
679
  "span",
557
680
  {
558
681
  onMouseDown: () => handleResizeClick("left-width"),
559
- id: "win-resize-width",
682
+ id: "win-resize-left-width",
560
683
  className: "fixed w-2 opacity-60 cursor-w-resize z-10",
561
684
  style: {
562
685
  top: `${winCoord.pointY}px`,
@@ -569,7 +692,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
569
692
  "span",
570
693
  {
571
694
  onMouseDown: () => handleResizeClick("bottom-height"),
572
- id: "win-resize-height",
695
+ id: "win-resize-bottom-height",
573
696
  className: "fixed h-2 opacity-60 cursor-s-resize z-10",
574
697
  style: {
575
698
  top: `${winCoord.pointY + winHeight - 6}px`,
@@ -582,7 +705,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
582
705
  "span",
583
706
  {
584
707
  onMouseDown: () => handleResizeClick("top-height"),
585
- id: "win-resize-height",
708
+ id: "win-resize-top-height",
586
709
  className: "fixed h-2 opacity-60 cursor-s-resize z-10",
587
710
  style: {
588
711
  top: `${winCoord.pointY - 6}px`,
@@ -595,7 +718,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
595
718
  "span",
596
719
  {
597
720
  onMouseDown: () => handleResizeClick("bottom-right-all"),
598
- id: "win-resize-all",
721
+ id: "win-resize-bottom-right-all",
599
722
  className: "fixed h-3 w-3 opacity-60 cursor-se-resize z-20",
600
723
  style: {
601
724
  top: `${winCoord.pointY + winHeight - 8}px`,
@@ -607,7 +730,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
607
730
  "span",
608
731
  {
609
732
  onMouseDown: () => handleResizeClick("bottom-left-all"),
610
- id: "win-resize-all",
733
+ id: "win-resize-bottom-left-all",
611
734
  className: "fixed h-3 w-3 opacity-60 cursor-sw-resize z-20",
612
735
  style: {
613
736
  top: `${winCoord.pointY + winHeight - 8}px`,
@@ -619,7 +742,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
619
742
  "span",
620
743
  {
621
744
  onMouseDown: () => handleResizeClick("top-right-all"),
622
- id: "win-resize-all",
745
+ id: "win-resize-top-right-all",
623
746
  className: "fixed h-3 w-3 opacity-60 cursor-ne-resize z-20",
624
747
  style: {
625
748
  top: `${winCoord.pointY - 6}px`,
@@ -631,7 +754,7 @@ function ResizingControls({ useWindowStore, windowRef }) {
631
754
  "span",
632
755
  {
633
756
  onMouseDown: () => handleResizeClick("top-left-all"),
634
- id: "win-resize-all",
757
+ id: "win-resize-top-left-all",
635
758
  className: "fixed h-3 w-3 opacity-60 cursor-nw-resize z-20",
636
759
  style: {
637
760
  top: `${winCoord.pointY - 6}px`,
@@ -644,22 +767,16 @@ function ResizingControls({ useWindowStore, windowRef }) {
644
767
 
645
768
  // src/window-manager/window-layout.tsx
646
769
  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
770
  function WindowLayout({
655
771
  responsiveBreak = "lg",
656
772
  children,
657
773
  windowName,
658
774
  navbarChildren,
659
775
  useWindowStore,
660
- defaultDock
776
+ defaultDock,
777
+ style
661
778
  }) {
662
- const { x, y } = useScreenState();
779
+ const { x, y } = useCursorState();
663
780
  const windowRef = useRef(null);
664
781
  const {
665
782
  windowId,
@@ -712,12 +829,30 @@ function WindowLayout({
712
829
  adjustedY = winCoord.pointY;
713
830
  setWinCoord({ pointX: adjustedX, pointY: adjustedY });
714
831
  }, [isDragging, x, y]);
832
+ const responsiveBreakInPx = (breakPoint) => {
833
+ switch (breakPoint) {
834
+ case "sm":
835
+ return 640;
836
+ case "md":
837
+ return 768;
838
+ case "lg":
839
+ return 1024;
840
+ case "xl":
841
+ return 1280;
842
+ case "never":
843
+ return 0;
844
+ case "always":
845
+ return Infinity;
846
+ default:
847
+ return breakPoint;
848
+ }
849
+ };
715
850
  const handleNavbarClick = (isDragging2) => {
716
851
  setDragClickOffset({ pointX: x - winCoord.pointX, pointY: y - winCoord.pointY });
717
852
  setIsDragging(isDragging2);
718
853
  };
719
854
  const isMobile = () => {
720
- return window.innerWidth < responsiveBreakInPx[responsiveBreak];
855
+ return window.innerWidth < responsiveBreakInPx(responsiveBreak);
721
856
  };
722
857
  const handleResizeClick = (isResizing) => {
723
858
  setIsResizing(isResizing);
@@ -727,26 +862,32 @@ function WindowLayout({
727
862
  {
728
863
  className: `block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`,
729
864
  onClick: demaximizeWindow,
730
- children: iconWinDemaximize()
865
+ children: iconWinDemaximize(style?.navControlsColor)
731
866
  }
732
867
  ) : /* @__PURE__ */ jsx7(
733
868
  "button",
734
869
  {
735
870
  className: `block hover:bg-gray-100 hover:bg-opacity-20 px-5 h-full`,
736
871
  onClick: maximizeWindow,
737
- children: iconWinMaximize()
872
+ children: iconWinMaximize(style?.navControlsColor)
738
873
  }
739
874
  );
740
- const minimizeControl = /* @__PURE__ */ jsx7("button", { className: "hover:bg-red-500 hover:bg-opacity-20 px-5 h-full", onClick: minimizeWindow, children: iconWinMinimize() });
875
+ const minimizeControl = /* @__PURE__ */ jsx7("button", { className: "hover:bg-red-500 hover:bg-opacity-20 px-5 h-full", onClick: minimizeWindow, children: iconWinMinimize(style?.navControlsColor) });
741
876
  return /* @__PURE__ */ jsxs5(Fragment3, { children: [
742
877
  !isMobile() && /* @__PURE__ */ jsx7(DockingControls, { useWindowStore }),
743
878
  /* @__PURE__ */ jsxs5(
744
879
  "div",
745
880
  {
746
- onMouseDown: () => bringTargetWindowToFront(windowId),
747
881
  id: windowId,
748
882
  ref: windowRef,
883
+ className: `fixed bg-white shadow-lg border border-zinc-600 rounded-sm overflow-hidden`,
884
+ onMouseDown: () => bringTargetWindowToFront(windowId),
885
+ onMouseUp: () => {
886
+ handleNavbarClick(false);
887
+ handleResizeClick(false);
888
+ },
749
889
  style: {
890
+ backgroundColor: style?.windowBackgroundColor,
750
891
  top: `${winCoord.pointY}px`,
751
892
  left: `${winCoord.pointX}px`,
752
893
  width: `${winWidth}px`,
@@ -758,28 +899,25 @@ function WindowLayout({
758
899
  transform: isWinMinimized ? `translate(${window.innerWidth / 2 - winCoord.pointX - winWidth / 2}px,
759
900
  ${window.innerHeight - winCoord.pointY - winHeight / 2}px) scale(0.02)` : ""
760
901
  },
761
- onMouseUp: () => {
762
- handleNavbarClick(false);
763
- handleResizeClick(false);
764
- },
765
- className: `fixed bg-white shadow-lg border border-zinc-600`,
766
902
  children: [
767
903
  /* @__PURE__ */ jsxs5(
768
904
  "nav",
769
905
  {
770
- className: `h-[32px] w-full bg-neutral-800 flex items-center
771
- ${isActive ? "brightness-100 opacity-100" : "brightness-75 opacity-90"}`,
906
+ style: {
907
+ backgroundColor: style?.navBackgroundColor
908
+ },
909
+ className: `
910
+ h-[32px] w-full flex items-center bg-neutral-800
911
+ ${isActive ? "brightness-100 opacity-100" : "brightness-75 opacity-80"}`,
772
912
  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
- ] }),
913
+ /* @__PURE__ */ jsx7("div", { className: "w-fit shrink-0 h-8 px-2 text-white flex items-center text-sm truncate", children: windowName }),
914
+ /* @__PURE__ */ jsx7("div", { className: "h-8 px-2 text-white flex items-center text-sm truncate", children: navbarChildren }),
777
915
  /* @__PURE__ */ jsx7(
778
916
  "div",
779
917
  {
780
918
  onMouseDown: () => handleNavbarClick(true),
781
919
  onDoubleClick: maximizeWindow,
782
- className: "w-full h-8 px-2 text-white flex items-center text-sm truncate"
920
+ className: "grow min-w-8 h-8 px-2 text-white flex items-center text-sm"
783
921
  }
784
922
  ),
785
923
  !isMobile() && maximizeControl,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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,O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AA,mBACH;AAAA,gBACA,gBAAAD;AAAA,kBAAC;AAAA;AAAA,oBACC,aAAa,MAAM,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"]}
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/cursor-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: 232,\r\n WIN_MIN_HEIGHT: 128,\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\r\nexport const getOpenedWindowCount = () => {\r\n let openWnidowCount = 0\r\n\r\n for (const key of Object.keys(windowRegistry)) {\r\n if (!windowRegistry[key].getState().isWinMinimized) openWnidowCount++\r\n }\r\n\r\n return openWnidowCount\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 Prop = {\r\n children: React.ReactNode\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n className?: string\r\n /** @default 'brightness-[85%]' */\r\n isClosedClassName?: string\r\n /** @default 'brightness-150' */\r\n isOpenClassName?: string\r\n}\r\n\r\nexport default function WindowButton({\r\n children,\r\n useWindowStore,\r\n className,\r\n isClosedClassName = 'brightness-[85%]',\r\n isOpenClassName = 'brightness-150',\r\n}: Prop) {\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 ${className} \r\n ${isWinMinimized ? isClosedClassName : isOpenClassName}`}\r\n >\r\n {children}\r\n </button>\r\n )\r\n}\r\n","import { create } from 'zustand'\r\n\r\ntype CursorState = {\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 useCursorState = create<CursorState>((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 { useCursorState } from './cursor-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/** @FixMe 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 } = useCursorState()\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 { useCursorState } from '../screen-manager/cursor-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 './global-actions/window-global-actions'\r\nimport DockingControls from './components/docking-controls'\r\nimport ResizingControls from './components/resizing-controls'\r\n\r\ntype ResponsiveSizes = 'sm' | 'md' | 'lg' | 'xl' | 'never' | 'always' | number\r\ntype StoreProp = {\r\n children: React.ReactNode\r\n windowName: string | React.ReactNode\r\n useWindowStore: UseBoundStore<StoreApi<WindowStore>>\r\n /**\r\n * @default 'lg'\r\n * @param sm uses mobile format at 640px\r\n * @param md uses mobile format at 768px\r\n * @param lg uses mobile format at 1024px\r\n * @param xl uses mobile format at 1280px\r\n * @param never never uses mobile format\r\n * @param always always uses mobile format\r\n * @param number set custom break point value in px */\r\n responsiveBreak?: ResponsiveSizes\r\n navbarChildren?: React.ReactNode\r\n defaultDock?: 'right' | 'left' | 'full'\r\n\r\n /** @note use CSS values such as hex or supported color names */\r\n style?: {\r\n navBackgroundColor?: string\r\n windowBackgroundColor?: string\r\n navControlsColor?: string\r\n }\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 style,\r\n}: StoreProp) {\r\n const { x, y } = useCursorState()\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 } = 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 responsiveBreakInPx = (breakPoint: ResponsiveSizes): number => {\r\n switch (breakPoint) {\r\n case 'sm':\r\n return 640\r\n case 'md':\r\n return 768\r\n case 'lg':\r\n return 1024\r\n case 'xl':\r\n return 1280\r\n case 'never':\r\n return 0\r\n case 'always':\r\n return Infinity\r\n default:\r\n return breakPoint\r\n }\r\n }\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(style?.navControlsColor)}\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(style?.navControlsColor)}\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(style?.navControlsColor)}\r\n </button>\r\n )\r\n\r\n return (\r\n <>\r\n {!isMobile() && <DockingControls useWindowStore={useWindowStore} />}\r\n <div\r\n id={windowId}\r\n ref={windowRef}\r\n className={`fixed bg-white shadow-lg border border-zinc-600 rounded-sm overflow-hidden`}\r\n onMouseDown={() => bringTargetWindowToFront(windowId)}\r\n onMouseUp={() => {\r\n handleNavbarClick(false)\r\n handleResizeClick(false)\r\n }}\r\n style={{\r\n backgroundColor: style?.windowBackgroundColor,\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 >\r\n <nav\r\n style={{\r\n backgroundColor: style?.navBackgroundColor,\r\n }}\r\n className={`\r\n h-[32px] w-full flex items-center bg-neutral-800\r\n ${isActive ? 'brightness-100 opacity-100' : 'brightness-75 opacity-80'}`}\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 </div>\r\n\r\n <div className=\"h-8 px-2 text-white flex items-center text-sm truncate\">\r\n {navbarChildren}\r\n </div>\r\n\r\n <div\r\n onMouseDown={() => handleNavbarClick(true)}\r\n onDoubleClick={maximizeWindow}\r\n className=\"grow min-w-8 h-8 px-2 text-white flex items-center text-sm\"\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(color?: string) {\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={color ? color : '#cccccc'}\r\n color={color ? color : '#cccccc'}\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(color?: string) {\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={color ? color : '#cccccc'}\r\n color={color ? color : '#cccccc'}\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(color?: string) {\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={color ? color : '#cccccc'}\r\n color={color ? color : '#cccccc'}\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 const [isHovering, setIsHovering] = 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 }, 100)\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-10 h-6 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-10 h-6 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-10 h-6 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-10 h-6 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-0.5`}>\r\n <button\r\n className=\"hover:bg-zinc-300 border border-zinc-500 bg-zinc-600 w-8 h-12 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-8 h-12 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-14 h-6 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-14 h-6 rounded-sm\"\r\n onMouseUp={dockWindowBottom}\r\n ></button>\r\n </div>\r\n )\r\n\r\n const windowDockPannel = (\r\n <span\r\n className=\"pointer-events-auto px-4 pb-4\"\r\n onMouseOver={() => setIsHovering(true)}\r\n onMouseLeave={() => setIsHovering(false)}\r\n >\r\n <section\r\n className={`\r\n flex w-fit border border-zinc-600 border-t-0 rounded-b-md bg-zinc-800 \r\n overflow-hidden px-8 gap-4 h-full py-4 \r\n `}\r\n >\r\n {cornerDockControl}\r\n {horizontalDockControl}\r\n {sideDideControl}\r\n </section>\r\n </span>\r\n )\r\n\r\n return (\r\n <div\r\n className={`\r\n ${\r\n isVisible\r\n ? isHovering\r\n ? 'top-0 opacity-50'\r\n : 'top-[-68px] opacity-80'\r\n : 'top-[-104px] opacity-0'\r\n } \r\n transition-all duration-500\r\n absolute z-50 flex items-center justify-center \r\n w-full mx-auto pointer-events-none`}\r\n >\r\n {windowDockPannel}\r\n </div>\r\n )\r\n}\r\n","import { StoreApi, UseBoundStore } from 'zustand'\r\nimport { Coord, ResizeState, WindowStore } from '../window-types'\r\nimport { useCursorState } from '../../screen-manager/cursor-state'\r\nimport { RefObject, useEffect } from 'react'\r\nimport { windowRegistry } from '../window-store-factory'\r\nimport { getOpenedWindowCount } from '../global-actions/window-global-actions'\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 } = useCursorState()\r\n const {\r\n windowId,\r\n\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 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 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 /**\r\n * @note this specific case needs it's own logic instead of simply calling\r\n * resizeLeftWinWidth & resizeTopWinHeight. Since both manipulate\r\n * winWidth, winHeight and winCoord, one's logic will override the other\r\n */\r\n const resizeLeftTopWidthAndHeight = () => {\r\n const winBox = windowRef.current?.getBoundingClientRect()\r\n if (!winBox) return\r\n\r\n const cursorOutOfBoundsY = y > window.innerHeight || y < 0\r\n const cursorOutOfBoundsX = x > window.innerWidth || x < 0\r\n if (cursorOutOfBoundsY || cursorOutOfBoundsX) return\r\n\r\n const minWinHeight = winBox.bottom - y <= WIN_MIN_HEIGHT\r\n const minWinWidth = winBox.right - x <= WIN_MIN_WIDTH\r\n\r\n setWinCoord({\r\n pointX: minWinWidth ? winCoord.pointX : x,\r\n pointY: minWinHeight ? winCoord.pointY : y,\r\n })\r\n\r\n if (!minWinHeight) {\r\n const sizeDiffY = winBox.top - y\r\n setWinHeight(winHeight + sizeDiffY)\r\n }\r\n\r\n if (!minWinWidth) {\r\n const sizeDiffX = winBox.left - x\r\n setWinWidth(winWidth + sizeDiffX)\r\n }\r\n }\r\n\r\n const handleResizeClick = (isResizing: ResizeState) => {\r\n setIsResizing(isResizing)\r\n setRemoteIsResizing(isResizing)\r\n }\r\n\r\n /** @FixMe this function is a nice feature, but very complex, needs to be written in a clearer way */\r\n const setRemoteIsResizing = (currentResize: ResizeState) => {\r\n const tolerance = 4\r\n const allowDistantResize = getOpenedWindowCount() >= 3\r\n\r\n for (const key of Object.keys(windowRegistry)) {\r\n const remoteWin = windowRegistry[key].getState()\r\n const thisWin = windowRegistry[windowId].getState()\r\n\r\n if (remoteWin.windowId === thisWin.windowId) {\r\n continue\r\n }\r\n\r\n const thisWinStartY = thisWin.winCoord.pointY\r\n const thisWinEndY = thisWin.winCoord.pointY + thisWin.winHeight\r\n const remoteWinStartY = remoteWin.winCoord.pointY\r\n const remoteWinEndY = remoteWin.winCoord.pointY + remoteWin.winHeight\r\n\r\n const thisWinStartX = thisWin.winCoord.pointX\r\n const thisWinEndX = thisWin.winCoord.pointX + thisWin.winWidth\r\n const remoteWinStartX = remoteWin.winCoord.pointX\r\n const remoteWinEndX = remoteWin.winCoord.pointX + remoteWin.winWidth\r\n\r\n const isRemoteOutside =\r\n remoteWinEndY !== thisWinEndY ||\r\n remoteWinEndX !== thisWinEndX ||\r\n remoteWinStartY !== thisWinStartY ||\r\n remoteWinStartX !== thisWinStartX\r\n /*\r\n * thisWin right edge <::::> remoteWin left edge || remoteWin is stacked */\r\n if (currentResize === 'right-width') {\r\n const isEdgeAlignedOnXAxis = Math.abs(thisWinEndX - remoteWinStartX) <= tolerance\r\n const isOverlapOnYAxis = thisWinStartY <= remoteWinEndY && thisWinEndY >= remoteWinStartY\r\n\r\n const isEdgeResize = allowDistantResize\r\n ? isEdgeAlignedOnXAxis\r\n : isEdgeAlignedOnXAxis && isOverlapOnYAxis\r\n if (isEdgeResize) {\r\n remoteWin.setIsResizing('left-width')\r\n }\r\n\r\n const isRemoteOnSameLane =\r\n Math.abs(thisWinEndX - remoteWinEndX) < tolerance &&\r\n Math.abs(thisWinStartX - remoteWinStartX) < tolerance\r\n const isRemoteEdgeConnected =\r\n Math.abs(thisWinEndY - remoteWinStartY) < tolerance ||\r\n Math.abs(thisWinStartY - remoteWinEndY) < tolerance\r\n\r\n const isStackResize = allowDistantResize\r\n ? isRemoteOnSameLane && isRemoteOutside\r\n : isRemoteOnSameLane && isRemoteEdgeConnected\r\n if (isStackResize) {\r\n remoteWin.setIsResizing('right-width')\r\n }\r\n }\r\n\r\n /*\r\n * thisWin left edge <::::> remoteWin right edge || remoteWin is stacked */\r\n if (currentResize === 'left-width') {\r\n const isEdgeAlignedOnXAxis = Math.abs(thisWinStartX - remoteWinEndX) <= tolerance\r\n const isOverlapOnYAxis = thisWinStartY <= remoteWinEndY && thisWinEndY >= remoteWinStartY\r\n\r\n const isEdgeResize = allowDistantResize\r\n ? isEdgeAlignedOnXAxis\r\n : isEdgeAlignedOnXAxis && isOverlapOnYAxis\r\n if (isEdgeResize) {\r\n remoteWin.setIsResizing('right-width')\r\n }\r\n\r\n const isRemoteOnSameLane =\r\n Math.abs(thisWinEndX - remoteWinEndX) < tolerance &&\r\n Math.abs(thisWinStartX - remoteWinStartX) < tolerance\r\n const isRemoteEdgeConnected =\r\n Math.abs(thisWinEndY - remoteWinStartY) < tolerance ||\r\n Math.abs(thisWinStartY - remoteWinEndY) < tolerance\r\n\r\n const isStackResize = allowDistantResize\r\n ? isRemoteOnSameLane && isRemoteOutside\r\n : isRemoteOnSameLane && isRemoteEdgeConnected\r\n if (isStackResize) {\r\n remoteWin.setIsResizing('left-width')\r\n }\r\n }\r\n\r\n /*\r\n * thisWin top edge <::::> remoteWin bottom edge || remoteWin is stacked */\r\n if (currentResize === 'top-height') {\r\n const isEdgeAlignedOnYAxis = Math.abs(thisWinStartY - remoteWinEndY) <= tolerance\r\n const isOverlapOnXAxis = thisWinStartX <= remoteWinEndX && thisWinEndX >= remoteWinStartX\r\n\r\n const isEdgeResize = allowDistantResize\r\n ? isEdgeAlignedOnYAxis\r\n : isEdgeAlignedOnYAxis && isOverlapOnXAxis\r\n if (isEdgeResize) {\r\n remoteWin.setIsResizing('bottom-height')\r\n }\r\n\r\n const isRemoteOnSameLane =\r\n Math.abs(thisWinEndY - remoteWinEndY) < tolerance &&\r\n Math.abs(thisWinStartY - remoteWinStartY) < tolerance\r\n const isRemoteEdgeConnected =\r\n Math.abs(thisWinEndX - remoteWinStartX) < tolerance ||\r\n Math.abs(thisWinStartX - remoteWinEndX) < tolerance\r\n\r\n const isStackResize = allowDistantResize\r\n ? isRemoteOnSameLane && isRemoteOutside\r\n : isRemoteOnSameLane && isRemoteEdgeConnected\r\n if (isStackResize) {\r\n remoteWin.setIsResizing('top-height')\r\n }\r\n }\r\n\r\n /*\r\n * thisWin bottom edge <::::> remoteWin top edge || remoteWin is stacked */\r\n if (currentResize === 'bottom-height') {\r\n const isEdgeAlignedOnYAxis = Math.abs(thisWinEndY - remoteWinStartY) <= tolerance\r\n const isOverlapOnXAxis = thisWinStartX <= remoteWinEndX && thisWinEndX >= remoteWinStartX\r\n\r\n const isEdgeResize = allowDistantResize\r\n ? isEdgeAlignedOnYAxis\r\n : isEdgeAlignedOnYAxis && isOverlapOnXAxis\r\n if (isEdgeResize) {\r\n remoteWin.setIsResizing('top-height')\r\n }\r\n\r\n const isRemoteOnSameLane =\r\n Math.abs(thisWinEndY - remoteWinEndY) < tolerance &&\r\n Math.abs(thisWinStartY - remoteWinStartY) < tolerance\r\n const isRemoteEdgeConnected =\r\n Math.abs(thisWinEndX - remoteWinStartX) < tolerance ||\r\n Math.abs(thisWinStartX - remoteWinEndX) < tolerance\r\n\r\n const isStackResize = allowDistantResize\r\n ? isRemoteOnSameLane && isRemoteOutside\r\n : isRemoteOnSameLane && isRemoteEdgeConnected\r\n if (isStackResize) {\r\n remoteWin.setIsResizing('bottom-height')\r\n }\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n <span\r\n onMouseDown={() => handleResizeClick('right-width')}\r\n id=\"win-resize-right-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-left-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-bottom-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-top-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-bottom-right-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-bottom-left-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-top-right-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-top-left-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,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,C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BACL,iBAAiB,OAAO;AAAA,cAC1B;AAAA,cACA,WAAW;AAAA;AAAA,cAEP,WAAW,+BAA+B;AAAA,cAE9C;AAAA,gCAAAD,KAAC,SAAI,WAAU,yEACZ,sBACH;AAAA,gBAEA,gBAAAA,KAAC,SAAI,WAAU,0DACZ,0BACH;AAAA,gBAEA,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,aAAa,MAAM,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","useEffect","isResizing","Fragment","jsx","jsxs","useEffect","isDragging"]}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@gustavolmo/react-window-manager",
3
- "version": "0.1.301",
3
+ "version": "0.2.000",
4
4
  "private": false,
5
+ "license": "MIT",
5
6
  "type": "module",
6
7
  "main": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",
@@ -13,7 +14,9 @@
13
14
  "./*": "./dist/*.js",
14
15
  "./index.css": "./dist/index.css"
15
16
  },
16
- "files": ["dist"],
17
+ "files": [
18
+ "dist"
19
+ ],
17
20
  "peerDependencies": {
18
21
  "react": "^19.0.0",
19
22
  "react-dom": "^19.0.0"
@@ -42,4 +45,4 @@
42
45
  "lint": "eslint src --ext .ts,.tsx",
43
46
  "publish": "npm publish --access public"
44
47
  }
45
- }
48
+ }