utopia-ui 3.0.96 → 3.0.99

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 (79) hide show
  1. package/dist/Profile.cjs.js +37647 -19336
  2. package/dist/Profile.cjs.js.map +1 -1
  3. package/dist/Profile.esm.js +37655 -19344
  4. package/dist/Profile.esm.js.map +1 -1
  5. package/dist/TagView-02RrHax_.js +2533 -0
  6. package/dist/TagView-02RrHax_.js.map +1 -0
  7. package/dist/TagView-5-8h53BG.js +2449 -0
  8. package/dist/TagView-5-8h53BG.js.map +1 -0
  9. package/dist/TagView-B1-sgc78.js +2446 -0
  10. package/dist/TagView-B1-sgc78.js.map +1 -0
  11. package/dist/TagView-B8qr_QIZ.js +2446 -0
  12. package/dist/TagView-B8qr_QIZ.js.map +1 -0
  13. package/dist/TagView-BDwwz9Sx.js +2458 -0
  14. package/dist/TagView-BDwwz9Sx.js.map +1 -0
  15. package/dist/TagView-BI5IFu_z.js +2458 -0
  16. package/dist/TagView-BI5IFu_z.js.map +1 -0
  17. package/dist/{TagView-D8MzLpNR.js → TagView-BZ0nyWer.js} +34 -57
  18. package/dist/{TagView-D8MzLpNR.js.map → TagView-BZ0nyWer.js.map} +1 -1
  19. package/dist/TagView-B_dT_RCj.js +2448 -0
  20. package/dist/TagView-B_dT_RCj.js.map +1 -0
  21. package/dist/TagView-Bu26dg0K.js +2533 -0
  22. package/dist/TagView-Bu26dg0K.js.map +1 -0
  23. package/dist/TagView-C5MuBwmM.js +2534 -0
  24. package/dist/TagView-C5MuBwmM.js.map +1 -0
  25. package/dist/TagView-CATICiCq.js +2546 -0
  26. package/dist/TagView-CATICiCq.js.map +1 -0
  27. package/dist/TagView-CHM82D2_.js +2517 -0
  28. package/dist/TagView-CHM82D2_.js.map +1 -0
  29. package/dist/TagView-CMYOIMkk.js +2600 -0
  30. package/dist/TagView-CMYOIMkk.js.map +1 -0
  31. package/dist/TagView-CUW_Zki1.js +2536 -0
  32. package/dist/{TagView-nJhkFKCX.js.map → TagView-CUW_Zki1.js.map} +1 -1
  33. package/dist/TagView-D0odtmgU.js +2513 -0
  34. package/dist/TagView-D0odtmgU.js.map +1 -0
  35. package/dist/{TagView-nJhkFKCX.js → TagView-DDw2Kpaa.js} +32 -54
  36. package/dist/TagView-DDw2Kpaa.js.map +1 -0
  37. package/dist/TagView-DUuOpehP.js +2426 -0
  38. package/dist/TagView-DUuOpehP.js.map +1 -0
  39. package/dist/TagView-DeViY4Pt.js +2535 -0
  40. package/dist/TagView-DeViY4Pt.js.map +1 -0
  41. package/dist/TagView-DjmAw9pZ.js +2545 -0
  42. package/dist/TagView-DjmAw9pZ.js.map +1 -0
  43. package/dist/TagView-DrgapD3I.js +2446 -0
  44. package/dist/TagView-DrgapD3I.js.map +1 -0
  45. package/dist/TagView-nv4_drB5.js +2533 -0
  46. package/dist/TagView-nv4_drB5.js.map +1 -0
  47. package/dist/TagView-oMANewyq.js +2446 -0
  48. package/dist/TagView-oMANewyq.js.map +1 -0
  49. package/dist/index.cjs.js +19 -3024
  50. package/dist/index.cjs.js.map +1 -1
  51. package/dist/index.d.ts +3 -10
  52. package/dist/index.esm.js +21 -3025
  53. package/dist/index.esm.js.map +1 -1
  54. package/dist/types/src/Components/Input/RichTextEditor.d.ts +3 -6
  55. package/dist/types/src/Components/Input/RichTextEditor.spec.d.ts +1 -0
  56. package/dist/types/src/Components/Input/TextEditorMenu.d.ts +4 -0
  57. package/dist/types/src/Components/Input/TextInput.cy.d.ts +1 -0
  58. package/dist/types/src/Components/Item/index.d.ts +0 -1
  59. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +2 -1
  60. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +1 -2
  61. package/dist/types/src/Components/Profile/Subcomponents/AvatarWidget.d.ts +1 -1
  62. package/dist/types/src/Components/Profile/Subcomponents/ContactInfoForm.d.ts +1 -1
  63. package/dist/types/src/Components/Profile/Subcomponents/CrowdfundingForm.d.ts +1 -1
  64. package/dist/types/src/Components/Profile/Subcomponents/FormHeader.d.ts +9 -5
  65. package/dist/types/src/Components/Profile/Subcomponents/GalleryForm.d.ts +7 -0
  66. package/dist/types/src/Components/Profile/Subcomponents/GalleryForm.spec.d.ts +1 -0
  67. package/dist/types/src/Components/Profile/Subcomponents/GroupSubheaderForm.d.ts +1 -1
  68. package/dist/types/src/Components/Profile/Subcomponents/ProfileStartEndForm.d.ts +2 -1
  69. package/dist/types/src/Components/Profile/Subcomponents/ProfileTextForm.d.ts +2 -3
  70. package/dist/types/src/Components/Profile/Templates/FlexForm.d.ts +1 -1
  71. package/dist/types/src/Components/Profile/Templates/OnepagerForm.d.ts +1 -1
  72. package/dist/types/src/Components/Profile/itemFunctions.d.ts +6 -4
  73. package/dist/types/src/Components/Templates/Tabs.d.ts +10 -0
  74. package/dist/types/src/Components/Templates/index.d.ts +0 -1
  75. package/dist/types/src/Utils/getImageDimensions.d.ts +4 -0
  76. package/dist/types/src/Utils/getImageDimensions.spec.d.ts +1 -0
  77. package/dist/types/src/css.d.ts +2 -1
  78. package/package.json +17 -7
  79. package/dist/types/src/types/PopupFormState.d.ts +0 -8
