@react-native-aria/slider 0.2.10 → 0.2.12

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.
Files changed (66) hide show
  1. package/lib/commonjs/index.js +0 -2
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/textSelection.js +13 -8
  4. package/lib/commonjs/textSelection.js.map +1 -1
  5. package/lib/commonjs/useMove.js +4 -13
  6. package/lib/commonjs/useMove.js.map +1 -1
  7. package/lib/commonjs/useMove.web.js +5 -27
  8. package/lib/commonjs/useMove.web.js.map +1 -1
  9. package/lib/commonjs/usePanResponder.js +0 -9
  10. package/lib/commonjs/usePanResponder.js.map +1 -1
  11. package/lib/commonjs/useSlider.js +9 -25
  12. package/lib/commonjs/useSlider.js.map +1 -1
  13. package/lib/commonjs/useSlider.web.js +20 -52
  14. package/lib/commonjs/useSlider.web.js.map +1 -1
  15. package/lib/commonjs/useSliderThumb.js +7 -30
  16. package/lib/commonjs/useSliderThumb.js.map +1 -1
  17. package/lib/commonjs/useSliderThumb.web.js +10 -33
  18. package/lib/commonjs/useSliderThumb.web.js.map +1 -1
  19. package/lib/commonjs/utils.js +1 -5
  20. package/lib/commonjs/utils.js.map +1 -1
  21. package/lib/module/index.js.map +1 -1
  22. package/lib/module/textSelection.js +7 -5
  23. package/lib/module/textSelection.js.map +1 -1
  24. package/lib/module/useMove.js +3 -5
  25. package/lib/module/useMove.js.map +1 -1
  26. package/lib/module/useMove.web.js +6 -24
  27. package/lib/module/useMove.web.js.map +1 -1
  28. package/lib/module/usePanResponder.js +0 -5
  29. package/lib/module/usePanResponder.js.map +1 -1
  30. package/lib/module/useSlider.js +9 -19
  31. package/lib/module/useSlider.js.map +1 -1
  32. package/lib/module/useSlider.web.js +20 -43
  33. package/lib/module/useSlider.web.js.map +1 -1
  34. package/lib/module/useSliderThumb.js +7 -22
  35. package/lib/module/useSliderThumb.js.map +1 -1
  36. package/lib/module/useSliderThumb.web.js +10 -24
  37. package/lib/module/useSliderThumb.web.js.map +1 -1
  38. package/lib/module/utils.js +0 -2
  39. package/lib/module/utils.js.map +1 -1
  40. package/lib/typescript/index.d.ts +1 -0
  41. package/lib/typescript/index.d.ts.map +1 -0
  42. package/lib/typescript/textSelection.d.ts +1 -0
  43. package/lib/typescript/textSelection.d.ts.map +1 -0
  44. package/lib/typescript/useMove.d.ts +1 -0
  45. package/lib/typescript/useMove.d.ts.map +1 -0
  46. package/lib/typescript/useMove.web.d.ts +1 -0
  47. package/lib/typescript/useMove.web.d.ts.map +1 -0
  48. package/lib/typescript/usePanResponder.d.ts +2 -1
  49. package/lib/typescript/usePanResponder.d.ts.map +1 -0
  50. package/lib/typescript/useSlider.d.ts +1 -0
  51. package/lib/typescript/useSlider.d.ts.map +1 -0
  52. package/lib/typescript/useSlider.web.d.ts +1 -0
  53. package/lib/typescript/useSlider.web.d.ts.map +1 -0
  54. package/lib/typescript/useSliderThumb.d.ts +1 -0
  55. package/lib/typescript/useSliderThumb.d.ts.map +1 -0
  56. package/lib/typescript/useSliderThumb.web.d.ts +1 -0
  57. package/lib/typescript/useSliderThumb.web.d.ts.map +1 -0
  58. package/lib/typescript/utils.d.ts +1 -0
  59. package/lib/typescript/utils.d.ts.map +1 -0
  60. package/package.json +8 -4
  61. package/src/useMove.ts +0 -1
  62. package/src/useMove.web.ts +3 -0
  63. package/src/useSlider.web.ts +3 -1
  64. package/babel.config.js +0 -3
  65. package/scripts/bootstrap.js +0 -24
  66. package/tsconfig.build.json +0 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMove.d.ts","sourceRoot":"","sources":["../../src/useMove.ts"],"names":[],"mappings":"AAeA,UAAU,UAAU;IAClB,6CAA6C;IAC7C,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,UAAU,CA8C9C"}
