@foxglove/embed-react 0.80.0 → 0.81.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/FoxgloveViewer.d.ts
CHANGED
|
@@ -17,12 +17,6 @@ type Props = {
|
|
|
17
17
|
layoutData?: OpaqueLayoutData;
|
|
18
18
|
/** The layout to use in the Foxglove app. */
|
|
19
19
|
layout?: SelectLayoutParams;
|
|
20
|
-
/**
|
|
21
|
-
* The extensions to install in the Foxglove app.
|
|
22
|
-
*
|
|
23
|
-
* This property is not supported by all Foxglove versions and plans, so it may result in an `onError` callback.
|
|
24
|
-
*/
|
|
25
|
-
extensions?: Array<string | File>;
|
|
26
20
|
/**
|
|
27
21
|
* The color scheme to use in the Foxglove app. When set to "auto", the color scheme is inherited
|
|
28
22
|
* from the containing page.
|
|
@@ -71,7 +65,7 @@ type Props = {
|
|
|
71
65
|
onReady?: () => void;
|
|
72
66
|
/**
|
|
73
67
|
* A callback function that is called when the Foxglove app encounters an error when trying to
|
|
74
|
-
* update the data source
|
|
68
|
+
* update the data source or layout.
|
|
75
69
|
* */
|
|
76
70
|
onError?: (errorMsg: string) => void;
|
|
77
71
|
/** Called when the iframe resolves its host-visible feature availability. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FoxgloveViewer.d.ts","sourceRoot":"","sources":["../src/FoxgloveViewer.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,0BAA0B,EAC/B,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACV,MAAM,iBAAiB,CAAC;AAIzB,KAAK,KAAK,GAAG;IACX,2FAA2F;IAC3F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH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;IACH,SAAS,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IAExC;;;;;OAKG;IACH,aAAa,IAAI,IAAI,CAAC;IAEtB;;;;;OAKG;IACH,aAAa,IAAI,IAAI,CAAC;IAEtB;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;CACtC;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2GA0J1B,CAAC"}
|
package/dist/FoxgloveViewer.js
CHANGED
|
@@ -9,7 +9,7 @@ import { useShouldNotChangeOften } from "./useShouldNotChangeOften.js";
|
|
|
9
9
|
* convenient API for embedding the Foxglove app in a React application.
|
|
10
10
|
*/
|
|
11
11
|
export const FoxgloveViewer = forwardRef(function FoxgloveViewer(props, ref) {
|
|
12
|
-
const { src, orgSlug, className, style, data, layoutData, layout,
|
|
12
|
+
const { src, orgSlug, className, style, data, layoutData, layout, colorScheme, keybindings } = props;
|
|
13
13
|
// eslint-disable-next-line no-restricted-syntax
|
|
14
14
|
const elem = useRef(null);
|
|
15
15
|
const frame = useRef(undefined);
|
|
@@ -26,9 +26,6 @@ export const FoxgloveViewer = forwardRef(function FoxgloveViewer(props, ref) {
|
|
|
26
26
|
useShouldNotChangeOften(layout, () => {
|
|
27
27
|
console.warn(`[FoxgloveViewer] "layout" is changing too frequently. This may cause performance issues, consider memoizing this value.`);
|
|
28
28
|
});
|
|
29
|
-
useShouldNotChangeOften(extensions, () => {
|
|
30
|
-
console.warn(`[FoxgloveViewer] "extensions" is changing too frequently. This may cause performance issues, consider memoizing this value.`);
|
|
31
|
-
});
|
|
32
29
|
useShouldNotChangeOften(keybindings, () => {
|
|
33
30
|
console.warn(`[FoxgloveViewer] "keybindings" is changing too frequently. This may cause performance issues, consider memoizing this value.`);
|
|
34
31
|
});
|
|
@@ -90,12 +87,6 @@ export const FoxgloveViewer = forwardRef(function FoxgloveViewer(props, ref) {
|
|
|
90
87
|
}
|
|
91
88
|
frame.current.selectLayout(layout);
|
|
92
89
|
}, [layout]);
|
|
93
|
-
useEffect(() => {
|
|
94
|
-
if (extensions == undefined || frame.current == undefined) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
frame.current.installExtensions(extensions);
|
|
98
|
-
}, [extensions]);
|
|
99
90
|
useEffect(() => {
|
|
100
91
|
if (colorScheme == undefined || frame.current == undefined) {
|
|
101
92
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FoxgloveViewer.js","sourceRoot":"","sources":["../src/FoxgloveViewer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAEL,cAAc,IAAI,mBAAmB,GAMtC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"FoxgloveViewer.js","sourceRoot":"","sources":["../src/FoxgloveViewer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAEL,cAAc,IAAI,mBAAmB,GAMtC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAwIvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG;IAChC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAC1F,KAAK,CAAC;IAER,gDAAgD;IA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AC,WAAW,CAAC,CAAC,CAAC;IAElB,mBAAmB,CACjB,GAAG,EACH,GAA4B,EAAE,CAAC,CAAC;QAC9B,eAAe;YACb,OAAO,CACL,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,wBAAwB,EAAE,SAAkB,EAAE,CACrF,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,SAAS;YACb,OAAO,MAAM,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,YAAY,CAAC,IAAmB;YAC9B,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;QACD,aAAa;YACX,KAAK,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC;QACjC,CAAC;QACD,aAAa;YACX,KAAK,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC;QACjC,CAAC;QACD,SAAS,CAAC,IAAmB;YAC3B,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;KACF,CAAC,EACF,EAAE,CACH,CAAC;IAEF,OAAO,cAAK,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AAChE,CAAC,CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foxglove/embed-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"foxglove",
|
|
6
6
|
"react",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepack": "yarn build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@foxglove/embed": "0.
|
|
34
|
+
"@foxglove/embed": "0.81.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@foxglove/tsconfig": "3.2.0",
|
package/src/FoxgloveViewer.tsx
CHANGED
|
@@ -31,12 +31,6 @@ type Props = {
|
|
|
31
31
|
layoutData?: OpaqueLayoutData;
|
|
32
32
|
/** The layout to use in the Foxglove app. */
|
|
33
33
|
layout?: SelectLayoutParams;
|
|
34
|
-
/**
|
|
35
|
-
* The extensions to install in the Foxglove app.
|
|
36
|
-
*
|
|
37
|
-
* This property is not supported by all Foxglove versions and plans, so it may result in an `onError` callback.
|
|
38
|
-
*/
|
|
39
|
-
extensions?: Array<string | File>;
|
|
40
34
|
/**
|
|
41
35
|
* The color scheme to use in the Foxglove app. When set to "auto", the color scheme is inherited
|
|
42
36
|
* from the containing page.
|
|
@@ -85,7 +79,7 @@ type Props = {
|
|
|
85
79
|
onReady?: () => void;
|
|
86
80
|
/**
|
|
87
81
|
* A callback function that is called when the Foxglove app encounters an error when trying to
|
|
88
|
-
* update the data source
|
|
82
|
+
* update the data source or layout.
|
|
89
83
|
* */
|
|
90
84
|
onError?: (errorMsg: string) => void;
|
|
91
85
|
/** Called when the iframe resolves its host-visible feature availability. */
|
|
@@ -161,18 +155,8 @@ export interface FoxgloveViewerInterface {
|
|
|
161
155
|
*/
|
|
162
156
|
export const FoxgloveViewer = forwardRef<FoxgloveViewerInterface, Props>(
|
|
163
157
|
function FoxgloveViewer(props, ref): ReactNode {
|
|
164
|
-
const {
|
|
165
|
-
|
|
166
|
-
orgSlug,
|
|
167
|
-
className,
|
|
168
|
-
style,
|
|
169
|
-
data,
|
|
170
|
-
layoutData,
|
|
171
|
-
layout,
|
|
172
|
-
extensions,
|
|
173
|
-
colorScheme,
|
|
174
|
-
keybindings,
|
|
175
|
-
} = props;
|
|
158
|
+
const { src, orgSlug, className, style, data, layoutData, layout, colorScheme, keybindings } =
|
|
159
|
+
props;
|
|
176
160
|
|
|
177
161
|
// eslint-disable-next-line no-restricted-syntax
|
|
178
162
|
const elem = useRef<HTMLIFrameElement | null>(null);
|
|
@@ -203,12 +187,6 @@ export const FoxgloveViewer = forwardRef<FoxgloveViewerInterface, Props>(
|
|
|
203
187
|
);
|
|
204
188
|
});
|
|
205
189
|
|
|
206
|
-
useShouldNotChangeOften(extensions, () => {
|
|
207
|
-
console.warn(
|
|
208
|
-
`[FoxgloveViewer] "extensions" is changing too frequently. This may cause performance issues, consider memoizing this value.`,
|
|
209
|
-
);
|
|
210
|
-
});
|
|
211
|
-
|
|
212
190
|
useShouldNotChangeOften(keybindings, () => {
|
|
213
191
|
console.warn(
|
|
214
192
|
`[FoxgloveViewer] "keybindings" is changing too frequently. This may cause performance issues, consider memoizing this value.`,
|
|
@@ -284,14 +262,6 @@ export const FoxgloveViewer = forwardRef<FoxgloveViewerInterface, Props>(
|
|
|
284
262
|
frame.current.selectLayout(layout);
|
|
285
263
|
}, [layout]);
|
|
286
264
|
|
|
287
|
-
useEffect(() => {
|
|
288
|
-
if (extensions == undefined || frame.current == undefined) {
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
frame.current.installExtensions(extensions);
|
|
293
|
-
}, [extensions]);
|
|
294
|
-
|
|
295
265
|
useEffect(() => {
|
|
296
266
|
if (colorScheme == undefined || frame.current == undefined) {
|
|
297
267
|
return;
|