@tamagui/focusable 2.7.7 → 3.0.0-beta.643.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.
Files changed (60) hide show
  1. package/dist/cjs/focusable.cjs +10 -11
  2. package/dist/cjs/focusable.native.cjs +19 -0
  3. package/dist/cjs/focusable.native.js +10 -10
  4. package/dist/cjs/focusable.native.js.map +1 -1
  5. package/dist/cjs/focusableInputHOC.cjs +58 -73
  6. package/dist/cjs/focusableInputHOC.native.cjs +84 -0
  7. package/dist/cjs/focusableInputHOC.native.js +64 -78
  8. package/dist/cjs/focusableInputHOC.native.js.map +1 -1
  9. package/dist/cjs/index.cjs +10 -11
  10. package/dist/cjs/index.native.cjs +23 -0
  11. package/dist/cjs/index.native.js +10 -10
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/cjs/registerFocusable.cjs +18 -19
  14. package/dist/cjs/registerFocusable.native.cjs +60 -0
  15. package/dist/cjs/registerFocusable.native.js +44 -44
  16. package/dist/cjs/registerFocusable.native.js.map +1 -1
  17. package/dist/esm/focusable.mjs +0 -2
  18. package/dist/esm/focusable.native.js +0 -2
  19. package/dist/esm/focusableInputHOC.mjs +42 -47
  20. package/dist/esm/focusableInputHOC.mjs.map +1 -1
  21. package/dist/esm/focusableInputHOC.native.js +48 -53
  22. package/dist/esm/focusableInputHOC.native.js.map +1 -1
  23. package/dist/esm/index.js +5 -4
  24. package/dist/esm/index.mjs +5 -4
  25. package/dist/esm/index.native.js +5 -4
  26. package/dist/esm/registerFocusable.mjs +3 -2
  27. package/dist/esm/registerFocusable.mjs.map +1 -1
  28. package/dist/esm/registerFocusable.native.js +28 -27
  29. package/dist/esm/registerFocusable.native.js.map +1 -1
  30. package/dist/jsx/focusable.mjs +0 -2
  31. package/dist/jsx/focusable.native.cjs +19 -0
  32. package/dist/jsx/focusable.native.js +10 -10
  33. package/dist/jsx/focusable.native.js.map +1 -1
  34. package/dist/jsx/focusableInputHOC.mjs +42 -47
  35. package/dist/jsx/focusableInputHOC.mjs.map +1 -1
  36. package/dist/jsx/focusableInputHOC.native.cjs +84 -0
  37. package/dist/jsx/focusableInputHOC.native.js +64 -78
  38. package/dist/jsx/focusableInputHOC.native.js.map +1 -1
  39. package/dist/jsx/index.js +5 -4
  40. package/dist/jsx/index.mjs +5 -4
  41. package/dist/jsx/index.native.cjs +23 -0
  42. package/dist/jsx/index.native.js +10 -10
  43. package/dist/jsx/index.native.js.map +1 -1
  44. package/dist/jsx/registerFocusable.mjs +3 -2
  45. package/dist/jsx/registerFocusable.mjs.map +1 -1
  46. package/dist/jsx/registerFocusable.native.cjs +60 -0
  47. package/dist/jsx/registerFocusable.native.js +44 -44
  48. package/dist/jsx/registerFocusable.native.js.map +1 -1
  49. package/package.json +4 -4
  50. package/types/focusableInputHOC.d.ts.map +1 -1
  51. package/types/registerFocusable.d.ts.map +1 -1
  52. package/types/registerFocusable.native.d.ts.map +1 -1
  53. package/dist/esm/focusable.mjs.map +0 -1
  54. package/dist/esm/focusable.native.js.map +0 -1
  55. package/dist/esm/index.js.map +0 -1
  56. package/dist/esm/index.mjs.map +0 -1
  57. package/dist/esm/index.native.js.map +0 -1
  58. package/dist/jsx/focusable.mjs.map +0 -1
  59. package/dist/jsx/index.js.map +0 -1
  60. package/dist/jsx/index.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["InputsMap","Map","registerFocusable","id","input","process","env","NODE_ENV","has","console","warn","set","delete","unregisterFocusable","focusFocusable","select","arguments","length","get","focusAndSelect","focus"],"sources":["../../src/registerFocusable.native.ts"],"sourcesContent":[null],"mappings":"AACA,IAAIA,SAAA,GAAY,mBAAIC,GAAA,CAAI;AACjB,IAAIC,iBAAA,GAAoB,SAAAA,CAASC,EAAA,EAAIC,KAAA,EAAO;EAC/C,IAAIC,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,eAAe;IACxC,IAAIP,SAAA,CAAUQ,GAAA,CAAIL,EAAE,GAAG;MACnBM,OAAA,CAAQC,IAAA,CAAK,oCAAoCP,EAAE,EAAE;IACzD;EACJ;EACAH,SAAA,CAAUW,GAAA,CAAIR,EAAA,EAAIC,KAAK;EACvB,OAAO,YAAW;IACdJ,SAAA,CAAUY,MAAA,CAAOT,EAAE;EACvB;AACJ;AACO,IAAIU,mBAAA,GAAsB,SAAAA,CAASV,EAAA,EAAI;EAC1CH,SAAA,CAAUY,MAAA,CAAOT,EAAE;AACvB;AACO,IAAIW,cAAA,GAAiB,SAAAA,CAASX,EAAA,EAAI;EACrC,IAAIY,MAAA,GAASC,SAAA,CAAUC,MAAA,GAAS,KAAKD,SAAA,CAAU,CAAC,MAAM,SAASA,SAAA,CAAU,CAAC,IAAI;EAC9E,IAAIZ,KAAA,GAAQJ,SAAA,CAAUkB,GAAA,CAAIf,EAAE;EAC5B,IAAI,CAACC,KAAA,EAAO;IACR,IAAIC,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,eAAe;MACxCE,OAAA,CAAQC,IAAA,CAAK,yBAAyBP,EAAE;IAC5C;IACA;EACJ;EACA,IAAIY,MAAA,IAAU,CAACX,KAAA,CAAMe,cAAA,EAAgB;IACjCf,KAAA,CAAMgB,KAAA,CAAM;EAChB,OAAO;IACHhB,KAAA,CAAMe,cAAA,CAAe;EACzB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"registerFocusable.native.js","names":[],"sources":["esm/registerFocusable.native.js"],"sourcesContent":["var InputsMap = /* @__PURE__ */ new Map();\nvar registerFocusable = function(id, input) {\n if (process.env.NODE_ENV === \"development\") {\n if (InputsMap.has(id)) {\n console.warn(`Warning, duplicate ID for input: ${id}`);\n }\n }\n InputsMap.set(id, input);\n return function() {\n InputsMap.delete(id);\n };\n};\nvar unregisterFocusable = function(id) {\n InputsMap.delete(id);\n};\nvar focusFocusable = function(id) {\n var select = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var input = InputsMap.get(id);\n if (!input) {\n if (process.env.NODE_ENV === \"development\") {\n console.warn(\"No input found for id\", id);\n }\n return;\n }\n if (select || !input.focusAndSelect) {\n input.focus();\n } else {\n input.focusAndSelect();\n }\n};\nexport {\n focusFocusable,\n registerFocusable,\n unregisterFocusable\n};\n//# sourceMappingURL=registerFocusable.native.js.map\n"],"mappings":";AAAA,IAAI,4BAA4B,IAAI,IAAI;AACxC,IAAI,oBAAoB,SAAS,IAAI,OAAO;CAC1C,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC1C,IAAI,UAAU,IAAI,EAAE,GAAG;GACrB,QAAQ,KAAK,oCAAoC,IAAI;EACvD;CACF;CACA,UAAU,IAAI,IAAI,KAAK;CACvB,OAAO,WAAW;EAChB,UAAU,OAAO,EAAE;CACrB;AACF;AACA,IAAI,sBAAsB,SAAS,IAAI;CACrC,UAAU,OAAO,EAAE;AACrB;AACA,IAAI,iBAAiB,SAAS,IAAI;CAChC,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,QAAQ,UAAU,IAAI,EAAE;CAC5B,IAAI,CAAC,OAAO;EACV,IAAI,QAAQ,IAAI,aAAa,eAAe;GAC1C,QAAQ,KAAK,yBAAyB,EAAE;EAC1C;EACA;CACF;CACA,IAAI,UAAU,CAAC,MAAM,gBAAgB;EACnC,MAAM,MAAM;CACd,OAAO;EACL,MAAM,eAAe;CACvB;AACF"}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=focusable.mjs.map
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var focusable_exports = {};
19
+ module.exports = __toCommonJS(focusable_exports);
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
15
16
  };
