@mosaicajs/components 0.1.0-rc.4 → 0.1.0
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/artifact-card.d.ts +20 -26
- package/dist/artifact-card.js +20 -26
- package/dist/base.d.ts +21 -29
- package/dist/base.js +18 -26
- package/dist/basemap.d.ts +2 -2
- package/dist/cluster-filter.d.ts +19 -25
- package/dist/cluster-filter.js +19 -25
- package/dist/colour-editor.d.ts +16 -36
- package/dist/colour-editor.js +16 -36
- package/dist/context.d.ts +4 -4
- package/dist/context.js +4 -4
- package/dist/count.d.ts +16 -15
- package/dist/count.js +16 -15
- package/dist/events.d.ts +63 -68
- package/dist/explorer.d.ts +76 -119
- package/dist/explorer.js +76 -121
- package/dist/field-card.d.ts +24 -56
- package/dist/field-card.js +24 -56
- package/dist/filter-panel.d.ts +31 -45
- package/dist/filter-panel.js +31 -45
- package/dist/filter.d.ts +20 -28
- package/dist/filter.js +20 -28
- package/dist/hierarchy.d.ts +35 -36
- package/dist/hierarchy.js +35 -36
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/item-card.d.ts +34 -55
- package/dist/item-card.js +34 -55
- package/dist/key-picker.d.ts +5 -5
- package/dist/key-picker.js +5 -5
- package/dist/layer-picker.d.ts +11 -9
- package/dist/layer-picker.js +11 -9
- package/dist/map.d.ts +134 -172
- package/dist/map.js +136 -188
- package/dist/mosaica-components.js +5599 -1594
- package/dist/mosaica-components.js.LICENSE.txt +80 -16
- package/dist/mosaica-components.js.sri +1 -1
- package/dist/mosaica-components.json +2 -2
- package/dist/parts.d.ts +3 -4
- package/dist/parts.js +3 -4
- package/dist/selection.d.ts +21 -27
- package/dist/selection.js +21 -27
- package/dist/states.d.ts +15 -20
- package/dist/status.d.ts +26 -38
- package/dist/status.js +26 -38
- package/dist/store-element.d.ts +8 -7
- package/dist/store-element.js +8 -7
- package/dist/tokens.d.ts +12 -13
- package/dist/tokens.js +12 -13
- package/dist/view-picker.d.ts +10 -6
- package/dist/view-picker.js +10 -6
- package/package.json +6 -6
|
@@ -3,7 +3,7 @@ its licence and the licence text it is distributed with.
|
|
|
3
3
|
|
|
4
4
|
--------------------------------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
@deck.gl/aggregation-layers@9.
|
|
6
|
+
@deck.gl/aggregation-layers@9.4.0
|
|
7
7
|
Licence: MIT
|
|
8
8
|
|
|
9
9
|
Copyright Vis.gl contributors.
|
|
@@ -28,7 +28,7 @@ THE SOFTWARE.
|
|
|
28
28
|
|
|
29
29
|
--------------------------------------------------------------------------------
|
|
30
30
|
|
|
31
|
-
@deck.gl/core@9.
|
|
31
|
+
@deck.gl/core@9.4.0
|
|
32
32
|
Licence: MIT
|
|
33
33
|
|
|
34
34
|
Copyright Vis.gl contributors.
|
|
@@ -53,7 +53,7 @@ THE SOFTWARE.
|
|
|
53
53
|
|
|
54
54
|
--------------------------------------------------------------------------------
|
|
55
55
|
|
|
56
|
-
@deck.gl/layers@9.
|
|
56
|
+
@deck.gl/layers@9.4.0
|
|
57
57
|
Licence: MIT
|
|
58
58
|
|
|
59
59
|
Copyright Vis.gl contributors.
|
|
@@ -146,7 +146,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
146
146
|
|
|
147
147
|
--------------------------------------------------------------------------------
|
|
148
148
|
|
|
149
|
-
@loaders.gl/core@4.4
|
|
149
|
+
@loaders.gl/core@4.5.4
|
|
150
150
|
Licence: MIT
|
|
151
151
|
|
|
152
152
|
loaders.gl is licensed under the MIT license
|
|
@@ -192,7 +192,7 @@ See the License for the specific language governing permissions and limitations
|
|
|
192
192
|
|
|
193
193
|
--------------------------------------------------------------------------------
|
|
194
194
|
|
|
195
|
-
@loaders.gl/images@4.4
|
|
195
|
+
@loaders.gl/images@4.5.4
|
|
196
196
|
Licence: MIT
|
|
197
197
|
|
|
198
198
|
loaders.gl is licensed under the MIT license
|
|
@@ -238,7 +238,7 @@ See the License for the specific language governing permissions and limitations
|
|
|
238
238
|
|
|
239
239
|
--------------------------------------------------------------------------------
|
|
240
240
|
|
|
241
|
-
@loaders.gl/loader-utils@4.4
|
|
241
|
+
@loaders.gl/loader-utils@4.5.4
|
|
242
242
|
Licence: MIT
|
|
243
243
|
|
|
244
244
|
loaders.gl is licensed under the MIT license
|
|
@@ -284,7 +284,7 @@ See the License for the specific language governing permissions and limitations
|
|
|
284
284
|
|
|
285
285
|
--------------------------------------------------------------------------------
|
|
286
286
|
|
|
287
|
-
@loaders.gl/worker-utils@4.4
|
|
287
|
+
@loaders.gl/worker-utils@4.5.4
|
|
288
288
|
Licence: MIT
|
|
289
289
|
|
|
290
290
|
loaders.gl is licensed under the MIT license
|
|
@@ -330,7 +330,7 @@ See the License for the specific language governing permissions and limitations
|
|
|
330
330
|
|
|
331
331
|
--------------------------------------------------------------------------------
|
|
332
332
|
|
|
333
|
-
@luma.gl/core@9.
|
|
333
|
+
@luma.gl/core@9.4.2
|
|
334
334
|
Licence: MIT
|
|
335
335
|
|
|
336
336
|
luma.gl is provided under the MIT license
|
|
@@ -347,6 +347,11 @@ This software includes adaptations of some postprocessing code from
|
|
|
347
347
|
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
348
348
|
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
349
349
|
|
|
350
|
+
This software includes adaptations of Gaussian-splat rendering and
|
|
351
|
+
level-of-detail behavior from Spark (https://github.com/sparkjsdev/spark)
|
|
352
|
+
under MIT license.
|
|
353
|
+
Spark parts Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
|
|
354
|
+
|
|
350
355
|
Additional attribution given in specific source files.
|
|
351
356
|
|
|
352
357
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -369,7 +374,7 @@ THE SOFTWARE.
|
|
|
369
374
|
|
|
370
375
|
--------------------------------------------------------------------------------
|
|
371
376
|
|
|
372
|
-
@luma.gl/engine@9.
|
|
377
|
+
@luma.gl/engine@9.4.2
|
|
373
378
|
Licence: MIT
|
|
374
379
|
|
|
375
380
|
luma.gl is provided under the MIT license
|
|
@@ -386,6 +391,11 @@ This software includes adaptations of some postprocessing code from
|
|
|
386
391
|
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
387
392
|
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
388
393
|
|
|
394
|
+
This software includes adaptations of Gaussian-splat rendering and
|
|
395
|
+
level-of-detail behavior from Spark (https://github.com/sparkjsdev/spark)
|
|
396
|
+
under MIT license.
|
|
397
|
+
Spark parts Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
|
|
398
|
+
|
|
389
399
|
Additional attribution given in specific source files.
|
|
390
400
|
|
|
391
401
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -408,7 +418,7 @@ THE SOFTWARE.
|
|
|
408
418
|
|
|
409
419
|
--------------------------------------------------------------------------------
|
|
410
420
|
|
|
411
|
-
@luma.gl/
|
|
421
|
+
@luma.gl/gpgpu@9.4.2
|
|
412
422
|
Licence: MIT
|
|
413
423
|
|
|
414
424
|
luma.gl is provided under the MIT license
|
|
@@ -425,6 +435,11 @@ This software includes adaptations of some postprocessing code from
|
|
|
425
435
|
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
426
436
|
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
427
437
|
|
|
438
|
+
This software includes adaptations of Gaussian-splat rendering and
|
|
439
|
+
level-of-detail behavior from Spark (https://github.com/sparkjsdev/spark)
|
|
440
|
+
under MIT license.
|
|
441
|
+
Spark parts Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
|
|
442
|
+
|
|
428
443
|
Additional attribution given in specific source files.
|
|
429
444
|
|
|
430
445
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -447,7 +462,7 @@ THE SOFTWARE.
|
|
|
447
462
|
|
|
448
463
|
--------------------------------------------------------------------------------
|
|
449
464
|
|
|
450
|
-
@luma.gl/
|
|
465
|
+
@luma.gl/shadertools@9.4.2
|
|
451
466
|
Licence: MIT
|
|
452
467
|
|
|
453
468
|
luma.gl is provided under the MIT license
|
|
@@ -464,6 +479,55 @@ This software includes adaptations of some postprocessing code from
|
|
|
464
479
|
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
465
480
|
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
466
481
|
|
|
482
|
+
This software includes adaptations of Gaussian-splat rendering and
|
|
483
|
+
level-of-detail behavior from Spark (https://github.com/sparkjsdev/spark)
|
|
484
|
+
under MIT license.
|
|
485
|
+
Spark parts Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
|
|
486
|
+
|
|
487
|
+
Additional attribution given in specific source files.
|
|
488
|
+
|
|
489
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
490
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
491
|
+
in the Software without restriction, including without limitation the rights
|
|
492
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
493
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
494
|
+
furnished to do so, subject to the following conditions:
|
|
495
|
+
|
|
496
|
+
The above copyright notice and this permission notice shall be included in
|
|
497
|
+
all copies or substantial portions of the Software.
|
|
498
|
+
|
|
499
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
500
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
501
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
502
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
503
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
504
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
505
|
+
THE SOFTWARE.
|
|
506
|
+
|
|
507
|
+
--------------------------------------------------------------------------------
|
|
508
|
+
|
|
509
|
+
@luma.gl/webgl@9.4.2
|
|
510
|
+
Licence: MIT
|
|
511
|
+
|
|
512
|
+
luma.gl is provided under the MIT license
|
|
513
|
+
|
|
514
|
+
Copyright (c) 2020 vis.gl contributors
|
|
515
|
+
|
|
516
|
+
This software includes parts initially developed by Uber and open sourced under MIT license.
|
|
517
|
+
Copyright (c) 2015 Uber Technologies, Inc.
|
|
518
|
+
|
|
519
|
+
This software includes parts of PhiloGL (https://github.com/philogb/philogl)
|
|
520
|
+
under MIT license. PhiloGL parts Copyright © 2013 Sencha Labs.
|
|
521
|
+
|
|
522
|
+
This software includes adaptations of some postprocessing code from
|
|
523
|
+
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
524
|
+
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
525
|
+
|
|
526
|
+
This software includes adaptations of Gaussian-splat rendering and
|
|
527
|
+
level-of-detail behavior from Spark (https://github.com/sparkjsdev/spark)
|
|
528
|
+
under MIT license.
|
|
529
|
+
Spark parts Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
|
|
530
|
+
|
|
467
531
|
Additional attribution given in specific source files.
|
|
468
532
|
|
|
469
533
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -486,7 +550,7 @@ THE SOFTWARE.
|
|
|
486
550
|
|
|
487
551
|
--------------------------------------------------------------------------------
|
|
488
552
|
|
|
489
|
-
@mapbox/tiny-sdf@2.
|
|
553
|
+
@mapbox/tiny-sdf@2.3.0
|
|
490
554
|
Licence: BSD-2-Clause
|
|
491
555
|
|
|
492
556
|
BSD-2-Clause
|
|
@@ -881,7 +945,7 @@ Cesium-derived code can be found in the submodule: modules/3d-tiles
|
|
|
881
945
|
|
|
882
946
|
--------------------------------------------------------------------------------
|
|
883
947
|
|
|
884
|
-
@probe.gl/env@4.1.
|
|
948
|
+
@probe.gl/env@4.1.2
|
|
885
949
|
Licence: MIT
|
|
886
950
|
|
|
887
951
|
Copyright Vis.gl contributors.
|
|
@@ -906,7 +970,7 @@ THE SOFTWARE.
|
|
|
906
970
|
|
|
907
971
|
--------------------------------------------------------------------------------
|
|
908
972
|
|
|
909
|
-
@probe.gl/log@4.1.
|
|
973
|
+
@probe.gl/log@4.1.2
|
|
910
974
|
Licence: MIT
|
|
911
975
|
|
|
912
976
|
Copyright Vis.gl contributors.
|
|
@@ -931,7 +995,7 @@ THE SOFTWARE.
|
|
|
931
995
|
|
|
932
996
|
--------------------------------------------------------------------------------
|
|
933
997
|
|
|
934
|
-
@probe.gl/stats@4.1.
|
|
998
|
+
@probe.gl/stats@4.1.2
|
|
935
999
|
Licence: MIT
|
|
936
1000
|
|
|
937
1001
|
Copyright Vis.gl contributors.
|
|
@@ -1528,7 +1592,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
1528
1592
|
|
|
1529
1593
|
--------------------------------------------------------------------------------
|
|
1530
1594
|
|
|
1531
|
-
mjolnir.js@3.
|
|
1595
|
+
mjolnir.js@3.1.1
|
|
1532
1596
|
Licence: MIT
|
|
1533
1597
|
|
|
1534
1598
|
MIT License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
sha384-
|
|
1
|
+
sha384-6EQhQsMgHJEiAjNNj1/HvEuFRrHLIEDd7N47ufKkXI3Zupi3ISVLqPzMNRZTn3ar
|
package/dist/parts.d.ts
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* item card's title is `::part(item-card-title)`.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
* The parts each element may render, by element name without `mosaica
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* rendered.
|
|
8
|
+
* The parts each element may render, by element name without `mosaica-`. If you render an element
|
|
9
|
+
* inside your own shadow root, forward `PARTS[name]` with `exportparts` so the page can style those
|
|
10
|
+
* parts from outside.
|
|
12
11
|
*/
|
|
13
12
|
export declare const PARTS: {
|
|
14
13
|
readonly map: readonly ["attribution", "canvas", "controls", "density-key", "note", "overlay", "region-tag", "tooltip", ...string[]];
|
package/dist/parts.js
CHANGED
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
/** What `renderState` draws, in every element that shows a state. */
|
|
8
8
|
const STATE = ['state', 'refusal', 'reason', 'refresh', 'retry', 'reauthorise'];
|
|
9
9
|
/**
|
|
10
|
-
* The parts each element may render, by element name without `mosaica
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* rendered.
|
|
10
|
+
* The parts each element may render, by element name without `mosaica-`. If you render an element
|
|
11
|
+
* inside your own shadow root, forward `PARTS[name]` with `exportparts` so the page can style those
|
|
12
|
+
* parts from outside.
|
|
14
13
|
*/
|
|
15
14
|
export const PARTS = {
|
|
16
15
|
map: ['attribution', 'canvas', 'controls', 'density-key', 'note', 'overlay', 'region-tag', 'tooltip', ...STATE],
|
package/dist/selection.d.ts
CHANGED
|
@@ -3,48 +3,42 @@ import { type RegionProjection } from '@mosaicajs/client';
|
|
|
3
3
|
import { MosaicaElement } from './base.js';
|
|
4
4
|
import './count.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* other filter narrows the view. Clicking a listed mark picks it. *Outside* flips the selection to its
|
|
11
|
-
* complement, and *Clear* drops it.
|
|
6
|
+
* Use the selection card beside a map so that viewers can see what is inside the region they have
|
|
7
|
+
* drawn. It reads the store's selected region, or the `region` you set. It counts the items inside
|
|
8
|
+
* that the filters match, the items the viewer may see there and the marks drawn there. The drawn
|
|
9
|
+
* marks are listed below the counts, and clicking one picks it.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* The region acts as a filter, which means the map and every other count narrow to it once it
|
|
12
|
+
* settles. Outside flips it to everything outside the shape, and Clear removes it. The counts are
|
|
13
|
+
* approximate when the server had to count an area around the shape, and the state line's tooltip
|
|
14
|
+
* says when that is so. Export and Save as artifact are shown disabled because they are not
|
|
15
|
+
* available yet.
|
|
17
16
|
*
|
|
18
|
-
* A
|
|
19
|
-
* *Export* and *Save as artifact*, which need server routes; their buttons are disabled with the
|
|
20
|
-
* reason on hover.
|
|
21
|
-
*
|
|
22
|
-
* @summary The selected region's counts, marks and actions.
|
|
17
|
+
* @summary A card showing the counts and marks inside the selected region.
|
|
23
18
|
* @tagname mosaica-selection
|
|
24
19
|
* @category Elements
|
|
25
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-selectchange']>} mosaica-selectchange - Clear
|
|
26
|
-
*
|
|
27
|
-
* pressed.
|
|
20
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-selectchange']>} mosaica-selectchange - Clear,
|
|
21
|
+
* Outside or Inside was pressed.
|
|
28
22
|
* @csspart title - The heading, with the shape's kind.
|
|
29
|
-
* @csspart state - The state line, with `data-state
|
|
30
|
-
*
|
|
23
|
+
* @csspart state - The state line, with `data-state`. Its tooltip says whether the counts are exact
|
|
24
|
+
* for the shape.
|
|
31
25
|
* @csspart refusal - The words "Selection refused", or "Server busy", with `data-code` set to the
|
|
32
26
|
* refusal's code.
|
|
33
|
-
* @csspart reason - The server's reason for the refusal,
|
|
34
|
-
* @csspart retry - The Retry button,
|
|
27
|
+
* @csspart reason - The server's reason for the refusal, under "Selection refused".
|
|
28
|
+
* @csspart retry - The Retry button, shown if the server was too busy to count the selection.
|
|
35
29
|
* @csspart counts - The counts.
|
|
36
30
|
* @csspart count-served - The `<mosaica-count>` of marks shown inside.
|
|
37
|
-
* @csspart count-matched - The `<mosaica-count>`
|
|
38
|
-
* @csspart count-visible - The `<mosaica-count>`
|
|
31
|
+
* @csspart count-matched - The `<mosaica-count>` of items the filters match inside (or outside).
|
|
32
|
+
* @csspart count-visible - The `<mosaica-count>` of items the viewer may see inside (or outside).
|
|
39
33
|
* @csspart label - The heading above the list.
|
|
40
|
-
* @csspart items - The list of
|
|
41
|
-
* @csspart item - One
|
|
34
|
+
* @csspart items - The list of drawn marks inside.
|
|
35
|
+
* @csspart item - One drawn mark, by `mosaica_id`.
|
|
42
36
|
* @csspart actions - The action buttons.
|
|
43
37
|
* @csspart action - One action button.
|
|
44
38
|
*/
|
|
45
39
|
export declare class MosaicaSelection extends MosaicaElement {
|
|
46
40
|
static styles: import("lit").CSSResult[];
|
|
47
|
-
/**
|
|
41
|
+
/** A region to show instead of the store's `region` projection. */
|
|
48
42
|
accessor region: RegionProjection | null;
|
|
49
43
|
private get shown();
|
|
50
44
|
render(): TemplateResult | typeof nothing;
|
package/dist/selection.js
CHANGED
|
@@ -42,42 +42,36 @@ import { reasonOf, refusedState, renderState, stateOf } from './states.js';
|
|
|
42
42
|
import { chrome, tokens } from './tokens.js';
|
|
43
43
|
import './count.js';
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* other filter narrows the view. Clicking a listed mark picks it. *Outside* flips the selection to its
|
|
50
|
-
* complement, and *Clear* drops it.
|
|
45
|
+
* Use the selection card beside a map so that viewers can see what is inside the region they have
|
|
46
|
+
* drawn. It reads the store's selected region, or the `region` you set. It counts the items inside
|
|
47
|
+
* that the filters match, the items the viewer may see there and the marks drawn there. The drawn
|
|
48
|
+
* marks are listed below the counts, and clicking one picks it.
|
|
51
49
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
50
|
+
* The region acts as a filter, which means the map and every other count narrow to it once it
|
|
51
|
+
* settles. Outside flips it to everything outside the shape, and Clear removes it. The counts are
|
|
52
|
+
* approximate when the server had to count an area around the shape, and the state line's tooltip
|
|
53
|
+
* says when that is so. Export and Save as artifact are shown disabled because they are not
|
|
54
|
+
* available yet.
|
|
56
55
|
*
|
|
57
|
-
* A
|
|
58
|
-
* *Export* and *Save as artifact*, which need server routes; their buttons are disabled with the
|
|
59
|
-
* reason on hover.
|
|
60
|
-
*
|
|
61
|
-
* @summary The selected region's counts, marks and actions.
|
|
56
|
+
* @summary A card showing the counts and marks inside the selected region.
|
|
62
57
|
* @tagname mosaica-selection
|
|
63
58
|
* @category Elements
|
|
64
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-selectchange']>} mosaica-selectchange - Clear
|
|
65
|
-
*
|
|
66
|
-
* pressed.
|
|
59
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-selectchange']>} mosaica-selectchange - Clear,
|
|
60
|
+
* Outside or Inside was pressed.
|
|
67
61
|
* @csspart title - The heading, with the shape's kind.
|
|
68
|
-
* @csspart state - The state line, with `data-state
|
|
69
|
-
*
|
|
62
|
+
* @csspart state - The state line, with `data-state`. Its tooltip says whether the counts are exact
|
|
63
|
+
* for the shape.
|
|
70
64
|
* @csspart refusal - The words "Selection refused", or "Server busy", with `data-code` set to the
|
|
71
65
|
* refusal's code.
|
|
72
|
-
* @csspart reason - The server's reason for the refusal,
|
|
73
|
-
* @csspart retry - The Retry button,
|
|
66
|
+
* @csspart reason - The server's reason for the refusal, under "Selection refused".
|
|
67
|
+
* @csspart retry - The Retry button, shown if the server was too busy to count the selection.
|
|
74
68
|
* @csspart counts - The counts.
|
|
75
69
|
* @csspart count-served - The `<mosaica-count>` of marks shown inside.
|
|
76
|
-
* @csspart count-matched - The `<mosaica-count>`
|
|
77
|
-
* @csspart count-visible - The `<mosaica-count>`
|
|
70
|
+
* @csspart count-matched - The `<mosaica-count>` of items the filters match inside (or outside).
|
|
71
|
+
* @csspart count-visible - The `<mosaica-count>` of items the viewer may see inside (or outside).
|
|
78
72
|
* @csspart label - The heading above the list.
|
|
79
|
-
* @csspart items - The list of
|
|
80
|
-
* @csspart item - One
|
|
73
|
+
* @csspart items - The list of drawn marks inside.
|
|
74
|
+
* @csspart item - One drawn mark, by `mosaica_id`.
|
|
81
75
|
* @csspart actions - The action buttons.
|
|
82
76
|
* @csspart action - One action button.
|
|
83
77
|
*/
|
|
@@ -133,7 +127,7 @@ let MosaicaSelection = (() => {
|
|
|
133
127
|
`
|
|
134
128
|
];
|
|
135
129
|
#region_accessor_storage = __runInitializers(this, _region_initializers, null);
|
|
136
|
-
/**
|
|
130
|
+
/** A region to show instead of the store's `region` projection. */
|
|
137
131
|
get region() { return this.#region_accessor_storage; }
|
|
138
132
|
set region(value) { this.#region_accessor_storage = value; }
|
|
139
133
|
get shown() {
|
package/dist/states.d.ts
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import { nothing, type TemplateResult } from 'lit';
|
|
2
2
|
import type { Refusal, Store, StatusProjection } from '@mosaicajs/client';
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
5
|
-
* `data-state` set to
|
|
6
|
-
* projection:
|
|
4
|
+
* The state of a panel. Every element shows its state in its `part="state"` element, with
|
|
5
|
+
* `data-state` set to one of these, so one CSS rule can style the same state across every panel.
|
|
7
6
|
*
|
|
8
|
-
* |
|
|
7
|
+
* | State | Meaning |
|
|
9
8
|
* |---|---|
|
|
10
|
-
* | detached | no store |
|
|
11
|
-
* | loading |
|
|
12
|
-
* | retrying |
|
|
13
|
-
* | shown |
|
|
14
|
-
* | empty |
|
|
15
|
-
* | refused |
|
|
16
|
-
* | unanswered |
|
|
17
|
-
* | busy |
|
|
18
|
-
* | expired |
|
|
19
|
-
* | stale |
|
|
9
|
+
* | `detached` | The element has no store. |
|
|
10
|
+
* | `loading` | The store is connecting or fetching. |
|
|
11
|
+
* | `retrying` | The server cannot be reached, or the store is asking again. What is drawn stays. |
|
|
12
|
+
* | `shown` | The panel shows the server's answer. |
|
|
13
|
+
* | `empty` | The server answered, with nothing to show. |
|
|
14
|
+
* | `refused` | The server refused the request. |
|
|
15
|
+
* | `unanswered` | The server failed with a `5xx` that is not a Mosaica error, such as a gateway's `504`. |
|
|
16
|
+
* | `busy` | The server is too busy (`429`), even after the store's retries. |
|
|
17
|
+
* | `expired` | The session expired: the token is past its expiry, or the server no longer accepts it. |
|
|
18
|
+
* | `stale` | The panel shows an answer, but the data has changed since it was fetched. Refresh fetches it again. |
|
|
20
19
|
*
|
|
21
|
-
* `
|
|
22
|
-
*
|
|
23
|
-
* `unanswered` is a server error that says nothing about this viewer, so it is not shown as a
|
|
24
|
-
* refusal; the store does not ask again until Retry. `busy` is the server shedding load, which says
|
|
25
|
-
* nothing about this viewer either, and the store does not ask again until Retry.
|
|
26
|
-
* `stale` is `shown` with the picture older than the numbers.
|
|
20
|
+
* In the `unanswered` and `busy` states the store does not ask again until the viewer presses
|
|
21
|
+
* Retry.
|
|
27
22
|
*/
|
|
28
23
|
export type PanelState = 'detached' | 'loading' | 'retrying' | 'shown' | 'empty' | 'refused' | 'unanswered' | 'busy' | 'expired' | 'stale';
|
|
29
24
|
export declare function stateOf(status: StatusProjection | null | undefined): PanelState;
|
package/dist/status.d.ts
CHANGED
|
@@ -2,61 +2,49 @@ import { nothing, type TemplateResult } from 'lit';
|
|
|
2
2
|
import { MosaicaElement } from './base.js';
|
|
3
3
|
import './count.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* date the first cell is a dot alone, titled "Up to date", and while it updates a grey dot alone,
|
|
11
|
-
* titled "Updating", so the strip keeps its width through a pan. Where the viewer can see no item in
|
|
12
|
-
* the view at all, it is a grey dot alone titled "Nothing visible to you", which the map says in
|
|
13
|
-
* words. Otherwise it names the state in two or three words beside its dot (Connecting,
|
|
14
|
-
* Reconnecting, Server unreachable, Server did not answer, Server busy, Nothing in view, Data
|
|
15
|
-
* updated, View refused, Session expired) with the action the state offers: Refresh when the data
|
|
16
|
-
* changed, Retry when the view was refused, the server did not answer or is too busy, and Sign in
|
|
17
|
-
* on expiry where `reauthorise` is set. View refused has the server's reason on a line under it.
|
|
18
|
-
* The counts grey out while they are not current. The strip sizes to its content and does not
|
|
19
|
-
* wrap. `compact` shortens the figures (`16.8M of 21.4M match`) and drops the shown count.
|
|
20
|
-
* `expanded` renders the figures again as a card below the strip.
|
|
5
|
+
* Use the status line with a map so that viewers know whether what they see is current and how much
|
|
6
|
+
* of the data it covers. A typical line reads `● | 16,822,190 of 21,406,522 match | 5,390 shown`,
|
|
7
|
+
* where the first figure is the items the filters match out of those the viewer may see. The
|
|
8
|
+
* figures count the camera's box, or the selected region while there is one. While a highlight is
|
|
9
|
+
* set, the counts cell reads `N highlighted of M`.
|
|
21
10
|
*
|
|
22
|
-
*
|
|
23
|
-
* the
|
|
24
|
-
*
|
|
25
|
-
* store's `status.refusal`, which `mosaica-statechange` carries, and the refusal's code is on the
|
|
26
|
-
* refusal part's `data-code`.
|
|
11
|
+
* While the view is up to date, the first cell is a dot alone. When something goes wrong, the cell
|
|
12
|
+
* names the state and offers a button if the viewer can act, such as Retry when the server is busy.
|
|
13
|
+
* Sign in appears when the session expires only if you have set `reauthorise`.
|
|
27
14
|
*
|
|
28
|
-
*
|
|
15
|
+
* Screen readers announce a refusal or an expiry, because the state cell is an `aria-live` region.
|
|
16
|
+
* The counts sit outside it, so they are not read out every time the map pans.
|
|
17
|
+
*
|
|
18
|
+
* @summary A status line showing whether the map is up to date and how many items it shows.
|
|
29
19
|
* @tagname mosaica-status
|
|
30
20
|
* @category Elements
|
|
31
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-statechange']>} mosaica-statechange -
|
|
32
|
-
*
|
|
33
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-expired']>} mosaica-expired -
|
|
34
|
-
*
|
|
21
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-statechange']>} mosaica-statechange - The panel
|
|
22
|
+
* state changed, including on the first render.
|
|
23
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-expired']>} mosaica-expired - The session expired.
|
|
24
|
+
* Fires once each time.
|
|
35
25
|
* @csspart strip - The one-line strip.
|
|
36
26
|
* @csspart state - The state's dot and words, with `data-state` set to the panel state.
|
|
37
27
|
* @csspart refusal - The words "View refused", or "Server busy", with `data-code` set to the
|
|
38
28
|
* refusal's code.
|
|
39
|
-
* @csspart reason - The server's reason for a refusal,
|
|
40
|
-
*
|
|
41
|
-
* @csspart
|
|
42
|
-
* @csspart
|
|
43
|
-
* too busy.
|
|
44
|
-
* @csspart reauthorise - The Sign in button, on expiry where `reauthorise` is set.
|
|
29
|
+
* @csspart reason - The server's reason for a refusal, under "View refused".
|
|
30
|
+
* @csspart refresh - The Refresh button, shown when the data has changed.
|
|
31
|
+
* @csspart retry - The Retry button, after a refusal, no answer or a busy server.
|
|
32
|
+
* @csspart reauthorise - The Sign in button, shown on expiry if `reauthorise` is set.
|
|
45
33
|
* @csspart count-shown - The `<mosaica-count>` of marks shown.
|
|
46
|
-
* @csspart count-matched - The `<mosaica-count>`
|
|
47
|
-
* @csspart count-highlighted - The `<mosaica-count>`
|
|
34
|
+
* @csspart count-matched - The `<mosaica-count>` of items the filters match.
|
|
35
|
+
* @csspart count-highlighted - The `<mosaica-count>` of highlighted items, while a highlight is set.
|
|
48
36
|
* @csspart count-of - The matched count the highlighted count is out of, while a highlight is set.
|
|
49
37
|
* @csspart count-visible - The `<mosaica-count>` of items the viewer may see here, which the matched
|
|
50
38
|
* count is out of.
|
|
51
|
-
* @csspart card - The card of figures,
|
|
39
|
+
* @csspart card - The card of figures, when `expanded` is set.
|
|
52
40
|
*/
|
|
53
41
|
export declare class MosaicaStatus extends MosaicaElement {
|
|
54
42
|
static styles: import("lit").CSSResult[];
|
|
55
|
-
/**
|
|
43
|
+
/** Adds a card of the figures below the strip. */
|
|
56
44
|
accessor expanded: boolean;
|
|
57
|
-
/** Shortens the figures to one decimal (`16.8M`) and drops the shown count
|
|
45
|
+
/** Shortens the figures to one decimal (`16.8M`) and drops the shown count. */
|
|
58
46
|
accessor compact: boolean;
|
|
59
|
-
/**
|
|
47
|
+
/** A function the Sign in button calls when the session has expired. Without it there is no Sign in button. */
|
|
60
48
|
accessor reauthorise: (() => void) | null;
|
|
61
49
|
private lastState;
|
|
62
50
|
private expiryFired;
|