@expo/html-elements 0.6.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +35 -35
  3. package/build/css/createSafeStyledView.native.js +1 -1
  4. package/build/css/createSafeStyledView.native.js.map +1 -1
  5. package/build/elements/Anchor.js +1 -1
  6. package/build/elements/Anchor.js.map +1 -1
  7. package/build/elements/Headings.d.ts.map +1 -1
  8. package/build/elements/Headings.js +14 -3
  9. package/build/elements/Headings.js.map +1 -1
  10. package/build/elements/Layout.js +8 -8
  11. package/build/elements/Layout.js.map +1 -1
  12. package/build/elements/Lists.js +8 -8
  13. package/build/elements/Lists.js.map +1 -1
  14. package/build/elements/Rules.js +1 -1
  15. package/build/elements/Rules.js.map +1 -1
  16. package/build/elements/Table.js +8 -8
  17. package/build/elements/Table.js.map +1 -1
  18. package/build/elements/Table.web.d.ts.map +1 -1
  19. package/build/elements/Table.web.js +11 -9
  20. package/build/elements/Table.web.js.map +1 -1
  21. package/build/elements/Text.js +14 -15
  22. package/build/elements/Text.js.map +1 -1
  23. package/build/primitives/RNWView.d.ts +1 -2
  24. package/build/primitives/RNWView.d.ts.map +1 -1
  25. package/build/primitives/RNWView.js +43 -20
  26. package/build/primitives/RNWView.js.map +1 -1
  27. package/build/primitives/Text.d.ts +7 -3
  28. package/build/primitives/Text.d.ts.map +1 -1
  29. package/build/primitives/Text.js +1 -1
  30. package/build/primitives/Text.js.map +1 -1
  31. package/build/primitives/View.d.ts +2 -3
  32. package/build/primitives/View.d.ts.map +1 -1
  33. package/build/primitives/View.js +1 -1
  34. package/build/primitives/View.js.map +1 -1
  35. package/build/primitives/createDevView.js +4 -5
  36. package/build/primitives/createDevView.js.map +1 -1
  37. package/package.json +2 -2
  38. package/build/elements/_Text.web.d.ts +0 -19
  39. package/build/elements/_Text.web.d.ts.map +0 -1
  40. package/build/elements/_Text.web.js +0 -63
  41. package/build/elements/_Text.web.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,18 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.8.0 — 2023-11-14