16
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
17
- value: true
18
- }), mod);
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
18
  var focusable_exports = {};
20
19
  module.exports = __toCommonJS(focusable_exports);
20
+
21
21
  //# sourceMappingURL=focusable.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"focusable.native.js","names":[],"sources":["jsx/focusable.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar focusable_exports = {};\nmodule.exports = __toCommonJS(focusable_exports);\n//# sourceMappingURL=focusable.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,OAAO,UAAU,aAAa,iBAAiB"}
@@ -2,53 +2,48 @@ import { composeRefs } from "@tamagui/compose-refs";
2
2
  import { useEvent } from "@tamagui/web";
3
3
  import React from "react";
4
4
  import { registerFocusable } from "./registerFocusable.mjs";
5
- function useFocusable({
6
- isInput,
7
- props,
8
- ref
9
- }) {
10
- const {
11
- id,
12
- onChangeText,
13
- value,
14
- defaultValue
15
- } = props;
16
- const inputValue = React.useRef(value || defaultValue || "");
17
- const unregisterFocusable = React.useRef(void 0);
18
- const focusAndSelect = React.useCallback(input => {
19
- input.focus();
20
- if (input.setSelection && typeof inputValue.current === "string") {
21
- input.setSelection(0, inputValue.current.length);
22
- }
23
- }, []);
24
- const registerFocusableHandler = React.useCallback(input => {
25
- if (!id || !input) return;
26
- unregisterFocusable.current?.();
27
- unregisterFocusable.current = registerFocusable(id, {
28
- focus: input.focus,
29
- ...(isInput && {
30
- focusAndSelect: () => focusAndSelect(input)
31
- })
32
- });
33
- }, [id, isInput, focusAndSelect]);
34
- const inputRef = React.useCallback(input => {
35
- if (input) {
36
- registerFocusableHandler(input);
37
- }
38
- }, [registerFocusableHandler]);
39
- const handleChangeText = useEvent(value2 => {
40
- inputValue.current = value2;
41
- onChangeText?.(value2);
42
- });
43
- React.useEffect(() => {
44
- return () => {
45
- unregisterFocusable.current?.();
46
- };
47
- }, []);
48
- return {
49
- ref: React.useMemo(() => composeRefs(ref, inputRef), [ref, inputRef]),
50
- onChangeText: handleChangeText
51
- };
5
+
6
+ function useFocusable({ isInput, props, ref }) {
7
+ const { id, onChangeText, value, defaultValue } = props;
8
+ const inputValue = React.useRef(value || defaultValue || "");
9
+ const unregisterFocusable = React.useRef(void 0);
10
+ const focusAndSelect = React.useCallback((input) => {
11
+ input.focus();
12
+ if (input.setSelection && typeof inputValue.current === "string") {
13
+ input.setSelection(0, inputValue.current.length);
14
+ }
15
+ }, []);
16
+ const registerFocusableHandler = React.useCallback((input) => {
17
+ if (!id || !input) return;
18
+ unregisterFocusable.current?.();
19
+ unregisterFocusable.current = registerFocusable(id, {
20
+ focus: input.focus,
21
+ ...isInput && { focusAndSelect: () => focusAndSelect(input) }
22
+ });
23
+ }, [
24
+ id,
25
+ isInput,
26
+ focusAndSelect
27
+ ]);
28
+ const inputRef = React.useCallback((input) => {
29
+ if (input) {
30
+ registerFocusableHandler(input);
31
+ }
32
+ }, [registerFocusableHandler]);
33
+ const handleChangeText = useEvent((value2) => {
34
+ inputValue.current = value2;
35
+ onChangeText?.(value2);
36
+ });
37
+ React.useEffect(() => {
38
+ return () => {
39
+ unregisterFocusable.current?.();
40
+ };
41
+ }, []);
42
+ return {
43
+ ref: React.useMemo(() => composeRefs(ref, inputRef), [ref, inputRef]),
44
+ onChangeText: handleChangeText
45
+ };
52
46
  }
47
+
53
48
  export { useFocusable };
54
49
  //# sourceMappingURL=focusableInputHOC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["composeRefs","useEvent","React","registerFocusable","useFocusable","isInput","props","ref","id","onChangeText","value","defaultValue","inputValue","useRef","unregisterFocusable","focusAndSelect","useCallback","input","focus","setSelection","current","length","registerFocusableHandler","inputRef","handleChangeText","useEffect","useMemo"],"sources":["../../src/focusableInputHOC.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,SAASC,QAAA,QAAgB;AAEzB,OAAOC,KAAA,MAAW;AAElB,SAASC,iBAAA,QAAyB;AAS3B,SAASC,aAAa;EAC3BC,OAAA;EACAC,KAAA;EACAC;AACF,GAIG;EACD,MAAM;IAAEC,EAAA;IAAIC,YAAA;IAAcC,KAAA;IAAOC;EAAa,IAAIL,KAAA;EAClD,MAAMM,UAAA,GAAaV,KAAA,CAAMW,MAAA,CAAOH,KAAA,IAASC,YAAA,IAAgB,EAAE;EAC3D,MAAMG,mBAAA,GAAsBZ,KAAA,CAAMW,MAAA,CAA+B,MAAS;EAE1E,MAAME,cAAA,GAAiBb,KAAA,CAAMc,WAAA,CAAaC,KAAA,IAAe;IACvDA,KAAA,CAAMC,KAAA,CAAM;IACZ,IAAID,KAAA,CAAME,YAAA,IAAgB,OAAOP,UAAA,CAAWQ,OAAA,KAAY,UAAU;MAChEH,KAAA,CAAME,YAAA,CAAa,GAAGP,UAAA,CAAWQ,OAAA,CAAQC,MAAM;IACjD;EACF,GAAG,EAAE;EAEL,MAAMC,wBAAA,GAA2BpB,KAAA,CAAMc,WAAA,CACpCC,KAAA,IAAe;IACd,IAAI,CAACT,EAAA,IAAM,CAACS,KAAA,EAAO;IAEnBH,mBAAA,CAAoBM,OAAA,GAAU;IAC9BN,mBAAA,CAAoBM,OAAA,GAAUjB,iBAAA,CAAkBK,EAAA,EAAI;MAClDU,KAAA,EAAOD,KAAA,CAAMC,KAAA;MACb,IAAIb,OAAA,IAAW;QACbU,cAAA,EAAgBA,CAAA,KAAMA,cAAA,CAAeE,KAAK;MAC5C;IACF,CAAC;EACH,GACA,CAACT,EAAA,EAAIH,OAAA,EAASU,cAAc,CAC9B;EAEA,MAAMQ,QAAA,GAAWrB,KAAA,CAAMc,WAAA,CACpBC,KAAA,IAAe;IACd,IAAIA,KAAA,EAAO;MACTK,wBAAA,CAAyBL,KAAK;IAChC;EACF,GACA,CAACK,wBAAwB,CAC3B;EAEA,MAAME,gBAAA,GAAmBvB,QAAA,CAAUS,MAAA,IAAkB;IACnDE,UAAA,CAAWQ,OAAA,GAAUV,MAAA;IACrBD,YAAA,GAAeC,MAAK;EACtB,CAAC;EAEDR,KAAA,CAAMuB,SAAA,CAAU,MAAM;IACpB,OAAO,MAAM;MACXX,mBAAA,CAAoBM,OAAA,GAAU;IAChC;EACF,GAAG,EAAE;EAEL,OAAO;IACLb,GAAA,EAAKL,KAAA,CAAMwB,OAAA,CAAQ,MAAM1B,WAAA,CAAYO,GAAA,EAAKgB,QAAQ,GAAG,CAAChB,GAAA,EAAKgB,QAAQ,CAAC;IACpEd,YAAA,EAAce;EAChB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"focusableInputHOC.js","names":[],"sources":["jsx/focusableInputHOC.js"],"sourcesContent":["import { composeRefs } from \"@tamagui/compose-refs\";\nimport { useEvent } from \"@tamagui/web\";\nimport React from \"react\";\nimport { registerFocusable } from \"./registerFocusable\";\nfunction useFocusable({\n isInput,\n props,\n ref\n}) {\n const { id, onChangeText, value, defaultValue } = props;\n const inputValue = React.useRef(value || defaultValue || \"\");\n const unregisterFocusable = React.useRef(void 0);\n const focusAndSelect = React.useCallback((input) => {\n input.focus();\n if (input.setSelection && typeof inputValue.current === \"string\") {\n input.setSelection(0, inputValue.current.length);\n }\n }, []);\n const registerFocusableHandler = React.useCallback(\n (input) => {\n if (!id || !input) return;\n unregisterFocusable.current?.();\n unregisterFocusable.current = registerFocusable(id, {\n focus: input.focus,\n ...isInput && {\n focusAndSelect: () => focusAndSelect(input)\n }\n });\n },\n [id, isInput, focusAndSelect]\n );\n const inputRef = React.useCallback(\n (input) => {\n if (input) {\n registerFocusableHandler(input);\n }\n },\n [registerFocusableHandler]\n );\n const handleChangeText = useEvent((value2) => {\n inputValue.current = value2;\n onChangeText?.(value2);\n });\n React.useEffect(() => {\n return () => {\n unregisterFocusable.current?.();\n };\n }, []);\n return {\n ref: React.useMemo(() => composeRefs(ref, inputRef), [ref, inputRef]),\n onChangeText: handleChangeText\n };\n}\nexport {\n useFocusable\n};\n//# sourceMappingURL=focusableInputHOC.js.map\n"],"mappings":";;;;;;AAIA,SAAS,aAAa,EACpB,SACA,OACA,OACC;CACD,MAAM,EAAE,IAAI,cAAc,OAAO,iBAAiB;CAClD,MAAM,aAAa,MAAM,OAAO,SAAS,gBAAgB,EAAE;CAC3D,MAAM,sBAAsB,MAAM,OAAO,KAAK,CAAC;CAC/C,MAAM,iBAAiB,MAAM,aAAa,UAAU;EAClD,MAAM,MAAM;EACZ,IAAI,MAAM,gBAAgB,OAAO,WAAW,YAAY,UAAU;GAChE,MAAM,aAAa,GAAG,WAAW,QAAQ,MAAM;EACjD;CACF,GAAG,CAAC,CAAC;CACL,MAAM,2BAA2B,MAAM,aACpC,UAAU;EACT,IAAI,CAAC,MAAM,CAAC,OAAO;EACnB,oBAAoB,UAAU;EAC9B,oBAAoB,UAAU,kBAAkB,IAAI;GAClD,OAAO,MAAM;GACb,GAAG,WAAW,EACZ,sBAAsB,eAAe,KAAK,EAC5C;EACF,CAAC;CACH,GACA;EAAC;EAAI;EAAS;CAAc,CAC9B;CACA,MAAM,WAAW,MAAM,aACpB,UAAU;EACT,IAAI,OAAO;GACT,yBAAyB,KAAK;EAChC;CACF,GACA,CAAC,wBAAwB,CAC3B;CACA,MAAM,mBAAmB,UAAU,WAAW;EAC5C,WAAW,UAAU;EACrB,eAAe,MAAM;CACvB,CAAC;CACD,MAAM,gBAAgB;EACpB,aAAa;GACX,oBAAoB,UAAU;EAChC;CACF,GAAG,CAAC,CAAC;CACL,OAAO;EACL,KAAK,MAAM,cAAc,YAAY,KAAK,QAAQ,GAAG,CAAC,KAAK,QAAQ,CAAC;EACpE,cAAc;CAChB;AACF"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var focusableInputHOC_exports = {};
31
+ __export(focusableInputHOC_exports, { useFocusable: () => useFocusable });
32
+ module.exports = __toCommonJS(focusableInputHOC_exports);
33
+ var import_compose_refs = require("@tamagui/compose-refs");
34
+ var import_web = require("@tamagui/web");
35
+ var import_react = __toESM(require("react"), 1);
36
+ var import_registerFocusable = require("./registerFocusable.native.js");
37
+ function useFocusable(param) {
38
+ var { isInput, props, ref } = param;
39
+ var { id, onChangeText, value, defaultValue } = props;
40
+ var inputValue = import_react.default.useRef(value || defaultValue || "");
41
+ var unregisterFocusable = import_react.default.useRef(void 0);
42
+ var focusAndSelect = import_react.default.useCallback(function(input) {
43
+ input.focus();
44
+ if (input.setSelection && typeof inputValue.current === "string") {
45
+ input.setSelection(0, inputValue.current.length);
46
+ }
47
+ }, []);
48
+ var registerFocusableHandler = import_react.default.useCallback(function(input) {
49
+ var _unregisterFocusable_current;
50
+ if (!id || !input) return;
51
+ (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);
52
+ unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
53
+ focus: input.focus,
54
+ ...isInput && { focusAndSelect: function() {
55
+ return focusAndSelect(input);
56
+ } }
57
+ });
58
+ }, [
59
+ id,
60
+ isInput,
61
+ focusAndSelect
62
+ ]);
63
+ var inputRef = import_react.default.useCallback(function(input) {
64
+ if (input) {
65
+ registerFocusableHandler(input);
66
+ }
67
+ }, [registerFocusableHandler]);
68
+ var handleChangeText = (0, import_web.useEvent)(function(value2) {
69
+ inputValue.current = value2;
70
+ onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(value2);
71
+ });
72
+ import_react.default.useEffect(function() {
73
+ return function() {
74
+ var _unregisterFocusable_current;
75
+ (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);
76
+ };
77
+ }, []);
78
+ return {
79
+ ref: import_react.default.useMemo(function() {
80
+ return (0, import_compose_refs.composeRefs)(ref, inputRef);
81
+ }, [ref, inputRef]),
82
+ onChangeText: handleChangeText
83
+ };
84
+ }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7,94 +8,79 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getProtoOf = Object.getPrototypeOf;
8
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
10
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
14
15
  };
