From e44e1373bcfed30d29eb15dae94c4375a14a4ee6 Mon Sep 17 00:00:00 2001 From: Amir Angel <36531255+17Amir17@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:36:55 +0200 Subject: [PATCH 1/2] fix: keyboard imports --- example/src/Examples/Basic.tsx | 10 +++++++--- example/src/Examples/Compose/ComposeRichText.tsx | 3 +-- .../Examples/CustomKeyboardExample/StickerKeyboard.tsx | 2 +- example/src/Examples/CustomKeyboardExample/index.tsx | 2 +- example/src/Examples/EditorStickToKeyboardExample.tsx | 10 +++++++--- .../Keyboard/{index.tsx => CustomKeyboard.tsx} | 0 src/RichText/Keyboard/index.ts | 3 +++ src/RichText/index.ts | 2 +- 8 files changed, 21 insertions(+), 11 deletions(-) rename src/RichText/Keyboard/{index.tsx => CustomKeyboard.tsx} (100%) create mode 100644 src/RichText/Keyboard/index.ts diff --git a/example/src/Examples/Basic.tsx b/example/src/Examples/Basic.tsx index 52232a7..0938f59 100644 --- a/example/src/Examples/Basic.tsx +++ b/example/src/Examples/Basic.tsx @@ -7,9 +7,13 @@ import { Platform, StyleSheet, } from 'react-native'; -import { RichText, Toolbar, useEditorBridge } from '@10play/tentap-editor'; -import { ColorKeyboard } from '../../../src/RichText/Keyboard/ColorKeyboard'; -import { CustomKeyboard } from '../../../src/RichText/Keyboard'; +import { + RichText, + Toolbar, + useEditorBridge, + ColorKeyboard, + CustomKeyboard, +} from '@10play/tentap-editor'; const exampleStyles = StyleSheet.create({ fullScreen: { diff --git a/example/src/Examples/Compose/ComposeRichText.tsx b/example/src/Examples/Compose/ComposeRichText.tsx index f3c29b6..d9b33f8 100644 --- a/example/src/Examples/Compose/ComposeRichText.tsx +++ b/example/src/Examples/Compose/ComposeRichText.tsx @@ -6,9 +6,8 @@ import { StyleSheet, TouchableOpacity, } from 'react-native'; +import { CustomKeyboard, ColorKeyboard } from '@10play/tentap-editor'; import { RichText, useBridgeState } from '../../../../src/RichText'; -import { CustomKeyboard } from '../../../../src/RichText/Keyboard'; -import { ColorKeyboard } from '../../../../src/RichText/Keyboard/ColorKeyboard'; import type { EditorBridge } from '../../../../src/types'; import { icons } from '../../assets'; import { Icon } from '../Icon'; diff --git a/example/src/Examples/CustomKeyboardExample/StickerKeyboard.tsx b/example/src/Examples/CustomKeyboardExample/StickerKeyboard.tsx index e39740d..774bdd6 100644 --- a/example/src/Examples/CustomKeyboardExample/StickerKeyboard.tsx +++ b/example/src/Examples/CustomKeyboardExample/StickerKeyboard.tsx @@ -1,6 +1,6 @@ import React from 'react'; +import { CustomKeyboardExtension } from '@10play/tentap-editor'; import { Image, StyleSheet, View } from 'react-native'; -import { CustomKeyboardExtension } from '../../../../src/RichText/Keyboard/CustomKeyboardExtension'; import { Images } from '../../../../src/assets'; const keyboardStyles = StyleSheet.create({ diff --git a/example/src/Examples/CustomKeyboardExample/index.tsx b/example/src/Examples/CustomKeyboardExample/index.tsx index 07cb710..7ee20e2 100644 --- a/example/src/Examples/CustomKeyboardExample/index.tsx +++ b/example/src/Examples/CustomKeyboardExample/index.tsx @@ -13,7 +13,7 @@ import { useEditorBridge, type ToolbarItem, } from '@10play/tentap-editor'; -import { CustomKeyboard } from '../../../../src/RichText/Keyboard'; +import { CustomKeyboard } from '../../../../src/RichText/Keyboard/CustomKeyboard'; import { StickerKeyboard } from './StickerKeyboard'; import { Images } from '../../../../src/assets'; diff --git a/example/src/Examples/EditorStickToKeyboardExample.tsx b/example/src/Examples/EditorStickToKeyboardExample.tsx index 48fc700..8f8a225 100644 --- a/example/src/Examples/EditorStickToKeyboardExample.tsx +++ b/example/src/Examples/EditorStickToKeyboardExample.tsx @@ -10,9 +10,13 @@ import { Text, ScrollView, } from 'react-native'; -import { RichText, Toolbar, useEditorBridge } from '@10play/tentap-editor'; -import { CustomKeyboard } from '../../../src/RichText/Keyboard'; -import { ColorKeyboard } from '../../../src/RichText/Keyboard/ColorKeyboard'; +import { + RichText, + Toolbar, + useEditorBridge, + CustomKeyboard, + ColorKeyboard, +} from '@10play/tentap-editor'; import WebView from 'react-native-webview'; const exampleStyles = StyleSheet.create({ diff --git a/src/RichText/Keyboard/index.tsx b/src/RichText/Keyboard/CustomKeyboard.tsx similarity index 100% rename from src/RichText/Keyboard/index.tsx rename to src/RichText/Keyboard/CustomKeyboard.tsx diff --git a/src/RichText/Keyboard/index.ts b/src/RichText/Keyboard/index.ts new file mode 100644 index 0000000..3bda314 --- /dev/null +++ b/src/RichText/Keyboard/index.ts @@ -0,0 +1,3 @@ +export { CustomKeyboard } from './CustomKeyboard'; +export { ColorKeyboard } from './ColorKeyboard'; +export { CustomKeyboardExtension } from './CustomKeyboardExtension'; diff --git a/src/RichText/index.ts b/src/RichText/index.ts index 0ba9be4..d3762d2 100644 --- a/src/RichText/index.ts +++ b/src/RichText/index.ts @@ -2,4 +2,4 @@ export * from './RichText'; export * from './useEditorBridge'; export * from './useBridgeState'; export * from './Toolbar'; -export * from './Keyboard/CustomKeyboard.ios'; +export * from './Keyboard'; From fbdd71635089d10ea62bd501acb4b7b759329eea Mon Sep 17 00:00:00 2001 From: Amir Angel <36531255+17Amir17@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:41:10 +0200 Subject: [PATCH 2/2] fix: import name --- example/src/Examples/CustomKeyboardExample/index.tsx | 2 +- .../Keyboard/{CustomKeyboard.tsx => CustomKeyboardBase.tsx} | 0 src/RichText/Keyboard/index.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/RichText/Keyboard/{CustomKeyboard.tsx => CustomKeyboardBase.tsx} (100%) diff --git a/example/src/Examples/CustomKeyboardExample/index.tsx b/example/src/Examples/CustomKeyboardExample/index.tsx index 7ee20e2..db78398 100644 --- a/example/src/Examples/CustomKeyboardExample/index.tsx +++ b/example/src/Examples/CustomKeyboardExample/index.tsx @@ -13,7 +13,7 @@ import { useEditorBridge, type ToolbarItem, } from '@10play/tentap-editor'; -import { CustomKeyboard } from '../../../../src/RichText/Keyboard/CustomKeyboard'; +import { CustomKeyboard } from '../../../../src/RichText/Keyboard/CustomKeyboardBase'; import { StickerKeyboard } from './StickerKeyboard'; import { Images } from '../../../../src/assets'; diff --git a/src/RichText/Keyboard/CustomKeyboard.tsx b/src/RichText/Keyboard/CustomKeyboardBase.tsx similarity index 100% rename from src/RichText/Keyboard/CustomKeyboard.tsx rename to src/RichText/Keyboard/CustomKeyboardBase.tsx diff --git a/src/RichText/Keyboard/index.ts b/src/RichText/Keyboard/index.ts index 3bda314..37811bf 100644 --- a/src/RichText/Keyboard/index.ts +++ b/src/RichText/Keyboard/index.ts @@ -1,3 +1,3 @@ -export { CustomKeyboard } from './CustomKeyboard'; +export { CustomKeyboard } from './CustomKeyboardBase'; export { ColorKeyboard } from './ColorKeyboard'; export { CustomKeyboardExtension } from './CustomKeyboardExtension';