@mosaicajs/react 0.3.0 → 0.4.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/components.d.ts +14 -4
- package/dist/components.js +7 -3
- package/package.json +4 -4
package/dist/components.d.ts
CHANGED
|
@@ -49,7 +49,8 @@ export declare const MosaicaStore: import("@lit/react").ReactWebComponent<StoreE
|
|
|
49
49
|
* it has a handler prop for each of them: `onPick` for `mosaica-pick`, and so on for every event
|
|
50
50
|
* in {@link MosaicaEvents} except `mosaica-chipopen`, which it does not fire. The `open` prop
|
|
51
51
|
* is the function the item card's Open button calls, and `openUrl` the address it goes to.
|
|
52
|
-
* `onOpen` is called on every press.
|
|
52
|
+
* `onOpen` is called on every press. `onLevelChange` reports `{layer, level}`: the explorer keeps a
|
|
53
|
+
* level for each layer, and a choice changes that layer's alone.
|
|
53
54
|
*/
|
|
54
55
|
export declare const MosaicaExplorer: import("@lit/react").ReactWebComponent<ExplorerElement, {
|
|
55
56
|
onArtifactFit: EventName<CustomEvent<{
|
|
@@ -59,6 +60,7 @@ export declare const MosaicaExplorer: import("@lit/react").ReactWebComponent<Exp
|
|
|
59
60
|
colourBy: string | null;
|
|
60
61
|
}>>;
|
|
61
62
|
onLevelChange: EventName<CustomEvent<{
|
|
63
|
+
layer: string;
|
|
62
64
|
level: number | null;
|
|
63
65
|
}>>;
|
|
64
66
|
onValueColour: EventName<CustomEvent<{
|
|
@@ -103,8 +105,8 @@ export declare const MosaicaExplorer: import("@lit/react").ReactWebComponent<Exp
|
|
|
103
105
|
onBudgetChange: EventName<CustomEvent<{
|
|
104
106
|
budget: number;
|
|
105
107
|
}>>;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
onClusterSpacingChange: EventName<CustomEvent<{
|
|
109
|
+
spacing: number;
|
|
108
110
|
}>>;
|
|
109
111
|
onFold: EventName<CustomEvent<{
|
|
110
112
|
field: string;
|
|
@@ -168,6 +170,7 @@ export declare const MosaicaExplorer: import("@lit/react").ReactWebComponent<Exp
|
|
|
168
170
|
}>>;
|
|
169
171
|
onSelectChange: EventName<CustomEvent<{
|
|
170
172
|
shape: import("@mosaicajs/components").SelectionShapeDetail | null;
|
|
173
|
+
view?: string;
|
|
171
174
|
status?: import("@mosaicajs/client").RegionProjection["status"] | "cleared";
|
|
172
175
|
visible?: import("@mosaicajs/client").Masked | null;
|
|
173
176
|
matched?: import("@mosaicajs/client").Masked;
|
|
@@ -217,6 +220,7 @@ export declare const MosaicaMap: import("@lit/react").ReactWebComponent<MapEleme
|
|
|
217
220
|
}>>;
|
|
218
221
|
onSelectChange: EventName<CustomEvent<{
|
|
219
222
|
shape: import("@mosaicajs/components").SelectionShapeDetail | null;
|
|
223
|
+
view?: string;
|
|
220
224
|
status?: import("@mosaicajs/client").RegionProjection["status"] | "cleared";
|
|
221
225
|
visible?: import("@mosaicajs/client").Masked | null;
|
|
222
226
|
matched?: import("@mosaicajs/client").Masked;
|
|
@@ -277,7 +281,9 @@ export declare const MosaicaItemCard: import("@lit/react").ReactWebComponent<Ite
|
|
|
277
281
|
* (`mosaica-filterchange`), `onChipOpen` (`mosaica-chipopen`), and from its cards
|
|
278
282
|
* `onClauseChange` (`mosaica-clausechange`), `onColourChange` (`mosaica-colourchange`),
|
|
279
283
|
* `onLevelChange` (`mosaica-levelchange`), `onValueColour` (`mosaica-valuecolour`),
|
|
280
|
-
* `onClusterColour` (`mosaica-clustercolour`) and `onFold` (`mosaica-fold`).
|
|
284
|
+
* `onClusterColour` (`mosaica-clustercolour`) and `onFold` (`mosaica-fold`). `onLevelChange`
|
|
285
|
+
* reports `{layer, level}`; to keep the choice, set it in the `Map` passed as `clusterLevels`, here
|
|
286
|
+
* and on the map.
|
|
281
287
|
*/
|
|
282
288
|
export declare const MosaicaFilterPanel: import("@lit/react").ReactWebComponent<FilterPanelElement, {
|
|
283
289
|
onFilterChange: EventName<CustomEvent<{
|
|
@@ -300,6 +306,7 @@ export declare const MosaicaFilterPanel: import("@lit/react").ReactWebComponent<
|
|
|
300
306
|
colourBy: string | null;
|
|
301
307
|
}>>;
|
|
302
308
|
onLevelChange: EventName<CustomEvent<{
|
|
309
|
+
layer: string;
|
|
303
310
|
level: number | null;
|
|
304
311
|
}>>;
|
|
305
312
|
onValueColour: EventName<CustomEvent<{
|
|
@@ -343,6 +350,7 @@ export declare const MosaicaClusterFilter: import("@lit/react").ReactWebComponen
|
|
|
343
350
|
export declare const MosaicaSelection: import("@lit/react").ReactWebComponent<SelectionElement, {
|
|
344
351
|
onSelectChange: EventName<CustomEvent<{
|
|
345
352
|
shape: import("@mosaicajs/components").SelectionShapeDetail | null;
|
|
353
|
+
view?: string;
|
|
346
354
|
status?: import("@mosaicajs/client").RegionProjection["status"] | "cleared";
|
|
347
355
|
visible?: import("@mosaicajs/client").Masked | null;
|
|
348
356
|
matched?: import("@mosaicajs/client").Masked;
|
|
@@ -397,6 +405,7 @@ export declare const MosaicaArtifactCard: import("@lit/react").ReactWebComponent
|
|
|
397
405
|
* (`mosaica-filterchange`), `onClauseChange` (`mosaica-clausechange`), `onColourChange`
|
|
398
406
|
* (`mosaica-colourchange`), `onLevelChange` (`mosaica-levelchange`), `onValueColour`
|
|
399
407
|
* (`mosaica-valuecolour`), `onClusterColour` (`mosaica-clustercolour`) and `onFold` (`mosaica-fold`).
|
|
408
|
+
* `onLevelChange` reports `{layer, level}` for the card's layer.
|
|
400
409
|
*/
|
|
401
410
|
export declare const MosaicaFieldCard: import("@lit/react").ReactWebComponent<FieldCardElement, {
|
|
402
411
|
onFold: EventName<CustomEvent<{
|
|
@@ -419,6 +428,7 @@ export declare const MosaicaFieldCard: import("@lit/react").ReactWebComponent<Fi
|
|
|
419
428
|
colourBy: string | null;
|
|
420
429
|
}>>;
|
|
421
430
|
onLevelChange: EventName<CustomEvent<{
|
|
431
|
+
layer: string;
|
|
422
432
|
level: number | null;
|
|
423
433
|
}>>;
|
|
424
434
|
onValueColour: EventName<CustomEvent<{
|
package/dist/components.js
CHANGED
|
@@ -79,7 +79,8 @@ export const MosaicaStore = withStableAuthorise(wrap('mosaica-store', StoreEleme
|
|
|
79
79
|
* it has a handler prop for each of them: `onPick` for `mosaica-pick`, and so on for every event
|
|
80
80
|
* in {@link MosaicaEvents} except `mosaica-chipopen`, which it does not fire. The `open` prop
|
|
81
81
|
* is the function the item card's Open button calls, and `openUrl` the address it goes to.
|
|
82
|
-
* `onOpen` is called on every press.
|
|
82
|
+
* `onOpen` is called on every press. `onLevelChange` reports `{layer, level}`: the explorer keeps a
|
|
83
|
+
* level for each layer, and a choice changes that layer's alone.
|
|
83
84
|
*/
|
|
84
85
|
export const MosaicaExplorer = withStableAuthorise(wrap('mosaica-explorer', ExplorerElement, {
|
|
85
86
|
...mapEvents,
|
|
@@ -93,7 +94,7 @@ export const MosaicaExplorer = withStableAuthorise(wrap('mosaica-explorer', Expl
|
|
|
93
94
|
onDisplayChange: ev('mosaica-displaychange'),
|
|
94
95
|
onSizeChange: ev('mosaica-sizechange'),
|
|
95
96
|
onBudgetChange: ev('mosaica-budgetchange'),
|
|
96
|
-
|
|
97
|
+
onClusterSpacingChange: ev('mosaica-clusterspacingchange'),
|
|
97
98
|
onFold: ev('mosaica-fold'),
|
|
98
99
|
onFilterChange: ev('mosaica-filterchange'),
|
|
99
100
|
onStateChange: ev('mosaica-statechange'),
|
|
@@ -130,7 +131,9 @@ export const MosaicaItemCard = wrap('mosaica-item-card', ItemCardElement, { onOp
|
|
|
130
131
|
* (`mosaica-filterchange`), `onChipOpen` (`mosaica-chipopen`), and from its cards
|
|
131
132
|
* `onClauseChange` (`mosaica-clausechange`), `onColourChange` (`mosaica-colourchange`),
|
|
132
133
|
* `onLevelChange` (`mosaica-levelchange`), `onValueColour` (`mosaica-valuecolour`),
|
|
133
|
-
* `onClusterColour` (`mosaica-clustercolour`) and `onFold` (`mosaica-fold`).
|
|
134
|
+
* `onClusterColour` (`mosaica-clustercolour`) and `onFold` (`mosaica-fold`). `onLevelChange`
|
|
135
|
+
* reports `{layer, level}`; to keep the choice, set it in the `Map` passed as `clusterLevels`, here
|
|
136
|
+
* and on the map.
|
|
134
137
|
*/
|
|
135
138
|
export const MosaicaFilterPanel = wrap('mosaica-filter-panel', FilterPanelElement, {
|
|
136
139
|
onFilterChange: ev('mosaica-filterchange'),
|
|
@@ -169,6 +172,7 @@ export const MosaicaArtifactCard = wrap('mosaica-artifact-card', ArtifactCardEle
|
|
|
169
172
|
* (`mosaica-filterchange`), `onClauseChange` (`mosaica-clausechange`), `onColourChange`
|
|
170
173
|
* (`mosaica-colourchange`), `onLevelChange` (`mosaica-levelchange`), `onValueColour`
|
|
171
174
|
* (`mosaica-valuecolour`), `onClusterColour` (`mosaica-clustercolour`) and `onFold` (`mosaica-fold`).
|
|
175
|
+
* `onLevelChange` reports `{layer, level}` for the card's layer.
|
|
172
176
|
*/
|
|
173
177
|
export const MosaicaFieldCard = wrap('mosaica-field-card', FieldCardElement, {
|
|
174
178
|
onFold: ev('mosaica-fold'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosaicajs/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "React hooks over the headless store, and typed wrappers for the mosaica-* elements behind a separate entry.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mosaica",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@mosaicajs/client": "^0.
|
|
48
|
+
"@mosaicajs/client": "^0.4.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@lit/react": "^1.0.0",
|
|
52
|
-
"@mosaicajs/components": "^0.
|
|
52
|
+
"@mosaicajs/components": "^0.4.0",
|
|
53
53
|
"react": "^18.0.0 || ^19.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@lit/react": "^1.0.8",
|
|
65
|
-
"@mosaicajs/components": "^0.
|
|
65
|
+
"@mosaicajs/components": "^0.4.0",
|
|
66
66
|
"@types/react": "^19.2.0",
|
|
67
67
|
"@types/react-dom": "^19.2.0",
|
|
68
68
|
"happy-dom": "^21.0.4",
|