tamagui 1.0.10 → 1.0.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.
- package/package.json +44 -44
- package/dist/cjs/helpers/focusableInputHOC.js +0 -92
- package/dist/cjs/helpers/focusableInputHOC.js.map +0 -7
- package/dist/cjs/helpers/getSpace.js +0 -34
- package/dist/cjs/helpers/getSpace.js.map +0 -7
- package/dist/cjs/helpers/prevent.js +0 -28
- package/dist/cjs/helpers/prevent.js.map +0 -7
- package/dist/cjs/hooks/useKeyboardDismissable.js +0 -95
- package/dist/cjs/hooks/useKeyboardDismissable.js.map +0 -7
- package/dist/cjs/lib/focusable.js +0 -16
- package/dist/cjs/lib/focusable.js.map +0 -7
- package/dist/cjs/lib/linear-gradient.js +0 -29
- package/dist/cjs/lib/linear-gradient.js.map +0 -7
- package/dist/cjs/lib/registerFocusable.js +0 -37
- package/dist/cjs/lib/registerFocusable.js.map +0 -7
- package/dist/cjs/lib/registerFocusable.native.js +0 -60
- package/dist/cjs/lib/registerFocusable.native.js.map +0 -7
- package/dist/cjs/polyfills.js +0 -11
- package/dist/cjs/polyfills.js.map +0 -7
- package/dist/cjs/views/BlurView.js +0 -90
- package/dist/cjs/views/BlurView.js.map +0 -7
- package/dist/cjs/views/BlurView.native.js +0 -38
- package/dist/cjs/views/BlurView.native.js.map +0 -7
- package/dist/cjs/views/ExitAnimationContext.js +0 -34
- package/dist/cjs/views/ExitAnimationContext.js.map +0 -7
- package/dist/cjs/views/Hoverable.js +0 -92
- package/dist/cjs/views/Hoverable.js.map +0 -7
- package/dist/cjs/views/Label.js +0 -177
- package/dist/cjs/views/Label.js.map +0 -7
- package/dist/cjs/views/LinearGradient.js +0 -81
- package/dist/cjs/views/LinearGradient.js.map +0 -7
- package/dist/cjs/views/Switch.js +0 -265
- package/dist/cjs/views/Switch.js.map +0 -7
- package/dist/cjs/views/Table.js +0 -84
- package/dist/cjs/views/Table.js.map +0 -7
- package/dist/cjs/views/Toast.js +0 -129
- package/dist/cjs/views/Toast.js.map +0 -7
- package/dist/esm/helpers/focusableInputHOC.js +0 -68
- package/dist/esm/helpers/focusableInputHOC.js.map +0 -7
- package/dist/esm/helpers/getSpace.js +0 -11
- package/dist/esm/helpers/getSpace.js.map +0 -7
- package/dist/esm/helpers/prevent.js +0 -5
- package/dist/esm/helpers/prevent.js.map +0 -7
- package/dist/esm/hooks/useKeyboardDismissable.js +0 -69
- package/dist/esm/hooks/useKeyboardDismissable.js.map +0 -7
- package/dist/esm/lib/focusable.js +0 -1
- package/dist/esm/lib/focusable.js.map +0 -7
- package/dist/esm/lib/linear-gradient.js +0 -5
- package/dist/esm/lib/linear-gradient.js.map +0 -7
- package/dist/esm/lib/registerFocusable.js +0 -12
- package/dist/esm/lib/registerFocusable.js.map +0 -7
- package/dist/esm/lib/registerFocusable.native.js +0 -35
- package/dist/esm/lib/registerFocusable.native.js.map +0 -7
- package/dist/esm/polyfills.js +0 -10
- package/dist/esm/polyfills.js.map +0 -7
- package/dist/esm/views/BlurView.js +0 -66
- package/dist/esm/views/BlurView.js.map +0 -7
- package/dist/esm/views/BlurView.native.js +0 -15
- package/dist/esm/views/BlurView.native.js.map +0 -7
- package/dist/esm/views/ExitAnimationContext.js +0 -10
- package/dist/esm/views/ExitAnimationContext.js.map +0 -7
- package/dist/esm/views/Hoverable.js +0 -66
- package/dist/esm/views/Hoverable.js.map +0 -7
- package/dist/esm/views/Label.js +0 -158
- package/dist/esm/views/Label.js.map +0 -7
- package/dist/esm/views/LinearGradient.js +0 -58
- package/dist/esm/views/LinearGradient.js.map +0 -7
- package/dist/esm/views/Switch.js +0 -244
- package/dist/esm/views/Switch.js.map +0 -7
- package/dist/esm/views/Table.js +0 -56
- package/dist/esm/views/Table.js.map +0 -7
- package/dist/esm/views/Toast.js +0 -107
- package/dist/esm/views/Toast.js.map +0 -7
- package/dist/jsx/helpers/focusableInputHOC.js +0 -49
- package/dist/jsx/helpers/focusableInputHOC.js.map +0 -7
- package/dist/jsx/helpers/getSpace.js +0 -11
- package/dist/jsx/helpers/getSpace.js.map +0 -7
- package/dist/jsx/helpers/prevent.js +0 -5
- package/dist/jsx/helpers/prevent.js.map +0 -7
- package/dist/jsx/hooks/useKeyboardDismissable.js +0 -69
- package/dist/jsx/hooks/useKeyboardDismissable.js.map +0 -7
- package/dist/jsx/lib/focusable.js +0 -1
- package/dist/jsx/lib/focusable.js.map +0 -7
- package/dist/jsx/lib/linear-gradient.js +0 -5
- package/dist/jsx/lib/linear-gradient.js.map +0 -7
- package/dist/jsx/lib/registerFocusable.js +0 -12
- package/dist/jsx/lib/registerFocusable.js.map +0 -7
- package/dist/jsx/lib/registerFocusable.native.js +0 -35
- package/dist/jsx/lib/registerFocusable.native.js.map +0 -7
- package/dist/jsx/polyfills.js +0 -10
- package/dist/jsx/polyfills.js.map +0 -7
- package/dist/jsx/views/BlurView.js +0 -27
- package/dist/jsx/views/BlurView.js.map +0 -7
- package/dist/jsx/views/BlurView.native.js +0 -15
- package/dist/jsx/views/BlurView.native.js.map +0 -7
- package/dist/jsx/views/ExitAnimationContext.js +0 -10
- package/dist/jsx/views/ExitAnimationContext.js.map +0 -7
- package/dist/jsx/views/Hoverable.js +0 -58
- package/dist/jsx/views/Hoverable.js.map +0 -7
- package/dist/jsx/views/Label.js +0 -118
- package/dist/jsx/views/Label.js.map +0 -7
- package/dist/jsx/views/LinearGradient.js +0 -46
- package/dist/jsx/views/LinearGradient.js.map +0 -7
- package/dist/jsx/views/Switch.js +0 -164
- package/dist/jsx/views/Switch.js.map +0 -7
- package/dist/jsx/views/Table.js +0 -56
- package/dist/jsx/views/Table.js.map +0 -7
- package/dist/jsx/views/Toast.js +0 -73
- package/dist/jsx/views/Toast.js.map +0 -7
- package/types/lib/linear-gradient.d.ts +0 -3
- package/types/views/LinearGradient.d.ts +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamagui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css",
|
|
6
6
|
"*setup.js"
|
|
@@ -33,48 +33,48 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/adapt": "^1.0.
|
|
37
|
-
"@tamagui/alert-dialog": "^1.0.
|
|
38
|
-
"@tamagui/animate-presence": "^1.0.
|
|
39
|
-
"@tamagui/avatar": "^1.0.
|
|
40
|
-
"@tamagui/button": "^1.0.
|
|
41
|
-
"@tamagui/card": "^1.0.
|
|
42
|
-
"@tamagui/compose-refs": "^1.0.
|
|
43
|
-
"@tamagui/core": "^1.0.
|
|
44
|
-
"@tamagui/create-context": "^1.0.
|
|
45
|
-
"@tamagui/dialog": "^1.0.
|
|
46
|
-
"@tamagui/fake-react-native": "^1.0.
|
|
47
|
-
"@tamagui/font-size": "^1.0.
|
|
48
|
-
"@tamagui/get-button-sized": "^1.0.
|
|
49
|
-
"@tamagui/get-font-sized": "^1.0.
|
|
50
|
-
"@tamagui/get-size": "^1.0.
|
|
51
|
-
"@tamagui/helpers": "^1.0.
|
|
52
|
-
"@tamagui/helpers-tamagui": "^1.0.
|
|
53
|
-
"@tamagui/image": "^1.0.
|
|
54
|
-
"@tamagui/label": "^1.0.
|
|
55
|
-
"@tamagui/linear-gradient": "^1.0.
|
|
56
|
-
"@tamagui/list-item": "^1.0.
|
|
57
|
-
"@tamagui/popover": "^1.0.
|
|
58
|
-
"@tamagui/popper": "^1.0.
|
|
59
|
-
"@tamagui/portal": "^1.0.
|
|
60
|
-
"@tamagui/progress": "^1.0.
|
|
61
|
-
"@tamagui/react-native-media-driver": "^1.0.
|
|
62
|
-
"@tamagui/scroll-view": "^1.0.
|
|
63
|
-
"@tamagui/select": "^1.0.
|
|
64
|
-
"@tamagui/separator": "^1.0.
|
|
65
|
-
"@tamagui/shapes": "^1.0.
|
|
66
|
-
"@tamagui/sheet": "^1.0.
|
|
67
|
-
"@tamagui/slider": "^1.0.
|
|
68
|
-
"@tamagui/stacks": "^1.0.
|
|
69
|
-
"@tamagui/switch": "^1.0.
|
|
70
|
-
"@tamagui/text": "^1.0.
|
|
71
|
-
"@tamagui/tooltip": "^1.0.
|
|
72
|
-
"@tamagui/use-controllable-state": "^1.0.
|
|
73
|
-
"@tamagui/use-debounce": "^1.0.
|
|
74
|
-
"@tamagui/use-event": "^1.0.
|
|
75
|
-
"@tamagui/use-force-update": "^1.0.
|
|
76
|
-
"@tamagui/use-window-dimensions": "^1.0.
|
|
77
|
-
"@tamagui/visually-hidden": "^1.0.
|
|
36
|
+
"@tamagui/adapt": "^1.0.12",
|
|
37
|
+
"@tamagui/alert-dialog": "^1.0.12",
|
|
38
|
+
"@tamagui/animate-presence": "^1.0.12",
|
|
39
|
+
"@tamagui/avatar": "^1.0.12",
|
|
40
|
+
"@tamagui/button": "^1.0.12",
|
|
41
|
+
"@tamagui/card": "^1.0.12",
|
|
42
|
+
"@tamagui/compose-refs": "^1.0.12",
|
|
43
|
+
"@tamagui/core": "^1.0.12",
|
|
44
|
+
"@tamagui/create-context": "^1.0.12",
|
|
45
|
+
"@tamagui/dialog": "^1.0.12",
|
|
46
|
+
"@tamagui/fake-react-native": "^1.0.12",
|
|
47
|
+
"@tamagui/font-size": "^1.0.12",
|
|
48
|
+
"@tamagui/get-button-sized": "^1.0.12",
|
|
49
|
+
"@tamagui/get-font-sized": "^1.0.12",
|
|
50
|
+
"@tamagui/get-size": "^1.0.12",
|
|
51
|
+
"@tamagui/helpers": "^1.0.12",
|
|
52
|
+
"@tamagui/helpers-tamagui": "^1.0.12",
|
|
53
|
+
"@tamagui/image": "^1.0.12",
|
|
54
|
+
"@tamagui/label": "^1.0.12",
|
|
55
|
+
"@tamagui/linear-gradient": "^1.0.12",
|
|
56
|
+
"@tamagui/list-item": "^1.0.12",
|
|
57
|
+
"@tamagui/popover": "^1.0.12",
|
|
58
|
+
"@tamagui/popper": "^1.0.12",
|
|
59
|
+
"@tamagui/portal": "^1.0.12",
|
|
60
|
+
"@tamagui/progress": "^1.0.12",
|
|
61
|
+
"@tamagui/react-native-media-driver": "^1.0.12",
|
|
62
|
+
"@tamagui/scroll-view": "^1.0.12",
|
|
63
|
+
"@tamagui/select": "^1.0.12",
|
|
64
|
+
"@tamagui/separator": "^1.0.12",
|
|
65
|
+
"@tamagui/shapes": "^1.0.12",
|
|
66
|
+
"@tamagui/sheet": "^1.0.12",
|
|
67
|
+
"@tamagui/slider": "^1.0.12",
|
|
68
|
+
"@tamagui/stacks": "^1.0.12",
|
|
69
|
+
"@tamagui/switch": "^1.0.12",
|
|
70
|
+
"@tamagui/text": "^1.0.12",
|
|
71
|
+
"@tamagui/tooltip": "^1.0.12",
|
|
72
|
+
"@tamagui/use-controllable-state": "^1.0.12",
|
|
73
|
+
"@tamagui/use-debounce": "^1.0.12",
|
|
74
|
+
"@tamagui/use-event": "^1.0.12",
|
|
75
|
+
"@tamagui/use-force-update": "^1.0.12",
|
|
76
|
+
"@tamagui/use-window-dimensions": "^1.0.12",
|
|
77
|
+
"@tamagui/visually-hidden": "^1.0.12"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"react": "*",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"react-native-web": "*"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@tamagui/build": "^1.0.
|
|
85
|
+
"@tamagui/build": "^1.0.12",
|
|
86
86
|
"@types/node": "^16.11.9",
|
|
87
87
|
"@types/react": "^18.0.15",
|
|
88
88
|
"react": "^18.2.0",
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __export = (target, all) => {
|
|
25
|
-
for (var name in all)
|
|
26
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
-
for (let key of __getOwnPropNames(from))
|
|
31
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
-
}
|
|
34
|
-
return to;
|
|
35
|
-
};
|
|
36
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
-
var focusableInputHOC_exports = {};
|
|
39
|
-
__export(focusableInputHOC_exports, {
|
|
40
|
-
focusableInputHOC: () => focusableInputHOC
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(focusableInputHOC_exports);
|
|
43
|
-
var import_compose_refs = require("@tamagui/compose-refs");
|
|
44
|
-
var import_core = require("@tamagui/core");
|
|
45
|
-
var import_react = __toESM(require("react"));
|
|
46
|
-
var import_react2 = require("react");
|
|
47
|
-
var import_registerFocusable = require("../lib/registerFocusable");
|
|
48
|
-
function focusableInputHOC(Component) {
|
|
49
|
-
return (0, import_react2.forwardRef)((props, ref) => {
|
|
50
|
-
const isInput = (0, import_core.isTamaguiComponent)(Component) && Component.staticConfig.isInput;
|
|
51
|
-
const inputValue = (0, import_react.useRef)(props.value || props.defaultValue || "");
|
|
52
|
-
const inputRef = (0, import_react2.useCallback)((input) => {
|
|
53
|
-
if (!props.id)
|
|
54
|
-
return;
|
|
55
|
-
if (!input)
|
|
56
|
-
return;
|
|
57
|
-
(0, import_registerFocusable.registerFocusable)(props.id, __spreadValues({
|
|
58
|
-
focus: input.focus
|
|
59
|
-
}, isInput && {
|
|
60
|
-
focusAndSelect() {
|
|
61
|
-
input.focus();
|
|
62
|
-
if (input.setSelection && typeof inputValue.current === "string") {
|
|
63
|
-
input.setSelection(0, inputValue.current.length);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}));
|
|
67
|
-
}, [props.id]);
|
|
68
|
-
const combinedRefs = (0, import_compose_refs.composeRefs)(ref, inputRef);
|
|
69
|
-
(0, import_react2.useEffect)(() => {
|
|
70
|
-
return () => {
|
|
71
|
-
if (!props.id)
|
|
72
|
-
return;
|
|
73
|
-
(0, import_registerFocusable.unregisterFocusable)(props.id);
|
|
74
|
-
};
|
|
75
|
-
}, [props.id]);
|
|
76
|
-
const finalProps = isInput ? __spreadProps(__spreadValues({}, props), {
|
|
77
|
-
onChangeText(value) {
|
|
78
|
-
var _a;
|
|
79
|
-
inputValue.current = value;
|
|
80
|
-
(_a = props.onChangeText) == null ? void 0 : _a.call(props, value);
|
|
81
|
-
}
|
|
82
|
-
}) : props;
|
|
83
|
-
return /* @__PURE__ */ import_react.default.createElement(Component, __spreadValues({
|
|
84
|
-
ref: combinedRefs
|
|
85
|
-
}, finalProps));
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
-
0 && (module.exports = {
|
|
90
|
-
focusableInputHOC
|
|
91
|
-
});
|
|
92
|
-
//# sourceMappingURL=focusableInputHOC.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/focusableInputHOC.tsx"],
|
|
4
|
-
"sourcesContent": ["import { composeRefs } from '@tamagui/compose-refs'\nimport { isTamaguiComponent } from '@tamagui/core'\nimport React, { useRef } from 'react'\nimport { forwardRef, useCallback, useEffect } from 'react'\n\nimport { registerFocusable, unregisterFocusable } from '../lib/registerFocusable'\n\nexport function focusableInputHOC<A extends Function>(Component: A): A {\n return forwardRef(\n (\n props: {\n id?: string\n onChangeText?: (val: string) => void\n value?: string\n defaultValue?: string\n },\n ref\n ) => {\n const isInput = isTamaguiComponent(Component) && Component.staticConfig.isInput\n const inputValue = useRef(props.value || props.defaultValue || '')\n\n const inputRef = useCallback(\n (input) => {\n if (!props.id) return\n if (!input) return\n registerFocusable(props.id, {\n focus: input.focus,\n\n ...(isInput && {\n // react-native doesn't support programmatic .select()\n focusAndSelect() {\n input.focus()\n if (input.setSelection && typeof inputValue.current === 'string') {\n input.setSelection(0, inputValue.current.length)\n }\n },\n }),\n })\n },\n [props.id]\n )\n\n const combinedRefs = composeRefs(ref, inputRef)\n\n useEffect(() => {\n return () => {\n if (!props.id) return\n unregisterFocusable(props.id)\n }\n }, [props.id])\n\n const finalProps = isInput\n ? {\n ...props,\n onChangeText(value) {\n inputValue.current = value\n props.onChangeText?.(value)\n },\n }\n : props\n\n return <Component ref={combinedRefs} {...finalProps} />\n }\n ) as any\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA4B;AAC5B,kBAAmC;AACnC,mBAA8B;AAC9B,oBAAmD;AAEnD,+BAAuD;AAEhD,2BAA+C,WAAiB;AACrE,SAAO,8BACL,CACE,OAMA,QACG;AACH,UAAM,UAAU,oCAAmB,SAAS,KAAK,UAAU,aAAa;AACxE,UAAM,aAAa,yBAAO,MAAM,SAAS,MAAM,gBAAgB,EAAE;AAEjE,UAAM,WAAW,+BACf,CAAC,UAAU;AACT,UAAI,CAAC,MAAM;AAAI;AACf,UAAI,CAAC;AAAO;AACZ,sDAAkB,MAAM,IAAI;AAAA,QAC1B,OAAO,MAAM;AAAA,SAET,WAAW;AAAA,QAEb,iBAAiB;AACf,gBAAM,MAAM;AACZ,cAAI,MAAM,gBAAgB,OAAO,WAAW,YAAY,UAAU;AAChE,kBAAM,aAAa,GAAG,WAAW,QAAQ,MAAM;AAAA,UACjD;AAAA,QACF;AAAA,MACF,EACD;AAAA,IACH,GACA,CAAC,MAAM,EAAE,CACX;AAEA,UAAM,eAAe,qCAAY,KAAK,QAAQ;AAE9C,iCAAU,MAAM;AACd,aAAO,MAAM;AACX,YAAI,CAAC,MAAM;AAAI;AACf,0DAAoB,MAAM,EAAE;AAAA,MAC9B;AAAA,IACF,GAAG,CAAC,MAAM,EAAE,CAAC;AAEb,UAAM,aAAa,UACf,iCACK,QADL;AAAA,MAEE,aAAa,OAAO;AAtDhC;AAuDc,mBAAW,UAAU;AACrB,oBAAM,iBAAN,+BAAqB;AAAA,MACvB;AAAA,IACF,KACA;AAEJ,WAAO,mDAAC;AAAA,MAAU,KAAK;AAAA,OAAkB,WAAY;AAAA,EACvD,CACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var getSpace_exports = {};
|
|
19
|
-
__export(getSpace_exports, {
|
|
20
|
-
getSpace: () => getSpace
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(getSpace_exports);
|
|
23
|
-
var import_core = require("@tamagui/core");
|
|
24
|
-
const getSpace = (size, sizeUpOrDownBy = 0) => {
|
|
25
|
-
const spaces = (0, import_core.getTokens)().space;
|
|
26
|
-
const spaceNames = Object.keys(spaces);
|
|
27
|
-
const key = spaceNames[Math.max(0, spaceNames.indexOf(String(size || "$4")) + sizeUpOrDownBy)];
|
|
28
|
-
return spaces[key] || spaces["$4"];
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
getSpace
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=getSpace.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getSpace.tsx"],
|
|
4
|
-
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (size?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space as any as SpaceTokens\n const spaceNames = Object.keys(spaces)\n const key = spaceNames[Math.max(0, spaceNames.indexOf(String(size || '$4')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$4']) as SpaceTokens\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AAEhC,MAAM,WAAW,CAAC,MAAgC,iBAAiB,MAAM;AAC9E,QAAM,SAAS,2BAAU,EAAE;AAC3B,QAAM,aAAa,OAAO,KAAK,MAAM;AACrC,QAAM,MAAM,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,QAAQ,IAAI,CAAC,IAAI,cAAc;AAC5F,SAAQ,OAAO,QAAQ,OAAO;AAChC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var prevent_exports = {};
|
|
19
|
-
__export(prevent_exports, {
|
|
20
|
-
prevent: () => prevent
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(prevent_exports);
|
|
23
|
-
const prevent = (e) => [e.preventDefault(), e.stopPropagation()];
|
|
24
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
-
0 && (module.exports = {
|
|
26
|
-
prevent
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=prevent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/prevent.tsx"],
|
|
4
|
-
"sourcesContent": ["export const prevent = (e) => [e.preventDefault(), e.stopPropagation()]\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,EAAE,gBAAgB,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var useKeyboardDismissable_exports = {};
|
|
20
|
-
__export(useKeyboardDismissable_exports, {
|
|
21
|
-
keyboardDismissHandlerManager: () => keyboardDismissHandlerManager,
|
|
22
|
-
useBackHandler: () => useBackHandler,
|
|
23
|
-
useKeyboardDismissable: () => useKeyboardDismissable
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(useKeyboardDismissable_exports);
|
|
26
|
-
var import_core = require("@tamagui/core");
|
|
27
|
-
var import_react = require("react");
|
|
28
|
-
var import_react_native = require("react-native");
|
|
29
|
-
let keyboardDismissHandlers = [];
|
|
30
|
-
const keyboardDismissHandlerManager = {
|
|
31
|
-
push: (handler) => {
|
|
32
|
-
keyboardDismissHandlers.push(handler);
|
|
33
|
-
return () => {
|
|
34
|
-
keyboardDismissHandlers = keyboardDismissHandlers.filter((h) => h !== handler);
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
length: () => keyboardDismissHandlers.length,
|
|
38
|
-
pop: () => {
|
|
39
|
-
return keyboardDismissHandlers.pop();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const useKeyboardDismissable = ({ enabled, callback }) => {
|
|
43
|
-
(0, import_react.useEffect)(() => {
|
|
44
|
-
let cleanupFn = () => {
|
|
45
|
-
};
|
|
46
|
-
if (enabled) {
|
|
47
|
-
cleanupFn = keyboardDismissHandlerManager.push(callback);
|
|
48
|
-
} else {
|
|
49
|
-
cleanupFn();
|
|
50
|
-
}
|
|
51
|
-
return () => {
|
|
52
|
-
cleanupFn();
|
|
53
|
-
};
|
|
54
|
-
}, [enabled, callback]);
|
|
55
|
-
useBackHandler({ enabled, callback });
|
|
56
|
-
};
|
|
57
|
-
const callbackOnEscape = (callback) => (e) => {
|
|
58
|
-
if (e.key === "Escape") {
|
|
59
|
-
if (!(document.activeElement instanceof HTMLInputElement) && !(document.activeElement instanceof HTMLTextAreaElement)) {
|
|
60
|
-
e.preventDefault();
|
|
61
|
-
e.stopPropagation();
|
|
62
|
-
callback();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
function useBackHandler({ enabled, callback }) {
|
|
67
|
-
(0, import_react.useEffect)(() => {
|
|
68
|
-
let backHandler = () => {
|
|
69
|
-
callback();
|
|
70
|
-
return true;
|
|
71
|
-
};
|
|
72
|
-
const keyHandler = callbackOnEscape(callback);
|
|
73
|
-
if (enabled) {
|
|
74
|
-
import_react_native.BackHandler.addEventListener("hardwareBackPress", backHandler);
|
|
75
|
-
if (import_core.isWeb) {
|
|
76
|
-
window.addEventListener("keydown", keyHandler);
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
import_react_native.BackHandler.removeEventListener("hardwareBackPress", backHandler);
|
|
80
|
-
}
|
|
81
|
-
return () => {
|
|
82
|
-
import_react_native.BackHandler.removeEventListener("hardwareBackPress", backHandler);
|
|
83
|
-
if (import_core.isWeb) {
|
|
84
|
-
window.removeEventListener("keydown", keyHandler);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
}, [enabled, callback]);
|
|
88
|
-
}
|
|
89
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
-
0 && (module.exports = {
|
|
91
|
-
keyboardDismissHandlerManager,
|
|
92
|
-
useBackHandler,
|
|
93
|
-
useKeyboardDismissable
|
|
94
|
-
});
|
|
95
|
-
//# sourceMappingURL=useKeyboardDismissable.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/useKeyboardDismissable.tsx"],
|
|
4
|
-
"sourcesContent": ["// forked from NativeBase\n// The MIT License (MIT)\n\n// Copyright (c) 2021 GeekyAnts India Pvt Ltd\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport { isWeb } from '@tamagui/core'\nimport { useEffect } from 'react'\nimport { BackHandler } from 'react-native'\n\ntype IParams = {\n enabled?: boolean\n callback: () => any\n}\n\nlet keyboardDismissHandlers: Array<() => any> = []\nexport const keyboardDismissHandlerManager = {\n push: (handler: () => any) => {\n keyboardDismissHandlers.push(handler)\n return () => {\n keyboardDismissHandlers = keyboardDismissHandlers.filter((h) => h !== handler)\n }\n },\n length: () => keyboardDismissHandlers.length,\n pop: () => {\n return keyboardDismissHandlers.pop()\n },\n}\n\nexport const useKeyboardDismissable = ({ enabled, callback }: IParams) => {\n useEffect(() => {\n let cleanupFn = () => {}\n if (enabled) {\n cleanupFn = keyboardDismissHandlerManager.push(callback)\n } else {\n cleanupFn()\n }\n return () => {\n cleanupFn()\n }\n }, [enabled, callback])\n\n useBackHandler({ enabled, callback })\n}\n\nconst callbackOnEscape = (callback) => (e) => {\n if (e.key === 'Escape') {\n if (\n !(document.activeElement instanceof HTMLInputElement) &&\n !(document.activeElement instanceof HTMLTextAreaElement)\n ) {\n e.preventDefault()\n e.stopPropagation()\n callback()\n }\n }\n}\n\nexport function useBackHandler({ enabled, callback }: IParams) {\n useEffect(() => {\n let backHandler = () => {\n callback()\n return true\n }\n const keyHandler = callbackOnEscape(callback)\n if (enabled) {\n BackHandler.addEventListener('hardwareBackPress', backHandler)\n if (isWeb) {\n window.addEventListener('keydown', keyHandler)\n }\n } else {\n BackHandler.removeEventListener('hardwareBackPress', backHandler)\n }\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', backHandler)\n if (isWeb) {\n window.removeEventListener('keydown', keyHandler)\n }\n }\n }, [enabled, callback])\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA,kBAAsB;AACtB,mBAA0B;AAC1B,0BAA4B;AAO5B,IAAI,0BAA4C,CAAC;AAC1C,MAAM,gCAAgC;AAAA,EAC3C,MAAM,CAAC,YAAuB;AAC5B,4BAAwB,KAAK,OAAO;AACpC,WAAO,MAAM;AACX,gCAA0B,wBAAwB,OAAO,CAAC,MAAM,MAAM,OAAO;AAAA,IAC/E;AAAA,EACF;AAAA,EACA,QAAQ,MAAM,wBAAwB;AAAA,EACtC,KAAK,MAAM;AACT,WAAO,wBAAwB,IAAI;AAAA,EACrC;AACF;AAEO,MAAM,yBAAyB,CAAC,EAAE,SAAS,eAAwB;AACxE,8BAAU,MAAM;AACd,QAAI,YAAY,MAAM;AAAA,IAAC;AACvB,QAAI,SAAS;AACX,kBAAY,8BAA8B,KAAK,QAAQ;AAAA,IACzD,OAAO;AACL,gBAAU;AAAA,IACZ;AACA,WAAO,MAAM;AACX,gBAAU;AAAA,IACZ;AAAA,EACF,GAAG,CAAC,SAAS,QAAQ,CAAC;AAEtB,iBAAe,EAAE,SAAS,SAAS,CAAC;AACtC;AAEA,MAAM,mBAAmB,CAAC,aAAa,CAAC,MAAM;AAC5C,MAAI,EAAE,QAAQ,UAAU;AACtB,QACE,CAAE,UAAS,yBAAyB,qBACpC,CAAE,UAAS,yBAAyB,sBACpC;AACA,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,eAAS;AAAA,IACX;AAAA,EACF;AACF;AAEO,wBAAwB,EAAE,SAAS,YAAqB;AAC7D,8BAAU,MAAM;AACd,QAAI,cAAc,MAAM;AACtB,eAAS;AACT,aAAO;AAAA,IACT;AACA,UAAM,aAAa,iBAAiB,QAAQ;AAC5C,QAAI,SAAS;AACX,sCAAY,iBAAiB,qBAAqB,WAAW;AAC7D,UAAI,mBAAO;AACT,eAAO,iBAAiB,WAAW,UAAU;AAAA,MAC/C;AAAA,IACF,OAAO;AACL,sCAAY,oBAAoB,qBAAqB,WAAW;AAAA,IAClE;AACA,WAAO,MAAM;AACX,sCAAY,oBAAoB,qBAAqB,WAAW;AAChE,UAAI,mBAAO;AACT,eAAO,oBAAoB,WAAW,UAAU;AAAA,MAClD;AAAA,IACF;AAAA,EACF,GAAG,CAAC,SAAS,QAAQ,CAAC;AACxB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var focusable_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(focusable_exports);
|
|
16
|
-
//# sourceMappingURL=focusable.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var linear_gradient_exports = {};
|
|
20
|
-
__export(linear_gradient_exports, {
|
|
21
|
-
LinearGradient: () => import_expo_linear_gradient.LinearGradient
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(linear_gradient_exports);
|
|
24
|
-
var import_expo_linear_gradient = require("expo-linear-gradient");
|
|
25
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
LinearGradient
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=linear-gradient.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/lib/linear-gradient.ts"],
|
|
4
|
-
"sourcesContent": ["export { LinearGradient } from 'expo-linear-gradient'\nexport type { LinearGradientProps } from 'expo-linear-gradient'\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAA+B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var registerFocusable_exports = {};
|
|
19
|
-
__export(registerFocusable_exports, {
|
|
20
|
-
focusFocusable: () => focusFocusable,
|
|
21
|
-
registerFocusable: () => registerFocusable,
|
|
22
|
-
unregisterFocusable: () => unregisterFocusable
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(registerFocusable_exports);
|
|
25
|
-
const registerFocusable = (id, input) => {
|
|
26
|
-
};
|
|
27
|
-
const unregisterFocusable = (id) => {
|
|
28
|
-
};
|
|
29
|
-
const focusFocusable = (id) => {
|
|
30
|
-
};
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
focusFocusable,
|
|
34
|
-
registerFocusable,
|
|
35
|
-
unregisterFocusable
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=registerFocusable.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/lib/registerFocusable.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Focusable } from './focusable'\n\nexport const registerFocusable = (id: string, input: Focusable) => {\n // noop focus is handed natively\n}\n\nexport const unregisterFocusable = (id: string) => {\n // noop focus is handed natively\n}\n\nexport const focusFocusable = (id: string) => {\n // noop focus is handed natively\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,oBAAoB,CAAC,IAAY,UAAqB;AAEnE;AAEO,MAAM,sBAAsB,CAAC,OAAe;AAEnD;AAEO,MAAM,iBAAiB,CAAC,OAAe;AAE9C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var registerFocusable_native_exports = {};
|
|
19
|
-
__export(registerFocusable_native_exports, {
|
|
20
|
-
focusFocusable: () => focusFocusable,
|
|
21
|
-
registerFocusable: () => registerFocusable,
|
|
22
|
-
unregisterFocusable: () => unregisterFocusable
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(registerFocusable_native_exports);
|
|
25
|
-
const InputsMap = /* @__PURE__ */ new Map();
|
|
26
|
-
const registerFocusable = (id, input) => {
|
|
27
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28
|
-
if (InputsMap.has(id)) {
|
|
29
|
-
console.warn(`Warning, duplicate ID for input: ${id}`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
InputsMap.set(id, input);
|
|
33
|
-
return () => {
|
|
34
|
-
InputsMap.delete(id);
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
const unregisterFocusable = (id) => {
|
|
38
|
-
InputsMap.delete(id);
|
|
39
|
-
};
|
|
40
|
-
const focusFocusable = (id, select = false) => {
|
|
41
|
-
const input = InputsMap.get(id);
|
|
42
|
-
if (!input) {
|
|
43
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44
|
-
console.warn("No input found for id", id);
|
|
45
|
-
}
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (select || !input.focusAndSelect) {
|
|
49
|
-
input.focus();
|
|
50
|
-
} else {
|
|
51
|
-
input.focusAndSelect();
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
-
0 && (module.exports = {
|
|
56
|
-
focusFocusable,
|
|
57
|
-
registerFocusable,
|
|
58
|
-
unregisterFocusable
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=registerFocusable.native.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/lib/registerFocusable.native.tsx"],
|
|
4
|
-
"sourcesContent": ["// used for focusing on native\n\nimport { Focusable } from './focusable'\n\nconst InputsMap = new Map<string, Focusable>()\n\nexport const registerFocusable = (id: string, input: Focusable) => {\n if (process.env.NODE_ENV !== 'production') {\n if (InputsMap.has(id)) {\n console.warn(`Warning, duplicate ID for input: ${id}`)\n }\n }\n InputsMap.set(id, input)\n return () => {\n InputsMap.delete(id)\n }\n}\n\nexport const unregisterFocusable = (id: string) => {\n InputsMap.delete(id)\n}\n\nexport const focusFocusable = (id: string, select = false) => {\n const input = InputsMap.get(id)\n if (!input) {\n if (process.env.NODE_ENV !== 'production') {\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}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,MAAM,YAAY,oBAAI,IAAuB;AAEtC,MAAM,oBAAoB,CAAC,IAAY,UAAqB;AACjE,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,UAAU,IAAI,EAAE,GAAG;AACrB,cAAQ,KAAK,oCAAoC,IAAI;AAAA,IACvD;AAAA,EACF;AACA,YAAU,IAAI,IAAI,KAAK;AACvB,SAAO,MAAM;AACX,cAAU,OAAO,EAAE;AAAA,EACrB;AACF;AAEO,MAAM,sBAAsB,CAAC,OAAe;AACjD,YAAU,OAAO,EAAE;AACrB;AAEO,MAAM,iBAAiB,CAAC,IAAY,SAAS,UAAU;AAC5D,QAAM,QAAQ,UAAU,IAAI,EAAE;AAC9B,MAAI,CAAC,OAAO;AACV,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,cAAQ,KAAK,yBAAyB,EAAE;AAAA,IAC1C;AACA;AAAA,EACF;AACA,MAAI,UAAU,CAAC,MAAM,gBAAgB;AACnC,UAAM,MAAM;AAAA,EACd,OAAO;AACL,UAAM,eAAe;AAAA,EACvB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/polyfills.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
if (typeof requestAnimationFrame === "undefined") {
|
|
3
|
-
globalThis["requestAnimationFrame"] = setImmediate;
|
|
4
|
-
}
|
|
5
|
-
global.cancelAnimationFrame = (x) => {
|
|
6
|
-
try {
|
|
7
|
-
cancelAnimationFrame(x);
|
|
8
|
-
} catch {
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=polyfills.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/polyfills.ts"],
|
|
4
|
-
"sourcesContent": ["// for SSR\nif (typeof requestAnimationFrame === 'undefined') {\n globalThis['requestAnimationFrame'] = setImmediate\n}\n\n// for vite / Animated.spring()\nglobal.cancelAnimationFrame = (x) => {\n try {\n cancelAnimationFrame(x)\n } catch {\n // illegal invocation :/\n }\n}\n"],
|
|
5
|
-
"mappings": ";AACA,IAAI,OAAO,0BAA0B,aAAa;AAChD,aAAW,2BAA2B;AACxC;AAGA,OAAO,uBAAuB,CAAC,MAAM;AACnC,MAAI;AACF,yBAAqB,CAAC;AAAA,EACxB,QAAE;AAAA,EAEF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|