mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-11-01 12:17:18 +00:00
fix import modules
This commit is contained in:
1 parent
957f0c35ec
commit
c3ce577e6d
6 files changed
+23
-7
No files matched your search
Generated
+6
-2
@@ -20,7 +20,7 @@
|
||||
"mapillary-js": "^4.1.2",
|
||||
"maplibre-gl": "^6.15.0",
|
||||
"sanitize-html": "^2.17.0",
|
||||
"sortablejs": "^1.15.6"
|
||||
"sortablejs": "^1.15.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fontsource-variable/inter": "^5.2.8",
|
||||
@@ -39,7 +39,7 @@
|
||||
"@types/mapbox__tilebelt": "^1.0.4",
|
||||
"@types/node": "^22.15.30",
|
||||
"@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/parser": "^8.33.1",
|
||||
"bits-ui": "^2.17.2",
|
||||
@@ -2762,6 +2762,8 @@
|
||||
},
|
||||
"node_modules/@types/sortablejs": {
|
||||
"version": "1.15.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.9.tgz",
|
||||
"integrity": "sha512-7HP+rZGE2p886PKV9c9OJzLBI6BBJu1O7lJGYnPyG3fS4/duUCcngkNCjsLwIMV+WMqANe3tt4irrXHSIe68OQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -5599,6 +5601,8 @@
|
||||
},
|
||||
"node_modules/sortablejs": {
|
||||
"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"
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"@types/mapbox__tilebelt": "^1.0.4",
|
||||
"@types/node": "^22.15.30",
|
||||
"@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/parser": "^8.33.1",
|
||||
"bits-ui": "^2.17.2",
|
||||
@@ -80,6 +80,6 @@
|
||||
"mapillary-js": "^4.1.2",
|
||||
"maplibre-gl": "^6.15.0",
|
||||
"sanitize-html": "^2.17.0",
|
||||
"sortablejs": "^1.15.6"
|
||||
"sortablejs": "^1.15.7"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
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 { tick } from 'svelte';
|
||||
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._updatingSelection || this._applying) return;
|
||||
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 VectorSourceSpecification,
|
||||
} 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 { mapCursor, MapCursorState } from '$lib/state/map-cursor';
|
||||
import { ANCHOR_LAYER_KEY } from '$lib/components/map/style';
|
||||
|
||||
@@ -47,4 +47,8 @@ export default defineConfig({
|
||||
wasm(),
|
||||
sveltekit(),
|
||||
],
|
||||
ssr: {
|
||||
// their main entry is UMD, which has no named exports in Node: bundle their ESM build instead
|
||||
noExternal: ['mapillary-js', 'sortablejs'],
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user