14
+
15
+ ### 💡 Others
16
+
17
+ - Migrate to use non-deprecated `react-native-web` props. ([#24930](https://github.com/expo/expo/pull/24930) by [@EvanBacon](https://github.com/EvanBacon))
18
+
19
+ ## 0.7.0 — 2023-10-17
20
+
21
+ ### 💡 Others
22
+
23
+ - Ship untranspiled JSX to support custom handling of `jsx` and `createElement`. ([#24889](https://github.com/expo/expo/pull/24889) by [@EvanBacon](https://github.com/EvanBacon))
24
+
13
25
  ## 0.6.2 — 2023-09-04
14
26
 
15
27
  _This version does not introduce any user-facing changes._
package/README.md CHANGED
@@ -89,15 +89,15 @@ Here is a list of all the currently supported elements and the web feature they
89
89
  | [`<tr />`][html-tr] | [`<TR />`](#tr) |
90
90
  | [`<ul />`][html-ul] | [`<UL />`](#ul) |
91
91
  | [`<li />`][html-li] | [`<LI />`](#li) |
92
- | [`<details />`][html-details] | ⏱ Pending |
93
- | [`<summary />`][html-summary] | ⏱ Pending |
94
- | [`<progress />`][html-progress] | ⏱ Pending |
95
- | [`<select />`][html-select] | ⏱ Pending |
96
- | [`<picture />`][html-picture] | ⏱ Pending |
97
- | [`<figure />`][html-figure] | ⏱ Pending |
98
- | [`<figcaption />`][html-figcaption] | ⏱ Pending |
99
- | [`<form />`][html-form] | ⏱ Pending |
100
- | [`<label />`][html-label] | ⏱ Pending |
92
+ | [`<details />`][html-details] | ⏱ Pending |
93
+ | [`<summary />`][html-summary] | ⏱ Pending |
94
+ | [`<progress />`][html-progress] | ⏱ Pending |
95
+ | [`<select />`][html-select] | ⏱ Pending |
96
+ | [`<picture />`][html-picture] | ⏱ Pending |
97
+ | [`<figure />`][html-figure] | ⏱ Pending |
98
+ | [`<figcaption />`][html-figcaption] | ⏱ Pending |
99
+ | [`<form />`][html-form] | ⏱ Pending |
100
+ | [`<label />`][html-label] | ⏱ Pending |
101
101
 
102
102
  ## External
103
103
 
@@ -148,10 +148,10 @@ import { H1 } from '@expo/html-elements';
148
148
  export default () => <H1>Example<H1/>
149
149
  ```
150
150
 
151
- | Platform | Output |
152
- | -------- | ------------------------------------------------------ |
153
- | Web | `<h1 aria-level="1" dir="auto" role="heading" />` |
154
- | Native | `<Text accessibilityRole="header" style={[Custom]} />` |
151
+ | Platform | Output |
152
+ | -------- | ------------------------------------------------- |
153
+ | Web | `<h1 aria-level="1" dir="auto" role="heading" />` |
154
+ | Native | `<Text role="header" style={[Custom]} />` |
155
155
 
156
156
  ### `<H2/>`
157
157
 
@@ -160,10 +160,10 @@ import { H2 } from '@expo/html-elements';
160
160
  export default () => <H2>Example<H2/>
161
161
  ```
162
162
 
163
- | Platform | Output |
164
- | -------- | ------------------------------------------------------ |
165
- | Web | `<h2 aria-level="2" dir="auto" role="heading" />` |
166
- | Native | `<Text accessibilityRole="header" style={[Custom]} />` |
163
+ | Platform | Output |
164
+ | -------- | ------------------------------------------------- |
165
+ | Web | `<h2 aria-level="2" dir="auto" role="heading" />` |
166
+ | Native | `<Text role="header" style={[Custom]} />` |
167
167
 
168
168
  ### `<H3/>`
169
169
 
@@ -172,10 +172,10 @@ import { H3 } from '@expo/html-elements';
172
172
  export default () => <H3>Example<H3/>
173
173
  ```
174
174
 
175
- | Platform | Output |
176
- | -------- | ------------------------------------------------------ |
177
- | Web | `<h3 aria-level="3" dir="auto" role="heading" />` |
178
- | Native | `<Text accessibilityRole="header" style={[Custom]} />` |
175
+ | Platform | Output |
176
+ | -------- | ------------------------------------------------- |
177
+ | Web | `<h3 aria-level="3" dir="auto" role="heading" />` |
178
+ | Native | `<Text role="header" style={[Custom]} />` |
179
179
 
180
180
  ### `<H4/>`
181
181
 
@@ -184,10 +184,10 @@ import { H4 } from '@expo/html-elements';
184
184
  export default () => <H4>Example<H4/>
185
185
  ```
186
186
 
187
- | Platform | Output |
188
- | -------- | ------------------------------------------------------ |
189
- | Web | `<h4 aria-level="4" dir="auto" role="heading" />` |
190
- | Native | `<Text accessibilityRole="header" style={[Custom]} />` |
187
+ | Platform | Output |
188
+ | -------- | ------------------------------------------------- |
189
+ | Web | `<h4 aria-level="4" dir="auto" role="heading" />` |
190
+ | Native | `<Text role="header" style={[Custom]} />` |
191
191
 
192
192
  ### `<H5/>`
193
193
 
@@ -196,10 +196,10 @@ import { H5 } from '@expo/html-elements';
196
196
  export default () => <H5>Example<H5/>
197
197
  ```
198
198
 
199
- | Platform | Output |
200
- | -------- | ------------------------------------------------------ |
201
- | Web | `<h5 aria-level="5" dir="auto" role="heading" />` |
202
- | Native | `<Text accessibilityRole="header" style={[Custom]} />` |
199
+ | Platform | Output |
200
+ | -------- | ------------------------------------------------- |
201
+ | Web | `<h5 aria-level="5" dir="auto" role="heading" />` |
202
+ | Native | `<Text role="header" style={[Custom]} />` |
203
203
 
204
204
  ### `<H6/>`
205
205
 
@@ -208,10 +208,10 @@ import { H6 } from '@expo/html-elements';
208
208
  export default () => <H6>Example<H6/>
209
209
  ```
210
210
 
211
- | Platform | Output |
212
- | -------- | ------------------------------------------------------ |
213
- | Web | `<h6 aria-level="6" dir="auto" role="heading" />` |
214
- | Native | `<Text accessibilityRole="header" style={[Custom]} />` |
211
+ | Platform | Output |
212
+ | -------- | ------------------------------------------------- |
213
+ | Web | `<h6 aria-level="6" dir="auto" role="heading" />` |
214
+ | Native | `<Text role="header" style={[Custom]} />` |
215
215
 
216
216
  ## Link
217
217
 
@@ -232,7 +232,7 @@ export default () => <A href="#" target="_blank" />;
232
232
  | Platform | Output |
233
233
  | -------- | ------------------------------------------------------------------------------- |
234
234
  | Web | `<a data-focusable="{true}" dir="auto" href="#" role="link" target="_blank" />` |
235
- | Native | `<Text accessibilityRole="link" onPress={[Function]} />` |
235
+ | Native | `<Text role="link" onPress={[Function]} />` |
236
236
 
237
237
  ## Layout
238
238
 
@@ -342,7 +342,7 @@ export default () => <Section />;
342
342
  | Platform | Output |
343
343
  | -------- | ------------------------------------------------ |
344
344
  | Web | `<section role="region" style="display:flex" />` |
345
- | Native | `<View accessibilityRole="summary" />` |
345
+ | Native | `<View role="summary" />` |
346
346
 
347
347
  ### `<Article/>`
348
348
 
@@ -4,7 +4,7 @@ export function createSafeStyledView(View) {
4
4
  return React.forwardRef(({ style, ...props }, forwardedRef) => {
5
5
  // Filter and apply `center` prop.
6
6
  const finalStyle = useMemo(() => filterStyles(style), [style]);
7
- return React.createElement(View, { ref: forwardedRef, style: finalStyle, ...props });
7
+ return <View ref={forwardedRef} style={finalStyle} {...props}/>;
8
8
  });
9
9
  }
10
10
  //# sourceMappingURL=createSafeStyledView.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createSafeStyledView.native.js","sourceRoot":"","sources":["../../src/css/createSafeStyledView.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,oBAAoB,CAAyC,IAAW;IACtF,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAO,EAAE,YAA8B,EAAE,EAAE;QACnF,kCAAkC;QAClC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/D,OAAO,oBAAC,IAAI,IAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,KAAM,KAAK,GAAI,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { filterStyles } from './filterStyles';\n\nexport function createSafeStyledView<TView extends React.ComponentType<any>>(View: TView) {\n return React.forwardRef(({ style, ...props }: any, forwardedRef: React.Ref<TView>) => {\n // Filter and apply `center` prop.\n const finalStyle = useMemo(() => filterStyles(style), [style]);\n\n return <View ref={forwardedRef} style={finalStyle} {...props} />;\n });\n}\n"]}
1
+ {"version":3,"file":"createSafeStyledView.native.js","sourceRoot":"","sources":["../../src/css/createSafeStyledView.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,oBAAoB,CAAyC,IAAW;IACtF,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAO,EAAE,YAA8B,EAAE,EAAE;QACnF,kCAAkC;QAClC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/D,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { filterStyles } from './filterStyles';\n\nexport function createSafeStyledView<TView extends React.ComponentType<any>>(View: TView) {\n return React.forwardRef(({ style, ...props }: any, forwardedRef: React.Ref<TView>) => {\n // Filter and apply `center` prop.\n const finalStyle = useMemo(() => filterStyles(style), [style]);\n\n return <View ref={forwardedRef} style={finalStyle} {...props} />;\n });\n}\n"]}
@@ -20,6 +20,6 @@ export const A = forwardRef(({ href, target, download, rel, ...props }, ref) =>
20
20
  },
21
21
  },
22
22
  });
23
- return React.createElement(Text, { accessibilityRole: "link", ...props, ...nativeProps, ref: ref });
23
+ return <Text role="link" {...props} {...nativeProps} ref={ref}/>;
24
24
  });
25
25
  //# sourceMappingURL=Anchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Anchor.js","sourceRoot":"","sources":["../../src/elements/Anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,KAAK,EAAa,EAAE,GAAG,EAAE,EAAE;IACxF,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAY;QAC7C,GAAG,EAAE;YACH,IAAI;YACJ,SAAS,EAAE;gBACT,MAAM;gBACN,QAAQ;gBACR,GAAG;aACJ;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBACjB,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBACtC,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,IAAI,KAAK,SAAS,EAAE;oBAC/C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBACvB;YACH,CAAC;SACF;KACF,CAAC,CAAC;IACH,OAAO,oBAAC,IAAI,IAAC,iBAAiB,EAAC,MAAM,KAAK,KAAK,KAAM,WAAW,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACjF,CAAC,CAA6B,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { Linking, Platform } from 'react-native';\n\nimport { LinkProps } from './Text.types';\nimport Text from '../primitives/Text';\n\nexport const A = forwardRef(({ href, target, download, rel, ...props }: LinkProps, ref) => {\n const nativeProps = Platform.select<LinkProps>({\n web: {\n href,\n hrefAttrs: {\n target,\n download,\n rel,\n },\n },\n default: {\n onPress: (event) => {\n props.onPress && props.onPress(event);\n if (Platform.OS !== 'web' && href !== undefined) {\n Linking.openURL(href);\n }\n },\n },\n });\n return <Text accessibilityRole=\"link\" {...props} {...nativeProps} ref={ref} />;\n}) as ComponentType<LinkProps>;\n"]}
1
+ {"version":3,"file":"Anchor.js","sourceRoot":"","sources":["../../src/elements/Anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,KAAK,EAAa,EAAE,GAAG,EAAE,EAAE;IACxF,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAY;QAC7C,GAAG,EAAE;YACH,IAAI;YACJ,SAAS,EAAE;gBACT,MAAM;gBACN,QAAQ;gBACR,GAAG;aACJ;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBACjB,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBACtC,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,IAAI,KAAK,SAAS,EAAE;oBAC/C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBACvB;YACH,CAAC;SACF;KACF,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AACpE,CAAC,CAA6B,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { Linking, Platform } from 'react-native';\n\nimport { LinkProps } from './Text.types';\nimport Text from '../primitives/Text';\n\nexport const A = forwardRef(({ href, target, download, rel, ...props }: LinkProps, ref) => {\n const nativeProps = Platform.select<LinkProps>({\n web: {\n href,\n hrefAttrs: {\n target,\n download,\n rel,\n },\n },\n default: {\n onPress: (event) => {\n props.onPress && props.onPress(event);\n if (Platform.OS !== 'web' && href !== undefined) {\n Linking.openURL(href);\n }\n },\n },\n });\n return <Text role=\"link\" {...props} {...nativeProps} ref={ref} />;\n}) as ComponentType<LinkProps>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Headings.d.ts","sourceRoot":"","sources":["../../src/elements/Headings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAsBrD,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC"}
1
+ {"version":3,"file":"Headings.d.ts","sourceRoot":"","sources":["../../src/elements/Headings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAmBrD,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC;AAC5C,eAAO,MAAM,EAAE,gCAA4B,CAAC"}
@@ -5,12 +5,15 @@ import Text from '../primitives/Text';
5
5
  function createHeadingComponent(level) {
6
6
  const nativeProps = Platform.select({
7
7
  web: {
8
- accessibilityLevel: level,
8
+ 'aria-level': level,
9
+ role: 'header',
10
+ },
11
+ default: {
12
+ accessibilityRole: 'header',
9
13
  },
10
- default: {},
11
14
  });
12
15
  return forwardRef((props, ref) => {
13
- return (React.createElement(Text, { ...nativeProps, accessibilityRole: "header", ...props, style: [styles[`h${level}`], props.style], ref: ref }));
16
+ return (<Text {...nativeProps} {...props} style={[styles[`h${level}`], props.style]} ref={ref}/>);
14
17
  });
15
18
  }
16
19
  export const H1 = createHeadingComponent(1);
@@ -19,6 +22,14 @@ export const H3 = createHeadingComponent(3);
19
22
  export const H4 = createHeadingComponent(4);
20
23
  export const H5 = createHeadingComponent(5);
21
24
  export const H6 = createHeadingComponent(6);
25
+ if (__DEV__) {
26
+ H1.displayName = 'H1';
27
+ H2.displayName = 'H2';
28
+ H3.displayName = 'H3';
29
+ H4.displayName = 'H4';
30
+ H5.displayName = 'H5';
31
+ H6.displayName = 'H6';
32
+ }
22
33
  // Default web styles: http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css
23
34
  const styles = StyleSheet.create({
24
35
  h1: {
@@ -1 +1 @@
1
- {"version":3,"file":"Headings.js","sourceRoot":"","sources":["../../src/elements/Headings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,SAAS,sBAAsB,CAAC,KAAa;IAC3C,MAAM,WAAW,GAAQ,QAAQ,CAAC,MAAM,CAAC;QACvC,GAAG,EAAE;YACH,kBAAkB,EAAE,KAAK;SAC1B;QACD,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,CACL,oBAAC,IAAI,OACC,WAAW,EACf,iBAAiB,EAAC,QAAQ,KACtB,KAAK,EACT,KAAK,EAAE,CAAC,MAAM,CA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AAE,EAAE;QACF,aAAa;QACb,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC;QAClB,aAAa;QACb,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC;QACxB,UAAU,EAAE,MAAM;KACnB;IACD,EAAE,EAAE;QACF,aAAa;QACb,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC;QAClB,aAAa;QACb,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC;QACxB,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { Platform, StyleSheet } from 'react-native';\n\nimport { em } from '../css/units';\nimport Text, { TextProps } from '../primitives/Text';\n\nfunction createHeadingComponent(level: number): ComponentType<TextProps> {\n const nativeProps: any = Platform.select({\n web: {\n accessibilityLevel: level,\n },\n default: {},\n });\n return forwardRef((props: TextProps, ref) => {\n return (\n <Text\n {...nativeProps}\n accessibilityRole=\"header\"\n {...props}\n style={[styles[`h${level}`], props.style]}\n ref={ref}\n />\n );\n }) as ComponentType<TextProps>;\n}\n\nexport const H1 = createHeadingComponent(1);\nexport const H2 = createHeadingComponent(2);\nexport const H3 = createHeadingComponent(3);\nexport const H4 = createHeadingComponent(4);\nexport const H5 = createHeadingComponent(5);\nexport const H6 = createHeadingComponent(6);\n\n// Default web styles: http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css\nconst styles = StyleSheet.create({\n h1: {\n // @ts-ignore\n fontSize: em(2),\n // @ts-ignore\n marginVertical: em(0.67),\n fontWeight: 'bold',\n },\n h2: {\n // @ts-ignore\n fontSize: em(1.5),\n // @ts-ignore\n marginVertical: em(0.83),\n fontWeight: 'bold',\n },\n h3: {\n // @ts-ignore\n fontSize: em(1.17),\n // @ts-ignore\n marginVertical: em(1),\n fontWeight: 'bold',\n },\n h4: {\n // @ts-ignore\n fontSize: em(1),\n // @ts-ignore\n marginVertical: em(1.33),\n fontWeight: 'bold',\n },\n h5: {\n // @ts-ignore\n fontSize: em(0.83),\n // @ts-ignore\n marginVertical: em(1.67),\n fontWeight: 'bold',\n },\n h6: {\n // @ts-ignore\n fontSize: em(0.67),\n // @ts-ignore\n marginVertical: em(2.33),\n fontWeight: 'bold',\n },\n});\n"]}
1
+ {"version":3,"file":"Headings.js","sourceRoot":"","sources":["../../src/elements/Headings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,SAAS,sBAAsB,CAAC,KAAa;IAC3C,MAAM,WAAW,GAAQ,QAAQ,CAAC,MAAM,CAAC;QACvC,GAAG,EAAE;YACH,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,iBAAiB,EAAE,QAAQ;SAC5B;KACF,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAC1F,CAAC;IACJ,CAAC,CAA6B,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,EAAE,GAAG,sB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AC,IAAI,CAAC;QACxB,UAAU,EAAE,MAAM;KACnB;IACD,EAAE,EAAE;QACF,aAAa;QACb,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC;QAClB,aAAa;QACb,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC;QACxB,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { Platform, StyleSheet } from 'react-native';\n\nimport { em } from '../css/units';\nimport Text, { TextProps } from '../primitives/Text';\n\nfunction createHeadingComponent(level: number): ComponentType<TextProps> {\n const nativeProps: any = Platform.select({\n web: {\n 'aria-level': level,\n role: 'header',\n },\n default: {\n accessibilityRole: 'header',\n },\n });\n return forwardRef((props: TextProps, ref) => {\n return (\n <Text {...nativeProps} {...props} style={[styles[`h${level}`], props.style]} ref={ref} />\n );\n }) as ComponentType<TextProps>;\n}\n\nexport const H1 = createHeadingComponent(1);\nexport const H2 = createHeadingComponent(2);\nexport const H3 = createHeadingComponent(3);\nexport const H4 = createHeadingComponent(4);\nexport const H5 = createHeadingComponent(5);\nexport const H6 = createHeadingComponent(6);\n\nif (__DEV__) {\n H1.displayName = 'H1';\n H2.displayName = 'H2';\n H3.displayName = 'H3';\n H4.displayName = 'H4';\n H5.displayName = 'H5';\n H6.displayName = 'H6';\n}\n\n// Default web styles: http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css\nconst styles = StyleSheet.create({\n h1: {\n // @ts-ignore\n fontSize: em(2),\n // @ts-ignore\n marginVertical: em(0.67),\n fontWeight: 'bold',\n },\n h2: {\n // @ts-ignore\n fontSize: em(1.5),\n // @ts-ignore\n marginVertical: em(0.83),\n fontWeight: 'bold',\n },\n h3: {\n // @ts-ignore\n fontSize: em(1.17),\n // @ts-ignore\n marginVertical: em(1),\n fontWeight: 'bold',\n },\n h4: {\n // @ts-ignore\n fontSize: em(1),\n // @ts-ignore\n marginVertical: em(1.33),\n fontWeight: 'bold',\n },\n h5: {\n // @ts-ignore\n fontSize: em(0.83),\n // @ts-ignore\n marginVertical: em(1.67),\n fontWeight: 'bold',\n },\n h6: {\n // @ts-ignore\n fontSize: em(0.67),\n // @ts-ignore\n marginVertical: em(2.33),\n fontWeight: 'bold',\n },\n});\n"]}
@@ -3,28 +3,28 @@ import { Platform } from 'react-native';
3
3
  import View from '../primitives/View';
4
4
  function createView(nativeProps = {}) {
5
5
  return forwardRef((props, ref) => {
6
- return React.createElement(View, { ...nativeProps, ...props, ref: ref });
6
+ return <View {...nativeProps} {...props} ref={ref}/>;
7
7
  });
8
8
  }
9
9
  export const Div = createView();
10
10
  export const Nav = createView(Platform.select({
11
11
  web: {
12
- accessibilityRole: 'navigation',
12
+ role: 'navigation',
13
13
  },
14
14
  }));
15
15
  export const Footer = createView(Platform.select({
16
16
  web: {
17
- accessibilityRole: 'contentinfo',
17
+ role: 'contentinfo',
18
18
  },
19
19
  }));
20
20
  export const Aside = createView(Platform.select({
21
21
  web: {
22
- accessibilityRole: 'complementary',
22
+ role: 'complementary',
23
23
  },
24
24
  }));
25
25
  export const Header = createView(Platform.select({
26
26
  web: {
27
- accessibilityRole: 'banner',
27
+ role: 'banner',
28
28
  },
29
29
  default: {
30
30
  accessibilityRole: 'header',
@@ -32,15 +32,15 @@ export const Header = createView(Platform.select({
32
32
  }));
33
33
  export const Main = createView(Platform.select({
34
34
  web: {
35
- accessibilityRole: 'main',
35
+ role: 'main',
36
36
  },
37
37
  }));
38
38
  export const Article = createView(Platform.select({
39
39
  web: {
40
- accessibilityRole: 'article',
40
+ role: 'article',
41
41
  },
42
42
  }));
43
43
  export const Section = createView({
44
- accessibilityRole: 'summary', // region?
44
+ role: 'summary', // region?
45
45
  });
46
46
  //# sourceMappingURL=Layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../src/elements/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OA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,EAAE,SAAS;KAC7B;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;IAChC,iBAAiB,EAAE,SAAS,EAAE,UAAU;CACzC,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { Platform } from 'react-native';\n\nimport View, { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps = {}): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const Div = createView();\n\nexport const Nav = createView(\n Platform.select({\n web: {\n accessibilityRole: 'navigation',\n },\n })\n);\nexport const Footer = createView(\n Platform.select({\n web: {\n accessibilityRole: 'contentinfo',\n },\n })\n);\nexport const Aside = createView(\n Platform.select({\n web: {\n accessibilityRole: 'complementary',\n },\n })\n);\nexport const Header = createView(\n Platform.select({\n web: {\n accessibilityRole: 'banner',\n },\n default: {\n accessibilityRole: 'header',\n },\n })\n);\nexport const Main = createView(\n Platform.select({\n web: {\n accessibilityRole: 'main',\n },\n })\n);\nexport const Article = createView(\n Platform.select({\n web: {\n accessibilityRole: 'article',\n },\n })\n);\nexport const Section = createView({\n accessibilityRole: 'summary', // region?\n});\n"]}
1
+ {"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../src/elements/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,SAAS,UAAU,CAAC,cAAyB,EAAE;IAC7C,OAAO,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;IACxD,CAAC,CAA6B,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;AAEhC,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAC3B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,YAAY;KACnB;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,aAAa;KACpB;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,eAAe;KACtB;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,QAAQ;KACf;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE,QAAQ;KAC5B;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAC5B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,MAAM;KACb;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAC/B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;KAChB;CACF,CAAC,CACH,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;IAChC,IAAI,EAAE,SAAS,EAAE,UAAU;CAC5B,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { Platform } from 'react-native';\n\nimport View, { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps = {}): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const Div = createView();\n\nexport const Nav = createView(\n Platform.select({\n web: {\n role: 'navigation',\n },\n })\n);\nexport const Footer = createView(\n Platform.select({\n web: {\n role: 'contentinfo',\n },\n })\n);\nexport const Aside = createView(\n Platform.select({\n web: {\n role: 'complementary',\n },\n })\n);\nexport const Header = createView(\n Platform.select({\n web: {\n role: 'banner',\n },\n default: {\n accessibilityRole: 'header',\n },\n })\n);\nexport const Main = createView(\n Platform.select({\n web: {\n role: 'main',\n },\n })\n);\nexport const Article = createView(\n Platform.select({\n web: {\n role: 'article',\n },\n })\n);\nexport const Section = createView({\n role: 'summary', // region?\n});\n"]}
@@ -4,12 +4,12 @@ import Text from '../primitives/Text';
4
4
  import View from '../primitives/View';
5
5
  function createView(nativeProps = {}) {
6
6
  return forwardRef((props, ref) => {
7
- return React.createElement(View, { ...nativeProps, ...props, ref: ref });
7
+ return <View {...nativeProps} {...props} ref={ref}/>;
8
8
  });
9
9
  }
10
10
  export const UL = createView(Platform.select({
11
11
  web: {
12
- accessibilityRole: 'list',
12
+ role: 'list',
13
13
  },
14
14
  }));
15
15
  function isTextProps(props) {
@@ -18,16 +18,16 @@ function isTextProps(props) {
18
18
  }
19
19
  export const LI = forwardRef((props, ref) => {
20
20
  if (isTextProps(props)) {
21
- const accessibilityRole = Platform.select({
21
+ const role = Platform.select({
22
22
  web: 'listitem',
23
- default: props.accessibilityRole,
23
+ default: props.role,
24
24
  });
25
- return React.createElement(Text, { ...props, accessibilityRole: accessibilityRole, ref: ref });
25
+ return <Text {...props} role={role} ref={ref}/>;
26
26
  }
27
- const accessibilityRole = Platform.select({
27
+ const role = Platform.select({
28
28
  web: 'listitem',
29
- default: props.accessibilityRole,
29
+ default: props.role,
30
30
  });
31
- return React.createElement(View, { ...props, accessibilityRole: accessibilityRole, ref: ref });
31
+ return <View {...props} role={role} ref={ref}/>;
32
32
  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UAAU;QACf,OAAO,EAAE,KAAK,CAAC,iBAAiB;KACjC,CAAC,CAAC;IACH,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7E,CAAC,CAA2B,CAAC","sourcesContent":["import React, { ComponentType, forwardRef, PropsWithChildren } from 'react';\nimport { Platform } from 'react-native';\n\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps = {}): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const UL = createView(\n Platform.select({\n web: {\n accessibilityRole: 'list',\n },\n })\n);\n\nfunction isTextProps(props: any): props is TextProps {\n // Treat <li></li> as a Text element.\n return typeof props.children === 'string';\n}\n\ntype LIProps = TextProps | ViewProps;\n\nexport const LI = forwardRef((props: PropsWithChildren<LIProps>, ref: any) => {\n if (isTextProps(props)) {\n const accessibilityRole: LIProps['accessibilityRole'] = Platform.select({\n web: 'listitem',\n default: props.accessibilityRole,\n });\n return <Text {...props} accessibilityRole={accessibilityRole} ref={ref} />;\n }\n const accessibilityRole: LIProps['accessibilityRole'] = Platform.select({\n web: 'listitem',\n default: props.accessibilityRole,\n });\n return <View {...props} accessibilityRole={accessibilityRole} ref={ref} />;\n}) as ComponentType<LIProps>;\n"]}
1
+ {"version":3,"file":"Lists.js","sourceRoot":"","sources":["../../src/elements/Lists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAqB,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,SAAS,UAAU,CAAC,cAAyB,EAAE;IAC7C,OAAO,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;IACxD,CAAC,CAA6B,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAC1B,QAAQ,CAAC,MAAM,CAAC;IACd,GAAG,EAAE;QACH,IAAI,EAAE,MAAM;KACb;CACF,CAAC,CACH,CAAC;AAEF,SAAS,WAAW,CAAC,KAAU;IAC7B,qCAAqC;IACrC,OAAO,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC;AAC5C,CAAC;AAID,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,KAAiC,EAAE,GAAQ,EAAE,EAAE;IAC3E,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;QACtB,MAAM,IAAI,GAAoB,QAAQ,CAAC,MAAM,CAAC;YAC5C,GAAG,EAAE,UAAU;YACf,OAAO,EAAE,KAAK,CAAC,IAAI;SACpB,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;KAClD;IACD,MAAM,IAAI,GAAoB,QAAQ,CAAC,MAAM,CAAC;QAC5C,GAAG,EAAE,UAAU;QACf,OAAO,EAAE,KAAK,CAAC,IAAI;KACpB,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AACnD,CAAC,CAA2B,CAAC","sourcesContent":["import React, { ComponentType, forwardRef, PropsWithChildren } from 'react';\nimport { Platform } from 'react-native';\n\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps = {}): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const UL = createView(\n Platform.select({\n web: {\n role: 'list',\n },\n })\n);\n\nfunction isTextProps(props: any): props is TextProps {\n // Treat <li></li> as a Text element.\n return typeof props.children === 'string';\n}\n\ntype LIProps = TextProps | ViewProps;\n\nexport const LI = forwardRef((props: PropsWithChildren<LIProps>, ref: any) => {\n if (isTextProps(props)) {\n const role: LIProps['role'] = Platform.select({\n web: 'listitem',\n default: props.role,\n });\n return <Text {...props} role={role} ref={ref} />;\n }\n const role: LIProps['role'] = Platform.select({\n web: 'listitem',\n default: props.role,\n });\n return <View {...props} role={role} ref={ref} />;\n}) as ComponentType<LIProps>;\n"]}
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import View from '../primitives/View';
4
4
  export const HR = forwardRef((props, ref) => {
5
- return React.createElement(View, { ...props, style: [styles.hr, props.style], ref: ref });
5
+ return <View {...props} style={[styles.hr, props.style]} ref={ref}/>;
6
6
  });
7
7
  const styles = StyleSheet.create({
8
8
  hr: {
@@ -1 +1 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../src/elements/Rules.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACrD,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACxE,CAAC,CAA6B,CAAC;AAE/B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,EAAE,EAAE;QACF,cAAc,EAAE,UAAU,CAAC,aAAa;QACxC,iBAAiB,EAAE,UAAU,CAAC,aAAa;QAC3C,cAAc,EAAE,SAAS;QACzB,iBAAiB,EAAE,SAAS;QAC5B,cAAc,EAAE,CAAC;KAClB;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport View, { ViewProps } from '../primitives/View';\n\nexport const HR = forwardRef((props: ViewProps, ref) => {\n return <View {...props} style={[styles.hr, props.style]} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nconst styles = StyleSheet.create({\n hr: {\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderTopColor: '#9A9A9A',\n borderBottomColor: '#EEEEEE',\n marginVertical: 8,\n },\n});\n"]}
1
+ {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../src/elements/Rules.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACrD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AACxE,CAAC,CAA6B,CAAC;AAE/B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,EAAE,EAAE;QACF,cAAc,EAAE,UAAU,CAAC,aAAa;QACxC,iBAAiB,EAAE,UAAU,CAAC,aAAa;QAC3C,cAAc,EAAE,SAAS;QACzB,iBAAiB,EAAE,SAAS;QAC5B,cAAc,EAAE,CAAC;KAClB;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport View, { ViewProps } from '../primitives/View';\n\nexport const HR = forwardRef((props: ViewProps, ref) => {\n return <View {...props} style={[styles.hr, props.style]} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nconst styles = StyleSheet.create({\n hr: {\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderTopColor: '#9A9A9A',\n borderBottomColor: '#EEEEEE',\n marginVertical: 8,\n },\n});\n"]}
@@ -5,28 +5,28 @@ import { TableText } from '../primitives/Table';
5
5
  import Text from '../primitives/Text';
6
6
  import View from '../primitives/View';
7
7
  export const Table = forwardRef((props, ref) => {
8
- return React.createElement(View, { ...props, ref: ref });
8
+ return <View {...props} ref={ref}/>;
9
9
  });
10
10
  export const THead = forwardRef((props, ref) => {
11
- return React.createElement(View, { ...props, ref: ref });
11
+ return <View {...props} ref={ref}/>;
12
12
  });
13
13
  export const TBody = forwardRef((props, ref) => {
14
- return React.createElement(View, { ...props, ref: ref });
14
+ return <View {...props} ref={ref}/>;
15
15
  });
16
16
  export const TFoot = forwardRef((props, ref) => {
17
- return React.createElement(View, { ...props, ref: ref });
17
+ return <View {...props} ref={ref}/>;
18
18
  });
19
19
  export const TH = forwardRef((props, ref) => {
20
- return React.createElement(TableText, { ...props, style: [styles.th, props.style], ref: ref });
20
+ return <TableText {...props} style={[styles.th, props.style]} ref={ref}/>;
21
21
  });
22
22
  export const TR = forwardRef((props, ref) => {
23
- return React.createElement(View, { ...props, style: [styles.tr, props.style], ref: ref });
23
+ return <View {...props} style={[styles.tr, props.style]} ref={ref}/>;
24
24
  });
25
25
  export const TD = forwardRef((props, ref) => {
26
- return React.createElement(TableText, { ...props, style: [styles.td, props.style], ref: ref });
26
+ return <TableText {...props} style={[styles.td, props.style]} ref={ref}/>;
27
27
  });
28
28
  export const Caption = forwardRef((props, ref) => {
29
- return React.createElement(Text, { ...props, style: [styles.caption, props.style], ref: ref });
29
+ return <Text {...props} style={[styles.caption, props.style]} ref={ref}/>;
30
30
  });
31
31
  const styles = StyleSheet.create({
32
32
  caption: {
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../src/elements/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,SAAS,EAAkB,MAAM,qBAAqB,CAAC;AAChE,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACvC,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACvC,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACvC,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,KAAK,GAAG,UAA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C;IAC/B,OAAO,EAAE;QACP,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAW;KAC1B;IACD,EAAE,EAAE;QACF,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAW;KAC1B;IACD,EAAE,EAAE;QACF,aAAa,EAAE,KAAK;KACrB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAW;KAC1B;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { em } from '../css/units';\nimport { TableText, TableTextProps } from '../primitives/Table';\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nexport const Table = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const THead = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TBody = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TFoot = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TH = forwardRef((props: TableTextProps, ref: any) => {\n return <TableText {...props} style={[styles.th, props.style]} ref={ref} />;\n}) as ComponentType<TableTextProps>;\n\nexport const TR = forwardRef((props: ViewProps, ref) => {\n return <View {...props} style={[styles.tr, props.style]} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TD = forwardRef((props: TableTextProps, ref: any) => {\n return <TableText {...props} style={[styles.td, props.style]} ref={ref} />;\n}) as ComponentType<TableTextProps>;\n\nexport const Caption = forwardRef((props: TextProps, ref: any) => {\n return <Text {...props} style={[styles.caption, props.style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nconst styles = StyleSheet.create({\n caption: {\n textAlign: 'center',\n fontSize: em(1) as number,\n },\n th: {\n textAlign: 'center',\n fontWeight: 'bold',\n flex: 1,\n fontSize: em(1) as number,\n },\n tr: {\n flexDirection: 'row',\n },\n td: {\n flex: 1,\n fontSize: em(1) as number,\n },\n});\n"]}
1
+ {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../src/elements/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,SAAS,EAAkB,MAAM,qBAAqB,CAAC;AAChE,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AACvC,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AACvC,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AACvC,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,KAAK,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M,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;AAC7E,CAAC,CAA6B,CAAC;AAE/B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAW;KAC1B;IACD,EAAE,EAAE;QACF,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAW;KAC1B;IACD,EAAE,EAAE;QACF,aAAa,EAAE,KAAK;KACrB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAW;KAC1B;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { em } from '../css/units';\nimport { TableText, TableTextProps } from '../primitives/Table';\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nexport const Table = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const THead = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TBody = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TFoot = forwardRef((props: ViewProps, ref) => {\n return <View {...props} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TH = forwardRef((props: TableTextProps, ref: any) => {\n return <TableText {...props} style={[styles.th, props.style]} ref={ref} />;\n}) as ComponentType<TableTextProps>;\n\nexport const TR = forwardRef((props: ViewProps, ref) => {\n return <View {...props} style={[styles.tr, props.style]} ref={ref} />;\n}) as ComponentType<ViewProps>;\n\nexport const TD = forwardRef((props: TableTextProps, ref: any) => {\n return <TableText {...props} style={[styles.td, props.style]} ref={ref} />;\n}) as ComponentType<TableTextProps>;\n\nexport const Caption = forwardRef((props: TextProps, ref: any) => {\n return <Text {...props} style={[styles.caption, props.style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nconst styles = StyleSheet.create({\n caption: {\n textAlign: 'center',\n fontSize: em(1) as number,\n },\n th: {\n textAlign: 'center',\n fontWeight: 'bold',\n flex: 1,\n fontSize: em(1) as number,\n },\n tr: {\n flexDirection: 'row',\n },\n td: {\n flex: 1,\n fontSize: em(1) as number,\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.web.d.ts","sourceRoot":"","sources":["../../src/elements/Table.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAGxD,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAGxD,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAGxD,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAGxD,eAAO,MAAM,EAAE,gCAAkC,CAAC;AAGlD,eAAO,MAAM,EAAE,gCAAkC,CAAC;AAGlD,eAAO,MAAM,EAAE,gCAAkC,CAAC;AAGlD,eAAO,MAAM,OAAO,gCAAuC,CAAC"}
1
+ {"version":3,"file":"Table.web.d.ts","sourceRoot":"","sources":["../../src/elements/Table.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAExD,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAExD,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAExD,eAAO,MAAM,KAAK,gCAAqC,CAAC;AAExD,eAAO,MAAM,EAAE,gCAAkC,CAAC;AAElD,eAAO,MAAM,EAAE,gCAAkC,CAAC;AAElD,eAAO,MAAM,EAAE,gCAAkC,CAAC;AAElD,eAAO,MAAM,OAAO,gCAAuC,CAAC"}
@@ -2,23 +2,25 @@ import React, { forwardRef } from 'react';
2
2
  import View from '../primitives/RNWView';
3
3
  function createView(nativeProps) {
4
4
  return forwardRef((props, ref) => {
5
- return React.createElement(View, { ...nativeProps, ...props, ref: ref });
5
+ return <View {...nativeProps} {...props} ref={ref}/>;
6
6
  });
7
7
  }
8
8
  export const Table = createView({ __element: 'table' });
9
- Table.displayName = 'Table';
10
9
  export const THead = createView({ __element: 'thead' });
11
- THead.displayName = 'THead';
12
10
  export const TBody = createView({ __element: 'tbody' });
13
- TBody.displayName = 'TBody';
14
11
  export const TFoot = createView({ __element: 'tfoot' });
15
- TFoot.displayName = 'TFoot';
16
12
  export const TH = createView({ __element: 'th' });
17
- TH.displayName = 'TH';
18
13
  export const TR = createView({ __element: 'tr' });
19
- TR.displayName = 'TR';
20
14
  export const TD = createView({ __element: 'td' });
21
- TD.displayName = 'TD';
22
15
  export const Caption = createView({ __element: 'caption' });
23
- Caption.displayName = 'Caption';
16
+ if (__DEV__) {
17
+ Table.displayName = 'Table';
18
+ THead.displayName = 'THead';
19
+ TBody.displayName = 'TBody';
20
+ TFoot.displayName = 'TFoot';
21
+ TH.displayName = 'TH';
22
+ TR.displayName = 'TR';
23
+ TD.displayName = 'TD';
24
+ Caption.displayName = 'Caption';
25
+ }
24
26
  //# sourceMappingURL=Table.web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.web.js","sourceRoot":"","sources":["../../src/elements/Table.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAGzC,SAAS,UAAU,CAAC,WAA8C;IAChE,OAAO,UAAU,CAAC,CAAC,KAAgB,EAAE,GAA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ef } from 'react';\n\nimport View from '../primitives/RNWView';\nimport { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps & { __element: string }): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const Table = createView({ __element: 'table' });\nTable.displayName = 'Table';\n\nexport const THead = createView({ __element: 'thead' });\nTHead.displayName = 'THead';\n\nexport const TBody = createView({ __element: 'tbody' });\nTBody.displayName = 'TBody';\n\nexport const TFoot = createView({ __element: 'tfoot' });\nTFoot.displayName = 'TFoot';\n\nexport const TH = createView({ __element: 'th' });\nTH.displayName = 'TH';\n\nexport const TR = createView({ __element: 'tr' });\nTR.displayName = 'TR';\n\nexport const TD = createView({ __element: 'td' });\nTD.displayName = 'TD';\n\nexport const Caption = createView({ __element: 'caption' });\nCaption.displayName = 'Caption';\n"]}
1
+ {"version":3,"file":"Table.web.js","sourceRoot":"","sources":["../../src/elements/Table.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAGzC,SAAS,UAAU,CAAC,WAA8C;IAChE,OAAO,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC;IACxD,CAAC,CAA6B,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;AAE5D,IAAI,OAAO,EAAE;IACX,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;IAC5B,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;IAC5B,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;IAC5B,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;IAC5B,EAAE,CAAC,WAAW,GAAG,IAAI,CAAC;IACtB,EAAE,CAAC,WAAW,GAAG,IAAI,CAAC;IACtB,EAAE,CAAC,WAAW,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;CACjC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\n\nimport View from '../primitives/RNWView';\nimport { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps & { __element: string }): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const Table = createView({ __element: 'table' });\n\nexport const THead = createView({ __element: 'thead' });\n\nexport const TBody = createView({ __element: 'tbody' });\n\nexport const TFoot = createView({ __element: 'tfoot' });\n\nexport const TH = createView({ __element: 'th' });\n\nexport const TR = createView({ __element: 'tr' });\n\nexport const TD = createView({ __element: 'td' });\n\nexport const Caption = createView({ __element: 'caption' });\n\nif (__DEV__) {\n Table.displayName = 'Table';\n THead.displayName = 'THead';\n TBody.displayName = 'TBody';\n TFoot.displayName = 'TFoot';\n TH.displayName = 'TH';\n TR.displayName = 'TR';\n TD.displayName = 'TD';\n Caption.displayName = 'Caption';\n}\n"]}
@@ -4,47 +4,46 @@ import { em } from '../css/units';
4
4
  import Text from '../primitives/Text';
5
5
  import View from '../primitives/View';
6
6
  export const P = forwardRef(({ style, ...props }, ref) => {
7
- return React.createElement(Text, { ...props, style: [styles.p, style], ref: ref });
7
+ return <Text {...props} style={[styles.p, style]} ref={ref}/>;
8
8
  });
9
9
  export const B = forwardRef(({ style, ...props }, ref) => {
10
- return React.createElement(Text, { ...props, style: [styles.b, style], ref: ref });
10
+ return <Text {...props} style={[styles.b, style]} ref={ref}/>;
11
11
  });
12
12
  export const S = forwardRef(({ style, ...props }, ref) => {
13
- return React.createElement(Text, { ...props, style: [styles.s, style], ref: ref });
13
+ return <Text {...props} style={[styles.s, style]} ref={ref}/>;
14
14
  });
15
15
  export const I = forwardRef(({ style, ...props }, ref) => {
16
- return React.createElement(Text, { ...props, style: [styles.i, style], ref: ref });
16
+ return <Text {...props} style={[styles.i, style]} ref={ref}/>;
17
17
  });
18
18
  export const Q = forwardRef(({ children, cite, style, ...props }, ref) => {
19
- return (React.createElement(Text, { ...props, style: [styles.q, style], ref: ref },
20
- "\"",
21
- children,
22
- "\""));
19
+ return (<Text {...props} style={[styles.q, style]} ref={ref}>
20
+ "{children}"
21
+ </Text>);
23
22
  });
24
23
  export const BlockQuote = forwardRef(({ style, cite, ...props }, ref) => {
25
- return React.createElement(View, { ...props, style: [styles.blockQuote, style], ref: ref });
24
+ return <View {...props} style={[styles.blockQuote, style]} ref={ref}/>;
26
25
  });
27
26
  export const BR = forwardRef(({ style, ...props }, ref) => {
28
- return React.createElement(Text, { ...props, style: [styles.br, style], ref: ref });
27
+ return <Text {...props} style={[styles.br, style]} ref={ref}/>;
29
28
  });
30
29
  export const Mark = forwardRef(({ style, ...props }, ref) => {
31
- return React.createElement(Text, { ...props, style: [styles.mark, style], ref: ref });
30
+ return <Text {...props} style={[styles.mark, style]} ref={ref}/>;
32
31
  });
33
32
  export const Code = forwardRef(({ style, ...props }, ref) => {
34
- return React.createElement(Text, { ...props, style: [styles.code, style], ref: ref });
33
+ return <Text {...props} style={[styles.code, style]} ref={ref}/>;
35
34
  });
36
35
  function isTextProps(props) {
37
36
  return typeof props.children === 'string';
38
37
  }
39
38
  export const Pre = forwardRef((props, ref) => {
40
39
  if (isTextProps(props)) {
41
- return React.createElement(Text, { ...props, style: [styles.code, styles.pre, props.style], ref: ref });
40
+ return <Text {...props} style={[styles.code, styles.pre, props.style]} ref={ref}/>;
42
41
  }
43
- return React.createElement(View, { ...props, style: [styles.pre, props.style], ref: ref });
42
+ return <View {...props} style={[styles.pre, props.style]} ref={ref}/>;
44
43
  });
45
44
  // Extract dateTime to prevent passing it to the native Text element
46
45
  export const Time = forwardRef(({ dateTime, ...props }, ref) => {
47
- return React.createElement(Text, { ...props, ref: ref });
46
+ return <Text {...props} ref={ref}/>;
48
47
  });
49
48
  export const Strong = B;
50
49
  export const Del = S;
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/elements/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,IAAmB,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa,EAAE,GAAG,EAAE,EAAE;IAClE,OA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,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;QAC7F,UAAU,EAAE,KAAK;KAClB;IACD,GAAG,EAAE;QACH,aAAa;QACb,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC;KACtB;IACD,UAAU,EAAE;QACV,aAAa;QACb,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC;KACtB;IACD,EAAE,EAAE;QACF,KAAK,EAAE,CAAC;QACR,aAAa;QACb,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;KAChB;IACD,CAAC,EAAE;QACD,kBAAkB,EAAE,cAAc;QAClC,mBAAmB,EAAE,OAAO;KAC7B;IACD,IAAI,EAAE;QACJ,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,OAAO;KACf;IACD,CAAC,EAAE;QACD,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { StyleSheet, Platform } from 'react-native';\n\nimport { BlockQuoteProps, QuoteProps, TimeProps } from './Text.types';\nimport { em } from '../css/units';\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nexport const P = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.p, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const B = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.b, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const S = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.s, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const I = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.i, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const Q = forwardRef(({ children, cite, style, ...props }: QuoteProps, ref) => {\n return (\n <Text {...props} style={[styles.q, style]} ref={ref}>\n \"{children}\"\n </Text>\n );\n}) as ComponentType<QuoteProps>;\n\nexport const BlockQuote = forwardRef(({ style, cite, ...props }: BlockQuoteProps, ref) => {\n return <View {...props} style={[styles.blockQuote, style]} ref={ref} />;\n}) as ComponentType<BlockQuoteProps>;\n\nexport const BR = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.br, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const Mark = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.mark, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const Code = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.code, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nfunction isTextProps(props: any): props is TextProps {\n return typeof props.children === 'string';\n}\n\ntype PreProps = TextProps | ViewProps;\n\nexport const Pre = forwardRef((props: PreProps, ref: any) => {\n if (isTextProps(props)) {\n return <Text {...props} style={[styles.code, styles.pre, props.style]} ref={ref} />;\n }\n return <View {...props} style={[styles.pre, props.style]} ref={ref} />;\n}) as ComponentType<PreProps>;\n\n// Extract dateTime to prevent passing it to the native Text element\nexport const Time = forwardRef(({ dateTime, ...props }: TimeProps, ref) => {\n return <Text {...props} ref={ref} />;\n}) as ComponentType<TimeProps>;\n\nexport const Strong = B;\nexport const Del = S;\nexport const EM = I;\nexport const Span = Text;\n\nconst styles = StyleSheet.create({\n p: {\n // @ts-ignore\n marginVertical: em(1),\n },\n b: {\n fontWeight: 'bold',\n },\n q: {\n fontStyle: 'italic',\n },\n code: {\n fontFamily: Platform.select({ default: 'Courier', ios: 'Courier New', android: 'monospace' }),\n fontWeight: '500',\n },\n pre: {\n // @ts-ignore\n marginVertical: em(1),\n },\n blockQuote: {\n // @ts-ignore\n marginVertical: em(1),\n },\n br: {\n width: 0,\n // @ts-ignore\n height: em(0.5),\n },\n s: {\n textDecorationLine: 'line-through',\n textDecorationStyle: 'solid',\n },\n mark: {\n backgroundColor: 'yellow',\n color: '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ACb,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;KAChB;IACD,CAAC,EAAE;QACD,kBAAkB,EAAE,cAAc;QAClC,mBAAmB,EAAE,OAAO;KAC7B;IACD,IAAI,EAAE;QACJ,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,OAAO;KACf;IACD,CAAC,EAAE;QACD,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React, { ComponentType, forwardRef } from 'react';\nimport { StyleSheet, Platform } from 'react-native';\n\nimport { BlockQuoteProps, QuoteProps, TimeProps } from './Text.types';\nimport { em } from '../css/units';\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nexport const P = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.p, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const B = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.b, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const S = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.s, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const I = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.i, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const Q = forwardRef(({ children, cite, style, ...props }: QuoteProps, ref) => {\n return (\n <Text {...props} style={[styles.q, style]} ref={ref}>\n \"{children}\"\n </Text>\n );\n}) as ComponentType<QuoteProps>;\n\nexport const BlockQuote = forwardRef(({ style, cite, ...props }: BlockQuoteProps, ref) => {\n return <View {...props} style={[styles.blockQuote, style]} ref={ref} />;\n}) as ComponentType<BlockQuoteProps>;\n\nexport const BR = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.br, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const Mark = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.mark, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nexport const Code = forwardRef(({ style, ...props }: TextProps, ref) => {\n return <Text {...props} style={[styles.code, style]} ref={ref} />;\n}) as ComponentType<TextProps>;\n\nfunction isTextProps(props: any): props is TextProps {\n return typeof props.children === 'string';\n}\n\ntype PreProps = TextProps | ViewProps;\n\nexport const Pre = forwardRef((props: PreProps, ref: any) => {\n if (isTextProps(props)) {\n return <Text {...props} style={[styles.code, styles.pre, props.style]} ref={ref} />;\n }\n return <View {...props} style={[styles.pre, props.style]} ref={ref} />;\n}) as ComponentType<PreProps>;\n\n// Extract dateTime to prevent passing it to the native Text element\nexport const Time = forwardRef(({ dateTime, ...props }: TimeProps, ref) => {\n return <Text {...props} ref={ref} />;\n}) as ComponentType<TimeProps>;\n\nexport const Strong = B;\nexport const Del = S;\nexport const EM = I;\nexport const Span = Text;\n\nconst styles = StyleSheet.create({\n p: {\n // @ts-ignore\n marginVertical: em(1),\n },\n b: {\n fontWeight: 'bold',\n },\n q: {\n fontStyle: 'italic',\n },\n code: {\n fontFamily: Platform.select({ default: 'Courier', ios: 'Courier New', android: 'monospace' }),\n fontWeight: '500',\n },\n pre: {\n // @ts-ignore\n marginVertical: em(1),\n },\n blockQuote: {\n // @ts-ignore\n marginVertical: em(1),\n },\n br: {\n width: 0,\n // @ts-ignore\n height: em(0.5),\n },\n s: {\n textDecorationLine: 'line-through',\n textDecorationStyle: 'solid',\n },\n mark: {\n backgroundColor: 'yellow',\n color: 'black',\n },\n i: {\n fontStyle: 'italic',\n },\n});\n"]}
@@ -7,12 +7,11 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import * as React from 'react';
10
- import { PlatformMethods, ViewProps } from 'react-native-web/dist/types';
11
10
  /**
12
11
  * This is the View from react-native-web copied out in order to supply a custom `__element` property.
13
12
  * In the past, you could use `createElement` to create an element with a custom HTML element, but this changed
14
13
  * somewhere between 0.14...0.17.
15
14
  */
16
- declare const View: React.AbstractComponent<ViewProps, HTMLElement & PlatformMethods>;
15
+ declare const View: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<ViewProps>>;
17
16
  export default View;
18
17
  //# sourceMappingURL=RNWView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RNWView.d.ts","sourceRoot":"","sources":["../../src/primitives/RNWView.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAmBzE;;;;GAIG;AAGH,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,EAAE,WAAW,GAAG,eAAe,CA8D3E,CAAC;AAyBF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"RNWView.d.ts","sourceRoot":"","sources":["../../src/primitives/RNWView.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B;;;;GAIG;AAEH,QAAA,MAAM,IAAI,uGAuFR,CAAC;AA8BH,eAAe,IAAI,CAAC"}
@@ -13,34 +13,35 @@ import createElement from 'react-native-web/dist/exports/createElement';
13
13
  import * as forwardedProps from 'react-native-web/dist/modules/forwardedProps';
14
14
  import pick from 'react-native-web/dist/modules/pick';
15
15
  import useElementLayout from 'react-native-web/dist/modules/useElementLayout';
16
+ import { useLocaleContext, getLocaleDirection } from 'react-native-web/dist/modules/useLocale';
16
17
  import useMergeRefs from 'react-native-web/dist/modules/useMergeRefs';
17
18
  import usePlatformMethods from 'react-native-web/dist/modules/usePlatformMethods';
18
19
  import useResponderEvents from 'react-native-web/dist/modules/useResponderEvents';
19
- const forwardPropsList = {
20
- ...forwardedProps.defaultProps,
21
- ...forwardedProps.accessibilityProps,
22
- ...forwardedProps.clickProps,
23
- ...forwardedProps.focusProps,
24
- ...forwardedProps.keyboardProps,
25
- ...forwardedProps.mouseProps,
26
- ...forwardedProps.touchProps,
27
- ...forwardedProps.styleProps,
20
+ const forwardPropsList = Object.assign({}, forwardedProps.defaultProps, forwardedProps.accessibilityProps, forwardedProps.clickProps, forwardedProps.defaultProps, forwardedProps.accessibilityProps, forwardedProps.clickProps, forwardedProps.focusProps, forwardedProps.keyboardProps, forwardedProps.mouseProps, forwardedProps.touchProps, forwardedProps.styleProps, {
21
+ href: true,
28
22
  lang: true,
29
23
  onScroll: true,
30
24
  onWheel: true,
31
25
  pointerEvents: true,
32
- };
26
+ });
33
27
  const pickProps = (props) => pick(props, forwardPropsList);
34
28
  /**
35
29
  * This is the View from react-native-web copied out in order to supply a custom `__element` property.
36
30
  * In the past, you could use `createElement` to create an element with a custom HTML element, but this changed
37
31
  * somewhere between 0.14...0.17.
38
32
  */
39
- // @ts-ignore
40
33
  const View = React.forwardRef((props, forwardedRef) => {
41
- const { onLayout, onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onResponderEnd, onResponderGrant, onResponderMove, onResponderReject, onResponderRelease, onResponderStart, onResponderTerminate, onResponderTerminationRequest, onScrollShouldSetResponder, onScrollShouldSetResponderCapture, onSelectionChangeShouldSetResponder, onSelectionChangeShouldSetResponderCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture, __element, } = props;
34
+ const { __element, hrefAttrs, onLayout, onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onResponderEnd, onResponderGrant, onResponderMove, onResponderReject, onResponderRelease, onResponderStart, onResponderTerminate, onResponderTerminationRequest, onScrollShouldSetResponder, onScrollShouldSetResponderCapture, onSelectionChangeShouldSetResponder, onSelectionChangeShouldSetResponderCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture, ...rest } = props;
35
+ // if (process.env.NODE_ENV !== 'production') {
36
+ // React.Children.toArray(props.children).forEach((item) => {
37
+ // if (typeof item === 'string') {
38
+ // console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`);
39
+ // }
40
+ // });
41
+ // }
42
42
  const hasTextAncestor = React.useContext(TextAncestorContext);
43
43
  const hostRef = React.useRef(null);
44
+ const { direction: contextDirection } = useLocaleContext();
44
45
  useElementLayout(hostRef, onLayout);
45
46
  useResponderEvents(hostRef, {
46
47
  onMoveShouldSetResponder,
@@ -60,31 +61,53 @@ const View = React.forwardRef((props, forwardedRef) => {
60
61
  onStartShouldSetResponder,
61
62
  onStartShouldSetResponderCapture,
62
63
  });
63
- const style = StyleSheet.compose(hasTextAncestor && styles.inline,
64
- // @ts-ignore: untyped
65
- props.style);
66
- const supportedProps = pickProps(props);
67
- supportedProps.style = style;
64
+ let component = __element ?? 'div';
65
+ const langDirection = props.lang != null ? getLocaleDirection(props.lang) : null;
66
+ const componentDirection = props.dir || langDirection;
67
+ const writingDirection = componentDirection || contextDirection;
68
+ const supportedProps = pickProps(rest);
69
+ supportedProps.dir = componentDirection;
70
+ supportedProps.style = [styles.view$raw, hasTextAncestor && styles.inline, props.style];
71
+ if (props.href != null) {
72
+ component = 'a';
73
+ if (hrefAttrs != null) {
74
+ const { download, rel, target } = hrefAttrs;
75
+ if (download != null) {
76
+ supportedProps.download = download;
77
+ }
78
+ if (rel != null) {
79
+ supportedProps.rel = rel;
80
+ }
81
+ if (typeof target === 'string') {
82
+ supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;
83
+ }
84
+ }
85
+ }
68
86
  const platformMethodsRef = usePlatformMethods(supportedProps);
69
87
  const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);
70
88
  supportedProps.ref = setRef;
71
- return createElement(__element, supportedProps);
89
+ return createElement(component, supportedProps, { writingDirection });
72
90
  });
73
- View.displayName = 'View';
91
+ if (__DEV__) {
92
+ View.displayName = 'View';
93
+ }
74
94
  const styles = StyleSheet.create({
75
- view: {
95
+ view$raw: {
76
96
  alignItems: 'stretch',
97
+ backgroundColor: 'transparent',
77
98
  border: '0 solid black',
78
99
  boxSizing: 'border-box',
79
100
  display: 'flex',
80
101
  flexBasis: 'auto',
81
102
  flexDirection: 'column',
82
103
  flexShrink: 0,
104
+ listStyle: 'none',
83
105
  margin: 0,
84
106
  minHeight: 0,
85
107
  minWidth: 0,
86
108
  padding: 0,
87
109
  position: 'relative',
110
+ textDecoration: 'none',
88
111
  zIndex: 0,
89
112
  },
90
113
  inline: {
@@ -1 +1 @@
1
- {"version":3,"file":"RNWView.js","sourceRoot":"","sources":["../../src/primitives/RNWView.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,0CAA0C,CAAC;AAClE,OAAO,mBAAmB,MAAM,wDAAwD,CAAC;AACzF,OAAO,aAAa,MAAM,6CAA6C,CAAC;AACxE,OAAO,KAAK,cAAc,MAAM,8CAA8C,CAAC;AAC/E,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAGlF,MAAM,gBAAgB,GAAG;IACvB,GAAG,cAAc,CAAC,YAAY;IAC9B,GAAG,cAAc,CAAC,kBAAkB;IACpC,GAAG,cAAc,CAAC,UAAU;IAC5B,GAAG,cAAc,CAAC,UAAU;IAC5B,GAAG,cAAc,CAAC,aAAa;IAC/B,GAAG,cAAc,CAAC,UAAU;IAC5B,GAAG,cAAc,CAAC,UAAU;IAC5B,GAAG,cAAc,CAAC,UAAU;IAC5B,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAE3D;;;;GAIG;AAEH,aAAa;AACb,MAAM,IAAI,GAAsE,KAAK,C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AAO,aAAa,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAClD,CAAC,CACF,CAAC;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS;QACrB,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,MAAM;QACjB,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;KACV;IACD,MAAM,EAAE;QACN,OAAO,EAAE,aAAa;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["/**\n * Copyright (c) Expo.\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport * as React from 'react';\nimport StyleSheet from 'react-native-web/dist/exports/StyleSheet';\nimport TextAncestorContext from 'react-native-web/dist/exports/Text/TextAncestorContext';\nimport createElement from 'react-native-web/dist/exports/createElement';\nimport * as forwardedProps from 'react-native-web/dist/modules/forwardedProps';\nimport pick from 'react-native-web/dist/modules/pick';\nimport useElementLayout from 'react-native-web/dist/modules/useElementLayout';\nimport useMergeRefs from 'react-native-web/dist/modules/useMergeRefs';\nimport usePlatformMethods from 'react-native-web/dist/modules/usePlatformMethods';\nimport useResponderEvents from 'react-native-web/dist/modules/useResponderEvents';\nimport { PlatformMethods, ViewProps } from 'react-native-web/dist/types';\n\nconst forwardPropsList = {\n ...forwardedProps.defaultProps,\n ...forwardedProps.accessibilityProps,\n ...forwardedProps.clickProps,\n ...forwardedProps.focusProps,\n ...forwardedProps.keyboardProps,\n ...forwardedProps.mouseProps,\n ...forwardedProps.touchProps,\n ...forwardedProps.styleProps,\n lang: true,\n onScroll: true,\n onWheel: true,\n pointerEvents: true,\n};\n\nconst pickProps = (props) => pick(props, forwardPropsList);\n\n/**\n * This is the View from react-native-web copied out in order to supply a custom `__element` property.\n * In the past, you could use `createElement` to create an element with a custom HTML element, but this changed\n * somewhere between 0.14...0.17.\n */\n\n// @ts-ignore\nconst View: React.AbstractComponent<ViewProps, HTMLElement & PlatformMethods> = React.forwardRef(\n (props, forwardedRef) => {\n const {\n onLayout,\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n __element,\n } = props as any;\n\n const hasTextAncestor = React.useContext(TextAncestorContext);\n const hostRef = React.useRef(null);\n\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n });\n\n const style = StyleSheet.compose(\n hasTextAncestor && styles.inline,\n // @ts-ignore: untyped\n props.style\n );\n\n const supportedProps = pickProps(props);\n supportedProps.style = style;\n\n const platformMethodsRef = usePlatformMethods(supportedProps);\n const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n\n supportedProps.ref = setRef;\n\n return createElement(__element, supportedProps);\n }\n);\n\nView.displayName = 'View';\n\nconst styles = StyleSheet.create({\n view: {\n alignItems: 'stretch',\n border: '0 solid black',\n boxSizing: 'border-box',\n display: 'flex',\n flexBasis: 'auto',\n flexDirection: 'column',\n flexShrink: 0,\n margin: 0,\n minHeight: 0,\n minWidth: 0,\n padding: 0,\n position: 'relative',\n zIndex: 0,\n },\n inline: {\n display: 'inline-flex',\n },\n});\n\nexport default View;\n"]}
1
+ {"version":3,"file":"RNWView.js","sourceRoot":"","sources":["../../src/primitives/RNWView.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,0CAA0C,CAAC;AAClE,OAAO,mBAAmB,MAAM,wDAAwD,CAAC;AACzF,OAAO,aAAa,MAAM,6CAA6C,CAAC;AACxE,OAAO,KAAK,cAAc,MAAM,8CAA8C,CAAC;AAC/E,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAGlF,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CACpC,EAAE,EACF,cAAc,CAAC,YAAY,EAC3B,cAAc,CAAC,kBAAkB,EACjC,cAAc,CAAC,UAAU,EACzB,cAAc,CAAC,YAAY,EAC3B,cAAc,CAAC,kBAAkB,EACjC,cAAc,CAAC,UAAU,EACzB,cAAc,CAAC,UAAU,EACzB,cAAc,CAAC,aAAa,EAC5B,cAAc,CAAC,UAAU,EACzB,cAAc,CAAC,UAAU,EACzB,cAAc,CAAC,UAAU,EACzB;IACE,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,QAAQ,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C,CAAC;IAEvE,cAAc,CAAC,GAAG,GAAG,MAAM,CAAC;IAE5B,OAAO,aAAa,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC,CAAC;AAEH,IAAI,OAAO,EAAE;IACX,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,UAAU,EAAE,SAAS;QACrB,eAAe,EAAE,aAAa;QAC9B,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,MAAM;QACjB,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,UAAU;QACpB,cAAc,EAAE,MAAM;QACtB,MAAM,EAAE,CAAC;KACV;IACD,MAAM,EAAE;QACN,OAAO,EAAE,aAAa;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["/**\n * Copyright (c) Expo.\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport * as React from 'react';\nimport StyleSheet from 'react-native-web/dist/exports/StyleSheet';\nimport TextAncestorContext from 'react-native-web/dist/exports/Text/TextAncestorContext';\nimport createElement from 'react-native-web/dist/exports/createElement';\nimport * as forwardedProps from 'react-native-web/dist/modules/forwardedProps';\nimport pick from 'react-native-web/dist/modules/pick';\nimport useElementLayout from 'react-native-web/dist/modules/useElementLayout';\nimport { useLocaleContext, getLocaleDirection } from 'react-native-web/dist/modules/useLocale';\nimport useMergeRefs from 'react-native-web/dist/modules/useMergeRefs';\nimport usePlatformMethods from 'react-native-web/dist/modules/usePlatformMethods';\nimport useResponderEvents from 'react-native-web/dist/modules/useResponderEvents';\nimport { PlatformMethods, ViewProps } from 'react-native-web/dist/types';\n\nconst forwardPropsList = Object.assign(\n {},\n forwardedProps.defaultProps,\n forwardedProps.accessibilityProps,\n forwardedProps.clickProps,\n forwardedProps.defaultProps,\n forwardedProps.accessibilityProps,\n forwardedProps.clickProps,\n forwardedProps.focusProps,\n forwardedProps.keyboardProps,\n forwardedProps.mouseProps,\n forwardedProps.touchProps,\n forwardedProps.styleProps,\n {\n href: true,\n lang: true,\n onScroll: true,\n onWheel: true,\n pointerEvents: true,\n }\n);\nconst pickProps = (props) => pick(props, forwardPropsList);\n\n/**\n * This is the View from react-native-web copied out in order to supply a custom `__element` property.\n * In the past, you could use `createElement` to create an element with a custom HTML element, but this changed\n * somewhere between 0.14...0.17.\n */\n\nconst View = React.forwardRef<ViewProps, HTMLElement & PlatformMethods>((props, forwardedRef) => {\n const {\n __element,\n hrefAttrs,\n onLayout,\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n ...rest\n } = props as any;\n\n // if (process.env.NODE_ENV !== 'production') {\n // React.Children.toArray(props.children).forEach((item) => {\n // if (typeof item === 'string') {\n // console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`);\n // }\n // });\n // }\n\n const hasTextAncestor = React.useContext(TextAncestorContext);\n const hostRef = React.useRef(null);\n const { direction: contextDirection } = useLocaleContext();\n\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n });\n\n let component = __element ?? 'div';\n\n const langDirection = props.lang != null ? getLocaleDirection(props.lang) : null;\n const componentDirection = props.dir || langDirection;\n const writingDirection = componentDirection || contextDirection;\n\n const supportedProps = pickProps(rest);\n supportedProps.dir = componentDirection;\n supportedProps.style = [styles.view$raw, hasTextAncestor && styles.inline, props.style];\n if (props.href != null) {\n component = 'a';\n if (hrefAttrs != null) {\n const { download, rel, target } = hrefAttrs;\n if (download != null) {\n supportedProps.download = download;\n }\n if (rel != null) {\n supportedProps.rel = rel;\n }\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n }\n\n const platformMethodsRef = usePlatformMethods(supportedProps);\n const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n\n supportedProps.ref = setRef;\n\n return createElement(component, supportedProps, { writingDirection });\n});\n\nif (__DEV__) {\n View.displayName = 'View';\n}\n\nconst styles = StyleSheet.create({\n view$raw: {\n alignItems: 'stretch',\n backgroundColor: 'transparent',\n border: '0 solid black',\n boxSizing: 'border-box',\n display: 'flex',\n flexBasis: 'auto',\n flexDirection: 'column',\n flexShrink: 0,\n listStyle: 'none',\n margin: 0,\n minHeight: 0,\n minWidth: 0,\n padding: 0,\n position: 'relative',\n textDecoration: 'none',\n zIndex: 0,\n },\n inline: {\n display: 'inline-flex',\n },\n});\n\nexport default View;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { ClassAttributes, ComponentProps, ComponentType } from 'react';
2
- import { AccessibilityRole, StyleProp, Text as NativeText, TextStyle as NativeTextStyle } from 'react-native';
2
+ import { StyleProp, Text as NativeText, TextStyle as NativeTextStyle } from 'react-native';
3
3
  import { WebViewStyle } from './View';
4
4
  type NativeTextProps = ComponentProps<typeof NativeText> & ClassAttributes<typeof NativeText>;
5
5
  export interface WebTextStyle {
@@ -28,8 +28,12 @@ export type WebTextProps = {
28
28
  /** @platform web */
29
29
  tabIndex?: number;
30
30
  /** @platform web */
31
+ 'aria-level'?: number;
32
+ /**
33
+ * @deprecated use `aria-level` instead.
34
+ * @platform web
35
+ */
31
36
  accessibilityLevel?: number;
32
- accessibilityRole?: 'listitem' | 'heading' | AccessibilityRole;
33
37
  /** @platform web */
34
38
  href?: string;
35
39
  /** @deprecated use the prop `hrefAttrs={{ target: '...' }}` instead. */
@@ -46,7 +50,7 @@ export type WebTextProps = {
46
50
  /** @platform web */
47
51
  lang?: string;
48
52
  };
49
- export type TextProps = Omit<NativeTextProps, 'style' | 'accessibilityRole'> & WebTextProps;
53
+ export type TextProps = Omit<NativeTextProps, 'style'> & WebTextProps;
50
54
  declare const _default: ComponentType<TextProps>;
51
55
  export default _default;
52
56
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/primitives/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,IAAI,IAAI,UAAU,EAClB,SAAS,IAAI,eAAe,EAC7B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKtC,KAAK,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG,eAAe,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9F,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;IAChD,sCAAsC;IACtC,UAAU,CAAC,EAAE,eAA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M,CAAC;IAClB,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,SAAS,CAAC,EAAE;QACV,oBAAoB;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,oBAAoB;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,oBAAoB;QACpB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC7B,CAAC;IACF,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC;;AAItE,wBAAsE"}
@@ -1,4 +1,4 @@
1
- import { Text as NativeText, } from 'react-native';
1
+ import { Text as NativeText } from 'react-native';
2
2
  import { createSafeStyledView } from '../css/createSafeStyledView';
3
3
  const Text = NativeText;
4
4
  export default createSafeStyledView(Text);
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/primitives/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,IAAI,UAAU,GAEnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAyDnE,MAAM,IAAI,GAAG,UAAsC,CAAC;AAEpD,eAAe,oBAAoB,CAAC,IAAI,CAA6B,CAAC","sourcesContent":["import { ClassAttributes, ComponentProps, ComponentType } from 'react';\nimport {\n AccessibilityRole,\n StyleProp,\n Text as NativeText,\n TextStyle as NativeTextStyle,\n} from 'react-native';\n\nimport { WebViewStyle } from './View';\nimport { createSafeStyledView } from '../css/createSafeStyledView';\n\n// https://github.com/necolas/react-native-web/issues/832\n\ntype NativeTextProps = ComponentProps<typeof NativeText> & ClassAttributes<typeof NativeText>;\n\nexport interface WebTextStyle {\n /** string is only available on web */\n fontSize?: NativeTextStyle['fontSize'] | string;\n /** string is only available on web */\n lineHeight?: NativeTextStyle['lineHeight'] | string;\n /** @platform web */\n fontFeatureSettings?: string;\n /** @platform web */\n textIndent?: string;\n /** @platform web */\n textOverflow?: string;\n /** @platform web */\n textRendering?: string;\n /** @platform web */\n textTransform?: string;\n /** @platform web */\n unicodeBidi?: string;\n /** @platform web */\n wordWrap?: string;\n}\n\nexport type TextStyle = Omit<NativeTextStyle, 'position' | 'fontSize' | 'lineHeight'> &\n WebTextStyle &\n WebViewStyle;\n\nexport type WebTextProps = {\n style?: StyleProp<TextStyle>;\n /** @platform web */\n tabIndex?: number;\n /** @platform web */\n accessibilityLevel?: number;\n accessibilityRole?: 'listitem' | 'heading' | AccessibilityRole;\n /** @platform web */\n href?: string;\n /** @deprecated use the prop `hrefAttrs={{ target: '...' }}` instead. */\n target?: string;\n /** @platform web */\n hrefAttrs?: {\n /** @platform web */\n target?: string;\n /** @platform web */\n rel?: string;\n /** @platform web */\n download?: boolean | string;\n };\n /** @platform web */\n lang?: string;\n};\n\nexport type TextProps = Omit<NativeTextProps, 'style' | 'accessibilityRole'> & WebTextProps;\n\nconst Text = NativeText as ComponentType<TextProps>;\n\nexport default createSafeStyledView(Text) as ComponentType<TextProps>;\n"]}
1
+ {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/primitives/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,IAAI,UAAU,EAAgC,MAAM,cAAc,CAAC;AAG3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AA6DnE,MAAM,IAAI,GAAG,UAAsC,CAAC;AAEpD,eAAe,oBAAoB,CAAC,IAAI,CAA6B,CAAC","sourcesContent":["import { ClassAttributes, ComponentProps, ComponentType } from 'react';\nimport { StyleProp, Text as NativeText, TextStyle as NativeTextStyle } from 'react-native';\n\nimport { WebViewStyle } from './View';\nimport { createSafeStyledView } from '../css/createSafeStyledView';\n\n// https://github.com/necolas/react-native-web/issues/832\n\ntype NativeTextProps = ComponentProps<typeof NativeText> & ClassAttributes<typeof NativeText>;\n\nexport interface WebTextStyle {\n /** string is only available on web */\n fontSize?: NativeTextStyle['fontSize'] | string;\n /** string is only available on web */\n lineHeight?: NativeTextStyle['lineHeight'] | string;\n /** @platform web */\n fontFeatureSettings?: string;\n /** @platform web */\n textIndent?: string;\n /** @platform web */\n textOverflow?: string;\n /** @platform web */\n textRendering?: string;\n /** @platform web */\n textTransform?: string;\n /** @platform web */\n unicodeBidi?: string;\n /** @platform web */\n wordWrap?: string;\n}\n\nexport type TextStyle = Omit<NativeTextStyle, 'position' | 'fontSize' | 'lineHeight'> &\n WebTextStyle &\n WebViewStyle;\n\nexport type WebTextProps = {\n style?: StyleProp<TextStyle>;\n /** @platform web */\n tabIndex?: number;\n /** @platform web */\n 'aria-level'?: number;\n /**\n * @deprecated use `aria-level` instead.\n * @platform web\n */\n accessibilityLevel?: number;\n /** @platform web */\n href?: string;\n /** @deprecated use the prop `hrefAttrs={{ target: '...' }}` instead. */\n target?: string;\n /** @platform web */\n hrefAttrs?: {\n /** @platform web */\n target?: string;\n /** @platform web */\n rel?: string;\n /** @platform web */\n download?: boolean | string;\n };\n /** @platform web */\n lang?: string;\n};\n\nexport type TextProps = Omit<NativeTextProps, 'style'> & WebTextProps;\n\nconst Text = NativeText as ComponentType<TextProps>;\n\nexport default createSafeStyledView(Text) as ComponentType<TextProps>;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { ClassAttributes, ComponentProps, ComponentType } from 'react';
2
- import { AccessibilityRole, StyleProp, View as NativeView, ViewStyle as NativeViewStyle } from 'react-native';
2
+ import { StyleProp, View as NativeView, ViewStyle as NativeViewStyle } from 'react-native';
3
3
  type NativeViewProps = ComponentProps<typeof NativeView> & ClassAttributes<typeof NativeView>;
4
4
  /**
5
5
  * https://baconbrix.gitbook.io/react-native-web/primitives/view
@@ -115,9 +115,8 @@ export interface WebViewStyle {
115
115
  export type ViewStyle = Omit<NativeViewStyle, 'position'> & WebViewStyle;
116
116
  export type WebViewProps = {
117
117
  style?: StyleProp<ViewStyle>;
118
- accessibilityRole?: 'list' | 'listitem' | 'complementary' | 'contentinfo' | 'region' | 'navigation' | 'main' | 'article' | 'banner' | AccessibilityRole;
119
118
  };
120
- export type ViewProps = WebViewProps & Omit<NativeViewProps, 'style' | 'accessibilityRole'>;
119
+ export type ViewProps = WebViewProps & Omit<NativeViewProps, 'style'>;
121
120
  declare const _default: ComponentType<ViewProps>;
122
121
  export default _default;
123
122
  //# sourceMappingURL=View.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../src/primitives/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,IAAI,IAAI,UAAU,EAClB,SAAS,IAAI,eAAe,EAC7B,MAAM,cAAc,CAAC;AAOtB,KAAK,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG,eAAe,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9F;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;IAC/B,oBAAoB;IACpB,uBAAuB,CAAC,EAAE,MAAM,GAAG,UAAU,CA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AE,MAAM,CAAC;IACpB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;CACpE;AAED,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,YAAY,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;;AAStE,wBAAsE"}
@@ -1,4 +1,4 @@
1
- import { View as NativeView, } from 'react-native';
1
+ import { View as NativeView } from 'react-native';
2
2
  import { createDevView } from './createDevView';
3
3
  import { createSafeStyledView } from '../css/createSafeStyledView';
4
4
  let View = NativeView;
@@ -1 +1 @@
1
- {"version":3,"file":"View.js","sourceRoot":"","sources":["../../src/primitives/View.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,IAAI,UAAU,GAEnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AA0InE,IAAI,IAAI,GAAG,UAAsC,CAAC;AAElD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,wDAAwD;IACxD,IAAI,GAAG,aAAa,CAAC,UAAU,CAA6B,CAAC;CAC9D;AAED,eAAe,oBAAoB,CAAC,IAAI,CAA6B,CAAC","sourcesContent":["import { ClassAttributes, ComponentProps, ComponentType } from 'react';\nimport {\n AccessibilityRole,\n StyleProp,\n View as NativeView,\n ViewStyle as NativeViewStyle,\n} from 'react-native';\n\nimport { createDevView } from './createDevView';\nimport { createSafeStyledView } from '../css/createSafeStyledView';\n\n// https://github.com/necolas/react-native-web/issues/832\n\ntype NativeViewProps = ComponentProps<typeof NativeView> & ClassAttributes<typeof NativeView>;\n\n/**\n * https://baconbrix.gitbook.io/react-native-web/primitives/view\n */\nexport interface WebViewStyle {\n /** @platform web */\n backdropFilter?: string;\n /** @platform web */\n animationDelay?: string;\n /** @platform web */\n animationDirection?: string;\n /** @platform web */\n animationDuration?: string;\n /** @platform web */\n animationFillMode?: string;\n /** @platform web */\n animationName?: string | any[];\n /** @platform web */\n animationIterationCount?: number | 'infinite';\n /** @platform web */\n animationPlayState?: string;\n /** @platform web */\n animationTimingFunction?: string;\n /** @platform web */\n backgroundAttachment?: string;\n /** @platform web */\n backgroundBlendMode?: string;\n /** @platform web */\n backgroundClip?: string;\n /** @platform web */\n backgroundImage?: string;\n /** @platform web */\n backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box';\n /** @platform web */\n backgroundPosition?: string;\n /** @platform web */\n backgroundRepeat?: string;\n /** @platform web */\n backgroundSize?: string;\n /** @platform web */\n boxShadow?: string;\n /** @platform web */\n boxSizing?: string;\n /** @platform web */\n clip?: string;\n /** @platform web */\n cursor?: string;\n /** @platform web */\n filter?: string;\n /** @platform web */\n gridAutoColumns?: string;\n /** @platform web */\n gridAutoFlow?: string;\n /** @platform web */\n gridAutoRows?: string;\n /** @platform web */\n gridColumnEnd?: string;\n /** @platform web */\n gridColumnGap?: string;\n /** @platform web */\n gridColumnStart?: string;\n /** @platform web */\n gridRowEnd?: string;\n /** @platform web */\n gridRowGap?: string;\n /** @platform web */\n gridRowStart?: string;\n /** @platform web */\n gridTemplateColumns?: string;\n /** @platform web */\n gridTemplateRows?: string;\n /** @platform web */\n gridTemplateAreas?: string;\n /** @platform web */\n outline?: string;\n /** @platform web */\n outlineColor?: string;\n /** @platform web */\n overflowX?: string;\n /** @platform web */\n overflowY?: string;\n /** @platform web */\n overscrollBehavior?: 'auto' | 'contain' | 'none';\n /** @platform web */\n overscrollBehaviorX?: 'auto' | 'contain' | 'none';\n /** @platform web */\n overscrollBehaviorY?: 'auto' | 'contain' | 'none';\n /** @platform web */\n perspective?: string;\n /** @platform web */\n perspectiveOrigin?: string;\n /** @platform web */\n touchAction?: string;\n /** @platform web */\n transformOrigin?: string;\n /** @platform web */\n transitionDelay?: string;\n /** @platform web */\n transitionDuration?: string;\n /** @platform web */\n transitionProperty?: string;\n /** @platform web */\n transitionTimingFunction?: string;\n /** @platform web */\n userSelect?: string;\n /** @platform web */\n visibility?: string;\n /** @platform web */\n willChange?: string;\n /** @platform web */\n position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';\n}\n\nexport type ViewStyle = Omit<NativeViewStyle, 'position'> & WebViewStyle;\n\nexport type WebViewProps = {\n style?: StyleProp<ViewStyle>;\n\n accessibilityRole?:\n | 'list'\n | 'listitem'\n | 'complementary'\n | 'contentinfo'\n | 'region'\n | 'navigation'\n | 'main'\n | 'article'\n | 'banner'\n | AccessibilityRole;\n};\n\nexport type ViewProps = WebViewProps & Omit<NativeViewProps, 'style' | 'accessibilityRole'>;\n\nlet View = NativeView as ComponentType<ViewProps>;\n\nif (process.env.NODE_ENV !== 'production') {\n // Add better errors and warnings in development builds.\n View = createDevView(NativeView) as ComponentType<ViewProps>;\n}\n\nexport default createSafeStyledView(View) as ComponentType<ViewProps>;\n"]}
1
+ {"version":3,"file":"View.js","sourceRoot":"","sources":["../../src/primitives/View.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,IAAI,UAAU,EAAgC,MAAM,cAAc,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AA8HnE,IAAI,IAAI,GAAG,UAAsC,CAAC;AAElD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,wDAAwD;IACxD,IAAI,GAAG,aAAa,CAAC,UAAU,CAA6B,CAAC;CAC9D;AAED,eAAe,oBAAoB,CAAC,IAAI,CAA6B,CAAC","sourcesContent":["import { ClassAttributes, ComponentProps, ComponentType } from 'react';\nimport { StyleProp, View as NativeView, ViewStyle as NativeViewStyle } from 'react-native';\n\nimport { createDevView } from './createDevView';\nimport { createSafeStyledView } from '../css/createSafeStyledView';\n\n// https://github.com/necolas/react-native-web/issues/832\n\ntype NativeViewProps = ComponentProps<typeof NativeView> & ClassAttributes<typeof NativeView>;\n\n/**\n * https://baconbrix.gitbook.io/react-native-web/primitives/view\n */\nexport interface WebViewStyle {\n /** @platform web */\n backdropFilter?: string;\n /** @platform web */\n animationDelay?: string;\n /** @platform web */\n animationDirection?: string;\n /** @platform web */\n animationDuration?: string;\n /** @platform web */\n animationFillMode?: string;\n /** @platform web */\n animationName?: string | any[];\n /** @platform web */\n animationIterationCount?: number | 'infinite';\n /** @platform web */\n animationPlayState?: string;\n /** @platform web */\n animationTimingFunction?: string;\n /** @platform web */\n backgroundAttachment?: string;\n /** @platform web */\n backgroundBlendMode?: string;\n /** @platform web */\n backgroundClip?: string;\n /** @platform web */\n backgroundImage?: string;\n /** @platform web */\n backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box';\n /** @platform web */\n backgroundPosition?: string;\n /** @platform web */\n backgroundRepeat?: string;\n /** @platform web */\n backgroundSize?: string;\n /** @platform web */\n boxShadow?: string;\n /** @platform web */\n boxSizing?: string;\n /** @platform web */\n clip?: string;\n /** @platform web */\n cursor?: string;\n /** @platform web */\n filter?: string;\n /** @platform web */\n gridAutoColumns?: string;\n /** @platform web */\n gridAutoFlow?: string;\n /** @platform web */\n gridAutoRows?: string;\n /** @platform web */\n gridColumnEnd?: string;\n /** @platform web */\n gridColumnGap?: string;\n /** @platform web */\n gridColumnStart?: string;\n /** @platform web */\n gridRowEnd?: string;\n /** @platform web */\n gridRowGap?: string;\n /** @platform web */\n gridRowStart?: string;\n /** @platform web */\n gridTemplateColumns?: string;\n /** @platform web */\n gridTemplateRows?: string;\n /** @platform web */\n gridTemplateAreas?: string;\n /** @platform web */\n outline?: string;\n /** @platform web */\n outlineColor?: string;\n /** @platform web */\n overflowX?: string;\n /** @platform web */\n overflowY?: string;\n /** @platform web */\n overscrollBehavior?: 'auto' | 'contain' | 'none';\n /** @platform web */\n overscrollBehaviorX?: 'auto' | 'contain' | 'none';\n /** @platform web */\n overscrollBehaviorY?: 'auto' | 'contain' | 'none';\n /** @platform web */\n perspective?: string;\n /** @platform web */\n perspectiveOrigin?: string;\n /** @platform web */\n touchAction?: string;\n /** @platform web */\n transformOrigin?: string;\n /** @platform web */\n transitionDelay?: string;\n /** @platform web */\n transitionDuration?: string;\n /** @platform web */\n transitionProperty?: string;\n /** @platform web */\n transitionTimingFunction?: string;\n /** @platform web */\n userSelect?: string;\n /** @platform web */\n visibility?: string;\n /** @platform web */\n willChange?: string;\n /** @platform web */\n position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';\n}\n\nexport type ViewStyle = Omit<NativeViewStyle, 'position'> & WebViewStyle;\n\nexport type WebViewProps = {\n style?: StyleProp<ViewStyle>;\n};\n\nexport type ViewProps = WebViewProps & Omit<NativeViewProps, 'style'>;\n\nlet View = NativeView as ComponentType<ViewProps>;\n\nif (process.env.NODE_ENV !== 'production') {\n // Add better errors and warnings in development builds.\n View = createDevView(NativeView) as ComponentType<ViewProps>;\n}\n\nexport default createSafeStyledView(View) as ComponentType<ViewProps>;\n"]}
@@ -11,10 +11,9 @@ function useChildren(inputChildren) {
11
11
  let message = `Invalid raw text as a child of View: "${child}"${child === '' ? ` [empty string]` : ''}.`;
12
12
  message += ' Wrap the text contents with a Text element or remove it.';
13
13
  console.warn(message);
14
- children.push(React.createElement(Text, { style: [StyleSheet.absoluteFill, styles.error] },
15
- "Unwrapped text: \"",
16
- React.createElement(Text, { style: { fontWeight: 'bold' } }, child),
17
- "\""));
14
+ children.push(<Text style={[StyleSheet.absoluteFill, styles.error]}>
15
+ Unwrapped text: "<Text style={{ fontWeight: 'bold' }}>{child}</Text>"
16
+ </Text>);
18
17
  }
19
18
  else if ('type' in child && typeof child?.type === 'string' && Platform.OS !== 'web') {
20
19
  // Disallow untransformed react-dom elements on native.
@@ -30,7 +29,7 @@ function useChildren(inputChildren) {
30
29
  /** Extend a view with a `children` filter that asserts more helpful warnings/errors. */
31
30
  export function createDevView(View) {
32
31
  return React.forwardRef(({ children, ...props }, forwardedRef) => {
33
- return React.createElement(View, { ref: forwardedRef, ...props, children: useChildren(children) });
32
+ return <View ref={forwardedRef} {...props} children={useChildren(children)}/>;
34
33
  });
35
34
  }
36
35
  const styles = StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"file":"createDevView.js","sourceRoot":"","sources":["../../src/primitives/createDevView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1D,SAAS,WAAW,CAAC,aAA8B;IACjD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,MAAM,QAAQ,GAAsB,EAAE,CAAC;QACvC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;YAC9C,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;aAChD;iBAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBACjE,iCAAiC;gBACjC,IAAI,OAAO,GAAG,yCAAyC,KAAK,IAC1D,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EACrC,GAAG,CAAC;gBACJ,OAAO,IAAI,2DAA2D,CAAC;gBACvE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACtB,QAAQ,CAAC,IAAI,CACX,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC;;oBACjC,oBAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,IAAG,KAAK,CAAQ;yBAC/D,CACR,CAAC;aACH;iBAAM,IAAI,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,EAAE,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;gBACtF,uDAAuD;gBACvD,MAAM,IAAI,KAAK,CAAC,yCAAyC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;aAC3E;iBAAM;gBACL,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACtB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;AACtB,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAyC,IAAW;IAC/E,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAO,EAAE,YAA8B,EAAE,EAAE;QACtF,OAAO,oBAAC,IAAI,IAAC,GAAG,EAAE,YAAY,KAAM,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAI,CAAC;IACjF,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,eAAe,EAAE,WAAW;QAC5B,KAAK,EAAE,OAAO;KACf;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Platform, StyleSheet, Text } from 'react-native';\n\nfunction useChildren(inputChildren: React.ReactNode) {\n return React.useMemo(() => {\n const children: React.ReactNode[] = [];\n React.Children.forEach(inputChildren, (child) => {\n if (child == null || typeof child === 'boolean') {\n } else if (typeof child === 'string' || typeof child === 'number') {\n // Wrap text in a Text component.\n let message = `Invalid raw text as a child of View: \"${child}\"${\n child === '' ? ` [empty string]` : ''\n }.`;\n message += ' Wrap the text contents with a Text element or remove it.';\n console.warn(message);\n children.push(\n <Text style={[StyleSheet.absoluteFill, styles.error]}>\n Unwrapped text: \"<Text style={{ fontWeight: 'bold' }}>{child}</Text>\"\n </Text>\n );\n } else if ('type' in child && typeof child?.type === 'string' && Platform.OS !== 'web') {\n // Disallow untransformed react-dom elements on native.\n throw new Error(`Using unsupported React DOM element: <${child.type} />`);\n } else {\n children.push(child);\n }\n });\n return children;\n }, [inputChildren]);\n}\n\n/** Extend a view with a `children` filter that asserts more helpful warnings/errors. */\nexport function createDevView<TView extends React.ComponentType<any>>(View: TView) {\n return React.forwardRef(({ children, ...props }: any, forwardedRef: React.Ref<TView>) => {\n return <View ref={forwardedRef} {...props} children={useChildren(children)} />;\n });\n}\n\nconst styles = StyleSheet.create({\n error: {\n backgroundColor: 'firebrick',\n color: 'white',\n },\n});\n"]}
1
+ {"version":3,"file":"createDevView.js","sourceRoot":"","sources":["../../src/primitives/createDevView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1D,SAAS,WAAW,CAAC,aAA8B;IACjD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,MAAM,QAAQ,GAAsB,EAAE,CAAC;QACvC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;YAC9C,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;aAChD;iBAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBACjE,iCAAiC;gBACjC,IAAI,OAAO,GAAG,yCAAyC,KAAK,IAC1D,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EACrC,GAAG,CAAC;gBACJ,OAAO,IAAI,2DAA2D,CAAC;gBACvE,OAAO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Sheet, Text } from 'react-native';\n\nfunction useChildren(inputChildren: React.ReactNode) {\n return React.useMemo(() => {\n const children: React.ReactNode[] = [];\n React.Children.forEach(inputChildren, (child) => {\n if (child == null || typeof child === 'boolean') {\n } else if (typeof child === 'string' || typeof child === 'number') {\n // Wrap text in a Text component.\n let message = `Invalid raw text as a child of View: \"${child}\"${\n child === '' ? ` [empty string]` : ''\n }.`;\n message += ' Wrap the text contents with a Text element or remove it.';\n console.warn(message);\n children.push(\n <Text style={[StyleSheet.absoluteFill, styles.error]}>\n Unwrapped text: \"<Text style={{ fontWeight: 'bold' }}>{child}</Text>\"\n </Text>\n );\n } else if ('type' in child && typeof child?.type === 'string' && Platform.OS !== 'web') {\n // Disallow untransformed react-dom elements on native.\n throw new Error(`Using unsupported React DOM element: <${child.type} />`);\n } else {\n children.push(child);\n }\n });\n return children;\n }, [inputChildren]);\n}\n\n/** Extend a view with a `children` filter that asserts more helpful warnings/errors. */\nexport function createDevView<TView extends React.ComponentType<any>>(View: TView) {\n return React.forwardRef(({ children, ...props }: any, forwardedRef: React.Ref<TView>) => {\n return <View ref={forwardedRef} {...props} children={useChildren(children)} />;\n });\n}\n\nconst styles = StyleSheet.create({\n error: {\n backgroundColor: 'firebrick',\n color: 'white',\n },\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/html-elements",
3
- "version": "0.6.2",
3
+ "version": "0.8.0",
4
4
  "description": "Universal semantic HTML React components for iOS, Android, web, and desktop",
5
5
  "main": "build/Elements.js",
6
6
  "types": "build/Elements.d.ts",
@@ -59,5 +59,5 @@
59
59
  "devDependencies": {
60
60
  "expo-module-scripts": "^3.0.0"
61
61
  },
62
- "gitHead": "79607a7325f47aa17c36d266100d09a4ff2cc544"
62
+ "gitHead": "3142a086578deffd8704a8f1b6f0f661527d836c"
63
63
  }
@@ -1,19 +0,0 @@
1
- import { ComponentType } from 'react';
2
- import { BlockQuoteProps, QuoteProps, TimeProps } from './Text.types';
3
- import { TextProps } from '../primitives/Text';
4
- export declare const P: ComponentType<TextProps>;
5
- export declare const B: ComponentType<TextProps>;
6
- export declare const S: ComponentType<TextProps>;
7
- export declare const Del: ComponentType<TextProps>;
8
- export declare const Strong: ComponentType<TextProps>;
9
- export declare const I: ComponentType<TextProps>;
10
- export declare const Q: ComponentType<QuoteProps>;
11
- export declare const BlockQuote: ComponentType<BlockQuoteProps>;
12
- export declare const EM: ComponentType<TextProps>;
13
- export declare const BR: ComponentType<TextProps>;
14
- export declare const Small: ComponentType<TextProps>;
15
- export declare const Mark: ComponentType<TextProps>;
16
- export declare const Code: ComponentType<TextProps>;
17
- export declare const Time: ComponentType<TimeProps>;
18
- export declare const Pre: ComponentType<TextProps>;
19
- //# sourceMappingURL=_Text.web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_Text.web.d.ts","sourceRoot":"","sources":["../../src/elements/_Text.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;AAIlD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,eAAO,MAAM,CAAC,0BAEgB,CAAC;AAE/B,eAAO,MAAM,CAAC,0BAEgB,CAAC;AAE/B,eAAO,MAAM,CAAC,0BAEgB,CAAC;AAE/B,eAAO,MAAM,GAAG,0BAEc,CAAC;AAE/B,eAAO,MAAM,MAAM,0BAEW,CAAC;AAE/B,eAAO,MAAM,CAAC,0BAEgB,CAAC;AAE/B,eAAO,MAAM,CAAC,2BAEiB,CAAC;AAEhC,eAAO,MAAM,UAAU,gCAEa,CAAC;AAErC,eAAO,MAAM,EAAE,0BAEe,CAAC;AAE/B,eAAO,MAAM,EAAE,0BAEe,CAAC;AAE/B,eAAO,MAAM,KAAK,0BAEY,CAAC;AAE/B,eAAO,MAAM,IAAI,0BAEa,CAAC;AAE/B,eAAO,MAAM,IAAI,0BAEa,CAAC;AAE/B,eAAO,MAAM,IAAI,0BAEa,CAAC;AAE/B,eAAO,MAAM,GAAG,0BAEc,CAAC"}
@@ -1,63 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import { StyleSheet } from 'react-native';
3
- import createElement from 'react-native-web/dist/exports/createElement';
4
- export const P = forwardRef(({ style, ...props }, ref) => {
5
- return createElement('p', { ...props, style: [styles.reset, style], ref });
6
- });
7
- export const B = forwardRef(({ style, ...props }, ref) => {
8
- return createElement('b', { ...props, style: [styles.reset, style], ref });
9
- });
10
- export const S = forwardRef(({ style, ...props }, ref) => {
11
- return createElement('s', { ...props, style: [styles.reset, style], ref });
12
- });
13
- export const Del = forwardRef(({ style, ...props }, ref) => {
14
- return createElement('del', { ...props, style: [styles.reset, style], ref });
15
- });
16
- export const Strong = forwardRef(({ style, ...props }, ref) => {
17
- return createElement('strong', { ...props, style: [styles.reset, style], ref });
18
- });
19
- export const I = forwardRef(({ style, ...props }, ref) => {
20
- return createElement('i', { ...props, style: [styles.reset, style], ref });
21
- });
22
- export const Q = forwardRef(({ style, ...props }, ref) => {
23
- return createElement('q', { ...props, style: [styles.reset, style], ref });
24
- });
25
- export const BlockQuote = forwardRef(({ style, ...props }, ref) => {
26
- return createElement('blockquote', { ...props, style: [styles.reset, style], ref });
27
- });
28
- export const EM = forwardRef(({ style, ...props }, ref) => {
29
- return createElement('em', { ...props, style: [styles.reset, style], ref });
30
- });
31
- export const BR = forwardRef((props, ref) => {
32
- return createElement('br', { ...props, ref });
33
- });
34
- export const Small = forwardRef(({ style, ...props }, ref) => {
35
- return createElement('small', { ...props, style: [styles.reset, style], ref });
36
- });
37
- export const Mark = forwardRef(({ style, ...props }, ref) => {
38
- return createElement('mark', { ...props, style: [styles.reset, style], ref });
39
- });
40
- export const Code = forwardRef((props, ref) => {
41
- return createElement('code', { ...props, ref });
42
- });
43
- export const Time = forwardRef(({ style, ...props }, ref) => {
44
- return createElement('time', { ...props, style: [styles.reset, style], ref });
45
- });
46
- export const Pre = forwardRef(({ style, ...props }, ref) => {
47
- return createElement('pre', { ...props, style: [styles.reset, style], ref });
48
- });
49
- const styles = StyleSheet.create({
50
- reset: {
51
- fontFamily: 'System',
52
- color: '#000',
53
- border: '0 solid black',
54
- boxSizing: 'border-box',
55
- // @ts-ignore: inline is not supported
56
- display: 'inline',
57
- margin: 0,
58
- padding: 0,
59
- whiteSpace: 'pre-wrap',
60
- wordWrap: 'break-word',
61
- },
62
- });
63
- //# sourceMappingURL=_Text.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_Text.web.js","sourceRoot":"","sources":["../../src/elements/_Text.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,aAAa,MAAM,6CAA6C,CAAC;AAKxE,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa,EAAE,GAAG,EAAE,EAAE;IAClE,OAAO,aAAa,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7E,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa,EAAE,GAAG,EAAE,EAAE;IAClE,OAAO,aAAa,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7E,CAAC,CAA6B,CAAC;AAE/B,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa,EAAE,G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AU,EAAE,UAAU;QACtB,QAAQ,EAAE,YAAY;KACvB;CACF,CAAC,CAAC","sourcesContent":["import { ComponentType, forwardRef } from 'react';\nimport { StyleSheet } from 'react-native';\nimport createElement from 'react-native-web/dist/exports/createElement';\n\nimport { BlockQuoteProps, QuoteProps, TimeProps } from './Text.types';\nimport { TextProps } from '../primitives/Text';\n\nexport const P = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('p', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const B = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('b', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const S = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('s', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const Del = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('del', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const Strong = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('strong', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const I = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('i', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const Q = forwardRef(({ style, ...props }: QuoteProps, ref) => {\n return createElement('q', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<QuoteProps>;\n\nexport const BlockQuote = forwardRef(({ style, ...props }: BlockQuoteProps, ref) => {\n return createElement('blockquote', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<BlockQuoteProps>;\n\nexport const EM = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('em', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const BR = forwardRef((props: TextProps, ref) => {\n return createElement('br', { ...props, ref });\n}) as ComponentType<TextProps>;\n\nexport const Small = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('small', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const Mark = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('mark', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nexport const Code = forwardRef((props: TextProps, ref) => {\n return createElement('code', { ...props, ref });\n}) as ComponentType<TextProps>;\n\nexport const Time = forwardRef(({ style, ...props }: TimeProps, ref) => {\n return createElement('time', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TimeProps>;\n\nexport const Pre = forwardRef(({ style, ...props }: TextProps, ref) => {\n return createElement('pre', { ...props, style: [styles.reset, style], ref });\n}) as ComponentType<TextProps>;\n\nconst styles = StyleSheet.create({\n reset: {\n fontFamily: 'System',\n color: '#000',\n border: '0 solid black',\n boxSizing: 'border-box',\n // @ts-ignore: inline is not supported\n display: 'inline',\n margin: 0,\n padding: 0,\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n },\n});\n"]}