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