@planningcenter/chat-react-native 3.13.0-rc.2 → 3.13.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +2 -1
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +2 -1
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts.map +1 -1
- package/build/components/conversation/message_markdown.js +2 -1
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/display/spinner.js +2 -5
- package/build/components/display/spinner.js.map +1 -1
- package/build/utils/native_adapters/configuration.d.ts +3 -0
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +4 -0
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/native_adapters/index.d.ts +3 -2
- package/build/utils/native_adapters/index.d.ts.map +1 -1
- package/build/utils/native_adapters/index.js +3 -2
- package/build/utils/native_adapters/index.js.map +1 -1
- package/build/utils/native_adapters/linking.d.ts +7 -0
- package/build/utils/native_adapters/linking.d.ts.map +1 -0
- package/build/utils/native_adapters/linking.js +9 -0
- package/build/utils/native_adapters/linking.js.map +1 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.js +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
- package/package.json +2 -2
- package/src/components/conversation/attachments/expanded_link.tsx +2 -1
- package/src/components/conversation/attachments/generic_file_attachment.tsx +2 -1
- package/src/components/conversation/message_markdown.tsx +2 -1
- package/src/components/display/spinner.tsx +2 -5
- package/src/utils/native_adapters/configuration.ts +6 -0
- package/src/utils/native_adapters/index.ts +3 -2
- package/src/utils/native_adapters/linking.ts +11 -0
- package/src/vendor/tapestry/alias_tokens_color_map.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expanded_link.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,0CAA0C,EAAE,MAAM,2DAA2D,CAAA;
|
|
1
|
+
{"version":3,"file":"expanded_link.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,0CAA0C,EAAE,MAAM,2DAA2D,CAAA;AAItH,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,UAAU,EAAE,0CAA0C,CAAA;IACtD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,qBA8BA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Image,
|
|
2
|
+
import { Image, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import { useTheme } from '../../../hooks';
|
|
4
4
|
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
5
5
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
6
|
+
import { Linking } from '../../../utils';
|
|
6
7
|
export function ExpandedLink({ attachment, onMessageLongPress, }) {
|
|
7
8
|
const styles = useStyles();
|
|
8
9
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expanded_link.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"expanded_link.js","sourceRoot":"","sources":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leSheet, Text, View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { DenormalizedExpandedLinkAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { PlatformPressable } from '@react-navigation/elements'\nimport { Linking } from '../../../utils'\n\nexport function ExpandedLink({\n attachment,\n onMessageLongPress,\n}: {\n attachment: DenormalizedExpandedLinkAttachmentResource\n onMessageLongPress: () => void\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n const { attributes } = attachment\n const { url, title, description, imageUrl, imageHeight, imageWidth } = attributes\n\n const aspectRatio = imageWidth && imageHeight ? imageWidth / imageHeight : 1\n\n async function openUrl() {\n if (url) Linking.openURL(url)\n }\n\n return (\n <PlatformPressable\n style={styles.container}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n onPress={openUrl}\n onLongPress={onMessageLongPress}\n >\n {imageUrl && (\n <Image source={{ uri: imageUrl }} style={[styles.image, { aspectRatio }]} alt={title} />\n )}\n {(title || description) && (\n <View style={styles.textWrapper}>\n {title && <Text style={styles.title}>{title}</Text>}\n {description && <Text style={styles.description}>{description}</Text>}\n </View>\n )}\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {},\n image: {\n borderRadius: 8,\n width: '100%',\n },\n textWrapper: {\n gap: 4,\n padding: 8,\n },\n title: {\n fontSize: tokens.fontSizeSm,\n fontWeight: tokens.fontWeightMedium,\n color: colors.textColorDefaultPrimary,\n },\n description: {\n fontSize: tokens.fontSizeXs,\n color: colors.textColorDefaultPrimary,\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic_file_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;
|
|
1
|
+
{"version":3,"file":"generic_file_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAQjH,wBAAgB,qBAAqB,CAAC,EACpC,UAAU,EACV,4BAA4B,GAC7B,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;CAC1F,qBAiCA;AAwBD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,uJAWjD"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { AttachmentCard, AttachmentCardTitle } from './attachment_card';
|
|
4
4
|
import { Icon } from '../../display';
|
|
5
5
|
import { useTheme } from '../../../hooks';
|
|
6
6
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
7
7
|
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
8
|
+
import { Linking } from '../../../utils';
|
|
8
9
|
export function GenericFileAttachment({ attachment, onMessageAttachmentLongPress, }) {
|
|
9
10
|
const styles = useStyles();
|
|
10
11
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic_file_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"generic_file_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAA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2BAA2B,CAAA;IAC/C,IAAI,OAAO;QAAE,OAAO,2BAA2B,CAAA;IAC/C,IAAI,OAAO;QAAE,OAAO,2BAA2B,CAAA;IAC/C,IAAI,KAAK;QAAE,OAAO,yBAAyB,CAAA;IAC3C,OAAO,6BAA6B,CAAA;AACtC,CAAC","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { AttachmentCard, AttachmentCardTitle } from './attachment_card'\nimport { Icon } from '../../display'\nimport { useTheme } from '../../../hooks'\nimport { PlatformPressable } from '@react-navigation/elements'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Linking } from '../../../utils'\n\nexport function GenericFileAttachment({\n attachment,\n onMessageAttachmentLongPress,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n const { url, filename, contentType } = attachment.attributes\n const iconName = getAttachmentIconName(contentType)\n const fileTypeLabel = contentType === 'application/pdf' ? 'PDF' : 'file'\n\n async function handleDownload() {\n if (url) {\n // Open link in the default web browser\n Linking.openURL(url)\n }\n }\n\n return (\n <PlatformPressable\n onPress={handleDownload}\n onLongPress={() => onMessageAttachmentLongPress(attachment)}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n accessibilityRole=\"link\"\n accessibilityHint={`Press to open ${fileTypeLabel} in a browser. Long press for more options`}\n >\n <AttachmentCard>\n <View style={styles.container}>\n <View style={styles.stack}>\n <Icon name={iconName} style={styles.icon} />\n <AttachmentCardTitle>{filename}</AttachmentCardTitle>\n </View>\n </View>\n </AttachmentCard>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n gap: 4,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n stack: {\n gap: 4,\n flexDirection: 'row',\n alignItems: 'center',\n },\n icon: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n })\n}\n\nexport function getAttachmentIconName(type: string) {\n const isImage = type.startsWith('image/')\n const isVideo = type.startsWith('video/')\n const isAudio = type.startsWith('audio/')\n const isPdf = type === 'application/pdf'\n\n if (isImage) return 'general.outlinedImageFile'\n if (isVideo) return 'general.outlinedVideoFile'\n if (isAudio) return 'general.outlinedMusicFile'\n if (isPdf) return 'general.outlinedPdfFile'\n return 'general.outlinedGenericFile'\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_markdown.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"message_markdown.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,4BAyC9C"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
3
|
import { Text, TextInlineButton } from '../display';
|
|
4
4
|
import { parseSimpleMarkdown } from '../../utils/parse_simple_markdown';
|
|
5
|
+
import { Linking } from '../../utils/native_adapters';
|
|
5
6
|
export function MessageMarkdown({ text }) {
|
|
6
7
|
if (!text)
|
|
7
8
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_markdown.js","sourceRoot":"","sources":["../../../src/components/conversation/message_markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"message_markdown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AC,CAAC,CAAC,CACP,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAC7C,iBAAiB,CAAC,MAAM,CACxB,iBAAiB,CAAC,eAAe,CAEjC;gBAAA,CAAC,IAAI,CAAC,OAAO,CACf;cAAA,EAAE,gBAAgB,CAAC,CACpB,CAAA;gBACH;oBACE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAA;YAC9C,CAAC;QACH,CAAC,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;IAC5B,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;CAChC,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Text, TextInlineButton } from '../display'\nimport { parseSimpleMarkdown } from '../../utils/parse_simple_markdown'\nimport { Linking } from '../../utils/native_adapters'\n\ninterface Props {\n text: string\n}\n\nexport function MessageMarkdown({ text }: Props) {\n if (!text) return null\n\n // Skip markdown for excessively long messages for performance reasons\n if (text.length > 5000) return <Text>{text}</Text>\n\n const parsed = parseSimpleMarkdown(text)\n\n return (\n <Text>\n {parsed.map((part, i) => {\n switch (part.type) {\n case 'bold':\n return (\n <Text key={i} style={styles.bold}>\n {part.content}\n </Text>\n )\n case 'italic':\n return (\n <Text key={i} style={styles.italic}>\n {part.content}\n </Text>\n )\n case 'link':\n return (\n <TextInlineButton\n key={i}\n onPress={() => Linking.openURL(part.content)}\n accessibilityRole=\"link\"\n accessibilityHint=\"Opens browser\"\n >\n {part.content}\n </TextInlineButton>\n )\n default:\n return <Text key={i}>{part.content}</Text>\n }\n })}\n </Text>\n )\n}\n\nconst styles = StyleSheet.create({\n bold: { fontWeight: 'bold' },\n italic: { fontStyle: 'italic' },\n})\n"]}
|
|
@@ -24,7 +24,7 @@ export function Spinner({ size = 20, maxFontSizeMultiplier = PREVENT_SCALING_DEF
|
|
|
24
24
|
rotation.value = 0; // Reset rotation when Spinner unmounts
|
|
25
25
|
};
|
|
26
26
|
}, [rotation]);
|
|
27
|
-
return (<View style={
|
|
27
|
+
return (<View style={style}>
|
|
28
28
|
<Animated.View style={[styles.animatedContainer, animatedStyle]}>
|
|
29
29
|
<View style={styles.clipping}>
|
|
30
30
|
<View style={[styles.circle, styles.spinner]}/>
|
|
@@ -38,9 +38,6 @@ const useStyles = ({ maxFontSizeMultiplier, size }) => {
|
|
|
38
38
|
const fontScale = useFontScale({ maxFontSizeMultiplier });
|
|
39
39
|
const scalableSize = size * fontScale;
|
|
40
40
|
return StyleSheet.create({
|
|
41
|
-
container: {
|
|
42
|
-
opacity: 0.7,
|
|
43
|
-
},
|
|
44
41
|
animatedContainer: {
|
|
45
42
|
width: scalableSize,
|
|
46
43
|
height: scalableSize,
|
|
@@ -54,7 +51,7 @@ const useStyles = ({ maxFontSizeMultiplier, size }) => {
|
|
|
54
51
|
borderWidth: 3,
|
|
55
52
|
},
|
|
56
53
|
spinner: {
|
|
57
|
-
borderColor: colors.
|
|
54
|
+
borderColor: colors.borderColorDefaultDarkest,
|
|
58
55
|
},
|
|
59
56
|
track: {
|
|
60
57
|
borderColor: colors.fillColorNeutral050Base,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AACrE,OAAO,QAAQ,EAAE,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,MAAM,G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AAE,GAAG;SACZ;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useEffect } from 'react'\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withRepeat,\n withTiming,\n Easing,\n} from 'react-native-reanimated'\nimport { useFontScale, useTheme } from '../../hooks'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst PREVENT_SCALING_DEFAULT = 1\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface SpinnerProps {\n /**\n * Size of the spinner in px\n * */\n size?: number\n /**\n * Specifies the maximum size spinner can scale to if the device's font-size is increased.\n */\n maxFontSizeMultiplier?: number\n /**\n * Style to apply to the spinner\n */\n style?: StyleProp<ViewStyle>\n}\n\nexport function Spinner({\n size = 20,\n maxFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n style,\n}: SpinnerProps) {\n const styles = useStyles({ maxFontSizeMultiplier, size })\n\n const rotation = useSharedValue(0)\n const animatedStyle = useAnimatedStyle(() => {\n return {\n transform: [{ rotate: `${rotation.value}deg` }],\n }\n })\n\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, {\n duration: 1000,\n easing: Easing.linear,\n }),\n -1 // loops animation infinitely\n )\n\n return () => {\n rotation.value = 0 // Reset rotation when Spinner unmounts\n }\n }, [rotation])\n\n return (\n <View style={style}>\n <Animated.View style={[styles.animatedContainer, animatedStyle]}>\n <View style={styles.clipping}>\n <View style={[styles.circle, styles.spinner]} />\n </View>\n <View style={[styles.circle, styles.track]} />\n </Animated.View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\ninterface Styles {\n maxFontSizeMultiplier: number | undefined\n size: number\n}\n\nconst useStyles = ({ maxFontSizeMultiplier, size }: Styles) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier })\n const scalableSize = size * fontScale\n\n return StyleSheet.create({\n animatedContainer: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n },\n circle: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n borderStyle: 'solid',\n borderWidth: 3,\n },\n spinner: {\n borderColor: colors.borderColorDefaultDarkest,\n },\n track: {\n borderColor: colors.fillColorNeutral050Base,\n },\n clipping: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: scalableSize / 2,\n height: scalableSize / 2,\n overflow: 'hidden',\n zIndex: 200,\n },\n })\n}\n"]}
|
|
@@ -3,12 +3,14 @@ import { AudioAdapter } from './audio';
|
|
|
3
3
|
import { ClipboardAdapter } from './clipboard';
|
|
4
4
|
import { ImagePickerAdapter } from './image_picker';
|
|
5
5
|
import { VideoAdapter } from './video';
|
|
6
|
+
import { LinkingAdapter } from './linking';
|
|
6
7
|
type ChatConfigurations = {
|
|
7
8
|
clipboard: ClipboardAdapter;
|
|
8
9
|
audio: AudioAdapter;
|
|
9
10
|
video: VideoAdapter;
|
|
10
11
|
imagePicker: ImagePickerAdapter;
|
|
11
12
|
log?: LogAdapter;
|
|
13
|
+
linking?: LinkingAdapter;
|
|
12
14
|
};
|
|
13
15
|
export declare class ChatAdapters {
|
|
14
16
|
static configure(configurations: ChatConfigurations): void;
|
|
@@ -18,5 +20,6 @@ export declare let Audio: AudioAdapter;
|
|
|
18
20
|
export declare let Video: VideoAdapter;
|
|
19
21
|
export declare let ImagePicker: ImagePickerAdapter;
|
|
20
22
|
export declare let Log: LogAdapter;
|
|
23
|
+
export declare let Linking: LinkingAdapter;
|
|
21
24
|
export {};
|
|
22
25
|
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,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A;AAE7C,eAAO,IAAI,OAAO,EAAE,cAA8C,CAAA"}
|
|
@@ -3,6 +3,8 @@ import { AudioAdapter } from './audio';
|
|
|
3
3
|
import { ClipboardAdapter } from './clipboard';
|
|
4
4
|
import { ImagePickerAdapter } from './image_picker';
|
|
5
5
|
import { VideoAdapter } from './video';
|
|
6
|
+
import { Linking as RNLinking } from 'react-native';
|
|
7
|
+
import { LinkingAdapter } from './linking';
|
|
6
8
|
export class ChatAdapters {
|
|
7
9
|
static configure(configurations) {
|
|
8
10
|
Clipboard = configurations.clipboard;
|
|
@@ -10,6 +12,7 @@ export class ChatAdapters {
|
|
|
10
12
|
Video = configurations.video;
|
|
11
13
|
ImagePicker = configurations.imagePicker;
|
|
12
14
|
Log = configurations.log || new LogAdapter();
|
|
15
|
+
Linking = configurations.linking || new LinkingAdapter(RNLinking);
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
const methodMissing = () => {
|
|
@@ -45,4 +48,5 @@ export let ImagePicker = new ImagePickerAdapter({
|
|
|
45
48
|
},
|
|
46
49
|
});
|
|
47
50
|
export let Log = new LogAdapter();
|
|
51
|
+
export let Linking = new LinkingAdapter(RNLinking);
|
|
48
52
|
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU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AAC,CAAA;AAEF,MAAM,CAAC,IAAI,KAAK,GAAiB,IAAI,YAAY,CAAC;IAChD,MAAM,EAAE,MAAM,CAAC,MAAM,CACnB,GAAG,EAAE;QACH,aAAa,EAAE,CAAA;QACf,OAAO,IAAI,CAAA;IACb,CAAC,EACD,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAC9C;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,IAAI,WAAW,GAAuB,IAAI,kBAAkB,CAAC;IAClE,eAAe,EAAE,KAAK,IAAI,EAAE;QAC1B,aAAa,EAAE,CAAA;QACf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACzC,CAAC;IACD,qBAAqB,EAAE,KAAK,IAAI,EAAE;QAChC,aAAa,EAAE,CAAA;QACf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACzC,CAAC;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,IAAI,GAAG,GAAe,IAAI,UAAU,EAAE,CAAA;AAE7C,MAAM,CAAC,IAAI,OAAO,GAAmB,IAAI,cAAc,CAAC,SAAS,CAAC,CAAA","sourcesContent":["import { LogAdapter } from './log'\nimport { AudioAdapter } from './audio'\nimport { ClipboardAdapter } from './clipboard'\nimport { ImagePickerAdapter } from './image_picker'\nimport { VideoAdapter } from './video'\nimport { Linking as RNLinking } from 'react-native'\nimport { LinkingAdapter } from './linking'\n\ntype ChatConfigurations = {\n clipboard: ClipboardAdapter\n audio: AudioAdapter\n video: VideoAdapter\n imagePicker: ImagePickerAdapter\n log?: LogAdapter\n linking?: LinkingAdapter\n}\n\nexport class ChatAdapters {\n static configure(configurations: ChatConfigurations) {\n Clipboard = configurations.clipboard\n Audio = configurations.audio\n Video = configurations.video\n ImagePicker = configurations.imagePicker\n Log = configurations.log || new LogAdapter()\n Linking = configurations.linking || new LinkingAdapter(RNLinking)\n }\n}\n\nconst methodMissing = () => {\n console.warn('ChatAdapters.configure() must be called before using any adapters')\n}\n\nexport let Clipboard: ClipboardAdapter = new ClipboardAdapter({\n getStringAsync: async () => {\n methodMissing()\n return ''\n },\n setStringAsync: async (_: string) => methodMissing(),\n})\n\nexport let Audio: AudioAdapter = new AudioAdapter({\n useAudio: (_: string) => {\n methodMissing()\n return {} as any\n },\n})\n\nexport let Video: VideoAdapter = new VideoAdapter({\n Player: Object.assign(\n () => {\n methodMissing()\n return null\n },\n { $$typeof: Symbol.for('react.forward_ref') }\n ),\n})\n\nexport let ImagePicker: ImagePickerAdapter = new ImagePickerAdapter({\n openCameraAsync: async () => {\n methodMissing()\n return { canceled: true, assets: null }\n },\n openImageLibraryAsync: async () => {\n methodMissing()\n return { canceled: true, assets: null }\n },\n})\n\nexport let Log: LogAdapter = new LogAdapter()\n\nexport let Linking: LinkingAdapter = new LinkingAdapter(RNLinking)\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export * from './audio';
|
|
1
2
|
export * from './clipboard';
|
|
2
3
|
export * from './configuration';
|
|
3
|
-
export * from './audio';
|
|
4
4
|
export * from './image_picker';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './linking';
|
|
6
6
|
export * from './log';
|
|
7
|
+
export * from './video';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export * from './audio';
|
|
1
2
|
export * from './clipboard';
|
|
2
3
|
export * from './configuration';
|
|
3
|
-
export * from './audio';
|
|
4
4
|
export * from './image_picker';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './linking';
|
|
6
6
|
export * from './log';
|
|
7
|
+
export * from './video';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA","sourcesContent":["export * from './audio'\nexport * from './clipboard'\nexport * from './configuration'\nexport * from './image_picker'\nexport * from './linking'\nexport * from './log'\nexport * from './video'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linking.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/linking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,qBAAa,cAAc;IACzB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IAC3B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;gBAErB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,YAAY,CAAC;CAI7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linking.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/linking.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IACzB,OAAO,CAAoB;IAC3B,UAAU,CAAuB;IAEjC,YAAY,OAAgD;QAC1D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;IACtC,CAAC;CACF","sourcesContent":["import { Linking } from 'react-native'\n\nexport class LinkingAdapter {\n openURL: Linking['openURL']\n canOpenURL: Linking['canOpenURL']\n\n constructor(methods: Pick<Linking, 'openURL' | 'canOpenURL'>) {\n this.openURL = methods.openURL\n this.canOpenURL = methods.canOpenURL\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@ export declare const aliasTokensColorMap: {
|
|
|
4
4
|
readonly borderColorDefaultBase: string;
|
|
5
5
|
readonly borderColorDefaultDark: string;
|
|
6
6
|
readonly borderColorDefaultDarker: string;
|
|
7
|
+
readonly borderColorDefaultDarkest: string;
|
|
7
8
|
readonly borderColorDefaultDisabled: string;
|
|
8
9
|
readonly borderColorDefaultDim: string;
|
|
9
10
|
readonly borderColorDefaultWhite: string;
|
|
@@ -46,6 +47,7 @@ export declare const aliasTokensColorMap: {
|
|
|
46
47
|
readonly borderColorDefaultBase: string;
|
|
47
48
|
readonly borderColorDefaultDark: string;
|
|
48
49
|
readonly borderColorDefaultDarker: string;
|
|
50
|
+
readonly borderColorDefaultDarkest: string;
|
|
49
51
|
readonly borderColorDefaultDisabled: string;
|
|
50
52
|
readonly borderColorDefaultDim: string;
|
|
51
53
|
readonly borderColorDefaultWhite: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias_tokens_color_map.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/alias_tokens_color_map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alias_tokens_color_map.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/alias_tokens_color_map.ts"],"names":[],"mappings":"AAsJA,eAAO,MAAM,mBAAmB;;uBAlGxB,MAAM;yCACY,MAAM;yCACN,MAAM;2CACJ,MAAM;4CACL,MAAM;6CACL,MAAM;wCACX,MAAM;0CACJ,MAAM;0CACN,MAAM;4CACJ,MAAM;sCACZ,MAAM;2CACD,MAAM;2CACN,MAAM;2CACN,MAAM;0CACP,MAAM;4CACJ,MAAM;2CACP,MAAM;8CACH,MAAM;2CACT,MAAM;oDACG,MAAM;8CACZ,MAAM;6CACP,MAAM;sDACG,MAAM;uCACrB,MAAM;mCACV,MAAM;qCACJ,MAAM;kCACT,MAAM;kCACN,MAAM;kCACN,MAAM;kCACN,MAAM;sCAzEF,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;0CACF,MAAM;sCACV,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;8CACE,MAAM;;;uBAkC7B,MAAM;yCACY,MAAM;yCACN,MAAM;2CACJ,MAAM;4CACL,MAAM;6CACL,MAAM;wCACX,MAAM;0CACJ,MAAM;0CACN,MAAM;4CACJ,MAAM;sCACZ,MAAM;2CACD,MAAM;2CACN,MAAM;2CACN,MAAM;0CACP,MAAM;4CACJ,MAAM;2CACP,MAAM;8CACH,MAAM;2CACT,MAAM;oDACG,MAAM;8CACZ,MAAM;6CACP,MAAM;sDACG,MAAM;uCACrB,MAAM;mCACV,MAAM;qCACJ,MAAM;kCACT,MAAM;kCACN,MAAM;kCACN,MAAM;kCACN,MAAM;sCAzEF,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;0CACF,MAAM;sCACV,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;8CACE,MAAM;;CAuI3B,CAAA"}
|
|
@@ -32,6 +32,7 @@ const semanticAliasesLight = {
|
|
|
32
32
|
borderColorDefaultBase: neutralsLight.fillColorNeutral050Base,
|
|
33
33
|
borderColorDefaultDark: neutralsLight.fillColorNeutral040,
|
|
34
34
|
borderColorDefaultDarker: neutralsLight.fillColorNeutral020,
|
|
35
|
+
borderColorDefaultDarkest: neutralsLight.fillColorNeutral030,
|
|
35
36
|
borderColorDefaultDisabled: neutralsLight.fillColorNeutral050Base,
|
|
36
37
|
borderColorDefaultDim: neutralsLight.fillColorNeutral070,
|
|
37
38
|
borderColorDefaultWhite: neutralsLight.fillColorNeutral100Inverted,
|
|
@@ -63,6 +64,7 @@ const semanticAliasesDark = {
|
|
|
63
64
|
borderColorDefaultBase: neutralsDark.fillColorNeutral050Base,
|
|
64
65
|
borderColorDefaultDark: neutralsDark.fillColorNeutral040,
|
|
65
66
|
borderColorDefaultDarker: neutralsDark.fillColorNeutral020,
|
|
67
|
+
borderColorDefaultDarkest: neutralsDark.fillColorNeutral030,
|
|
66
68
|
borderColorDefaultDisabled: neutralsDark.fillColorNeutral050Base,
|
|
67
69
|
borderColorDefaultDim: neutralsDark.fillColorNeutral070,
|
|
68
70
|
borderColorDefaultWhite: neutralsDark.fillColorNeutral100Inverted,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias_tokens_color_map.js","sourceRoot":"","sources":["../../../src/vendor/tapestry/alias_tokens_color_map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAqBjC,MAAM,aAAa,GAAkB;IACnC,IAAI,EAAE,OAAO;IACb,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,uBAAuB,EAAE,MAAM,CAAC,cAAc;IAC9C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EA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AAE,YAAY,CAAC,mBAAmB;IAC7D,wBAAwB,EAAE,MAAM,CAAC,aAAa;IAC9C,iCAAiC,EAAE,MAAM,CAAC,6BAA6B;IACvE,2BAA2B,EAAE,MAAM,CAAC,+BAA+B;IACnE,0BAA0B,EAAE,MAAM,CAAC,0BAA0B;IAC7D,mCAAmC,EAAE,YAAY,CAAC,mBAAmB;IACrE,oBAAoB,EAAE,MAAM,CAAC,6BAA6B;IAC1D,gBAAgB,EAAE,YAAY,CAAC,2BAA2B;IAC1D,kBAAkB,EAAE,YAAY,CAAC,mBAAmB;IACpD,eAAe,EAAE,YAAY,CAAC,2BAA2B;IACzD,eAAe,EAAE,YAAY,CAAC,mBAAmB;IACjD,eAAe,EAAE,YAAY,CAAC,mBAAmB;IACjD,eAAe,EAAE,MAAM;CACxB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,oBAAoB,EAAE;IACpD,IAAI,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,mBAAmB,EAAE;CACzC,CAAA","sourcesContent":["import { tokens } from './tokens'\n\n// Copied from `@planningcenter/tapestry` package.\n// Defining these tokens locally is a temporary solution until the package supports mobile.\n// Tokens Reference: https://planningcenter.github.io/tapestry/?path=/docs/foundations-design-tokens--docs\n\ninterface NeutralColors {\n name: string\n fillColorNeutral000: string\n fillColorNeutral010: string\n fillColorNeutral020: string\n fillColorNeutral030: string\n fillColorNeutral040: string\n fillColorNeutral050Base: string\n fillColorNeutral060: string\n fillColorNeutral070: string\n fillColorNeutral080: string\n fillColorNeutral090: string\n fillColorNeutral100Inverted: string\n}\n\nconst neutralsLight: NeutralColors = {\n name: 'light',\n fillColorNeutral000: tokens.colorNeutral12,\n fillColorNeutral010: tokens.colorNeutral24,\n fillColorNeutral020: tokens.colorNeutral45,\n fillColorNeutral030: tokens.colorNeutral58,\n fillColorNeutral040: tokens.colorNeutral81,\n fillColorNeutral050Base: tokens.colorNeutral88,\n fillColorNeutral060: tokens.colorNeutral93,\n fillColorNeutral070: tokens.colorNeutral95,\n fillColorNeutral080: tokens.colorNeutral97,\n fillColorNeutral090: tokens.colorNeutral98,\n fillColorNeutral100Inverted: tokens.colorNeutral100White,\n} as const\n\nconst neutralsDark: NeutralColors = {\n name: 'dark',\n fillColorNeutral000: tokens.colorNeutral98,\n fillColorNeutral010: tokens.colorNeutral88,\n fillColorNeutral020: tokens.colorNeutral68,\n fillColorNeutral030: tokens.colorNeutral50,\n fillColorNeutral040: tokens.colorNeutral32,\n fillColorNeutral050Base: tokens.colorNeutral24,\n fillColorNeutral060: tokens.colorNeutral19,\n fillColorNeutral070: tokens.colorNeutral17,\n fillColorNeutral080: tokens.colorNeutral15,\n fillColorNeutral090: tokens.colorNeutral12,\n fillColorNeutral100Inverted: tokens.colorNeutral7,\n} as const\n\ninterface SemanticAliasesColors {\n name: string\n borderColorDefaultBase: string\n borderColorDefaultDark: string\n borderColorDefaultDarker: string\n borderColorDefaultDisabled: string\n borderColorDefaultDim: string\n borderColorDefaultWhite: string\n iconColorDefaultPrimary: string\n iconColorDefaultSecondary: string\n iconColorDefaultDim: string\n iconColorDefaultDisabled: string\n iconColorDefaultInverted: string\n textColorDefaultHeadline: string\n textColorDefaultPrimary: string\n textColorDefaultSecondary: string\n textColorDefaultDisabled: string\n textColorDefaultPlaceholder: string\n textColorDefaultInverted: string\n fillColorInteractionOnlineDefault: string\n fillColorInteractionDefault: string\n fillColorStatusErrorMedium: string\n fillColorButtonNeutralSolidDisabled: string\n androidRippleNeutral: string\n surfaceColorCard: string\n surfaceColorCanvas: string\n surfaceColor100: string\n surfaceColor090: string\n surfaceColor080: string\n needsDesignPass: string\n}\n\nconst semanticAliasesLight: SemanticAliasesColors = {\n name: 'light',\n borderColorDefaultBase: neutralsLight.fillColorNeutral050Base,\n borderColorDefaultDark: neutralsLight.fillColorNeutral040,\n borderColorDefaultDarker: neutralsLight.fillColorNeutral020,\n borderColorDefaultDisabled: neutralsLight.fillColorNeutral050Base,\n borderColorDefaultDim: neutralsLight.fillColorNeutral070,\n borderColorDefaultWhite: neutralsLight.fillColorNeutral100Inverted,\n iconColorDefaultPrimary: neutralsLight.fillColorNeutral010,\n iconColorDefaultSecondary: neutralsLight.fillColorNeutral020,\n iconColorDefaultDim: neutralsLight.fillColorNeutral030,\n iconColorDefaultDisabled: neutralsLight.fillColorNeutral040,\n iconColorDefaultInverted: neutralsLight.fillColorNeutral100Inverted,\n textColorDefaultHeadline: neutralsLight.fillColorNeutral000,\n textColorDefaultPrimary: neutralsLight.fillColorNeutral010,\n textColorDefaultSecondary: neutralsLight.fillColorNeutral020,\n textColorDefaultDisabled: neutralsLight.fillColorNeutral040,\n textColorDefaultPlaceholder: neutralsLight.fillColorNeutral030,\n textColorDefaultInverted: tokens.colorNeutral100White,\n fillColorInteractionOnlineDefault: tokens.colorInteractionOnlineDefault,\n fillColorInteractionDefault: tokens.fillColorInteractionDefault,\n fillColorStatusErrorMedium: tokens.fillColorStatusErrorMedium,\n fillColorButtonNeutralSolidDisabled: neutralsLight.fillColorNeutral070,\n androidRippleNeutral: tokens.fillColorTransparencyDark020,\n surfaceColorCard: neutralsLight.fillColorNeutral100Inverted,\n surfaceColorCanvas: neutralsLight.fillColorNeutral090,\n surfaceColor100: neutralsLight.fillColorNeutral100Inverted,\n surfaceColor090: neutralsLight.fillColorNeutral090,\n surfaceColor080: neutralsLight.fillColorNeutral080,\n needsDesignPass: 'hotpink',\n} as const\n\nconst semanticAliasesDark: SemanticAliasesColors = {\n name: 'dark',\n borderColorDefaultBase: neutralsDark.fillColorNeutral050Base,\n borderColorDefaultDark: neutralsDark.fillColorNeutral040,\n borderColorDefaultDarker: neutralsDark.fillColorNeutral020,\n borderColorDefaultDisabled: neutralsDark.fillColorNeutral050Base,\n borderColorDefaultDim: neutralsDark.fillColorNeutral070,\n borderColorDefaultWhite: neutralsDark.fillColorNeutral100Inverted,\n iconColorDefaultPrimary: neutralsDark.fillColorNeutral010,\n iconColorDefaultSecondary: neutralsDark.fillColorNeutral020,\n iconColorDefaultDim: neutralsDark.fillColorNeutral030,\n iconColorDefaultDisabled: neutralsDark.fillColorNeutral040,\n iconColorDefaultInverted: neutralsDark.fillColorNeutral100Inverted,\n textColorDefaultHeadline: neutralsDark.fillColorNeutral000,\n textColorDefaultPrimary: neutralsDark.fillColorNeutral010,\n textColorDefaultSecondary: neutralsDark.fillColorNeutral020,\n textColorDefaultDisabled: neutralsDark.fillColorNeutral040,\n textColorDefaultPlaceholder: neutralsDark.fillColorNeutral030,\n textColorDefaultInverted: tokens.colorNeutral7,\n fillColorInteractionOnlineDefault: tokens.colorInteractionOnlineDefault,\n fillColorInteractionDefault: tokens.fillColorInteractionDefaultDark,\n fillColorStatusErrorMedium: tokens.fillColorStatusErrorMedium,\n fillColorButtonNeutralSolidDisabled: neutralsDark.fillColorNeutral070,\n androidRippleNeutral: tokens.fillColorTransparencyLight020,\n surfaceColorCard: neutralsDark.fillColorNeutral100Inverted,\n surfaceColorCanvas: neutralsDark.fillColorNeutral090,\n surfaceColor100: neutralsDark.fillColorNeutral100Inverted,\n surfaceColor090: neutralsDark.fillColorNeutral090,\n surfaceColor080: neutralsDark.fillColorNeutral080,\n needsDesignPass: 'pink',\n}\n\nexport const aliasTokensColorMap = {\n light: { ...neutralsLight, ...semanticAliasesLight },\n dark: { ...neutralsDark, ...semanticAliasesDark },\n} as const\n"]}
|
|
1
|
+
{"version":3,"file":"alias_tokens_color_map.js","sourceRoot":"","sources":["../../../src/vendor/tapestry/alias_tokens_color_map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAqBjC,MAAM,aAAa,GAAkB;IACnC,IAAI,EAAE,OAAO;IACb,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC,cAAc;IAC1C,mBAAmB,EAAE,MAAM,CAAC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IAC3D,mBAAmB,EAAE,YAAY,CAAC,mBAAmB;IACrD,wBAAwB,EAAE,YAAY,CAAC,mBAAmB;IAC1D,wBAAwB,EAAE,YAAY,CAAC,2BAA2B;IAClE,wBAAwB,EAAE,YAAY,CAAC,mBAAmB;IAC1D,uBAAuB,EAAE,YAAY,CAAC,mBAAmB;IACzD,yBAAyB,EAAE,YAAY,CAAC,mBAAmB;IAC3D,wBAAwB,EAAE,YAAY,CAAC,mBAAmB;IAC1D,2BAA2B,EAAE,YAAY,CAAC,mBAAmB;IAC7D,wBAAwB,EAAE,MAAM,CAAC,aAAa;IAC9C,iCAAiC,EAAE,MAAM,CAAC,6BAA6B;IACvE,2BAA2B,EAAE,MAAM,CAAC,+BAA+B;IACnE,0BAA0B,EAAE,MAAM,CAAC,0BAA0B;IAC7D,mCAAmC,EAAE,YAAY,CAAC,mBAAmB;IACrE,oBAAoB,EAAE,MAAM,CAAC,6BAA6B;IAC1D,gBAAgB,EAAE,YAAY,CAAC,2BAA2B;IAC1D,kBAAkB,EAAE,YAAY,CAAC,mBAAmB;IACpD,eAAe,EAAE,YAAY,CAAC,2BAA2B;IACzD,eAAe,EAAE,YAAY,CAAC,mBAAmB;IACjD,eAAe,EAAE,YAAY,CAAC,mBAAmB;IACjD,eAAe,EAAE,MAAM;CACxB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,oBAAoB,EAAE;IACpD,IAAI,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,mBAAmB,EAAE;CACzC,CAAA","sourcesContent":["import { tokens } from './tokens'\n\n// Copied from `@planningcenter/tapestry` package.\n// Defining these tokens locally is a temporary solution until the package supports mobile.\n// Tokens Reference: https://planningcenter.github.io/tapestry/?path=/docs/foundations-design-tokens--docs\n\ninterface NeutralColors {\n name: string\n fillColorNeutral000: string\n fillColorNeutral010: string\n fillColorNeutral020: string\n fillColorNeutral030: string\n fillColorNeutral040: string\n fillColorNeutral050Base: string\n fillColorNeutral060: string\n fillColorNeutral070: string\n fillColorNeutral080: string\n fillColorNeutral090: string\n fillColorNeutral100Inverted: string\n}\n\nconst neutralsLight: NeutralColors = {\n name: 'light',\n fillColorNeutral000: tokens.colorNeutral12,\n fillColorNeutral010: tokens.colorNeutral24,\n fillColorNeutral020: tokens.colorNeutral45,\n fillColorNeutral030: tokens.colorNeutral58,\n fillColorNeutral040: tokens.colorNeutral81,\n fillColorNeutral050Base: tokens.colorNeutral88,\n fillColorNeutral060: tokens.colorNeutral93,\n fillColorNeutral070: tokens.colorNeutral95,\n fillColorNeutral080: tokens.colorNeutral97,\n fillColorNeutral090: tokens.colorNeutral98,\n fillColorNeutral100Inverted: tokens.colorNeutral100White,\n} as const\n\nconst neutralsDark: NeutralColors = {\n name: 'dark',\n fillColorNeutral000: tokens.colorNeutral98,\n fillColorNeutral010: tokens.colorNeutral88,\n fillColorNeutral020: tokens.colorNeutral68,\n fillColorNeutral030: tokens.colorNeutral50,\n fillColorNeutral040: tokens.colorNeutral32,\n fillColorNeutral050Base: tokens.colorNeutral24,\n fillColorNeutral060: tokens.colorNeutral19,\n fillColorNeutral070: tokens.colorNeutral17,\n fillColorNeutral080: tokens.colorNeutral15,\n fillColorNeutral090: tokens.colorNeutral12,\n fillColorNeutral100Inverted: tokens.colorNeutral7,\n} as const\n\ninterface SemanticAliasesColors {\n name: string\n borderColorDefaultBase: string\n borderColorDefaultDark: string\n borderColorDefaultDarker: string\n borderColorDefaultDarkest: string\n borderColorDefaultDisabled: string\n borderColorDefaultDim: string\n borderColorDefaultWhite: string\n iconColorDefaultPrimary: string\n iconColorDefaultSecondary: string\n iconColorDefaultDim: string\n iconColorDefaultDisabled: string\n iconColorDefaultInverted: string\n textColorDefaultHeadline: string\n textColorDefaultPrimary: string\n textColorDefaultSecondary: string\n textColorDefaultDisabled: string\n textColorDefaultPlaceholder: string\n textColorDefaultInverted: string\n fillColorInteractionOnlineDefault: string\n fillColorInteractionDefault: string\n fillColorStatusErrorMedium: string\n fillColorButtonNeutralSolidDisabled: string\n androidRippleNeutral: string\n surfaceColorCard: string\n surfaceColorCanvas: string\n surfaceColor100: string\n surfaceColor090: string\n surfaceColor080: string\n needsDesignPass: string\n}\n\nconst semanticAliasesLight: SemanticAliasesColors = {\n name: 'light',\n borderColorDefaultBase: neutralsLight.fillColorNeutral050Base,\n borderColorDefaultDark: neutralsLight.fillColorNeutral040,\n borderColorDefaultDarker: neutralsLight.fillColorNeutral020,\n borderColorDefaultDarkest: neutralsLight.fillColorNeutral030,\n borderColorDefaultDisabled: neutralsLight.fillColorNeutral050Base,\n borderColorDefaultDim: neutralsLight.fillColorNeutral070,\n borderColorDefaultWhite: neutralsLight.fillColorNeutral100Inverted,\n iconColorDefaultPrimary: neutralsLight.fillColorNeutral010,\n iconColorDefaultSecondary: neutralsLight.fillColorNeutral020,\n iconColorDefaultDim: neutralsLight.fillColorNeutral030,\n iconColorDefaultDisabled: neutralsLight.fillColorNeutral040,\n iconColorDefaultInverted: neutralsLight.fillColorNeutral100Inverted,\n textColorDefaultHeadline: neutralsLight.fillColorNeutral000,\n textColorDefaultPrimary: neutralsLight.fillColorNeutral010,\n textColorDefaultSecondary: neutralsLight.fillColorNeutral020,\n textColorDefaultDisabled: neutralsLight.fillColorNeutral040,\n textColorDefaultPlaceholder: neutralsLight.fillColorNeutral030,\n textColorDefaultInverted: tokens.colorNeutral100White,\n fillColorInteractionOnlineDefault: tokens.colorInteractionOnlineDefault,\n fillColorInteractionDefault: tokens.fillColorInteractionDefault,\n fillColorStatusErrorMedium: tokens.fillColorStatusErrorMedium,\n fillColorButtonNeutralSolidDisabled: neutralsLight.fillColorNeutral070,\n androidRippleNeutral: tokens.fillColorTransparencyDark020,\n surfaceColorCard: neutralsLight.fillColorNeutral100Inverted,\n surfaceColorCanvas: neutralsLight.fillColorNeutral090,\n surfaceColor100: neutralsLight.fillColorNeutral100Inverted,\n surfaceColor090: neutralsLight.fillColorNeutral090,\n surfaceColor080: neutralsLight.fillColorNeutral080,\n needsDesignPass: 'hotpink',\n} as const\n\nconst semanticAliasesDark: SemanticAliasesColors = {\n name: 'dark',\n borderColorDefaultBase: neutralsDark.fillColorNeutral050Base,\n borderColorDefaultDark: neutralsDark.fillColorNeutral040,\n borderColorDefaultDarker: neutralsDark.fillColorNeutral020,\n borderColorDefaultDarkest: neutralsDark.fillColorNeutral030,\n borderColorDefaultDisabled: neutralsDark.fillColorNeutral050Base,\n borderColorDefaultDim: neutralsDark.fillColorNeutral070,\n borderColorDefaultWhite: neutralsDark.fillColorNeutral100Inverted,\n iconColorDefaultPrimary: neutralsDark.fillColorNeutral010,\n iconColorDefaultSecondary: neutralsDark.fillColorNeutral020,\n iconColorDefaultDim: neutralsDark.fillColorNeutral030,\n iconColorDefaultDisabled: neutralsDark.fillColorNeutral040,\n iconColorDefaultInverted: neutralsDark.fillColorNeutral100Inverted,\n textColorDefaultHeadline: neutralsDark.fillColorNeutral000,\n textColorDefaultPrimary: neutralsDark.fillColorNeutral010,\n textColorDefaultSecondary: neutralsDark.fillColorNeutral020,\n textColorDefaultDisabled: neutralsDark.fillColorNeutral040,\n textColorDefaultPlaceholder: neutralsDark.fillColorNeutral030,\n textColorDefaultInverted: tokens.colorNeutral7,\n fillColorInteractionOnlineDefault: tokens.colorInteractionOnlineDefault,\n fillColorInteractionDefault: tokens.fillColorInteractionDefaultDark,\n fillColorStatusErrorMedium: tokens.fillColorStatusErrorMedium,\n fillColorButtonNeutralSolidDisabled: neutralsDark.fillColorNeutral070,\n androidRippleNeutral: tokens.fillColorTransparencyLight020,\n surfaceColorCard: neutralsDark.fillColorNeutral100Inverted,\n surfaceColorCanvas: neutralsDark.fillColorNeutral090,\n surfaceColor100: neutralsDark.fillColorNeutral100Inverted,\n surfaceColor090: neutralsDark.fillColorNeutral090,\n surfaceColor080: neutralsDark.fillColorNeutral080,\n needsDesignPass: 'pink',\n}\n\nexport const aliasTokensColorMap = {\n light: { ...neutralsLight, ...semanticAliasesLight },\n dark: { ...neutralsDark, ...semanticAliasesDark },\n} as const\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "3.13.0-rc.
|
|
3
|
+
"version": "3.13.0-rc.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"react-native-url-polyfill": "^2.0.0",
|
|
56
56
|
"typescript": "<5.6.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "b3c6396dafcf5a073c936f1e923a474e74c8a61a"
|
|
59
59
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Image,
|
|
2
|
+
import { Image, StyleSheet, Text, View } from 'react-native'
|
|
3
3
|
import { useTheme } from '../../../hooks'
|
|
4
4
|
import { tokens } from '../../../vendor/tapestry/tokens'
|
|
5
5
|
import { DenormalizedExpandedLinkAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'
|
|
6
6
|
import { PlatformPressable } from '@react-navigation/elements'
|
|
7
|
+
import { Linking } from '../../../utils'
|
|
7
8
|
|
|
8
9
|
export function ExpandedLink({
|
|
9
10
|
attachment,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
3
|
import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'
|
|
4
4
|
import { AttachmentCard, AttachmentCardTitle } from './attachment_card'
|
|
5
5
|
import { Icon } from '../../display'
|
|
6
6
|
import { useTheme } from '../../../hooks'
|
|
7
7
|
import { PlatformPressable } from '@react-navigation/elements'
|
|
8
8
|
import { tokens } from '../../../vendor/tapestry/tokens'
|
|
9
|
+
import { Linking } from '../../../utils'
|
|
9
10
|
|
|
10
11
|
export function GenericFileAttachment({
|
|
11
12
|
attachment,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { StyleSheet } from 'react-native'
|
|
3
3
|
import { Text, TextInlineButton } from '../display'
|
|
4
4
|
import { parseSimpleMarkdown } from '../../utils/parse_simple_markdown'
|
|
5
|
+
import { Linking } from '../../utils/native_adapters'
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
text: string
|
|
@@ -63,7 +63,7 @@ export function Spinner({
|
|
|
63
63
|
}, [rotation])
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<View style={
|
|
66
|
+
<View style={style}>
|
|
67
67
|
<Animated.View style={[styles.animatedContainer, animatedStyle]}>
|
|
68
68
|
<View style={styles.clipping}>
|
|
69
69
|
<View style={[styles.circle, styles.spinner]} />
|
|
@@ -89,9 +89,6 @@ const useStyles = ({ maxFontSizeMultiplier, size }: Styles) => {
|
|
|
89
89
|
const scalableSize = size * fontScale
|
|
90
90
|
|
|
91
91
|
return StyleSheet.create({
|
|
92
|
-
container: {
|
|
93
|
-
opacity: 0.7,
|
|
94
|
-
},
|
|
95
92
|
animatedContainer: {
|
|
96
93
|
width: scalableSize,
|
|
97
94
|
height: scalableSize,
|
|
@@ -105,7 +102,7 @@ const useStyles = ({ maxFontSizeMultiplier, size }: Styles) => {
|
|
|
105
102
|
borderWidth: 3,
|
|
106
103
|
},
|
|
107
104
|
spinner: {
|
|
108
|
-
borderColor: colors.
|
|
105
|
+
borderColor: colors.borderColorDefaultDarkest,
|
|
109
106
|
},
|
|
110
107
|
track: {
|
|
111
108
|
borderColor: colors.fillColorNeutral050Base,
|
|
@@ -3,6 +3,8 @@ import { AudioAdapter } from './audio'
|
|
|
3
3
|
import { ClipboardAdapter } from './clipboard'
|
|
4
4
|
import { ImagePickerAdapter } from './image_picker'
|
|
5
5
|
import { VideoAdapter } from './video'
|
|
6
|
+
import { Linking as RNLinking } from 'react-native'
|
|
7
|
+
import { LinkingAdapter } from './linking'
|
|
6
8
|
|
|
7
9
|
type ChatConfigurations = {
|
|
8
10
|
clipboard: ClipboardAdapter
|
|
@@ -10,6 +12,7 @@ type ChatConfigurations = {
|
|
|
10
12
|
video: VideoAdapter
|
|
11
13
|
imagePicker: ImagePickerAdapter
|
|
12
14
|
log?: LogAdapter
|
|
15
|
+
linking?: LinkingAdapter
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export class ChatAdapters {
|
|
@@ -19,6 +22,7 @@ export class ChatAdapters {
|
|
|
19
22
|
Video = configurations.video
|
|
20
23
|
ImagePicker = configurations.imagePicker
|
|
21
24
|
Log = configurations.log || new LogAdapter()
|
|
25
|
+
Linking = configurations.linking || new LinkingAdapter(RNLinking)
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
|
|
@@ -63,3 +67,5 @@ export let ImagePicker: ImagePickerAdapter = new ImagePickerAdapter({
|
|
|
63
67
|
})
|
|
64
68
|
|
|
65
69
|
export let Log: LogAdapter = new LogAdapter()
|
|
70
|
+
|
|
71
|
+
export let Linking: LinkingAdapter = new LinkingAdapter(RNLinking)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Linking } from 'react-native'
|
|
2
|
+
|
|
3
|
+
export class LinkingAdapter {
|
|
4
|
+
openURL: Linking['openURL']
|
|
5
|
+
canOpenURL: Linking['canOpenURL']
|
|
6
|
+
|
|
7
|
+
constructor(methods: Pick<Linking, 'openURL' | 'canOpenURL'>) {
|
|
8
|
+
this.openURL = methods.openURL
|
|
9
|
+
this.canOpenURL = methods.canOpenURL
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -54,6 +54,7 @@ interface SemanticAliasesColors {
|
|
|
54
54
|
borderColorDefaultBase: string
|
|
55
55
|
borderColorDefaultDark: string
|
|
56
56
|
borderColorDefaultDarker: string
|
|
57
|
+
borderColorDefaultDarkest: string
|
|
57
58
|
borderColorDefaultDisabled: string
|
|
58
59
|
borderColorDefaultDim: string
|
|
59
60
|
borderColorDefaultWhite: string
|
|
@@ -86,6 +87,7 @@ const semanticAliasesLight: SemanticAliasesColors = {
|
|
|
86
87
|
borderColorDefaultBase: neutralsLight.fillColorNeutral050Base,
|
|
87
88
|
borderColorDefaultDark: neutralsLight.fillColorNeutral040,
|
|
88
89
|
borderColorDefaultDarker: neutralsLight.fillColorNeutral020,
|
|
90
|
+
borderColorDefaultDarkest: neutralsLight.fillColorNeutral030,
|
|
89
91
|
borderColorDefaultDisabled: neutralsLight.fillColorNeutral050Base,
|
|
90
92
|
borderColorDefaultDim: neutralsLight.fillColorNeutral070,
|
|
91
93
|
borderColorDefaultWhite: neutralsLight.fillColorNeutral100Inverted,
|
|
@@ -118,6 +120,7 @@ const semanticAliasesDark: SemanticAliasesColors = {
|
|
|
118
120
|
borderColorDefaultBase: neutralsDark.fillColorNeutral050Base,
|
|
119
121
|
borderColorDefaultDark: neutralsDark.fillColorNeutral040,
|
|
120
122
|
borderColorDefaultDarker: neutralsDark.fillColorNeutral020,
|
|
123
|
+
borderColorDefaultDarkest: neutralsDark.fillColorNeutral030,
|
|
121
124
|
borderColorDefaultDisabled: neutralsDark.fillColorNeutral050Base,
|
|
122
125
|
borderColorDefaultDim: neutralsDark.fillColorNeutral070,
|
|
123
126
|
borderColorDefaultWhite: neutralsDark.fillColorNeutral100Inverted,
|