@draftbit/core 49.4.1 → 49.4.2-27fee9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Markdown.tsx";import*as React from"react";import{StyleSheet}from"react-native";import MarkdownComponent from"react-native-markdown-display";import{jsx as _jsx}from"react/jsx-runtime";var Markdown=function Markdown(_ref){var children=_ref.children,style=_ref.style;return _jsx(MarkdownComponent,{style:{body:StyleSheet.flatten(style)},children:children});};export default Markdown;
1
+ var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Markdown.tsx";import*as React from"react";import{StyleSheet}from"react-native";import MarkdownComponent from"react-native-markdown-display";import{jsx as _jsx}from"react/jsx-runtime";var childToString=function childToString(child){if(typeof child==="undefined"||child===null||typeof child==="boolean"){return"";}if(JSON.stringify(child)==="{}"){return"";}return child.toString();};var Markdown=function Markdown(_ref){var childrenProp=_ref.children,style=_ref.style;var children=React.Children.toArray(childrenProp);var text=children.map(childToString).join("");return _jsx(MarkdownComponent,{style:{body:StyleSheet.flatten(style)},children:text});};export default Markdown;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Swiper/Swiper.tsx";import React from"react";import{View}from"react-native";import SwiperComponent from"react-native-web-swiper";import{jsx as _jsx}from"react/jsx-runtime";var Swiper=function Swiper(_ref){var _data$length;var _ref$vertical=_ref.vertical,vertical=_ref$vertical===void 0?false:_ref$vertical,_ref$loop=_ref.loop,loop=_ref$loop===void 0?false:_ref$loop,_ref$timeout=_ref.timeout,timeout=_ref$timeout===void 0?0:_ref$timeout,_ref$from=_ref.from,from=_ref$from===void 0?0:_ref$from,_ref$prevTitle=_ref.prevTitle,prevTitle=_ref$prevTitle===void 0?"":_ref$prevTitle,_ref$nextTitle=_ref.nextTitle,nextTitle=_ref$nextTitle===void 0?"":_ref$nextTitle,prevTitleColor=_ref.prevTitleColor,nextTitleColor=_ref.nextTitleColor,_ref$dotsTouchable=_ref.dotsTouchable,dotsTouchable=_ref$dotsTouchable===void 0?true:_ref$dotsTouchable,dotColor=_ref.dotColor,dotActiveColor=_ref.dotActiveColor,data=_ref.data,keyExtractor=_ref.keyExtractor,renderItem=_ref.renderItem,childrenProp=_ref.children,onIndexChangedProp=_ref.onIndexChanged,onSwipe=_ref.onSwipe,onSwipedNext=_ref.onSwipedNext,onSwipedPrevious=_ref.onSwipedPrevious,style=_ref.style;var _React$useState=React.useState(0),_React$useState2=_slicedToArray(_React$useState,2),currentIndex=_React$useState2[0],setCurrentIndex=_React$useState2[1];var numberOfItems=(_data$length=data==null?void 0:data.length)!=null?_data$length:React.Children.count(childrenProp);var swiperRef=React.useRef(null);var onIndexChanged=function onIndexChanged(index){var previous=currentIndex;var current=index;onIndexChangedProp==null?void 0:onIndexChangedProp(index);setCurrentIndex(index);if(previous===numberOfItems-1&&current===0){onSwipedNext==null?void 0:onSwipedNext(previous);}else if(previous===0&&current===numberOfItems-1){onSwipedPrevious==null?void 0:onSwipedPrevious(previous);}else if(current>previous){onSwipedNext==null?void 0:onSwipedNext(previous);}else if(current<previous){onSwipedPrevious==null?void 0:onSwipedPrevious(previous);}onSwipe==null?void 0:onSwipe(previous);};var children=React.useMemo(function(){return Array.isArray(data)&&renderItem?data.map(function(item,index){var component=renderItem({item:item,index:index});if(!component){return null;}var key=keyExtractor?keyExtractor(item,index):index;return React.cloneElement(component,{key:key});}):childrenProp;},[childrenProp,data,renderItem,keyExtractor]);React.useEffect(function(){var _swiperRef$current,_swiperRef$current$pr;var childrenArray=React.Children.toArray((_swiperRef$current=swiperRef.current)==null?void 0:(_swiperRef$current$pr=_swiperRef$current.props)==null?void 0:_swiperRef$current$pr.children);if(swiperRef.current){swiperRef.current.children=childrenArray;swiperRef.current.count=childrenArray.length;swiperRef.current.forceUpdate();}},[children]);return _jsx(View,{style:style,children:_jsx(SwiperComponent,{ref:swiperRef,from:from,loop:loop,timeout:timeout,vertical:vertical,onIndexChanged:onIndexChanged,controlsProps:Object.assign({prevTitle:prevTitle,nextTitle:nextTitle,prevTitleStyle:{color:prevTitleColor},nextTitleStyle:{color:nextTitleColor},dotsTouchable:dotsTouchable},dotColor?{dotProps:{badgeStyle:{backgroundColor:dotColor}}}:{},dotActiveColor?{dotActiveStyle:{backgroundColor:dotActiveColor}}:{}),children:children})});};export default Swiper;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Swiper/Swiper.tsx";import React from"react";import{View}from"react-native";import SwiperComponent from"react-native-web-swiper";import{jsx as _jsx}from"react/jsx-runtime";var Swiper=function Swiper(_ref){var _data$length;var _ref$vertical=_ref.vertical,vertical=_ref$vertical===void 0?false:_ref$vertical,_ref$loop=_ref.loop,loop=_ref$loop===void 0?false:_ref$loop,_ref$timeout=_ref.timeout,timeout=_ref$timeout===void 0?0:_ref$timeout,_ref$from=_ref.from,from=_ref$from===void 0?0:_ref$from,_ref$prevTitle=_ref.prevTitle,prevTitle=_ref$prevTitle===void 0?"":_ref$prevTitle,_ref$nextTitle=_ref.nextTitle,nextTitle=_ref$nextTitle===void 0?"":_ref$nextTitle,prevTitleColor=_ref.prevTitleColor,nextTitleColor=_ref.nextTitleColor,_ref$dotsTouchable=_ref.dotsTouchable,dotsTouchable=_ref$dotsTouchable===void 0?true:_ref$dotsTouchable,dotColor=_ref.dotColor,dotActiveColor=_ref.dotActiveColor,data=_ref.data,keyExtractor=_ref.keyExtractor,renderItem=_ref.renderItem,childrenProp=_ref.children,onIndexChangedProp=_ref.onIndexChanged,onSwipe=_ref.onSwipe,onSwipedNext=_ref.onSwipedNext,onSwipedPrevious=_ref.onSwipedPrevious,minDistanceForAction=_ref.minDistanceForAction,minDistanceToCapture=_ref.minDistanceToCapture,style=_ref.style;var _React$useState=React.useState(0),_React$useState2=_slicedToArray(_React$useState,2),currentIndex=_React$useState2[0],setCurrentIndex=_React$useState2[1];var numberOfItems=(_data$length=data==null?void 0:data.length)!=null?_data$length:React.Children.count(childrenProp);var swiperRef=React.useRef(null);var onIndexChanged=function onIndexChanged(index){var previous=currentIndex;var current=index;onIndexChangedProp==null?void 0:onIndexChangedProp(index);setCurrentIndex(index);if(previous===numberOfItems-1&&current===0){onSwipedNext==null?void 0:onSwipedNext(previous);}else if(previous===0&&current===numberOfItems-1){onSwipedPrevious==null?void 0:onSwipedPrevious(previous);}else if(current>previous){onSwipedNext==null?void 0:onSwipedNext(previous);}else if(current<previous){onSwipedPrevious==null?void 0:onSwipedPrevious(previous);}onSwipe==null?void 0:onSwipe(previous);};var children=React.useMemo(function(){return Array.isArray(data)&&renderItem?data.map(function(item,index){var component=renderItem({item:item,index:index});if(!component){return null;}var key=keyExtractor?keyExtractor(item,index):index;return React.cloneElement(component,{key:key});}):childrenProp;},[childrenProp,data,renderItem,keyExtractor]);React.useEffect(function(){var _swiperRef$current,_swiperRef$current$pr;var childrenArray=React.Children.toArray((_swiperRef$current=swiperRef.current)==null?void 0:(_swiperRef$current$pr=_swiperRef$current.props)==null?void 0:_swiperRef$current$pr.children);if(swiperRef.current){swiperRef.current.children=childrenArray;swiperRef.current.count=childrenArray.length;swiperRef.current.forceUpdate();}},[children]);return _jsx(View,{style:style,children:_jsx(SwiperComponent,{ref:swiperRef,from:from,loop:loop,timeout:timeout,vertical:vertical,onIndexChanged:onIndexChanged,minDistanceForAction:minDistanceForAction,minDistanceToCapture:minDistanceToCapture,controlsProps:Object.assign({prevTitle:prevTitle,nextTitle:nextTitle,prevTitleStyle:{color:prevTitleColor},nextTitleStyle:{color:nextTitleColor},dotsTouchable:dotsTouchable},dotColor?{dotProps:{badgeStyle:{backgroundColor:dotColor}}}:{},dotActiveColor?{dotActiveStyle:{backgroundColor:dotActiveColor}}:{}),children:children})});};export default Swiper;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["onChangeTextDelayed","changeTextDelay","webShowOutline","style","value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/TextInput.tsx";import React from"react";import{TextInput as NativeTextInput,Platform}from"react-native";import{useDebounce,useOnUpdate}from"../hooks";import{jsx as _jsx}from"react/jsx-runtime";var TextInput=React.forwardRef(function(_ref,ref){var onChangeTextDelayed=_ref.onChangeTextDelayed,_ref$changeTextDelay=_ref.changeTextDelay,changeTextDelay=_ref$changeTextDelay===void 0?500:_ref$changeTextDelay,_ref$webShowOutline=_ref.webShowOutline,webShowOutline=_ref$webShowOutline===void 0?true:_ref$webShowOutline,style=_ref.style,value=_ref.value,rest=_objectWithoutProperties(_ref,_excluded);var delayedValue=useDebounce(value,changeTextDelay);useOnUpdate(function(){if(delayedValue!==undefined){onChangeTextDelayed==null?void 0:onChangeTextDelayed(delayedValue);}},[delayedValue]);return _jsx(NativeTextInput,Object.assign({testID:"native-text-input",ref:ref,value:value,style:[Platform.OS==="web"&&!webShowOutline?{outlineWidth:0}:{},style]},rest));});export default TextInput;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["onChangeTextDelayed","changeTextDelay","webShowOutline","style","disabled","editable","value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/TextInput.tsx";import React from"react";import{TextInput as NativeTextInput,Platform}from"react-native";import{useDebounce,useOnUpdate}from"../hooks";import{jsx as _jsx}from"react/jsx-runtime";var TextInput=React.forwardRef(function(_ref,ref){var onChangeTextDelayed=_ref.onChangeTextDelayed,_ref$changeTextDelay=_ref.changeTextDelay,changeTextDelay=_ref$changeTextDelay===void 0?500:_ref$changeTextDelay,_ref$webShowOutline=_ref.webShowOutline,webShowOutline=_ref$webShowOutline===void 0?true:_ref$webShowOutline,style=_ref.style,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,_ref$editable=_ref.editable,editable=_ref$editable===void 0?true:_ref$editable,value=_ref.value,rest=_objectWithoutProperties(_ref,_excluded);var delayedValue=useDebounce(value,changeTextDelay);useOnUpdate(function(){if(delayedValue!==undefined){onChangeTextDelayed==null?void 0:onChangeTextDelayed(delayedValue);}},[delayedValue]);return _jsx(NativeTextInput,Object.assign({testID:"native-text-input",ref:ref,value:value,editable:!disabled&&editable,style:[Platform.OS==="web"&&!webShowOutline?{outlineWidth:0}:{},style]},rest));});export default TextInput;
@@ -1,11 +1,24 @@
1
1
  import * as React from "react";
