utopia-ui 3.0.83 → 3.0.85

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.d.ts CHANGED
@@ -7,36 +7,65 @@ import { Key } from 'react';
7
7
  export { default as SVG } from 'react-inlinesvg';
8
8
 
9
9
  /**
10
- * @category Types
11
- */
12
- interface Tag {
13
- color: string
14
- id: string
15
- name: string
16
- offer_or_need?: boolean
17
- }
18
-
19
- interface UtopiaMapProps {
20
- height?: string
21
- width?: string
22
- center?: [number, number]
23
- zoom?: number
24
- tags?: Tag[]
25
- children?: React.ReactNode
26
- geo?: GeoJsonObject
27
- showFilterControl?: boolean
28
- showLayerControl?: boolean
29
- showGratitudeControl?: boolean
30
- showThemeControl?: boolean
31
- infoText?: string
32
- donationWidget?: boolean
33
- defaultTheme?: string
34
- }
35
-
36
- /**
10
+ * This component creates the map.
11
+ * ```tsx
12
+ * <UtopiaMap center={[50.6, 9.5]} zoom={5} height="100dvh" width="100dvw" />
13
+ * ```
14
+ * You can define its {@link Layer | `Layers`} as supcomponents.
15
+ * ```tsx
16
+ * <UtopiaMap center={[50.6, 15.5]} zoom={5} height="100dvh" width="100dvw">
17
+ * <Layer
18
+ * name="events"
19
+ * markerIcon="calendar"
20
+ * markerShape="square"
21
+ * markerDefaultColor="#700"
22
+ * data={events}
23
+ * />
24
+ * <Layer
25
+ * name="places"
26
+ * markerIcon="point"
27
+ * markerShape="circle"
28
+ * markerDefaultColor="#007"
29
+ * data={places}
30
+ * />
31
+ * </UtopiaMap>
32
+ * ```
33
+ * You can also pass {@link Tags | `Tags`} or {@link Permissions | `Permissions`} as subcomponents.
34
+ * ```tsx
35
+ * <UtopiaMap center={[50.6, 15.5]} zoom={5} height="100dvh" width="100dvw">
36
+ * ...
37
+ * <Tags data={tags} />
38
+ * <Permissions data={permissions} />
39
+ * </UtopiaMap>
40
+ * ```
37
41
  * @category Map
38
42
  */
39
- declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, showThemeControl, defaultTheme, infoText, donationWidget, }: UtopiaMapProps): react_jsx_runtime.JSX.Element;
43
+ declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, showThemeControl, defaultTheme, donationWidget, }: {
44
+ /** height of the map (default '500px') */
45
+ height?: string;
46
+ /** width of the map (default '100%') */
47
+ width?: string;
48
+ /** initial centered position of the map (default [50.6, 9.5]) */
49
+ center?: [number, number];
50
+ /** initial zoom level of the map (default 10) */
51
+ zoom?: number;
52
+ /** React child-components */
53
+ children?: React.ReactNode;
54
+ /** GeoJSON to display on the map */
55
+ geo?: GeoJsonObject;
56
+ /** show the filter control widget (default false) */
57
+ showFilterControl?: boolean;
58
+ /** show the gratitude control widget (default false) */
59
+ showLayerControl?: boolean;
60
+ /** show the layer control widget (default true) */
61
+ showGratitudeControl?: boolean;
62
+ /** show a widget to switch the theme */
63
+ showThemeControl?: boolean;
64
+ /** the defaut theme */
65
+ defaultTheme?: string;
66
+ /** ask to donate to the Utopia Project OpenCollective campaign (default false) */
67
+ donationWidget?: boolean;
68
+ }): react_jsx_runtime.JSX.Element;
40
69
 