@@ -11,3 +11,4 @@ interface MoveResult {
11
11
  */
12
12
  export declare function useMove(props: MoveEvents): MoveResult;
13
13
  export {};
14
+ //# sourceMappingURL=useMove.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMove.web.d.ts","sourceRoot":"","sources":["../../src/useMove.web.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAe,MAAM,qBAAqB,CAAC;AAC9D,OAAc,EAAE,cAAc,EAAmB,MAAM,OAAO,CAAC;AAG/D,UAAU,UAAU;IAClB,6CAA6C;IAC7C,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CA0KrD"}
@@ -1 +1,2 @@
1
- export declare const usePanResponder: (props: any) => import("react-native/types").PanResponderInstance;
1
+ export declare const usePanResponder: (props: any) => import("react-native").PanResponderInstance;
2
+ //# sourceMappingURL=usePanResponder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePanResponder.d.ts","sourceRoot":"","sources":["../../src/usePanResponder.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,UAAW,GAAG,gDA+BzC,CAAC"}
@@ -22,3 +22,4 @@ interface SliderAria {
22
22
  */
23
23
  export declare function useSlider(props: AriaSliderProps, state: SliderState, trackLayout: any, isReversed?: boolean): SliderAria;
24
24
  export {};
25
+ //# sourceMappingURL=useSlider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSlider.d.ts","sourceRoot":"","sources":["../../src/useSlider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,UAAU,UAAU;IAClB,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC;IAEhB,gFAAgF;IAChF,UAAU,EAAE,GAAG,CAAC;IAEhB,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC;IAEhB,+EAA+E;IAC/E,WAAW,EAAE,GAAG,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,WAAW,EAClB,WAAW,EAAE,GAAG,EAChB,UAAU,CAAC,EAAE,OAAO,GACnB,UAAU,CA+EZ"}
@@ -6,3 +6,4 @@ export declare const useSlider: (props: any, state: any, ref: any, isReversed?:
6
6
  outputProps: any;
7
7
  groupProps: any;
8
8
  };
9
+ //# sourceMappingURL=useSlider.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSlider.web.d.ts","sourceRoot":"","sources":["../../src/useSlider.web.ts"],"names":[],"mappings":"AA0PA,eAAO,MAAM,SAAS,UACb,GAAG,SACH,GAAG,OACL,GAAG,eACK,OAAO;;IA7OpB,mCAAmC;gBACvB,GAAG;IAEf,+EAA+E;iBAClE,GAAG;;CAoPjB,CAAC"}
@@ -22,3 +22,4 @@ interface SliderThumbOptions extends AriaSliderThumbProps {
22
22
  */
23
23
  export declare function useSliderThumb(opts: SliderThumbOptions, state: SliderState, isReversed?: boolean): SliderThumbAria;
24
24
  export {};
25
+ //# sourceMappingURL=useSliderThumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSliderThumb.d.ts","sourceRoot":"","sources":["../../src/useSliderThumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAI3D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,UAAU,eAAe;IACvB,qEAAqE;IACrE,UAAU,EAAE,GAAG,CAAC;IAEhB,yDAAyD;IACzD,UAAU,EAAE,GAAG,CAAC;IAEhB,6DAA6D;IAC7D,UAAU,EAAE,GAAG,CAAC;CACjB;AAED,UAAU,kBAAmB,SAAQ,oBAAoB;IACvD,kCAAkC;IAClC,WAAW,EAAE,GAAG,CAAC;IACjB,wCAAwC;IACxC,QAAQ,EAAE,GAAG,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,OAAO,GACnB,eAAe,CAqGjB"}
@@ -23,3 +23,4 @@ interface SliderThumbOptions extends AriaSliderThumbProps {
23
23
  */
24
24
  export declare function useSliderThumb(opts: SliderThumbOptions, state: SliderState, isReversed?: boolean): SliderThumbAria;
25
25
  export {};
26
+ //# sourceMappingURL=useSliderThumb.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSliderThumb.web.d.ts","sourceRoot":"","sources":["../../src/useSliderThumb.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAQ3D,OAAc,EAEZ,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMpD,UAAU,eAAe;IACvB,qEAAqE;IACrE,UAAU,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IAExC,yDAAyD;IACzD,UAAU,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAElD,6DAA6D;IAC7D,UAAU,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACnD;AAED,UAAU,kBAAmB,SAAQ,oBAAoB;IACvD,kCAAkC;IAClC,WAAW,EAAE,GAAG,CAAC;IACjB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,OAAO,GACnB,eAAe,CAmKjB"}
@@ -1,3 +1,4 @@
1
1
  import { SliderState } from '@react-stately/slider';
2
2
  export declare const sliderIds: WeakMap<SliderState, string>;
3
3
  export declare function getSliderThumbId(state: SliderState, index: number): string;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,eAAO,MAAM,SAAS,8BAAqC,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,UAOjE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-aria/slider",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "useSlider - React Native Aria",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -26,6 +26,7 @@
26
26
  "test": "jest",
27
27
  "typescript": "tsc --noEmit",
28
28
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
29
+ "build": "bob build",
29
30
  "prepare": "bob build",
30
31
  "release": "release-it",
31
32
  "example": "yarn --cwd example",
@@ -37,13 +38,16 @@
37
38
  "ios",
38
39
  "android"
39
40
  ],
40
- "repository": "https://github.com/intergalacticspacehighway/react-native-bob-mono",
41
+ "homepage": "https://github.com/gluestack/gluestack-ui/tree/main/packages/react-native-aria/slider#readme",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/gluestack/gluestack-ui.git"
45
+ },
41
46
  "author": "nishan <nishanbende@gmail.com> (https://github.com/intergalacticspacehighway)",
42
47
  "license": "MIT",
43
48
  "bugs": {
44
49
  "url": "https://github.com/intergalacticspacehighway/react-native-bob-mono/issues"
45
50
  },
46
- "homepage": "https://github.com/intergalacticspacehighway/react-native-bob-mono#readme",
47
51
  "publishConfig": {
48
52
  "registry": "https://registry.npmjs.org/"
49
53
  },
@@ -57,7 +61,7 @@
57
61
  "@react-aria/label": "^3.1.1",
58
62
  "@react-aria/slider": "^3.0.1",
59
63
  "@react-aria/utils": "^3.6.0",
60
- "@react-native-aria/utils": "^0.2.10",
64
+ "@react-native-aria/utils": "0.2.12",
61
65
  "@react-stately/slider": "^3.0.1"
62
66
  },
63
67
  "devDependencies": {
package/src/useMove.ts CHANGED
@@ -39,7 +39,6 @@ export function useMove(props: any): MoveResult {
39
39
  type: 'movestart',
40
40
  pointerType: 'touch',
41
41
  });
42
-
43
42
  setInitialMoveX(gestureState.moveX);
44
43
  setInitialMoveY(gestureState.moveY);
45
44
  },
