react-native-enriched-markdown-scaffold 0.7.4-scaffold.8 → 1.0.2-scaffold.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -8
- package/ReactNativeEnrichedMarkdown.podspec +82 -73
- package/android/build.gradle +191 -1
- package/android/consumer-rules.pro +1 -1
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +9 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +3 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerDelegate.java +27 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerInterface.java +9 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +9 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +3 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp +75 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h +63 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +40 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +839 -23
- package/android/src/main/baseline-prof.txt +1 -1
- package/android/src/main/cpp/jni-adapter.cpp +74 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdown.kt +175 -11
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +50 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +48 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextLayoutManager.kt +10 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +42 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/MeasurementStore.kt +82 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/events/CopyPressEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputManager.kt +62 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputView.kt +911 -460
- package/android/src/main/java/com/swmansion/enriched/markdown/input/MarkdownClipboard.kt +42 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/BlockEditCoordinator.kt +196 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/ClipboardCoordinator.kt +73 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/EditContext.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/EditPipeline.kt +248 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/EditSession.kt +52 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/InputConnectionWrapper.kt +101 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/LinkCoordinator.kt +69 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/MarkdownTextWatcher.kt +3 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/MentionCoordinator.kt +118 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnChangeStateEvent.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnContextMenuItemPressEvent.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnInputKeyPressEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnPasteEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/BlockStore.kt +254 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/BlockSyntaxSentinel.kt +69 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/FormattingStore.kt +80 -87
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputFormatter.kt +109 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputParser.kt +180 -27
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/MarkdownSerializer.kt +167 -38
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/RangeEditAdjustment.kt +149 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputEventEmitter.kt +66 -5
- package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputMeasurementStore.kt +7 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/BlockRange.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/BlockType.kt +48 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/FormattingRange.kt +9 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/InputFormatterStyle.kt +39 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MathAtom.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MathChipStyle.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MutableRangeBounds.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputBulletSpan.kt +82 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputHeadingSpan.kt +58 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputListItemSpacingSpan.kt +37 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputOrderedListMarkerSpan.kt +63 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/BlockHandler.kt +54 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/HeadingBlockHandler.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/OrderedListBlockHandler.kt +38 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/UnorderedListBlockHandler.kt +37 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/toolbar/InputContextMenu.kt +8 -26
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/MarkdownASTNode.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/Parser.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockStyleContext.kt +9 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockquoteRenderer.kt +100 -12
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/CodeBlockRenderer.kt +16 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/HeadingRenderer.kt +4 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListContextManager.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListItemRenderer.kt +74 -18
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListRenderer.kt +43 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/NodeRenderer.kt +9 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SoftBreakRenderer.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SpanStyleCache.kt +30 -27
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/BaseListSpan.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt +174 -24
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBackgroundSpan.kt +27 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBlockSpan.kt +13 -16
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeSpan.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/EmphasisSpan.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ImageSpan.kt +182 -46
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ListItemSpacingSpan.kt +33 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ListMarkerAnchorSpan.kt +38 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/OrderedListSpan.kt +2 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/StrongSpan.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/TaskListSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/UnorderedListSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/BlockquoteStyle.kt +6 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/CodeBlockStyle.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ImageStyle.kt +7 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ListStyle.kt +4 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/StyleConfig.kt +13 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/TableStyle.kt +6 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/CodeBlockHighlighter.kt +90 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/CodeBlockNode.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/FeatureFlags.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownSegment.kt +9 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownViewManagerUtils.kt +33 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/ReadableMapExtensions.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/RenderedSegment.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/SegmentSignature.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/StreamingMarkdownFilter.kt +83 -5
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/serialization/MarkdownASTSerializer.kt +4 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/input/MarkdownStyleParser.kt +74 -44
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/input/PasteTextUtils.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/ImageCache.kt +26 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/ImageDownloader.kt +22 -9
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/LocalImageLoader.kt +161 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/extensions/TextPaintExtensions.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/interaction/CheckboxTouchHelper.kt +7 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/interaction/TaskListTapUtils.kt +41 -21
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/span/BlockSpacing.kt +15 -8
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/LinkLongPressMovementMethod.kt +58 -27
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionActionMode.kt +19 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt +388 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/ContextMenuPopup.kt +9 -6
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CopyGlyph.kt +101 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/TableContainerView.kt +32 -5
- package/android/src/main/jni/CMakeLists.txt +53 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownContainerShadowNode.cpp +10 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownContainerShadowNode.h +11 -2
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextShadowNode.cpp +10 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextShadowNode.h +12 -2
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextState.cpp +9 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextState.h +24 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/conversions.h +16 -0
- package/android/src/math/java/com/swmansion/enriched/markdown/input/math/MathChipControllerImpl.kt +21 -4
- package/android/src/math/java/com/swmansion/enriched/markdown/renderer/MathInlineRenderer.kt +7 -2
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathChipSpan.kt +1 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +2 -0
- package/cpp/highlight/CodeBlockHighlighter.cpp +284 -0
- package/cpp/highlight/CodeBlockHighlighter.hpp +66 -0
- package/cpp/highlight/CodeBlockLanguages.cpp +138 -0
- package/cpp/highlight/CodeBlockLanguages.hpp +25 -0
- package/cpp/highlight/HighlightGrammars.hpp +28 -0
- package/cpp/highlight/code_highlight_podspec.rb +211 -0
- package/cpp/highlight/gen-registry.mjs +155 -0
- package/cpp/highlight/grammar-versions.json +159 -0
- package/cpp/highlight/vendor/generated/generated_queries.h +1665 -0
- package/cpp/highlight/vendor/generated/generated_registry.cpp +59 -0
- package/cpp/parser/MD4CParser.cpp +173 -61
- package/cpp/parser/MD4CParser.hpp +1 -0
- package/cpp/parser/MarkdownASTNode.hpp +2 -1
- package/cpp/wasm/ASTSerializer.cpp +2 -0
- package/cpp/wasm/build.sh +1 -0
- package/cpp/wasm/md4c_wasm.cpp +3 -1
- package/docs/ACCESSIBILITY.md +14 -2
- package/docs/API_REFERENCE.md +231 -8
- package/docs/BREAKING_CHANGES.md +129 -0
- package/docs/CODE_HIGHLIGHT.md +133 -0
- package/docs/COPY_OPTIONS.md +21 -3
- package/docs/ELEMENTS_STRUCTURE.md +52 -4
- package/docs/IMAGE_CACHING.md +30 -0
- package/docs/INPUT.md +146 -5
- package/docs/LATEX_MATH.md +87 -45
- package/docs/MACOS.md +1 -1
- package/docs/MARKDOWN_STREAMING.md +27 -1
- package/docs/NATIVE_ASSETS.md +127 -0
- package/docs/RTL.md +1 -1
- package/docs/STYLES.md +46 -6
- package/docs/TESTING.md +112 -0
- package/docs/TEXT.md +16 -6
- package/docs/WEB.md +3 -1
- package/ios/EnrichedMarkdown.h +7 -0
- package/ios/EnrichedMarkdown.mm +262 -67
- package/ios/EnrichedMarkdownText.h +7 -0
- package/ios/EnrichedMarkdownText.mm +97 -68
- package/ios/attachments/ENRMImageAttachment.h +9 -0
- package/ios/attachments/ENRMImageAttachment.m +143 -40
- package/ios/attachments/ENRMMathInlineAttachment.h +2 -0
- package/ios/attachments/ENRMMathInlineAttachment.m +48 -81
- package/ios/attachments/ENRMMathInlineAttachmentShared.h +2 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.cpp +75 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.h +63 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +40 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +839 -23
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +131 -0
- package/ios/input/ENRMAutoLinkDetector.h +2 -1
- package/ios/input/ENRMAutoLinkDetector.mm +79 -41
- package/ios/input/ENRMBlockEditCoordinator.h +71 -0
- package/ios/input/ENRMBlockEditCoordinator.mm +195 -0
- package/ios/input/ENRMBlockRange.h +28 -0
- package/ios/input/ENRMBlockRange.mm +30 -0
- package/ios/input/ENRMBlockStore.h +56 -0
- package/ios/input/ENRMBlockStore.mm +275 -0
- package/ios/input/ENRMBlockSyntaxSentinel.h +25 -0
- package/ios/input/ENRMBlockSyntaxSentinel.mm +80 -0
- package/ios/input/ENRMClipboardCoordinator.h +45 -0
- package/ios/input/ENRMClipboardCoordinator.mm +120 -0
- package/ios/input/ENRMDetectorPipeline.h +2 -1
- package/ios/input/ENRMEditPipeline.h +76 -0
- package/ios/input/ENRMEditPipeline.mm +228 -0
- package/ios/input/ENRMEditSession.h +36 -0
- package/ios/input/ENRMEditSession.mm +63 -0
- package/ios/input/ENRMFormattingStore.h +17 -0
- package/ios/input/ENRMFormattingStore.mm +95 -105
- package/ios/input/ENRMInputBlockType.h +91 -0
- package/ios/input/ENRMInputBlockType.mm +5 -0
- package/ios/input/ENRMInputDecorationDrawer.h +18 -0
- package/ios/input/ENRMInputEventEmitter.h +56 -0
- package/ios/input/ENRMInputEventEmitter.mm +308 -0
- package/ios/input/ENRMInputFormatter.h +29 -69
- package/ios/input/ENRMInputFormatter.mm +216 -124
- package/ios/input/ENRMInputFormatterStyle.h +99 -0
- package/ios/input/ENRMInputFormatterStyle.mm +188 -0
- package/ios/input/ENRMInputLayoutManager.h +9 -0
- package/ios/input/ENRMInputLayoutManager.mm +30 -0
- package/ios/input/ENRMInputListMarkerDrawer.h +32 -0
- package/ios/input/ENRMInputListMarkerDrawer.mm +426 -0
- package/ios/input/ENRMInputParser.h +10 -6
- package/ios/input/ENRMInputParser.mm +527 -171
- package/ios/input/ENRMInputRemend.mm +2 -2
- package/ios/input/ENRMInputStyleStateBuilder.h +40 -0
- package/ios/input/ENRMInputStyleStateBuilder.mm +60 -0
- package/ios/input/ENRMInputTextView.mm +103 -8
- package/ios/input/ENRMInputTypingAttributesController.h +42 -0
- package/ios/input/ENRMInputTypingAttributesController.mm +203 -0
- package/ios/input/ENRMLinkCoordinator.h +41 -0
- package/ios/input/ENRMLinkCoordinator.mm +89 -0
- package/ios/input/ENRMMarkdownSerializer.h +29 -5
- package/ios/input/ENRMMarkdownSerializer.mm +170 -48
- package/ios/input/ENRMMathAtom.h +26 -0
- package/ios/input/ENRMMathAtom.mm +12 -0
- package/ios/input/ENRMMentionCoordinator.h +45 -0
- package/ios/input/ENRMMentionCoordinator.mm +167 -0
- package/ios/input/ENRMRangeEditAdjustment.h +38 -0
- package/ios/input/ENRMRangeEditAdjustment.mm +91 -0
- package/ios/input/ENRMRangeStoreUtils.h +39 -0
- package/ios/input/EnrichedMarkdownTextInput+ContextMenu.mm +6 -6
- package/ios/input/EnrichedMarkdownTextInput+Internal.h +11 -3
- package/ios/input/EnrichedMarkdownTextInput.h +7 -1
- package/ios/input/EnrichedMarkdownTextInput.mm +1104 -1024
- package/ios/input/InputStylePropsUtils.h +109 -68
- package/ios/input/internals/EnrichedMarkdownTextInputShadowNode.mm +2 -1
- package/ios/input/styles/ENRMBlockHandler.h +46 -0
- package/ios/input/styles/ENRMHeadingBlockHandler.h +15 -0
- package/ios/input/styles/ENRMHeadingBlockHandler.mm +38 -0
- package/ios/input/styles/ENRMOrderedListBlockHandler.h +14 -0
- package/ios/input/styles/ENRMOrderedListBlockHandler.mm +48 -0
- package/ios/input/styles/ENRMUnorderedListBlockHandler.h +15 -0
- package/ios/input/styles/ENRMUnorderedListBlockHandler.mm +51 -0
- package/ios/internals/ENRMViewFreeMeasurement.h +331 -0
- package/ios/internals/EnrichedMarkdownShadowNode.h +1 -3
- package/ios/internals/EnrichedMarkdownShadowNode.mm +16 -20
- package/ios/internals/EnrichedMarkdownTextShadowNode.h +1 -3
- package/ios/internals/EnrichedMarkdownTextShadowNode.mm +15 -20
- package/ios/internals/MeasurementCache.h +33 -7
- package/ios/internals/ShadowMeasurementUtils.h +63 -58
- package/ios/math/ENRMMathChipController.h +74 -0
- package/ios/math/ENRMMathChipController.mm +476 -0
- package/ios/math/ENRMRaTeXBridge.swift +4 -1
- package/ios/parser/ENRMMarkdownParser.h +1 -8
- package/ios/parser/ENRMMarkdownParser.mm +2 -11
- package/ios/parser/MarkdownASTNode.h +2 -1
- package/ios/parser/MarkdownParserBridge.mm +4 -0
- package/ios/renderer/AttributedRenderer.m +20 -2
- package/ios/renderer/BaseRenderer.h +17 -2
- package/ios/renderer/BaseRenderer.m +30 -0
- package/ios/renderer/BlockquoteRenderer.h +1 -1
- package/ios/renderer/BlockquoteRenderer.m +144 -35
- package/ios/renderer/CodeBlockRenderer.h +1 -1
- package/ios/renderer/CodeBlockRenderer.m +27 -23
- package/ios/renderer/CodeRenderer.h +1 -1
- package/ios/renderer/CodeRenderer.m +3 -1
- package/ios/renderer/ENRMImageRenderer.h +1 -1
- package/ios/renderer/ENRMImageRenderer.m +5 -1
- package/ios/renderer/ENRMMathInlineRenderer.h +1 -1
- package/ios/renderer/ENRMMathInlineRenderer.m +5 -1
- package/ios/renderer/ENRMSpoilerRenderer.h +1 -1
- package/ios/renderer/ENRMSpoilerRenderer.m +3 -1
- package/ios/renderer/EmphasisRenderer.h +1 -1
- package/ios/renderer/EmphasisRenderer.m +3 -1
- package/ios/renderer/HeadingRenderer.h +1 -1
- package/ios/renderer/HeadingRenderer.m +13 -6
- package/ios/renderer/HighlightRenderer.h +1 -1
- package/ios/renderer/HighlightRenderer.m +3 -1
- package/ios/renderer/LinkRenderer.h +1 -1
- package/ios/renderer/LinkRenderer.m +3 -1
- package/ios/renderer/ListItemRenderer.h +13 -1
- package/ios/renderer/ListItemRenderer.m +102 -44
- package/ios/renderer/ListRenderer.h +2 -2
- package/ios/renderer/ListRenderer.m +63 -25
- package/ios/renderer/ParagraphRenderer.h +1 -1
- package/ios/renderer/ParagraphRenderer.m +16 -8
- package/ios/renderer/RenderContext.h +10 -0
- package/ios/renderer/RenderContext.m +44 -0
- package/ios/renderer/RendererFactory.m +14 -0
- package/ios/renderer/StrikethroughRenderer.h +1 -1
- package/ios/renderer/StrikethroughRenderer.m +3 -1
- package/ios/renderer/StrongRenderer.h +1 -1
- package/ios/renderer/StrongRenderer.m +3 -1
- package/ios/renderer/SubscriptRenderer.h +1 -1
- package/ios/renderer/SubscriptRenderer.m +3 -1
- package/ios/renderer/SuperscriptRenderer.h +1 -1
- package/ios/renderer/SuperscriptRenderer.m +3 -1
- package/ios/renderer/TextRenderer.h +2 -2
- package/ios/renderer/TextRenderer.m +3 -1
- package/ios/renderer/ThematicBreakRenderer.h +1 -1
- package/ios/renderer/ThematicBreakRenderer.m +3 -1
- package/ios/renderer/UnderlineRenderer.h +1 -1
- package/ios/renderer/UnderlineRenderer.m +3 -1
- package/ios/styles/StyleConfig.h +22 -0
- package/ios/styles/StyleConfig.mm +132 -0
- package/ios/utils/BlockquoteBorder.h +6 -0
- package/ios/utils/BlockquoteBorder.m +249 -52
- package/ios/utils/CodeBlockBackground.m +16 -2
- package/ios/utils/ENRMAtomicSize.h +65 -0
- package/ios/utils/ENRMCodeBlockContent.h +37 -0
- package/ios/utils/ENRMCodeBlockContent.mm +79 -0
- package/ios/utils/ENRMCodeBlockHighlighter.h +37 -0
- package/ios/utils/ENRMCodeBlockHighlighter.mm +51 -0
- package/ios/utils/ENRMFeatureFlags.h +7 -0
- package/ios/utils/ENRMImageDownloader.h +11 -1
- package/ios/utils/ENRMImageDownloader.m +60 -16
- package/ios/utils/ENRMLocalImageLoader.h +31 -0
- package/ios/utils/ENRMLocalImageLoader.m +68 -0
- package/ios/utils/ENRMMathFallback.h +26 -0
- package/ios/utils/ENRMMathFallback.m +18 -0
- package/ios/utils/ENRMTextViewSetup.h +35 -17
- package/ios/utils/EditMenuUtils.m +22 -1
- package/ios/utils/ImageRequestHeaderUtils.h +35 -0
- package/ios/utils/LastElementUtils.h +1 -0
- package/ios/utils/ListMarkerDrawer.m +29 -42
- package/ios/utils/MarkdownASTSerializer.m +4 -0
- package/ios/utils/ParagraphStyleUtils.h +5 -0
- package/ios/utils/ParagraphStyleUtils.m +77 -17
- package/ios/utils/RenderedMarkdownSegment.h +13 -1
- package/ios/utils/RenderedMarkdownSegment.m +20 -0
- package/ios/utils/SegmentRenderer.m +17 -4
- package/ios/utils/StreamingMarkdownFilter.h +11 -1
- package/ios/utils/StreamingMarkdownFilter.m +98 -2
- package/ios/utils/StylePropsUtils.h +63 -0
- package/ios/utils/TaskListTapUtils.m +24 -0
- package/ios/views/ENRMCodeBlockContainerView.h +46 -0
- package/ios/views/ENRMCodeBlockContainerView.m +566 -0
- package/ios/views/ENRMMathContainerView.h +12 -0
- package/ios/views/ENRMMathContainerView.m +71 -1
- package/ios/views/TableContainerView.h +18 -0
- package/ios/views/TableContainerView.m +259 -159
- package/jest.d.ts +1 -0
- package/jest.js +5 -0
- package/lib/module/EnrichedMarkdownNativeComponent.ts +65 -0
- package/lib/module/EnrichedMarkdownTextInput.js +86 -5
- package/lib/module/EnrichedMarkdownTextInput.js.map +1 -1
- package/lib/module/EnrichedMarkdownTextInputNativeComponent.ts +89 -5
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +66 -0
- package/lib/module/headingDefaults.js +34 -0
- package/lib/module/headingDefaults.js.map +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/jest/index.js +191 -0
- package/lib/module/jest/index.js.map +1 -0
- package/lib/module/native/EnrichedMarkdownText.js +30 -4
- package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.js +81 -19
- package/lib/module/normalizeMarkdownStyle.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.web.js +56 -18
- package/lib/module/normalizeMarkdownStyle.web.js.map +1 -1
- package/lib/module/normalizeMarkdownTextInputStyle.js +62 -15
- package/lib/module/normalizeMarkdownTextInputStyle.js.map +1 -1
- package/lib/module/normalizeMenuItem.js +1 -1
- package/lib/module/utils/textInputState.js +26 -0
- package/lib/module/utils/textInputState.js.map +1 -0
- package/lib/module/web/EnrichedMarkdownText.js +9 -5
- package/lib/module/web/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/web/parseMarkdown.js +4 -3
- package/lib/module/web/parseMarkdown.js.map +1 -1
- package/lib/module/web/renderers/InlineRenderers.js +6 -0
- package/lib/module/web/renderers/InlineRenderers.js.map +1 -1
- package/lib/module/web/renderers/ListRenderers.js +7 -2
- package/lib/module/web/renderers/ListRenderers.js.map +1 -1
- package/lib/module/web/renderers/index.js +7 -4
- package/lib/module/web/renderers/index.js.map +1 -1
- package/lib/module/web/styles.js +83 -6
- package/lib/module/web/styles.js.map +1 -1
- package/lib/module/web/utils.js +1 -0
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web/wasm/md4c.js +0 -0
- package/lib/module/web/wasm/md4c.js.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts +62 -0
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts +95 -9
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts +80 -5
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +62 -0
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/headingDefaults.d.ts +9 -0
- package/lib/typescript/src/headingDefaults.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +1 -1
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/lib/typescript/src/jest/index.d.ts +6 -0
- package/lib/typescript/src/jest/index.d.ts.map +1 -0
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts +3 -3
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownStyle.web.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownTextInputStyle.d.ts +19 -5
- package/lib/typescript/src/normalizeMarkdownTextInputStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyle.d.ts +72 -0
- package/lib/typescript/src/types/MarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts +27 -0
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts +65 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts +19 -0
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts.map +1 -1
- package/lib/typescript/src/types/events.d.ts +19 -0
- package/lib/typescript/src/types/events.d.ts.map +1 -1
- package/lib/typescript/src/utils/textInputState.d.ts +24 -0
- package/lib/typescript/src/utils/textInputState.d.ts.map +1 -0
- package/lib/typescript/src/web/EnrichedMarkdownText.d.ts +1 -1
- package/lib/typescript/src/web/EnrichedMarkdownText.d.ts.map +1 -1
- package/lib/typescript/src/web/parseMarkdown.d.ts +1 -1
- package/lib/typescript/src/web/parseMarkdown.d.ts.map +1 -1
- package/lib/typescript/src/web/renderers/InlineRenderers.d.ts.map +1 -1
- package/lib/typescript/src/web/renderers/ListRenderers.d.ts.map +1 -1
- package/lib/typescript/src/web/renderers/index.d.ts +2 -1
- package/lib/typescript/src/web/renderers/index.d.ts.map +1 -1
- package/lib/typescript/src/web/styles.d.ts +2 -1
- package/lib/typescript/src/web/styles.d.ts.map +1 -1
- package/lib/typescript/src/web/types.d.ts +6 -2
- package/lib/typescript/src/web/types.d.ts.map +1 -1
- package/lib/typescript/src/web/utils.d.ts.map +1 -1
- package/package.json +36 -9
- package/postinstall.mjs +131 -0
- package/ratex-version.json +21 -0
- package/src/EnrichedMarkdownNativeComponent.ts +65 -0
- package/src/EnrichedMarkdownTextInput.tsx +162 -8
- package/src/EnrichedMarkdownTextInputNativeComponent.ts +89 -5
- package/src/EnrichedMarkdownTextNativeComponent.ts +66 -0
- package/src/headingDefaults.ts +21 -0
- package/src/index.tsx +9 -0
- package/src/index.web.tsx +1 -0
- package/src/jest/index.tsx +215 -0
- package/src/native/EnrichedMarkdownText.tsx +40 -2
- package/src/normalizeMarkdownStyle.ts +102 -16
- package/src/normalizeMarkdownStyle.web.ts +63 -15
- package/src/normalizeMarkdownTextInputStyle.ts +110 -35
- package/src/normalizeMenuItem.ts +1 -1
- package/src/types/MarkdownStyle.ts +74 -0
- package/src/types/MarkdownStyleInternal.ts +39 -0
- package/src/types/MarkdownTextProps.ts +65 -0
- package/src/types/MarkdownTextProps.web.ts +19 -0
- package/src/types/events.ts +21 -0
- package/src/utils/textInputState.ts +35 -0
- package/src/web/EnrichedMarkdownText.tsx +16 -2
- package/src/web/parseMarkdown.ts +6 -2
- package/src/web/renderers/InlineRenderers.tsx +5 -0
- package/src/web/renderers/ListRenderers.tsx +14 -2
- package/src/web/renderers/index.tsx +6 -2
- package/src/web/styles.ts +89 -5
- package/src/web/types.ts +6 -1
- package/src/web/utils.ts +1 -0
- package/src/web/wasm/md4c.js +0 -0
- package/vendor-grammars.mjs +511 -0
- package/vendor-ratex.mjs +173 -0
- package/app.plugin.js +0 -2
- package/plugin/build/withAndroidMath.js +0 -19
- package/plugin/build/withIosMath.js +0 -28
- package/plugin/build/withReactNativeEnrichedMarkdown.js +0 -11
- package/plugin/src/withAndroidMath.ts +0 -24
- package/plugin/src/withIosMath.ts +0 -35
- package/plugin/src/withReactNativeEnrichedMarkdown.ts +0 -17
- package/plugin/tsconfig.build.json +0 -16
|
@@ -29,6 +29,8 @@ interface BlockquoteStyleInternal extends BaseBlockStyleInternal {
|
|
|
29
29
|
borderWidth: CodegenTypes.Float;
|
|
30
30
|
gapWidth: CodegenTypes.Float;
|
|
31
31
|
backgroundColor: ColorValue;
|
|
32
|
+
borderRadius: CodegenTypes.Float;
|
|
33
|
+
padding: CodegenTypes.Float;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
interface ListStyleInternal extends BaseBlockStyleInternal {
|
|
@@ -39,6 +41,24 @@ interface ListStyleInternal extends BaseBlockStyleInternal {
|
|
|
39
41
|
markerFontWeight: string;
|
|
40
42
|
gapWidth: CodegenTypes.Float;
|
|
41
43
|
marginLeft: CodegenTypes.Float;
|
|
44
|
+
itemSpacing: CodegenTypes.Float;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface CodeBlockSyntaxColorsInternal {
|
|
48
|
+
keyword: ColorValue;
|
|
49
|
+
operatorColor: ColorValue;
|
|
50
|
+
punctuation: ColorValue;
|
|
51
|
+
string: ColorValue;
|
|
52
|
+
number: ColorValue;
|
|
53
|
+
constant: ColorValue;
|
|
54
|
+
comment: ColorValue;
|
|
55
|
+
function: ColorValue;
|
|
56
|
+
type: ColorValue;
|
|
57
|
+
variable: ColorValue;
|
|
58
|
+
property: ColorValue;
|
|
59
|
+
tag: ColorValue;
|
|
60
|
+
attribute: ColorValue;
|
|
61
|
+
embedded: ColorValue;
|
|
42
62
|
}
|
|
43
63
|
|
|
44
64
|
interface CodeBlockStyleInternal extends BaseBlockStyleInternal {
|
|
@@ -47,6 +67,7 @@ interface CodeBlockStyleInternal extends BaseBlockStyleInternal {
|
|
|
47
67
|
borderRadius: CodegenTypes.Float;
|
|
48
68
|
borderWidth: CodegenTypes.Float;
|
|
49
69
|
padding: CodegenTypes.Float;
|
|
70
|
+
syntaxColors: CodeBlockSyntaxColorsInternal;
|
|
50
71
|
}
|
|
51
72
|
|
|
52
73
|
interface LinkStyleInternal {
|
|
@@ -94,6 +115,10 @@ interface CodeStyleInternal {
|
|
|
94
115
|
|
|
95
116
|
interface ImageStyleInternal {
|
|
96
117
|
height: CodegenTypes.Float;
|
|
118
|
+
maxHeight: CodegenTypes.Float;
|
|
119
|
+
aspectRatio: CodegenTypes.Float;
|
|
120
|
+
// Nested struct fields cannot use WithDefault; default is applied in JS normalization.
|
|
121
|
+
resizeMode: string;
|
|
97
122
|
borderRadius: CodegenTypes.Float;
|
|
98
123
|
marginTop: CodegenTypes.Float;
|
|
99
124
|
marginBottom: CodegenTypes.Float;
|
|
@@ -121,6 +146,8 @@ interface TableStyleInternal extends BaseBlockStyleInternal {
|
|
|
121
146
|
borderRadius: CodegenTypes.Float;
|
|
122
147
|
cellPaddingHorizontal: CodegenTypes.Float;
|
|
123
148
|
cellPaddingVertical: CodegenTypes.Float;
|
|
149
|
+
horizontalOverflow: CodegenTypes.Float;
|
|
150
|
+
align: string;
|
|
124
151
|
}
|
|
125
152
|
|
|
126
153
|
interface TaskListStyleInternal {
|
|
@@ -225,11 +252,21 @@ export interface TaskListItemPressEvent {
|
|
|
225
252
|
text: string;
|
|
226
253
|
}
|
|
227
254
|
|
|
255
|
+
export interface CopyPressEvent {
|
|
256
|
+
code: string;
|
|
257
|
+
language: string;
|
|
258
|
+
}
|
|
259
|
+
|
|
228
260
|
export interface ContextMenuItemConfig {
|
|
229
261
|
text: string;
|
|
230
262
|
icon?: string;
|
|
231
263
|
}
|
|
232
264
|
|
|
265
|
+
export interface ImageRequestHeaderInternal {
|
|
266
|
+
name: string;
|
|
267
|
+
value: string;
|
|
268
|
+
}
|
|
269
|
+
|
|
233
270
|
export interface SelectionMenuConfig {
|
|
234
271
|
copyAsMarkdown: boolean;
|
|
235
272
|
copyImageUrl: boolean;
|
|
@@ -311,10 +348,16 @@ export interface Md4cFlagsInternal {
|
|
|
311
348
|
* @default false
|
|
312
349
|
*/
|
|
313
350
|
highlight: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* Treat soft breaks (single newlines) as hard breaks (visible line breaks).
|
|
353
|
+
* @default false
|
|
354
|
+
*/
|
|
355
|
+
hardSoftBreaks: boolean;
|
|
314
356
|
}
|
|
315
357
|
|
|
316
358
|
interface StreamingConfigInternal {
|
|
317
359
|
tableMode: string;
|
|
360
|
+
codeBlockMode: string;
|
|
318
361
|
}
|
|
319
362
|
|
|
320
363
|
export interface NativeProps extends ViewProps {
|
|
@@ -345,6 +388,21 @@ export interface NativeProps extends ViewProps {
|
|
|
345
388
|
* Receives the 0-based task index, current checked state, and the item's plain text.
|
|
346
389
|
*/
|
|
347
390
|
onTaskListItemPress?: CodegenTypes.BubblingEventHandler<TaskListItemPressEvent>;
|
|
391
|
+
/**
|
|
392
|
+
* Controls whether tapping a task list checkbox toggles its checked state.
|
|
393
|
+
*
|
|
394
|
+
* When `false`, the tap is fully inert: no visual toggle and no
|
|
395
|
+
* `onTaskListItemPress` emission. Text selection and links are unaffected.
|
|
396
|
+
*
|
|
397
|
+
* @default true
|
|
398
|
+
*/
|
|
399
|
+
enableTaskListItemToggle?: CodegenTypes.WithDefault<boolean, true>;
|
|
400
|
+
/**
|
|
401
|
+
* Callback fired when code is copied from a fenced code block's header copy
|
|
402
|
+
* button, its long-press context-menu "Copy" action, or the VoiceOver copy
|
|
403
|
+
* action. Receives the copied code and its language.
|
|
404
|
+
*/
|
|
405
|
+
onCopyPress?: CodegenTypes.BubblingEventHandler<CopyPressEvent>;
|
|
348
406
|
/**
|
|
349
407
|
* Controls whether the system link preview is shown on long press (iOS only).
|
|
350
408
|
*
|
|
@@ -424,10 +482,18 @@ export interface NativeProps extends ViewProps {
|
|
|
424
482
|
* @default 'particles'
|
|
425
483
|
*/
|
|
426
484
|
spoilerOverlay?: CodegenTypes.WithDefault<string, 'particles'>;
|
|
485
|
+
/**
|
|
486
|
+
* Hides the text selection context menu while keeping text selectable.
|
|
487
|
+
*/
|
|
488
|
+
contextMenuHidden?: CodegenTypes.WithDefault<boolean, false>;
|
|
427
489
|
/**
|
|
428
490
|
* Custom items to show in the text selection context menu.
|
|
429
491
|
*/
|
|
430
492
|
contextMenuItems?: ReadonlyArray<Readonly<ContextMenuItemConfig>>;
|
|
493
|
+
/**
|
|
494
|
+
* HTTP headers attached to remote image requests, as name/value pairs.
|
|
495
|
+
*/
|
|
496
|
+
imageRequestHeaders?: ReadonlyArray<Readonly<ImageRequestHeaderInternal>>;
|
|
431
497
|
/**
|
|
432
498
|
* Built-in items to show in the text selection context menu.
|
|
433
499
|
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Single source of truth for default heading appearance, shared by the
|
|
4
|
+
// read-only renderer and the editable input so headings match across views.
|
|
5
|
+
|
|
6
|
+
/** Default font weight applied to every heading level. */
|
|
7
|
+
export const DEFAULT_HEADING_FONT_WEIGHT = 'bold';
|
|
8
|
+
export const HEADING_DEFAULTS = {
|
|
9
|
+
h1: {
|
|
10
|
+
fontSize: 30,
|
|
11
|
+
color: '#111827'
|
|
12
|
+
},
|
|
13
|
+
h2: {
|
|
14
|
+
fontSize: 24,
|
|
15
|
+
color: '#111827'
|
|
16
|
+
},
|
|
17
|
+
h3: {
|
|
18
|
+
fontSize: 20,
|
|
19
|
+
color: '#111827'
|
|
20
|
+
},
|
|
21
|
+
h4: {
|
|
22
|
+
fontSize: 18,
|
|
23
|
+
color: '#111827'
|
|
24
|
+
},
|
|
25
|
+
h5: {
|
|
26
|
+
fontSize: 16,
|
|
27
|
+
color: '#374151'
|
|
28
|
+
},
|
|
29
|
+
h6: {
|
|
30
|
+
fontSize: 14,
|
|
31
|
+
color: '#4B5563'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=headingDefaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_HEADING_FONT_WEIGHT","HEADING_DEFAULTS","h1","fontSize","color","h2","h3","h4","h5","h6"],"sourceRoot":"../../src","sources":["headingDefaults.ts"],"mappings":";;AAAA;AACA;;AASA;AACA,OAAO,MAAMA,2BAA2B,GAAG,MAAM;AAEjD,OAAO,MAAMC,gBAAyD,GAAG;EACvEC,EAAE,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAU,CAAC;EACtCC,EAAE,EAAE;IAAEF,QAAQ,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAU,CAAC;EACtCE,EAAE,EAAE;IAAEH,QAAQ,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAU,CAAC;EACtCG,EAAE,EAAE;IAAEJ,QAAQ,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAU,CAAC;EACtCI,EAAE,EAAE;IAAEL,QAAQ,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAU,CAAC;EACtCK,EAAE,EAAE;IAAEN,QAAQ,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAU;AACvC,CAAC","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","EnrichedMarkdownText","DEFAULT_ACCESSIBILITY_LABELS","resolveAccessibilityLabels","EnrichedMarkdownTextInput"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,oBAAoB,QAAQ,kCAA+B;
|
|
1
|
+
{"version":3,"names":["default","EnrichedMarkdownText","DEFAULT_ACCESSIBILITY_LABELS","resolveAccessibilityLabels","EnrichedMarkdownTextInput"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,oBAAoB,QAAQ,kCAA+B;AAqB/E,SACEC,4BAA4B,EAC5BC,0BAA0B,QACrB,iCAA8B;AAErC,SAASC,yBAAyB,QAAQ,gCAA6B","ignoreList":[]}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Jest mock for `react-native-enriched-markdown-scaffold`, wired up via
|
|
5
|
+
* `jest.mock('react-native-enriched-markdown-scaffold', () => require('react-native-enriched-markdown-scaffold/jest'))`.
|
|
6
|
+
* See docs/TESTING.md for setup and the behavior it mirrors.
|
|
7
|
+
*
|
|
8
|
+
* The two components are Fabric/codegen native views: under Jest there is no
|
|
9
|
+
* native view manager, so rendering them or calling any imperative ref method
|
|
10
|
+
* (each dispatches a native command) throws. These replacements render plain RN
|
|
11
|
+
* primitives and expose every imperative method as a spy.
|
|
12
|
+
*
|
|
13
|
+
* Behavior mirrored from the native component: typing fires `onChangeText` and,
|
|
14
|
+
* when set, `onChangeMarkdown` (the raw text stands in for parsed markdown);
|
|
15
|
+
* `setValue()` updates the rendered text but emits no change events, matching
|
|
16
|
+
* the native suppression of emits for programmatic updates.
|
|
17
|
+
*
|
|
18
|
+
* The mock is typed against the real public types, so `yarn typecheck` fails if
|
|
19
|
+
* the API gains a prop or ref method the mock does not cover -- it cannot
|
|
20
|
+
* silently drift from the real component.
|
|
21
|
+
*/
|
|
22
|
+
import { useImperativeHandle, useRef, useState } from 'react';
|
|
23
|
+
import { Text, TextInput } from 'react-native';
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
export { DEFAULT_ACCESSIBILITY_LABELS, resolveAccessibilityLabels } from "../accessibilityLabelDefaults.js";
|
|
26
|
+
const spy = impl => jest.fn(impl);
|
|
27
|
+
const EMPTY_CARET_RECT = {
|
|
28
|
+
x: 0,
|
|
29
|
+
y: 0,
|
|
30
|
+
width: 0,
|
|
31
|
+
height: 0
|
|
32
|
+
};
|
|
33
|
+
export const EnrichedMarkdownTextInput = ({
|
|
34
|
+
ref,
|
|
35
|
+
defaultValue,
|
|
36
|
+
onChangeText,
|
|
37
|
+
onChangeMarkdown,
|
|
38
|
+
onFocus,
|
|
39
|
+
onBlur,
|
|
40
|
+
editable = true,
|
|
41
|
+
placeholder,
|
|
42
|
+
placeholderTextColor,
|
|
43
|
+
autoFocus = false,
|
|
44
|
+
multiline = true,
|
|
45
|
+
scrollEnabled = true,
|
|
46
|
+
style,
|
|
47
|
+
testID,
|
|
48
|
+
accessible,
|
|
49
|
+
accessibilityLabel,
|
|
50
|
+
accessibilityHint,
|
|
51
|
+
accessibilityRole,
|
|
52
|
+
accessibilityState,
|
|
53
|
+
nativeID,
|
|
54
|
+
markdownStyle: _markdownStyle,
|
|
55
|
+
cursorColor: _cursorColor,
|
|
56
|
+
selectionColor: _selectionColor,
|
|
57
|
+
autoCapitalize: _autoCapitalize,
|
|
58
|
+
onChangeSelection: _onChangeSelection,
|
|
59
|
+
onChangeState: _onChangeState,
|
|
60
|
+
onKeyPress: _onKeyPress,
|
|
61
|
+
onCaretRectChange: _onCaretRectChange,
|
|
62
|
+
onLinkDetected: _onLinkDetected,
|
|
63
|
+
mentionIndicators: _mentionIndicators,
|
|
64
|
+
onStartMention: _onStartMention,
|
|
65
|
+
onChangeMention: _onChangeMention,
|
|
66
|
+
onEndMention: _onEndMention,
|
|
67
|
+
contextMenuItems: _contextMenuItems,
|
|
68
|
+
selectionMenuConfig: _selectionMenuConfig,
|
|
69
|
+
formatMenuConfig: _formatMenuConfig,
|
|
70
|
+
linkRegex: _linkRegex,
|
|
71
|
+
writingDirection: _writingDirection
|
|
72
|
+
}) => {
|
|
73
|
+
const [text, setText] = useState(defaultValue ?? '');
|
|
74
|
+
const textRef = useRef(text);
|
|
75
|
+
const inputRef = useRef(null);
|
|
76
|
+
const applyText = next => {
|
|
77
|
+
textRef.current = next;
|
|
78
|
+
setText(next);
|
|
79
|
+
};
|
|
80
|
+
const handleChangeText = next => {
|
|
81
|
+
applyText(next);
|
|
82
|
+
onChangeText?.(next);
|
|
83
|
+
onChangeMarkdown?.(next);
|
|
84
|
+
};
|
|
85
|
+
const instanceRef = useRef(null);
|
|
86
|
+
if (instanceRef.current === null) {
|
|
87
|
+
instanceRef.current = {
|
|
88
|
+
focus: spy(() => inputRef.current?.focus()),
|
|
89
|
+
blur: spy(() => inputRef.current?.blur()),
|
|
90
|
+
measure: spy(callback => callback(0, 0, 0, 0, 0, 0)),
|
|
91
|
+
measureInWindow: spy(callback => callback(0, 0, 0, 0)),
|
|
92
|
+
measureLayout: spy((_relativeToNativeNode, onSuccess) => onSuccess(0, 0, 0, 0)),
|
|
93
|
+
setValue: spy(markdown => applyText(markdown)),
|
|
94
|
+
setSelection: spy((_start, _end) => {}),
|
|
95
|
+
toggleBold: spy(() => {}),
|
|
96
|
+
toggleItalic: spy(() => {}),
|
|
97
|
+
toggleUnderline: spy(() => {}),
|
|
98
|
+
toggleStrikethrough: spy(() => {}),
|
|
99
|
+
toggleSpoiler: spy(() => {}),
|
|
100
|
+
toggleHeading: spy(_level => {}),
|
|
101
|
+
toggleUnorderedList: spy(() => {}),
|
|
102
|
+
toggleOrderedList: spy(() => {}),
|
|
103
|
+
indentList: spy(() => {}),
|
|
104
|
+
outdentList: spy(() => {}),
|
|
105
|
+
setLink: spy(_url => {}),
|
|
106
|
+
insertLink: spy((_text, _url) => {}),
|
|
107
|
+
insertText: spy(_text => {}),
|
|
108
|
+
insertMention: spy((_displayText, _url) => {}),
|
|
109
|
+
startMention: spy(_indicator => {}),
|
|
110
|
+
removeLink: spy(() => {}),
|
|
111
|
+
copyToClipboard: spy(() => {}),
|
|
112
|
+
resolvePaste: spy((_text, _markdown) => {}),
|
|
113
|
+
// Math chip commands are native-only; the mock records the call so tests can
|
|
114
|
+
// assert the API surface without a native chip implementation.
|
|
115
|
+
insertMath: spy((_latex, _options) => {}),
|
|
116
|
+
updateMath: spy((_start, _latex, _options) => {}),
|
|
117
|
+
removeMath: spy(_start => {}),
|
|
118
|
+
getMarkdown: spy(() => Promise.resolve(textRef.current)),
|
|
119
|
+
getCaretRect: spy(() => Promise.resolve(EMPTY_CARET_RECT))
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
useImperativeHandle(ref, () => instanceRef.current);
|
|
123
|
+
return /*#__PURE__*/_jsx(TextInput, {
|
|
124
|
+
ref: inputRef,
|
|
125
|
+
value: text,
|
|
126
|
+
onChangeText: handleChangeText,
|
|
127
|
+
onFocus: () => onFocus?.(),
|
|
128
|
+
onBlur: () => onBlur?.(),
|
|
129
|
+
editable: editable,
|
|
130
|
+
placeholder: placeholder,
|
|
131
|
+
placeholderTextColor: placeholderTextColor,
|
|
132
|
+
autoFocus: autoFocus,
|
|
133
|
+
multiline: multiline,
|
|
134
|
+
scrollEnabled: scrollEnabled,
|
|
135
|
+
style: style,
|
|
136
|
+
testID: testID,
|
|
137
|
+
accessible: accessible,
|
|
138
|
+
accessibilityLabel: accessibilityLabel,
|
|
139
|
+
accessibilityHint: accessibilityHint,
|
|
140
|
+
accessibilityRole: accessibilityRole,
|
|
141
|
+
accessibilityState: accessibilityState,
|
|
142
|
+
nativeID: nativeID
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
export const EnrichedMarkdownText = ({
|
|
146
|
+
markdown,
|
|
147
|
+
containerStyle,
|
|
148
|
+
testID,
|
|
149
|
+
accessible,
|
|
150
|
+
accessibilityLabel,
|
|
151
|
+
accessibilityHint,
|
|
152
|
+
accessibilityRole,
|
|
153
|
+
accessibilityState,
|
|
154
|
+
nativeID,
|
|
155
|
+
markdownStyle: _markdownStyle,
|
|
156
|
+
onLinkPress: _onLinkPress,
|
|
157
|
+
onLinkLongPress: _onLinkLongPress,
|
|
158
|
+
onTaskListItemPress: _onTaskListItemPress,
|
|
159
|
+
enableLinkPreview: _enableLinkPreview,
|
|
160
|
+
selectable: _selectable,
|
|
161
|
+
md4cFlags: _md4cFlags,
|
|
162
|
+
allowFontScaling: _allowFontScaling,
|
|
163
|
+
maxFontSizeMultiplier: _maxFontSizeMultiplier,
|
|
164
|
+
allowTrailingMargin: _allowTrailingMargin,
|
|
165
|
+
flavor: _flavor,
|
|
166
|
+
streamingAnimation: _streamingAnimation,
|
|
167
|
+
streamingConfig: _streamingConfig,
|
|
168
|
+
spoilerOverlay: _spoilerOverlay,
|
|
169
|
+
contextMenuItems: _contextMenuItems,
|
|
170
|
+
imageRequestHeaders: _imageRequestHeaders,
|
|
171
|
+
selectionMenuConfig: _selectionMenuConfig,
|
|
172
|
+
accessibilityLabels: _accessibilityLabels,
|
|
173
|
+
selectionColor: _selectionColor,
|
|
174
|
+
selectionHandleColor: _selectionHandleColor,
|
|
175
|
+
textBreakStrategy: _textBreakStrategy,
|
|
176
|
+
lineBreakStrategyIOS: _lineBreakStrategyIOS,
|
|
177
|
+
writingDirection: _writingDirection
|
|
178
|
+
}) => {
|
|
179
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
180
|
+
style: containerStyle,
|
|
181
|
+
testID: testID,
|
|
182
|
+
accessible: accessible,
|
|
183
|
+
accessibilityLabel: accessibilityLabel,
|
|
184
|
+
accessibilityHint: accessibilityHint,
|
|
185
|
+
accessibilityRole: accessibilityRole,
|
|
186
|
+
accessibilityState: accessibilityState,
|
|
187
|
+
nativeID: nativeID,
|
|
188
|
+
children: markdown
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useImperativeHandle","useRef","useState","Text","TextInput","jsx","_jsx","DEFAULT_ACCESSIBILITY_LABELS","resolveAccessibilityLabels","spy","impl","jest","fn","EMPTY_CARET_RECT","x","y","width","height","EnrichedMarkdownTextInput","ref","defaultValue","onChangeText","onChangeMarkdown","onFocus","onBlur","editable","placeholder","placeholderTextColor","autoFocus","multiline","scrollEnabled","style","testID","accessible","accessibilityLabel","accessibilityHint","accessibilityRole","accessibilityState","nativeID","markdownStyle","_markdownStyle","cursorColor","_cursorColor","selectionColor","_selectionColor","autoCapitalize","_autoCapitalize","onChangeSelection","_onChangeSelection","onChangeState","_onChangeState","onKeyPress","_onKeyPress","onCaretRectChange","_onCaretRectChange","onLinkDetected","_onLinkDetected","mentionIndicators","_mentionIndicators","onStartMention","_onStartMention","onChangeMention","_onChangeMention","onEndMention","_onEndMention","contextMenuItems","_contextMenuItems","selectionMenuConfig","_selectionMenuConfig","formatMenuConfig","_formatMenuConfig","linkRegex","_linkRegex","writingDirection","_writingDirection","text","setText","textRef","inputRef","applyText","next","current","handleChangeText","instanceRef","focus","blur","measure","callback","measureInWindow","measureLayout","_relativeToNativeNode","onSuccess","setValue","markdown","setSelection","_start","_end","toggleBold","toggleItalic","toggleUnderline","toggleStrikethrough","toggleSpoiler","toggleHeading","_level","toggleUnorderedList","toggleOrderedList","indentList","outdentList","setLink","_url","insertLink","_text","insertText","insertMention","_displayText","startMention","_indicator","removeLink","copyToClipboard","resolvePaste","_markdown","insertMath","_latex","_options","updateMath","removeMath","getMarkdown","Promise","resolve","getCaretRect","value","EnrichedMarkdownText","containerStyle","onLinkPress","_onLinkPress","onLinkLongPress","_onLinkLongPress","onTaskListItemPress","_onTaskListItemPress","enableLinkPreview","_enableLinkPreview","selectable","_selectable","md4cFlags","_md4cFlags","allowFontScaling","_allowFontScaling","maxFontSizeMultiplier","_maxFontSizeMultiplier","allowTrailingMargin","_allowTrailingMargin","flavor","_flavor","streamingAnimation","_streamingAnimation","streamingConfig","_streamingConfig","spoilerOverlay","_spoilerOverlay","imageRequestHeaders","_imageRequestHeaders","accessibilityLabels","_accessibilityLabels","selectionHandleColor","_selectionHandleColor","textBreakStrategy","_textBreakStrategy","lineBreakStrategyIOS","_lineBreakStrategyIOS","children"],"sourceRoot":"../../../src","sources":["jest/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE7D,SAASC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS/C,SACEC,4BAA4B,EAC5BC,0BAA0B,QACrB,kCAA+B;AAKtC,MAAMC,GAAG,GAAqBC,IAAQ,IAAQC,IAAI,CAACC,EAAE,CAACF,IAAI,CAAC;AAE3D,MAAMG,gBAA2B,GAAG;EAAEC,CAAC,EAAE,CAAC;EAAEC,CAAC,EAAE,CAAC;EAAEC,KAAK,EAAE,CAAC;EAAEC,MAAM,EAAE;AAAE,CAAC;AAEvE,OAAO,MAAMC,yBAAyB,GAAGA,CAAC;EACxCC,GAAG;EACHC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,OAAO;EACPC,MAAM;EACNC,QAAQ,GAAG,IAAI;EACfC,WAAW;EACXC,oBAAoB;EACpBC,SAAS,GAAG,KAAK;EACjBC,SAAS,GAAG,IAAI;EAChBC,aAAa,GAAG,IAAI;EACpBC,KAAK;EACLC,MAAM;EACNC,UAAU;EACVC,kBAAkB;EAClBC,iBAAiB;EACjBC,iBAAiB;EACjBC,kBAAkB;EAClBC,QAAQ;EACRC,aAAa,EAAEC,cAAc;EAC7BC,WAAW,EAAEC,YAAY;EACzBC,cAAc,EAAEC,eAAe;EAC/BC,cAAc,EAAEC,eAAe;EAC/BC,iBAAiB,EAAEC,kBAAkB;EACrCC,aAAa,EAAEC,cAAc;EAC7BC,UAAU,EAAEC,WAA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oBACEpE,IAAA,CAACH,IAAI;IACH4B,KAAK,EAAEqG,cAAe;IACtBpG,MAAM,EAAEA,MAAO;IACfC,UAAU,EAAEA,UAAW;IACvBC,kBAAkB,EAAEA,kBAAmB;IACvCC,iBAAiB,EAAEA,iBAAkB;IACrCC,iBAAiB,EAAEA,iBAAkB;IACrCC,kBAAkB,EAAEA,kBAAmB;IACvCC,QAAQ,EAAEA,QAAS;IAAAmI,QAAA,EAElB5E;EAAQ,CACL,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -61,7 +61,8 @@ const defaultMd4cFlags = {
|
|
|
61
61
|
superscript: false,
|
|
62
62
|
subscript: false,
|
|
63
63
|
latexMath: true,
|
|
64
|
-
highlight: false
|
|
64
|
+
highlight: false,
|
|
65
|
+
hardSoftBreaks: false
|
|
65
66
|
};
|
|
66
67
|
export const EnrichedMarkdownText = ({
|
|
67
68
|
markdown,
|
|
@@ -70,6 +71,8 @@ export const EnrichedMarkdownText = ({
|
|
|
70
71
|
onLinkPress,
|
|
71
72
|
onLinkLongPress,
|
|
72
73
|
onTaskListItemPress,
|
|
74
|
+
enableTaskListItemToggle = true,
|
|
75
|
+
onCopyPress,
|
|
73
76
|
enableLinkPreview,
|
|
74
77
|
selectable = true,
|
|
75
78
|
md4cFlags = defaultMd4cFlags,
|
|
@@ -81,6 +84,8 @@ export const EnrichedMarkdownText = ({
|
|
|
81
84
|
streamingConfig,
|
|
82
85
|
spoilerOverlay = 'particles',
|
|
83
86
|
contextMenuItems,
|
|
87
|
+
imageRequestHeaders,
|
|
88
|
+
contextMenuHidden = false,
|
|
84
89
|
selectionMenuConfig,
|
|
85
90
|
accessibilityLabels,
|
|
86
91
|
selectionColor,
|
|
@@ -103,7 +108,8 @@ export const EnrichedMarkdownText = ({
|
|
|
103
108
|
superscript: md4cFlags.superscript ?? false,
|
|
104
109
|
subscript: md4cFlags.subscript ?? false,
|
|
105
110
|
latexMath: md4cFlags.latexMath ?? true,
|
|
106
|
-
highlight: md4cFlags.highlight ?? false
|
|
111
|
+
highlight: md4cFlags.highlight ?? false,
|
|
112
|
+
hardSoftBreaks: md4cFlags.hardSoftBreaks ?? false
|
|
107
113
|
}), [md4cFlags]);
|
|
108
114
|
const contextMenuCallbacksRef = useRef(new Map());
|
|
109
115
|
useEffect(() => {
|
|
@@ -119,6 +125,10 @@ export const EnrichedMarkdownText = ({
|
|
|
119
125
|
text: item.text,
|
|
120
126
|
icon: item.icon
|
|
121
127
|
})), [contextMenuItems]);
|
|
128
|
+
const nativeImageRequestHeaders = useMemo(() => imageRequestHeaders ? Object.entries(imageRequestHeaders).map(([name, value]) => ({
|
|
129
|
+
name,
|
|
130
|
+
value
|
|
131
|
+
})).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0) : undefined, [imageRequestHeaders]);
|
|
122
132
|
const handleContextMenuItemPress = useCallback(e => {
|
|
123
133
|
const {
|
|
124
134
|
itemText,
|
|
@@ -163,10 +173,22 @@ export const EnrichedMarkdownText = ({
|
|
|
163
173
|
text
|
|
164
174
|
});
|
|
165
175
|
}, [onTaskListItemPress]);
|
|
176
|
+
const handleCopyPress = useCallback(e => {
|
|
177
|
+
const {
|
|
178
|
+
code,
|
|
179
|
+
language
|
|
180
|
+
} = e.nativeEvent;
|
|
181
|
+
onCopyPress?.({
|
|
182
|
+
code,
|
|
183
|
+
language
|
|
184
|
+
});
|
|
185
|
+
}, [onCopyPress]);
|
|
166
186
|
const tableMode = streamingConfig?.tableMode ?? 'progressive';
|
|
187
|
+
const codeBlockMode = streamingConfig?.codeBlockMode ?? 'progressive';
|
|
167
188
|
const normalizedStreamingConfig = useMemo(() => ({
|
|
168
|
-
tableMode
|
|
169
|
-
|
|
189
|
+
tableMode,
|
|
190
|
+
codeBlockMode
|
|
191
|
+
}), [tableMode, codeBlockMode]);
|
|
170
192
|
const normalizedSelectionMenuConfig = useMemo(() => {
|
|
171
193
|
// The boolean acceptance is confined to this wrapper boundary via a single
|
|
172
194
|
// `as unknown` cast; the public type only exposes the object shape.
|
|
@@ -192,6 +214,8 @@ export const EnrichedMarkdownText = ({
|
|
|
192
214
|
onLinkPress: handleLinkPress,
|
|
193
215
|
onLinkLongPress: handleLinkLongPress,
|
|
194
216
|
onTaskListItemPress: handleTaskListItemPress,
|
|
217
|
+
enableTaskListItemToggle,
|
|
218
|
+
onCopyPress: handleCopyPress,
|
|
195
219
|
enableLinkPreview: onLinkLongPress == null && (enableLinkPreview ?? true),
|
|
196
220
|
selectable,
|
|
197
221
|
md4cFlags: normalizedMd4cFlags,
|
|
@@ -203,6 +227,8 @@ export const EnrichedMarkdownText = ({
|
|
|
203
227
|
spoilerOverlay,
|
|
204
228
|
style: containerStyle,
|
|
205
229
|
contextMenuItems: nativeContextMenuItems,
|
|
230
|
+
imageRequestHeaders: nativeImageRequestHeaders,
|
|
231
|
+
contextMenuHidden,
|
|
206
232
|
selectionMenuConfig: normalizedSelectionMenuConfig,
|
|
207
233
|
accessibilityLabels: resolvedAccessibilityLabels,
|
|
208
234
|
onContextMenuItemPress: handleContextMenuItemPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useCallback","useRef","useEffect","EnrichedMarkdownTextNativeComponent","EnrichedMarkdownNativeComponent","normalizeMarkdownStyle","resolveAccessibilityLabels","normalizeMenuItem","normalizeLegacyBooleanMenuItem","jsx","_jsx","DEFAULT_COPY_LABEL","DEFAULT_COPY_AS_MARKDOWN_LABEL","DEFAULT_COPY_IMAGE_URL_LABEL","DEFAULT_COPY_IMAGE_URLS_LABEL","buildPluralTemplates","pluralLabels","singularLabel","IntlRef","Intl","PluralRules","pluralRules","other","byCategory","zero","one","two","few","many","templates","n","push","select","defaultMd4cFlags","underline","superscript","subscript","latexMath","highlight","EnrichedMarkdownText","markdown","markdownStyle","containerStyle","onLinkPress","onLinkLongPress","onTaskListItemPress","enableLinkPreview","selectable","md4cFlags","allowFontScaling","maxFontSizeMultiplier","allowTrailingMargin","flavor","streamingAnimation","streamingConfig","spoilerOverlay","contextMenuItems","selectionMenuConfig","accessibilityLabels","selectionColor","selectionHandleColor","textBreakStrategy","lineBreakStrategyIOS","writingDirection","rest","normalizedStyleRef","normalized","current","normalizedStyle","normalizedMd4cFlags","contextMenuCallbacksRef","Map","callbacksMap","item","set","text","onPress","nativeContextMenuItems","filter","visible","map","icon","handleContextMenuItemPress","e","itemText","selectedText","selectionStart","selectionEnd","nativeEvent","callback","get","selection","start","end","handleLinkPress","url","handleLinkLongPress","handleTaskListItemPress","index","checked","tableMode","normalizedStreamingConfig","normalizedSelectionMenuConfig","config","copy","copyAsMarkdown","copyImageUrl","enabled","copyLabel","label","copyAsMarkdownLabel","copyImageUrlLabel","copyImageUrlsLabel","copyImageUrlPluralTemplates","resolvedAccessibilityLabels","sharedProps","style","onContextMenuItemPress"],"sourceRoot":"../../../src","sources":["native/EnrichedMarkdownText.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,WAAW,EAAEC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAC/D,OAAOC,mCAAmC,MAAM,wCAAwC;AAExF,OAAOC,+BAA+B,MAAM,oCAAoC;AAChF,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,SAASC,0BAA0B,QAAQ,kCAA+B;AAC1E,SACEC,iBAAiB,EACjBC,8BAA8B,QACzB,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["useMemo","useCallback","useRef","useEffect","EnrichedMarkdownTextNativeComponent","EnrichedMarkdownNativeComponent","normalizeMarkdownStyle","resolveAccessibilityLabels","normalizeMenuItem","normalizeLegacyBooleanMenuItem","jsx","_jsx","DEFAULT_COPY_LABEL","DEFAULT_COPY_AS_MARKDOWN_LABEL","DEFAULT_COPY_IMAGE_URL_LABEL","DEFAULT_COPY_IMAGE_URLS_LABEL","buildPluralTemplates","pluralLabels","singularLabel","IntlRef","Intl","PluralRules","pluralRules","other","byCategory","zero","one","two","few","many","templates","n","push","select","defaultMd4cFlags","underline","superscript","subscript","latexMath","highlight","hardSoftBreaks","EnrichedMarkdownText","markdown","markdownStyle","containerStyle","onLinkPress","onLinkLongPress","onTaskListItemPress","enableTaskListItemToggle","onCopyPress","enableLinkPreview","selectable","md4cFlags","allowFontScaling","maxFontSizeMultiplier","allowTrailingMargin","flavor","streamingAnimation","streamingConfig","spoilerOverlay","contextMenuItems","imageRequestHeaders","contextMenuHidden","selectionMenuConfig","accessibilityLabels","selectionColor","selectionHandleColor","textBreakStrategy","lineBreakStrategyIOS","writingDirection","rest","normalizedStyleRef","normalized","current","normalizedStyle","normalizedMd4cFlags","contextMenuCallbacksRef","Map","callbacksMap","item","set","text","onPress","nativeContextMenuItems","filter","visible","map","icon","nativeImageRequestHeaders","Object","entries","name","value","sort","a","b","undefined","handleContextMenuItemPress","e","itemText","selectedText","selectionStart","selectionEnd","nativeEvent","callback","get","selection","start","end","handleLinkPress","url","handleLinkLongPress","handleTaskListItemPress","index","checked","handleCopyPress","code","language","tableMode","codeBlockMode","normalizedStreamingConfig","normalizedSelectionMenuConfig","config","copy","copyAsMarkdown","copyImageUrl","enabled","copyLabel","label","copyAsMarkdownLabel","copyImageUrlLabel","copyImageUrlsLabel","copyImageUrlPluralTemplates","resolvedAccessibilityLabels","sharedProps","style","onContextMenuItemPress"],"sourceRoot":"../../../src","sources":["native/EnrichedMarkdownText.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,WAAW,EAAEC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAC/D,OAAOC,mCAAmC,MAAM,wCAAwC;AAExF,OAAOC,+BAA+B,MAAM,oCAAoC;AAChF,SAASC,sBAAsB,QAAQ,2BAA2B;AAClE,SAASC,0BAA0B,QAAQ,kCAA+B;AAC1E,SACEC,iBAAiB,EACjBC,8BAA8B,QACzB,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiC9B;AACA;AACA,MAAMC,kBAAkB,GAAG,MAAM;AACjC,MAAMC,8BAA8B,GAAG,kBAAkB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