41
70
  /**
42
71
  * @category Types
@@ -203,12 +232,75 @@ interface LayerProps {
203
232
  clusterRef?: any
204
233
  }
205
234
 
235
+ /**
236
+ * Tags are used to tag items within the app and the map and to filter by keywords. Every tag has a color.
237
+ * @example
238
+ * ```ts
239
+ * export const tags: Tag[] = [
240
+ * {
241
+ * "id": "e19f46a7-77a4-4a50-99a2-a942dce843a3",
242
+ * "name": "nature",
243
+ * "color": "#9bc53d"
244
+ * },
245
+ * {
246
+ * "id": "2c2099a6-23ac-4308-b91c-86eefeff3a1d",
247
+ * "name": "utopia",
248
+ * "color": "#c3423f"
249
+ * },
250
+ * {
251
+ * "id": "48b2de97-2b9e-432b-b230-7bdc9a5fb6c0",
252
+ * "name": "map",
253
+ * "color": "#5bc0eb"
254
+ * },
255
+ * {
256
+ * "id": "c88f52e6-357b-45fb-a171-9c2b1dceeb8e",
257
+ * "name": "food",
258
+ * "color": "#6761a8"
259
+ * },
260
+ * {
261
+ * "id": "8928cb92-a3c1-4d83-9495-c2eb4fac0bbe",
262
+ * "name": "permaculture",
263
+ * "color": "#44344f"
264
+ * },
265
+ *];
266
+ ```
267
+ * @category Types
268
+ */
269
+ interface Tag {
270
+ color: string
271
+ id: string
272
+ name: string
273
+ offer_or_need?: boolean
274
+ }
275
+
206
276
  /**
207
277
  * @category Map
208
278
  */
209
279
  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) => react_jsx_runtime.JSX.Element;
210
280
 
211
281
  /**
282
+ * This Components injects Tags comming from an {@link ItemsApi | `API`}
283
+ * ```tsx
284
+ * <Tags api={tagsApi} />
285
+ * ```
286
+ * or from on {@link Tag| `Array`}
287
+ * ```tsx
288
+ * <Tags data={tags} />
289
+ * ```
290
+ * Can be child of {@link AppShell | `AppShell`}
291
+ * ```tsx
292
+ * <AppShell>
293
+ * ...
294
+ * <Tags api={tagsApi} />
295
+ * </AppShell>
296
+ * ```
297
+ * Or child of {@link UtopiaMap | `UtopiaMap`}
298
+ * ```tsx
299
+ * <UtopiaMap>
300
+ * ...
301
+ * <Tags api={tagsApi} />
302
+ * </UtopiaMap>
303
+ * ```
212
304
  * @category Map
213
305
  */