15
16
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
23
24
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
- value: mod,
31
- enumerable: true
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
32
28
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
30
  var focusableInputHOC_exports = {};
37
- __export(focusableInputHOC_exports, {
38
- useFocusable: () => useFocusable
39
- });
31
+ __export(focusableInputHOC_exports, { useFocusable: () => useFocusable });
40
32
  module.exports = __toCommonJS(focusableInputHOC_exports);
41
33
  var import_compose_refs = require("@tamagui/compose-refs");
42
34
  var import_web = require("@tamagui/web");
43
35
  var import_react = __toESM(require("react"), 1);
44
36
  var import_registerFocusable = require("./registerFocusable.native.js");
45
37
  function useFocusable(param) {
46
- var {
47
- isInput,
48
- props,
49
- ref
50
- } = param;
51
- var {
52
- id,
53
- onChangeText,
54
- value,
55
- defaultValue
56
- } = props;
57
- var inputValue = import_react.default.useRef(value || defaultValue || "");
58
- var unregisterFocusable = import_react.default.useRef(void 0);
59
- var focusAndSelect = import_react.default.useCallback(function (input) {
60
- input.focus();
61
- if (input.setSelection && typeof inputValue.current === "string") {
62
- input.setSelection(0, inputValue.current.length);
63
- }
64
- }, []);
65
- var registerFocusableHandler = import_react.default.useCallback(function (input) {
66
- var _unregisterFocusable_current;
67
- if (!id || !input) return;
68
- (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);
69
- unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
70
- focus: input.focus,
71
- ...(isInput && {
72
- focusAndSelect: function () {
73
- return focusAndSelect(input);
74
- }
75
- })
76
- });
77
- }, [id, isInput, focusAndSelect]);
78
- var inputRef = import_react.default.useCallback(function (input) {
79
- if (input) {
80
- registerFocusableHandler(input);
81
- }
82
- }, [registerFocusableHandler]);
83
- var handleChangeText = (0, import_web.useEvent)(function (value2) {
84
- inputValue.current = value2;
85
- onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(value2);
86
- });
87
- import_react.default.useEffect(function () {
88
- return function () {
89
- var _unregisterFocusable_current;
90
- (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);
91
- };
92
- }, []);
93
- return {
94
- ref: import_react.default.useMemo(function () {
95
- return (0, import_compose_refs.composeRefs)(ref, inputRef);
96
- }, [ref, inputRef]),
97
- onChangeText: handleChangeText
98
- };
38
+ var { isInput, props, ref } = param;
39
+ var { id, onChangeText, value, defaultValue } = props;
40
+ var inputValue = import_react.default.useRef(value || defaultValue || "");
41
+ var unregisterFocusable = import_react.default.useRef(void 0);
42
+ var focusAndSelect = import_react.default.useCallback(function(input) {
43
+ input.focus();
44
+ if (input.setSelection && typeof inputValue.current === "string") {
45
+ input.setSelection(0, inputValue.current.length);
46
+ }
47
+ }, []);
48
+ var registerFocusableHandler = import_react.default.useCallback(function(input) {
49
+ var _unregisterFocusable_current;
50
+ if (!id || !input) return;
51
+ (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);
52
+ unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
53
+ focus: input.focus,
54
+ ...isInput && { focusAndSelect: function() {
55
+ return focusAndSelect(input);
56
+ } }
57
+ });
58
+ }, [
59
+ id,
60
+ isInput,
61
+ focusAndSelect
62
+ ]);
63
+ var inputRef = import_react.default.useCallback(function(input) {
64
+ if (input) {
65
+ registerFocusableHandler(input);
66
+ }
67
+ }, [registerFocusableHandler]);
68
+ var handleChangeText = (0, import_web.useEvent)(function(value2) {
69
+ inputValue.current = value2;
70
+ onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(value2);
71
+ });
72
+ import_react.default.useEffect(function() {
73
+ return function() {
74
+ var _unregisterFocusable_current;
75
+ (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);
76
+ };
77
+ }, []);
78
+ return {
79
+ ref: import_react.default.useMemo(function() {
80
+ return (0, import_compose_refs.composeRefs)(ref, inputRef);
81
+ }, [ref, inputRef]),
82
+ onChangeText: handleChangeText
83
+ };
99
84
  }