@@ -1,17 +1,14 @@
1
- interface TextAreaProps {
1
+ interface RichTextEditorProps {
2
2
  labelTitle?: string;
3
3
  labelStyle?: string;
4
4
  containerStyle?: string;
5
- dataField?: string;
6
- inputStyle?: string;
7
5
  defaultValue: string;
8
6
  placeholder?: string;
9
- required?: boolean;
10
- size?: string;
7
+ showMenu?: boolean;
11
8
  updateFormValue?: (value: string) => void;
12
9
  }
13
10
  /**
14
11
  * @category Input
15
12
  */
16
- export declare function RichTextEditor({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, required, size, updateFormValue, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function RichTextEditor({ labelTitle, labelStyle, containerStyle, defaultValue, placeholder, showMenu, updateFormValue, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
17
14
  export {};
@@ -0,0 +1,4 @@
1
+ import type { Editor } from '@tiptap/react';
2
+ export declare const TextEditorMenu: ({ editor }: {
3
+ editor: Editor;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -6,7 +6,6 @@ export declare const TextView: import("react").ComponentType<Omit<{
6
6
  text?: string;
7
7
  truncate?: boolean;
8
8
  rawText?: string;
9
- itemTextField?: string;
10
9
  }, "item">>;
11
10
  export declare const StartEndView: import("react").ComponentType<Omit<{
12
11
  item?: import("../Map").Item;
@@ -2,10 +2,11 @@ import type { Item } from '#types/Item';
2
2
  export interface StartEndInputProps {
3
3
  item?: Item;
4
4
  showLabels?: boolean;
5
+ labelStyle?: string;
5
6
  updateStartValue?: (value: string) => void;
6
7
  updateEndValue?: (value: string) => void;
7
8
  }
8
9
  /**
9
10
  * @category Map
10
11
  */
11
- export declare const PopupStartEndInput: ({ item, showLabels, updateStartValue, updateEndValue, }: StartEndInputProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const PopupStartEndInput: ({ item, showLabels, labelStyle, updateStartValue, updateEndValue, }: StartEndInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,11 +2,10 @@ import type { Item } from '#types/Item';
2
2
  /**
3
3
  * @category Map
4
4
  */
5
- export declare const TextView: ({ item, itemId, text, truncate, rawText, itemTextField, }: {
5
+ export declare const TextView: ({ item, itemId, text, truncate, rawText, }: {
6
6
  item?: Item;
7
7
  itemId?: string;
8
8
  text?: string;
9
9
  truncate?: boolean;
10
10
  rawText?: string;
11
- itemTextField?: string;
12
11
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  interface AvatarWidgetProps {
2
- avatar: string;
2
+ avatar?: string;
3
3
  setAvatar: React.Dispatch<React.SetStateAction<any>>;
4
4
  }
5
5
  export declare const AvatarWidget: React.FC<AvatarWidgetProps>;
@@ -1,5 +1,5 @@
1
1
  import type { FormState } from '#types/FormState';
2
2
  export declare const ContactInfoForm: ({ state, setState, }: {
3
3
  state: FormState;
4
- setState: React.Dispatch<React.SetStateAction<any>>;
4
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { FormState } from '#types/FormState';
2
2
  export declare const CrowdfundingForm: ({ state, setState, }: {
3
3
  state: FormState;
4
- setState: React.Dispatch<React.SetStateAction<any>>;
4
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,9 @@
1
- export declare const FormHeader: ({ item, state, setState }: {
2
- item: any;
3
- state: any;
4
- setState: any;
5
- }) => import("react/jsx-runtime").JSX.Element;
1
+ import type { FormState } from '#types/FormState';
2
+ import type { Item } from '#types/Item';
3
+ interface Props {
4
+ item: Item;
5
+ state: Partial<FormState>;
6
+ setState: React.Dispatch<React.SetStateAction<Partial<FormState>>>;
7
+ }
8
+ export declare const FormHeader: ({ item, state, setState }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { FormState } from '#types/FormState';
2
+ interface Props {
3
+ state: FormState;
4
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
5
+ }
6
+ export declare const GalleryForm: ({ state, setState }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -12,7 +12,7 @@ interface groupType {
12
12
  }
13
13
  export declare const GroupSubheaderForm: ({ state, setState, groupStates, groupTypes, }: {
14
14
  state: FormState;
15
- setState: React.Dispatch<React.SetStateAction<any>>;
15
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
16
16
  item: Item;
17
17
  groupStates?: string[];
18
18
  groupTypes?: groupType[];
@@ -1,5 +1,6 @@
1
+ import type { FormState } from '#types/FormState';
1
2
  import type { Item } from '#types/Item';
2
3
  export declare const ProfileStartEndForm: ({ item, setState, }: {
3
4
  item: Item;
4
- setState: React.Dispatch<React.SetStateAction<any>>;
5
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
5
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import type { FormState } from '#types/FormState';
2
- export declare const ProfileTextForm: ({ state, setState, dataField, heading, size, hideInputLabel, required, }: {
2
+ export declare const ProfileTextForm: ({ state, setState, dataField, heading, size, hideInputLabel, }: {
3
3
  state: FormState;
4
- setState: React.Dispatch<React.SetStateAction<any>>;
4
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
5
5
  dataField?: string;
6
6
  heading: string;
7
7
  size: string;
8
8
  hideInputLabel: boolean;
9
- required?: boolean;
10
9
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,6 @@ import type { FormState } from '#types/FormState';
2
2
  import type { Item } from '#types/Item';
3
3
  export declare const FlexForm: ({ item, state, setState, }: {
4
4
  state: FormState;
5
- setState: React.Dispatch<React.SetStateAction<any>>;
5
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
6
6
  item: Item;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,6 @@ import type { FormState } from '#types/FormState';
2
2
  import type { Item } from '#types/Item';
3
3
  export declare const OnepagerForm: ({ item, state, setState, }: {
4
4
  state: FormState;
5
- setState: React.Dispatch<React.SetStateAction<any>>;
5
+ setState: React.Dispatch<React.SetStateAction<FormState>>;
6
6
  item: Item;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
+ import type { FormState } from '#types/FormState';
2
+ import type { Item } from '#types/Item';
1
3
  export declare const submitNewItem: (evt: any, type: string, item: any, user: any, setLoading: any, tags: any, addTag: any, addItem: any, linkItem: any, resetFilterTags: any, layers: any, addItemPopupType: any, setAddItemPopupType: any) => Promise<void>;
2
- export declare const linkItem: (id: string, item: any, updateItem: any) => Promise<void>;
3
- export declare const unlinkItem: (id: string, item: any, updateItem: any) => Promise<void>;
4
- export declare const handleDelete: (event: React.MouseEvent<HTMLElement>, item: any, setLoading: any, removeItem: any, map: any, navigate: any) => Promise<void>;
5
- export declare const onUpdateItem: (state: any, item: any, tags: any, addTag: any, setLoading: any, navigate: any, updateItem: any, addItem: any, user: any, params: any) => Promise<void>;
4
+ export declare const linkItem: (id: string, item: Item, updateItem: any) => Promise<void>;
5
+ export declare const unlinkItem: (id: string, item: Item, updateItem: any) => Promise<void>;
6
+ export declare const handleDelete: (event: React.MouseEvent<HTMLElement>, item: Item, setLoading: any, removeItem: any, map: any, navigate: any) => Promise<void>;
7
+ export declare const onUpdateItem: (state: FormState, item: Item, tags: any, addTag: any, setLoading: any, navigate: any, updateItem: any, addItem: any, user: any, params: any) => Promise<void>;
@@ -0,0 +1,10 @@
1
+ interface TabItem {
2
+ title: string;
3
+ component: React.ReactNode;
4
+ }
5
+ interface TabsProps {
6
+ items: TabItem[];
7
+ setUrlParams: (params: URLSearchParams) => void;
8
+ }
9
+ export declare const Tabs: React.FC<TabsProps>;
10
+ export {};
@@ -5,5 +5,4 @@ export { SelectUser } from './SelectUser';
5
5
  export { OverlayItemsIndexPage } from './OverlayItemsIndexPage';
6
6
  export { AttestationForm } from './AttestationForm';
7
7
  export { MarketView } from './MarketView';
8
- export { TagView } from './TagView';
9
8
  export { LoadingMapOverlay } from './LoadingMapOverlay';
@@ -0,0 +1,4 @@
1
+ export declare const getImageDimensions: (file: File) => Promise<{
2
+ width: number;
3
+ height: number;
4
+ }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -12,4 +12,5 @@ import '#assets/css/misc.css';
12
12
  import '#assets/css/marker-icons.css';
13
13
  import '#assets/css/leaflet.css';
14
14
  import '#assets/css/color-picker.css';
15
- import '#assets/css/easymde.css';
15
+ import '#assets/css/markdown.css';
16
+ import '#assets/css/tiptap.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utopia-ui",
3
- "version": "3.0.96",
3
+ "version": "3.0.99",
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/",
@@ -42,12 +42,12 @@
42
42
  "devDependencies": {
43
43
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
44
44
  "@rollup/plugin-alias": "^5.1.1",
45
+ "@rollup/plugin-commonjs": "^28.0.3",
45
46
  "@rollup/plugin-node-resolve": "^16.0.0",
46
47
  "@rollup/plugin-typescript": "^12.1.2",
47
48
  "@tailwindcss/postcss": "^4.0.14",
48
49
  "@testing-library/jest-dom": "^6.6.3",
49
50
  "@testing-library/react": "^16.2.0",
50
- "@testing-library/user-event": "^14.6.1",
51
51
  "@types/geojson": "^7946.0.14",
52
52
  "@types/leaflet": "^1.7.11",
53
53
  "@types/leaflet.markercluster": "^1.5.5",
@@ -97,18 +97,28 @@
97
97
  "react-dom": "^18.2.0"
98
98
  },
99
99
  "dependencies": {
100
- "@fortawesome/fontawesome-svg-core": "^6.7.2",
101
- "@fortawesome/free-solid-svg-icons": "^6.7.2",
102
100
  "@heroicons/react": "^2.0.17",
103
- "@rollup/plugin-commonjs": "^28.0.3",
104
101
  "@tanstack/react-query": "^5.17.8",
102
+ "@tiptap/core": "^2.14.0",
103
+ "@tiptap/extension-bubble-menu": "^2.14.0",
104
+ "@tiptap/extension-color": "^2.12.0",
105
+ "@tiptap/extension-image": "^2.14.0",
106
+ "@tiptap/extension-link": "^2.14.0",
107
+ "@tiptap/extension-placeholder": "^2.14.0",
108
+ "@tiptap/extension-youtube": "^2.12.0",
109
+ "@tiptap/pm": "^2.12.0",
110
+ "@tiptap/react": "^2.12.0",
111
+ "@tiptap/starter-kit": "^2.12.0",
105
112
  "axios": "^1.6.5",
113
+ "browser-image-compression": "^2.0.2",
114
+ "classnames": "^2.5.1",
106
115
  "date-fns": "^3.3.1",
107
- "easymde": "^2.20.0",
108
116
  "leaflet": "^1.9.4",
109
117
  "leaflet.locatecontrol": "^0.79.0",
110
118
  "radash": "^12.1.0",
111
119
  "react-colorful": "^5.6.1",
120
+ "react-dropzone": "^14.3.8",
121
+ "react-icons": "^5.5.0",
112
122
  "react-image-crop": "^10.1.8",
113
123
  "react-inlinesvg": "^4.2.0",
114
124
  "react-leaflet": "^4.2.1",
@@ -116,9 +126,9 @@
116
126
  "react-markdown": "^9.0.1",
117
127
  "react-photo-album": "^3.0.2",
118
128
  "react-router-dom": "^6.16.0",
119
- "react-simplemde-editor": "^5.2.0",
120
129
  "react-toastify": "^9.1.3",
121
130
  "remark-breaks": "^4.0.0",
131
+ "tiptap-markdown": "^0.8.10",
122
132
  "yet-another-react-lightbox": "^3.21.7"
123
133
  },
124
134
  "imports": {
@@ -1,8 +0,0 @@
1
- import type { Item } from './Item';
2
- import type { LayerProps } from './LayerProps';
3
- import type { LatLng } from 'leaflet';
4
- export interface PopupFormState {
5
- position: LatLng;
6
- layer: LayerProps;
7
- item?: Item;
8
- }