214
306
  declare function Tags({ data, api }: {
@@ -242,18 +334,38 @@ interface Permission {
242
334
  }
243
335
 
244
336
  /**
245
- * @category Types
337
+ * This Components injects Permissions comming from an {@link ItemsApi | `API`}
338
+ * ```tsx
339
+ * <Permissions api={itemsApiInstance} adminRole="8141dee8-8e10-48d0-baf1-680aea271298" />
340
+ * ```
341
+ * or from on {@link Permission| `Array`}
342
+ * ```tsx
343
+ * <Permissions data={permissions} adminRole="8141dee8-8e10-48d0-baf1-680aea271298" />
344
+ * ```
345
+ * Can be child of {@link AppShell | `AppShell`}
346
+ * ```tsx
347
+ * <AppShell>
348
+ * ...
349
+ * <Permissions api={itemsApiInstance} adminRole="8141dee8-8e10-48d0-baf1-680aea271298" />
350
+ * </AppShell>
351
+ * ```
352
+ * Or child of {@link UtopiaMap | `UtopiaMap`}
353
+ * ```tsx
354
+ * <UtopiaMap>
355
+ * ...
356
+ * <Permissions api={itemsApiInstance} adminRole="8141dee8-8e10-48d0-baf1-680aea271298" />
357
+ * </UtopiaMap>
358
+ * ```
359
+ * @category Map
246
360
  */
247
- interface PermissionsProps {
361
+ declare function Permissions({ data, api, adminRole, }: {
362
+ /** Array with all the permissions inside */
248
363
  data?: Permission[];
364
+ /** API to fetch all the permissions from a server */
249
365
  api?: ItemsApi<Permission>;
366
+ /** UUID of the admin role which has always all the permissions */
250
367
  adminRole?: string;
251
- }
252
-
253
- /**
254
- * @category Map
255
- */
256
- declare function Permissions({ data, api, adminRole }: PermissionsProps): react_jsx_runtime.JSX.Element;
368
+ }): react_jsx_runtime.JSX.Element;
257
369
 
258
370
  /**
259
371
  * @category Map
@@ -571,4 +683,4 @@ declare global {
571
683
  }
572
684
  }
573
685
 
574
- export { AppShell, type AssetsApi, AttestationForm, AuthProvider, CardPage, Content, type Item, ItemForm, ItemView, type ItemsApi, Layer, type LayerProps, LoginPage, MapOverlayPage, MarketView, Modal, OverlayItemsIndexPage, type Permission, Permissions, type PermissionsProps, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectUser, SetNewPasswordPage, SideBar, SignupPage, StartEndView, type Tag, Tags, TextAreaInput, TextInput, TextView, TitleCard, type UserApi, type UserItem, UserSettings, UtopiaMap };
686
+ export { AppShell, type AssetsApi, AttestationForm, AuthProvider, CardPage, Content, type Item, ItemForm, ItemView, type ItemsApi, Layer, type LayerProps, LoginPage, MapOverlayPage, MarketView, Modal, OverlayItemsIndexPage, type Permission, Permissions, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectUser, SetNewPasswordPage, SideBar, SignupPage, StartEndView, type Tag, Tags, TextAreaInput, TextInput, TextView, TitleCard, type UserApi, type UserItem, UserSettings, UtopiaMap };
package/dist/index.esm.js CHANGED
@@ -72,10 +72,10 @@ styleInject(css_248z$4);
72
72
  var css_248z$3 = ".fade {\n mask-image: linear-gradient(180deg, transparent, #000 1%, #000 99%, transparent);\n}\n\n.placeholder-center::placeholder {\n text-align: center;\n}\n\ninput {\n box-sizing: border-box;\n}\n\ntextarea {\n box-sizing: border-box;\n}\n\n.crosshair-cursor-enabled {\n cursor: crosshair;\n}\n\n.marker-cluster span {\n color: #000;\n}";
73
73
  styleInject(css_248z$3);
74
74
 
75
- var css_248z$2 = ".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: -36.5px;\n left: 4px;\n width: 24px;\n}\n\n.group-icon {\n position: relative;\n top: -37px;\n left: 4px;\n width: 24px;\n}\n\n.liebevoll-jetzt-icon{\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.staff-snake-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.flower-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.network-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.shop-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.plant-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.circle-dot-icon {\n position: relative;\n top: -36px;\n left: 4px;\n width: 24px;\n}";
75
+ var css_248z$2 = ".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: -36.5px;\n left: 4px;\n width: 24px;\n}\n\n.group-icon {\n position: relative;\n top: -37px;\n left: 4px;\n width: 24px;\n}\n\n.liebevoll-jetzt-icon{\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.staff-snake-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.flower-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.network-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.shop-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.plant-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.circle-dot-icon {\n position: relative;\n top: -36px;\n left: 4px;\n width: 24px;\n}\n\n.steps-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}";
76
76
  styleInject(css_248z$2);
77
77
 
78
- var css_248z$1 = ".leaflet-control-attribution {\n display: none;\n}\n\n.leaflet-control-locate {\n display: none;\n}\n\n.leaflet-data-marker {\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.leaflet-container {\n cursor: inherit;\n}\n\n.leaflet-popup-scrolled {\n overflow-x: hidden;\n}\n\n.leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-radius: var(--radius-box);\n}\n\n.leaflet-tooltip {\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-width: 0px;\n}\n\n.leaflet-tooltip {\n border-radius: var(--radius-box);\n transition: opacity 500ms;\n transition-delay: 50ms;\n}\n\n.leaflet-tooltip::before {\n border-top-color: var(--color-base-100);\n}\n\n.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.leaflet-popup-close-button span {\n color: var(--color-base-content);\n opacity: 50%;\n}";
78
+ var css_248z$1 = ".leaflet-control-attribution {\n display: none;\n}\n\n.leaflet-control-locate {\n display: none;\n}\n\n.leaflet-data-marker {\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.leaflet-container {\n cursor: inherit;\n}\n\n.leaflet-popup-scrolled {\n overflow-x: hidden;\n}\n\n.leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-radius: var(--radius-box);\n}\n\n.leaflet-popup-tip-container, .leaflet-popup-tip{\n border-radius: 0;\n}\n\n.leaflet-tooltip {\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-width: 0px;\n}\n\n.leaflet-tooltip {\n border-radius: var(--radius-box);\n transition: opacity 500ms;\n transition-delay: 50ms;\n}\n\n.leaflet-tooltip::before {\n border-top-color: var(--color-base-100);\n}\n\n.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.leaflet-popup-close-button span {\n color: var(--color-base-content);\n opacity: 50%;\n}";
79
79
  styleInject(css_248z$1);
80
80
 
81
81
  var css_248z = ".picker {\n position: relative;\n}\n\n.swatch {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: 3px solid #fff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n cursor: pointer;\n}\n\n.popover {\n position: absolute;\n top: 0;\n left: 36px;\n border-radius: 9px;\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);\n}";
@@ -1428,6 +1428,8 @@ const addIcon = (icon) => {
1428
1428
  return '<svg class="circle-dot-icon" stroke="#fff" fill="transparent" stroke-width="2.5" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1.55em" width="1.55em" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="1"></circle></svg>';
1429
1429
  case 'cannabis':
1430
1430
  return '<svg class="network-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 512 512" height="1.5em" width="1.5em" xmlns="http://www.w3.org/2000/svg"><path d="M256 0c5.3 0 10.3 2.7 13.3 7.1c15.8 23.5 36.7 63.7 49.2 109c7.2 26.4 11.8 55.2 10.4 84c11.5-8.8 23.7-16.7 35.8-23.6c41-23.3 84.4-36.9 112.2-42.5c5.2-1 10.7 .6 14.4 4.4s5.4 9.2 4.4 14.5c-5.6 27.7-19.3 70.9-42.7 111.7c-9.1 15.9-19.9 31.7-32.4 46.3c27.8 6.6 52.4 17.3 67.2 25.5c5.1 2.8 8.2 8.2 8.2 14s-3.2 11.2-8.2 14c-15.2 8.4-40.9 19.5-69.8 26.1c-20.2 4.6-42.9 7.2-65.2 4.6l8.3 33.1c1.5 6.1-.6 12.4-5.5 16.4s-11.6 4.6-17.2 1.9L280 417.2l0 70.8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-70.8-58.5 29.1c-5.6 2.8-12.3 2.1-17.2-1.9s-7-10.3-5.5-16.4l8.3-33.1c-22.2 2.6-45 0-65.2-4.6c-28.9-6.6-54.6-17.6-69.8-26.1c-5.1-2.8-8.2-8.2-8.2-14s3.2-11.2 8.2-14c14.8-8.2 39.4-18.8 67.2-25.5C78.9 296.3 68.1 280.5 59 264.6c-23.4-40.8-37.1-84-42.7-111.7c-1.1-5.2 .6-10.7 4.4-14.5s9.2-5.4 14.4-4.4c27.9 5.5 71.2 19.2 112.2 42.5c12.1 6.9 24.3 14.7 35.8 23.6c-1.4-28.7 3.1-57.6 10.4-84c12.5-45.3 33.4-85.5 49.2-109c3-4.4 8-7.1 13.3-7.1z"></path></svg>';
1431
+ case 'steps':
1432
+ return '<svg class="steps-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 512 512" height="1.4em" width="1.4em" xmlns="http://www.w3.org/2000/svg"><path d="M133.83 361.27c-22.61 0-41-8.17-54.79-24.39s-22.84-40.29-28.11-75.31c-7.76-51.61-.06-95.11 21.68-122.48 12.8-16.12 29.6-25.44 48.58-26.94 16.25-1.3 40.54 5.29 64 44 14.69 24.24 25.86 56.44 30.65 88.34 5.79 38.51 1.48 66.86-13.18 86.65-11.64 15.72-29.54 25.46-53.21 29a106.46 106.46 0 0 1-15.62 1.13zM173 496c-13.21 0-26.6-4.23-38.66-12.36a79.79 79.79 0 0 1-33.52-50.6c-2.85-14.66-1.14-26.31 5.22-35.64 10.33-15.15 28.87-18.56 48.49-22.18 2.07-.38 4.17-.76 6.3-1.17 4.52-.86 9.14-2 13.62-3.11 16.78-4.14 34.14-8.43 48.47 1.75 9.59 6.8 15 18.36 16.62 35.32 1.84 19.57-2.36 39.1-11.83 55-10.19 17.11-25.47 28.42-43 31.86A61 61 0 0 1 173 496zm205.17-230.73a106.69 106.69 0 0 1-15.6-1.2c-23.66-3.5-41.56-13.25-53.2-29-14.66-19.79-19-48.13-13.18-86.65 4.79-31.93 15.93-64.1 30.55-88.25 23.34-38.57 47.66-45.26 64-44.08 18.92 1.38 35.69 10.57 48.51 26.6 21.89 27.37 29.65 71 21.86 122.84-5.27 35-14.2 58.95-28.11 75.31s-32.22 24.43-54.83 24.43zM339 400a61 61 0 0 1-11.68-1.13c-17.56-3.44-32.84-14.75-43-31.86-9.47-15.9-13.67-35.43-11.83-55 1.6-17 7-28.52 16.62-35.33 14.33-10.17 31.69-5.89 48.47-1.74 4.48 1.1 9.1 2.24 13.62 3.11l6.29 1.17c19.63 3.61 38.17 7 48.5 22.17 6.36 9.33 8.07 21 5.22 35.64a79.78 79.78 0 0 1-33.52 50.61C365.56 395.78 352.17 400 339 400z"></path></svg>';
1431
1433
  default:
1432
1434
  return '';
1433
1435
  }
@@ -4823,17 +4825,16 @@ const CrowdfundingView = ({ item }) => {
4823
4825
  const GalleryView = ({ item }) => {
4824
4826
  const [index, setIndex] = useState(-1);
4825
4827
  const appState = useAppState();
4826
- const images = item.gallery?.map((i, j) => {
4827
- return {
4828
- src: appState.assetsApi.url + `${i.directus_files_id.id}.jpg`,
4829
- width: i.directus_files_id.width,
4830
- height: i.directus_files_id.height,
4831
- index: j,
4832
- };
4833
- });
4834
- if (!images)
4835
- throw new Error('GalleryView: images is undefined');
4836
- return (jsxs("div", { className: 'tw:mx-6 tw:mb-6', children: [jsx(RowsPhotoAlbum, { photos: images, targetRowHeight: 150, onClick: ({ index: current }) => setIndex(current) }), jsx(ReactLightbox, { index: index, slides: images, open: index >= 0, close: () => setIndex(-1) })] }));
4828
+ const images = item.gallery?.map((i, j) => ({
4829
+ src: appState.assetsApi.url + `${i.directus_files_id.id}.jpg`,
4830
+ width: i.directus_files_id.width,
4831
+ height: i.directus_files_id.height,
4832
+ index: j,
4833
+ })) ?? [];
4834
+ if (images.length > 0)
4835
+ return (jsxs("div", { className: 'tw:mx-6 tw:mb-6', children: [jsx(RowsPhotoAlbum, { photos: images, targetRowHeight: 150, onClick: ({ index: current }) => setIndex(current) }), jsx(ReactLightbox, { index: index, slides: images, open: index >= 0, close: () => setIndex(-1) })] }));
4836
+ else
4837
+ return jsx(Fragment, {});
4837
4838
  };
4838
4839
 
4839
4840
  var ChevronSVG = 'data:image/svg+xml;base64,PHN2ZwogICAgICAgICAgICB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnCiAgICAgICAgICAgIHZpZXdCb3g9JzAgMCAyNCAyNCcKICAgICAgICAgICAgZmlsbD0nd2hpdGUnCiAgICAgICAgICAgIGNsYXNzTmFtZT0naC00IHctNCcKICAgICAgICAgID4KICAgICAgICAgICAgPHBhdGggZD0nTTIwIDRINGMtMS4xIDAtMS45OS45LTEuOTkgMkwyIDE4YzAgMS4xLjkgMiAyIDJoMTZjMS4xIDAgMi0uOSAyLTJWNmMwLTEuMS0uOS0yLTItMnptMCA0bC04IDUtOC01VjZsOCA1IDgtNXYyeicgLz4KICAgICAgICAgIDwvc3ZnPg==';