@collabdt/core 0.13.1 → 0.13.2
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/viewers/map/MapViewer.d.ts.map +1 -1
- package/dist/core/components/viewers/map/MapViewer.js +0 -4
- package/dist/core/components/viewers/map/MapViewer.js.map +1 -1
- package/dist/core/components/viewers/map/datasets/DatasetDetails.d.ts.map +1 -1
- package/dist/core/components/viewers/map/datasets/DatasetDetails.js +6 -4
- package/dist/core/components/viewers/map/datasets/DatasetDetails.js.map +1 -1
- package/dist/core/components/viewers/map/datasets/DatasetManager/index.d.ts.map +1 -1
- package/dist/core/components/viewers/map/datasets/DatasetManager/index.js +100 -53
- package/dist/core/components/viewers/map/datasets/DatasetManager/index.js.map +1 -1
- package/dist/core/components/viewers/map/datasets/DatasetManager/src/WmsDatasetControls.d.ts +8 -0
- package/dist/core/components/viewers/map/datasets/DatasetManager/src/WmsDatasetControls.d.ts.map +1 -0
- package/dist/core/components/viewers/map/datasets/DatasetManager/src/WmsDatasetControls.js +45 -0
- package/dist/core/components/viewers/map/datasets/DatasetManager/src/WmsDatasetControls.js.map +1 -0
- package/dist/core/components/viewers/map/datasets/index.d.ts.map +1 -1
- package/dist/core/components/viewers/map/datasets/index.js +4 -4
- package/dist/core/components/viewers/map/datasets/index.js.map +1 -1
- package/dist/core/components/viewers/map/datasets/src/wmsActiveTime.d.ts +5 -0
- package/dist/core/components/viewers/map/datasets/src/wmsActiveTime.d.ts.map +1 -0
- package/dist/core/components/viewers/map/datasets/src/wmsActiveTime.js +33 -0
- package/dist/core/components/viewers/map/datasets/src/wmsActiveTime.js.map +1 -0
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/WmsTimeControl.d.ts +5 -4
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/WmsTimeControl.d.ts.map +1 -1
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/WmsTimeControl.js +55 -76
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/WmsTimeControl.js.map +1 -1
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/index.d.ts.map +1 -1
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/index.js +7 -43
- package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/index.js.map +1 -1
- package/dist/core/components/viewers/map/src/MapSidebar/src/LayersTab/index.d.ts.map +1 -1
- package/dist/core/components/viewers/map/src/MapSidebar/src/LayersTab/index.js +9 -4
- package/dist/core/components/viewers/map/src/MapSidebar/src/LayersTab/index.js.map +1 -1
- package/dist/core/components/viewers/shared/legends/PluginLegendSection.d.ts +16 -0
- package/dist/core/components/viewers/shared/legends/PluginLegendSection.d.ts.map +1 -0
- package/dist/core/components/viewers/shared/legends/PluginLegendSection.js +86 -0
- package/dist/core/components/viewers/shared/legends/PluginLegendSection.js.map +1 -0
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.d.ts +1 -1
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.d.ts.map +1 -1
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.js +10 -82
- package/dist/core/components/viewers/shared/legends/ViewerLegendHost.js.map +1 -1
- package/dist/core/components/viewers/shared/legends/usePluginLegends.d.ts +13 -0
- package/dist/core/components/viewers/shared/legends/usePluginLegends.d.ts.map +1 -0
- package/dist/core/components/viewers/shared/legends/usePluginLegends.js +57 -0
- package/dist/core/components/viewers/shared/legends/usePluginLegends.js.map +1 -0
- package/dist/core/i18n/messages/en.json +2 -1
- package/dist/core/i18n/messages/es.json +2 -1
- package/dist/core/i18n/messages/fr.json +2 -1
- package/dist/core/plugins/host/pluginDatasetId.d.ts +3 -0
- package/dist/core/plugins/host/pluginDatasetId.d.ts.map +1 -0
- package/dist/core/plugins/host/pluginDatasetId.js +7 -0
- package/dist/core/plugins/host/pluginDatasetId.js.map +1 -0
- package/dist/core/plugins/host/pluginDatasets.d.ts +12 -0
- package/dist/core/plugins/host/pluginDatasets.d.ts.map +1 -0
- package/dist/core/plugins/host/pluginDatasets.js +81 -0
- package/dist/core/plugins/host/pluginDatasets.js.map +1 -0
- package/dist/core/plugins/host/runtimeShims.d.ts.map +1 -1
- package/dist/core/plugins/host/runtimeShims.js +2 -1
- package/dist/core/plugins/host/runtimeShims.js.map +1 -1
- package/dist/core/plugins/sdk/data.d.ts +2 -0
- package/dist/core/plugins/sdk/data.d.ts.map +1 -1
- package/dist/core/plugins/sdk/data.js +2 -0
- package/dist/core/plugins/sdk/data.js.map +1 -1
- package/dist/core/plugins/sdk/datasets.d.ts +12 -0
- package/dist/core/plugins/sdk/datasets.d.ts.map +1 -0
- package/dist/core/plugins/sdk/datasets.js +20 -0
- package/dist/core/plugins/sdk/datasets.js.map +1 -0
- package/dist/core/plugins/sdk/types.d.ts +47 -1
- package/dist/core/plugins/sdk/types.d.ts.map +1 -1
- package/dist/core/plugins/sdk/types.js +2 -1
- package/dist/core/plugins/sdk/types.js.map +1 -1
- package/dist/core/types/datasetTypes.d.ts +1 -0
- package/dist/core/types/datasetTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/core/components/viewers/map/datasets/src/builtinLiveDatasets.d.ts +0 -4
- package/dist/core/components/viewers/map/datasets/src/builtinLiveDatasets.d.ts.map +0 -1
- package/dist/core/components/viewers/map/datasets/src/builtinLiveDatasets.js +0 -43
- package/dist/core/components/viewers/map/datasets/src/builtinLiveDatasets.js.map +0 -1
|
@@ -8,7 +8,7 @@ import type { ViewerNames } from '../../types/dbTypes';
|
|
|
8
8
|
*/
|
|
9
9
|
export type PluginViewerTarget = `${ViewerNames.map | ViewerNames.bim}`;
|
|
10
10
|
import type { LucideProps } from 'lucide-react';
|
|
11
|
-
export declare const VALID_CAPABILITIES: readonly ["data.pages", "viewer.tabs", "ui.dialogs", "map.tools", "bim.tools", "viewer.legends", "map.layers"];
|
|
11
|
+
export declare const VALID_CAPABILITIES: readonly ["data.pages", "viewer.tabs", "ui.dialogs", "map.tools", "bim.tools", "viewer.legends", "map.layers", "map.datasets"];
|
|
12
12
|
export type PluginCapability = typeof VALID_CAPABILITIES[number];
|
|
13
13
|
export interface PluginManifest {
|
|
14
14
|
slug: string;
|
|
@@ -105,21 +105,66 @@ export interface MapLayerRegistration {
|
|
|
105
105
|
id: string;
|
|
106
106
|
component: React.ComponentType<MapToolProps>;
|
|
107
107
|
}
|
|
108
|
+
/** The least of a GeoJSON FeatureCollection core needs, so a typed `geojson` one satisfies it. */
|
|
109
|
+
export interface PluginFeatureCollection {
|
|
110
|
+
type: 'FeatureCollection';
|
|
111
|
+
features: Array<{
|
|
112
|
+
type: 'Feature';
|
|
113
|
+
id?: string | number;
|
|
114
|
+
geometry: {
|
|
115
|
+
type: string;
|
|
116
|
+
coordinates?: unknown;
|
|
117
|
+
geometries?: unknown;
|
|
118
|
+
} | null;
|
|
119
|
+
properties: Record<string, unknown> | null;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
/** How core draws a plugin dataset. Absent, the plugin draws it from its own `map.layers`. */
|
|
123
|
+
export type PluginDatasetSource = {
|
|
124
|
+
type: 'wms';
|
|
125
|
+
baseUrl: string;
|
|
126
|
+
layers: string;
|
|
127
|
+
timeEnabled?: boolean;
|
|
128
|
+
} | {
|
|
129
|
+
type: 'geojson';
|
|
130
|
+
getFeatures: () => Promise<PluginFeatureCollection>;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* A dataset listed in the Datasets menu: under Live Data when `live`, otherwise under
|
|
134
|
+
* Organizational. Applying it is the user's choice; `usePluginDataset(id)` reports it.
|
|
135
|
+
*/
|
|
136
|
+
export interface DatasetRegistration {
|
|
137
|
+
id: string;
|
|
138
|
+
name: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
publisher?: string;
|
|
141
|
+
/** A link to the dataset's documentation, shown in its details. */
|
|
142
|
+
information?: string;
|
|
143
|
+
live?: boolean;
|
|
144
|
+
source?: PluginDatasetSource;
|
|
145
|
+
}
|
|
108
146
|
export interface LegendRow {
|
|
109
147
|
label: string;
|
|
110
148
|
color: string;
|
|
111
149
|
count?: number;
|
|
150
|
+
/** With `onVisibleChange`, the row gets a switch; false dims it. */
|
|
151
|
+
visible?: boolean;
|
|
152
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
112
153
|
}
|
|
113
154
|
export interface LegendRegistration {
|
|
114
155
|
id: string;
|
|
115
156
|
title: string;
|
|
116
157
|
/** Which viewers this legend appears in. Omit for all of them. */
|
|
117
158
|
viewers?: Array<PluginViewerTarget | ViewerNames>;
|
|
159
|
+
/** A `map.datasets` id of the same plugin: the map nests this legend under that applied dataset. */
|
|
160
|
+
dataset?: string;
|
|
118
161
|
useLegend: () => {
|
|
119
162
|
active: boolean;
|
|
120
163
|
title?: string;
|
|
121
164
|
unavailable?: boolean;
|
|
122
165
|
rows: LegendRow[];
|
|
166
|
+
/** The plugin's own inputs under the rows, such as a date slider filtering what is drawn. */
|
|
167
|
+
controls?: React.ReactNode;
|
|
123
168
|
};
|
|
124
169
|
}
|
|
125
170
|
export interface CapabilityRegistry {
|
|
@@ -130,6 +175,7 @@ export interface CapabilityRegistry {
|
|
|
130
175
|
'bim.tools': ToolbarRegistration<BimToolProps>;
|
|
131
176
|
'viewer.legends': LegendRegistration;
|
|
132
177
|
'map.layers': MapLayerRegistration;
|
|
178
|
+
'map.datasets': DatasetRegistration;
|
|
133
179
|
}
|
|
134
180
|
export interface PluginContext {
|
|
135
181
|
pluginId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/sdk/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,KAAK,EAA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AAO,CAAC,WAAW,CAAC,CAAC,CAAA;CAClD;AAED,kEAAkE;AAClE,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,GAC3B,OAAO,CAAC,WAAW,CAAC,CAEtB;AAED,sFAAsF;AACtF,MAAM,MAAM,YAAY,GAAG,YAAY,EAAE,GAAG,CAAC,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/core/plugins/sdk/types.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n// Copyright (C) 2025 Collab Digital Twins\n\n// Type-only: keeps the viewer modules' runtime deps (@thatopen, three, maplibre)\n// out of the host's module graph.\nimport type { BimToolProps } from './bimViewer'\nimport type { MapToolProps } from './mapViewer'\n// A value, not just a type: a `viewer.tabs` contribution names the viewers it belongs in.\nexport { ViewerNames } from '../../types/dbTypes'\n\nimport type { ViewerNames } from '../../types/dbTypes'\n\n/**\n * The viewers that can host a tab or a legend, spelled as plain strings. Derived from\n * `ViewerNames` so the two cannot drift, and the form `@collabdt/plugin-kit` publishes.\n */\nexport type PluginViewerTarget = `${ViewerNames.map | ViewerNames.bim}`\nimport type { LucideProps } from 'lucide-react'\n\n// --- Capability definitions ---\n\n// Only capabilities core actually renders. One with no consumer registers fine,\n// shows nothing, and leaves nothing to debug.\nexport const VALID_CAPABILITIES = [\n 'data.pages',\n 'viewer.tabs',\n 'ui.dialogs',\n 'map.tools',\n 'bim.tools',\n 'viewer.legends',\n 'map.layers',\n] as const\n\nexport type PluginCapability = typeof VALID_CAPABILITIES[number]\n\n// --- Manifest ---\n\nexport interface PluginManifest {\n slug: string\n name: string\n version: string\n /** The `PLUGIN_HOST_API` this plugin was built against. Omitted is warned about, not rejected. */\n hostApi?: number\n description?: string\n author?: string\n /** A lucide icon name shown beside the plugin's name. Unset or unknown shows a puzzle piece. */\n icon?: string\n capabilities: PluginCapability[]\n requiredPermissions?: string[]\n configSchema?: Record<string, unknown>\n /**\n * Strings keyed by locale then message key, e.g. `{ en: { title: 'Hello' } }`.\n * Core folds them under `plugins.<slug>`, so `t('title')` resolves and no plugin\n * can collide with another. Values may nest, addressed as `t('spaces.title')`.\n */\n messages?: Record<string, Record<string, unknown>>\n}\n\nexport function validateManifest(manifest: unknown): { valid: boolean; errors: string[] } {\n const errors: string[] = []\n\n if (typeof manifest !== 'object' || manifest === null) {\n return { valid: false, errors: ['manifest must be an object'] }\n }\n\n const m = manifest as Record<string, unknown>\n\n if (!m.slug || typeof m.slug !== 'string') errors.push('slug is required')\n if (!m.name || typeof m.name !== 'string') errors.push('name is required')\n if (!m.version || typeof m.version !== 'string') errors.push('version is required')\n\n if (m.hostApi !== undefined && !Number.isInteger(m.hostApi)) {\n errors.push('hostApi must be an integer when present')\n }\n\n if (!Array.isArray(m.capabilities) || m.capabilities.length === 0) {\n errors.push('at least one capability is required')\n } else {\n for (const cap of m.capabilities) {\n if (!VALID_CAPABILITIES.includes(cap as PluginCapability)) {\n errors.push(`invalid capability: \"${cap}\"`)\n }\n }\n }\n\n return { valid: errors.length === 0, errors }\n}\n\n// --- Registration shapes (one per capability) ---\n\nexport interface DataPageColumn<Row> {\n key: string\n /** Resolved in the plugin's own namespace, falling back to the literal string. */\n labelKey: string\n render?: (row: Row) => React.ReactNode\n}\n\n/**\n * A full page in the Datasets nav, rendered by core. The plugin declares rows and columns; a\n * row click opens one of its own `ui.dialogs` rather than a detail view of its own.\n */\nexport interface DataPageRows<Row> {\n rows: Row[]\n isLoading?: boolean\n /** From the hook, not the registration, so it can close over `usePluginDialogs`. */\n onRowClick?: (row: Row) => void\n}\n\nexport interface DataPageRegistration<Row = Record<string, unknown>> {\n id: string\n titleKey: string\n icon: string | React.ComponentType<LucideProps>\n useRows: () => DataPageRows<Row>\n columns: DataPageColumn<Row>[]\n /** Column keys the search box filters on. Omit to search every column. */\n searchKeys?: string[]\n emptyKey?: string\n}\n\n/** Every toolbar component receives the toolbar entry core built for it. */\nexport interface ToolbarToolProps {\n tool: unknown\n}\n\n/**\n * A toolbar contribution. `P` is the viewer surface the hosting toolbar passes as\n * props, bound per capability by `CapabilityRegistry` — so a BIM component\n * registered under `map.tools` is a compile error.\n */\nexport interface ToolbarRegistration<P = Record<string, unknown>> {\n id: string\n label: string\n icon: string | React.ComponentType<LucideProps>\n component: React.ComponentType<ToolbarToolProps & P>\n cursor?: string\n stayActive?: boolean\n}\n\nexport interface ViewerTabRegistration {\n id: string\n labelKey: string\n icon: string | React.ComponentType<LucideProps>\n component: React.ComponentType\n /** Which viewers this tab appears in. Omit for all of them. */\n viewers?: Array<PluginViewerTarget | ViewerNames>\n}\n\n/**\n * A modal core owns. Registered here, opened by id from any of the plugin's surfaces via\n * `usePluginDialogs()`, so it outlives whichever one opened it.\n */\nexport interface DialogRegistration<P = Record<string, unknown>> {\n id: string\n titleKey: string\n size?: 'sm' | 'md' | 'lg' | 'xl'\n component: React.ComponentType<P & { close: () => void }>\n}\n\n/**\n * Something drawn on the map, mounted for as long as the map. Separate from `map.tools`,\n * whose panel unmounts when its dropdown closes and would take the layer with it.\n */\nexport interface MapLayerRegistration {\n id: string\n component: React.ComponentType<MapToolProps>\n}\n\nexport interface LegendRow {\n label: string\n color: string\n count?: number\n}\n\nexport interface LegendRegistration {\n id: string\n title: string\n /** Which viewers this legend appears in. Omit for all of them. */\n viewers?: Array<PluginViewerTarget | ViewerNames>\n // Called by <MapLegendHost> on each render; active:false omits the section.\n useLegend: () => {\n active: boolean\n // Overrides registration.title when set, e.g. a city-scoped label.\n title?: string\n unavailable?: boolean\n rows: LegendRow[]\n }\n}\n\n// --- Capability → registration type map ---\n// A new contribution point needs one entry here, its type above, and a consumer\n// calling `registry.getAll('your.key')`. No host changes.\n\nexport interface CapabilityRegistry {\n 'data.pages': DataPageRegistration\n 'viewer.tabs': ViewerTabRegistration\n 'ui.dialogs': DialogRegistration\n 'map.tools': ToolbarRegistration<MapToolProps>\n 'bim.tools': ToolbarRegistration<BimToolProps>\n 'viewer.legends': LegendRegistration\n 'map.layers': MapLayerRegistration\n}\n\n// Errors if VALID_CAPABILITIES and keyof CapabilityRegistry drift apart.\ntype _CapabilityParity =\n PluginCapability extends keyof CapabilityRegistry\n ? keyof CapabilityRegistry extends PluginCapability\n ? true\n : never\n : never\nconst _capabilityParity: _CapabilityParity = true\nvoid _capabilityParity\n\n// --- Plugin Context ---\n\nexport interface PluginContext {\n pluginId: string\n register<K extends keyof CapabilityRegistry>(key: K, item: CapabilityRegistry[K]): void\n config: Record<string, unknown>\n}\n\n// --- Plugin entry point type ---\n\nexport interface PluginEntry {\n // `any`: each plugin binds only the slots it uses, so no one context type fits them all.\n activate(ctx: any): void | Promise<void>\n deactivate?(ctx: any): void | Promise<void>\n}\n\n/**\n * One loadable plugin: its manifest plus its module, or a thunk returning it.\n * Prefer the thunk when compiled in — a static import pulls the plugin's\n * components into every route that reaches `installed.ts`.\n */\nexport interface PluginSource {\n manifest: PluginManifest\n entry: PluginEntry | (() => Promise<PluginEntry>)\n}\n\n/** Resolves either form of `PluginSource.entry` to the module. */\nexport async function resolvePluginEntry(\n entry: PluginSource['entry'],\n): Promise<PluginEntry> {\n return typeof entry === 'function' ? entry() : entry\n}\n\n/** An array for compiled-in plugins; a thunk when the list itself must be fetched. */\nexport type PluginsInput = PluginSource[] | (() => Promise<PluginSource[]>)\n"],"mappings":"AAQA,SAAS,mBAAmB;AAerB,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA2BO,SAAS,iBAAiB,UAAyD;AACxF,QAAM,SAAmB,CAAC;AAE1B,MAAI,OAAO,aAAa,YAAY,aAAa,MAAM;AACrD,WAAO,EAAE,OAAO,OAAO,QAAQ,CAAC,4BAA4B,EAAE;AAAA,EAChE;AAEA,QAAM,IAAI;AAEV,MAAI,CAAC,EAAE,QAAQ,OAAO,EAAE,SAAS,SAAU,QAAO,KAAK,kBAAkB;AACzE,MAAI,CAAC,EAAE,QAAQ,OAAO,EAAE,SAAS,SAAU,QAAO,KAAK,kBAAkB;AACzE,MAAI,CAAC,EAAE,WAAW,OAAO,EAAE,YAAY,SAAU,QAAO,KAAK,qBAAqB;AAElF,MAAI,EAAE,YAAY,UAAa,CAAC,OAAO,UAAU,EAAE,OAAO,GAAG;AAC3D,WAAO,KAAK,yCAAyC;AAAA,EACvD;AAEA,MAAI,CAAC,MAAM,QAAQ,EAAE,YAAY,KAAK,EAAE,aAAa,WAAW,GAAG;AACjE,WAAO,KAAK,qCAAqC;AAAA,EACnD,OAAO;AACL,eAAW,OAAO,EAAE,cAAc;AAChC,UAAI,CAAC,mBAAmB,SAAS,GAAuB,GAAG;AACzD,eAAO,KAAK,wBAAwB,GAAG,GAAG;AAAA,MAC5C;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,OAAO,OAAO,WAAW,GAAG,OAAO;AAC9C;AA2HA,MAAM,oBAAuC;AAC7C,KAAK;AA6BL,eAAsB,mBACpB,OACsB;AACtB,SAAO,OAAO,UAAU,aAAa,MAAM,IAAI;AACjD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/core/plugins/sdk/types.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n// Copyright (C) 2025 Collab Digital Twins\n\n// Type-only: keeps the viewer modules' runtime deps (@thatopen, three, maplibre)\n// out of the host's module graph.\nimport type { BimToolProps } from './bimViewer'\nimport type { MapToolProps } from './mapViewer'\n// A value, not just a type: a `viewer.tabs` contribution names the viewers it belongs in.\nexport { ViewerNames } from '../../types/dbTypes'\n\nimport type { ViewerNames } from '../../types/dbTypes'\n\n/**\n * The viewers that can host a tab or a legend, spelled as plain strings. Derived from\n * `ViewerNames` so the two cannot drift, and the form `@collabdt/plugin-kit` publishes.\n */\nexport type PluginViewerTarget = `${ViewerNames.map | ViewerNames.bim}`\nimport type { LucideProps } from 'lucide-react'\n\n// --- Capability definitions ---\n\n// Only capabilities core actually renders. One with no consumer registers fine,\n// shows nothing, and leaves nothing to debug.\nexport const VALID_CAPABILITIES = [\n 'data.pages',\n 'viewer.tabs',\n 'ui.dialogs',\n 'map.tools',\n 'bim.tools',\n 'viewer.legends',\n 'map.layers',\n 'map.datasets',\n] as const\n\nexport type PluginCapability = typeof VALID_CAPABILITIES[number]\n\n// --- Manifest ---\n\nexport interface PluginManifest {\n slug: string\n name: string\n version: string\n /** The `PLUGIN_HOST_API` this plugin was built against. Omitted is warned about, not rejected. */\n hostApi?: number\n description?: string\n author?: string\n /** A lucide icon name shown beside the plugin's name. Unset or unknown shows a puzzle piece. */\n icon?: string\n capabilities: PluginCapability[]\n requiredPermissions?: string[]\n configSchema?: Record<string, unknown>\n /**\n * Strings keyed by locale then message key, e.g. `{ en: { title: 'Hello' } }`.\n * Core folds them under `plugins.<slug>`, so `t('title')` resolves and no plugin\n * can collide with another. Values may nest, addressed as `t('spaces.title')`.\n */\n messages?: Record<string, Record<string, unknown>>\n}\n\nexport function validateManifest(manifest: unknown): { valid: boolean; errors: string[] } {\n const errors: string[] = []\n\n if (typeof manifest !== 'object' || manifest === null) {\n return { valid: false, errors: ['manifest must be an object'] }\n }\n\n const m = manifest as Record<string, unknown>\n\n if (!m.slug || typeof m.slug !== 'string') errors.push('slug is required')\n if (!m.name || typeof m.name !== 'string') errors.push('name is required')\n if (!m.version || typeof m.version !== 'string') errors.push('version is required')\n\n if (m.hostApi !== undefined && !Number.isInteger(m.hostApi)) {\n errors.push('hostApi must be an integer when present')\n }\n\n if (!Array.isArray(m.capabilities) || m.capabilities.length === 0) {\n errors.push('at least one capability is required')\n } else {\n for (const cap of m.capabilities) {\n if (!VALID_CAPABILITIES.includes(cap as PluginCapability)) {\n errors.push(`invalid capability: \"${cap}\"`)\n }\n }\n }\n\n return { valid: errors.length === 0, errors }\n}\n\n// --- Registration shapes (one per capability) ---\n\nexport interface DataPageColumn<Row> {\n key: string\n /** Resolved in the plugin's own namespace, falling back to the literal string. */\n labelKey: string\n render?: (row: Row) => React.ReactNode\n}\n\n/**\n * A full page in the Datasets nav, rendered by core. The plugin declares rows and columns; a\n * row click opens one of its own `ui.dialogs` rather than a detail view of its own.\n */\nexport interface DataPageRows<Row> {\n rows: Row[]\n isLoading?: boolean\n /** From the hook, not the registration, so it can close over `usePluginDialogs`. */\n onRowClick?: (row: Row) => void\n}\n\nexport interface DataPageRegistration<Row = Record<string, unknown>> {\n id: string\n titleKey: string\n icon: string | React.ComponentType<LucideProps>\n useRows: () => DataPageRows<Row>\n columns: DataPageColumn<Row>[]\n /** Column keys the search box filters on. Omit to search every column. */\n searchKeys?: string[]\n emptyKey?: string\n}\n\n/** Every toolbar component receives the toolbar entry core built for it. */\nexport interface ToolbarToolProps {\n tool: unknown\n}\n\n/**\n * A toolbar contribution. `P` is the viewer surface the hosting toolbar passes as\n * props, bound per capability by `CapabilityRegistry` — so a BIM component\n * registered under `map.tools` is a compile error.\n */\nexport interface ToolbarRegistration<P = Record<string, unknown>> {\n id: string\n label: string\n icon: string | React.ComponentType<LucideProps>\n component: React.ComponentType<ToolbarToolProps & P>\n cursor?: string\n stayActive?: boolean\n}\n\nexport interface ViewerTabRegistration {\n id: string\n labelKey: string\n icon: string | React.ComponentType<LucideProps>\n component: React.ComponentType\n /** Which viewers this tab appears in. Omit for all of them. */\n viewers?: Array<PluginViewerTarget | ViewerNames>\n}\n\n/**\n * A modal core owns. Registered here, opened by id from any of the plugin's surfaces via\n * `usePluginDialogs()`, so it outlives whichever one opened it.\n */\nexport interface DialogRegistration<P = Record<string, unknown>> {\n id: string\n titleKey: string\n size?: 'sm' | 'md' | 'lg' | 'xl'\n component: React.ComponentType<P & { close: () => void }>\n}\n\n/**\n * Something drawn on the map, mounted for as long as the map. Separate from `map.tools`,\n * whose panel unmounts when its dropdown closes and would take the layer with it.\n */\nexport interface MapLayerRegistration {\n id: string\n component: React.ComponentType<MapToolProps>\n}\n\n/** The least of a GeoJSON FeatureCollection core needs, so a typed `geojson` one satisfies it. */\nexport interface PluginFeatureCollection {\n type: 'FeatureCollection'\n features: Array<{\n type: 'Feature'\n id?: string | number\n geometry: { type: string; coordinates?: unknown; geometries?: unknown } | null\n properties: Record<string, unknown> | null\n }>\n}\n\n/** How core draws a plugin dataset. Absent, the plugin draws it from its own `map.layers`. */\nexport type PluginDatasetSource =\n | { type: 'wms'; baseUrl: string; layers: string; timeEnabled?: boolean }\n | { type: 'geojson'; getFeatures: () => Promise<PluginFeatureCollection> }\n\n/**\n * A dataset listed in the Datasets menu: under Live Data when `live`, otherwise under\n * Organizational. Applying it is the user's choice; `usePluginDataset(id)` reports it.\n */\nexport interface DatasetRegistration {\n id: string\n name: string\n description?: string\n publisher?: string\n /** A link to the dataset's documentation, shown in its details. */\n information?: string\n live?: boolean\n source?: PluginDatasetSource\n}\n\nexport interface LegendRow {\n label: string\n color: string\n count?: number\n /** With `onVisibleChange`, the row gets a switch; false dims it. */\n visible?: boolean\n onVisibleChange?: (visible: boolean) => void\n}\n\nexport interface LegendRegistration {\n id: string\n title: string\n /** Which viewers this legend appears in. Omit for all of them. */\n viewers?: Array<PluginViewerTarget | ViewerNames>\n /** A `map.datasets` id of the same plugin: the map nests this legend under that applied dataset. */\n dataset?: string\n // Called by the legend host on each render; active:false omits the section.\n useLegend: () => {\n active: boolean\n // Overrides registration.title when set, e.g. a city-scoped label.\n title?: string\n unavailable?: boolean\n rows: LegendRow[]\n /** The plugin's own inputs under the rows, such as a date slider filtering what is drawn. */\n controls?: React.ReactNode\n }\n}\n\n// --- Capability → registration type map ---\n// A new contribution point needs one entry here, its type above, and a consumer\n// calling `registry.getAll('your.key')`. No host changes.\n\nexport interface CapabilityRegistry {\n 'data.pages': DataPageRegistration\n 'viewer.tabs': ViewerTabRegistration\n 'ui.dialogs': DialogRegistration\n 'map.tools': ToolbarRegistration<MapToolProps>\n 'bim.tools': ToolbarRegistration<BimToolProps>\n 'viewer.legends': LegendRegistration\n 'map.layers': MapLayerRegistration\n 'map.datasets': DatasetRegistration\n}\n\n// Errors if VALID_CAPABILITIES and keyof CapabilityRegistry drift apart.\ntype _CapabilityParity =\n PluginCapability extends keyof CapabilityRegistry\n ? keyof CapabilityRegistry extends PluginCapability\n ? true\n : never\n : never\nconst _capabilityParity: _CapabilityParity = true\nvoid _capabilityParity\n\n// --- Plugin Context ---\n\nexport interface PluginContext {\n pluginId: string\n register<K extends keyof CapabilityRegistry>(key: K, item: CapabilityRegistry[K]): void\n config: Record<string, unknown>\n}\n\n// --- Plugin entry point type ---\n\nexport interface PluginEntry {\n // `any`: each plugin binds only the slots it uses, so no one context type fits them all.\n activate(ctx: any): void | Promise<void>\n deactivate?(ctx: any): void | Promise<void>\n}\n\n/**\n * One loadable plugin: its manifest plus its module, or a thunk returning it.\n * Prefer the thunk when compiled in — a static import pulls the plugin's\n * components into every route that reaches `installed.ts`.\n */\nexport interface PluginSource {\n manifest: PluginManifest\n entry: PluginEntry | (() => Promise<PluginEntry>)\n}\n\n/** Resolves either form of `PluginSource.entry` to the module. */\nexport async function resolvePluginEntry(\n entry: PluginSource['entry'],\n): Promise<PluginEntry> {\n return typeof entry === 'function' ? entry() : entry\n}\n\n/** An array for compiled-in plugins; a thunk when the list itself must be fetched. */\nexport type PluginsInput = PluginSource[] | (() => Promise<PluginSource[]>)\n"],"mappings":"AAQA,SAAS,mBAAmB;AAerB,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA2BO,SAAS,iBAAiB,UAAyD;AACxF,QAAM,SAAmB,CAAC;AAE1B,MAAI,OAAO,aAAa,YAAY,aAAa,MAAM;AACrD,WAAO,EAAE,OAAO,OAAO,QAAQ,CAAC,4BAA4B,EAAE;AAAA,EAChE;AAEA,QAAM,IAAI;AAEV,MAAI,CAAC,EAAE,QAAQ,OAAO,EAAE,SAAS,SAAU,QAAO,KAAK,kBAAkB;AACzE,MAAI,CAAC,EAAE,QAAQ,OAAO,EAAE,SAAS,SAAU,QAAO,KAAK,kBAAkB;AACzE,MAAI,CAAC,EAAE,WAAW,OAAO,EAAE,YAAY,SAAU,QAAO,KAAK,qBAAqB;AAElF,MAAI,EAAE,YAAY,UAAa,CAAC,OAAO,UAAU,EAAE,OAAO,GAAG;AAC3D,WAAO,KAAK,yCAAyC;AAAA,EACvD;AAEA,MAAI,CAAC,MAAM,QAAQ,EAAE,YAAY,KAAK,EAAE,aAAa,WAAW,GAAG;AACjE,WAAO,KAAK,qCAAqC;AAAA,EACnD,OAAO;AACL,eAAW,OAAO,EAAE,cAAc;AAChC,UAAI,CAAC,mBAAmB,SAAS,GAAuB,GAAG;AACzD,eAAO,KAAK,wBAAwB,GAAG,GAAG;AAAA,MAC5C;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,OAAO,OAAO,WAAW,GAAG,OAAO;AAC9C;AAkKA,MAAM,oBAAuC;AAC7C,KAAK;AA6BL,eAAsB,mBACpB,OACsB;AACtB,SAAO,OAAO,UAAU,aAAa,MAAM,IAAI;AACjD;","names":[]}
|
|
@@ -91,6 +91,7 @@ export interface Dataset {
|
|
|
91
91
|
layers: string;
|
|
92
92
|
};
|
|
93
93
|
viewport?: DatasetViewport;
|
|
94
|
+
drawnByPlugin?: string;
|
|
94
95
|
}
|
|
95
96
|
/** Marks a dataset too large to load whole: features are fetched per map view, and only at or above `minZoom`. */
|
|
96
97
|
export interface DatasetViewport {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasetTypes.d.ts","sourceRoot":"","sources":["../../../src/core/types/datasetTypes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAI,MAAM,WAAW,CAAA;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,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EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,WAAW,EAAE,WAAW,EAAE,CAAA;IAC1B,wBAAwB,EAAE,wBAAwB,EAAE,CAAA;CACrD;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,EAAE,KAAK,CAAA;CACb;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,QAAQ,CAAA;IACX,UAAU,EAAE,UAAU,EAAE,CAAA;IACxB,OAAO,EAAE,OAAO,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;IACd,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,eAAe,EAAE,eAAe,CAAA;IAChC,UAAU,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,SAAU,SAAQ,oBAAoB,EAAE,IAAI;CAAG"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builtinLiveDatasets.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/components/viewers/map/datasets/src/builtinLiveDatasets.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAyDhE,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,EAAE,OAAO,EAAmB,CAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DatasetGroup } from "../../../../../types/dbTypes";
|
|
2
|
-
import { layerColorByName } from "../../utils/stringToColour";
|
|
3
|
-
import { buildWmsTileUrl } from "./urlSources";
|
|
4
|
-
const GEOMET_WMS_URL = process.env.NEXT_PUBLIC_GEOMET_WMS_URL || "https://geo.weather.gc.ca/geomet";
|
|
5
|
-
const liveWeatherPortal = {
|
|
6
|
-
id: -1001,
|
|
7
|
-
// synthetic — built-in, never persisted
|
|
8
|
-
name: "ECCC \xB7 MSC GeoMet",
|
|
9
|
-
group: DatasetGroup.National,
|
|
10
|
-
dataManagementSystem: "Other",
|
|
11
|
-
apiUrl: GEOMET_WMS_URL,
|
|
12
|
-
country: "Canada",
|
|
13
|
-
live: true
|
|
14
|
-
};
|
|
15
|
-
const emptyFeatures = async () => ({ type: "FeatureCollection", features: [] });
|
|
16
|
-
const weatherRadar = {
|
|
17
|
-
id: "live-weather-radar",
|
|
18
|
-
name: "Live Weather Radar (Canada)",
|
|
19
|
-
publisher: "Environment and Climate Change Canada \xB7 MSC GeoMet",
|
|
20
|
-
description: "Live precipitation radar (RADAR_1KM_RRAI) \u2014 rain rate, latest frame served ~every 6 minutes.",
|
|
21
|
-
dataManagementSystem: "other",
|
|
22
|
-
datasetType: "WMS",
|
|
23
|
-
type: "WMS",
|
|
24
|
-
countrySubdivision: "",
|
|
25
|
-
municipality: "",
|
|
26
|
-
group: DatasetGroup.National,
|
|
27
|
-
clickable: false,
|
|
28
|
-
// MapLibre raster tile template; {bbox-epsg-3857} stays literal (substituted per tile).
|
|
29
|
-
url: buildWmsTileUrl(GEOMET_WMS_URL, "RADAR_1KM_RRAI"),
|
|
30
|
-
// Time-enabled: WMSDatasetLayer animates the WMS TIME dimension via the scrub/play control.
|
|
31
|
-
timeEnabled: true,
|
|
32
|
-
wms: { baseUrl: GEOMET_WMS_URL, layers: "RADAR_1KM_RRAI" },
|
|
33
|
-
information: "https://eccc-msc.github.io/open-data/msc-geomet/readme_en/",
|
|
34
|
-
portal: liveWeatherPortal,
|
|
35
|
-
layerColor: layerColorByName("Live Weather Radar"),
|
|
36
|
-
getFields: async () => [],
|
|
37
|
-
getFeatures: emptyFeatures
|
|
38
|
-
};
|
|
39
|
-
const builtinLiveDatasets = [weatherRadar];
|
|
40
|
-
export {
|
|
41
|
-
builtinLiveDatasets
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=builtinLiveDatasets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/core/components/viewers/map/datasets/src/builtinLiveDatasets.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n// Copyright (C) 2025 Collab Digital Twins\n\nimport { DatasetGroup, type OpenDataPortal } from '../../../../../types/dbTypes'\nimport { layerColorByName } from '../../utils/stringToColour'\n\nimport { buildWmsTileUrl } from './urlSources'\n\nimport type { Dataset } from '../../../../../types/datasetTypes'\nimport type { AllGeoJSON } from '@turf/turf'\n\n/**\n * Curated \"live\" datasets surfaced in the dataset manager's Live Data tab.\n *\n * Unlike portal-fetched datasets these are defined in code: a small, known set\n * of always-current federated feeds. The first is Environment and Climate Change\n * Canada's precipitation radar (MSC GeoMet) — a WMS raster of rain rate, the\n * server always serving the latest frame (refreshed ~every 6 minutes). Federated\n * and Canadian-governed: nothing of ours egresses, the browser fetches GeoMet\n * raster tiles directly.\n *\n * Each entry carries `portal.live === true` — the only thing the Live Data tab\n * filters on — and renders through the WMS branch of OpenDataLayer.\n */\n\nconst GEOMET_WMS_URL =\n process.env.NEXT_PUBLIC_GEOMET_WMS_URL || 'https://geo.weather.gc.ca/geomet'\n\nconst liveWeatherPortal: OpenDataPortal = {\n id: -1001, // synthetic — built-in, never persisted\n name: 'ECCC · MSC GeoMet',\n group: DatasetGroup.National,\n dataManagementSystem: 'Other',\n apiUrl: GEOMET_WMS_URL,\n country: 'Canada',\n live: true,\n}\n\nconst emptyFeatures = async (): Promise<AllGeoJSON> =>\n ({ type: 'FeatureCollection', features: [] } as AllGeoJSON)\n\nconst weatherRadar: Dataset = {\n id: 'live-weather-radar',\n name: 'Live Weather Radar (Canada)',\n publisher: 'Environment and Climate Change Canada · MSC GeoMet',\n description: 'Live precipitation radar (RADAR_1KM_RRAI) — rain rate, latest frame served ~every 6 minutes.',\n dataManagementSystem: 'other',\n datasetType: 'WMS',\n type: 'WMS',\n countrySubdivision: '',\n municipality: '',\n group: DatasetGroup.National,\n clickable: false,\n // MapLibre raster tile template; {bbox-epsg-3857} stays literal (substituted per tile).\n url: buildWmsTileUrl(GEOMET_WMS_URL, 'RADAR_1KM_RRAI'),\n // Time-enabled: WMSDatasetLayer animates the WMS TIME dimension via the scrub/play control.\n timeEnabled: true,\n wms: { baseUrl: GEOMET_WMS_URL, layers: 'RADAR_1KM_RRAI' },\n information: 'https://eccc-msc.github.io/open-data/msc-geomet/readme_en/',\n portal: liveWeatherPortal,\n layerColor: layerColorByName('Live Weather Radar'),\n getFields: async () => [],\n getFeatures: emptyFeatures,\n}\n\n/** Built-in live datasets, injected into the manager so the Live Data tab has real content. */\nexport const builtinLiveDatasets: Dataset[] = [weatherRadar]\n"],"mappings":"AAGA,SAAS,oBAAyC;AAClD,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB;AAmBhC,MAAM,iBACJ,QAAQ,IAAI,8BAA8B;AAE5C,MAAM,oBAAoC;AAAA,EACxC,IAAI;AAAA;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,aAAa;AAAA,EACpB,sBAAsB;AAAA,EACtB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR;AAEA,MAAM,gBAAgB,aACnB,EAAE,MAAM,qBAAqB,UAAU,CAAC,EAAE;AAE7C,MAAM,eAAwB;AAAA,EAC5B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,OAAO,aAAa;AAAA,EACpB,WAAW;AAAA;AAAA,EAEX,KAAK,gBAAgB,gBAAgB,gBAAgB;AAAA;AAAA,EAErD,aAAa;AAAA,EACb,KAAK,EAAE,SAAS,gBAAgB,QAAQ,iBAAiB;AAAA,EACzD,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,YAAY,iBAAiB,oBAAoB;AAAA,EACjD,WAAW,YAAY,CAAC;AAAA,EACxB,aAAa;AACf;AAGO,MAAM,sBAAiC,CAAC,YAAY;","names":[]}
|