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