2
2
  import { StyleSheet } from "react-native";
3
3
  import MarkdownComponent from "react-native-markdown-display";
4
- const Markdown = ({ children, style, }) => {
4
+ const childToString = (child) => {
5
+ if (typeof child === "undefined" ||
6
+ child === null ||
7
+ typeof child === "boolean") {
8
+ return "";
9
+ }
10
+ if (JSON.stringify(child) === "{}") {
11
+ return "";
12
+ }
13
+ return child.toString();
14
+ };
15
+ const Markdown = ({ children: childrenProp, style, }) => {
16
+ const children = React.Children.toArray(childrenProp);
17
+ const text = children.map(childToString).join("");
5
18
  return (
6
19
  //'body' style applies to all markdown components
7
20
  //@ts-ignore TS does not like the type of this named style for some reason
8
- React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } }, children));
21
+ React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } }, text));
9
22
  };
10
23
  export default Markdown;
11
24
  //# sourceMappingURL=Markdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.js","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAM9D,MAAM,QAAQ,GAAqD,CAAC,EAClE,QAAQ,E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AAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -24,6 +24,8 @@ export interface SwiperProps<T> {
24
24
  }) => JSX.Element;
25
25
  style?: StyleProp<ViewStyle>;
26
26
  onIndexChanged?: (index: number) => void;
