@expofp/debug 3.4.0 → 3.4.1

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.
@@ -53,7 +53,7 @@ export function registerSetting(options) {
53
53
  return _jsx(Editor, { label: key, value: state, context: context, onChange: setState });
54
54
  };
55
55
  EditorImpl.displayName = `DebugSetting(${key})`;
56
- editors.push(EditorImpl);
56
+ editors.push({ key, Editor: EditorImpl });
57
57
  return {
58
58
  get,
59
59
  set,
@@ -1,4 +1,8 @@
1
1
  import type { FC } from 'react';
2
- export declare const editors: FC[];
2
+ export interface RegisteredEditor {
3
+ key: string;
4
+ Editor: FC;
5
+ }
6
+ export declare const editors: RegisteredEditor[];
3
7
  export declare const resets: (() => void)[];
4
8
  //# sourceMappingURL=setting-registry.d.ts.map
@@ -6,7 +6,6 @@ export const DebugOverlay = ({ onClose }) => {
6
6
  return (_jsx(Theme, { appearance: "dark", style: {
7
7
  // gradient
8
8
  backgroundColor: 'rgba(0, 0, 0, 0.9)',
9
- backdropFilter: 'blur(10px)',
10
9
  position: 'fixed',
11
10
  top: 0,
12
11
  right: 0,
@@ -5,25 +5,25 @@ import { SideButton } from './side-button.js';
5
5
  const LazyDebugOverlay = lazy(async () => ({
6
6
  default: (await import('./debug-overlay.js')).DebugOverlay,
7
7
  }));
8
- // const DEFAULT_HOST_SELECTOR = '[data-efp-floorplan-defaults]';
8
+ const DEFAULT_HOST_SELECTOR = '[data-efp-floorplan-defaults]';
9
9
  export const DebugUi = (props) => {
10
10
  const [isOpen, setIsOpen] = useState(props.open);
11
11
  const [debugButtonEnabled, setDebugButtonEnabled] = props.useDebugButtonState();
12
- // const selector = props.hostSelector ?? DEFAULT_HOST_SELECTOR;
12
+ const selector = props.hostSelector ?? DEFAULT_HOST_SELECTOR;
13
13
  useEffect(() => {
14
14
  return addDebugSecretListener(() => {
15
15
  setDebugButtonEnabled(true);
16
16
  setIsOpen(true);
17
17
  });
18
18
  }, []);
19
- //// set visibility of efp floorplan to none when debug ui is open
20
- //// otherwise, z-index issues occur
21
- // useEffect(() => {
22
- // const efpFloorplan = document.querySelector(selector) as HTMLElement | null;
23
- // if (efpFloorplan) {
24
- // efpFloorplan.style.visibility = isOpen ? 'hidden' : 'visible';
25
- // }
26
- // }, [isOpen, selector]);
19
+ // set visibility of efp floorplan to none when debug ui is open
20
+ // otherwise, z-index issues occur
21
+ useEffect(() => {
22
+ const efpFloorplan = document.querySelector(selector);
23
+ if (efpFloorplan) {
24
+ efpFloorplan.style.visibility = isOpen ? 'hidden' : 'visible';
25
+ }
26
+ }, [isOpen, selector]);
27
27
  if (isOpen) {
28
28
  return (_jsx(Suspense, { fallback: null, children: _jsx(LazyDebugOverlay, { onClose: () => {
29
29
  setIsOpen(false);
@@ -5,5 +5,7 @@ import { adoptGlobalSettings } from '../settings/adopt-global-settings.js';
5
5
  import { editors } from '../settings/setting-registry.js';
6
6
  export const SettingsList = () => {
7
7
  adoptGlobalSettings();
8
- return editors.map((Editor, index) => (_jsx(Suspense, { fallback: _jsx(Skeleton, { height: "60px" }), children: _jsx(Editor, {}) }, index)));
8
+ return [...editors]
9
+ .sort((a, b) => a.key.localeCompare(b.key))
10
+ .map(({ key, Editor }) => (_jsx(Suspense, { fallback: _jsx(Skeleton, { height: "60px" }), children: _jsx(Editor, {}) }, key)));
9
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/debug",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "type": "module",
5
5
  "description": "ExpoFP SDK internal: debug utilities",
6
6
  "homepage": "https://developer.expofp.com/",