85
+
100
86
  //# sourceMappingURL=focusableInputHOC.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","focusableInputHOC_exports","useFocusable","module","exports","import_compose_refs","require","import_web","import_react","import_registerFocusable","param","isInput","props","ref","id","onChangeText","defaultValue","inputValue","default","useRef","unregisterFocusable","focusAndSelect","useCallback","input","focus","setSelection","current","length","registerFocusableHandler","_unregisterFocusable_current","registerFocusable"],"sources":["../../src/focusableInputHOC.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"focusableInputHOC.native.js","names":[],"sources":["jsx/focusableInputHOC.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar focusableInputHOC_exports = {};\n__export(focusableInputHOC_exports, {\n useFocusable: () => useFocusable\n});\nmodule.exports = __toCommonJS(focusableInputHOC_exports);\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_registerFocusable = require(\"./registerFocusable\");\nfunction useFocusable(param) {\n var { isInput, props, ref } = param;\n var { id, onChangeText, value, defaultValue } = props;\n var inputValue = import_react.default.useRef(value || defaultValue || \"\");\n var unregisterFocusable = import_react.default.useRef(void 0);\n var focusAndSelect = import_react.default.useCallback(function(input) {\n input.focus();\n if (input.setSelection && typeof inputValue.current === \"string\") {\n input.setSelection(0, inputValue.current.length);\n }\n }, []);\n var registerFocusableHandler = import_react.default.useCallback(function(input) {\n var _unregisterFocusable_current;\n if (!id || !input) return;\n (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);\n unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {\n focus: input.focus,\n ...isInput && {\n focusAndSelect: function() {\n return focusAndSelect(input);\n }\n }\n });\n }, [\n id,\n isInput,\n focusAndSelect\n ]);\n var inputRef = import_react.default.useCallback(function(input) {\n if (input) {\n registerFocusableHandler(input);\n }\n }, [\n registerFocusableHandler\n ]);\n var handleChangeText = (0, import_web.useEvent)(function(value2) {\n inputValue.current = value2;\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(value2);\n });\n import_react.default.useEffect(function() {\n return function() {\n var _unregisterFocusable_current;\n (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 ? void 0 : _unregisterFocusable_current.call(unregisterFocusable);\n };\n }, []);\n return {\n ref: import_react.default.useMemo(function() {\n return (0, import_compose_refs.composeRefs)(ref, inputRef);\n }, [\n ref,\n inputRef\n ]),\n onChangeText: handleChangeText\n };\n}\n//# sourceMappingURL=focusableInputHOC.js.map\n"],"mappings":"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"}