27
+ minDistanceForAction?: number;
28
+ minDistanceToCapture?: number;
27
29
  }
28
- declare const Swiper: ({ vertical, loop, timeout, from, prevTitle, nextTitle, prevTitleColor, nextTitleColor, dotsTouchable, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, style, }: SwiperProps<any>) => React.JSX.Element;
30
+ declare const Swiper: ({ vertical, loop, timeout, from, prevTitle, nextTitle, prevTitleColor, nextTitleColor, dotsTouchable, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, }: SwiperProps<any>) => React.JSX.Element;
29
31
  export default Swiper;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import SwiperComponent from "react-native-web-swiper";
4
- const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, style, }) => {
4
+ const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, }) => {
5
5
  var _a;
6
6
  const [currentIndex, setCurrentIndex] = React.useState(0);
7
7
  const numberOfItems = (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : React.Children.count(childrenProp);
@@ -56,7 +56,7 @@ const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTit
56
56
  }
57
57
  }, [children]);
58
58
  return (React.createElement(View, { style: style },
59
- React.createElement(SwiperComponent, { ref: swiperRef, from: from, loop: loop, timeout: timeout, vertical: vertical, onIndexChanged: onIndexChanged, controlsProps: {
59
+ React.createElement(SwiperComponent, { ref: swiperRef, from: from, loop: loop, timeout: timeout, vertical: vertical, onIndexChanged: onIndexChanged, minDistanceForAction: minDistanceForAction, minDistanceToCapture: minDistanceToCapture, controlsProps: {
60
60
  prevTitle,
61
61
  nextTitle,
62
62
  prevTitleStyle: { color: prevTitleColor },
@@ -1 +1 @@
1
- {"version":3,"file":"Swiper.js","sourceRoot":"","sources":["../../../../../src/components/Swiper/Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,eAAe,MAAM,yBAAyB,CAAC;AAyBtD,MAAM,MAAM,GAAG,CAAC,EACd,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,KAAK,EACZ,OAAO,GAAG,CAAC,EACX,IAAI,GAAG,CAAC,EACR,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,EAAE,EACd,cAAc,EACd,cAAc,EACd,aAAa,GAAG,IAAI,EACpB,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,QAAQ,EAAE,YAAY,EACtB,cAAc,EAAE,kBAAkB,EAClC,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,KAAK,GACY,EAAE,EAAE;;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,mCAAI,KAAK,CA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C,QAAQ;oBACV,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE;oBAC7D,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,cAAc;oBAChB,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE;oBACzD,CAAC,CAAC,EAAE,CAAC;aACR,IAEA,QAAQ,CACO,CACb,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -4,6 +4,7 @@ export interface TextInputProps extends NativeTextInputProps {
4
4
  webShowOutline?: boolean;
5
5
  onChangeTextDelayed?: (text: string) => void;
6
6
  changeTextDelay?: number;
7
+ disabled?: boolean;
7
8
  }
8
9
  declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<NativeTextInput>>;
9
10
  export default TextInput;
@@ -1,14 +1,14 @@
1
1
  import React from "react";
2
2
  import { TextInput as NativeTextInput, Platform, } from "react-native";
3
3
  import { useDebounce, useOnUpdate } from "../hooks";
4
- const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, webShowOutline = true, style, value, ...rest }, ref) => {
4
+ const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, webShowOutline = true, style, disabled = false, editable = true, value, ...rest }, ref) => {
5
5
  const delayedValue = useDebounce(value, changeTextDelay);
6
6
  useOnUpdate(() => {
7
7
  if (delayedValue !== undefined) {
8
8
  onChangeTextDelayed === null || onChangeTextDelayed === void 0 ? void 0 : onChangeTextDelayed(delayedValue);
9
9
  }
10
10
  }, [delayedValue]);
11
- return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, style: [
11
+ return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, editable: !disabled && editable, style: [
12
12
  //@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
13
13
  Platform.OS === "web" && !webShowOutline ? { outlineWidth: 0 } : {},
14
14
  style,
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,EAE5B,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAQpD,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,mBAAmB,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,KAAK,EACL,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAEzD,WAAW,CAAC,GAAG,EAAE;QACf,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,YAAY,CAAC,CAAC;SACrC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,oBAAC,eAAe,IACd,MAAM,EAAC,mBAAmB,EAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;YACL,iGAAiG;YACjG,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACnE,KAAK;SACN,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe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