fix import modules

This commit is contained in:
vcoppe committed 2026-10-31 14:01:27 +01:00
1 parent 957f0c35ec
commit c3ce577e6d
6 files changed
+23 -7

No files matched your search

+6 -2
View File
@@ -20,7 +20,7 @@
"mapillary-js": "^4.1.2", "mapillary-js": "^4.1.2",
"maplibre-gl": "^6.15.0", "maplibre-gl": "^6.15.0",
"sanitize-html": "^2.17.0", "sanitize-html": "^2.17.0",
"sortablejs": "^1.15.6" "sortablejs": "^1.15.7"
}, },
"devDependencies": { "devDependencies": {
"@fontsource-variable/inter": "^5.2.8", "@fontsource-variable/inter": "^5.2.8",
@@ -39,7 +39,7 @@
"@types/mapbox__tilebelt": "^1.0.4", "@types/mapbox__tilebelt": "^1.0.4",
"@types/node": "^22.15.30", "@types/node": "^22.15.30",
"@types/sanitize-html": "^2.16.0", "@types/sanitize-html": "^2.16.0",
"@types/sortablejs": "^1.15.8", "@types/sortablejs": "^1.15.9",
"@typescript-eslint/eslint-plugin": "^8.33.1", "@typescript-eslint/eslint-plugin": "^8.33.1",
"@typescript-eslint/parser": "^8.33.1", "@typescript-eslint/parser": "^8.33.1",
"bits-ui": "^2.17.2", "bits-ui": "^2.17.2",
@@ -2762,6 +2762,8 @@
}, },
"node_modules/@types/sortablejs": { "node_modules/@types/sortablejs": {
"version": "1.15.9", "version": "1.15.9",
"resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.9.tgz",
"integrity": "sha512-7HP+rZGE2p886PKV9c9OJzLBI6BBJu1O7lJGYnPyG3fS4/duUCcngkNCjsLwIMV+WMqANe3tt4irrXHSIe68OQ==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -5599,6 +5601,8 @@
}, },
"node_modules/sortablejs": { "node_modules/sortablejs": {
"version": "1.15.7", "version": "1.15.7",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.7.tgz",
"integrity": "sha512-Kk8wLQPlS+yi1ZEf48a4+fzHa4yxjC30M/Sr2AnQu+f/MPwvvX9XjZ6OWejiz8crBsLwSq8GHqaxaET7u6ux0A==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/source-map-js": { "node_modules/source-map-js": {
+2 -2
View File
@@ -33,7 +33,7 @@
"@types/mapbox__tilebelt": "^1.0.4", "@types/mapbox__tilebelt": "^1.0.4",
"@types/node": "^22.15.30", "@types/node": "^22.15.30",
"@types/sanitize-html": "^2.16.0", "@types/sanitize-html": "^2.16.0",
"@types/sortablejs": "^1.15.8", "@types/sortablejs": "^1.15.9",
"@typescript-eslint/eslint-plugin": "^8.33.1", "@typescript-eslint/eslint-plugin": "^8.33.1",
"@typescript-eslint/parser": "^8.33.1", "@typescript-eslint/parser": "^8.33.1",
"bits-ui": "^2.17.2", "bits-ui": "^2.17.2",
@@ -80,6 +80,6 @@
"mapillary-js": "^4.1.2", "mapillary-js": "^4.1.2",
"maplibre-gl": "^6.15.0", "maplibre-gl": "^6.15.0",
"sanitize-html": "^2.17.0", "sanitize-html": "^2.17.0",
"sortablejs": "^1.15.6" "sortablejs": "^1.15.7"
} }
} }
@@ -1,5 +1,6 @@
import { isMac } from '$lib/utils'; import { isMac } from '$lib/utils';
import Sortable, { type Direction } from 'sortablejs/Sortable'; import Sortable from './sortable';
import type { Direction } from 'sortablejs';
import { get, writable } from 'svelte/store'; import { get, writable } from 'svelte/store';
import { tick } from 'svelte'; import { tick } from 'svelte';
import { engine, type MoveTarget, type Selection } from '$lib/engine'; import { engine, type MoveTarget, type Selection } from '$lib/engine';
@@ -258,7 +259,7 @@ export class SortableFileList {
} }
} }
updateToSelection(e: Sortable.SortableEvent) { updateToSelection(e: Sortable.SortableEvent & { originalEvent?: MouseEvent }) {
if (!this._sortable) return; if (!this._sortable) return;
if (this._updatingSelection || this._applying) return; if (this._updatingSelection || this._applying) return;
this._updatingSelection = true; this._updatingSelection = true;
@@ -0,0 +1,7 @@
import Sortable, { MultiDrag } from 'sortablejs';
// The ESM build leaves out the MultiDrag plugin. Mounting it twice throws, so it is done here
// rather than in a module that hot reloading runs again.
Sortable.mount(new MultiDrag());
export default Sortable;
@@ -5,7 +5,7 @@ import {
type MapLayerMouseEvent, type MapLayerMouseEvent,
type VectorSourceSpecification, type VectorSourceSpecification,
} from 'maplibre-gl'; } from 'maplibre-gl';
import { Viewer, type ViewerBearingEvent } from 'mapillary-js/dist/mapillary.module'; import { Viewer, type ViewerBearingEvent } from 'mapillary-js';
import 'mapillary-js/dist/mapillary.css'; import 'mapillary-js/dist/mapillary.css';
import { mapCursor, MapCursorState } from '$lib/state/map-cursor'; import { mapCursor, MapCursorState } from '$lib/state/map-cursor';
import { ANCHOR_LAYER_KEY } from '$lib/components/map/style'; import { ANCHOR_LAYER_KEY } from '$lib/components/map/style';
+4
View File
@@ -47,4 +47,8 @@ export default defineConfig({
wasm(), wasm(),
sveltekit(), sveltekit(),
], ],
ssr: {
// their main entry is UMD, which has no named exports in Node: bundle their ESM build instead
noExternal: ['mapillary-js', 'sortablejs'],
},
}); });