@webquark/core 1.1.0-dev.2 → 1.1.0-dev.4
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/cjs/{Leaflet.GoogleMutant-BCs2oiE0.js → Leaflet.GoogleMutant-i4bYl6qy.js} +1 -2
- package/dist/cjs/{action.props-hpMla743.js → action.props-CkEZpMY6.js} +1 -1
- package/dist/cjs/{chevron-up-B76247zT.js → chevron-up-Dysp_9UJ.js} +2 -2
- package/dist/cjs/{index-Vzfd3Ljg.js → index-B7ex88C2.js} +61 -20
- package/dist/cjs/leaflet-maplibre-gl-BJKExsns.js +1031 -0
- package/dist/{esm/leaflet-src-BeeM-7Ku.js → cjs/leaflet-src-mrRg-Srs.js} +38 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q-alert.cjs.entry.js +1 -1
- package/dist/cjs/q-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q-button_2.cjs.entry.js +2 -2
- package/dist/cjs/q-card.cjs.entry.js +1 -1
- package/dist/cjs/q-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
- package/dist/cjs/q-data-table.cjs.entry.js +2 -2
- package/dist/cjs/q-dialog.cjs.entry.js +1 -1
- package/dist/cjs/q-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q-form.cjs.entry.js +1 -1
- package/dist/cjs/q-icon.cjs.entry.js +1 -1
- package/dist/cjs/q-input_2.cjs.entry.js +2 -2
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +184 -122
- package/dist/cjs/q-navbar.cjs.entry.js +1 -1
- package/dist/cjs/q-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q-panel.cjs.entry.js +1 -1
- package/dist/cjs/q-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/q-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q-reel.cjs.entry.js +1 -1
- package/dist/cjs/q-scrollable.cjs.entry.js +1 -1
- package/dist/cjs/q-sidepanel.cjs.entry.js +19 -16
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +1 -1
- package/dist/cjs/q-step-diagram.cjs.entry.js +1 -1
- package/dist/cjs/q-syntax-box.cjs.entry.js +4 -4
- package/dist/cjs/q-tabs.cjs.entry.js +1 -1
- package/dist/cjs/q-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q-thumbnail.cjs.entry.js +1 -1
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +1 -1
- package/dist/cjs/q-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/inputs/input/input.css +13 -0
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +6 -3
- package/dist/collection/components/layout/sidepanel/sidepanel.css +23 -0
- package/dist/collection/components/layout/sidepanel/sidepanel.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BnmIFx4N.js → p-7oXL29Gu.js} +1 -1
- package/dist/components/{p-DAl7U6Ms.js → p-BygmcFxM.js} +1 -1
- package/dist/components/{p-B6NJEaqd.js → p-C8fq-feq.js} +1 -1
- package/dist/components/p-CFuqfXuv.js +9 -0
- package/dist/components/{p-Dnud2v8F.js → p-CQofbR9q.js} +1 -1
- package/dist/components/p-CVtof65h.js +1 -0
- package/dist/components/{p-DcsB8P_Y.js → p-Czf3kP0S.js} +1 -1
- package/dist/components/p-DYMWBqU1.js +5 -0
- package/dist/components/{p-DH-PVHhr.js → p-DuX-9GOi.js} +1 -1
- package/dist/components/{p-B6g9Pj3f.js → p-I81wUKud.js} +1 -1
- package/dist/components/{p-CDktnDug.js → p-g9vOVxQ4.js} +2 -2
- package/dist/components/{p-C7yQ3tON.js → p-vv3X99Ji.js} +1 -1
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-button.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-chip.js +1 -1
- package/dist/components/q-conversation-bubble.js +1 -1
- package/dist/components/q-data-table.js +1 -1
- package/dist/components/q-dialog.js +1 -1
- package/dist/components/q-dropdown.js +1 -1
- package/dist/components/q-form.js +1 -1
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-input.js +1 -1
- package/dist/components/q-link.js +1 -1
- package/dist/components/q-map.js +1 -1
- package/dist/components/q-navbar.js +1 -1
- package/dist/components/q-pagination.js +1 -1
- package/dist/components/q-panel.js +1 -1
- package/dist/components/q-progress.js +1 -1
- package/dist/components/q-quantity-selector.js +1 -1
- package/dist/components/q-radio-group.js +1 -1
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-sidepanel.js +5 -5
- package/dist/components/q-step-diagram-item.js +1 -1
- package/dist/components/q-step-diagram.js +1 -1
- package/dist/components/q-syntax-box.js +4 -4
- package/dist/components/q-tabs.js +1 -1
- package/dist/components/q-textarea.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toast.js +1 -1
- package/dist/components/q-toggle.js +1 -1
- package/dist/components/q-toolbar.js +1 -1
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/{Leaflet.GoogleMutant-BlvymWLE.js → Leaflet.GoogleMutant-MpxOb4Jm.js} +1 -2
- package/dist/esm/{action.props-BJWXy1Ec.js → action.props-CJoxGHR7.js} +1 -1
- package/dist/esm/{chevron-up-CDktnDug.js → chevron-up-g9vOVxQ4.js} +2 -2
- package/dist/esm/{index-DweBlExe.js → index-VFWyFa-_.js} +61 -20
- package/dist/esm/leaflet-maplibre-gl-BVDAAs7w.js +1026 -0
- package/dist/{cjs/leaflet-src-B0ls4IKq.js → esm/leaflet-src-DYMWBqU1.js} +33 -8
- package/dist/esm/loader.js +2 -2
- package/dist/esm/q-alert.entry.js +1 -1
- package/dist/esm/q-avatar.entry.js +1 -1
- package/dist/esm/q-button_2.entry.js +2 -2
- package/dist/esm/q-card.entry.js +1 -1
- package/dist/esm/q-carousel.entry.js +1 -1
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-conversation-bubble.entry.js +1 -1
- package/dist/esm/q-data-table.entry.js +2 -2
- package/dist/esm/q-dialog.entry.js +1 -1
- package/dist/esm/q-dropdown.entry.js +1 -1
- package/dist/esm/q-form.entry.js +1 -1
- package/dist/esm/q-icon.entry.js +1 -1
- package/dist/esm/q-input_2.entry.js +2 -2
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +184 -122
- package/dist/esm/q-navbar.entry.js +1 -1
- package/dist/esm/q-pagination.entry.js +1 -1
- package/dist/esm/q-panel.entry.js +1 -1
- package/dist/esm/q-quantity-selector.entry.js +1 -1
- package/dist/esm/q-radio-group.entry.js +1 -1
- package/dist/esm/q-reel.entry.js +1 -1
- package/dist/esm/q-scrollable.entry.js +1 -1
- package/dist/esm/q-sidepanel.entry.js +19 -16
- package/dist/esm/q-step-diagram-item.entry.js +1 -1
- package/dist/esm/q-step-diagram.entry.js +1 -1
- package/dist/esm/q-syntax-box.entry.js +4 -4
- package/dist/esm/q-tabs.entry.js +1 -1
- package/dist/esm/q-textarea.entry.js +1 -1
- package/dist/esm/q-thumbnail.entry.js +1 -1
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +1 -1
- package/dist/esm/q-toolbar.entry.js +1 -1
- package/dist/esm/webquark.js +3 -3
- package/dist/loader/index.d.ts +1 -1
- package/dist/playground/build/{p-53a5c493.entry.js → p-0053ec76.entry.js} +1 -1
- package/dist/playground/build/{p-de7364cd.entry.js → p-0363c0e6.entry.js} +1 -1
- package/dist/{webquark/p-35c9fa4d.entry.js → playground/build/p-0e3dbe01.entry.js} +1 -1
- package/dist/{webquark/p-d22a876a.entry.js → playground/build/p-13329777.entry.js} +1 -1
- package/dist/playground/build/{p-2f0bbb67.entry.js → p-1c9a82b8.entry.js} +1 -1
- package/dist/playground/build/p-226c2f79.entry.js +13 -0
- package/dist/{webquark/p-c64be717.entry.js → playground/build/p-2e2b3ca9.entry.js} +1 -1
- package/dist/playground/build/{p-dac913f9.entry.js → p-316a92e2.entry.js} +1 -1
- package/dist/{webquark/p-94eba9a9.entry.js → playground/build/p-38b92be6.entry.js} +1 -1
- package/dist/playground/build/{p-06813183.entry.js → p-41421759.entry.js} +1 -1
- package/dist/playground/build/{p-d142bb86.entry.js → p-42831108.entry.js} +1 -1
- package/dist/{webquark/p-7c9d705e.entry.js → playground/build/p-50ca27f7.entry.js} +1 -1
- package/dist/playground/build/{p-4f8ee3f7.entry.js → p-5c08aa94.entry.js} +1 -1
- package/dist/{webquark/p-4b38c28f.entry.js → playground/build/p-611ef3e0.entry.js} +1 -1
- package/dist/playground/build/{p-8ff218f7.entry.js → p-684292dd.entry.js} +1 -1
- package/dist/{webquark/p-bc7d7cbf.entry.js → playground/build/p-6c0bc4b9.entry.js} +3 -3
- package/dist/playground/build/{p-09d43469.entry.js → p-7081c96b.entry.js} +1 -1
- package/dist/playground/build/{p-e354a398.entry.js → p-789eb3c9.entry.js} +1 -1
- package/dist/playground/build/{p-f1ab576a.entry.js → p-8077aa3f.entry.js} +1 -1
- package/dist/playground/build/{p-7be7478a.entry.js → p-885572ee.entry.js} +1 -1
- package/dist/playground/build/p-8ada8fc6.entry.js +1 -0
- package/dist/{webquark/p-721d2479.entry.js → playground/build/p-8d0aa5a7.entry.js} +1 -1
- package/dist/{webquark/p-c4016e61.entry.js → playground/build/p-8ec7d250.entry.js} +1 -1
- package/dist/{webquark/p-256d199a.entry.js → playground/build/p-9978ae38.entry.js} +1 -1
- package/dist/playground/build/p-CFuqfXuv.js +9 -0
- package/dist/playground/build/p-DYMWBqU1.js +5 -0
- package/dist/playground/build/p-DoS2fiWw.js +1 -0
- package/dist/playground/build/p-DuX-9GOi.js +1 -0
- package/dist/playground/build/p-VFWyFa-_.js +3 -0
- package/dist/playground/build/{p-bc0a0428.entry.js → p-b5066051.entry.js} +1 -1
- package/dist/playground/build/p-b99541cd.entry.js +1 -0
- package/dist/playground/build/{p-dabaddcb.entry.js → p-ca1a1d25.entry.js} +1 -1
- package/dist/{webquark/p-a2a3135f.entry.js → playground/build/p-d837603c.entry.js} +1 -1
- package/dist/playground/build/{p-d691a1aa.entry.js → p-e0e6b68f.entry.js} +1 -1
- package/dist/playground/build/{p-a0861b0e.entry.js → p-e15e6d76.entry.js} +1 -1
- package/dist/{webquark/p-3e4d2d19.entry.js → playground/build/p-e272dd45.entry.js} +1 -1
- package/dist/playground/build/{p-31d62bd0.entry.js → p-e8003179.entry.js} +1 -1
- package/dist/{webquark/p-CDktnDug.js → playground/build/p-g9vOVxQ4.js} +2 -2
- package/dist/playground/build/webquark.esm.js +1 -1
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +1 -0
- package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +73 -55
- package/dist/webquark/{p-53a5c493.entry.js → p-0053ec76.entry.js} +1 -1
- package/dist/webquark/{p-de7364cd.entry.js → p-0363c0e6.entry.js} +1 -1
- package/dist/{playground/build/p-35c9fa4d.entry.js → webquark/p-0e3dbe01.entry.js} +1 -1
- package/dist/{playground/build/p-d22a876a.entry.js → webquark/p-13329777.entry.js} +1 -1
- package/dist/webquark/{p-2f0bbb67.entry.js → p-1c9a82b8.entry.js} +1 -1
- package/dist/webquark/p-226c2f79.entry.js +13 -0
- package/dist/{playground/build/p-c64be717.entry.js → webquark/p-2e2b3ca9.entry.js} +1 -1
- package/dist/webquark/{p-dac913f9.entry.js → p-316a92e2.entry.js} +1 -1
- package/dist/{playground/build/p-94eba9a9.entry.js → webquark/p-38b92be6.entry.js} +1 -1
- package/dist/webquark/{p-06813183.entry.js → p-41421759.entry.js} +1 -1
- package/dist/webquark/{p-d142bb86.entry.js → p-42831108.entry.js} +1 -1
- package/dist/{playground/build/p-7c9d705e.entry.js → webquark/p-50ca27f7.entry.js} +1 -1
- package/dist/webquark/{p-4f8ee3f7.entry.js → p-5c08aa94.entry.js} +1 -1
- package/dist/{playground/build/p-4b38c28f.entry.js → webquark/p-611ef3e0.entry.js} +1 -1
- package/dist/webquark/{p-8ff218f7.entry.js → p-684292dd.entry.js} +1 -1
- package/dist/{playground/build/p-bc7d7cbf.entry.js → webquark/p-6c0bc4b9.entry.js} +3 -3
- package/dist/webquark/{p-09d43469.entry.js → p-7081c96b.entry.js} +1 -1
- package/dist/webquark/{p-e354a398.entry.js → p-789eb3c9.entry.js} +1 -1
- package/dist/webquark/{p-f1ab576a.entry.js → p-8077aa3f.entry.js} +1 -1
- package/dist/webquark/{p-7be7478a.entry.js → p-885572ee.entry.js} +1 -1
- package/dist/webquark/p-8ada8fc6.entry.js +1 -0
- package/dist/{playground/build/p-721d2479.entry.js → webquark/p-8d0aa5a7.entry.js} +1 -1
- package/dist/{playground/build/p-c4016e61.entry.js → webquark/p-8ec7d250.entry.js} +1 -1
- package/dist/{playground/build/p-256d199a.entry.js → webquark/p-9978ae38.entry.js} +1 -1
- package/dist/webquark/p-CFuqfXuv.js +9 -0
- package/dist/webquark/p-DYMWBqU1.js +5 -0
- package/dist/webquark/p-DoS2fiWw.js +1 -0
- package/dist/webquark/p-DuX-9GOi.js +1 -0
- package/dist/webquark/p-VFWyFa-_.js +3 -0
- package/dist/webquark/{p-bc0a0428.entry.js → p-b5066051.entry.js} +1 -1
- package/dist/webquark/p-b99541cd.entry.js +1 -0
- package/dist/webquark/{p-dabaddcb.entry.js → p-ca1a1d25.entry.js} +1 -1
- package/dist/{playground/build/p-a2a3135f.entry.js → webquark/p-d837603c.entry.js} +1 -1
- package/dist/webquark/{p-d691a1aa.entry.js → p-e0e6b68f.entry.js} +1 -1
- package/dist/webquark/{p-a0861b0e.entry.js → p-e15e6d76.entry.js} +1 -1
- package/dist/{playground/build/p-3e4d2d19.entry.js → webquark/p-e272dd45.entry.js} +1 -1
- package/dist/webquark/{p-31d62bd0.entry.js → p-e8003179.entry.js} +1 -1
- package/dist/{playground/build/p-CDktnDug.js → webquark/p-g9vOVxQ4.js} +2 -2
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +14 -14
- package/dist/cjs/leaflet-maplibre-gl-RCEffFEM.js +0 -434
- package/dist/cjs/leaflet-src-BX4jwTf5.js +0 -33
- package/dist/components/p-2bWqVyTo.js +0 -1
- package/dist/components/p-BEBDDqVT.js +0 -1
- package/dist/components/p-BeeM-7Ku.js +0 -5
- package/dist/components/p-QHgICI4w.js +0 -1
- package/dist/esm/leaflet-maplibre-gl-Cgb-1z8Q.js +0 -432
- package/dist/esm/leaflet-src-BR13bdVA.js +0 -30
- package/dist/playground/build/p-2bWqVyTo.js +0 -1
- package/dist/playground/build/p-7c4e6512.entry.js +0 -1
- package/dist/playground/build/p-BEBDDqVT.js +0 -1
- package/dist/playground/build/p-BeeM-7Ku.js +0 -5
- package/dist/playground/build/p-DNFGt02p.js +0 -1
- package/dist/playground/build/p-DweBlExe.js +0 -2
- package/dist/playground/build/p-Dxs6LLBG.js +0 -1
- package/dist/playground/build/p-a7b90eef.entry.js +0 -13
- package/dist/playground/build/p-e298fb31.entry.js +0 -1
- package/dist/webquark/p-2bWqVyTo.js +0 -1
- package/dist/webquark/p-7c4e6512.entry.js +0 -1
- package/dist/webquark/p-BEBDDqVT.js +0 -1
- package/dist/webquark/p-BeeM-7Ku.js +0 -5
- package/dist/webquark/p-DNFGt02p.js +0 -1
- package/dist/webquark/p-DweBlExe.js +0 -2
- package/dist/webquark/p-Dxs6LLBG.js +0 -1
- package/dist/webquark/p-a7b90eef.entry.js +0 -13
- package/dist/webquark/p-e298fb31.entry.js +0 -1
package/dist/esm/q-map.entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-VFWyFa-_.js';
|
|
2
2
|
import { g as Q_MAP_MARKER_VARIANTS, d as Q_MAP_MARKER_KINDS, e as Q_MAP_MARKER_RINGS, f as Q_MAP_MARKER_SIZES, a as Q_MAP_MARKER_CALLOUT_PLACEMENTS, b as Q_MAP_MARKER_CALLOUT_STAT_LAYOUTS, c as Q_MAP_MARKER_CALLOUT_VISIBILITIES, Q as Q_MAP_DEFAULT_CLUSTER_GROUP } from './map.types-WJHaLJS_.js';
|
|
3
3
|
|
|
4
4
|
function isTilePreloadBufferRelevant(requestedProvider, activeProvider) {
|
|
@@ -490,7 +490,7 @@ async function importGoogleMutantConstructor(leaflet) {
|
|
|
490
490
|
const previousGoogleMutantFactory = factoryHost.googleMutant;
|
|
491
491
|
globals.L = leaflet;
|
|
492
492
|
try {
|
|
493
|
-
const module = await import('./Leaflet.GoogleMutant-
|
|
493
|
+
const module = await import('./Leaflet.GoogleMutant-MpxOb4Jm.js');
|
|
494
494
|
if (typeof module.default !== 'function') {
|
|
495
495
|
throw new Error('QMap: GoogleMutant did not expose its default constructor.');
|
|
496
496
|
}
|
|
@@ -524,7 +524,7 @@ async function importMapLibreLayerFactory(leaflet) {
|
|
|
524
524
|
if (typeof window === 'undefined') {
|
|
525
525
|
throw new Error('QMap: the vector provider is only available in a browser environment.');
|
|
526
526
|
}
|
|
527
|
-
await import('./leaflet-maplibre-gl-
|
|
527
|
+
await import('./leaflet-maplibre-gl-BVDAAs7w.js');
|
|
528
528
|
const factory = leaflet.maplibreGL;
|
|
529
529
|
if (typeof factory !== 'function') {
|
|
530
530
|
throw new Error('QMap: MapLibre did not register its Leaflet layer factory.');
|
|
@@ -940,7 +940,12 @@ const defaultOptions = {
|
|
|
940
940
|
map: props => props // props => ({sum: props.my_value})
|
|
941
941
|
};
|
|
942
942
|
|
|
943
|
-
|
|
943
|
+
// Int32 encoding of source coords in [0, 1]: (coord - 0.5) * SCALE in [-2^29, 2^29].
|
|
944
|
+
// Keeps every stored value AND sqDist subtractions inside V8's 31-bit SMI fast path.
|
|
945
|
+
const SCALE = 0x40000000; // 2^30
|
|
946
|
+
const INV_SCALE = 1 / SCALE;
|
|
947
|
+
const encode = c => (c - 0.5) * SCALE;
|
|
948
|
+
const decode = v => v * INV_SCALE + 0.5;
|
|
944
949
|
|
|
945
950
|
const OFFSET_ZOOM = 2;
|
|
946
951
|
const OFFSET_ID = 3;
|
|
@@ -950,9 +955,11 @@ const OFFSET_PROP = 6;
|
|
|
950
955
|
|
|
951
956
|
class Supercluster {
|
|
952
957
|
constructor(options) {
|
|
953
|
-
this.options = Object.assign(Object.create(defaultOptions), options);
|
|
954
|
-
|
|
955
|
-
|
|
958
|
+
const opts = this.options = Object.assign(Object.create(defaultOptions), options);
|
|
959
|
+
opts.maxZoom = Math.min(opts.maxZoom, 30);
|
|
960
|
+
opts.minZoom = Math.min(opts.minZoom, opts.maxZoom);
|
|
961
|
+
this.trees = new Array(opts.maxZoom + 1);
|
|
962
|
+
this.stride = opts.reduce ? 7 : 6;
|
|
956
963
|
this.clusterProps = [];
|
|
957
964
|
}
|
|
958
965
|
|
|
@@ -961,44 +968,94 @@ class Supercluster {
|
|
|
961
968
|
|
|
962
969
|
if (log) console.time('total time');
|
|
963
970
|
|
|
964
|
-
const
|
|
971
|
+
const notProcessed = maxZoom + 1; // sentinel for "not yet processed at any zoom"
|
|
972
|
+
const timerId = `z${notProcessed}: ${points.length} points`;
|
|
965
973
|
if (log) console.time(timerId);
|
|
966
974
|
|
|
967
|
-
|
|
975
|
+
const stride = this.stride;
|
|
976
|
+
|
|
977
|
+
// MultiPoint features expand into one internal point per coordinate, so count first
|
|
978
|
+
let numPoints = points.length;
|
|
979
|
+
for (const p of points) {
|
|
980
|
+
const g = p.geometry;
|
|
981
|
+
if (g && g.type === 'MultiPoint') numPoints += g.coordinates.length - 1;
|
|
982
|
+
}
|
|
983
|
+
this.numPoints = numPoints;
|
|
984
|
+
|
|
985
|
+
// retain only per-point fields used by output paths; drop the GeoJSON wrappers
|
|
986
|
+
const props = this.props = new Array(numPoints);
|
|
987
|
+
// original Float64 mercator coords for drift-free single-point output
|
|
988
|
+
const coords = this.coords = new Float64Array(numPoints * 2);
|
|
989
|
+
let ids = null;
|
|
968
990
|
|
|
969
991
|
// generate a cluster object for each point and index input points into a KD-tree
|
|
970
|
-
const data =
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
992
|
+
const data = new Int32Array(numPoints * stride);
|
|
993
|
+
let w = 0;
|
|
994
|
+
let i = 0; // index of the individual point (multiple per MultiPoint feature)
|
|
995
|
+
for (const p of points) {
|
|
996
|
+
const g = p.geometry;
|
|
997
|
+
if (!g) { // keep the slot so point indices stay aligned with input features
|
|
998
|
+
i++;
|
|
999
|
+
continue;
|
|
1000
|
+
}
|
|
1001
|
+
const cs = g.coordinates;
|
|
1002
|
+
const multi = g.type === 'MultiPoint';
|
|
1003
|
+
|
|
1004
|
+
for (let c = 0, n = multi ? cs.length : 1; c < n; c++, i++) {
|
|
1005
|
+
const [lng, lat] = multi ? cs[c] : cs;
|
|
1006
|
+
const px = lngX(lng);
|
|
1007
|
+
const py = latY(lat);
|
|
1008
|
+
coords[2 * i] = px;
|
|
1009
|
+
coords[2 * i + 1] = py;
|
|
1010
|
+
// store internal point/cluster data in flat typed arrays for performance
|
|
1011
|
+
data[w] = encode(px);
|
|
1012
|
+
data[w + 1] = encode(py);
|
|
1013
|
+
data[w + OFFSET_ZOOM] = notProcessed;
|
|
1014
|
+
data[w + OFFSET_ID] = i;
|
|
1015
|
+
data[w + OFFSET_PARENT] = -1;
|
|
1016
|
+
data[w + OFFSET_NUM] = 1;
|
|
1017
|
+
props[i] = p.properties;
|
|
1018
|
+
if (p.id !== undefined) {
|
|
1019
|
+
if (!ids) ids = new Array(numPoints);
|
|
1020
|
+
ids[i] = p.id;
|
|
1021
|
+
}
|
|
1022
|
+
w += stride;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
this.ids = ids;
|
|
1026
|
+
let prev = w === data.length ? data : data.subarray(0, w);
|
|
1027
|
+
let prevNum = w / stride;
|
|
1028
|
+
this.trees[maxZoom + 1] = this._createTree(prev, prevNum);
|
|
990
1029
|
|
|
991
1030
|
if (log) console.timeEnd(timerId);
|
|
992
1031
|
|
|
993
1032
|
// cluster points on max zoom, then cluster the results on previous zoom, etc.;
|
|
994
1033
|
// results in a cluster hierarchy across zoom levels
|
|
1034
|
+
let recycled = null;
|
|
995
1035
|
for (let z = maxZoom; z >= minZoom; z--) {
|
|
996
|
-
const now =
|
|
997
|
-
|
|
998
|
-
//
|
|
999
|
-
|
|
1036
|
+
const now = performance.now();
|
|
1037
|
+
|
|
1038
|
+
// allocate a tight Int32 slab for this zoom; output is strictly <= input length.
|
|
1039
|
+
// on a plateau zoom prev/prevNum don't advance, so the slab is the right size
|
|
1040
|
+
// for the next iteration too — carry it forward instead of re-allocating.
|
|
1041
|
+
const out = recycled || new Int32Array(prevNum * stride);
|
|
1042
|
+
recycled = null;
|
|
1043
|
+
const written = this._cluster(prev, prevNum, z, out);
|
|
1044
|
+
|
|
1045
|
+
if (written === prevNum) {
|
|
1046
|
+
// No clusters formed: output coords are bit-identical to input. Reuse the
|
|
1047
|
+
// parent tree (same coords, same order) and recycle the out slab — its
|
|
1048
|
+
// only differences vs prev are OFFSET_ZOOM mutations that query paths
|
|
1049
|
+
// don't read, and _cluster overwrites every slot it uses on next call.
|
|
1050
|
+
this.trees[z] = this.trees[z + 1];
|
|
1051
|
+
recycled = out;
|
|
1052
|
+
} else {
|
|
1053
|
+
this.trees[z] = this._createTree(out, written);
|
|
1054
|
+
prev = out;
|
|
1055
|
+
prevNum = written;
|
|
1056
|
+
}
|
|
1000
1057
|
|
|
1001
|
-
if (log) console.log(
|
|
1058
|
+
if (log) console.log(`z${z}: ${this.trees[z].numItems} clusters in ${(performance.now() - now).toFixed(2)}ms`);
|
|
1002
1059
|
}
|
|
1003
1060
|
|
|
1004
1061
|
if (log) console.timeEnd('total time');
|
|
@@ -1022,13 +1079,10 @@ class Supercluster {
|
|
|
1022
1079
|
}
|
|
1023
1080
|
|
|
1024
1081
|
const tree = this.trees[this._limitZoom(zoom)];
|
|
1025
|
-
const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));
|
|
1082
|
+
const ids = tree.range(encode(lngX(minLng)), encode(latY(maxLat)), encode(lngX(maxLng)), encode(latY(minLat)));
|
|
1026
1083
|
const data = tree.data;
|
|
1027
1084
|
const clusters = [];
|
|
1028
|
-
for (const id of ids)
|
|
1029
|
-
const k = this.stride * id;
|
|
1030
|
-
clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);
|
|
1031
|
-
}
|
|
1085
|
+
for (const id of ids) clusters.push(this._featureJSON(data, this.stride * id));
|
|
1032
1086
|
return clusters;
|
|
1033
1087
|
}
|
|
1034
1088
|
|
|
@@ -1041,18 +1095,16 @@ class Supercluster {
|
|
|
1041
1095
|
if (!tree) throw new Error(errorMsg);
|
|
1042
1096
|
|
|
1043
1097
|
const data = tree.data;
|
|
1044
|
-
if (originId
|
|
1098
|
+
if (originId >= tree.numItems) throw new Error(errorMsg);
|
|
1045
1099
|
|
|
1046
1100
|
const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));
|
|
1047
1101
|
const x = data[originId * this.stride];
|
|
1048
1102
|
const y = data[originId * this.stride + 1];
|
|
1049
|
-
const ids = tree.within(x, y, r);
|
|
1103
|
+
const ids = tree.within(x, y, r * SCALE);
|
|
1050
1104
|
const children = [];
|
|
1051
1105
|
for (const id of ids) {
|
|
1052
1106
|
const k = id * this.stride;
|
|
1053
|
-
if (data[k + OFFSET_PARENT] === clusterId)
|
|
1054
|
-
children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);
|
|
1055
|
-
}
|
|
1107
|
+
if (data[k + OFFSET_PARENT] === clusterId) children.push(this._featureJSON(data, k));
|
|
1056
1108
|
}
|
|
1057
1109
|
|
|
1058
1110
|
if (children.length === 0) throw new Error(errorMsg);
|
|
@@ -1071,30 +1123,38 @@ class Supercluster {
|
|
|
1071
1123
|
}
|
|
1072
1124
|
|
|
1073
1125
|
getTile(z, x, y) {
|
|
1126
|
+
return this._getTile(z, x, y, false);
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
// Same tiles as getTile, but with each feature's coords inline (`type: 4`, `x`/`y`) instead of
|
|
1130
|
+
// wrapped in a nested `geometry` array — the shape geojson-vt's getTileRaw produces.
|
|
1131
|
+
getTileRaw(z, x, y) {
|
|
1132
|
+
return this._getTile(z, x, y, true);
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
_getTile(z, x, y, raw) {
|
|
1074
1136
|
const tree = this.trees[this._limitZoom(z)];
|
|
1075
1137
|
const z2 = Math.pow(2, z);
|
|
1076
1138
|
const {extent, radius} = this.options;
|
|
1077
1139
|
const p = radius / extent;
|
|
1078
|
-
const top = (y - p) / z2;
|
|
1079
|
-
const bottom = (y + 1 + p) / z2;
|
|
1140
|
+
const top = encode((y - p) / z2);
|
|
1141
|
+
const bottom = encode((y + 1 + p) / z2);
|
|
1080
1142
|
|
|
1081
|
-
const tile = {
|
|
1082
|
-
features: []
|
|
1083
|
-
};
|
|
1143
|
+
const tile = {features: []};
|
|
1084
1144
|
|
|
1085
1145
|
this._addTileFeatures(
|
|
1086
|
-
tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),
|
|
1087
|
-
tree.data, x, y, z2, tile);
|
|
1146
|
+
tree.range(encode((x - p) / z2), top, encode((x + 1 + p) / z2), bottom),
|
|
1147
|
+
tree.data, x, y, z2, tile, raw);
|
|
1088
1148
|
|
|
1089
1149
|
if (x === 0) {
|
|
1090
1150
|
this._addTileFeatures(
|
|
1091
|
-
tree.range(1 - p / z2, top, 1, bottom),
|
|
1092
|
-
tree.data, z2, y, z2, tile);
|
|
1151
|
+
tree.range(encode(1 - p / z2), top, encode(1), bottom),
|
|
1152
|
+
tree.data, z2, y, z2, tile, raw);
|
|
1093
1153
|
}
|
|
1094
1154
|
if (x === z2 - 1) {
|
|
1095
1155
|
this._addTileFeatures(
|
|
1096
|
-
tree.range(0, top, p / z2, bottom),
|
|
1097
|
-
tree.data, -1, y, z2, tile);
|
|
1156
|
+
tree.range(encode(0), top, encode(p / z2), bottom),
|
|
1157
|
+
tree.data, -1, y, z2, tile, raw);
|
|
1098
1158
|
}
|
|
1099
1159
|
|
|
1100
1160
|
return tile.features.length ? tile : null;
|
|
@@ -1139,15 +1199,16 @@ class Supercluster {
|
|
|
1139
1199
|
return skipped;
|
|
1140
1200
|
}
|
|
1141
1201
|
|
|
1142
|
-
_createTree(data) {
|
|
1143
|
-
const tree = new KDBush(
|
|
1144
|
-
|
|
1202
|
+
_createTree(data, numItems) {
|
|
1203
|
+
const tree = new KDBush(numItems, this.options.nodeSize, Int32Array);
|
|
1204
|
+
const stride = this.stride;
|
|
1205
|
+
for (let i = 0; i < numItems; i++) tree.add(data[i * stride], data[i * stride + 1]);
|
|
1145
1206
|
tree.finish();
|
|
1146
1207
|
tree.data = data;
|
|
1147
1208
|
return tree;
|
|
1148
1209
|
}
|
|
1149
1210
|
|
|
1150
|
-
_addTileFeatures(ids, data, x, y, z2, tile) {
|
|
1211
|
+
_addTileFeatures(ids, data, x, y, z2, tile, raw) {
|
|
1151
1212
|
for (const i of ids) {
|
|
1152
1213
|
const k = i * this.stride;
|
|
1153
1214
|
const isCluster = data[k + OFFSET_NUM] > 1;
|
|
@@ -1155,35 +1216,23 @@ class Supercluster {
|
|
|
1155
1216
|
let tags, px, py;
|
|
1156
1217
|
if (isCluster) {
|
|
1157
1218
|
tags = getClusterProperties(data, k, this.clusterProps);
|
|
1158
|
-
px = data[k];
|
|
1159
|
-
py = data[k + 1];
|
|
1219
|
+
px = decode(data[k]);
|
|
1220
|
+
py = decode(data[k + 1]);
|
|
1160
1221
|
} else {
|
|
1161
|
-
const
|
|
1162
|
-
tags =
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
py = latY(lat);
|
|
1222
|
+
const origIndex = data[k + OFFSET_ID];
|
|
1223
|
+
tags = this.props[origIndex];
|
|
1224
|
+
px = this.coords[2 * origIndex];
|
|
1225
|
+
py = this.coords[2 * origIndex + 1];
|
|
1166
1226
|
}
|
|
1167
1227
|
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
Math.round(this.options.extent * (px * z2 - x)),
|
|
1172
|
-
Math.round(this.options.extent * (py * z2 - y))
|
|
1173
|
-
]],
|
|
1174
|
-
tags
|
|
1175
|
-
};
|
|
1176
|
-
|
|
1177
|
-
// assign id
|
|
1178
|
-
let id;
|
|
1179
|
-
if (isCluster || this.options.generateId) {
|
|
1180
|
-
// optionally generate id for points
|
|
1181
|
-
id = data[k + OFFSET_ID];
|
|
1182
|
-
} else {
|
|
1183
|
-
// keep id if already assigned
|
|
1184
|
-
id = this.points[data[k + OFFSET_ID]].id;
|
|
1185
|
-
}
|
|
1228
|
+
const tx = Math.round(this.options.extent * (px * z2 - x));
|
|
1229
|
+
const ty = Math.round(this.options.extent * (py * z2 - y));
|
|
1230
|
+
const f = raw ? {type: 4, x: tx, y: ty, tags} : {type: 1, geometry: [[tx, ty]], tags};
|
|
1186
1231
|
|
|
1232
|
+
// assign id: cluster id, generated point id, or original input id
|
|
1233
|
+
const origIndex = data[k + OFFSET_ID];
|
|
1234
|
+
const id = isCluster || this.options.generateId ? origIndex :
|
|
1235
|
+
this.ids ? this.ids[origIndex] : undefined;
|
|
1187
1236
|
if (id !== undefined) f.id = id;
|
|
1188
1237
|
|
|
1189
1238
|
tile.features.push(f);
|
|
@@ -1194,15 +1243,18 @@ class Supercluster {
|
|
|
1194
1243
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
|
|
1195
1244
|
}
|
|
1196
1245
|
|
|
1197
|
-
_cluster(
|
|
1198
|
-
const {radius, extent, reduce, minPoints} = this.options;
|
|
1199
|
-
const r = radius / (extent *
|
|
1200
|
-
const
|
|
1201
|
-
const
|
|
1246
|
+
_cluster(data, numItems, zoom, out) {
|
|
1247
|
+
const {radius, extent, reduce, minPoints, maxZoom} = this.options;
|
|
1248
|
+
const r = radius / (extent * (1 << zoom)) * SCALE;
|
|
1249
|
+
const notProcessed = maxZoom + 1;
|
|
1250
|
+
const tree = this.trees[zoom + 1];
|
|
1202
1251
|
const stride = this.stride;
|
|
1252
|
+
const limit = numItems * stride;
|
|
1253
|
+
const neighborIds = new Uint32Array(numItems);
|
|
1254
|
+
let cursor = 0;
|
|
1203
1255
|
|
|
1204
1256
|
// loop through each point
|
|
1205
|
-
for (let i = 0; i <
|
|
1257
|
+
for (let i = 0; i < limit; i += stride) {
|
|
1206
1258
|
// if we've already visited the point at this zoom level, skip it
|
|
1207
1259
|
if (data[i + OFFSET_ZOOM] <= zoom) continue;
|
|
1208
1260
|
data[i + OFFSET_ZOOM] = zoom;
|
|
@@ -1210,14 +1262,14 @@ class Supercluster {
|
|
|
1210
1262
|
// find all nearby points
|
|
1211
1263
|
const x = data[i];
|
|
1212
1264
|
const y = data[i + 1];
|
|
1213
|
-
const
|
|
1265
|
+
const neighborCount = tree.withinInto(x, y, r, neighborIds);
|
|
1214
1266
|
|
|
1215
1267
|
const numPointsOrigin = data[i + OFFSET_NUM];
|
|
1216
1268
|
let numPoints = numPointsOrigin;
|
|
1217
1269
|
|
|
1218
1270
|
// count the number of points in a potential cluster
|
|
1219
|
-
for (
|
|
1220
|
-
const k =
|
|
1271
|
+
for (let n = 0; n < neighborCount; n++) {
|
|
1272
|
+
const k = neighborIds[n] * stride;
|
|
1221
1273
|
// filter out neighbors that are already processed
|
|
1222
1274
|
if (data[k + OFFSET_ZOOM] > zoom) numPoints += data[k + OFFSET_NUM];
|
|
1223
1275
|
}
|
|
@@ -1231,10 +1283,10 @@ class Supercluster {
|
|
|
1231
1283
|
let clusterPropIndex = -1;
|
|
1232
1284
|
|
|
1233
1285
|
// encode both zoom and point index on which the cluster originated -- offset by total length of features
|
|
1234
|
-
const id = ((i / stride | 0) << 5) + (zoom + 1) + this.
|
|
1286
|
+
const id = ((i / stride | 0) << 5) + (zoom + 1) + this.numPoints;
|
|
1235
1287
|
|
|
1236
|
-
for (
|
|
1237
|
-
const k =
|
|
1288
|
+
for (let n = 0; n < neighborCount; n++) {
|
|
1289
|
+
const k = neighborIds[n] * stride;
|
|
1238
1290
|
|
|
1239
1291
|
if (data[k + OFFSET_ZOOM] <= zoom) continue;
|
|
1240
1292
|
data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)
|
|
@@ -1256,34 +1308,55 @@ class Supercluster {
|
|
|
1256
1308
|
}
|
|
1257
1309
|
|
|
1258
1310
|
data[i + OFFSET_PARENT] = id;
|
|
1259
|
-
|
|
1260
|
-
|
|
1311
|
+
out[cursor] = wx / numPoints;
|
|
1312
|
+
out[cursor + 1] = wy / numPoints;
|
|
1313
|
+
out[cursor + OFFSET_ZOOM] = notProcessed;
|
|
1314
|
+
out[cursor + OFFSET_ID] = id;
|
|
1315
|
+
out[cursor + OFFSET_PARENT] = -1;
|
|
1316
|
+
out[cursor + OFFSET_NUM] = numPoints;
|
|
1317
|
+
if (reduce) out[cursor + OFFSET_PROP] = clusterPropIndex;
|
|
1318
|
+
cursor += stride;
|
|
1261
1319
|
|
|
1262
1320
|
} else { // left points as unclustered
|
|
1263
|
-
for (let j = 0; j < stride; j++)
|
|
1321
|
+
for (let j = 0; j < stride; j++) out[cursor + j] = data[i + j];
|
|
1322
|
+
cursor += stride;
|
|
1264
1323
|
|
|
1265
1324
|
if (numPoints > 1) {
|
|
1266
|
-
for (
|
|
1267
|
-
const k =
|
|
1325
|
+
for (let n = 0; n < neighborCount; n++) {
|
|
1326
|
+
const k = neighborIds[n] * stride;
|
|
1268
1327
|
if (data[k + OFFSET_ZOOM] <= zoom) continue;
|
|
1269
1328
|
data[k + OFFSET_ZOOM] = zoom;
|
|
1270
|
-
for (let j = 0; j < stride; j++)
|
|
1329
|
+
for (let j = 0; j < stride; j++) out[cursor + j] = data[k + j];
|
|
1330
|
+
cursor += stride;
|
|
1271
1331
|
}
|
|
1272
1332
|
}
|
|
1273
1333
|
}
|
|
1274
1334
|
}
|
|
1275
1335
|
|
|
1276
|
-
return
|
|
1336
|
+
return cursor / stride;
|
|
1277
1337
|
}
|
|
1278
1338
|
|
|
1279
1339
|
// get index of the point from which the cluster originated
|
|
1280
1340
|
_getOriginId(clusterId) {
|
|
1281
|
-
return (clusterId - this.
|
|
1341
|
+
return (clusterId - this.numPoints) >> 5;
|
|
1282
1342
|
}
|
|
1283
1343
|
|
|
1284
1344
|
// get zoom of the point from which the cluster originated
|
|
1285
1345
|
_getOriginZoom(clusterId) {
|
|
1286
|
-
return (clusterId - this.
|
|
1346
|
+
return (clusterId - this.numPoints) % 32;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
_featureJSON(data, k) {
|
|
1350
|
+
const i = data[k + OFFSET_ID];
|
|
1351
|
+
const isCluster = data[k + OFFSET_NUM] > 1;
|
|
1352
|
+
const id = isCluster ? i : this.ids ? this.ids[i] : undefined;
|
|
1353
|
+
const properties = isCluster ? getClusterProperties(data, k, this.clusterProps) : this.props[i];
|
|
1354
|
+
const coordinates = isCluster ?
|
|
1355
|
+
[xLng(decode(data[k])), yLat(decode(data[k + 1]))] :
|
|
1356
|
+
[xLng(this.coords[2 * i]), yLat(this.coords[2 * i + 1])];
|
|
1357
|
+
const f = {type: 'Feature', properties, geometry: {type: 'Point', coordinates}};
|
|
1358
|
+
if (id !== undefined) f.id = id;
|
|
1359
|
+
return f;
|
|
1287
1360
|
}
|
|
1288
1361
|
|
|
1289
1362
|
_map(data, i, clone) {
|
|
@@ -1291,24 +1364,12 @@ class Supercluster {
|
|
|
1291
1364
|
const props = this.clusterProps[data[i + OFFSET_PROP]];
|
|
1292
1365
|
return clone ? Object.assign({}, props) : props;
|
|
1293
1366
|
}
|
|
1294
|
-
const original = this.
|
|
1367
|
+
const original = this.props[data[i + OFFSET_ID]];
|
|
1295
1368
|
const result = this.options.map(original);
|
|
1296
1369
|
return clone && result === original ? Object.assign({}, result) : result;
|
|
1297
1370
|
}
|
|
1298
1371
|
}
|
|
1299
1372
|
|
|
1300
|
-
function getClusterJSON(data, i, clusterProps) {
|
|
1301
|
-
return {
|
|
1302
|
-
type: 'Feature',
|
|
1303
|
-
id: data[i + OFFSET_ID],
|
|
1304
|
-
properties: getClusterProperties(data, i, clusterProps),
|
|
1305
|
-
geometry: {
|
|
1306
|
-
type: 'Point',
|
|
1307
|
-
coordinates: [xLng(data[i]), yLat(data[i + 1])]
|
|
1308
|
-
}
|
|
1309
|
-
};
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
1373
|
function getClusterProperties(data, i, clusterProps) {
|
|
1313
1374
|
const count = data[i + OFFSET_NUM];
|
|
1314
1375
|
const abbrev =
|
|
@@ -1316,11 +1377,12 @@ function getClusterProperties(data, i, clusterProps) {
|
|
|
1316
1377
|
count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count;
|
|
1317
1378
|
const propIndex = data[i + OFFSET_PROP];
|
|
1318
1379
|
const properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);
|
|
1380
|
+
|
|
1319
1381
|
return Object.assign(properties, {
|
|
1320
1382
|
cluster: true,
|
|
1321
|
-
cluster_id: data[i + OFFSET_ID],
|
|
1322
|
-
point_count: count,
|
|
1323
|
-
point_count_abbreviated: abbrev
|
|
1383
|
+
'cluster_id': data[i + OFFSET_ID],
|
|
1384
|
+
'point_count': count,
|
|
1385
|
+
'point_count_abbreviated': abbrev
|
|
1324
1386
|
});
|
|
1325
1387
|
}
|
|
1326
1388
|
|
|
@@ -2845,7 +2907,7 @@ const QMap = class {
|
|
|
2845
2907
|
const token = ++this.initializationToken;
|
|
2846
2908
|
this.setProviderStatus('initializing', undefined, false, true);
|
|
2847
2909
|
try {
|
|
2848
|
-
const leaflet = this.leaflet ?? (await import('./leaflet-src-
|
|
2910
|
+
const leaflet = this.leaflet ?? (await import('./leaflet-src-DYMWBqU1.js').then(function (n) { return n.L; }));
|
|
2849
2911
|
this.leaflet = leaflet;
|
|
2850
2912
|
if (token !== this.initializationToken || !this.canvas || !this.connected || !this.el.isConnected)
|
|
2851
2913
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-VFWyFa-_.js';
|
|
2
2
|
import { i as identifyItems } from './collection-identity-CGZPmEUB.js';
|
|
3
3
|
import { s as safeParseJson } from './utils-BJiYCN3i.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-VFWyFa-_.js';
|
|
2
2
|
|
|
3
3
|
const paginationCss = () => `:host{display:block;min-width:0;color:var(--q-pagination-fg, var(--q-fg-muted, #9ca3af));font-family:var(--q-font-family, inherit);font-size:var(--q-pagination-font-size, var(--q-font-size-sm, 0.8125rem));font-weight:var(--q-pagination-font-weight, 600)}.pagination{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between;gap:var(--q-pagination-gap, 12px);box-sizing:border-box;width:100%;min-width:0}.summary{min-width:0}.controls{display:inline-flex;flex:0 0 auto;align-items:center;gap:var(--q-pagination-controls-gap, 8px)}.page-button{box-sizing:border-box;min-height:var(--q-pagination-button-height, 30px);padding:var(--q-pagination-button-padding, 5px 8px);color:var(--q-pagination-button-fg, var(--q-fg-base, #f9fafb));border:var(--q-pagination-button-border, 1px solid var(--q-border-color, #374151));border-radius:var(--q-pagination-button-radius, var(--q-radius-sm, 4px));background:var(--q-pagination-button-bg, transparent);font:inherit;cursor:pointer;transition:background-color 150ms ease, border-color 150ms ease, color 150ms ease}.page-button:hover:not(:disabled){color:var(--q-pagination-button-hover-fg, var(--q-color-primary, #60a5fa));border-color:var(--q-pagination-button-hover-border, var(--q-color-primary, #60a5fa));background:var( --q-pagination-button-hover-bg, color-mix(in srgb, var(--q-fg-base, #f9fafb) 8%, transparent) )}.page-button:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}.page-button:disabled{opacity:0.45;cursor:not-allowed}.page-count{min-width:var(--q-pagination-page-count-width, 48px);text-align:center}@media (max-width: 480px){.pagination{align-items:flex-start;flex-direction:column}.controls{align-self:flex-end}}`;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, a as getElement, h } from './index-VFWyFa-_.js';
|
|
2
2
|
import { g as getSlottedElements } from './dom-ByfrUWx1.js';
|
|
3
3
|
|
|
4
4
|
const panelCss = () => `:host{display:block;min-width:0;min-height:0;box-sizing:border-box}:host([full-height]){height:100%}.panel{display:flex;flex-direction:column;min-width:0;min-height:0;width:100%;height:auto;box-sizing:border-box;overflow:hidden;color:var(--q-panel-fg, var(--q-fg-base, #f9fafb));font-family:var(--q-font-family, inherit)}.panel.is-full-height{height:100%}.variant-plain{background:transparent;border:0}.variant-surface{background:var(--q-panel-bg, var(--q-bg-surface-1, #1f2937))}.variant-bordered{background:var(--q-panel-bg, var(--q-bg-surface-1, #1f2937));border:var(--q-panel-border, var(--q-border, 1px solid var(--q-border-color, #374151)));border-radius:var(--q-panel-radius, var(--q-radius-md, 7px))}.panel.has-no-borders{border:0}.panel-header,.panel-footer{flex:0 0 auto;display:block;padding:var(--q-panel-header-padding, var(--q-padding-lg, 16px));background:var(--q-panel-header-bg, transparent);z-index:1}.panel-header{border-bottom:var(--q-panel-divider, 1px solid transparent)}.panel-footer{border-top:var(--q-panel-divider, 1px solid transparent)}.uses-sticky-scroll{overflow:auto}.uses-sticky-scroll .panel-body{overflow:visible}.uses-sticky-scroll.has-sticky-header .panel-header{position:sticky;top:0}.uses-sticky-scroll.has-sticky-footer .panel-footer{position:sticky;bottom:0}.panel-header.is-hidden,.panel-footer.is-hidden{display:none}.panel-body{flex:1 1 auto;min-width:0;min-height:0;box-sizing:border-box}.is-scrollable .panel-body{overflow:auto}.padding-none .panel-body{padding:0}.padding-sm .panel-body{padding:var(--q-panel-padding-sm, var(--q-padding-sm, 4px))}.padding-md .panel-body{padding:var(--q-panel-padding-md, var(--q-padding-md, 9px))}.padding-lg .panel-body{padding:var(--q-panel-padding-lg, var(--q-padding-lg, 16px))}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-VFWyFa-_.js';
|
|
2
2
|
import { i as identifyItems } from './collection-identity-CGZPmEUB.js';
|
|
3
3
|
import { s as safeParseJson } from './utils-BJiYCN3i.js';
|
|
4
4
|
|
package/dist/esm/q-reel.entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-VFWyFa-_.js';
|
|
2
2
|
import { g as getSlottedElements, h as handleTabTrap, s as safeFocus } from './dom-ByfrUWx1.js';
|
|
3
3
|
|
|
4
4
|
const reelCss = () => `:host{display:block;box-sizing:border-box;width:100%}.reel-container{display:grid;box-sizing:border-box}.layout-grid{grid-gap:var(--q-reel-gap, 16px);grid-template-columns:var(--q-reel-columns-mobile, repeat(auto-fill, minmax(140px, 1fr)))}@media (min-width: 768px){.layout-grid{grid-template-columns:var(--q-reel-columns-desktop, repeat(auto-fill, minmax(220px, 1fr)))}}.layout-carousel{display:flex;flex-direction:row;overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:var(--q-reel-gap, 16px);padding-bottom:8px}.layout-carousel::-webkit-scrollbar{height:6px}.layout-carousel::-webkit-scrollbar-track{background:var(--q-bg-surface-1, #1f2937);border-radius:3px}.layout-carousel::-webkit-scrollbar-thumb{background:var(--q-bg-surface-3, #4b5563);border-radius:3px}.layout-carousel ::slotted(q-thumbnail){flex:0 0 auto;scroll-snap-align:start}.lightbox-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:var(--q-bg-overlay, rgba(0, 0, 0, 0.85));z-index:9999;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:40px;animation:fade-in var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.lightbox-close{position:absolute;top:20px;right:20px;background:rgba(0, 0, 0, 0.5);background:var(--q-reel-lightbox-btn-bg, rgba(0, 0, 0, 0.5));border:1px solid rgba(255, 255, 255, 0.2);border:var(--q-reel-lightbox-btn-border, 1px solid rgba(255, 255, 255, 0.2));border-radius:50%;width:40px;height:40px;color:#ffffff;color:var(--q-reel-lightbox-btn-color, #ffffff);display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;z-index:10000;transition:background var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.lightbox-close:hover{background:rgba(255, 255, 255, 0.2);background:var(--q-reel-lightbox-btn-hover-bg, rgba(255, 255, 255, 0.2))}.lightbox-close:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}.lightbox-close svg{width:20px;height:20px}.lightbox-prev,.lightbox-next{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0, 0, 0, 0.5);background:var(--q-reel-lightbox-btn-bg, rgba(0, 0, 0, 0.5));border:1px solid rgba(255, 255, 255, 0.2);border:var(--q-reel-lightbox-btn-border, 1px solid rgba(255, 255, 255, 0.2));border-radius:50%;width:44px;height:44px;color:#ffffff;color:var(--q-reel-lightbox-btn-color, #ffffff);display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;z-index:10000;transition:background var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1)), transform var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.lightbox-prev{left:20px}.lightbox-next{right:20px}.lightbox-prev:hover,.lightbox-next:hover{background:rgba(255, 255, 255, 0.2);background:var(--q-reel-lightbox-btn-hover-bg, rgba(255, 255, 255, 0.2))}.lightbox-prev:focus-visible,.lightbox-next:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}.lightbox-prev svg,.lightbox-next svg{width:24px;height:24px}.lightbox-content{position:relative;max-width:var(--q-lightbox-max-size, 85%);max-height:var(--q-lightbox-max-size, 85%);display:flex;flex-direction:column;align-items:center;z-index:9999}.lightbox-media{max-width:100%;max-height:80vh;border-radius:var(--q-radius-lg, 11px);border:1px solid rgba(255, 255, 255, 0.15);object-fit:contain;box-shadow:0 20px 45px rgba(0, 0, 0, 0.6)}.lightbox-caption{margin-top:16px;font-family:var(--q-font-family, inherit);font-size:var(--q-font-size-base, 0.9rem);font-weight:var(--q-font-weight-bold, 600);color:#ffffff;background:rgba(0, 0, 0, 0.7);padding:8px 16px;border-radius:var(--q-radius-md, 8px);text-align:center;border:1px solid rgba(255, 255, 255, 0.1)}@keyframes fade-in{from{opacity:0}to{opacity:1}}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-VFWyFa-_.js';
|
|
2
2
|
|
|
3
3
|
function getScrollMetrics(viewport) {
|
|
4
4
|
if (!viewport) {
|