package/dist/jsx/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export * from "./registerFocusable.mjs";
2
- export * from "./focusableInputHOC.mjs";
3
- export * from "./focusable.mjs";
4
- //# sourceMappingURL=index.js.map
1
+ export * from "./registerFocusable.mjs"
2
+
3
+ export * from "./focusableInputHOC.mjs"
4
+
5
+ export * from "./focusable.mjs"
@@ -1,4 +1,5 @@
1
- export * from "./registerFocusable.mjs";
2
- export * from "./focusableInputHOC.mjs";
3
- export * from "./focusable.mjs";
4
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./registerFocusable.mjs"
2
+
3
+ export * from "./focusableInputHOC.mjs"
4
+
5
+ export * from "./focusable.mjs"
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ module.exports = __toCommonJS(index_exports);
21
+ __reExport(index_exports, require("./registerFocusable.native.js"), module.exports);
22
+ __reExport(index_exports, require("./focusableInputHOC.native.js"), module.exports);
23
+ __reExport(index_exports, require("./focusable.native.js"), module.exports);
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
15
16
  };
16
17
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
- value: true
19
- }), mod);
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
19
  var index_exports = {};
21
20
  module.exports = __toCommonJS(index_exports);
22
21
  __reExport(index_exports, require("./registerFocusable.native.js"), module.exports);
