@onehat/ui 0.2.16 → 0.2.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -13,13 +13,8 @@ import {
13
13
  v4 as uuid,
14
14
  } from 'uuid';
15
15
 
16
- let DraggableToImport;
17
- if (CURRENT_MODE === UI_MODE_WEB) {
18
- DraggableToImport = 'react-draggable'; // https://github.com/react-grid-layout/react-draggable
19
- } else if (CURRENT_MODE === UI_MODE_REACT_NATIVE) {
20
- DraggableToImport = 'react-native-draggable'; // https://github.com/tongyy/react-native-draggable
21
- }
22
- const Draggable = await import(DraggableToImport);
16
+ // eslint-disable-next-line
17
+ const Draggable = await import('../../PlatformImports/' + CURRENT_MODE + '/Draggable.js');
23
18
 
24
19
 
25
20
 
@@ -1,8 +1,8 @@
1
1
  import { isBrowser, isNode, isWebWorker, isJsDom, isDeno } from "browser-or-node";
2
2
 
3
3
 
4
- export const UI_MODE_WEB = 'UI_MODE_WEB';
5
- export const UI_MODE_REACT_NATIVE = 'UI_MODE_REACT_NATIVE';
4
+ export const UI_MODE_WEB = 'Web';
5
+ export const UI_MODE_REACT_NATIVE = 'ReactNative';
6
6
 
7
7
  export let CURRENT_MODE;
8
8
  if (isBrowser || isWebWorker) {
@@ -0,0 +1,3 @@
1
+ import Draggable from 'react-native-draggable'; // https://github.com/tongyy/react-native-draggable
2
+
3
+ export default Draggable;
@@ -0,0 +1,3 @@
1
+ import Draggable from 'react-draggable'; // https://github.com/react-grid-layout/react-draggable
2
+
3
+ export default Draggable.default || Draggable;