@storybook/addon-ondevice-controls 8.3.1-beta.2 → 8.3.5

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export { fromHsv, toHsv } from './utils';
3
2
  export { HoloColorPicker as ColorPicker } from './HoloColorPicker';
4
3
  export { TriangleColorPicker } from './TriangleColorPicker';
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.rotatePoint = exports.createPanResponder = exports.fromHsv = exports.toHsv = void 0;
6
+ exports.toHsv = toHsv;
7
+ exports.fromHsv = fromHsv;
8
+ exports.createPanResponder = createPanResponder;
9
+ exports.rotatePoint = rotatePoint;
7
10
  const tinycolor2_1 = __importDefault(require("tinycolor2"));
8
11
  const react_native_1 = require("react-native");
9
12
  /**
@@ -14,7 +17,6 @@ const react_native_1 = require("react-native");
14
17
  function toHsv(color) {
15
18
  return (0, tinycolor2_1.default)(color).toHsv();
16
19
  }
17
- exports.toHsv = toHsv;
18
20
  /**
19
21
  * Converts hsv object to hexa color string.
20
22
  * @param {object} hsv { h: number, s: number, v: number } object literal
@@ -23,7 +25,6 @@ exports.toHsv = toHsv;
23
25
  function fromHsv(hsv) {
24
26
  return (0, tinycolor2_1.default)(hsv).toHexString();
25
27
  }
26
- exports.fromHsv = fromHsv;
27
28
  const fn = () => true;
28
29
  /**
29
30
  * Simplified pan responder wrapper.
@@ -46,7 +47,6 @@ function createPanResponder({ onStart = fn, onMove = fn, onEnd = fn, }) {
46
47
  },
47
48
  });
48
49
  }
49
- exports.createPanResponder = createPanResponder;
50
50
  /**
51
51
  * Rotates point around given center in 2d.
52
52
  * Point is object literal { x: number, y: number }
@@ -70,4 +70,3 @@ function rotatePoint(point, angle, center = { x: 0, y: 0 }) {
70
70
  y: normalizedY,
71
71
  };
72
72
  }
73
- exports.rotatePoint = rotatePoint;
package/dist/index.js CHANGED
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.register = exports.PARAM_KEY = exports.ADDON_ID = void 0;
6
+ exports.PARAM_KEY = exports.ADDON_ID = void 0;
7
+ exports.register = register;
7
8
  const jsx_runtime_1 = require("react/jsx-runtime");
8
9
  const manager_api_1 = require("@storybook/core/manager-api");
9
10
  const ControlsPanel_1 = __importDefault(require("./ControlsPanel"));
@@ -20,4 +21,3 @@ function register() {
20
21
  });
21
22
  });
22
23
  }
23
- exports.register = register;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Theme } from '@storybook/react-native-theming';
3
2
  import { TextInput, TextInputProps, TextStyle } from 'react-native';
4
3
  export declare function inputStyle({ theme, isTextInput, focused, hasError, }: {
@@ -9,7 +8,7 @@ export declare function inputStyle({ theme, isTextInput, focused, hasError, }: {
9
8
  }): TextStyle;
10
9
  export declare const Input: import("@storybook/react-native-theming").StyledComponent<TextInputProps & import("react").RefAttributes<TextInput> & {
11
10
  theme?: Theme;
12
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
11
+ as?: React.ElementType;
13
12
  } & {
14
13
  focused?: boolean;
15
14
  isTextInput?: boolean;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Input = exports.inputStyle = void 0;
3
+ exports.Input = void 0;
4
+ exports.inputStyle = inputStyle;
4
5
  const jsx_runtime_1 = require("react/jsx-runtime");
5
6
  const bottom_sheet_1 = require("@gorhom/bottom-sheet");
6
7
  const react_native_theming_1 = require("@storybook/react-native-theming");
@@ -42,7 +43,6 @@ function inputStyle({ theme, isTextInput = true, focused = false, hasError = fal
42
43
  margin: 0,
43
44
  };
44
45
  }
45
- exports.inputStyle = inputStyle;
46
46
  const TextInputWithSwitcher = (0, react_1.forwardRef)((props, ref) => {
47
47
  const { isMobile } = (0, react_native_ui_1.useLayout)();
48
48
  return isMobile ? (
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function useResyncValue(value: any, isPristine: boolean, resyncCallback?: (syncValue: any) => void): {
3
2
  key: number;
4
3
  setCurrentValue: import("react").Dispatch<any>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useResyncValue = void 0;
3
+ exports.useResyncValue = useResyncValue;
4
4
  const react_1 = require("react");
5
5
  // syncs up the value of a control with the value of a story arg when resetting
6
6
  // this is used for controls that don't use a controlled input like the slider
@@ -15,4 +15,3 @@ function useResyncValue(value, isPristine, resyncCallback) {
15
15
  }, [value, currentValue, isPristine, resyncCallback]);
16
16
  return { key, setCurrentValue };
17
17
  }
18
- exports.useResyncValue = useResyncValue;
@@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  SOFTWARE.
25
25
  */
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.default = useDebouncedCallback;
27
28
  const react_1 = require("react");
28
29
  /**
29
30
  * Creates a debounced function that delays invoking `func` until after `wait`
@@ -219,4 +220,3 @@ function useDebouncedCallback(callback, wait, options) {
219
220
  }, [leading, maxing, wait, maxWait, trailing]);
220
221
  return debounced;
221
222
  }
222
- exports.default = useDebouncedCallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-ondevice-controls",
3
- "version": "8.3.1-beta.2",
3
+ "version": "8.3.5",
4
4
  "description": "Display storybook controls on your device.",
5
5
  "keywords": [
6
6
  "addon",
@@ -32,8 +32,8 @@
32
32
  "dependencies": {
33
33
  "@storybook/addon-controls": "^8.3.1",
34
34
  "@storybook/core": "^8.3.1",
35
- "@storybook/react-native-theming": "^8.3.1-beta.2",
36
- "@storybook/react-native-ui": "^8.3.1-beta.2",
35
+ "@storybook/react-native-theming": "^8.3.5",
36
+ "@storybook/react-native-ui": "^8.3.5",
37
37
  "deep-equal": "^1.0.1",
38
38
  "prop-types": "^15.7.2",
39
39
  "react-native-modal-datetime-picker": "^14.0.0",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "cross-env": "^7.0.3",
45
- "typescript": "~5.3.3"
45
+ "typescript": "^5.3.3"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@gorhom/bottom-sheet": ">=4",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "951585dee73bd71d1367b833debff9bb960cc763"
57
+ "gitHead": "44a329c8a0b1f96622d13659200993c8259f834d"
58
58
  }