utopia-ui 3.0.0-alpha.164 → 3.0.0-alpha.166
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.js +15 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -140,7 +140,7 @@ function styleInject(css, ref) {
|
|
140
140
|
}
|
141
141
|
}
|
142
142
|
|
143
|
-
var css_248z$2 = ".leaflet-container {\n text-align: left;\n background-image: url(\"data:image/svg+xml,%3Csvg width='40' height='40' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-position: 50% 80%; \n }\n \n input {\n box-sizing: border-box;\n }\n \n textarea {\n box-sizing: border-box;\n }\n \n .leaflet-control-attribution {\n display: none;\n }\n \n .leaflet-control-locate {\n display: none;\n }\n\n .leaflet-data-marker {\n \n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAB3klEQVR42s3U4UdDURzG8czMXJnJ1Vwzc6VJZjaZJdlMlpQsKdmUFNOUspRSSqUolfQfr+fF98Vx5mwv9qbDx7LdznnO7/7Omej3+/+Ga0QMUYkhbvBgmhzCQxwxibIGrGEF8CQhU+LLtKQkQNqScUgjxRxTBIxbgfgD/BgnhM8kM5KTeclLQYqGkkMRBckzR8ic/mAgd5BAZplsUaqyIg2sDtHg2brUZJk5SmwopErJUWE8SpmTMhNvya60Zd/SNrR4bkeaskG4uiwRZk6yrJEYFibGAxn+scECHTmTnuVCzvmty3PHciB7bGKN6lQkzysPqIrHmpFhYbKUtckC1/Ioz4ZHuZdbuSLYiRxRpSZVWXZVxAzC0R4Ik5SQsu6w8yd5l2/5kg95I9SdXMoZQfYIUjeqEUrgOkXGPeN4TYRhxy8E+ZUf+eS7B7miIoeybVSjKDnm8u3+gH3pDTYwu1igATvs/pXqvBKiR4i2bNJfi1ZfUAnjgrOG8wY2quNzBKuU/ZS+uSFEl5O0xRGuUIlZCcw7xG5QPkeHYUSNV5WXGou2sC3rBC0LjenqCXGO0WEiTJa0Lr4KixdHBrDGuGGiRqCUpFk8pGIpQtCU7p4YPwxYxEMCk1aAMQZh8Ac8PfbIzYPJOwAAAABJRU5ErkJggg==') no-repeat;\n background-position: 6px 32px;\n }\n \n .crosshair-cursor-enabled {\n cursor: crosshair;\n }\n \n .leaflet-container {\n cursor: inherit;\n }\n \n .calendar-icon {\n position: relative;\n top: -35px;\n left: 10px;\n width: 13px;\n }\n \n .user-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .circle-icon {\n position: relative;\n top: -33px;\n left: 10px;\n width: 13px;\n }\n\n .fire-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .tree-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n .music-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .quest-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n }\n\n .drum-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n .compass-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n \n .leaflet-popup-scrolled {\n overflow-x: hidden;\n }\n\n .leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n\n }\n\n .leaflet-tooltip {\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n border-width: 0px;\n border-radius: 1em;\n transition: opacity 500ms;\n transition-delay: 50ms;\n }\n\n .leaflet-tooltip-top::before {\n border-top-color: var(--fallback-b1,oklch(var(--b1)/1));\n }\n\n .marker-cluster span {\n color: #000;\n }";
|
143
|
+
var css_248z$2 = ".leaflet-container {\n text-align: left;\n background-image: url(\"data:image/svg+xml,%3Csvg width='40' height='40' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-position: 50% 80%; \n }\n \n input {\n box-sizing: border-box;\n }\n \n textarea {\n box-sizing: border-box;\n }\n \n .leaflet-control-attribution {\n display: none;\n }\n \n .leaflet-control-locate {\n display: none;\n }\n\n .leaflet-data-marker {\n \n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAB3klEQVR42s3U4UdDURzG8czMXJnJ1Vwzc6VJZjaZJdlMlpQsKdmUFNOUspRSSqUolfQfr+fF98Vx5mwv9qbDx7LdznnO7/7Omej3+/+Ga0QMUYkhbvBgmhzCQxwxibIGrGEF8CQhU+LLtKQkQNqScUgjxRxTBIxbgfgD/BgnhM8kM5KTeclLQYqGkkMRBckzR8ic/mAgd5BAZplsUaqyIg2sDtHg2brUZJk5SmwopErJUWE8SpmTMhNvya60Zd/SNrR4bkeaskG4uiwRZk6yrJEYFibGAxn+scECHTmTnuVCzvmty3PHciB7bGKN6lQkzysPqIrHmpFhYbKUtckC1/Ioz4ZHuZdbuSLYiRxRpSZVWXZVxAzC0R4Ik5SQsu6w8yd5l2/5kg95I9SdXMoZQfYIUjeqEUrgOkXGPeN4TYRhxy8E+ZUf+eS7B7miIoeybVSjKDnm8u3+gH3pDTYwu1igATvs/pXqvBKiR4i2bNJfi1ZfUAnjgrOG8wY2quNzBKuU/ZS+uSFEl5O0xRGuUIlZCcw7xG5QPkeHYUSNV5WXGou2sC3rBC0LjenqCXGO0WEiTJa0Lr4KixdHBrDGuGGiRqCUpFk8pGIpQtCU7p4YPwxYxEMCk1aAMQZh8Ac8PfbIzYPJOwAAAABJRU5ErkJggg==') no-repeat;\n background-position: 6px 32px;\n }\n \n .crosshair-cursor-enabled {\n cursor: crosshair;\n }\n \n .leaflet-container {\n cursor: inherit;\n }\n \n .calendar-icon {\n position: relative;\n top: -35px;\n left: 10px;\n width: 13px;\n }\n \n .user-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .circle-icon {\n position: relative;\n top: -33px;\n left: 10px;\n width: 13px;\n }\n\n .fire-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .tree-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n .music-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .quest-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n }\n\n .drum-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n \n .compass-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n \n .leaflet-popup-scrolled {\n overflow-x: hidden;\n }\n\n .leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n\n }\n\n .leaflet-tooltip {\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n border-width: 0px;\n border-radius: 1em;\n transition: opacity 500ms;\n transition-delay: 50ms;\n }\n\n .leaflet-tooltip-top::before {\n border-top-color: var(--fallback-b1,oklch(var(--b1)/1));\n }\n\n .marker-cluster span {\n color: #000;\n }";
|
144
144
|
styleInject(css_248z$2);
|
145
145
|
|
146
146
|
var LayerContext = createContext({
|
@@ -2910,9 +2910,6 @@ var SearchControl = function () {
|
|
2910
2910
|
return [2 /*return*/];
|
2911
2911
|
});
|
2912
2912
|
}); };
|
2913
|
-
useEffect(function () {
|
2914
|
-
console.log(value);
|
2915
|
-
}, [value]);
|
2916
2913
|
var searchInput = useRef(null);
|
2917
2914
|
return (jsx(Fragment, { children: !(windowDimensions.height < 500 && popupOpen && hideSuggestions) &&
|
2918
2915
|
jsxs("div", __assign({ className: 'tw-w-[calc(100vw-2rem)] tw-max-w-[22rem] ' }, { children: [jsxs("div", __assign({ className: 'flex tw-flex-row' }, { children: [jsx("input", { type: "text", placeholder: "search ...", autoComplete: "off", value: value, className: "tw-input tw-input-bordered tw-w-full tw-shadow-xl tw-rounded-lg tw-mr-2", ref: searchInput, onChange: function (e) { return setValue(e.target.value); }, onFocus: function () {
|
@@ -3914,6 +3911,13 @@ function NavBar(_a) {
|
|
3914
3911
|
useEffect(function () {
|
3915
3912
|
nameRef && setNameWidth(nameRef.current.scrollWidth);
|
3916
3913
|
}, [nameRef, appName]);
|
3914
|
+
var location = useLocation();
|
3915
|
+
var _e = useState(true), showNav = _e[0], setShowNav = _e[1];
|
3916
|
+
useEffect(function () {
|
3917
|
+
var params = new URLSearchParams(location.search);
|
3918
|
+
var embedded = params.get("embedded");
|
3919
|
+
embedded == "true" && setShowNav(false);
|
3920
|
+
}, [location]);
|
3917
3921
|
var onLogout = function () {
|
3918
3922
|
toast.promise(logout(), {
|
3919
3923
|
success: {
|
@@ -3932,10 +3936,13 @@ function NavBar(_a) {
|
|
3932
3936
|
pending: 'logging out ..'
|
3933
3937
|
});
|
3934
3938
|
};
|
3935
|
-
|
3936
|
-
|
3937
|
-
|
3938
|
-
|
3939
|
+
if (showNav)
|
3940
|
+
return (jsx(Fragment, { children: jsxs("div", __assign({ className: "tw-navbar tw-bg-base-100 tw-z-[10000] tw-shadow-xl tw-relative" }, { children: [jsx("button", __assign({ className: "tw-btn tw-btn-square tw-btn-ghost", "data-te-sidenav-toggle-ref": true, "data-te-target": "#sidenav", "aria-controls": "#sidenav", "aria-haspopup": "true" }, { children: jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", className: "tw-inline-block tw-w-5 tw-h-5 tw-stroke-current" }, { children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 6h16M4 12h16M4 18h16" }) })) })), jsx("div", __assign({ className: "tw-flex-1 tw-mr-2" }, { children: jsxs("div", __assign({ className: "tw-flex-1 tw-truncate tw-grid tw-grid-flow-col", style: { maxWidth: nameWidth + 60 } }, { children: [jsx(Link, __assign({ className: "tw-btn tw-btn-ghost tw-px-2 tw-normal-case tw-text-xl tw-flex-1 tw-truncate", to: "/" }, { children: jsx("h1", __assign({ ref: nameRef, className: "tw-truncate" }, { children: appName })) })), jsx("button", __assign({ className: "tw-btn tw-px-2 tw-btn-ghost", onClick: function () { return window.my_modal_3.showModal(); } }, { children: jsx(QuestionMarkIcon, { className: "tw-h-5 tw-w-5" }) }))] })) })), isAuthenticated ?
|
3941
|
+
jsxs("div", __assign({ className: "tw-flex-none" }, { children: [(userProfile === null || userProfile === void 0 ? void 0 : userProfile.image) ? jsx("div", __assign({ className: "tw-avatar" }, { children: jsx("div", __assign({ className: "tw-w-10 tw-rounded-full" }, { children: jsx("img", { src: "https://api.utopia-lab.org/assets/" + userProfile.image }) })) })) : jsx(Fragment, {}), jsx("div", __assign({ className: 'tw-ml-2 tw-mr-2' }, { children: userProfile.name || (user === null || user === void 0 ? void 0 : user.first_name) })), jsxs("div", __assign({ className: "tw-dropdown tw-dropdown-end" }, { children: [jsx("label", __assign({ tabIndex: 0, className: "tw-btn tw-btn-ghost tw-btn-square" }, { children: jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", className: "tw-h-5 tw-w-5", viewBox: "0 0 20 20", fill: "currentColor" }, { children: jsx("path", { d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" }) })) })), jsxs("ul", __assign({ tabIndex: 0, className: "tw-menu tw-menu-compact tw-dropdown-content tw-mt-3 tw-p-2 tw-shadow tw-bg-base-100 tw-rounded-box tw-w-52 !tw-z-[10000]" }, { children: [jsx("li", { children: jsx(Link, __assign({ to: "".concat(userProfile.id && "/edit-item/" + userProfile.id) }, { children: "Profile" })) }), jsx("li", { children: jsx(Link, __assign({ to: "/user-settings" }, { children: "Settings" })) }), jsx("li", { children: jsx("a", __assign({ onClick: function () { onLogout(); } }, { children: "Logout" })) })] }))] }))] }))
|
3942
|
+
:
|
3943
|
+
jsxs("div", { children: [jsxs("div", __assign({ className: "tw-hidden md:tw-flex" }, { children: [jsx(Link, __assign({ to: "/login" }, { children: jsx("div", __assign({ className: "tw-btn tw-btn-ghost tw-mr-2" }, { children: "Login" })) })), jsx(Link, __assign({ to: "/signup" }, { children: jsx("div", __assign({ className: "tw-btn tw-btn-ghost tw-mr-2" }, { children: "Sign Up" })) }))] })), jsxs("div", __assign({ className: "tw-dropdown tw-dropdown-end" }, { children: [jsx("label", __assign({ tabIndex: 1, className: "tw-btn tw-btn-ghost md:tw-hidden" }, { children: jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", className: "tw-h-5 tw-w-5", viewBox: "0 0 20 20", fill: "currentColor" }, { children: jsx("path", { d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" }) })) })), jsxs("ul", __assign({ tabIndex: 1, className: "tw-menu tw-dropdown-content tw-mt-3 tw-p-2 tw-shadow tw-bg-base-100 tw-rounded-box tw-w-52 !tw-z-[10000]" }, { children: [jsx("li", { children: jsx(Link, __assign({ to: "/login" }, { children: "Login" })) }), jsx("li", { children: jsx(Link, __assign({ to: "/signup" }, { children: "Sign Up" })) })] }))] }))] })] })) }));
|
3944
|
+
else
|
3945
|
+
return (jsx(Fragment, {}));
|
3939
3946
|
}
|
3940
3947
|
|
3941
3948
|
var SetAssetsApi = function (_a) {
|