utopia-ui 3.0.63 → 3.0.65

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.
@@ -3,7 +3,7 @@ export type { AssetsApi } from '#types/AssetsApi';
3
3
  /**
4
4
  * @category AppShell
5
5
  */
6
- export declare function AppShell({ appName, children, assetsApi, userType, }: {
6
+ export declare function AppShell({ appName, children, assetsApi, }: {
7
7
  appName: string;
8
8
  children: React.ReactNode;
9
9
  assetsApi: AssetsApi;
@@ -1,6 +1,6 @@
1
- type ContentProps = {
1
+ interface ContentProps {
2
2
  children?: React.ReactNode;
3
- };
3
+ }
4
4
  /**
5
5
  * @category AppShell
6
6
  */
@@ -1,6 +1,6 @@
1
1
  export declare const ContextWrapper: ({ children }: {
2
- children: any;
3
- }) => any;
2
+ children: React.ReactNode;
3
+ }) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
4
4
  export declare const Wrappers: ({ children }: {
5
5
  children: any;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- export default function NavBar({ appName, userType }: {
1
+ export default function NavBar({ appName }: {
2
2
  appName: string;
3
- userType: string;
4
3
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import type { AssetsApi } from '#types/AssetsApi';
2
- export declare const SetAppState: ({ assetsApi, userType, }: {
2
+ export declare const SetAppState: ({ assetsApi }: {
3
3
  assetsApi: AssetsApi;
4
- userType: string;
5
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,14 @@
1
- type route = {
1
+ export interface Route {
2
2
  path: string;
3
3
  icon: JSX.Element;
4
4
  name: string;
5
- submenu?: route;
5
+ submenu?: Route[];
6
6
  blank?: boolean;
7
- };
7
+ }
8
8
  /**
9
9
  * @category AppShell
10
10
  */
11
11
  export declare function SideBar({ routes, bottomRoutes }: {
12
- routes: route[];
13
- bottomRoutes?: route[];
12
+ routes: Route[];
13
+ bottomRoutes?: Route[];
14
14
  }): import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,7 +1,8 @@
1
+ import type { Route } from './SideBar';
1
2
  declare function SidebarSubmenu({ submenu, name, icon, }: {
2
3
  path: string;
3
4
  icon: JSX.Element;
4
5
  name: string;
5
- submenu?: any | undefined;
6
+ submenu?: Route[];
6
7
  }): import("react/jsx-runtime").JSX.Element;
7
8
  export default SidebarSubmenu;
@@ -2,5 +2,5 @@
2
2
  * @category Auth
3
3
  */
4
4
  export declare function RequestPasswordPage({ resetUrl }: {
5
- resetUrl: any;
5
+ resetUrl: string;
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- export * from './useAuth';
1
+ export { AuthProvider, UserApi, UserItem } from './useAuth';
2
2
  export { LoginPage } from './LoginPage';
3
3
  export { SignupPage } from './SignupPage';
4
4
  export { RequestPasswordPage } from './RequestPasswordPage';
@@ -17,11 +17,11 @@ interface AuthContextProps {
17
17
  login: (credentials: AuthCredentials) => Promise<UserItem | undefined>;
18
18
  register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>;
19
19
  loading: boolean;
20
- logout: () => Promise<any>;
21
- updateUser: (user: UserItem) => any;
22
- token: string | null;
23
- requestPasswordReset: (email: string, reset_url: string) => Promise<any>;
24
- passwordReset: (token: string, new_password: string) => Promise<any>;
20
+ logout: () => Promise<void>;
21
+ updateUser: (user: UserItem) => Promise<UserItem>;
22
+ token: string | undefined;
23
+ requestPasswordReset: (email: string, reset_url: string) => Promise<void>;
24
+ passwordReset: (token: string, new_password: string) => Promise<void>;
25
25
  }
26
26
  /**
27
27
  * @category Auth
@@ -3,10 +3,11 @@ declare function useQuestsManager(initialOpen: boolean): {
3
3
  open: boolean;
4
4
  setQuestsOpen: (open: boolean) => void;
5
5
  };
6
- export declare const QuestsProvider: React.FunctionComponent<{
6
+ interface QuestProviderProps {
7
7
  initialOpen: boolean;
8
8
  children?: React.ReactNode;
9
- }>;
9
+ }
10
+ export declare const QuestsProvider: React.FunctionComponent<QuestProviderProps>;
10
11
  export declare const useQuestsOpen: () => boolean;
11
12
  export declare const useSetQuestOpen: () => UseQuestManagerResult["setQuestsOpen"];
12
13
  export {};
@@ -1,4 +1,4 @@
1
- type SelectBoxProps = {
1
+ interface SelectBoxProps {
2
2
  labelTitle?: string;
3
3
  labelStyle?: string;
4
4
  type?: string;
@@ -11,7 +11,7 @@ type SelectBoxProps = {
11
11
  value: string;
12
12
  }[];
13
13
  labelDescription?: string;
14
- };
14
+ }
15
15
  /**
16
16
  * @category Input
17
17
  */
@@ -1,4 +1,4 @@
1
- type TextAreaProps = {
1
+ interface TextAreaProps {
2
2
  labelTitle?: string;
3
3
  labelStyle?: string;
4
4
  containerStyle?: string;
@@ -8,7 +8,7 @@ type TextAreaProps = {
8
8
  placeholder?: string;
9
9
  required?: boolean;
10
10
  updateFormValue?: (value: string) => void;
11
- };
11
+ }
12
12
  /**
13
13
  * @category Input
14
14
  */
@@ -1,4 +1,4 @@
1
- type InputTextProps = {
1
+ interface InputTextProps {
2
2
  labelTitle?: string;
3
3
  labelStyle?: string;
4
4
  type?: string;
@@ -11,7 +11,7 @@ type InputTextProps = {
11
11
  pattern?: string;
12
12
  required?: boolean;
13
13
  updateFormValue?: (value: string) => void;
14
- };
14
+ }
15
15
  /**
16
16
  * @category Input
17
17
  */
@@ -1,4 +1,5 @@
1
1
  import type { LayerProps } from '#types/LayerProps';
2
+ export type { Point } from 'geojson';
2
3
  export type { Item } from '#types/Item';
3
4
  export type { LayerProps } from '#types/LayerProps';
4
5
  export type { Tag } from '#types/Tag';
@@ -6,4 +7,4 @@ export type { Popup } from 'leaflet';
6
7
  /**
7
8
  * @category Map
8
9
  */
9
- export declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef, }: LayerProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, userProfileLayer, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef, }: LayerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const useDebounce: (callback: any, delay: any, deps: any) => void;
1
+ export declare const useDebounce: (callback: () => void, delay: number, deps: string[]) => void;
@@ -6,7 +6,7 @@ import type { PermissionAction } from '#types/PermissionAction';
6
6
  type UsePermissionManagerResult = ReturnType<typeof usePermissionsManager>;
7
7
  declare function usePermissionsManager(initialPermissions: Permission[]): {
8
8
  permissions: Permission[];
9
- setPermissionApi: (api: ItemsApi<any>) => void;
9
+ setPermissionApi: (api: ItemsApi<Permission>) => void;
10
10
  setPermissionData: (data: Permission[]) => void;
11
11
  setAdminRole: (adminRole: string) => void;
12
12
  hasUserPermission: (collectionName: string, action: PermissionAction, item?: Item, layer?: LayerProps) => boolean;
@@ -1,4 +1,3 @@
1
1
  export { UserSettings } from './UserSettings';
2
- export { PlusButton } from './Subcomponents/PlusButton';
3
2
  export { ProfileView } from './ProfileView';
4
3
  export { ProfileForm } from './ProfileForm';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utopia-ui",
3
- "version": "3.0.63",
3
+ "version": "3.0.65",
4
4
  "description": "Reuseable React Components to build mapping apps for real life communities and networks",
5
5
  "repository": "https://github.com/utopia-os/utopia-ui",
6
6
  "homepage": "https://utopia-os.org/",
@@ -58,6 +58,7 @@
58
58
  "eslint-import-resolver-typescript": "^3.6.3",
59
59
  "eslint-plugin-import": "^2.31.0",
60
60
  "eslint-plugin-json": "^3.1.0",
61
+ "eslint-plugin-n": "^16.6.2",
61
62
  "eslint-plugin-no-catch-all": "^1.1.0",
62
63
  "eslint-plugin-prettier": "^5.2.1",
63
64
  "eslint-plugin-promise": "^6.1.1",
@@ -66,7 +67,6 @@
66
67
  "eslint-plugin-react-refresh": "^0.4.18",
67
68
  "eslint-plugin-security": "^3.0.1",
68
69
  "eslint-plugin-yml": "^1.14.0",
69
- "globals": "^15.14.0",
70
70
  "happy-dom": "^16.8.1",
71
71
  "postcss": "^8.4.21",
72
72
  "prettier": "^3.3.3",
@@ -75,12 +75,14 @@
75
75
  "rollup": "^4.34.6",
76
76
  "rollup-plugin-dts": "^6.1.1",
77
77
  "rollup-plugin-postcss": "^4.0.2",
78
+ "rollup-plugin-svg": "^2.0.0",
78
79
  "tailwindcss": "^3.3.1",
79
80
  "typedoc": "^0.27.6",
80
81
  "typedoc-plugin-coverage": "^3.4.1",
81
82
  "typedoc-plugin-missing-exports": "^3.1.0",
82
83
  "typescript": "^5.7.3",
83
84
  "vite": "^6.0.11",
85
+ "vite-plugin-svgr": "^4.3.0",
84
86
  "vitest": "^3.0.5"
85
87
  },
86
88
  "peerDependencies": {
@@ -90,12 +92,10 @@
90
92
  "dependencies": {
91
93
  "@heroicons/react": "^2.0.17",
92
94
  "@tanstack/react-query": "^5.17.8",
93
- "@types/offscreencanvas": "^2019.7.1",
94
95
  "axios": "^1.6.5",
95
96
  "date-fns": "^3.3.1",
96
97
  "leaflet": "^1.9.4",
97
98
  "leaflet.locatecontrol": "^0.79.0",
98
- "prop-types": "^15.8.1",
99
99
  "radash": "^12.1.0",
100
100
  "react-colorful": "^5.6.1",
101
101
  "react-image-crop": "^10.1.8",
@@ -104,13 +104,13 @@
104
104
  "react-markdown": "^9.0.1",
105
105
  "react-photo-album": "^3.0.2",
106
106
  "react-router-dom": "^6.16.0",
107
- "react-string-replace": "^1.1.1",
108
107
  "react-toastify": "^9.1.3",
109
108
  "remark-breaks": "^4.0.0",
110
109
  "tw-elements": "^1.0.0",
111
110
  "yet-another-react-lightbox": "^3.21.7"
112
111
  },
113
112
  "imports": {
113
+ "#assets/*": "./src/assets/*",
114
114
  "#components/*": "./src/Components/*",
115
115
  "#utils/*": "./src/Utils/*",
116
116
  "#types/*": "./src/types/*",