@collabdt/core 0.5.1 → 0.5.3
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/core/components/AppSidebarContent.d.ts +2 -3
- package/dist/core/components/AppSidebarContent.d.ts.map +1 -1
- package/dist/core/components/AppSidebarContent.js +10 -1
- package/dist/core/components/AppSidebarContent.js.map +1 -1
- package/dist/core/components/Toolbar.d.ts +2 -3
- package/dist/core/components/Toolbar.d.ts.map +1 -1
- package/dist/core/components/Toolbar.js.map +1 -1
- package/dist/core/components/ui/AppSidebar.d.ts +2 -2
- package/dist/core/components/ui/AppSidebar.d.ts.map +1 -1
- package/dist/core/components/ui/AppSidebar.js.map +1 -1
- package/dist/core/components/ui/Comments/CommentsSection.d.ts.map +1 -1
- package/dist/core/components/ui/Comments/CommentsSection.js +10 -9
- package/dist/core/components/ui/Comments/CommentsSection.js.map +1 -1
- package/dist/core/components/ui/Sensors/SensorsSection.d.ts.map +1 -1
- package/dist/core/components/ui/Sensors/SensorsSection.js +24 -23
- package/dist/core/components/ui/Sensors/SensorsSection.js.map +1 -1
- package/dist/core/components/ui/ViewerSidebar/Shell.js +1 -1
- package/dist/core/components/ui/ViewerSidebar/Shell.js.map +1 -1
- package/dist/core/components/ui/ViewerSidebar/TabStrip.d.ts +6 -5
- package/dist/core/components/ui/ViewerSidebar/TabStrip.d.ts.map +1 -1
- package/dist/core/components/ui/ViewerSidebar/TabStrip.js +6 -4
- package/dist/core/components/ui/ViewerSidebar/TabStrip.js.map +1 -1
- package/dist/core/components/ui/ViewerSidebar/sidebarTabs.d.ts +16 -9
- package/dist/core/components/ui/ViewerSidebar/sidebarTabs.d.ts.map +1 -1
- package/dist/core/components/ui/ViewerSidebar/sidebarTabs.js.map +1 -1
- package/dist/core/components/viewers/Viewer.d.ts.map +1 -1
- package/dist/core/components/viewers/Viewer.js +17 -8
- package/dist/core/components/viewers/Viewer.js.map +1 -1
- package/dist/core/components/viewers/bim/BimViewer.d.ts.map +1 -1
- package/dist/core/components/viewers/bim/BimViewer.js +6 -1
- package/dist/core/components/viewers/bim/BimViewer.js.map +1 -1
- package/dist/core/components/viewers/bim/src/BimSidebar/src/index.d.ts.map +1 -1
- package/dist/core/components/viewers/bim/src/BimSidebar/src/index.js +5 -1
- package/dist/core/components/viewers/bim/src/BimSidebar/src/index.js.map +1 -1
- package/dist/core/components/viewers/bim/src/ElementAppearance.d.ts +10 -1
- package/dist/core/components/viewers/bim/src/ElementAppearance.d.ts.map +1 -1
- package/dist/core/components/viewers/bim/src/ElementAppearance.js +36 -1
- package/dist/core/components/viewers/bim/src/ElementAppearance.js.map +1 -1
- package/dist/core/components/viewers/bim/src/ModelsSync.d.ts.map +1 -1
- package/dist/core/components/viewers/bim/src/ModelsSync.js +6 -5
- package/dist/core/components/viewers/bim/src/ModelsSync.js.map +1 -1
- package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.d.ts +12 -1
- package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.d.ts.map +1 -1
- package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.js +18 -2
- package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.js.map +1 -1
- package/dist/core/components/viewers/map/MapViewer.d.ts.map +1 -1
- package/dist/core/components/viewers/map/MapViewer.js +6 -3
- package/dist/core/components/viewers/map/MapViewer.js.map +1 -1
- package/dist/core/components/viewers/map/src/MapSidebar/index.d.ts.map +1 -1
- package/dist/core/components/viewers/map/src/MapSidebar/index.js +5 -1
- package/dist/core/components/viewers/map/src/MapSidebar/index.js.map +1 -1
- package/dist/core/components/viewers/map/utils/stringToColour.d.ts +3 -0
- package/dist/core/components/viewers/map/utils/stringToColour.d.ts.map +1 -1
- package/dist/core/components/viewers/map/utils/stringToColour.js +72 -70
- package/dist/core/components/viewers/map/utils/stringToColour.js.map +1 -1
- package/dist/core/components/viewers/plugins/src/PluginCard.d.ts.map +1 -1
- package/dist/core/components/viewers/plugins/src/PluginCard.js +8 -4
- package/dist/core/components/viewers/plugins/src/PluginCard.js.map +1 -1
- package/dist/core/components/viewers/pointcloud/src/PointCloudSidebar/index.d.ts.map +1 -1
- package/dist/core/components/viewers/pointcloud/src/PointCloudSidebar/index.js +5 -1
- package/dist/core/components/viewers/pointcloud/src/PointCloudSidebar/index.js.map +1 -1
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.d.ts +10 -0
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.d.ts.map +1 -0
- package/dist/core/components/viewers/{map/legends/MapLegendHost.js → shared/legends/ViewerLegendHost.js} +48 -8
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.js.map +1 -0
- package/dist/core/components/viewers/viewerAccess.d.ts +7 -0
- package/dist/core/components/viewers/viewerAccess.d.ts.map +1 -0
- package/dist/core/components/viewers/viewerAccess.js +9 -0
- package/dist/core/components/viewers/viewerAccess.js.map +1 -0
- package/dist/core/i18n/messages/en.json +5 -0
- package/dist/core/i18n/messages/es.json +5 -0
- package/dist/core/i18n/messages/fr.json +5 -0
- package/dist/core/plugins/hello-bim/components/SpaceDialog.d.ts +13 -0
- package/dist/core/plugins/hello-bim/components/SpaceDialog.d.ts.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpaceDialog.js +80 -0
- package/dist/core/plugins/hello-bim/components/SpaceDialog.js.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpacesLegend.d.ts +11 -0
- package/dist/core/plugins/hello-bim/components/SpacesLegend.d.ts.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpacesLegend.js +16 -0
- package/dist/core/plugins/hello-bim/components/SpacesLegend.js.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpacesTab.d.ts +4 -0
- package/dist/core/plugins/hello-bim/components/SpacesTab.d.ts.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpacesTab.js +211 -0
- package/dist/core/plugins/hello-bim/components/SpacesTab.js.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpacesTool.d.ts +8 -0
- package/dist/core/plugins/hello-bim/components/SpacesTool.d.ts.map +1 -0
- package/dist/core/plugins/hello-bim/components/SpacesTool.js +68 -0
- package/dist/core/plugins/hello-bim/components/SpacesTool.js.map +1 -0
- package/dist/core/plugins/hello-bim/components/icons.d.ts +13 -0
- package/dist/core/plugins/hello-bim/components/icons.d.ts.map +1 -0
- package/dist/core/plugins/hello-bim/components/icons.js +52 -0
- package/dist/core/plugins/hello-bim/components/icons.js.map +1 -0
- package/dist/core/plugins/hello-bim/index.d.ts +2 -6
- package/dist/core/plugins/hello-bim/index.d.ts.map +1 -1
- package/dist/core/plugins/hello-bim/index.js +27 -3
- package/dist/core/plugins/hello-bim/index.js.map +1 -1
- package/dist/core/plugins/hello-bim/manifest.json +97 -31
- package/dist/core/plugins/hello-bim/spaces.d.ts +57 -0
- package/dist/core/plugins/hello-bim/spaces.d.ts.map +1 -0
- package/dist/core/plugins/hello-bim/spaces.js +207 -0
- package/dist/core/plugins/hello-bim/spaces.js.map +1 -0
- package/dist/core/plugins/hello-map/components/MapTool.d.ts +9 -0
- package/dist/core/plugins/hello-map/components/MapTool.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/components/{HelloMapTool.js → MapTool.js} +30 -11
- package/dist/core/plugins/hello-map/components/MapTool.js.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkerDialog.d.ts +9 -0
- package/dist/core/plugins/hello-map/components/MarkerDialog.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkerDialog.js +47 -0
- package/dist/core/plugins/hello-map/components/MarkerDialog.js.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersLayer.d.ts +8 -0
- package/dist/core/plugins/hello-map/components/MarkersLayer.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersLayer.js +133 -0
- package/dist/core/plugins/hello-map/components/MarkersLayer.js.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersLegend.d.ts +11 -0
- package/dist/core/plugins/hello-map/components/MarkersLegend.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersLegend.js +20 -0
- package/dist/core/plugins/hello-map/components/MarkersLegend.js.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersPage.d.ts +6 -0
- package/dist/core/plugins/hello-map/components/MarkersPage.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersPage.js +40 -0
- package/dist/core/plugins/hello-map/components/MarkersPage.js.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersTab.d.ts +4 -0
- package/dist/core/plugins/hello-map/components/MarkersTab.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/components/MarkersTab.js +275 -0
- package/dist/core/plugins/hello-map/components/MarkersTab.js.map +1 -0
- package/dist/core/plugins/hello-map/index.d.ts +2 -5
- package/dist/core/plugins/hello-map/index.d.ts.map +1 -1
- package/dist/core/plugins/hello-map/index.js +43 -3
- package/dist/core/plugins/hello-map/index.js.map +1 -1
- package/dist/core/plugins/hello-map/manifest.json +85 -12
- package/dist/core/plugins/hello-map/markers.d.ts +32 -0
- package/dist/core/plugins/hello-map/markers.d.ts.map +1 -0
- package/dist/core/plugins/hello-map/markers.js +143 -0
- package/dist/core/plugins/hello-map/markers.js.map +1 -0
- package/dist/core/plugins/host/PluginDataPageHost.d.ts +10 -0
- package/dist/core/plugins/host/PluginDataPageHost.d.ts.map +1 -0
- package/dist/core/plugins/host/PluginDataPageHost.js +142 -0
- package/dist/core/plugins/host/PluginDataPageHost.js.map +1 -0
- package/dist/core/plugins/host/PluginDialogHost.d.ts +7 -0
- package/dist/core/plugins/host/PluginDialogHost.d.ts.map +1 -0
- package/dist/core/plugins/host/PluginDialogHost.js +80 -0
- package/dist/core/plugins/host/PluginDialogHost.js.map +1 -0
- package/dist/core/plugins/host/PluginMapLayerHost.d.ts +6 -0
- package/dist/core/plugins/host/PluginMapLayerHost.d.ts.map +1 -0
- package/dist/core/plugins/host/PluginMapLayerHost.js +26 -0
- package/dist/core/plugins/host/PluginMapLayerHost.js.map +1 -0
- package/dist/core/plugins/host/dialogs.d.ts +25 -0
- package/dist/core/plugins/host/dialogs.d.ts.map +1 -0
- package/dist/core/plugins/host/dialogs.js +50 -0
- package/dist/core/plugins/host/dialogs.js.map +1 -0
- package/dist/core/plugins/host/host.d.ts.map +1 -1
- package/dist/core/plugins/host/host.js +2 -0
- package/dist/core/plugins/host/host.js.map +1 -1
- package/dist/core/plugins/host/pluginState.d.ts +28 -0
- package/dist/core/plugins/host/pluginState.d.ts.map +1 -0
- package/dist/core/plugins/host/pluginState.js +49 -0
- package/dist/core/plugins/host/pluginState.js.map +1 -0
- package/dist/core/plugins/host/pluginViewerKey.d.ts +13 -0
- package/dist/core/plugins/host/pluginViewerKey.d.ts.map +1 -0
- package/dist/core/plugins/host/pluginViewerKey.js +18 -0
- package/dist/core/plugins/host/pluginViewerKey.js.map +1 -0
- package/dist/core/plugins/host/provider.d.ts.map +1 -1
- package/dist/core/plugins/host/provider.js +2 -1
- package/dist/core/plugins/host/provider.js.map +1 -1
- package/dist/core/plugins/host/runtimeShims.d.ts.map +1 -1
- package/dist/core/plugins/host/runtimeShims.js +23 -1
- package/dist/core/plugins/host/runtimeShims.js.map +1 -1
- package/dist/core/plugins/host/usePluginDataPages.d.ts +15 -0
- package/dist/core/plugins/host/usePluginDataPages.d.ts.map +1 -0
- package/dist/core/plugins/host/usePluginDataPages.js +22 -0
- package/dist/core/plugins/host/usePluginDataPages.js.map +1 -0
- package/dist/core/plugins/host/usePluginViewerTabs.d.ts +11 -0
- package/dist/core/plugins/host/usePluginViewerTabs.d.ts.map +1 -0
- package/dist/core/plugins/host/usePluginViewerTabs.js +41 -0
- package/dist/core/plugins/host/usePluginViewerTabs.js.map +1 -0
- package/dist/core/plugins/sdk/bimViewer.d.ts +29 -13
- package/dist/core/plugins/sdk/bimViewer.d.ts.map +1 -1
- package/dist/core/plugins/sdk/bimViewer.js +17 -1
- package/dist/core/plugins/sdk/bimViewer.js.map +1 -1
- package/dist/core/plugins/sdk/index.d.ts +1 -0
- package/dist/core/plugins/sdk/index.d.ts.map +1 -1
- package/dist/core/plugins/sdk/index.js +4 -1
- package/dist/core/plugins/sdk/index.js.map +1 -1
- package/dist/core/plugins/sdk/messages.d.ts +6 -0
- package/dist/core/plugins/sdk/messages.d.ts.map +1 -1
- package/dist/core/plugins/sdk/messages.js +11 -0
- package/dist/core/plugins/sdk/messages.js.map +1 -1
- package/dist/core/plugins/sdk/state.d.ts +6 -0
- package/dist/core/plugins/sdk/state.d.ts.map +1 -0
- package/dist/core/plugins/sdk/state.js +30 -0
- package/dist/core/plugins/sdk/state.js.map +1 -0
- package/dist/core/plugins/sdk/types.d.ts +55 -10
- package/dist/core/plugins/sdk/types.d.ts.map +1 -1
- package/dist/core/plugins/sdk/types.js +7 -3
- package/dist/core/plugins/sdk/types.js.map +1 -1
- package/dist/core/plugins/sdk/ui.d.ts +12 -0
- package/dist/core/plugins/sdk/ui.d.ts.map +1 -0
- package/dist/core/plugins/sdk/ui.js +16 -0
- package/dist/core/plugins/sdk/ui.js.map +1 -0
- package/dist/core/store/CombineProviders.d.ts.map +1 -1
- package/dist/core/store/CombineProviders.js +6 -2
- package/dist/core/store/CombineProviders.js.map +1 -1
- package/dist/core/store/Menus/reducer.d.ts +5 -3
- package/dist/core/store/Menus/reducer.d.ts.map +1 -1
- package/dist/core/store/Menus/reducer.js.map +1 -1
- package/dist/core/types/dbTypes.d.ts +5 -0
- package/dist/core/types/dbTypes.d.ts.map +1 -1
- package/dist/core/types/dbTypes.js.map +1 -1
- package/package.json +3 -1
- package/dist/core/components/viewers/map/legends/MapLegendHost.d.ts +0 -10
- package/dist/core/components/viewers/map/legends/MapLegendHost.d.ts.map +0 -1
- package/dist/core/components/viewers/map/legends/MapLegendHost.js.map +0 -1
- package/dist/core/plugins/hello-bim/components/HelloBimTool.d.ts +0 -18
- package/dist/core/plugins/hello-bim/components/HelloBimTool.d.ts.map +0 -1
- package/dist/core/plugins/hello-bim/components/HelloBimTool.js +0 -142
- package/dist/core/plugins/hello-bim/components/HelloBimTool.js.map +0 -1
- package/dist/core/plugins/hello-map/components/HelloMapTool.d.ts +0 -14
- package/dist/core/plugins/hello-map/components/HelloMapTool.d.ts.map +0 -1
- package/dist/core/plugins/hello-map/components/HelloMapTool.js.map +0 -1
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { MAP_COLOUR_PALETTE } from "../../sdk";
|
|
5
|
+
import { Button, Input, Separator } from "../../sdk/components";
|
|
6
|
+
import { useMapViewer } from "../../sdk/mapViewer";
|
|
7
|
+
import { usePluginTranslations } from "../../sdk/messages";
|
|
8
|
+
import { useMarkers } from "../markers";
|
|
9
|
+
const SWATCHES = 8;
|
|
10
|
+
function NameField({
|
|
11
|
+
name,
|
|
12
|
+
label,
|
|
13
|
+
saveLabel,
|
|
14
|
+
revertLabel,
|
|
15
|
+
onCommit
|
|
16
|
+
}) {
|
|
17
|
+
const [draft, setDraft] = React.useState(name);
|
|
18
|
+
const inputId = React.useId();
|
|
19
|
+
const trimmed = draft.trim();
|
|
20
|
+
const canSave = trimmed.length > 0 && trimmed !== name;
|
|
21
|
+
const commit = () => {
|
|
22
|
+
if (!canSave) return;
|
|
23
|
+
onCommit(trimmed);
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
26
|
+
/* @__PURE__ */ jsx("label", { className: "text-xs font-medium", htmlFor: inputId, children: label }),
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
Input,
|
|
30
|
+
{
|
|
31
|
+
id: inputId,
|
|
32
|
+
value: draft,
|
|
33
|
+
onChange: (event) => setDraft(event.target.value),
|
|
34
|
+
onKeyDown: (event) => {
|
|
35
|
+
if (event.key === "Enter") {
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
commit();
|
|
38
|
+
}
|
|
39
|
+
if (event.key === "Escape") setDraft(name);
|
|
40
|
+
},
|
|
41
|
+
className: "h-8 flex-1"
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
Button,
|
|
46
|
+
{
|
|
47
|
+
size: "icon",
|
|
48
|
+
className: "h-8 w-8 shrink-0 p-0",
|
|
49
|
+
disabled: !canSave,
|
|
50
|
+
"aria-label": saveLabel,
|
|
51
|
+
title: saveLabel,
|
|
52
|
+
onClick: commit,
|
|
53
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
Button,
|
|
58
|
+
{
|
|
59
|
+
size: "icon",
|
|
60
|
+
variant: "ghost",
|
|
61
|
+
className: "h-8 w-8 shrink-0 p-0",
|
|
62
|
+
disabled: !canSave,
|
|
63
|
+
"aria-label": revertLabel,
|
|
64
|
+
title: revertLabel,
|
|
65
|
+
onClick: () => setDraft(name),
|
|
66
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
function Glyph({ children }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(
|
|
74
|
+
"svg",
|
|
75
|
+
{
|
|
76
|
+
viewBox: "0 0 24 24",
|
|
77
|
+
className: "h-4 w-4",
|
|
78
|
+
fill: "none",
|
|
79
|
+
stroke: "currentColor",
|
|
80
|
+
strokeWidth: "2",
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeLinejoin: "round",
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
children
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function CheckIcon() {
|
|
89
|
+
return /* @__PURE__ */ jsx(Glyph, { children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
90
|
+
}
|
|
91
|
+
function XIcon() {
|
|
92
|
+
return /* @__PURE__ */ jsxs(Glyph, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
94
|
+
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
function PlusIcon() {
|
|
98
|
+
return /* @__PURE__ */ jsxs(
|
|
99
|
+
"svg",
|
|
100
|
+
{
|
|
101
|
+
viewBox: "0 0 24 24",
|
|
102
|
+
className: "h-3 w-3",
|
|
103
|
+
fill: "none",
|
|
104
|
+
stroke: "currentColor",
|
|
105
|
+
strokeWidth: "2.5",
|
|
106
|
+
strokeLinecap: "round",
|
|
107
|
+
"aria-hidden": "true",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" }),
|
|
110
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function MarkerPlusIcon() {
|
|
116
|
+
return /* @__PURE__ */ jsxs(Glyph, { children: [
|
|
117
|
+
/* @__PURE__ */ jsx("path", { d: "M19.914 11.105A7.298 7.298 0 0 0 20 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32 32 0 0 0 .824-.738" }),
|
|
118
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "10", r: "3" }),
|
|
119
|
+
/* @__PURE__ */ jsx("path", { d: "M16 18h6" }),
|
|
120
|
+
/* @__PURE__ */ jsx("path", { d: "M19 15v6" })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
function MarkersTab() {
|
|
124
|
+
const t = usePluginTranslations();
|
|
125
|
+
const { map } = useMapViewer();
|
|
126
|
+
const {
|
|
127
|
+
markers,
|
|
128
|
+
isLoading,
|
|
129
|
+
lastError,
|
|
130
|
+
selected,
|
|
131
|
+
select,
|
|
132
|
+
open,
|
|
133
|
+
add,
|
|
134
|
+
setColour,
|
|
135
|
+
rename,
|
|
136
|
+
remove
|
|
137
|
+
} = useMarkers();
|
|
138
|
+
const addHere = async () => {
|
|
139
|
+
if (!map) return;
|
|
140
|
+
const centre = map.getCenter();
|
|
141
|
+
await add(centre.lat, centre.lng, map.getZoom());
|
|
142
|
+
};
|
|
143
|
+
const flyTo = () => {
|
|
144
|
+
if (!map || !selected) return;
|
|
145
|
+
map.flyTo({ center: [selected.longitude, selected.latitude], zoom: selected.zoom });
|
|
146
|
+
open(selected.key);
|
|
147
|
+
};
|
|
148
|
+
if (isLoading && markers.length === 0) {
|
|
149
|
+
return /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-muted-foreground", children: t("loading", "Loading\u2026") });
|
|
150
|
+
}
|
|
151
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
152
|
+
/* @__PURE__ */ jsxs(
|
|
153
|
+
Button,
|
|
154
|
+
{
|
|
155
|
+
size: "sm",
|
|
156
|
+
variant: "outline",
|
|
157
|
+
className: "gap-2",
|
|
158
|
+
disabled: !map,
|
|
159
|
+
onClick: () => {
|
|
160
|
+
void addHere();
|
|
161
|
+
},
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ jsx(MarkerPlusIcon, {}),
|
|
164
|
+
t("addHere", "Add a marker at the map centre")
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
!map && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("mapOnly", "Switch to the map to add a marker.") }),
|
|
169
|
+
lastError && /* @__PURE__ */ jsxs("p", { className: "rounded-md bg-destructive/10 px-2 py-1 text-xs text-destructive", children: [
|
|
170
|
+
t("saveFailed", "Could not save: "),
|
|
171
|
+
lastError
|
|
172
|
+
] }),
|
|
173
|
+
markers.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("empty", "No markers yet. Record one from the map toolbar.") }) : /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1", children: markers.map((marker) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
174
|
+
"button",
|
|
175
|
+
{
|
|
176
|
+
type: "button",
|
|
177
|
+
onClick: () => {
|
|
178
|
+
select(marker.key);
|
|
179
|
+
open(marker.key);
|
|
180
|
+
},
|
|
181
|
+
className: `flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm ${(selected == null ? void 0 : selected.key) === marker.key ? "bg-accent" : "hover:bg-accent/50"}`,
|
|
182
|
+
children: [
|
|
183
|
+
/* @__PURE__ */ jsx(
|
|
184
|
+
"span",
|
|
185
|
+
{
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
className: "inline-block h-3 w-3 shrink-0 rounded-full border border-white",
|
|
188
|
+
style: { backgroundColor: marker.colour }
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: marker.name }),
|
|
192
|
+
/* @__PURE__ */ jsxs("span", { className: "tabular-nums text-xs text-muted-foreground", children: [
|
|
193
|
+
marker.latitude.toFixed(2),
|
|
194
|
+
", ",
|
|
195
|
+
marker.longitude.toFixed(2)
|
|
196
|
+
] })
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
) }, marker.key)) }),
|
|
200
|
+
selected && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
201
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
202
|
+
/* @__PURE__ */ jsx(
|
|
203
|
+
NameField,
|
|
204
|
+
{
|
|
205
|
+
name: selected.name,
|
|
206
|
+
label: t("nameLabel", "Name"),
|
|
207
|
+
saveLabel: t("saveName", "Save name"),
|
|
208
|
+
revertLabel: t("revertName", "Discard the change"),
|
|
209
|
+
onCommit: (name) => {
|
|
210
|
+
void rename(selected.key, name);
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
selected.key
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", disabled: !map, onClick: flyTo, children: t("flyTo", "Fly to on the map") }),
|
|
216
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
217
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: t("colour", "Colour") }),
|
|
218
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
219
|
+
MAP_COLOUR_PALETTE.slice(0, SWATCHES).map((colour) => /* @__PURE__ */ jsx(
|
|
220
|
+
"button",
|
|
221
|
+
{
|
|
222
|
+
type: "button",
|
|
223
|
+
"aria-label": colour,
|
|
224
|
+
"aria-pressed": selected.colour === colour,
|
|
225
|
+
onClick: () => {
|
|
226
|
+
void setColour(selected.key, colour);
|
|
227
|
+
},
|
|
228
|
+
className: `h-6 w-6 rounded-full border-2 ${selected.colour === colour ? "border-foreground" : "border-transparent"}`,
|
|
229
|
+
style: { backgroundColor: colour }
|
|
230
|
+
},
|
|
231
|
+
colour
|
|
232
|
+
)),
|
|
233
|
+
/* @__PURE__ */ jsxs(
|
|
234
|
+
"label",
|
|
235
|
+
{
|
|
236
|
+
title: t("customColour", "Pick any colour"),
|
|
237
|
+
className: "relative ml-1 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input bg-background text-muted-foreground hover:text-foreground",
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ jsx(PlusIcon, {}),
|
|
240
|
+
/* @__PURE__ */ jsx(
|
|
241
|
+
"input",
|
|
242
|
+
{
|
|
243
|
+
type: "color",
|
|
244
|
+
value: selected.colour,
|
|
245
|
+
onChange: (event) => {
|
|
246
|
+
void setColour(selected.key, event.target.value);
|
|
247
|
+
},
|
|
248
|
+
className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t("customColour", "Pick any colour") })
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] })
|
|
256
|
+
] }),
|
|
257
|
+
/* @__PURE__ */ jsx(
|
|
258
|
+
Button,
|
|
259
|
+
{
|
|
260
|
+
size: "sm",
|
|
261
|
+
variant: "ghost",
|
|
262
|
+
className: "self-start",
|
|
263
|
+
onClick: () => {
|
|
264
|
+
void remove(selected.key);
|
|
265
|
+
},
|
|
266
|
+
children: t("delete", "Delete")
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
] })
|
|
270
|
+
] });
|
|
271
|
+
}
|
|
272
|
+
export {
|
|
273
|
+
MarkersTab
|
|
274
|
+
};
|
|
275
|
+
//# sourceMappingURL=MarkersTab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/core/plugins/hello-map/components/MarkersTab.tsx"],"sourcesContent":["'use client'\r\n\r\n// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport * as React from 'react'\r\n\r\nimport { MAP_COLOUR_PALETTE } from '../../sdk'\r\nimport { Button, Input, Separator } from '../../sdk/components'\r\nimport { useMapViewer } from '../../sdk/mapViewer'\r\nimport { usePluginTranslations } from '../../sdk/messages'\r\nimport { useMarkers } from '../markers'\r\n\r\n/** How many palette entries to offer as swatches before the free colour input. */\r\nconst SWATCHES = 8\r\n\r\n/**\r\n * The name, saved only when confirmed. Not on blur: with a confirm button, blurring to reach\r\n * it would save first, and blurring elsewhere would commit an unconfirmed edit.\r\n */\r\nfunction NameField({\r\n name,\r\n label,\r\n saveLabel,\r\n revertLabel,\r\n onCommit,\r\n}: {\r\n name: string\r\n label: string\r\n saveLabel: string\r\n revertLabel: string\r\n onCommit: (name: string) => void\r\n}) {\r\n const [draft, setDraft] = React.useState(name)\r\n const inputId = React.useId()\r\n\r\n const trimmed = draft.trim()\r\n const canSave = trimmed.length > 0 && trimmed !== name\r\n\r\n const commit = () => {\r\n if (!canSave) return\r\n onCommit(trimmed)\r\n }\r\n\r\n return (\r\n <div className=\"flex flex-col gap-1\">\r\n <label className=\"text-xs font-medium\" htmlFor={inputId}>{label}</label>\r\n\r\n {/* Laid out like the app's other inline text edits (see the comment editor): the field\r\n takes the row, then a confirm and a revert, both h-8 w-8 icon buttons. */}\r\n <div className=\"flex items-center gap-1\">\r\n <Input\r\n id={inputId}\r\n value={draft}\r\n onChange={event => setDraft(event.target.value)}\r\n onKeyDown={(event) => {\r\n if (event.key === 'Enter') { event.preventDefault(); commit() }\r\n if (event.key === 'Escape') setDraft(name)\r\n }}\r\n className=\"h-8 flex-1\"\r\n />\r\n\r\n <Button\r\n size=\"icon\"\r\n className=\"h-8 w-8 shrink-0 p-0\"\r\n disabled={!canSave}\r\n aria-label={saveLabel}\r\n title={saveLabel}\r\n onClick={commit}\r\n >\r\n <CheckIcon />\r\n </Button>\r\n\r\n <Button\r\n size=\"icon\"\r\n variant=\"ghost\"\r\n className=\"h-8 w-8 shrink-0 p-0\"\r\n disabled={!canSave}\r\n aria-label={revertLabel}\r\n title={revertLabel}\r\n onClick={() => setDraft(name)}\r\n >\r\n <XIcon />\r\n </Button>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\n// Drawn here: `lucide-react` is unshimmed, so a plugin cannot import it.\r\nfunction Glyph({ children }: { children: React.ReactNode }) {\r\n return (\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n className=\"h-4 w-4\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n {children}\r\n </svg>\r\n )\r\n}\r\n\r\nfunction CheckIcon() {\r\n return <Glyph><path d=\"M20 6 9 17l-5-5\" /></Glyph>\r\n}\r\n\r\nfunction XIcon() {\r\n return <Glyph><path d=\"M18 6 6 18\" /><path d=\"m6 6 12 12\" /></Glyph>\r\n}\r\n\r\n/** Smaller than the button glyphs — it sits inside a 24px swatch, not a 32px button. */\r\nfunction PlusIcon() {\r\n return (\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n className=\"h-3 w-3\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2.5\"\r\n strokeLinecap=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"M5 12h14\" />\r\n <path d=\"M12 5v14\" />\r\n </svg>\r\n )\r\n}\r\n\r\n/** Traces lucide's `map-pin-plus`, the same icon the toolbar registration names. */\r\nfunction MarkerPlusIcon() {\r\n return (\r\n <Glyph>\r\n <path d=\"M19.914 11.105A7.298 7.298 0 0 0 20 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32 32 0 0 0 .824-.738\" />\r\n <circle cx=\"12\" cy=\"10\" r=\"3\" />\r\n <path d=\"M16 18h6\" />\r\n <path d=\"M19 15v6\" />\r\n </Glyph>\r\n )\r\n}\r\n\r\n/** The markers in the viewer sidebar, in the map and BIM viewers alike. */\r\nexport function MarkersTab() {\r\n const t = usePluginTranslations()\r\n const { map } = useMapViewer()\r\n const {\r\n markers, isLoading, lastError, selected,\r\n select, open, add, setColour, rename, remove,\r\n } = useMarkers()\r\n\r\n const addHere = async () => {\r\n if (!map) return\r\n const centre = map.getCenter()\r\n await add(centre.lat, centre.lng, map.getZoom())\r\n }\r\n\r\n /** Back to exactly the view the marker was recorded at, zoom included. */\r\n const flyTo = () => {\r\n if (!map || !selected) return\r\n\r\n map.flyTo({ center: [selected.longitude, selected.latitude], zoom: selected.zoom })\r\n open(selected.key)\r\n }\r\n\r\n if (isLoading && markers.length === 0) {\r\n return <p className=\"p-4 text-sm text-muted-foreground\">{t('loading', 'Loading…')}</p>\r\n }\r\n\r\n return (\r\n <div className=\"flex flex-col gap-3 p-4\">\r\n <Button\r\n size=\"sm\"\r\n variant=\"outline\"\r\n className=\"gap-2\"\r\n disabled={!map}\r\n onClick={() => { void addHere() }}\r\n >\r\n <MarkerPlusIcon />\r\n {t('addHere', 'Add a marker at the map centre')}\r\n </Button>\r\n\r\n {!map && (\r\n <p className=\"text-xs text-muted-foreground\">\r\n {t('mapOnly', 'Switch to the map to add a marker.')}\r\n </p>\r\n )}\r\n\r\n {lastError && (\r\n <p className=\"rounded-md bg-destructive/10 px-2 py-1 text-xs text-destructive\">\r\n {t('saveFailed', 'Could not save: ')}{lastError}\r\n </p>\r\n )}\r\n\r\n {markers.length === 0 ? (\r\n <p className=\"text-sm text-muted-foreground\">\r\n {t('empty', 'No markers yet. Record one from the map toolbar.')}\r\n </p>\r\n ) : (\r\n <ul className=\"flex flex-col gap-1\">\r\n {markers.map(marker => (\r\n <li key={marker.key}>\r\n <button\r\n type=\"button\"\r\n onClick={() => { select(marker.key); open(marker.key) }}\r\n className={`flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm ${\r\n selected?.key === marker.key ? 'bg-accent' : 'hover:bg-accent/50'\r\n }`}\r\n >\r\n <span\r\n aria-hidden=\"true\"\r\n className=\"inline-block h-3 w-3 shrink-0 rounded-full border border-white\"\r\n style={{ backgroundColor: marker.colour }}\r\n />\r\n <span className=\"flex-1 truncate\">{marker.name}</span>\r\n <span className=\"tabular-nums text-xs text-muted-foreground\">\r\n {marker.latitude.toFixed(2)}, {marker.longitude.toFixed(2)}\r\n </span>\r\n </button>\r\n </li>\r\n ))}\r\n </ul>\r\n )}\r\n\r\n {selected && (\r\n <>\r\n <Separator />\r\n\r\n <NameField\r\n key={selected.key}\r\n name={selected.name}\r\n label={t('nameLabel', 'Name')}\r\n saveLabel={t('saveName', 'Save name')}\r\n revertLabel={t('revertName', 'Discard the change')}\r\n onCommit={name => { void rename(selected.key, name) }}\r\n />\r\n\r\n <Button size=\"sm\" variant=\"outline\" disabled={!map} onClick={flyTo}>\r\n {t('flyTo', 'Fly to on the map')}\r\n </Button>\r\n\r\n <div className=\"flex flex-col gap-2\">\r\n <p className=\"text-xs font-medium\">{t('colour', 'Colour')}</p>\r\n\r\n <div className=\"flex flex-wrap items-center gap-1\">\r\n {MAP_COLOUR_PALETTE.slice(0, SWATCHES).map(colour => (\r\n <button\r\n key={colour}\r\n type=\"button\"\r\n aria-label={colour}\r\n aria-pressed={selected.colour === colour}\r\n onClick={() => { void setColour(selected.key, colour) }}\r\n className={`h-6 w-6 rounded-full border-2 ${\r\n selected.colour === colour ? 'border-foreground' : 'border-transparent'\r\n }`}\r\n style={{ backgroundColor: colour }}\r\n />\r\n ))}\r\n\r\n {/* Last in the row, set apart by a border and a margin: the palette is the\r\n default, not a limit. A plus rather than a swatch — a swatch of the current\r\n colour was indistinguishable from the presets beside it. The native input\r\n cannot be made round reliably across browsers, so it sits invisible on top. */}\r\n <label\r\n title={t('customColour', 'Pick any colour')}\r\n className=\"relative ml-1 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input bg-background text-muted-foreground hover:text-foreground\"\r\n >\r\n <PlusIcon />\r\n <input\r\n type=\"color\"\r\n value={selected.colour}\r\n onChange={event => { void setColour(selected.key, event.target.value) }}\r\n className=\"absolute inset-0 h-full w-full cursor-pointer opacity-0\"\r\n />\r\n <span className=\"sr-only\">{t('customColour', 'Pick any colour')}</span>\r\n </label>\r\n </div>\r\n </div>\r\n\r\n <Button\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n className=\"self-start\"\r\n onClick={() => { void remove(selected.key) }}\r\n >\r\n {t('delete', 'Delete')}\r\n </Button>\r\n </>\r\n )}\r\n </div>\r\n )\r\n}\r\n"],"mappings":";AA8CM,SAsLE,UAtLF,KAIA,YAJA;AAzCN,YAAY,WAAW;AAEvB,SAAS,0BAA0B;AACnC,SAAS,QAAQ,OAAO,iBAAiB;AACzC,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,kBAAkB;AAG3B,MAAM,WAAW;AAMjB,SAAS,UAAU;AAAA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AO,EAAE,gBAAgB,iBAAiB;AAAA,cAC1C,WAAU;AAAA,cAEV;AAAA,oCAAC,YAAS;AAAA,gBACV;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,OAAO,SAAS;AAAA,oBAChB,UAAU,WAAS;AAAE,2BAAK,UAAU,SAAS,KAAK,MAAM,OAAO,KAAK;AAAA,oBAAE;AAAA,oBACtE,WAAU;AAAA;AAAA,gBACZ;AAAA,gBACA,oBAAC,UAAK,WAAU,WAAW,YAAE,gBAAgB,iBAAiB,GAAE;AAAA;AAAA;AAAA,UAClE;AAAA,WACF;AAAA,SACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS,MAAM;AAAE,iBAAK,OAAO,SAAS,GAAG;AAAA,UAAE;AAAA,UAE1C,YAAE,UAAU,QAAQ;AAAA;AAAA,MACvB;AAAA,OACF;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { PluginContext } from '../sdk/types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* ESLint enforces the isolation rule — a plugin imports from `../sdk/*` and its own
|
|
7
|
-
* files, never the rest of core.
|
|
3
|
+
* Six surfaces over one store and one selection, in React subtrees with no common ancestor.
|
|
4
|
+
* Without that shared state this would be six unrelated widgets in one bundle.
|
|
8
5
|
*/
|
|
9
6
|
export declare function activate(ctx: PluginContext): void;
|
|
10
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/hello-map/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/hello-map/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgDjD"}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ViewerNames } from "../sdk/types";
|
|
2
|
+
import { MapTool } from "./components/MapTool";
|
|
3
|
+
import { MarkerDialog } from "./components/MarkerDialog";
|
|
4
|
+
import { MarkersLayer } from "./components/MarkersLayer";
|
|
5
|
+
import { useMarkersLegend } from "./components/MarkersLegend";
|
|
6
|
+
import { markerColumns, useMarkerRows } from "./components/MarkersPage";
|
|
7
|
+
import { MarkersTab } from "./components/MarkersTab";
|
|
2
8
|
function activate(ctx) {
|
|
3
9
|
ctx.register("map.tools", {
|
|
4
10
|
id: "hello-map",
|
|
5
11
|
label: "Hello Map",
|
|
6
|
-
icon: "
|
|
7
|
-
component:
|
|
12
|
+
icon: "MapPinPlus",
|
|
13
|
+
component: MapTool,
|
|
8
14
|
stayActive: true
|
|
9
15
|
});
|
|
16
|
+
ctx.register("map.layers", {
|
|
17
|
+
id: "markers",
|
|
18
|
+
component: MarkersLayer
|
|
19
|
+
});
|
|
20
|
+
ctx.register("viewer.legends", {
|
|
21
|
+
id: "markers",
|
|
22
|
+
title: "Markers",
|
|
23
|
+
// Map only: a list of map markers means nothing in BIM.
|
|
24
|
+
viewers: [ViewerNames.map],
|
|
25
|
+
useLegend: useMarkersLegend
|
|
26
|
+
});
|
|
27
|
+
ctx.register("viewer.tabs", {
|
|
28
|
+
id: "markers",
|
|
29
|
+
labelKey: "tabTitle",
|
|
30
|
+
icon: "MapPin",
|
|
31
|
+
// Recorded on the map, read in BIM; the point cloud has nothing to do with it.
|
|
32
|
+
viewers: [ViewerNames.map, ViewerNames.bim],
|
|
33
|
+
component: MarkersTab
|
|
34
|
+
});
|
|
35
|
+
ctx.register("data.pages", {
|
|
36
|
+
id: "markers",
|
|
37
|
+
titleKey: "pageTitle",
|
|
38
|
+
icon: "MapPinned",
|
|
39
|
+
useRows: useMarkerRows,
|
|
40
|
+
columns: markerColumns,
|
|
41
|
+
emptyKey: "empty",
|
|
42
|
+
searchKeys: ["name"]
|
|
43
|
+
});
|
|
44
|
+
ctx.register("ui.dialogs", {
|
|
45
|
+
id: "detail",
|
|
46
|
+
titleKey: "dialogTitle",
|
|
47
|
+
size: "md",
|
|
48
|
+
component: MarkerDialog
|
|
49
|
+
});
|
|
10
50
|
}
|
|
11
51
|
export {
|
|
12
52
|
activate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/core/plugins/hello-map/index.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/core/plugins/hello-map/index.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport { ViewerNames } from '../sdk/types'\r\n\r\nimport { MapTool } from './components/MapTool'\r\nimport { MarkerDialog } from './components/MarkerDialog'\r\nimport { MarkersLayer } from './components/MarkersLayer'\r\nimport { useMarkersLegend } from './components/MarkersLegend'\r\nimport { markerColumns, useMarkerRows } from './components/MarkersPage'\r\nimport { MarkersTab } from './components/MarkersTab'\r\n\r\nimport type { PluginContext } from '../sdk/types'\r\n\r\n/**\r\n * Six surfaces over one store and one selection, in React subtrees with no common ancestor.\r\n * Without that shared state this would be six unrelated widgets in one bundle.\r\n */\r\nexport function activate(ctx: PluginContext): void {\r\n ctx.register('map.tools', {\r\n id: 'hello-map',\r\n label: 'Hello Map',\r\n icon: 'MapPinPlus',\r\n component: MapTool,\r\n stayActive: true,\r\n })\r\n\r\n // Separate from the tool, whose panel unmounts when its dropdown closes.\r\n ctx.register('map.layers', {\r\n id: 'markers',\r\n component: MarkersLayer,\r\n })\r\n\r\n ctx.register('viewer.legends', {\r\n id: 'markers',\r\n title: 'Markers',\r\n // Map only: a list of map markers means nothing in BIM.\r\n viewers: [ViewerNames.map],\r\n useLegend: useMarkersLegend,\r\n })\r\n\r\n ctx.register('viewer.tabs', {\r\n id: 'markers',\r\n labelKey: 'tabTitle',\r\n icon: 'MapPin',\r\n // Recorded on the map, read in BIM; the point cloud has nothing to do with it.\r\n viewers: [ViewerNames.map, ViewerNames.bim],\r\n component: MarkersTab,\r\n })\r\n\r\n ctx.register('data.pages', {\r\n id: 'markers',\r\n titleKey: 'pageTitle',\r\n icon: 'MapPinned',\r\n useRows: useMarkerRows,\r\n columns: markerColumns,\r\n emptyKey: 'empty',\r\n searchKeys: ['name'],\r\n })\r\n\r\n ctx.register('ui.dialogs', {\r\n id: 'detail',\r\n titleKey: 'dialogTitle',\r\n size: 'md',\r\n component: MarkerDialog,\r\n })\r\n}\r\n"],"mappings":"AAGA,SAAS,mBAAmB;AAE5B,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,eAAe,qBAAqB;AAC7C,SAAS,kBAAkB;AAQpB,SAAS,SAAS,KAA0B;AACjD,MAAI,SAAS,aAAa;AAAA,IACxB,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,WAAW;AAAA,IACX,YAAY;AAAA,EACd,CAAC;AAGD,MAAI,SAAS,cAAc;AAAA,IACzB,IAAI;AAAA,IACJ,WAAW;AAAA,EACb,CAAC;AAED,MAAI,SAAS,kBAAkB;AAAA,IAC7B,IAAI;AAAA,IACJ,OAAO;AAAA;AAAA,IAEP,SAAS,CAAC,YAAY,GAAG;AAAA,IACzB,WAAW;AAAA,EACb,CAAC;AAED,MAAI,SAAS,eAAe;AAAA,IAC1B,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA;AAAA,IAEN,SAAS,CAAC,YAAY,KAAK,YAAY,GAAG;AAAA,IAC1C,WAAW;AAAA,EACb,CAAC;AAED,MAAI,SAAS,cAAc;AAAA,IACzB,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY,CAAC,MAAM;AAAA,EACrB,CAAC;AAED,MAAI,SAAS,cAAc;AAAA,IACzB,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,EACb,CAAC;AACH;","names":[]}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"slug": "hello-map",
|
|
3
3
|
"name": "Hello Map",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"hostApi": 1,
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Records markers on the map and shows them everywhere: a toolbar readout, a map layer, a legend, a viewer sidebar tab, a data page and a dialog.",
|
|
7
7
|
"author": "Collab Digital Twins",
|
|
8
|
-
"capabilities": [
|
|
8
|
+
"capabilities": [
|
|
9
|
+
"map.tools",
|
|
10
|
+
"map.layers",
|
|
11
|
+
"viewer.legends",
|
|
12
|
+
"viewer.tabs",
|
|
13
|
+
"data.pages",
|
|
14
|
+
"ui.dialogs"
|
|
15
|
+
],
|
|
9
16
|
"requiredPermissions": [],
|
|
10
17
|
"configSchema": {
|
|
11
18
|
"type": "object",
|
|
@@ -21,36 +28,102 @@
|
|
|
21
28
|
"messages": {
|
|
22
29
|
"en": {
|
|
23
30
|
"name": "Hello Map",
|
|
24
|
-
"description": "
|
|
31
|
+
"description": "Records markers on the map and shows them everywhere: a toolbar readout, a map layer, a legend, a viewer sidebar tab, a data page and a dialog.",
|
|
25
32
|
"title": "Hello Map",
|
|
26
33
|
"latitude": "Latitude",
|
|
27
34
|
"longitude": "Longitude",
|
|
28
35
|
"zoom": "Zoom",
|
|
29
36
|
"waiting": "Waiting for the map…",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
37
|
+
"record": "Record a marker here",
|
|
38
|
+
"recording": "Recording…",
|
|
39
|
+
"markerCount": "Markers: ",
|
|
40
|
+
"tabTitle": "Markers",
|
|
41
|
+
"pageTitle": "Markers",
|
|
42
|
+
"dialogTitle": "Marker",
|
|
43
|
+
"legendTitle": "Markers",
|
|
44
|
+
"loading": "Loading…",
|
|
45
|
+
"empty": "No markers yet. Record one from the map toolbar.",
|
|
46
|
+
"addHere": "Add a marker at the map centre",
|
|
47
|
+
"mapOnly": "Switch to the map to add a marker.",
|
|
48
|
+
"colour": "Colour",
|
|
49
|
+
"customColour": "Pick any colour",
|
|
50
|
+
"delete": "Delete",
|
|
51
|
+
"close": "Close",
|
|
52
|
+
"gone": "That marker no longer exists.",
|
|
53
|
+
"columnName": "Name",
|
|
54
|
+
"columnLatitude": "Latitude",
|
|
55
|
+
"columnLongitude": "Longitude",
|
|
56
|
+
"saveFailed": "Could not save: ",
|
|
57
|
+
"flyTo": "Fly to on the map",
|
|
58
|
+
"saveName": "Save name",
|
|
59
|
+
"revertName": "Discard the change",
|
|
60
|
+
"nameLabel": "Name"
|
|
32
61
|
},
|
|
33
62
|
"fr": {
|
|
34
63
|
"name": "Bonjour la carte",
|
|
35
|
-
"description": "
|
|
64
|
+
"description": "Enregistre des repères sur la carte et les affiche partout : un relevé dans la barre d'outils, une couche, une légende, un onglet de barre latérale, une page de données et une boîte de dialogue.",
|
|
36
65
|
"title": "Bonjour la carte",
|
|
37
66
|
"latitude": "Latitude",
|
|
38
67
|
"longitude": "Longitude",
|
|
39
68
|
"zoom": "Zoom",
|
|
40
69
|
"waiting": "En attente de la carte…",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
70
|
+
"record": "Enregistrer un repère ici",
|
|
71
|
+
"recording": "Enregistrement…",
|
|
72
|
+
"markerCount": "Repères : ",
|
|
73
|
+
"tabTitle": "Repères",
|
|
74
|
+
"pageTitle": "Repères",
|
|
75
|
+
"dialogTitle": "Repère",
|
|
76
|
+
"legendTitle": "Repères",
|
|
77
|
+
"loading": "Chargement…",
|
|
78
|
+
"empty": "Aucun repère. Enregistrez-en un depuis la barre d'outils de la carte.",
|
|
79
|
+
"addHere": "Ajouter un repère au centre de la carte",
|
|
80
|
+
"mapOnly": "Passez à la carte pour ajouter un repère.",
|
|
81
|
+
"colour": "Couleur",
|
|
82
|
+
"customColour": "Choisir une couleur libre",
|
|
83
|
+
"delete": "Supprimer",
|
|
84
|
+
"close": "Fermer",
|
|
85
|
+
"gone": "Ce repère n'existe plus.",
|
|
86
|
+
"columnName": "Nom",
|
|
87
|
+
"columnLatitude": "Latitude",
|
|
88
|
+
"columnLongitude": "Longitude",
|
|
89
|
+
"saveFailed": "Échec de l’enregistrement : ",
|
|
90
|
+
"flyTo": "Aller au repère sur la carte",
|
|
91
|
+
"saveName": "Enregistrer le nom",
|
|
92
|
+
"revertName": "Annuler la modification",
|
|
93
|
+
"nameLabel": "Nom"
|
|
43
94
|
},
|
|
44
95
|
"es": {
|
|
45
96
|
"name": "Hola mapa",
|
|
46
|
-
"description": "
|
|
97
|
+
"description": "Registra marcadores en el mapa y los muestra en todas partes: una lectura en la barra de herramientas, una capa, una leyenda, una pestaña de barra lateral, una página de datos y un diálogo.",
|
|
47
98
|
"title": "Hola mapa",
|
|
48
99
|
"latitude": "Latitud",
|
|
49
100
|
"longitude": "Longitud",
|
|
50
101
|
"zoom": "Zum",
|
|
51
102
|
"waiting": "Esperando el mapa…",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
103
|
+
"record": "Registrar un marcador aquí",
|
|
104
|
+
"recording": "Registrando…",
|
|
105
|
+
"markerCount": "Marcadores: ",
|
|
106
|
+
"tabTitle": "Marcadores",
|
|
107
|
+
"pageTitle": "Marcadores",
|
|
108
|
+
"dialogTitle": "Marcador",
|
|
109
|
+
"legendTitle": "Marcadores",
|
|
110
|
+
"loading": "Cargando…",
|
|
111
|
+
"empty": "Todavía no hay marcadores. Registre uno desde la barra de herramientas del mapa.",
|
|
112
|
+
"addHere": "Añadir un marcador en el centro del mapa",
|
|
113
|
+
"mapOnly": "Cambie al mapa para añadir un marcador.",
|
|
114
|
+
"colour": "Color",
|
|
115
|
+
"customColour": "Elegir cualquier color",
|
|
116
|
+
"delete": "Eliminar",
|
|
117
|
+
"close": "Cerrar",
|
|
118
|
+
"gone": "Ese marcador ya no existe.",
|
|
119
|
+
"columnName": "Nombre",
|
|
120
|
+
"columnLatitude": "Latitud",
|
|
121
|
+
"columnLongitude": "Longitud",
|
|
122
|
+
"saveFailed": "No se pudo guardar: ",
|
|
123
|
+
"flyTo": "Ir al marcador en el mapa",
|
|
124
|
+
"saveName": "Guardar el nombre",
|
|
125
|
+
"revertName": "Descartar el cambio",
|
|
126
|
+
"nameLabel": "Nombre"
|
|
54
127
|
}
|
|
55
128
|
}
|
|
56
129
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface MarkerData extends Record<string, unknown> {
|
|
2
|
+
name: string;
|
|
3
|
+
latitude: number;
|
|
4
|
+
longitude: number;
|
|
5
|
+
/** The zoom the marker was recorded at, so flying back restores the same view. */
|
|
6
|
+
zoom: number;
|
|
7
|
+
colour: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Marker extends MarkerData {
|
|
10
|
+
key: string;
|
|
11
|
+
}
|
|
12
|
+
/** Used when a record was written before `zoom` existed — `T` is a declaration, not a guarantee. */
|
|
13
|
+
export declare const DEFAULT_ZOOM = 15;
|
|
14
|
+
/**
|
|
15
|
+
* Everything every surface reads. Markers are records, so they survive a reload; the selection
|
|
16
|
+
* and the open popup are session state, so they do not belong in the database.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useMarkers(): {
|
|
19
|
+
markers: Marker[];
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
/** The last write that failed, or null. Shown by the tool and the tab. */
|
|
22
|
+
lastError: string;
|
|
23
|
+
selected: Marker;
|
|
24
|
+
openMarker: Marker;
|
|
25
|
+
select: (next: string | ((previous: string) => string)) => void;
|
|
26
|
+
open: (next: string | ((previous: string) => string)) => void;
|
|
27
|
+
add: (latitude: number, longitude: number, zoom: number) => Promise<string>;
|
|
28
|
+
setColour: (key: string, colour: string) => Promise<void>;
|
|
29
|
+
rename: (key: string, name: string) => Promise<void>;
|
|
30
|
+
remove: (key: string) => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=markers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/hello-map/markers.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,UAAW,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,oGAAoG;AACpG,eAAO,MAAM,YAAY,KAAK,CAAA;AAY9B;;;GAGG;AACH,wBAAgB,UAAU;;;IAmGtB,0EAA0E;;;;;;oBA3DzD,MAAM,aAAa,MAAM,QAAQ,MAAM;qBA8BlD,MAAM,UAAU,MAAM;kBAKhB,MAAM,QAAQ,MAAM;kBAWpB,MAAM;EAwBrB"}
|