@tamagui/input 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.
- package/dist/cjs/Input.cjs +78 -162
- package/dist/cjs/Input.native.cjs +209 -0
- package/dist/cjs/Input.native.js +186 -282
- package/dist/cjs/Input.native.js.map +1 -1
- package/dist/cjs/InputNativeProps.cjs +10 -11
- package/dist/cjs/InputNativeProps.native.cjs +19 -0
- package/dist/cjs/InputNativeProps.native.js +10 -10
- package/dist/cjs/InputNativeProps.native.js.map +1 -1
- package/dist/cjs/TextArea.cjs +25 -38
- package/dist/cjs/TextArea.native.cjs +41 -0
- package/dist/cjs/TextArea.native.js +25 -37
- package/dist/cjs/TextArea.native.js.map +1 -1
- package/dist/cjs/index.cjs +16 -17
- package/dist/cjs/index.native.cjs +33 -0
- package/dist/cjs/index.native.js +16 -16
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shared.cjs +115 -122
- package/dist/cjs/shared.native.cjs +144 -0
- package/dist/cjs/shared.native.js +120 -126
- package/dist/cjs/shared.native.js.map +1 -1
- package/dist/cjs/types.cjs +10 -11
- package/dist/cjs/types.native.cjs +19 -0
- package/dist/cjs/types.native.js +10 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Input.mjs +63 -137
- package/dist/esm/Input.mjs.map +1 -1
- package/dist/esm/Input.native.js +172 -259
- package/dist/esm/Input.native.js.map +1 -1
- package/dist/esm/InputNativeProps.mjs +0 -2
- package/dist/esm/InputNativeProps.native.js +0 -2
- package/dist/esm/TextArea.mjs +12 -20
- package/dist/esm/TextArea.mjs.map +1 -1
- package/dist/esm/TextArea.native.js +12 -20
- package/dist/esm/TextArea.native.js.map +1 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/index.native.js +6 -4
- package/dist/esm/shared.mjs +99 -104
- package/dist/esm/shared.mjs.map +1 -1
- package/dist/esm/shared.native.js +104 -109
- package/dist/esm/shared.native.js.map +1 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/jsx/Input.mjs +63 -137
- package/dist/jsx/Input.mjs.map +1 -1
- package/dist/jsx/Input.native.cjs +209 -0
- package/dist/jsx/Input.native.js +186 -282
- package/dist/jsx/Input.native.js.map +1 -1
- package/dist/jsx/InputNativeProps.mjs +0 -2
- package/dist/jsx/InputNativeProps.native.cjs +19 -0
- package/dist/jsx/InputNativeProps.native.js +10 -10
- package/dist/jsx/InputNativeProps.native.js.map +1 -1
- package/dist/jsx/TextArea.mjs +12 -20
- package/dist/jsx/TextArea.mjs.map +1 -1
- package/dist/jsx/TextArea.native.cjs +41 -0
- package/dist/jsx/TextArea.native.js +25 -37
- package/dist/jsx/TextArea.native.js.map +1 -1
- package/dist/jsx/index.js +6 -4
- package/dist/jsx/index.mjs +6 -4
- package/dist/jsx/index.native.cjs +33 -0
- package/dist/jsx/index.native.js +16 -16
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared.mjs +99 -104
- package/dist/jsx/shared.mjs.map +1 -1
- package/dist/jsx/shared.native.cjs +144 -0
- package/dist/jsx/shared.native.js +120 -126
- package/dist/jsx/shared.native.js.map +1 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +19 -0
- package/dist/jsx/types.native.js +10 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +13 -15
- package/src/Input.native.tsx +263 -240
- package/src/Input.tsx +162 -152
- package/src/TextArea.tsx +6 -14
- package/src/shared.tsx +65 -70
- package/src/types.ts +1 -1
- package/types/Input.d.ts +57 -41
- package/types/Input.d.ts.map +1 -1
- package/types/Input.native.d.ts +57 -41
- package/types/Input.native.d.ts.map +1 -1
- package/types/TextArea.d.ts +172 -24
- package/types/TextArea.d.ts.map +1 -1
- package/types/shared.d.ts +14 -99
- package/types/shared.d.ts.map +1 -1
- package/types/types.d.ts +1 -1
- package/dist/cjs/inputTypes.test-d.cjs +0 -128
- package/dist/cjs/inputTypes.test-d.native.js +0 -131
- package/dist/cjs/inputTypes.test-d.native.js.map +0 -1
- package/dist/cjs/v1/Input.cjs +0 -200
- package/dist/cjs/v1/Input.native.js +0 -183
- package/dist/cjs/v1/Input.native.js.map +0 -1
- package/dist/cjs/v1/TextArea.cjs +0 -52
- package/dist/cjs/v1/TextArea.native.js +0 -55
- package/dist/cjs/v1/TextArea.native.js.map +0 -1
- package/dist/cjs/v1/index.cjs +0 -21
- package/dist/cjs/v1/index.native.js +0 -24
- package/dist/cjs/v1/index.native.js.map +0 -1
- package/dist/cjs/v1/types.cjs +0 -18
- package/dist/cjs/v1/types.native.js +0 -21
- package/dist/cjs/v1/types.native.js.map +0 -1
- package/dist/esm/InputNativeProps.mjs.map +0 -1
- package/dist/esm/InputNativeProps.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/inputTypes.test-d.mjs +0 -129
- package/dist/esm/inputTypes.test-d.mjs.map +0 -1
- package/dist/esm/inputTypes.test-d.native.js +0 -129
- package/dist/esm/inputTypes.test-d.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/v1/Input.mjs +0 -164
- package/dist/esm/v1/Input.mjs.map +0 -1
- package/dist/esm/v1/Input.native.js +0 -144
- package/dist/esm/v1/Input.native.js.map +0 -1
- package/dist/esm/v1/TextArea.mjs +0 -27
- package/dist/esm/v1/TextArea.mjs.map +0 -1
- package/dist/esm/v1/TextArea.native.js +0 -27
- package/dist/esm/v1/TextArea.native.js.map +0 -1
- package/dist/esm/v1/index.mjs +0 -3
- package/dist/esm/v1/index.mjs.map +0 -1
- package/dist/esm/v1/index.native.js +0 -3
- package/dist/esm/v1/index.native.js.map +0 -1
- package/dist/esm/v1/types.mjs +0 -2
- package/dist/esm/v1/types.mjs.map +0 -1
- package/dist/esm/v1/types.native.js +0 -2
- package/dist/esm/v1/types.native.js.map +0 -1
- package/dist/jsx/InputNativeProps.mjs.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/inputTypes.test-d.mjs +0 -129
- package/dist/jsx/inputTypes.test-d.mjs.map +0 -1
- package/dist/jsx/inputTypes.test-d.native.js +0 -131
- package/dist/jsx/inputTypes.test-d.native.js.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/v1/Input.mjs +0 -164
- package/dist/jsx/v1/Input.mjs.map +0 -1
- package/dist/jsx/v1/Input.native.js +0 -183
- package/dist/jsx/v1/Input.native.js.map +0 -1
- package/dist/jsx/v1/TextArea.mjs +0 -27
- package/dist/jsx/v1/TextArea.mjs.map +0 -1
- package/dist/jsx/v1/TextArea.native.js +0 -55
- package/dist/jsx/v1/TextArea.native.js.map +0 -1
- package/dist/jsx/v1/index.mjs +0 -3
- package/dist/jsx/v1/index.mjs.map +0 -1
- package/dist/jsx/v1/index.native.js +0 -24
- package/dist/jsx/v1/index.native.js.map +0 -1
- package/dist/jsx/v1/types.mjs +0 -2
- package/dist/jsx/v1/types.mjs.map +0 -1
- package/dist/jsx/v1/types.native.js +0 -21
- package/dist/jsx/v1/types.native.js.map +0 -1
- package/src/inputTypes.test-d.ts +0 -245
- package/src/v1/Input.native.tsx +0 -153
- package/src/v1/Input.tsx +0 -190
- package/src/v1/TextArea.tsx +0 -35
- package/src/v1/index.ts +0 -3
- package/src/v1/types.ts +0 -65
- package/types/v1/Input.d.ts +0 -64
- package/types/v1/Input.d.ts.map +0 -1
- package/types/v1/Input.native.d.ts +0 -63
- package/types/v1/Input.native.d.ts.map +0 -1
- package/types/v1/TextArea.d.ts +0 -41
- package/types/v1/TextArea.d.ts.map +0 -1
- package/types/v1/index.d.ts +0 -4
- package/types/v1/index.d.ts.map +0 -1
- package/types/v1/types.d.ts +0 -39
- package/types/v1/types.d.ts.map +0 -1
package/dist/jsx/v1/Input.mjs
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { View, styled, useEvent, useTheme } from "@tamagui/core";
|
|
2
|
-
import { registerFocusable } from "@tamagui/focusable";
|
|
3
|
-
import { useWebRef } from "@tamagui/element";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { styledBody } from "../shared.mjs";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
const StyledInput = styled(View, styledBody[0], styledBody[1]);
|
|
8
|
-
const Input = StyledInput.styleable((inProps, forwardedRef) => {
|
|
9
|
-
const {
|
|
10
|
-
allowFontScaling,
|
|
11
|
-
selectTextOnFocus,
|
|
12
|
-
showSoftInputOnFocus,
|
|
13
|
-
textContentType,
|
|
14
|
-
passwordRules,
|
|
15
|
-
textBreakStrategy,
|
|
16
|
-
underlineColorAndroid,
|
|
17
|
-
selection,
|
|
18
|
-
lineBreakStrategyIOS,
|
|
19
|
-
returnKeyLabel,
|
|
20
|
-
disabled,
|
|
21
|
-
onSubmitEditing,
|
|
22
|
-
caretHidden,
|
|
23
|
-
clearButtonMode,
|
|
24
|
-
clearTextOnFocus,
|
|
25
|
-
contextMenuHidden,
|
|
26
|
-
dataDetectorTypes,
|
|
27
|
-
id,
|
|
28
|
-
enablesReturnKeyAutomatically,
|
|
29
|
-
importantForAutofill,
|
|
30
|
-
inlineImageLeft,
|
|
31
|
-
inlineImagePadding,
|
|
32
|
-
inputAccessoryViewID,
|
|
33
|
-
keyboardAppearance,
|
|
34
|
-
keyboardType,
|
|
35
|
-
cursorColor,
|
|
36
|
-
disableFullscreenUI,
|
|
37
|
-
editable,
|
|
38
|
-
maxFontSizeMultiplier,
|
|
39
|
-
multiline,
|
|
40
|
-
numberOfLines,
|
|
41
|
-
onChangeText,
|
|
42
|
-
onContentSizeChange,
|
|
43
|
-
onEndEditing,
|
|
44
|
-
onScroll,
|
|
45
|
-
onSelectionChange,
|
|
46
|
-
caretColor,
|
|
47
|
-
placeholderTextColor,
|
|
48
|
-
blurOnSubmit,
|
|
49
|
-
enterKeyHint,
|
|
50
|
-
returnKeyType,
|
|
51
|
-
rejectResponderTermination,
|
|
52
|
-
scrollEnabled,
|
|
53
|
-
secureTextEntry,
|
|
54
|
-
selectionColor,
|
|
55
|
-
inputMode,
|
|
56
|
-
...rest
|
|
57
|
-
} = inProps;
|
|
58
|
-
const {
|
|
59
|
-
ref,
|
|
60
|
-
composedRef
|
|
61
|
-
} = useWebRef(forwardedRef);
|
|
62
|
-
const theme = useTheme();
|
|
63
|
-
const _onSelectionChange = useEvent(() => {
|
|
64
|
-
const start = ref.current?.selectionStart ?? 0;
|
|
65
|
-
const end = ref.current?.selectionEnd ?? 0;
|
|
66
|
-
onSelectionChange?.({
|
|
67
|
-
nativeEvent: {
|
|
68
|
-
selection: {
|
|
69
|
-
end,
|
|
70
|
-
start
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
React.useEffect(() => {
|
|
76
|
-
if (onSelectionChange) {
|
|
77
|
-
ref.current?.addEventListener("selectionchange", _onSelectionChange);
|
|
78
|
-
return () => {
|
|
79
|
-
ref.current?.removeEventListener("selectionchange", _onSelectionChange);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}, []);
|
|
83
|
-
React.useEffect(() => {
|
|
84
|
-
if (selection) ref.current?.setSelectionRange(selection.start || null, selection.end || null);
|
|
85
|
-
}, [selection?.start, selection?.end]);
|
|
86
|
-
const finalProps = {
|
|
87
|
-
...rest,
|
|
88
|
-
disabled,
|
|
89
|
-
caretColor,
|
|
90
|
-
id,
|
|
91
|
-
enterKeyHint,
|
|
92
|
-
type: (() => {
|
|
93
|
-
if (rest?.type) return rest.type;
|
|
94
|
-
if (secureTextEntry) return "password";
|
|
95
|
-
switch (keyboardType) {
|
|
96
|
-
case "number-pad":
|
|
97
|
-
case "numeric":
|
|
98
|
-
return "number";
|
|
99
|
-
case "email-address":
|
|
100
|
-
return "email";
|
|
101
|
-
case "phone-pad":
|
|
102
|
-
return "tel";
|
|
103
|
-
case "url":
|
|
104
|
-
return "url";
|
|
105
|
-
default:
|
|
106
|
-
return "text";
|
|
107
|
-
}
|
|
108
|
-
})(),
|
|
109
|
-
inputMode: (() => {
|
|
110
|
-
switch (keyboardType) {
|
|
111
|
-
case "number-pad":
|
|
112
|
-
case "numeric":
|
|
113
|
-
return "numeric";
|
|
114
|
-
case "decimal-pad":
|
|
115
|
-
return "decimal";
|
|
116
|
-
case "email-address":
|
|
117
|
-
return "email";
|
|
118
|
-
case "phone-pad":
|
|
119
|
-
return "tel";
|
|
120
|
-
case "url":
|
|
121
|
-
return "url";
|
|
122
|
-
default:
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
})(),
|
|
126
|
-
style: {
|
|
127
|
-
...rest.style,
|
|
128
|
-
...(placeholderTextColor && {
|
|
129
|
-
"--t_placeholderColor": theme[placeholderTextColor]?.variable || placeholderTextColor
|
|
130
|
-
}),
|
|
131
|
-
...(selectionColor && {
|
|
132
|
-
"--t_selectionBackground": theme[selectionColor]?.variable || selectionColor
|
|
133
|
-
})
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
React.useEffect(() => {
|
|
137
|
-
if (!id) return;
|
|
138
|
-
if (disabled) return;
|
|
139
|
-
return registerFocusable(id, {
|
|
140
|
-
focusAndSelect: () => {
|
|
141
|
-
ref.current?.focus();
|
|
142
|
-
},
|
|
143
|
-
focus: () => {}
|
|
144
|
-
});
|
|
145
|
-
}, [id, disabled]);
|
|
146
|
-
return /* @__PURE__ */jsxs(Fragment, {
|
|
147
|
-
children: [/* @__PURE__ */jsx("style", {
|
|
148
|
-
children: `
|
|
149
|
-
input::selection, textarea::selection {
|
|
150
|
-
background-color: var(--t_selectionBackground) !important;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
input::placeholder, textarea::placeholder {
|
|
154
|
-
color: var(--t_placeholderColor) !important;
|
|
155
|
-
}
|
|
156
|
-
`
|
|
157
|
-
}), /* @__PURE__ */jsx(StyledInput, {
|
|
158
|
-
ref: composedRef,
|
|
159
|
-
...finalProps
|
|
160
|
-
})]
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
export { Input };
|
|
164
|
-
//# sourceMappingURL=Input.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["View","styled","useEvent","useTheme","registerFocusable","useWebRef","React","styledBody","Fragment","jsx","jsxs","StyledInput","Input","styleable","inProps","forwardedRef","allowFontScaling","selectTextOnFocus","showSoftInputOnFocus","textContentType","passwordRules","textBreakStrategy","underlineColorAndroid","selection","lineBreakStrategyIOS","returnKeyLabel","disabled","onSubmitEditing","caretHidden","clearButtonMode","clearTextOnFocus","contextMenuHidden","dataDetectorTypes","id","enablesReturnKeyAutomatically","importantForAutofill","inlineImageLeft","inlineImagePadding","inputAccessoryViewID","keyboardAppearance","keyboardType","cursorColor","disableFullscreenUI","editable","maxFontSizeMultiplier","multiline","numberOfLines","onChangeText","onContentSizeChange","onEndEditing","onScroll","onSelectionChange","caretColor","placeholderTextColor","blurOnSubmit","enterKeyHint","returnKeyType","rejectResponderTermination","scrollEnabled","secureTextEntry","selectionColor","inputMode","rest","ref","composedRef","theme","_onSelectionChange","start","current","selectionStart","end","selectionEnd","nativeEvent","useEffect","addEventListener","removeEventListener","setSelectionRange","finalProps","type","style","variable","focusAndSelect","focus","children"],"sources":["Input.mjs"],"sourcesContent":["import { View, styled, useEvent, useTheme } from \"@tamagui/core\";\nimport { registerFocusable } from \"@tamagui/focusable\";\nimport { useWebRef } from \"@tamagui/element\";\nimport React from \"react\";\nimport { styledBody } from \"../shared\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nconst StyledInput = styled(View, styledBody[0], styledBody[1]);\nconst Input = StyledInput.styleable((inProps, forwardedRef) => {\n\tconst { allowFontScaling, selectTextOnFocus, showSoftInputOnFocus, textContentType, passwordRules, textBreakStrategy, underlineColorAndroid, selection, lineBreakStrategyIOS, returnKeyLabel, disabled, onSubmitEditing, caretHidden, clearButtonMode, clearTextOnFocus, contextMenuHidden, dataDetectorTypes, id, enablesReturnKeyAutomatically, importantForAutofill, inlineImageLeft, inlineImagePadding, inputAccessoryViewID, keyboardAppearance, keyboardType, cursorColor, disableFullscreenUI, editable, maxFontSizeMultiplier, multiline, numberOfLines, onChangeText, onContentSizeChange, onEndEditing, onScroll, onSelectionChange, caretColor, placeholderTextColor, blurOnSubmit, enterKeyHint, returnKeyType, rejectResponderTermination, scrollEnabled, secureTextEntry, selectionColor, inputMode, ...rest } = inProps;\n\tconst { ref, composedRef } = useWebRef(forwardedRef);\n\tconst theme = useTheme();\n\tconst _onSelectionChange = useEvent(() => {\n\t\tconst start = ref.current?.selectionStart ?? 0;\n\t\tconst end = ref.current?.selectionEnd ?? 0;\n\t\tonSelectionChange?.({ nativeEvent: { selection: {\n\t\t\tend,\n\t\t\tstart\n\t\t} } });\n\t});\n\tReact.useEffect(() => {\n\t\tif (onSelectionChange) {\n\t\t\tref.current?.addEventListener(\"selectionchange\", _onSelectionChange);\n\t\t\treturn () => {\n\t\t\t\tref.current?.removeEventListener(\"selectionchange\", _onSelectionChange);\n\t\t\t};\n\t\t}\n\t}, []);\n\tReact.useEffect(() => {\n\t\tif (selection) ref.current?.setSelectionRange(selection.start || null, selection.end || null);\n\t}, [selection?.start, selection?.end]);\n\tconst finalProps = {\n\t\t...rest,\n\t\tdisabled,\n\t\tcaretColor,\n\t\tid,\n\t\tenterKeyHint,\n\t\ttype: (() => {\n\t\t\tif (rest?.type) return rest.type;\n\t\t\tif (secureTextEntry) return \"password\";\n\t\t\tswitch (keyboardType) {\n\t\t\t\tcase \"number-pad\":\n\t\t\t\tcase \"numeric\": return \"number\";\n\t\t\t\tcase \"email-address\": return \"email\";\n\t\t\t\tcase \"phone-pad\": return \"tel\";\n\t\t\t\tcase \"url\": return \"url\";\n\t\t\t\tdefault: return \"text\";\n\t\t\t}\n\t\t})(),\n\t\tinputMode: (() => {\n\t\t\tswitch (keyboardType) {\n\t\t\t\tcase \"number-pad\":\n\t\t\t\tcase \"numeric\": return \"numeric\";\n\t\t\t\tcase \"decimal-pad\": return \"decimal\";\n\t\t\t\tcase \"email-address\": return \"email\";\n\t\t\t\tcase \"phone-pad\": return \"tel\";\n\t\t\t\tcase \"url\": return \"url\";\n\t\t\t\tdefault: return;\n\t\t\t}\n\t\t})(),\n\t\tstyle: {\n\t\t\t...rest.style,\n\t\t\t...placeholderTextColor && { \"--t_placeholderColor\": theme[placeholderTextColor]?.variable || placeholderTextColor },\n\t\t\t...selectionColor && { \"--t_selectionBackground\": theme[selectionColor]?.variable || selectionColor }\n\t\t}\n\t};\n\tReact.useEffect(() => {\n\t\tif (!id) return;\n\t\tif (disabled) return;\n\t\treturn registerFocusable(id, {\n\t\t\tfocusAndSelect: () => {\n\t\t\t\tref.current?.focus();\n\t\t\t},\n\t\t\tfocus: () => {}\n\t\t});\n\t}, [id, disabled]);\n\treturn /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(\"style\", { children: `\n input::selection, textarea::selection {\n background-color: var(--t_selectionBackground) !important;\n }\n\n input::placeholder, textarea::placeholder {\n color: var(--t_placeholderColor) !important;\n }\n ` }), /* @__PURE__ */ jsx(StyledInput, {\n\t\tref: composedRef,\n\t\t...finalProps\n\t})] });\n});\n\nexport { Input };"],"mappings":"AAAA,SAASA,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,eAAe;AAChE,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,eAAW;AACtC,SAASC,QAAQ,EAAEC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAEvD,MAAMC,WAAW,GAAGV,MAAM,CAACD,IAAI,EAAEO,UAAU,CAAC,CAAC,CAAC,EAAEA,UAAU,CAAC,C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
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all) __defProp(target, name, {
|
|
11
|
-
get: all[name],
|
|
12
|
-
enumerable: true
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
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;
|
|
23
|
-
};
|
|
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
|
|
32
|
-
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
36
|
-
var Input_native_exports = {};
|
|
37
|
-
__export(Input_native_exports, {
|
|
38
|
-
Input: () => Input
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(Input_native_exports);
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var import_react = __toESM(require("react"), 1);
|
|
43
|
-
var import_core = require("@tamagui/core");
|
|
44
|
-
var import_focusable = require("@tamagui/focusable");
|
|
45
|
-
var import_element = require("@tamagui/element");
|
|
46
|
-
var import_react_native = require("react-native");
|
|
47
|
-
var import_shared = require("../shared.native.js");
|
|
48
|
-
var StyledInput = (0, import_core.styled)(import_react_native.TextInput, import_shared.styledBody[0], import_shared.styledBody[1]);
|
|
49
|
-
var Input = StyledInput.styleable(function (inProps, forwardedRef) {
|
|
50
|
-
var {
|
|
51
|
-
// some of destructed props are just to avoid passing them to ...rest because they are not in native.
|
|
52
|
-
type,
|
|
53
|
-
//@ts-ignore
|
|
54
|
-
dirname,
|
|
55
|
-
max,
|
|
56
|
-
min,
|
|
57
|
-
minLength,
|
|
58
|
-
multiple,
|
|
59
|
-
name,
|
|
60
|
-
required,
|
|
61
|
-
step,
|
|
62
|
-
disabled,
|
|
63
|
-
id,
|
|
64
|
-
// @ts-ignore
|
|
65
|
-
caretColor,
|
|
66
|
-
onChange,
|
|
67
|
-
onInput,
|
|
68
|
-
rows,
|
|
69
|
-
enterKeyHint,
|
|
70
|
-
returnKeyType,
|
|
71
|
-
onKeyDown,
|
|
72
|
-
inputMode,
|
|
73
|
-
render,
|
|
74
|
-
...rest
|
|
75
|
-
} = inProps;
|
|
76
|
-
var {
|
|
77
|
-
ref,
|
|
78
|
-
composedRef
|
|
79
|
-
} = (0, import_element.useNativeInputRef)(forwardedRef);
|
|
80
|
-
var secureTextEntry = false;
|
|
81
|
-
var cursorColor = caretColor;
|
|
82
|
-
var _returnKeyType = returnKeyType;
|
|
83
|
-
var _enterKeyHint = enterKeyHint;
|
|
84
|
-
if (enterKeyHint === "go") {
|
|
85
|
-
_returnKeyType = "go";
|
|
86
|
-
_enterKeyHint = void 0;
|
|
87
|
-
}
|
|
88
|
-
var _inputMode = inputMode;
|
|
89
|
-
if (type === "email") {
|
|
90
|
-
_inputMode = "email";
|
|
91
|
-
} else if (type === "tel") {
|
|
92
|
-
_inputMode = "tel";
|
|
93
|
-
} else if (type === "search") {
|
|
94
|
-
_inputMode = "search";
|
|
95
|
-
} else if (type === "url") {
|
|
96
|
-
_inputMode = "url";
|
|
97
|
-
} else if (type === "password") {
|
|
98
|
-
secureTextEntry = true;
|
|
99
|
-
_inputMode = "text";
|
|
100
|
-
} else if (type === "number") {
|
|
101
|
-
_inputMode = "numeric";
|
|
102
|
-
} else {
|
|
103
|
-
_inputMode = "text";
|
|
104
|
-
}
|
|
105
|
-
var showSoftInputOnFocus = true;
|
|
106
|
-
if (inputMode === "none") {
|
|
107
|
-
showSoftInputOnFocus = false;
|
|
108
|
-
}
|
|
109
|
-
var finalProps = {
|
|
110
|
-
...rest,
|
|
111
|
-
inputMode: _inputMode,
|
|
112
|
-
showSoftInputOnFocus,
|
|
113
|
-
disabled,
|
|
114
|
-
id,
|
|
115
|
-
cursorColor,
|
|
116
|
-
enterKeyHint: _enterKeyHint,
|
|
117
|
-
returnKeyType: _returnKeyType,
|
|
118
|
-
secureTextEntry,
|
|
119
|
-
numberOfLines: rows || rest.numberOfLines
|
|
120
|
-
};
|
|
121
|
-
if (render === "textarea") {
|
|
122
|
-
finalProps.multiline = true;
|
|
123
|
-
}
|
|
124
|
-
if (onKeyDown) {
|
|
125
|
-
finalProps.onKeyPress = function (e) {
|
|
126
|
-
var {
|
|
127
|
-
key
|
|
128
|
-
} = e.nativeEvent;
|
|
129
|
-
if (key === "Backspace" || render === "textarea" && key === "Enter" || key.length === 1) {
|
|
130
|
-
onKeyDown({
|
|
131
|
-
key,
|
|
132
|
-
type: "keydown"
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
finalProps.onSubmitEditing = function (e) {
|
|
137
|
-
onKeyDown({
|
|
138
|
-
key: "Enter",
|
|
139
|
-
type: "keydown"
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
if (onChange || onInput) {
|
|
144
|
-
finalProps.onChange = function (e) {
|
|
145
|
-
var {
|
|
146
|
-
text
|
|
147
|
-
} = e.nativeEvent;
|
|
148
|
-
if (onChange) {
|
|
149
|
-
onChange({
|
|
150
|
-
target: {
|
|
151
|
-
value: text
|
|
152
|
-
},
|
|
153
|
-
type: "change"
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (onInput != null) {
|
|
157
|
-
onInput({
|
|
158
|
-
target: {
|
|
159
|
-
value: text
|
|
160
|
-
},
|
|
161
|
-
type: "input"
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
import_react.default.useEffect(function () {
|
|
167
|
-
if (!id) return;
|
|
168
|
-
if (disabled) return;
|
|
169
|
-
return (0, import_focusable.registerFocusable)(id, {
|
|
170
|
-
focusAndSelect: function () {
|
|
171
|
-
var _ref_current;
|
|
172
|
-
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
|
|
173
|
-
},
|
|
174
|
-
focus: function () {}
|
|
175
|
-
});
|
|
176
|
-
}, [id, disabled]);
|
|
177
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(StyledInput, {
|
|
178
|
-
onChange: function (e) {},
|
|
179
|
-
ref: composedRef,
|
|
180
|
-
...finalProps
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
//# sourceMappingURL=Input.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Input_native_exports","__export","Input","module","exports","__toCommonJS","import_jsx_runtime","require","import_react","__toESM","import_core","import_focusable","import_element","import_react_native","import_shared","StyledInput","styled","TextInput","styledBody","styleable","inProps","forwardedRef","type","dirname","max","min","minLength","multiple","name","required","step","disabled","id","caretColor","onChange","onInput","rows","enterKeyHint","returnKeyType","onKeyDown","inputMode","render","rest","ref","composedRef","useNativeInputRef","secureTextEntry","cursorColor","_returnKeyType","_enterKeyHint","_inputMode","showSoftInputOnFocus","finalProps","numberOfLines","multiline","onKeyPress","e","key","nativeEvent","length","onSubmitEditing","text","target","value","default","useEffect","registerFocusable","focusAndSelect","_ref_current","current","focus","jsx"],"sources":["../../../src/v1/Input.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,oBAAA;AAAA,IAAAM,kBAAA,GAA4BC,OAAA;AAC5B,IAAAC,YAAA,GAAkBC,OAAA,CAAAF,OAAA;AAClB,IAAAG,WAAA,GAAuBH,OAAA;AACvB,IAAAI,gBAAA,GAAkCJ,OAAA;AAClC,IAAAK,cAAA,GAAkCL,OAAA;AAClC,IAAAM,mBAAA,GAA0BN,OAAA;AAC1B,IAAAO,aAAA,GAA2BP,OAAA;AAC3B,IAAIQ,WAAA,OAAcL,WAAA,CAAAM,MAAA,EAAOH,mBAAA,CAAAI,SAAA,EAAWH,aAAA,CAAAI,UAAA,CAAW,CAAC,GAAGJ,aAAA,CAAAI,UAAA,CAAW,CAAC,CAAC;AAGrD,IAAIhB,KAAA,GAAQa,WAAA,CAAYI,SAAA,CAAU,UAASC,OAAA,EAASC,YAAA,EAAc;EACzE,IAAI;IAAA;IACJC,IAAA;IAAA;IACAC,OAAA;IAASC,GAAA;IAAKC,GAAA;IAAKC,SAAA;IAAWC,QAAA;IAAUC,IAAA;IAAMC,QAAA;IAAUC,IAAA;IAAMC,QAAA;IAAUC,EAAA;IAAA;IACxEC,UAAA;IAAYC,QAAA;IAAUC,OAAA;IAASC,IAAA;IAAMC,YAAA;IAAcC,aAAA;IAAeC,SAAA;IAAWC,SAAA;IAAWC,MAAA;IAAQ,GAAGC;EAAK,IAAItB,OAAA;EAC5G,IAAI;IAAEuB,GAAA;IAAKC;EAAY,QAAIhC,cAAA,CAAAiC,iBAAA,EAAkBxB,YAAY;EAEzD,IAAIyB,eAAA,GAAkB;EACtB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v1/TextArea.mjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { styled } from "@tamagui/web";
|
|
2
|
-
import { Input } from "./Input.mjs";
|
|
3
|
-
import { defaultStyles, textAreaSizeVariant } from "../shared.mjs";
|
|
4
|
-
const TextArea = styled(Input, {
|
|
5
|
-
name: "TextArea",
|
|
6
|
-
render: "textarea",
|
|
7
|
-
// this attribute fixes firefox newline issue
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
whiteSpace: "pre-wrap",
|
|
10
|
-
variants: {
|
|
11
|
-
unstyled: {
|
|
12
|
-
false: {
|
|
13
|
-
height: "auto",
|
|
14
|
-
...defaultStyles,
|
|
15
|
-
numberOfLines: 3
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
"...size": textAreaSizeVariant
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
export { TextArea };
|
|
27
|
-
//# sourceMappingURL=TextArea.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["styled","Input","defaultStyles","textAreaSizeVariant","TextArea","name","render","whiteSpace","variants","unstyled","false","height","numberOfLines","size","defaultVariants","process","env","TAMAGUI_HEADLESS"],"sources":["../../../src/v1/TextArea.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,QAAc;AACvB,SAASC,KAAA,QAAa;AACtB,SAASC,aAAA,EAAeC,mBAAA,QAA2B;AAO5C,MAAMC,QAAA,GAAWJ,MAAA,CAAOC,KAAA,EAAO;EACpCI,IAAA,EAAM;EACNC,MAAA,EAAQ;EAAA;EAAA;EAIRC,UAAA,EAAY;EAEZC,QAAA,EAAU;IACRC,QAAA,EAAU;MACRC,KAAA,EAAO;QACLC,MAAA,EAAQ;QACR,GAAGT,aAAA;QACHU,aAAA,EAAe;MACjB;IACF;IAEAC,IAAA,EAAM;MACJ,WAAWV;IACb;EACF;EAEAW,eAAA,EAAiB;IACfL,QAAA,EAAUM,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC7C;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var TextArea_exports = {};
|
|
26
|
-
__export(TextArea_exports, {
|
|
27
|
-
TextArea: () => TextArea
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(TextArea_exports);
|
|
30
|
-
var import_web = require("@tamagui/web");
|
|
31
|
-
var import_Input = require("./Input.native.js");
|
|
32
|
-
var import_shared = require("../shared.native.js");
|
|
33
|
-
var TextArea = (0, import_web.styled)(import_Input.Input, {
|
|
34
|
-
name: "TextArea",
|
|
35
|
-
render: "textarea",
|
|
36
|
-
// this attribute fixes firefox newline issue
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
whiteSpace: "pre-wrap",
|
|
39
|
-
variants: {
|
|
40
|
-
unstyled: {
|
|
41
|
-
false: {
|
|
42
|
-
height: "auto",
|
|
43
|
-
...import_shared.defaultStyles,
|
|
44
|
-
numberOfLines: 3
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
size: {
|
|
48
|
-
"...size": import_shared.textAreaSizeVariant
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=TextArea.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","TextArea_exports","TextArea","module","exports","import_web","require","import_Input"],"sources":["../../../src/v1/TextArea.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAa,CAAAC,cAAA;AACtB,IAAAC,gBAAS,GAAAF,MAAe,CAAAG,wBAA2B;AAO5C,IAAAC,iBAAiB,GAAOJ,MAAA,CAAOK,mBAAA;AAAA,IACpCC,YAAM,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IACNC,QAAQ,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,SAAAC,IAAA,IAAAD,GAAA,EAAAZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AAII,IAEZC,WAAU,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACRF,IAAA,IAAU,OAAAA,IAAA,wBAAAA,IAAA;IAAA,KACR,IAAOG,GAAA,IAAAhB,iBAAA,CAAAa,IAAA,OACL,CAAAX,YAAQ,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EACRnB,SAAG,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAAA;EACY,OACjBE,EAAA;AAAA;AACF,IAEAM,YAAM,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IAAAE,gBACO;AAAAhB,QACb,CAAAgB,gBAAA;EACFC,QAAA,EAAAA,CAAA,KAAAA;AAAA,EAEA;AAAiBC,MACf,CAAAC,OAAU,GAAAN,YAAY,CAAAG,gBAAA,CAAqB;AAAA,IAC7CI,UAAA,GAAAC,OAAA;AACF,IAACC,YAAA,GAAAD,OAAA","ignoreList":[]}
|
package/dist/jsx/v1/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
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;
|
|
15
|
-
};
|
|
16
|
-
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);
|
|
20
|
-
var v1_exports = {};
|
|
21
|
-
module.exports = __toCommonJS(v1_exports);
|
|
22
|
-
__reExport(v1_exports, require("./Input.native.js"), module.exports);
|
|
23
|
-
__reExport(v1_exports, require("./TextArea.native.js"), module.exports);
|
|
24
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty"],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,SAAA,GAAcC,MAAA,CAAAC,cAAA","ignoreList":[]}
|
package/dist/jsx/v1/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
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;
|
|
15
|
-
};
|
|
16
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
17
|
-
value: true
|
|
18
|
-
}), mod);
|
|
19
|
-
var types_exports = {};
|
|
20
|
-
module.exports = __toCommonJS(types_exports);
|
|
21
|
-
//# sourceMappingURL=types.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|