@@ -50,11 +50,13 @@ export function useMove(props: MoveEvents): MoveResult {
50
50
 
51
51
  if (!state.current.didMove) {
52
52
  state.current.didMove = true;
53
+ // @ts-ignore
53
54
  onMoveStart?.({
54
55
  type: 'movestart',
55
56
  pointerType,
56
57
  });
57
58
  }
59
+ // @ts-ignore
58
60
  onMove({
59
61
  type: 'move',
60
62
  pointerType,
@@ -65,6 +67,7 @@ export function useMove(props: MoveEvents): MoveResult {
65
67
  let end = (pointerType: PointerType) => {
66
68
  restoreTextSelection();
67
69
  if (state.current.didMove) {
70
+ // @ts-ignore
68
71
  onMoveEnd?.({
69
72
  type: 'moveend',
70
73
  pointerType,
@@ -186,11 +186,13 @@ function useSliderWeb(
186
186
  }
187
187
  };
188
188
 
189
- if (labelProps.htmlFor) {
189
+ //@ts-ignore
190
+ if (labelProps.htmlFor !== undefined) {
190
191
  // Ideally the `for` attribute should point to the first thumb, but VoiceOver on iOS
191
192
  // causes this to override the `aria-labelledby` on the thumb. This causes the first
192
193
  // thumb to only be announced as the slider label rather than its individual name as well.
193
194
  // See https://bugs.webkit.org/show_bug.cgi?id=172464.
195
+ //@ts-ignore
194
196
  delete labelProps.htmlFor;
195
197
  labelProps.onClick = () => {
196
198
  // Safari does not focus <input type="range"> elements when clicking on an associated <label>,
package/babel.config.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- presets: ['module:metro-react-native-babel-preset'],
3
- };
@@ -1,24 +0,0 @@
1
- const path = require('path');
2
- const child_process = require('child_process');
3
-
4
- const root = path.resolve(__dirname, '..');
5
- const args = process.argv.slice(2);
6
- const options = {
7
- cwd: process.cwd(),
8
- env: process.env,
9
- stdio: 'inherit',
10
- encoding: 'utf-8',
11
- };
12
-
13
- let result;
14
-
15
- if (process.cwd() !== root || args.length) {
16
- // We're not in the root of the project, or additional arguments were passed
17
- // In this case, forward the command to `yarn`
18
- result = child_process.spawnSync('yarn', args, options);
19
- } else {
20
- // If `yarn` is run without arguments, perform bootstrap
21
- result = child_process.spawnSync('yarn', ['bootstrap'], options);
22
- }
23
-
24
- process.exitCode = result.status;
@@ -1,5 +0,0 @@
1
-
2
- {
3
- "extends": "../tsconfig",
4
- }
5
-