23
22
  __reExport(index_exports, require("./focusableInputHOC.native.js"), module.exports);
24
23
  __reExport(index_exports, require("./focusable.native.js"), module.exports);
24
+
25
25
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,SAAA,GAAcC,MAAA,CAAAC,cAAA;AACd,IAAAC,gBAAc,GAAAF,MAAA,CAAAG,wBAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./registerFocusable\"), module.exports);\n__reExport(index_exports, require(\"./focusableInputHOC\"), module.exports);\n__reExport(index_exports, require(\"./focusable\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,+BAAqB,GAAG,OAAO,OAAO;AACxE,WAAW,eAAe,QAAQ,+BAAqB,GAAG,OAAO,OAAO;AACxE,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO"}
@@ -1,5 +1,6 @@
1
1
  const registerFocusable = (id, input) => () => {};
2
- const unregisterFocusable = id => {};
3
- const focusFocusable = id => {};
2
+ const unregisterFocusable = (id) => {};
3
+ const focusFocusable = (id) => {};
4
+
4
5
  export { focusFocusable, registerFocusable, unregisterFocusable };
5
6
  //# sourceMappingURL=registerFocusable.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["registerFocusable","id","input","unregisterFocusable","focusFocusable"],"sources":["../../src/registerFocusable.ts"],"sourcesContent":[null],"mappings":"AAEO,MAAMA,iBAAA,GAAoBA,CAACC,EAAA,EAAYC,KAAA,KAAqB,MAAM,CAEzE;AAEO,MAAMC,mBAAA,GAAuBF,EAAA,IAAe,CAEnD;AAEO,MAAMG,cAAA,GAAkBH,EAAA,IAAe,CAE9C","ignoreList":[]}
1
+ {"version":3,"file":"registerFocusable.js","names":[],"sources":["jsx/registerFocusable.js"],"sourcesContent":["const registerFocusable = (id, input) => () => {\n};\nconst unregisterFocusable = (id) => {\n};\nconst focusFocusable = (id) => {\n};\nexport {\n focusFocusable,\n registerFocusable,\n unregisterFocusable\n};\n//# sourceMappingURL=registerFocusable.js.map\n"],"mappings":";AAAA,MAAM,qBAAqB,IAAI,gBAAgB,CAC/C;AACA,MAAM,uBAAuB,OAAO,CACpC;AACA,MAAM,kBAAkB,OAAO,CAC/B"}