utopia-ui 3.0.0-alpha.9 → 3.0.0-alpha.91

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.
Files changed (189) hide show
  1. package/README.md +19 -5
  2. package/dist/Components/AppShell/AppShell.d.ts +8 -6
  3. package/dist/Components/AppShell/Content.d.ts +1 -1
  4. package/dist/Components/AppShell/NavBar.d.ts +3 -4
  5. package/dist/Components/AppShell/SetAssetsApi.d.ts +4 -0
  6. package/dist/Components/AppShell/SideBar.d.ts +4 -2
  7. package/dist/Components/AppShell/SidebarSubmenu.d.ts +1 -1
  8. package/dist/Components/AppShell/hooks/useAssets.d.ts +13 -0
  9. package/dist/Components/Auth/LoginPage copy.d.ts +2 -0
  10. package/dist/Components/Auth/LoginPage.d.ts +1 -2
  11. package/dist/Components/Auth/RequestPasswordPage.d.ts +3 -0
  12. package/dist/Components/Auth/ResetPasswordPage.d.ts +2 -0
  13. package/dist/Components/Auth/SetNewPasswordPage.d.ts +1 -0
  14. package/dist/Components/Auth/SignupPage.d.ts +1 -2
  15. package/dist/Components/Auth/Signuppage.d.ts +2 -0
  16. package/dist/Components/Auth/index.d.ts +3 -1
  17. package/dist/Components/Auth/useAuth.d.ts +5 -3
  18. package/dist/Components/Gaming/Modal.d.ts +5 -9
  19. package/dist/Components/Gaming/Quests.d.ts +1 -2
  20. package/dist/Components/Gaming/hooks/useQuests.d.ts +13 -0
  21. package/dist/Components/Input/Autocomplete.d.ts +7 -0
  22. package/dist/Components/Input/SelectBox.d.ts +16 -0
  23. package/dist/Components/Input/TextAreaInput.d.ts +1 -2
  24. package/dist/Components/Input/TextInput.d.ts +2 -2
  25. package/dist/Components/Input/index.d.ts +1 -0
  26. package/dist/Components/Map/ItemForm.d.ts +4 -2
  27. package/dist/Components/Map/ItemView.d.ts +1 -1
  28. package/dist/Components/Map/Layer.d.ts +1 -2
  29. package/dist/Components/Map/Permissions.d.ts +6 -0
  30. package/dist/Components/Map/Subcomponents/AddButton.d.ts +3 -3
  31. package/dist/Components/Map/Subcomponents/Control.d.ts +5 -0
  32. package/dist/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
  33. package/dist/Components/Map/Subcomponents/Controls/FilterControl.d.ts +2 -0
  34. package/dist/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
  35. package/dist/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
  36. package/dist/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
  37. package/dist/Components/Map/Subcomponents/Controls/SearchControl.d.ts +3 -0
  38. package/dist/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
  39. package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +2 -2
  40. package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +1 -1
  41. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
  42. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +1 -2
  43. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +1 -2
  44. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -2
  45. package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +1 -2
  46. package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +4 -3
  47. package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +1 -1
  48. package/dist/Components/Map/Subcomponents/LayerControl.d.ts +2 -0
  49. package/dist/Components/Map/Subcomponents/QuestControl.d.ts +2 -0
  50. package/dist/Components/Map/Tags.d.ts +1 -2
  51. package/dist/Components/Map/UtopiaMap.d.ts +3 -3
  52. package/dist/Components/Map/hooks/useDebounce.d.ts +1 -0
  53. package/dist/Components/Map/hooks/useFilter.d.ts +12 -2
  54. package/dist/Components/Map/hooks/useItems.d.ts +2 -0
  55. package/dist/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
  56. package/dist/Components/Map/hooks/usePermissions.d.ts +20 -0
  57. package/dist/Components/Map/hooks/useTags.d.ts +5 -3
  58. package/dist/Components/Map/hooks/useTimeout.d.ts +4 -0
  59. package/dist/Components/Map/index.d.ts +3 -0
  60. package/dist/Components/Profile/ColorPicker.d.ts +6 -0
  61. package/dist/Components/Profile/Editor.d.ts +4 -0
  62. package/dist/Components/Profile/OverlayProfile.d.ts +1 -0
  63. package/dist/Components/Profile/OverlayProfileSettings.d.ts +1 -0
  64. package/dist/Components/Profile/OverlayUserSettings.d.ts +1 -0
  65. package/dist/Components/Profile/ProfileSettings.d.ts +3 -0
  66. package/dist/Components/Profile/Settings.d.ts +2 -3
  67. package/dist/Components/Profile/Tags.d.ts +2 -0
  68. package/dist/Components/Profile/TagsWidget.d.ts +6 -0
  69. package/dist/Components/Profile/UserSettings.d.ts +3 -0
  70. package/dist/Components/Profile/index.d.ts +5 -1
  71. package/dist/Components/Profile/useClickOutside.d.ts +2 -0
  72. package/dist/Components/Templates/CardPage.d.ts +7 -2
  73. package/dist/Components/Templates/CircleLayout.d.ts +5 -0
  74. package/dist/Components/Templates/DialogModal.d.ts +10 -0
  75. package/dist/Components/Templates/ItemViewPage.d.ts +14 -0
  76. package/dist/Components/Templates/ItemsIndexPage.d.ts +16 -0
  77. package/dist/Components/Templates/MapOverlayPage.d.ts +7 -0
  78. package/dist/Components/Templates/MapOverlayScreen.d.ts +4 -0
  79. package/dist/Components/Templates/MoonCalendar.d.ts +1 -0
  80. package/dist/Components/Templates/TagView.d.ts +6 -0
  81. package/dist/Components/Templates/TitleCard.d.ts +6 -4
  82. package/dist/Components/Templates/index.d.ts +5 -0
  83. package/dist/Components/Typography/ErrorText.d.ts +1 -2
  84. package/dist/Components/Typography/Subtitle.d.ts +1 -1
  85. package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
  86. package/dist/Utils/FormatTags.d.ts +2 -0
  87. package/dist/Utils/GetValue.d.ts +1 -0
  88. package/dist/Utils/Moon.d.ts +7 -0
  89. package/dist/Utils/TimeAgo.d.ts +1 -0
  90. package/dist/index.d.ts +5 -5
  91. package/dist/index.js +3388 -1077
  92. package/dist/index.js.map +1 -1
  93. package/dist/types.d.ts +48 -9
  94. package/dist/workspace/utopia-ui/src/Components/AppShell/AppShell.d.ts +8 -0
  95. package/dist/workspace/utopia-ui/src/Components/AppShell/Content.d.ts +6 -0
  96. package/dist/workspace/utopia-ui/src/Components/AppShell/NavBar.d.ts +4 -0
  97. package/dist/workspace/utopia-ui/src/Components/AppShell/SetAssetsApi.d.ts +4 -0
  98. package/dist/workspace/utopia-ui/src/Components/AppShell/SideBar.d.ts +12 -0
  99. package/dist/workspace/utopia-ui/src/Components/AppShell/SidebarSubmenu.d.ts +7 -0
  100. package/dist/workspace/utopia-ui/src/Components/AppShell/hooks/useAssets.d.ts +13 -0
  101. package/dist/workspace/utopia-ui/src/Components/AppShell/index.d.ts +3 -0
  102. package/dist/workspace/utopia-ui/src/Components/Auth/LoginPage.d.ts +1 -0
  103. package/dist/workspace/utopia-ui/src/Components/Auth/RequestPasswordPage.d.ts +3 -0
  104. package/dist/workspace/utopia-ui/src/Components/Auth/SetNewPasswordPage.d.ts +1 -0
  105. package/dist/workspace/utopia-ui/src/Components/Auth/SignupPage.d.ts +1 -0
  106. package/dist/workspace/utopia-ui/src/Components/Auth/index.d.ts +5 -0
  107. package/dist/{Components/Auth/authDirectus.d.ts → workspace/utopia-ui/src/Components/Auth/useAuth.d.ts} +6 -4
  108. package/dist/workspace/utopia-ui/src/Components/Gaming/Modal.d.ts +5 -0
  109. package/dist/workspace/utopia-ui/src/Components/Gaming/Quests.d.ts +1 -0
  110. package/dist/workspace/utopia-ui/src/Components/Gaming/hooks/useQuests.d.ts +13 -0
  111. package/dist/workspace/utopia-ui/src/Components/Gaming/index.d.ts +2 -0
  112. package/dist/workspace/utopia-ui/src/Components/Input/Autocomplete.d.ts +7 -0
  113. package/dist/workspace/utopia-ui/src/Components/Input/SelectBox.d.ts +16 -0
  114. package/dist/{Components/Input/TributeTextAreaInput copy.d.ts → workspace/utopia-ui/src/Components/Input/TextAreaInput.d.ts} +0 -1
  115. package/dist/workspace/utopia-ui/src/Components/Input/TextInput.d.ts +14 -0
  116. package/dist/workspace/utopia-ui/src/Components/Input/index.d.ts +3 -0
  117. package/dist/workspace/utopia-ui/src/Components/Map/ItemForm.d.ts +18 -0
  118. package/dist/workspace/utopia-ui/src/Components/Map/ItemView.d.ts +16 -0
  119. package/dist/workspace/utopia-ui/src/Components/Map/Layer.d.ts +2 -0
  120. package/dist/workspace/utopia-ui/src/Components/Map/Permissions.d.ts +6 -0
  121. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/AddButton.d.ts +4 -0
  122. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
  123. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
  124. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
  125. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
  126. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/SearchControl.d.ts +3 -0
  127. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
  128. package/dist/{Components/Map → workspace/utopia-ui/src/Components/Map/Subcomponents}/ItemFormPopup.d.ts +2 -3
  129. package/dist/{Components/Map/Subcomponents → workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents}/HeaderView.d.ts +2 -2
  130. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
  131. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +4 -0
  132. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +7 -0
  133. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -0
  134. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +4 -0
  135. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +6 -0
  136. package/dist/{Components/Map → workspace/utopia-ui/src/Components/Map/Subcomponents}/ItemViewPopup.d.ts +3 -2
  137. package/dist/workspace/utopia-ui/src/Components/Map/Tags.d.ts +5 -0
  138. package/dist/workspace/utopia-ui/src/Components/Map/UtopiaMap.d.ts +11 -0
  139. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useDebounce.d.ts +1 -0
  140. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useFilter.d.ts +32 -0
  141. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useItems.d.ts +26 -0
  142. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLayers.d.ts +14 -0
  143. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
  144. package/dist/workspace/utopia-ui/src/Components/Map/hooks/usePermissions.d.ts +20 -0
  145. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTags.d.ts +22 -0
  146. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTimeout.d.ts +4 -0
  147. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useWindowDimension.d.ts +4 -0
  148. package/dist/workspace/utopia-ui/src/Components/Map/index.d.ts +12 -0
  149. package/dist/workspace/utopia-ui/src/Components/Profile/ColorPicker.d.ts +6 -0
  150. package/dist/workspace/utopia-ui/src/Components/Profile/Editor.d.ts +4 -0
  151. package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfile.d.ts +1 -0
  152. package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfileSettings.d.ts +1 -0
  153. package/dist/workspace/utopia-ui/src/Components/Profile/OverlayUserSettings.d.ts +1 -0
  154. package/dist/workspace/utopia-ui/src/Components/Profile/ProfileSettings.d.ts +3 -0
  155. package/dist/workspace/utopia-ui/src/Components/Profile/TagsWidget.d.ts +6 -0
  156. package/dist/workspace/utopia-ui/src/Components/Profile/UserSettings.d.ts +3 -0
  157. package/dist/workspace/utopia-ui/src/Components/Profile/index.d.ts +5 -0
  158. package/dist/workspace/utopia-ui/src/Components/Profile/useClickOutside.d.ts +2 -0
  159. package/dist/workspace/utopia-ui/src/Components/Templates/CardPage.d.ts +10 -0
  160. package/dist/workspace/utopia-ui/src/Components/Templates/CircleLayout.d.ts +5 -0
  161. package/dist/{Components/AppShell → workspace/utopia-ui/src/Components/Templates}/DialogModal.d.ts +2 -1
  162. package/dist/workspace/utopia-ui/src/Components/Templates/ItemsIndexPage.d.ts +15 -0
  163. package/dist/workspace/utopia-ui/src/Components/Templates/MapOverlayPage.d.ts +7 -0
  164. package/dist/workspace/utopia-ui/src/Components/Templates/MoonCalendar.d.ts +1 -0
  165. package/dist/workspace/utopia-ui/src/Components/Templates/TagView.d.ts +6 -0
  166. package/dist/workspace/utopia-ui/src/Components/Templates/TitleCard.d.ts +11 -0
  167. package/dist/workspace/utopia-ui/src/Components/Templates/index.d.ts +6 -0
  168. package/dist/workspace/utopia-ui/src/Components/Typography/ErrorText.d.ts +5 -0
  169. package/dist/workspace/utopia-ui/src/Components/Typography/Subtitle.d.ts +6 -0
  170. package/dist/workspace/utopia-ui/src/Utils/FormatTags.d.ts +2 -0
  171. package/dist/workspace/utopia-ui/src/Utils/GetValue.d.ts +1 -0
  172. package/dist/workspace/utopia-ui/src/Utils/MarkerIconFactory.d.ts +3 -0
  173. package/dist/workspace/utopia-ui/src/Utils/Moon.d.ts +7 -0
  174. package/dist/workspace/utopia-ui/src/Utils/RandomColor.d.ts +1 -0
  175. package/dist/workspace/utopia-ui/src/Utils/ReplaceURLs.d.ts +3 -0
  176. package/dist/workspace/utopia-ui/src/Utils/TimeAgo.d.ts +1 -0
  177. package/dist/workspace/utopia-ui/src/index.d.ts +13 -0
  178. package/dist/workspace/utopia-ui/src/types.d.ts +108 -0
  179. package/package.json +13 -4
  180. package/dist/Components/Input/FancyTextAreaInput.d.ts +0 -13
  181. package/dist/Components/Input/InputText.d.ts +0 -13
  182. package/dist/Components/Input/TributeTextAreaInput.d.ts +0 -13
  183. package/dist/Components/Map/Subcomponents/SearchBar.d.ts +0 -2
  184. package/dist/Components/Map/Subcomponents/StartEndView.d.ts +0 -6
  185. package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +0 -2
  186. package/dist/Components/Map/Subcomponents/TextView.d.ts +0 -5
  187. package/dist/Components/TitleCard.d.ts +0 -9
  188. package/dist/Utils/TaggedText.d.ts +0 -3
  189. /package/dist/{Utils/HeighlightTags.d.ts → workspace/utopia-ui/src/Utils/HashTagRegex.d.ts} +0 -0
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { Item, ItemsApi, Tag } from "../../../types";
3
+ declare type UseTagManagerResult = ReturnType<typeof useTagsManager>;
4
+ declare function useTagsManager(initialTags: Tag[]): {
5
+ tags: Tag[];
6
+ addTag: (tag: Tag) => void;
7
+ setTagApi: (api: ItemsApi<Tag>) => void;
8
+ setTagData: (data: Tag[]) => void;
9
+ getItemTags: (item: Item) => Tag[];
10
+ allTagsLoaded: boolean;
11
+ };
12
+ export declare const TagsProvider: React.FunctionComponent<{
13
+ initialTags: Tag[];
14
+ children?: React.ReactNode;
15
+ }>;
16
+ export declare const useTags: () => Tag[];
17
+ export declare const useAddTag: () => UseTagManagerResult["addTag"];
18
+ export declare const useSetTagApi: () => UseTagManagerResult["setTagApi"];
19
+ export declare const useSetTagData: () => UseTagManagerResult["setTagData"];
20
+ export declare const useGetItemTags: () => UseTagManagerResult["getItemTags"];
21
+ export declare const useAllTagsLoaded: () => UseTagManagerResult["allTagsLoaded"];
22
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const useTimeout: (callback: any, delay: any) => {
2
+ reset: () => void;
3
+ clear: () => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ export default function useWindowDimensions(): {
2
+ width: number;
3
+ height: number;
4
+ };
@@ -0,0 +1,12 @@
1
+ export { UtopiaMap } from './UtopiaMap';
2
+ export { Layer } from './Layer';
3
+ export { Tags } from "./Tags";
4
+ export { Permissions } from "./Permissions";
5
+ export { ItemForm } from './ItemForm';
6
+ export { ItemView } from './ItemView';
7
+ export { PopupTextAreaInput } from './Subcomponents/ItemPopupComponents/PopupTextAreaInput';
8
+ export { PopupStartEndInput } from './Subcomponents/ItemPopupComponents/PopupStartEndInput';
9
+ export { PopupTextInput } from './Subcomponents/ItemPopupComponents/PopupTextInput';
10
+ export { TextView } from './Subcomponents/ItemPopupComponents/TextView';
11
+ export { StartEndView } from './Subcomponents/ItemPopupComponents/StartEndView';
12
+ export { PopupButton } from './Subcomponents/ItemPopupComponents/PopupButton';
@@ -0,0 +1,6 @@
1
+ import "./ColorPicker.css";
2
+ export declare const ColorPicker: ({ color, onChange, className }: {
3
+ color: any;
4
+ onChange: any;
5
+ className: any;
6
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function TextEditor({ value, updateFormValue }: {
2
+ value: string;
3
+ updateFormValue: (string: any) => void;
4
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function OverlayProfile(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function OverlayProfileSettings(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function OverlayUserSettings(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import 'react-image-crop/dist/ReactCrop.css';
2
+ import 'react-toastify/dist/ReactToastify.css';
3
+ export declare function ProfileSettings(): JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const TagsWidget: ({ placeholder, containerStyle, defaultTags, onUpdate }: {
2
+ placeholder: any;
3
+ containerStyle: any;
4
+ defaultTags: any;
5
+ onUpdate: any;
6
+ }) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import 'react-image-crop/dist/ReactCrop.css';
2
+ import 'react-toastify/dist/ReactToastify.css';
3
+ export declare function UserSettings(): JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { UserSettings } from './UserSettings';
2
+ export { ProfileSettings } from './ProfileSettings';
3
+ export { OverlayProfile } from './OverlayProfile';
4
+ export { OverlayProfileSettings } from './OverlayProfileSettings';
5
+ export { OverlayUserSettings } from './OverlayUserSettings';
@@ -0,0 +1,2 @@
1
+ declare const useClickOutside: (ref: any, handler: any) => void;
2
+ export default useClickOutside;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ export declare function CardPage({ title, hideTitle, children, parent }: {
3
+ title: string;
4
+ hideTitle?: boolean;
5
+ children?: React.ReactNode;
6
+ parent?: {
7
+ name: string;
8
+ url: string;
9
+ };
10
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const CircleLayout: ({ items, radius, fontSize }: {
2
+ items: any;
3
+ radius: number;
4
+ fontSize: any;
5
+ }) => JSX.Element;
@@ -4,6 +4,7 @@ declare type Props = {
4
4
  isOpened: boolean;
5
5
  onClose: () => void;
6
6
  children: React.ReactNode;
7
+ showCloseButton?: boolean;
7
8
  };
8
- declare const DialogModal: ({ title, isOpened, onClose, children, }: Props) => JSX.Element;
9
+ declare const DialogModal: ({ title, isOpened, onClose, children, showCloseButton }: Props) => JSX.Element;
9
10
  export default DialogModal;
@@ -0,0 +1,15 @@
1
+ import { itemsApi } from '../../../../../utopia-maps/utopia-development/src/api/itemsApi';
2
+ declare type breadcrumb = {
3
+ name: string;
4
+ path: string;
5
+ };
6
+ export declare function ItemsIndexPage({ api, url, parameterField, breadcrumbs, itemNameField, itemTextField, itemImageField }: {
7
+ api: itemsApi<any>;
8
+ url: string;
9
+ parameterField: string;
10
+ breadcrumbs: Array<breadcrumb>;
11
+ itemNameField: string;
12
+ itemTextField: string;
13
+ itemImageField: string;
14
+ }): JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export declare function MapOverlayPage({ children, className, backdrop, card }: {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ backdrop?: boolean;
6
+ card?: boolean;
7
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const MoonCalendar: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Tag } from '../../types';
2
+ export declare const TagView: ({ tag, heighlight, onClick }: {
3
+ tag: Tag;
4
+ heighlight?: boolean | undefined;
5
+ onClick?: ((e: any) => void) | undefined;
6
+ }) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ interface TitleCardProps {
3
+ title?: string;
4
+ hideTitle?: boolean;
5
+ children?: React.ReactNode;
6
+ topMargin?: string;
7
+ className?: string;
8
+ TopSideButtons?: any;
9
+ }
10
+ export declare function TitleCard({ title, hideTitle, children, topMargin, TopSideButtons, className }: TitleCardProps): JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ export { CardPage } from './CardPage';
2
+ export { TitleCard } from './TitleCard';
3
+ export { MapOverlayPage } from './MapOverlayPage';
4
+ export { CircleLayout } from './CircleLayout';
5
+ export { MoonCalendar } from './MoonCalendar';
6
+ export { ItemsIndexPage } from './ItemsIndexPage';
@@ -0,0 +1,5 @@
1
+ declare function ErrorText({ styleClass, children }: {
2
+ styleClass: any;
3
+ children: any;
4
+ }): JSX.Element;
5
+ export default ErrorText;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ declare function Subtitle({ styleClass, children }: {
3
+ styleClass: string;
4
+ children: React.ReactNode;
5
+ }): JSX.Element;
6
+ export default Subtitle;
@@ -0,0 +1,2 @@
1
+ export declare function decodeTag(string: string): string;
2
+ export declare function encodeTag(string: string): string;
@@ -0,0 +1 @@
1
+ export declare function getValue(obj: any, path: any): any;
@@ -0,0 +1,3 @@
1
+ import * as L from 'leaflet';
2
+ declare const MarkerIconFactory: (shape: string, color1: string, color2: string, icon: string) => L.DivIcon;
3
+ export default MarkerIconFactory;
@@ -0,0 +1,7 @@
1
+ export declare const LUNAR_MONTH: number;
2
+ export declare const getJulianDate: (date?: Date) => number;
3
+ export declare const normalize: (value: number) => number;
4
+ export declare const getLunarAgePercent: (date?: Date) => number;
5
+ export declare const getLunarAge: (date?: Date) => number;
6
+ export declare const getNextNewMoon: () => Date;
7
+ export declare const getLastNewMoon: (date?: Date) => Date;
@@ -0,0 +1 @@
1
+ export declare const randomColor: () => string;
@@ -0,0 +1,3 @@
1
+ export declare const urlRegex: RegExp;
2
+ export declare const mailRegex: RegExp;
3
+ export declare function fixUrls(message: string): string;
@@ -0,0 +1 @@
1
+ export declare const timeAgo: (date: string | number | Date) => string;
@@ -0,0 +1,13 @@
1
+ export { UtopiaMap, Layer, Tags, Permissions, ItemForm, ItemView, PopupTextAreaInput, PopupStartEndInput, PopupTextInput, PopupButton, TextView, StartEndView } from './Components/Map';
2
+ export { AppShell, Content, SideBar } from "./Components/AppShell";
3
+ export { AuthProvider, useAuth, LoginPage, SignupPage, RequestPasswordPage, SetNewPasswordPage } from "./Components/Auth";
4
+ export { UserSettings, ProfileSettings, OverlayProfile, OverlayProfileSettings, OverlayUserSettings } from './Components/Profile';
5
+ export { Quests, Modal } from './Components/Gaming';
6
+ export { TitleCard, CardPage, MapOverlayPage, CircleLayout, MoonCalendar, ItemsIndexPage } from './Components/Templates';
7
+ export { TextInput, TextAreaInput, SelectBox } from './Components/Input';
8
+ import "./index.css";
9
+ declare global {
10
+ interface Window {
11
+ my_modal_3: any;
12
+ }
13
+ }
@@ -0,0 +1,108 @@
1
+ /// <reference types="react" />
2
+ import { ItemFormPopupProps } from "./Components/Map/Subcomponents/ItemFormPopup";
3
+ export interface UtopiaMapProps {
4
+ height?: string;
5
+ width?: string;
6
+ center?: [number, number];
7
+ zoom?: number;
8
+ tags?: Tag[];
9
+ children?: React.ReactNode;
10
+ }
11
+ export interface LayerProps {
12
+ data?: Item[];
13
+ children?: React.ReactNode;
14
+ name: string;
15
+ menuIcon: any;
16
+ menuColor: string;
17
+ menuText: string;
18
+ markerIcon: string;
19
+ markerShape: string;
20
+ markerDefaultColor: string;
21
+ api?: ItemsApi<any>;
22
+ itemNameField?: string;
23
+ itemTextField?: string;
24
+ itemAvatarField?: string;
25
+ itemColorField?: string;
26
+ itemOwnerField?: string;
27
+ itemTagsField?: string;
28
+ itemLatitudeField?: any;
29
+ itemLongitudeField?: any;
30
+ itemOffersField?: string;
31
+ itemNeedsField?: string;
32
+ onlyOnePerOwner?: boolean;
33
+ customEditLink?: string;
34
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
35
+ itemFormPopup?: ItemFormPopupProps | null;
36
+ clusterRef?: React.MutableRefObject<any>;
37
+ }
38
+ export declare class Item {
39
+ id: string;
40
+ name: string;
41
+ text: string;
42
+ position: Geometry;
43
+ date_created?: string;
44
+ date_updated?: string | null;
45
+ start?: string;
46
+ end?: string;
47
+ api?: ItemsApi<any>;
48
+ tags?: string[];
49
+ layer?: LayerProps;
50
+ [key: string]: any;
51
+ constructor(id: string, name: string, text: string, position: Geometry, layer?: LayerProps, api?: ItemsApi<any>);
52
+ }
53
+ export declare class Geometry {
54
+ type: string;
55
+ coordinates: number[];
56
+ constructor(lng: number, lat: number);
57
+ }
58
+ export interface Tag {
59
+ color: string;
60
+ id: string;
61
+ name: string;
62
+ offer_or_need?: boolean;
63
+ }
64
+ export interface ItemsApi<T> {
65
+ getItems(): Promise<any>;
66
+ createItem?(item: T): Promise<any>;
67
+ updateItem?(item: T): Promise<any>;
68
+ deleteItem?(id: string): Promise<any>;
69
+ collectionName?: string;
70
+ }
71
+ export interface AssetsApi {
72
+ upload(file: Blob, title: string): any;
73
+ url: string;
74
+ }
75
+ export interface UserApi {
76
+ register(email: string, password: string, userName: string): Promise<void>;
77
+ login(email: string, password: string): Promise<any>;
78
+ logout(): Promise<void>;
79
+ getUser(): Promise<UserItem>;
80
+ getToken(): Promise<any>;
81
+ updateUser(user: UserItem): Promise<void>;
82
+ requestPasswordReset(email: string, reset_url?: string): any;
83
+ passwordReset(token: string, new_password: string): any;
84
+ }
85
+ export declare type UserItem = {
86
+ id?: string;
87
+ role?: string;
88
+ email?: string;
89
+ password?: string;
90
+ profile?: Profile;
91
+ [key: string]: any;
92
+ };
93
+ export declare type Profile = {
94
+ id?: string;
95
+ avatar?: string;
96
+ color?: string;
97
+ name: string;
98
+ text: string;
99
+ geoposition?: Geometry;
100
+ };
101
+ export declare type Permission = {
102
+ id?: string;
103
+ role: string;
104
+ S: any;
105
+ collection: string;
106
+ action: PermissionAction;
107
+ };
108
+ export declare type PermissionAction = "create" | "read" | "update" | "delete";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utopia-ui",
3
- "version": "3.0.0-alpha.9",
3
+ "version": "3.0.0-alpha.91",
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/",
@@ -24,7 +24,7 @@
24
24
  "@typescript-eslint/eslint-plugin": "^5.38.1",
25
25
  "@typescript-eslint/parser": "^5.38.1",
26
26
  "autoprefixer": "^10.4.14",
27
- "daisyui": "^3.3.1",
27
+ "daisyui": "^4.6.1",
28
28
  "eslint": "^8.24.0",
29
29
  "eslint-plugin-react": "^7.31.8",
30
30
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -43,14 +43,23 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@heroicons/react": "^2.0.17",
46
+ "@tanstack/react-query": "^5.17.8",
47
+ "@types/offscreencanvas": "^2019.7.1",
48
+ "axios": "^1.6.5",
49
+ "date-fns": "^3.3.1",
46
50
  "leaflet": "^1.9.4",
51
+ "leaflet.locatecontrol": "^0.79.0",
47
52
  "prop-types": "^15.8.1",
53
+ "react-colorful": "^5.6.1",
54
+ "react-image-crop": "^10.1.8",
48
55
  "react-leaflet": "^4.2.1",
49
56
  "react-leaflet-cluster": "^2.1.0",
50
- "react-router-dom": "^6.11.2",
57
+ "react-markdown": "^9.0.1",
58
+ "react-router-dom": "^6.16.0",
51
59
  "react-string-replace": "^1.1.1",
52
60
  "react-toastify": "^9.1.3",
61
+ "remark-breaks": "^4.0.0",
53
62
  "tributejs": "^5.1.3",
54
- "tw-elements": "^1.0.0-beta2"
63
+ "tw-elements": "^1.0.0"
55
64
  }
56
65
  }
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- declare type TextAreaProps = {
3
- labelTitle?: string;
4
- labelStyle?: string;
5
- containerStyle?: string;
6
- dataField?: string;
7
- inputStyle?: string;
8
- defaultValue: string;
9
- placeholder?: string;
10
- updateFormValue?: (value: string) => void;
11
- };
12
- export declare function FancyTextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
13
- export {};
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- declare type InputTextProps = {
3
- labelTitle?: string;
4
- labelStyle?: string;
5
- type?: string;
6
- dataField?: string;
7
- containerStyle?: string;
8
- defaultValue: string;
9
- placeholder?: string;
10
- updateFormValue?: (value: string) => void;
11
- };
12
- declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
13
- export default TextInput;
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- declare type TextAreaProps = {
3
- labelTitle?: string;
4
- labelStyle?: string;
5
- containerStyle?: string;
6
- dataField?: string;
7
- inputStyle?: string;
8
- defaultValue: string;
9
- placeholder?: string;
10
- updateFormValue?: (value: string) => void;
11
- };
12
- export declare function TributeTextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
13
- export {};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const SearchBar: () => JSX.Element;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { Item } from '../../../types';
3
- declare const StartEndView: ({ item }: {
4
- item: Item;
5
- }) => JSX.Element;
6
- export default StartEndView;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const TagFilterControl: () => JSX.Element;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { Item } from '../../../types';
3
- export declare const TextView: ({ item }: {
4
- item: Item;
5
- }) => JSX.Element;
@@ -1,9 +0,0 @@
1
- import * as React from "react";
2
- interface TitleCardProps {
3
- title: string;
4
- children: React.ReactNode;
5
- topMargin: string;
6
- TopSideButtons?: any;
7
- }
8
- export declare function TitleCard({ title, children, topMargin, TopSideButtons }: TitleCardProps): JSX.Element;
9
- export {};
@@ -1,3 +0,0 @@
1
- import { Tag } from "../types";
2
- export declare const hashTagRegex: RegExp;
3
- export declare function heighlightTags(message: string, tags: Tag[]): string;