react-native-enriched-markdown-scaffold 0.7.4-scaffold.9 → 1.0.2-scaffold.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -8
- package/ReactNativeEnrichedMarkdown.podspec +82 -73
- package/android/build.gradle +186 -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 +24 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerInterface.java +8 -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 +35 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +886 -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 +189 -13
- 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 +54 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputView.kt +901 -462
- 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/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 +116 -22
- 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 +4 -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 +37 -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 +49 -15
- package/android/src/main/java/com/swmansion/enriched/markdown/views/BlockMenuOptions.kt +45 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt +396 -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 +36 -9
- 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 +6 -4
- 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 +234 -12
- package/docs/BREAKING_CHANGES.md +129 -0
- package/docs/CODE_HIGHLIGHT.md +133 -0
- package/docs/COPY_OPTIONS.md +47 -3
- package/docs/ELEMENTS_STRUCTURE.md +52 -4
- package/docs/IMAGE_CACHING.md +30 -0
- package/docs/INPUT.md +108 -11
- 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 +284 -75
- package/ios/EnrichedMarkdownText.h +7 -0
- package/ios/EnrichedMarkdownText.mm +101 -73
- 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 +35 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +886 -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/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 +5 -6
- package/ios/input/ENRMInputParser.mm +461 -178
- 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 +1089 -1023
- 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/ENRMBlockMenu.h +57 -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.h +22 -5
- package/ios/utils/EditMenuUtils.m +53 -9
- 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 +53 -0
- package/ios/views/ENRMCodeBlockContainerView.m +559 -0
- package/ios/views/ENRMMathContainerView.h +16 -0
- package/ios/views/ENRMMathContainerView.m +74 -19
- package/ios/views/TableContainerView.h +22 -0
- package/ios/views/TableContainerView.m +261 -175
- package/jest.d.ts +1 -0
- package/jest.js +5 -0
- package/lib/module/EnrichedMarkdownNativeComponent.ts +73 -0
- package/lib/module/EnrichedMarkdownTextInput.js +84 -5
- package/lib/module/EnrichedMarkdownTextInput.js.map +1 -1
- package/lib/module/EnrichedMarkdownTextInputNativeComponent.ts +78 -5
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +74 -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 +37 -5
- 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 +66 -0
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts +94 -9
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts +69 -5
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +66 -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 +104 -9
- 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 +73 -0
- package/src/EnrichedMarkdownTextInput.tsx +159 -8
- package/src/EnrichedMarkdownTextInputNativeComponent.ts +78 -5
- package/src/EnrichedMarkdownTextNativeComponent.ts +74 -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 +53 -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 +101 -9
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { default as EnrichedMarkdownText } from './native/EnrichedMarkdownText';
|
|
2
2
|
export type { EnrichedMarkdownTextProps, StreamingConfig, MarkdownStyle, Md4cFlags, ContextMenuItem as TextContextMenuItem, SelectionMenuConfig as TextSelectionMenuConfig, SelectionMenuPluralLabels as TextSelectionMenuPluralLabels, } from './native/EnrichedMarkdownText';
|
|
3
|
-
export type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, } from './types/events';
|
|
3
|
+
export type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, CopyPressEvent, OnPasteEvent, } from './types/events';
|
|
4
4
|
export type { AccessibilityLabels, ResolvedAccessibilityLabels, } from './types/AccessibilityLabels';
|
|
5
5
|
export { DEFAULT_ACCESSIBILITY_LABELS, resolveAccessibilityLabels, } from './accessibilityLabelDefaults';
|
|
6
6
|
export { EnrichedMarkdownTextInput } from './EnrichedMarkdownTextInput';
|
|
7
|
-
export type { EnrichedMarkdownTextInputProps, EnrichedMarkdownTextInputInstance, MarkdownTextInputStyle, StyleState, ContextMenuItem, InputSelectionMenuConfig, FormatMenuConfig, OnLinkDetected, OnStartMentionEvent, OnChangeMentionEvent, OnEndMentionEvent, CaretRect, } from './EnrichedMarkdownTextInput';
|
|
7
|
+
export type { EnrichedMarkdownTextInputProps, EnrichedMarkdownTextInputInstance, MarkdownTextInputStyle, StyleState, ContextMenuItem, InputSelectionMenuConfig, FormatMenuConfig, OnKeyPressEvent, OnLinkDetected, OnStartMentionEvent, OnChangeMentionEvent, OnEndMentionEvent, CaretRect, HeadingLevel, HeadingStyle, InputInlineMathStyle, InputMathStyle, OnMathPressEvent, InsertMathOptions, } from './EnrichedMarkdownTextInput';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,SAAS,EACT,eAAe,IAAI,mBAAmB,EACtC,mBAAmB,IAAI,uBAAuB,EAC9C,yBAAyB,IAAI,6BAA6B,GAC3D,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,SAAS,EACT,eAAe,IAAI,mBAAmB,EACtC,mBAAmB,IAAI,uBAAuB,EAC9C,yBAAyB,IAAI,6BAA6B,GAC3D,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,YAAY,EACV,8BAA8B,EAC9B,iCAAiC,EACjC,sBAAsB,EACtB,UAAU,EACV,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { EnrichedMarkdownText, default } from './web/EnrichedMarkdownText';
|
|
2
2
|
export type { EnrichedMarkdownTextProps } from './types/MarkdownTextProps.web';
|
|
3
3
|
export type { MarkdownStyle, Md4cFlags } from './types/MarkdownStyle';
|
|
4
|
-
export type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, } from './types/events';
|
|
4
|
+
export type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, CopyPressEvent, } from './types/events';
|
|
5
5
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC3E,YAAY,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC3E,YAAY,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EnrichedMarkdownTextInputProps } from '../EnrichedMarkdownTextInput';
|
|
2
|
+
import type { EnrichedMarkdownTextProps } from '../native/EnrichedMarkdownText';
|
|
3
|
+
export { DEFAULT_ACCESSIBILITY_LABELS, resolveAccessibilityLabels, } from '../accessibilityLabelDefaults';
|
|
4
|
+
export declare const 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, }: EnrichedMarkdownTextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const EnrichedMarkdownText: ({ markdown, containerStyle, testID, accessible, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityState, nativeID, markdownStyle: _markdownStyle, 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, contextMenuItems: _contextMenuItems, imageRequestHeaders: _imageRequestHeaders, selectionMenuConfig: _selectionMenuConfig, accessibilityLabels: _accessibilityLabels, selectionColor: _selectionColor, selectionHandleColor: _selectionHandleColor, textBreakStrategy: _textBreakStrategy, lineBreakStrategyIOS: _lineBreakStrategyIOS, writingDirection: _writingDirection, }: EnrichedMarkdownTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/jest/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAGV,8BAA8B,EAE/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEhF,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AASvC,eAAO,MAAM,yBAAyB,GAAI,02BAuCvC,8BAA8B,4CAmFhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,o9BAiClC,yBAAyB,4CAe3B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { MarkdownStyle, Md4cFlags } from '../types/MarkdownStyle';
|
|
2
2
|
import type { EnrichedMarkdownTextProps, StreamingConfig, ContextMenuItem, SelectionMenuConfig, SelectionMenuPluralLabels } from '../types/MarkdownTextProps';
|
|
3
|
-
import type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent } from '../types/events';
|
|
3
|
+
import type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, CopyPressEvent } from '../types/events';
|
|
4
4
|
export type { MarkdownStyle, Md4cFlags };
|
|
5
5
|
export type { EnrichedMarkdownTextProps, StreamingConfig, ContextMenuItem, SelectionMenuConfig, SelectionMenuPluralLabels, };
|
|
6
|
-
export type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent };
|
|
7
|
-
export declare const 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 }: EnrichedMarkdownTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, CopyPressEvent, };
|
|
7
|
+
export declare const 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 }: EnrichedMarkdownTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default EnrichedMarkdownText;
|
|
9
9
|
//# sourceMappingURL=EnrichedMarkdownText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnrichedMarkdownText.d.ts","sourceRoot":"","sources":["../../../../src/native/EnrichedMarkdownText.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"EnrichedMarkdownText.d.ts","sourceRoot":"","sources":["../../../../src/native/EnrichedMarkdownText.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AACzC,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,yBAAyB,GAC1B,CAAC;AACF,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,GACf,CAAC;AAwEF,eAAO,MAAM,oBAAoB,GAAI,0fA8BlC,yBAAyB,4CA+M3B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeMarkdownStyle.d.ts","sourceRoot":"","sources":["../../../src/normalizeMarkdownStyle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAIV,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"normalizeMarkdownStyle.d.ts","sourceRoot":"","sources":["../../../src/normalizeMarkdownStyle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAIV,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAkSvC,eAAO,MAAM,sBAAsB,GACjC,OAAO,aAAa,KACnB,qBAqGF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeMarkdownStyle.web.d.ts","sourceRoot":"","sources":["../../../src/normalizeMarkdownStyle.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAIV,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"normalizeMarkdownStyle.web.d.ts","sourceRoot":"","sources":["../../../src/normalizeMarkdownStyle.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAIV,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAoPvC,eAAO,MAAM,sBAAsB,GACjC,OAAO,aAAa,KACnB,qBAiFF,CAAC"}
|
|
@@ -6,7 +6,7 @@ interface LinkVariantEntryInternal {
|
|
|
6
6
|
underline: boolean;
|
|
7
7
|
backgroundColor: ColorValue;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
9
|
+
interface InputInlineMathStyleInternal {
|
|
10
10
|
color: ColorValue;
|
|
11
11
|
fontSize: number;
|
|
12
12
|
backgroundColor: ColorValue;
|
|
@@ -19,10 +19,15 @@ interface MathStyleInternal {
|
|
|
19
19
|
selectedBorderColor: ColorValue;
|
|
20
20
|
fontWeight: string;
|
|
21
21
|
}
|
|
22
|
-
interface
|
|
22
|
+
interface InputMathStyleInternal extends InputInlineMathStyleInternal {
|
|
23
23
|
marginTop: number;
|
|
24
24
|
marginBottom: number;
|
|
25
|
-
|
|
25
|
+
textAlign: 'left' | 'center' | 'right';
|
|
26
|
+
}
|
|
27
|
+
interface HeadingStyleInternal {
|
|
28
|
+
fontSize: number;
|
|
29
|
+
fontWeight: string;
|
|
30
|
+
color: ColorValue;
|
|
26
31
|
}
|
|
27
32
|
interface MarkdownTextInputStyleInternal {
|
|
28
33
|
strong: {
|
|
@@ -41,8 +46,17 @@ interface MarkdownTextInputStyleInternal {
|
|
|
41
46
|
color: ColorValue;
|
|
42
47
|
backgroundColor: ColorValue;
|
|
43
48
|
};
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
inlineMath: InputInlineMathStyleInternal;
|
|
50
|
+
math: InputMathStyleInternal;
|
|
51
|
+
h1: HeadingStyleInternal;
|
|
52
|
+
h2: HeadingStyleInternal;
|
|
53
|
+
h3: HeadingStyleInternal;
|
|
54
|
+
h4: HeadingStyleInternal;
|
|
55
|
+
h5: HeadingStyleInternal;
|
|
56
|
+
h6: HeadingStyleInternal;
|
|
57
|
+
list: {
|
|
58
|
+
itemSpacing: number;
|
|
59
|
+
};
|
|
46
60
|
}
|
|
47
61
|
export declare const normalizeMarkdownTextInputStyle: (style?: MarkdownTextInputStyle) => MarkdownTextInputStyleInternal;
|
|
48
62
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeMarkdownTextInputStyle.d.ts","sourceRoot":"","sources":["../../../src/normalizeMarkdownTextInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"normalizeMarkdownTextInputStyle.d.ts","sourceRoot":"","sources":["../../../src/normalizeMarkdownTextInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAGV,sBAAsB,EAGvB,MAAM,6BAA6B,CAAC;AASrC,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,UAAU,CAAC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B,CAAC;IACzB,EAAE,EAAE,oBAAoB,CAAC;IACzB,EAAE,EAAE,oBAAoB,CAAC;IACzB,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAsLD,eAAO,MAAM,+BAA+B,GAC1C,QAAQ,sBAAsB,KAC7B,8BA4DF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
2
|
+
type ImageResizeMode = 'contain' | 'cover' | 'stretch' | 'center' | 'none';
|
|
2
3
|
interface BaseBlockStyle {
|
|
3
4
|
fontSize?: number;
|
|
4
5
|
fontFamily?: string;
|
|
@@ -19,6 +20,8 @@ interface BlockquoteStyle extends BaseBlockStyle {
|
|
|
19
20
|
borderWidth?: number;
|
|
20
21
|
gapWidth?: number;
|
|
21
22
|
backgroundColor?: string;
|
|
23
|
+
borderRadius?: number;
|
|
24
|
+
padding?: number;
|
|
22
25
|
}
|
|
23
26
|
interface ListStyle extends BaseBlockStyle {
|
|
24
27
|
bulletColor?: string;
|
|
@@ -32,6 +35,37 @@ interface ListStyle extends BaseBlockStyle {
|
|
|
32
35
|
markerFontWeight?: string;
|
|
33
36
|
gapWidth?: number;
|
|
34
37
|
marginLeft?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Vertical spacing between consecutive list items, including nested ones.
|
|
40
|
+
* Adds no space above the first item or below the last one — the outer
|
|
41
|
+
* edges are still controlled by `marginTop`/`marginBottom`.
|
|
42
|
+
* @default 0
|
|
43
|
+
*/
|
|
44
|
+
itemSpacing?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Per-token syntax highlight colors for fenced code blocks, keyed on the
|
|
48
|
+
* tree-sitter highlight token types. Any key omitted falls back to the default
|
|
49
|
+
* palette (Operator/Punctuation/Variable/Embedded inherit the code block's
|
|
50
|
+
* base `color`). Colors only take visible effect when the optional syntax
|
|
51
|
+
* highlighting module is compiled in; otherwise code blocks render uncolored.
|
|
52
|
+
*/
|
|
53
|
+
interface CodeBlockSyntaxColors {
|
|
54
|
+
keyword?: string;
|
|
55
|
+
/** Color for operator tokens (e.g. `+`, `=>`). */
|
|
56
|
+
operator?: string;
|
|
57
|
+
punctuation?: string;
|
|
58
|
+
string?: string;
|
|
59
|
+
number?: string;
|
|
60
|
+
constant?: string;
|
|
61
|
+
comment?: string;
|
|
62
|
+
function?: string;
|
|
63
|
+
type?: string;
|
|
64
|
+
variable?: string;
|
|
65
|
+
property?: string;
|
|
66
|
+
tag?: string;
|
|
67
|
+
attribute?: string;
|
|
68
|
+
embedded?: string;
|
|
35
69
|
}
|
|
36
70
|
interface CodeBlockStyle extends BaseBlockStyle {
|
|
37
71
|
backgroundColor?: string;
|
|
@@ -39,6 +73,7 @@ interface CodeBlockStyle extends BaseBlockStyle {
|
|
|
39
73
|
borderRadius?: number;
|
|
40
74
|
borderWidth?: number;
|
|
41
75
|
padding?: number;
|
|
76
|
+
syntaxColors?: CodeBlockSyntaxColors;
|
|
42
77
|
}
|
|
43
78
|
export interface LinkStyle {
|
|
44
79
|
fontFamily?: string;
|
|
@@ -94,6 +129,26 @@ interface CodeStyle {
|
|
|
94
129
|
}
|
|
95
130
|
interface ImageStyle {
|
|
96
131
|
height?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Maximum height the image is fitted into, preserving aspect ratio. When set,
|
|
134
|
+
* this replaces `height` as the primary sizing knob. Ignored when `aspectRatio`
|
|
135
|
+
* is set. Sizing precedence: `aspectRatio` > `maxHeight` > `height`.
|
|
136
|
+
*/
|
|
137
|
+
maxHeight?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Width / height ratio (e.g. `16 / 9`). The image fills the available width and
|
|
140
|
+
* its height is derived from this ratio, ignoring `height`/`maxHeight`.
|
|
141
|
+
* Sizing precedence: `aspectRatio` > `maxHeight` > `height`.
|
|
142
|
+
*/
|
|
143
|
+
aspectRatio?: number;
|
|
144
|
+
/**
|
|
145
|
+
* How the image fills its box, analogous to React Native `resizeMode` / CSS
|
|
146
|
+
* `object-fit`. Applies whenever set explicitly, including with a fixed
|
|
147
|
+
* `height` box. When omitted, block images keep the legacy fill-width
|
|
148
|
+
* behavior, unless `maxHeight` or `aspectRatio` is set — then it defaults
|
|
149
|
+
* to `'cover'`.
|
|
150
|
+
*/
|
|
151
|
+
resizeMode?: ImageResizeMode;
|
|
97
152
|
borderRadius?: number;
|
|
98
153
|
marginTop?: number;
|
|
99
154
|
marginBottom?: number;
|
|
@@ -118,6 +173,16 @@ interface TableStyle extends BaseBlockStyle {
|
|
|
118
173
|
borderRadius?: number;
|
|
119
174
|
cellPaddingHorizontal?: number;
|
|
120
175
|
cellPaddingVertical?: number;
|
|
176
|
+
horizontalOverflow?: number;
|
|
177
|
+
/**
|
|
178
|
+
* Horizontal alignment of the whole table within the container. Only applies
|
|
179
|
+
* when the table is narrower than the container; tables that overflow and
|
|
180
|
+
* scroll always start at the table's beginning. When unset, tables keep the
|
|
181
|
+
* legacy start-aligned placement. On web, setting any value (including
|
|
182
|
+
* 'left') also makes the table shrink to fit its content instead of filling
|
|
183
|
+
* the container width.
|
|
184
|
+
*/
|
|
185
|
+
align?: 'left' | 'center' | 'right';
|
|
121
186
|
}
|
|
122
187
|
interface TaskListStyle {
|
|
123
188
|
checkedColor?: string;
|
|
@@ -327,6 +392,13 @@ export interface Md4cFlags {
|
|
|
327
392
|
* @default false
|
|
328
393
|
*/
|
|
329
394
|
highlight?: boolean;
|
|
395
|
+
/**
|
|
396
|
+
* Treat soft breaks (single newlines) as hard breaks (visible line breaks).
|
|
397
|
+
* When enabled, a single newline in the source renders as a line break
|
|
398
|
+
* instead of being collapsed to a space (CommonMark default).
|
|
399
|
+
* @default false
|
|
400
|
+
*/
|
|
401
|
+
hardSoftBreaks?: boolean;
|
|
330
402
|
}
|
|
331
403
|
export {};
|
|
332
404
|
//# sourceMappingURL=MarkdownStyle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownStyle.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownStyle.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElE,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,cAAe,SAAQ,cAAc;IAC7C,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,YAAa,SAAQ,cAAc;IAC3C,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,eAAgB,SAAQ,cAAc;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownStyle.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownStyle.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElE,KAAK,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3E,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IAC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,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type BlockTextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
2
2
|
export type EmphasisFontStyle = 'normal' | 'italic' | 'oblique' | '';
|
|
3
|
+
export type TableAlign = 'left' | 'center' | 'right' | '';
|
|
4
|
+
export type ImageResizeMode = 'contain' | 'cover' | 'stretch' | 'center' | 'none' | '';
|
|
3
5
|
interface BaseBlockStyleInternal {
|
|
4
6
|
fontSize: number;
|
|
5
7
|
fontFamily: string;
|
|
@@ -20,6 +22,8 @@ interface BlockquoteStyleInternal extends BaseBlockStyleInternal {
|
|
|
20
22
|
borderWidth: number;
|
|
21
23
|
gapWidth: number;
|
|
22
24
|
backgroundColor: string;
|
|
25
|
+
borderRadius: number;
|
|
26
|
+
padding: number;
|
|
23
27
|
}
|
|
24
28
|
interface ListStyleInternal extends BaseBlockStyleInternal {
|
|
25
29
|
bulletColor: string;
|
|
@@ -29,6 +33,23 @@ interface ListStyleInternal extends BaseBlockStyleInternal {
|
|
|
29
33
|
markerFontWeight: string;
|
|
30
34
|
gapWidth: number;
|
|
31
35
|
marginLeft: number;
|
|
36
|
+
itemSpacing: number;
|
|
37
|
+
}
|
|
38
|
+
export interface CodeBlockSyntaxColorsInternal {
|
|
39
|
+
keyword: string;
|
|
40
|
+
operatorColor: string;
|
|
41
|
+
punctuation: string;
|
|
42
|
+
string: string;
|
|
43
|
+
number: string;
|
|
44
|
+
constant: string;
|
|
45
|
+
comment: string;
|
|
46
|
+
function: string;
|
|
47
|
+
type: string;
|
|
48
|
+
variable: string;
|
|
49
|
+
property: string;
|
|
50
|
+
tag: string;
|
|
51
|
+
attribute: string;
|
|
52
|
+
embedded: string;
|
|
32
53
|
}
|
|
33
54
|
interface CodeBlockStyleInternal extends BaseBlockStyleInternal {
|
|
34
55
|
backgroundColor: string;
|
|
@@ -36,6 +57,7 @@ interface CodeBlockStyleInternal extends BaseBlockStyleInternal {
|
|
|
36
57
|
borderRadius: number;
|
|
37
58
|
borderWidth: number;
|
|
38
59
|
padding: number;
|
|
60
|
+
syntaxColors: CodeBlockSyntaxColorsInternal;
|
|
39
61
|
}
|
|
40
62
|
interface LinkStyleInternal {
|
|
41
63
|
fontFamily: string;
|
|
@@ -74,6 +96,9 @@ interface CodeStyleInternal {
|
|
|
74
96
|
}
|
|
75
97
|
interface ImageStyleInternal {
|
|
76
98
|
height: number;
|
|
99
|
+
maxHeight: number;
|
|
100
|
+
aspectRatio: number;
|
|
101
|
+
resizeMode: ImageResizeMode;
|
|
77
102
|
borderRadius: number;
|
|
78
103
|
marginTop: number;
|
|
79
104
|
marginBottom: number;
|
|
@@ -98,6 +123,8 @@ interface TableStyleInternal extends BaseBlockStyleInternal {
|
|
|
98
123
|
borderRadius: number;
|
|
99
124
|
cellPaddingHorizontal: number;
|
|
100
125
|
cellPaddingVertical: number;
|
|
126
|
+
horizontalOverflow: number;
|
|
127
|
+
align: TableAlign;
|
|
101
128
|
}
|
|
102
129
|
interface TaskListStyleInternal {
|
|
103
130
|
checkedColor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownStyleInternal.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownStyleInternal.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAG9E,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownStyleInternal.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownStyleInternal.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAG9E,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,EAAE,CAAC;AAGrE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAC;AAI1D,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,GACN,EAAE,CAAC;AAEP,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,sBAAuB,SAAQ,sBAAsB;IAC7D,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED,UAAU,oBAAqB,SAAQ,sBAAsB;IAC3D,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED,UAAU,uBAAwB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AAC;IACtC,SAAS,EAAE,sBAAsB,CAAC;IAClC,SAAS,EAAE,sBAAsB,CAAC;CACnC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ColorValue, ViewProps, ViewStyle, TextStyle } from 'react-native';
|
|
2
2
|
import type { MarkdownStyle, Md4cFlags } from './MarkdownStyle';
|
|
3
3
|
import type { AccessibilityLabels } from './AccessibilityLabels';
|
|
4
|
-
import type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent } from './events';
|
|
4
|
+
import type { LinkPressEvent, LinkLongPressEvent, TaskListItemPressEvent, CopyPressEvent } from './events';
|
|
5
5
|
/**
|
|
6
6
|
* Public context menu item. Each item includes a JS-side `onPress` callback
|
|
7
7
|
* that is called when the user taps the item in the selection context menu.
|
|
@@ -52,24 +52,35 @@ export interface SelectionMenuPluralLabels {
|
|
|
52
52
|
* Controls the built-in items added to the native text selection menu and
|
|
53
53
|
* lets you localize their labels.
|
|
54
54
|
*
|
|
55
|
-
* Each item accepts an object: `{ enabled }` toggles visibility
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
55
|
+
* Each item accepts an object: `{ enabled }` toggles visibility and `label`
|
|
56
|
+
* overrides the English default. Wire `label` to your i18n library to match
|
|
57
|
+
* the rest of your app's UI. Items and labels apply to the main text selection
|
|
58
|
+
* menu as well as the table, math and code block copy menus.
|
|
59
|
+
*
|
|
60
|
+
* `copy.enabled`, `copy.format` and `systemItems` are ignored on macOS.
|
|
60
61
|
*
|
|
61
62
|
* @platform ios, android, macos
|
|
62
63
|
*/
|
|
63
64
|
export interface SelectionMenuConfig {
|
|
64
65
|
/**
|
|
65
|
-
* The
|
|
66
|
-
*
|
|
66
|
+
* The "Copy" item.
|
|
67
|
+
* - `enabled`: `false` removes it from the text selection menu, the table /
|
|
68
|
+
* math / code block menus and the code block VoiceOver copy action.
|
|
69
|
+
* - `format`: `'rich'` copies rich text (plain + HTML, plus RTF on iOS) from
|
|
70
|
+
* text selections and the raw content from blocks; `'markdown'` copies
|
|
71
|
+
* Markdown as plain text everywhere the item appears (inline math becomes
|
|
72
|
+
* `$…$`, math blocks `$$…$$`, code blocks are fenced). The code block header
|
|
73
|
+
* button and VoiceOver action always copy the raw code.
|
|
74
|
+
* @default { enabled: true, label: "Copy", format: "rich" }
|
|
67
75
|
*/
|
|
68
76
|
copy?: {
|
|
77
|
+
enabled?: boolean;
|
|
69
78
|
label?: string;
|
|
79
|
+
format?: 'rich' | 'markdown';
|
|
70
80
|
};
|
|
71
81
|
/**
|
|
72
|
-
* The built-in "Copy as Markdown" action
|
|
82
|
+
* The built-in "Copy as Markdown" action, in the text selection menu and in
|
|
83
|
+
* the table / math / code block menus.
|
|
73
84
|
* @default { enabled: true, label: "Copy as Markdown" }
|
|
74
85
|
*/
|
|
75
86
|
copyAsMarkdown?: {
|
|
@@ -87,6 +98,25 @@ export interface SelectionMenuConfig {
|
|
|
87
98
|
label?: string;
|
|
88
99
|
pluralLabels?: SelectionMenuPluralLabels;
|
|
89
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Which system items the text selection menu keeps.
|
|
103
|
+
* - `'default'`: keep everything the OS adds (Select All, Look Up, Share,
|
|
104
|
+
* Translate, app text actions…), with Copy replaced by the built-in one.
|
|
105
|
+
* - `'none'`: drop every system item; the menu only holds the built-in items
|
|
106
|
+
* above and `contextMenuItems`.
|
|
107
|
+
* @default 'default'
|
|
108
|
+
* @platform ios, android
|
|
109
|
+
*/
|
|
110
|
+
systemItems?: 'default' | 'none';
|
|
111
|
+
/**
|
|
112
|
+
* The copy button in the code block header. `false` hides the button; the
|
|
113
|
+
* header and language label stay.
|
|
114
|
+
* @default { enabled: true }
|
|
115
|
+
* @platform ios, android, macos
|
|
116
|
+
*/
|
|
117
|
+
codeBlockCopyButton?: {
|
|
118
|
+
enabled?: boolean;
|
|
119
|
+
};
|
|
90
120
|
}
|
|
91
121
|
export interface StreamingConfig {
|
|
92
122
|
/**
|
|
@@ -98,6 +128,18 @@ export interface StreamingConfig {
|
|
|
98
128
|
* @platform ios, android
|
|
99
129
|
*/
|
|
100
130
|
tableMode?: 'hidden' | 'progressive';
|
|
131
|
+
/**
|
|
132
|
+
* Controls how a fenced code block whose closing fence has not arrived yet
|
|
133
|
+
* is handled during streaming.
|
|
134
|
+
* - `'hidden'`: hide the entire code block until its closing fence arrives.
|
|
135
|
+
* - `'progressive'` (default): show the code as it streams in with its header
|
|
136
|
+
* visible but non-interactive (copying is disabled); syntax highlighting is
|
|
137
|
+
* deferred until the closing fence arrives, so it appears once atomically.
|
|
138
|
+
* Only effective when `streamingAnimation` is `true`.
|
|
139
|
+
* @default 'progressive'
|
|
140
|
+
* @platform ios, android
|
|
141
|
+
*/
|
|
142
|
+
codeBlockMode?: 'hidden' | 'progressive';
|
|
101
143
|
}
|
|
102
144
|
export interface EnrichedMarkdownTextProps extends Omit<ViewProps, 'style'> {
|
|
103
145
|
/**
|
|
@@ -148,6 +190,31 @@ export interface EnrichedMarkdownTextProps extends Omit<ViewProps, 'style'> {
|
|
|
148
190
|
* @platform ios, android, web
|
|
149
191
|
*/
|
|
150
192
|
onTaskListItemPress?: (event: TaskListItemPressEvent) => void;
|
|
193
|
+
/**
|
|
194
|
+
* Controls whether tapping a task list checkbox toggles its checked state.
|
|
195
|
+
*
|
|
196
|
+
* When `true` (default), tapping the checkbox toggles it and fires
|
|
197
|
+
* `onTaskListItemPress`. When `false`, the checkbox renders its markdown
|
|
198
|
+
* state read-only: the tap is fully inert — no visual toggle and no
|
|
199
|
+
* `onTaskListItemPress` emission. Text selection and links in the same row
|
|
200
|
+
* are unaffected.
|
|
201
|
+
*
|
|
202
|
+
* @default true
|
|
203
|
+
* @platform ios, android, web
|
|
204
|
+
*/
|
|
205
|
+
enableTaskListItemToggle?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Callback fired when code is copied from a fenced code block, via the header
|
|
208
|
+
* copy button, the long-press context-menu "Copy" action, or the VoiceOver
|
|
209
|
+
* copy action. Receives the copied code and its language. Does not fire for
|
|
210
|
+
* "Copy as Markdown", nor for the context-menu "Copy" when
|
|
211
|
+
* `selectionMenuConfig.copy.format` is `'markdown'`.
|
|
212
|
+
*
|
|
213
|
+
* Only fires when `flavor="github"` (the copy button is part of the GitHub
|
|
214
|
+
* flavor's container-based code block renderer).
|
|
215
|
+
* @platform ios, android, macos
|
|
216
|
+
*/
|
|
217
|
+
onCopyPress?: (event: CopyPressEvent) => void;
|
|
151
218
|
/**
|
|
152
219
|
* Controls whether the system link preview is shown on long press (iOS only).
|
|
153
220
|
*
|
|
@@ -253,6 +320,34 @@ export interface EnrichedMarkdownTextProps extends Omit<ViewProps, 'style'> {
|
|
|
253
320
|
* @platform ios, android
|
|
254
321
|
*/
|
|
255
322
|
contextMenuItems?: ContextMenuItem[];
|
|
323
|
+
/**
|
|
324
|
+
* HTTP headers to attach to remote image requests, e.g. a `Referer`
|
|
325
|
+
* required by CDN hotlink protection or an `Authorization` token.
|
|
326
|
+
*
|
|
327
|
+
* Headers participate in image cache identity, so the same URL requested
|
|
328
|
+
* with different headers is fetched and cached separately.
|
|
329
|
+
*
|
|
330
|
+
* Not supported on web — browsers don't allow custom headers on `<img>`
|
|
331
|
+
* requests.
|
|
332
|
+
* @platform ios, android
|
|
333
|
+
*/
|
|
334
|
+
imageRequestHeaders?: Record<string, string>;
|
|
335
|
+
/**
|
|
336
|
+
* Hides the text selection context menu. Text stays selectable (and stays
|
|
337
|
+
* reachable by TalkBack / VoiceOver) — only the menu is suppressed. Use
|
|
338
|
+
* `selectable={false}` instead if you want to disable selection itself.
|
|
339
|
+
*
|
|
340
|
+
* This hides the whole menu, including the custom items from
|
|
341
|
+
* `contextMenuItems` and the built-in items from `selectionMenuConfig`,
|
|
342
|
+
* since they all share one menu. It also covers the copy menus on table,
|
|
343
|
+
* math and code blocks.
|
|
344
|
+
*
|
|
345
|
+
* It does not suppress the system "Save to Camera Roll / Copy" sheet that
|
|
346
|
+
* UIKit shows when long-pressing an image.
|
|
347
|
+
* @default false
|
|
348
|
+
* @platform ios, android, macos
|
|
349
|
+
*/
|
|
350
|
+
contextMenuHidden?: boolean;
|
|
256
351
|
/**
|
|
257
352
|
* Controls the built-in items added to the native text selection menu and
|
|
258
353
|
* lets you localize their labels. Custom app-provided actions are controlled
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownTextProps.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownTextProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"MarkdownTextProps.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownTextProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACf,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;KAC3C,KAAK,IAAI,CAA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AClC;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IACvC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;;;;OAKG;IACH,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7B;;;;;;;;;;OAUG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAC;IAC1D;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,CAAC;IACxE;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,cAAc,CAAC;CAC5D"}
|
|
@@ -50,6 +50,25 @@ export interface EnrichedMarkdownTextProps extends Omit<HTMLAttributes<HTMLDivEl
|
|
|
50
50
|
* @platform ios, android, web
|
|
51
51
|
*/
|
|
52
52
|
onTaskListItemPress?: (event: TaskListItemPressEvent) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Controls whether tapping a task list checkbox toggles its checked state.
|
|
55
|
+
*
|
|
56
|
+
* When `true` (default), tapping the checkbox toggles it and fires
|
|
57
|
+
* `onTaskListItemPress`. When `false`, the checkbox renders its markdown
|
|
58
|
+
* state read-only: the tap is fully inert — no visual toggle and no
|
|
59
|
+
* `onTaskListItemPress` emission. Text selection and links in the same row
|
|
60
|
+
* are unaffected.
|
|
61
|
+
*
|
|
62
|
+
* On web the checkbox keeps its normal appearance and is marked
|
|
63
|
+
* `readOnly` / `aria-disabled` rather than `disabled`, so it stays visually
|
|
64
|
+
* consistent with iOS and Android. It is also made pointer-inert
|
|
65
|
+
* (`pointer-events: none`) so the browser cannot paint hover or active
|
|
66
|
+
* states on a checkbox that cannot be toggled.
|
|
67
|
+
*
|
|
68
|
+
* @default true
|
|
69
|
+
* @platform ios, android, web
|
|
70
|
+
*/
|
|
71
|
+
enableTaskListItemToggle?: boolean;
|
|
53
72
|
/**
|
|
54
73
|
* Controls text selection.
|
|
55
74
|
* - iOS: Controls text selection and link previews on long press.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownTextProps.web.d.ts","sourceRoot":"","sources":["../../../../src/types/MarkdownTextProps.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,cAAc,CAAC,cAAc,CAAC,EAC9B,OAAO,GAAG,KAAK,CAChB;IACC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,CAAC,K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nC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC9B"}
|
|
@@ -9,6 +9,10 @@ export interface TaskListItemPressEvent {
|
|
|
9
9
|
checked: boolean;
|
|
10
10
|
text: string;
|
|
11
11
|
}
|
|
12
|
+
export interface CopyPressEvent {
|
|
13
|
+
code: string;
|
|
14
|
+
language: string;
|
|
15
|
+
}
|
|
12
16
|
/**
|
|
13
17
|
* Native-level context menu item config sent to the native component.
|
|
14
18
|
* Does not include the `onPress` callback — callbacks are managed on the JS side.
|
|
@@ -26,4 +30,19 @@ export interface OnContextMenuItemPressEvent {
|
|
|
26
30
|
selectionStart: number;
|
|
27
31
|
selectionEnd: number;
|
|
28
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Event payload fired by the native component when the user pastes while
|
|
35
|
+
* `interceptPaste` is on. Native does not touch the buffer — it only reports
|
|
36
|
+
* what the clipboard held. The handler must call `resolvePaste` exactly once,
|
|
37
|
+
* or the paste is dropped.
|
|
38
|
+
*/
|
|
39
|
+
export interface OnPasteEvent {
|
|
40
|
+
/** Plain text from the clipboard, verbatim, before the text view sees it. */
|
|
41
|
+
text: string;
|
|
42
|
+
/**
|
|
43
|
+
* Markdown flavor, set only when the copy source was an input of this
|
|
44
|
+
* component. iOS-only; Android always reports `''`.
|
|
45
|
+
*/
|
|
46
|
+
markdown: string;
|
|
47
|
+
}
|
|
29
48
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|