react-native-enriched-markdown-scaffold 1.0.2-scaffold.3 → 1.0.2-scaffold.5
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/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +15 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +3 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +15 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +3 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp +122 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h +100 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +20 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +124 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdown.kt +145 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +22 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +85 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +22 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/LinkLayoutEvent.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/SelectionChangeEvent.kt +42 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/LinkRenderer.kt +37 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SpanStyleCache.kt +5 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBackgroundSpan.kt +13 -99
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/InlineChipPainter.kt +140 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LinkChipSpans.kt +177 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LinkSpan.kt +1 -6
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/LinkStyle.kt +36 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/LinkVariantEntry.kt +7 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownViewManagerUtils.kt +28 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/conversion/HTMLGenerator.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/conversion/MarkdownExtractor.kt +6 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/LinkLayoutCollector.kt +100 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionActionMode.kt +4 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionChangeReporter.kt +230 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt +11 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/views/TableContainerView.kt +22 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +8 -1
- package/docs/API_REFERENCE.md +111 -0
- package/docs/MENTIONS.md +8 -1
- package/docs/STYLES.md +27 -0
- package/docs/TEXT.md +2 -0
- package/ios/EnrichedMarkdown.mm +221 -1
- package/ios/EnrichedMarkdownText.mm +142 -1
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.cpp +122 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.h +100 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +20 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +124 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +50 -2
- package/ios/internals/MeasurementCache.h +5 -0
- package/ios/renderer/LinkRenderer.m +47 -15
- package/ios/styles/StyleConfig.h +16 -0
- package/ios/styles/StyleConfig.mm +60 -0
- package/ios/utils/CodeBackground.m +3 -65
- package/ios/utils/ENRMChipDrawing.h +24 -0
- package/ios/utils/ENRMChipDrawing.m +83 -0
- package/ios/utils/ENRMLinkChip.h +70 -0
- package/ios/utils/ENRMLinkChip.m +194 -0
- package/ios/utils/ENRMLinkLayout.h +50 -0
- package/ios/utils/ENRMLinkLayout.m +45 -0
- package/ios/utils/ENRMSelectionChange.h +96 -0
- package/ios/utils/ENRMSelectionChange.m +204 -0
- package/ios/utils/EditMenuUtils+macOS.m +4 -1
- package/ios/utils/EditMenuUtils.m +4 -1
- package/ios/utils/HTMLGenerator.m +2 -1
- package/ios/utils/MarkdownAccessibilityElementBuilder.m +3 -1
- package/ios/utils/MarkdownExtractor.m +2 -1
- package/ios/utils/RTFExportUtils.m +2 -0
- package/ios/utils/StylePropsUtils.h +37 -1
- package/ios/utils/TextViewLayoutManager.mm +3 -0
- package/ios/views/ENRMCodeBlockContainerView.h +3 -0
- package/ios/views/ENRMCodeBlockContainerView.m +3 -0
- package/ios/views/ENRMMathContainerView.h +3 -0
- package/ios/views/ENRMMathContainerView.m +3 -0
- package/ios/views/TableContainerView.h +6 -0
- package/ios/views/TableContainerView.m +24 -0
- package/lib/module/EnrichedMarkdownNativeComponent.ts +101 -1
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +101 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/jest/index.js +13 -0
- package/lib/module/jest/index.js.map +1 -1
- package/lib/module/native/EnrichedMarkdownText.js +138 -9
- package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.js +13 -2
- package/lib/module/normalizeMarkdownStyle.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.web.js +13 -2
- package/lib/module/normalizeMarkdownStyle.web.js.map +1 -1
- package/lib/module/web/EnrichedMarkdownText.js +6 -3
- package/lib/module/web/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/web/renderers/InlineRenderers.js +96 -3
- package/lib/module/web/renderers/InlineRenderers.js.map +1 -1
- package/lib/module/web/styles.js +18 -0
- package/lib/module/web/styles.js.map +1 -1
- package/lib/module/web/utils.js +13 -0
- package/lib/module/web/utils.js.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts +93 -2
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +93 -2
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts.map +1 -1
- 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 +1 -1
- package/lib/typescript/src/jest/index.d.ts.map +1 -1
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts +5 -5
- 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/types/MarkdownStyle.d.ts +28 -5
- package/lib/typescript/src/types/MarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts +10 -0
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts +76 -2
- package/lib/typescript/src/types/MarkdownTextProps.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts +41 -1
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts.map +1 -1
- package/lib/typescript/src/types/events.d.ts +36 -0
- package/lib/typescript/src/types/events.d.ts.map +1 -1
- 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/renderers/InlineRenderers.d.ts.map +1 -1
- package/lib/typescript/src/web/styles.d.ts.map +1 -1
- package/lib/typescript/src/web/types.d.ts +4 -0
- package/lib/typescript/src/web/types.d.ts.map +1 -1
- package/lib/typescript/src/web/utils.d.ts +4 -0
- package/lib/typescript/src/web/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/EnrichedMarkdownNativeComponent.ts +101 -1
- package/src/EnrichedMarkdownTextNativeComponent.ts +101 -1
- package/src/index.tsx +5 -0
- package/src/index.web.tsx +5 -1
- package/src/jest/index.tsx +21 -1
- package/src/native/EnrichedMarkdownText.tsx +181 -8
- package/src/normalizeMarkdownStyle.ts +13 -0
- package/src/normalizeMarkdownStyle.web.ts +11 -0
- package/src/types/MarkdownStyle.ts +29 -5
- package/src/types/MarkdownStyleInternal.ts +10 -0
- package/src/types/MarkdownTextProps.ts +85 -1
- package/src/types/MarkdownTextProps.web.ts +43 -1
- package/src/types/events.ts +38 -0
- package/src/web/EnrichedMarkdownText.tsx +10 -3
- package/src/web/renderers/InlineRenderers.tsx +111 -3
- package/src/web/styles.ts +25 -0
- package/src/web/types.ts +4 -0
- package/src/web/utils.ts +8 -0
package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java
CHANGED
|
@@ -32,6 +32,12 @@ public class EnrichedMarkdownManagerDelegate<T extends View, U extends BaseViewM
|
|
|
32
32
|
case "markdownStyle":
|
|
33
33
|
mViewManager.setMarkdownStyle(view, (ReadableMap) value);
|
|
34
34
|
break;
|
|
35
|
+
case "emitLinkLayout":
|
|
36
|
+
mViewManager.setEmitLinkLayout(view, value == null ? false : (boolean) value);
|
|
37
|
+
break;
|
|
38
|
+
case "emitSelectionChange":
|
|
39
|
+
mViewManager.setEmitSelectionChange(view, value == null ? false : (boolean) value);
|
|
40
|
+
break;
|
|
35
41
|
case "enableTaskListItemToggle":
|
|
36
42
|
mViewManager.setEnableTaskListItemToggle(view, value == null ? true : (boolean) value);
|
|
37
43
|
break;
|
|
@@ -96,4 +102,13 @@ public class EnrichedMarkdownManagerDelegate<T extends View, U extends BaseViewM
|
|
|
96
102
|
super.setProperty(view, propName, value);
|
|
97
103
|
}
|
|
98
104
|
}
|
|
105
|
+
|
|
106
|
+
@Override
|
|
107
|
+
public void receiveCommand(T view, String commandName, ReadableArray args) {
|
|
108
|
+
switch (commandName) {
|
|
109
|
+
case "clearSelection":
|
|
110
|
+
mViewManager.clearSelection(view);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
99
114
|
}
|
package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java
CHANGED
|
@@ -18,6 +18,8 @@ import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
|
|
18
18
|
public interface EnrichedMarkdownManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
19
19
|
void setMarkdown(T view, @Nullable String value);
|
|
20
20
|
void setMarkdownStyle(T view, @Nullable ReadableMap value);
|
|
21
|
+
void setEmitLinkLayout(T view, boolean value);
|
|
22
|
+
void setEmitSelectionChange(T view, boolean value);
|
|
21
23
|
void setEnableTaskListItemToggle(T view, boolean value);
|
|
22
24
|
void setEnableLinkPreview(T view, boolean value);
|
|
23
25
|
void setSelectable(T view, boolean value);
|
|
@@ -38,4 +40,5 @@ public interface EnrichedMarkdownManagerInterface<T extends View> extends ViewMa
|
|
|
38
40
|
void setTextBreakStrategy(T view, @Nullable String value);
|
|
39
41
|
void setLineBreakStrategyIOS(T view, @Nullable String value);
|
|
40
42
|
void setWritingDirection(T view, @Nullable String value);
|
|
43
|
+
void clearSelection(T view);
|
|
41
44
|
}
|
|
@@ -32,6 +32,12 @@ public class EnrichedMarkdownTextManagerDelegate<T extends View, U extends BaseV
|
|
|
32
32
|
case "markdownStyle":
|
|
33
33
|
mViewManager.setMarkdownStyle(view, (ReadableMap) value);
|
|
34
34
|
break;
|
|
35
|
+
case "emitLinkLayout":
|
|
36
|
+
mViewManager.setEmitLinkLayout(view, value == null ? false : (boolean) value);
|
|
37
|
+
break;
|
|
38
|
+
case "emitSelectionChange":
|
|
39
|
+
mViewManager.setEmitSelectionChange(view, value == null ? false : (boolean) value);
|
|
40
|
+
break;
|
|
35
41
|
case "enableTaskListItemToggle":
|
|
36
42
|
mViewManager.setEnableTaskListItemToggle(view, value == null ? true : (boolean) value);
|
|
37
43
|
break;
|
|
@@ -96,4 +102,13 @@ public class EnrichedMarkdownTextManagerDelegate<T extends View, U extends BaseV
|
|
|
96
102
|
super.setProperty(view, propName, value);
|
|
97
103
|
}
|
|
98
104
|
}
|
|
105
|
+
|
|
106
|
+
@Override
|
|
107
|
+
public void receiveCommand(T view, String commandName, ReadableArray args) {
|
|
108
|
+
switch (commandName) {
|
|
109
|
+
case "clearSelection":
|
|
110
|
+
mViewManager.clearSelection(view);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
99
114
|
}
|
|
@@ -18,6 +18,8 @@ import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
|
|
18
18
|
public interface EnrichedMarkdownTextManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
19
19
|
void setMarkdown(T view, @Nullable String value);
|
|
20
20
|
void setMarkdownStyle(T view, @Nullable ReadableMap value);
|
|
21
|
+
void setEmitLinkLayout(T view, boolean value);
|
|
22
|
+
void setEmitSelectionChange(T view, boolean value);
|
|
21
23
|
void setEnableTaskListItemToggle(T view, boolean value);
|
|
22
24
|
void setEnableLinkPreview(T view, boolean value);
|
|
23
25
|
void setSelectable(T view, boolean value);
|
|
@@ -38,4 +40,5 @@ public interface EnrichedMarkdownTextManagerInterface<T extends View> extends Vi
|
|
|
38
40
|
void setTextBreakStrategy(T view, @Nullable String value);
|
|
39
41
|
void setLineBreakStrategyIOS(T view, @Nullable String value);
|
|
40
42
|
void setWritingDirection(T view, @Nullable String value);
|
|
43
|
+
void clearSelection(T view);
|
|
41
44
|
}
|
package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp
CHANGED
|
@@ -31,6 +31,67 @@ void EnrichedMarkdownEventEmitter::onLinkLongPress(OnLinkLongPress event) const
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
void EnrichedMarkdownEventEmitter::onLinkLayout(OnLinkLayout event) const {
|
|
35
|
+
dispatchEvent("linkLayout", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
36
|
+
auto payload = jsi::Object(runtime);
|
|
37
|
+
|
|
38
|
+
auto fragments = jsi::Array(runtime, event.fragments.size());
|
|
39
|
+
size_t fragmentsIndex = 0;
|
|
40
|
+
for (auto fragmentsValue : event.fragments) {
|
|
41
|
+
auto fragmentsObject = jsi::Object(runtime);
|
|
42
|
+
fragmentsObject.setProperty(runtime, "linkIndex", fragmentsValue.linkIndex);
|
|
43
|
+
fragmentsObject.setProperty(runtime, "url", fragmentsValue.url);
|
|
44
|
+
fragmentsObject.setProperty(runtime, "text", fragmentsValue.text);
|
|
45
|
+
fragmentsObject.setProperty(runtime, "x", fragmentsValue.x);
|
|
46
|
+
fragmentsObject.setProperty(runtime, "y", fragmentsValue.y);
|
|
47
|
+
fragmentsObject.setProperty(runtime, "width", fragmentsValue.width);
|
|
48
|
+
fragmentsObject.setProperty(runtime, "height", fragmentsValue.height);
|
|
49
|
+
fragments.setValueAtIndex(runtime, fragmentsIndex++, fragmentsObject);
|
|
50
|
+
}
|
|
51
|
+
payload.setProperty(runtime, "fragments", fragments);
|
|
52
|
+
|
|
53
|
+
return payload;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
void EnrichedMarkdownEventEmitter::onSelectionChange(OnSelectionChange event) const {
|
|
59
|
+
dispatchEvent("selectionChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
60
|
+
auto payload = jsi::Object(runtime);
|
|
61
|
+
payload.setProperty(runtime, "active", event.active);
|
|
62
|
+
payload.setProperty(runtime, "source", event.source);
|
|
63
|
+
payload.setProperty(runtime, "text", event.text);
|
|
64
|
+
payload.setProperty(runtime, "markdown", event.markdown);
|
|
65
|
+
payload.setProperty(runtime, "whole", event.whole);
|
|
66
|
+
{
|
|
67
|
+
auto rect = jsi::Object(runtime);
|
|
68
|
+
rect.setProperty(runtime, "x", event.rect.x);
|
|
69
|
+
rect.setProperty(runtime, "y", event.rect.y);
|
|
70
|
+
rect.setProperty(runtime, "width", event.rect.width);
|
|
71
|
+
rect.setProperty(runtime, "height", event.rect.height);
|
|
72
|
+
payload.setProperty(runtime, "rect", rect);
|
|
73
|
+
}
|
|
74
|
+
{
|
|
75
|
+
auto startRect = jsi::Object(runtime);
|
|
76
|
+
startRect.setProperty(runtime, "x", event.startRect.x);
|
|
77
|
+
startRect.setProperty(runtime, "y", event.startRect.y);
|
|
78
|
+
startRect.setProperty(runtime, "width", event.startRect.width);
|
|
79
|
+
startRect.setProperty(runtime, "height", event.startRect.height);
|
|
80
|
+
payload.setProperty(runtime, "startRect", startRect);
|
|
81
|
+
}
|
|
82
|
+
{
|
|
83
|
+
auto endRect = jsi::Object(runtime);
|
|
84
|
+
endRect.setProperty(runtime, "x", event.endRect.x);
|
|
85
|
+
endRect.setProperty(runtime, "y", event.endRect.y);
|
|
86
|
+
endRect.setProperty(runtime, "width", event.endRect.width);
|
|
87
|
+
endRect.setProperty(runtime, "height", event.endRect.height);
|
|
88
|
+
payload.setProperty(runtime, "endRect", endRect);
|
|
89
|
+
}
|
|
90
|
+
return payload;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
34
95
|
void EnrichedMarkdownEventEmitter::onTaskListItemPress(OnTaskListItemPress event) const {
|
|
35
96
|
dispatchEvent("taskListItemPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
36
97
|
auto payload = jsi::Object(runtime);
|
|
@@ -370,6 +431,67 @@ void EnrichedMarkdownTextEventEmitter::onLinkLongPress(OnLinkLongPress event) co
|
|
|
370
431
|
}
|
|
371
432
|
|
|
372
433
|
|
|
434
|
+
void EnrichedMarkdownTextEventEmitter::onLinkLayout(OnLinkLayout event) const {
|
|
435
|
+
dispatchEvent("linkLayout", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
436
|
+
auto payload = jsi::Object(runtime);
|
|
437
|
+
|
|
438
|
+
auto fragments = jsi::Array(runtime, event.fragments.size());
|
|
439
|
+
size_t fragmentsIndex = 0;
|
|
440
|
+
for (auto fragmentsValue : event.fragments) {
|
|
441
|
+
auto fragmentsObject = jsi::Object(runtime);
|
|
442
|
+
fragmentsObject.setProperty(runtime, "linkIndex", fragmentsValue.linkIndex);
|
|
443
|
+
fragmentsObject.setProperty(runtime, "url", fragmentsValue.url);
|
|
444
|
+
fragmentsObject.setProperty(runtime, "text", fragmentsValue.text);
|
|
445
|
+
fragmentsObject.setProperty(runtime, "x", fragmentsValue.x);
|
|
446
|
+
fragmentsObject.setProperty(runtime, "y", fragmentsValue.y);
|
|
447
|
+
fragmentsObject.setProperty(runtime, "width", fragmentsValue.width);
|
|
448
|
+
fragmentsObject.setProperty(runtime, "height", fragmentsValue.height);
|
|
449
|
+
fragments.setValueAtIndex(runtime, fragmentsIndex++, fragmentsObject);
|
|
450
|
+
}
|
|
451
|
+
payload.setProperty(runtime, "fragments", fragments);
|
|
452
|
+
|
|
453
|
+
return payload;
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
void EnrichedMarkdownTextEventEmitter::onSelectionChange(OnSelectionChange event) const {
|
|
459
|
+
dispatchEvent("selectionChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
460
|
+
auto payload = jsi::Object(runtime);
|
|
461
|
+
payload.setProperty(runtime, "active", event.active);
|
|
462
|
+
payload.setProperty(runtime, "source", event.source);
|
|
463
|
+
payload.setProperty(runtime, "text", event.text);
|
|
464
|
+
payload.setProperty(runtime, "markdown", event.markdown);
|
|
465
|
+
payload.setProperty(runtime, "whole", event.whole);
|
|
466
|
+
{
|
|
467
|
+
auto rect = jsi::Object(runtime);
|
|
468
|
+
rect.setProperty(runtime, "x", event.rect.x);
|
|
469
|
+
rect.setProperty(runtime, "y", event.rect.y);
|
|
470
|
+
rect.setProperty(runtime, "width", event.rect.width);
|
|
471
|
+
rect.setProperty(runtime, "height", event.rect.height);
|
|
472
|
+
payload.setProperty(runtime, "rect", rect);
|
|
473
|
+
}
|
|
474
|
+
{
|
|
475
|
+
auto startRect = jsi::Object(runtime);
|
|
476
|
+
startRect.setProperty(runtime, "x", event.startRect.x);
|
|
477
|
+
startRect.setProperty(runtime, "y", event.startRect.y);
|
|
478
|
+
startRect.setProperty(runtime, "width", event.startRect.width);
|
|
479
|
+
startRect.setProperty(runtime, "height", event.startRect.height);
|
|
480
|
+
payload.setProperty(runtime, "startRect", startRect);
|
|
481
|
+
}
|
|
482
|
+
{
|
|
483
|
+
auto endRect = jsi::Object(runtime);
|
|
484
|
+
endRect.setProperty(runtime, "x", event.endRect.x);
|
|
485
|
+
endRect.setProperty(runtime, "y", event.endRect.y);
|
|
486
|
+
endRect.setProperty(runtime, "width", event.endRect.width);
|
|
487
|
+
endRect.setProperty(runtime, "height", event.endRect.height);
|
|
488
|
+
payload.setProperty(runtime, "endRect", endRect);
|
|
489
|
+
}
|
|
490
|
+
return payload;
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
|
|
373
495
|
void EnrichedMarkdownTextEventEmitter::onTaskListItemPress(OnTaskListItemPress event) const {
|
|
374
496
|
dispatchEvent("taskListItemPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
375
497
|
auto payload = jsi::Object(runtime);
|
package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h
CHANGED
|
@@ -25,6 +25,52 @@ class EnrichedMarkdownEventEmitter : public ViewEventEmitter {
|
|
|
25
25
|
std::string url;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
+
struct OnLinkLayoutFragments {
|
|
29
|
+
int linkIndex;
|
|
30
|
+
std::string url;
|
|
31
|
+
std::string text;
|
|
32
|
+
double x;
|
|
33
|
+
double y;
|
|
34
|
+
double width;
|
|
35
|
+
double height;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
struct OnLinkLayout {
|
|
39
|
+
std::vector<OnLinkLayoutFragments> fragments;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
struct OnSelectionChangeRect {
|
|
43
|
+
double x;
|
|
44
|
+
double y;
|
|
45
|
+
double width;
|
|
46
|
+
double height;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
struct OnSelectionChangeStartRect {
|
|
50
|
+
double x;
|
|
51
|
+
double y;
|
|
52
|
+
double width;
|
|
53
|
+
double height;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
struct OnSelectionChangeEndRect {
|
|
57
|
+
double x;
|
|
58
|
+
double y;
|
|
59
|
+
double width;
|
|
60
|
+
double height;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
struct OnSelectionChange {
|
|
64
|
+
bool active;
|
|
65
|
+
std::string source;
|
|
66
|
+
std::string text;
|
|
67
|
+
std::string markdown;
|
|
68
|
+
bool whole;
|
|
69
|
+
OnSelectionChangeRect rect;
|
|
70
|
+
OnSelectionChangeStartRect startRect;
|
|
71
|
+
OnSelectionChangeEndRect endRect;
|
|
72
|
+
};
|
|
73
|
+
|
|
28
74
|
struct OnTaskListItemPress {
|
|
29
75
|
int index;
|
|
30
76
|
bool checked;
|
|
@@ -53,6 +99,10 @@ class EnrichedMarkdownEventEmitter : public ViewEventEmitter {
|
|
|
53
99
|
|
|
54
100
|
void onLinkLongPress(OnLinkLongPress value) const;
|
|
55
101
|
|
|
102
|
+
void onLinkLayout(OnLinkLayout value) const;
|
|
103
|
+
|
|
104
|
+
void onSelectionChange(OnSelectionChange value) const;
|
|
105
|
+
|
|
56
106
|
void onTaskListItemPress(OnTaskListItemPress value) const;
|
|
57
107
|
|
|
58
108
|
void onCopyPress(OnCopyPress value) const;
|
|
@@ -301,6 +351,52 @@ class EnrichedMarkdownTextEventEmitter : public ViewEventEmitter {
|
|
|
301
351
|
std::string url;
|
|
302
352
|
};
|
|
303
353
|
|
|
354
|
+
struct OnLinkLayoutFragments {
|
|
355
|
+
int linkIndex;
|
|
356
|
+
std::string url;
|
|
357
|
+
std::string text;
|
|
358
|
+
double x;
|
|
359
|
+
double y;
|
|
360
|
+
double width;
|
|
361
|
+
double height;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
struct OnLinkLayout {
|
|
365
|
+
std::vector<OnLinkLayoutFragments> fragments;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
struct OnSelectionChangeRect {
|
|
369
|
+
double x;
|
|
370
|
+
double y;
|
|
371
|
+
double width;
|
|
372
|
+
double height;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
struct OnSelectionChangeStartRect {
|
|
376
|
+
double x;
|
|
377
|
+
double y;
|
|
378
|
+
double width;
|
|
379
|
+
double height;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
struct OnSelectionChangeEndRect {
|
|
383
|
+
double x;
|
|
384
|
+
double y;
|
|
385
|
+
double width;
|
|
386
|
+
double height;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
struct OnSelectionChange {
|
|
390
|
+
bool active;
|
|
391
|
+
std::string source;
|
|
392
|
+
std::string text;
|
|
393
|
+
std::string markdown;
|
|
394
|
+
bool whole;
|
|
395
|
+
OnSelectionChangeRect rect;
|
|
396
|
+
OnSelectionChangeStartRect startRect;
|
|
397
|
+
OnSelectionChangeEndRect endRect;
|
|
398
|
+
};
|
|
399
|
+
|
|
304
400
|
struct OnTaskListItemPress {
|
|
305
401
|
int index;
|
|
306
402
|
bool checked;
|
|
@@ -329,6 +425,10 @@ class EnrichedMarkdownTextEventEmitter : public ViewEventEmitter {
|
|
|
329
425
|
|
|
330
426
|
void onLinkLongPress(OnLinkLongPress value) const;
|
|
331
427
|
|
|
428
|
+
void onLinkLayout(OnLinkLayout value) const;
|
|
429
|
+
|
|
430
|
+
void onSelectionChange(OnSelectionChange value) const;
|
|
431
|
+
|
|
332
432
|
void onTaskListItemPress(OnTaskListItemPress value) const;
|
|
333
433
|
|
|
334
434
|
void onCopyPress(OnCopyPress value) const;
|
|
@@ -21,6 +21,8 @@ EnrichedMarkdownProps::EnrichedMarkdownProps(
|
|
|
21
21
|
|
|
22
22
|
markdown(convertRawProp(context, rawProps, "markdown", sourceProps.markdown, {})),
|
|
23
23
|
markdownStyle(convertRawProp(context, rawProps, "markdownStyle", sourceProps.markdownStyle, {})),
|
|
24
|
+
emitLinkLayout(convertRawProp(context, rawProps, "emitLinkLayout", sourceProps.emitLinkLayout, {false})),
|
|
25
|
+
emitSelectionChange(convertRawProp(context, rawProps, "emitSelectionChange", sourceProps.emitSelectionChange, {false})),
|
|
24
26
|
enableTaskListItemToggle(convertRawProp(context, rawProps, "enableTaskListItemToggle", sourceProps.enableTaskListItemToggle, {true})),
|
|
25
27
|
enableLinkPreview(convertRawProp(context, rawProps, "enableLinkPreview", sourceProps.enableLinkPreview, {true})),
|
|
26
28
|
selectable(convertRawProp(context, rawProps, "selectable", sourceProps.selectable, {false})),
|
|
@@ -66,6 +68,14 @@ folly::dynamic EnrichedMarkdownProps::getDiffProps(
|
|
|
66
68
|
result["markdownStyle"] = toDynamic(markdownStyle);
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
if (emitLinkLayout != oldProps->emitLinkLayout) {
|
|
72
|
+
result["emitLinkLayout"] = emitLinkLayout;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (emitSelectionChange != oldProps->emitSelectionChange) {
|
|
76
|
+
result["emitSelectionChange"] = emitSelectionChange;
|
|
77
|
+
}
|
|
78
|
+
|
|
69
79
|
if (enableTaskListItemToggle != oldProps->enableTaskListItemToggle) {
|
|
70
80
|
result["enableTaskListItemToggle"] = enableTaskListItemToggle;
|
|
71
81
|
}
|
|
@@ -304,6 +314,8 @@ EnrichedMarkdownTextProps::EnrichedMarkdownTextProps(
|
|
|
304
314
|
|
|
305
315
|
markdown(convertRawProp(context, rawProps, "markdown", sourceProps.markdown, {})),
|
|
306
316
|
markdownStyle(convertRawProp(context, rawProps, "markdownStyle", sourceProps.markdownStyle, {})),
|
|
317
|
+
emitLinkLayout(convertRawProp(context, rawProps, "emitLinkLayout", sourceProps.emitLinkLayout, {false})),
|
|
318
|
+
emitSelectionChange(convertRawProp(context, rawProps, "emitSelectionChange", sourceProps.emitSelectionChange, {false})),
|
|
307
319
|
enableTaskListItemToggle(convertRawProp(context, rawProps, "enableTaskListItemToggle", sourceProps.enableTaskListItemToggle, {true})),
|
|
308
320
|
enableLinkPreview(convertRawProp(context, rawProps, "enableLinkPreview", sourceProps.enableLinkPreview, {true})),
|
|
309
321
|
selectable(convertRawProp(context, rawProps, "selectable", sourceProps.selectable, {false})),
|
|
@@ -349,6 +361,14 @@ folly::dynamic EnrichedMarkdownTextProps::getDiffProps(
|
|
|
349
361
|
result["markdownStyle"] = toDynamic(markdownStyle);
|
|
350
362
|
}
|
|
351
363
|
|
|
364
|
+
if (emitLinkLayout != oldProps->emitLinkLayout) {
|
|
365
|
+
result["emitLinkLayout"] = emitLinkLayout;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (emitSelectionChange != oldProps->emitSelectionChange) {
|
|
369
|
+
result["emitSelectionChange"] = emitSelectionChange;
|
|
370
|
+
}
|
|
371
|
+
|
|
352
372
|
if (enableTaskListItemToggle != oldProps->enableTaskListItemToggle) {
|
|
353
373
|
result["enableTaskListItemToggle"] = enableTaskListItemToggle;
|
|
354
374
|
}
|
|
@@ -997,6 +997,11 @@ struct EnrichedMarkdownMarkdownStyleLinkStruct {
|
|
|
997
997
|
SharedColor color{};
|
|
998
998
|
bool underline{false};
|
|
999
999
|
SharedColor backgroundColor{};
|
|
1000
|
+
Float borderRadius{0.0};
|
|
1001
|
+
Float paddingHorizontal{0.0};
|
|
1002
|
+
Float paddingVertical{0.0};
|
|
1003
|
+
SharedColor borderColor{};
|
|
1004
|
+
Float borderWidth{0.0};
|
|
1000
1005
|
|
|
1001
1006
|
|
|
1002
1007
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1008,6 +1013,11 @@ struct EnrichedMarkdownMarkdownStyleLinkStruct {
|
|
|
1008
1013
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
1009
1014
|
result["underline"] = underline;
|
|
1010
1015
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1016
|
+
result["borderRadius"] = borderRadius;
|
|
1017
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
1018
|
+
result["paddingVertical"] = paddingVertical;
|
|
1019
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
1020
|
+
result["borderWidth"] = borderWidth;
|
|
1011
1021
|
return result;
|
|
1012
1022
|
}
|
|
1013
1023
|
#endif
|
|
@@ -1032,6 +1042,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1032
1042
|
if (tmp_backgroundColor != map.end()) {
|
|
1033
1043
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
1034
1044
|
}
|
|
1045
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
1046
|
+
if (tmp_borderRadius != map.end()) {
|
|
1047
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
1048
|
+
}
|
|
1049
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
1050
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
1051
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
1052
|
+
}
|
|
1053
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
1054
|
+
if (tmp_paddingVertical != map.end()) {
|
|
1055
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
1056
|
+
}
|
|
1057
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
1058
|
+
if (tmp_borderColor != map.end()) {
|
|
1059
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
1060
|
+
}
|
|
1061
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
1062
|
+
if (tmp_borderWidth != map.end()) {
|
|
1063
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
1064
|
+
}
|
|
1035
1065
|
}
|
|
1036
1066
|
|
|
1037
1067
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleLinkStruct &value) {
|
|
@@ -1049,6 +1079,11 @@ struct EnrichedMarkdownMarkdownStyleLinkVariantsStruct {
|
|
|
1049
1079
|
SharedColor color{};
|
|
1050
1080
|
bool underline{false};
|
|
1051
1081
|
SharedColor backgroundColor{};
|
|
1082
|
+
Float borderRadius{0.0};
|
|
1083
|
+
Float paddingHorizontal{0.0};
|
|
1084
|
+
Float paddingVertical{0.0};
|
|
1085
|
+
SharedColor borderColor{};
|
|
1086
|
+
Float borderWidth{0.0};
|
|
1052
1087
|
|
|
1053
1088
|
|
|
1054
1089
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1060,6 +1095,11 @@ struct EnrichedMarkdownMarkdownStyleLinkVariantsStruct {
|
|
|
1060
1095
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
1061
1096
|
result["underline"] = underline;
|
|
1062
1097
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1098
|
+
result["borderRadius"] = borderRadius;
|
|
1099
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
1100
|
+
result["paddingVertical"] = paddingVertical;
|
|
1101
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
1102
|
+
result["borderWidth"] = borderWidth;
|
|
1063
1103
|
return result;
|
|
1064
1104
|
}
|
|
1065
1105
|
#endif
|
|
@@ -1084,6 +1124,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1084
1124
|
if (tmp_backgroundColor != map.end()) {
|
|
1085
1125
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
1086
1126
|
}
|
|
1127
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
1128
|
+
if (tmp_borderRadius != map.end()) {
|
|
1129
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
1130
|
+
}
|
|
1131
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
1132
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
1133
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
1134
|
+
}
|
|
1135
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
1136
|
+
if (tmp_paddingVertical != map.end()) {
|
|
1137
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
1138
|
+
}
|
|
1139
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
1140
|
+
if (tmp_borderColor != map.end()) {
|
|
1141
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
1142
|
+
}
|
|
1143
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
1144
|
+
if (tmp_borderWidth != map.end()) {
|
|
1145
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
1146
|
+
}
|
|
1087
1147
|
}
|
|
1088
1148
|
|
|
1089
1149
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleLinkVariantsStruct &value) {
|
|
@@ -2826,6 +2886,8 @@ class EnrichedMarkdownProps final : public ViewProps {
|
|
|
2826
2886
|
|
|
2827
2887
|
std::string markdown{};
|
|
2828
2888
|
EnrichedMarkdownMarkdownStyleStruct markdownStyle{};
|
|
2889
|
+
bool emitLinkLayout{false};
|
|
2890
|
+
bool emitSelectionChange{false};
|
|
2829
2891
|
bool enableTaskListItemToggle{true};
|
|
2830
2892
|
bool enableLinkPreview{true};
|
|
2831
2893
|
bool selectable{false};
|
|
@@ -4980,6 +5042,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
|
4980
5042
|
SharedColor color{};
|
|
4981
5043
|
bool underline{false};
|
|
4982
5044
|
SharedColor backgroundColor{};
|
|
5045
|
+
Float borderRadius{0.0};
|
|
5046
|
+
Float paddingHorizontal{0.0};
|
|
5047
|
+
Float paddingVertical{0.0};
|
|
5048
|
+
SharedColor borderColor{};
|
|
5049
|
+
Float borderWidth{0.0};
|
|
4983
5050
|
|
|
4984
5051
|
|
|
4985
5052
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4991,6 +5058,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
|
4991
5058
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
4992
5059
|
result["underline"] = underline;
|
|
4993
5060
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
5061
|
+
result["borderRadius"] = borderRadius;
|
|
5062
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
5063
|
+
result["paddingVertical"] = paddingVertical;
|
|
5064
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
5065
|
+
result["borderWidth"] = borderWidth;
|
|
4994
5066
|
return result;
|
|
4995
5067
|
}
|
|
4996
5068
|
#endif
|
|
@@ -5015,6 +5087,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5015
5087
|
if (tmp_backgroundColor != map.end()) {
|
|
5016
5088
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
5017
5089
|
}
|
|
5090
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
5091
|
+
if (tmp_borderRadius != map.end()) {
|
|
5092
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
5093
|
+
}
|
|
5094
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
5095
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
5096
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
5097
|
+
}
|
|
5098
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
5099
|
+
if (tmp_paddingVertical != map.end()) {
|
|
5100
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
5101
|
+
}
|
|
5102
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
5103
|
+
if (tmp_borderColor != map.end()) {
|
|
5104
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
5105
|
+
}
|
|
5106
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
5107
|
+
if (tmp_borderWidth != map.end()) {
|
|
5108
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
5109
|
+
}
|
|
5018
5110
|
}
|
|
5019
5111
|
|
|
5020
5112
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkStruct &value) {
|
|
@@ -5032,6 +5124,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct {
|
|
|
5032
5124
|
SharedColor color{};
|
|
5033
5125
|
bool underline{false};
|
|
5034
5126
|
SharedColor backgroundColor{};
|
|
5127
|
+
Float borderRadius{0.0};
|
|
5128
|
+
Float paddingHorizontal{0.0};
|
|
5129
|
+
Float paddingVertical{0.0};
|
|
5130
|
+
SharedColor borderColor{};
|
|
5131
|
+
Float borderWidth{0.0};
|
|
5035
5132
|
|
|
5036
5133
|
|
|
5037
5134
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5043,6 +5140,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct {
|
|
|
5043
5140
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
5044
5141
|
result["underline"] = underline;
|
|
5045
5142
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
5143
|
+
result["borderRadius"] = borderRadius;
|
|
5144
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
5145
|
+
result["paddingVertical"] = paddingVertical;
|
|
5146
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
5147
|
+
result["borderWidth"] = borderWidth;
|
|
5046
5148
|
return result;
|
|
5047
5149
|
}
|
|
5048
5150
|
#endif
|
|
@@ -5067,6 +5169,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5067
5169
|
if (tmp_backgroundColor != map.end()) {
|
|
5068
5170
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
5069
5171
|
}
|
|
5172
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
5173
|
+
if (tmp_borderRadius != map.end()) {
|
|
5174
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
5175
|
+
}
|
|
5176
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
5177
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
5178
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
5179
|
+
}
|
|
5180
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
5181
|
+
if (tmp_paddingVertical != map.end()) {
|
|
5182
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
5183
|
+
}
|
|
5184
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
5185
|
+
if (tmp_borderColor != map.end()) {
|
|
5186
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
5187
|
+
}
|
|
5188
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
5189
|
+
if (tmp_borderWidth != map.end()) {
|
|
5190
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
5191
|
+
}
|
|
5070
5192
|
}
|
|
5071
5193
|
|
|
5072
5194
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct &value) {
|
|
@@ -6809,6 +6931,8 @@ class EnrichedMarkdownTextProps final : public ViewProps {
|
|
|
6809
6931
|
|
|
6810
6932
|
std::string markdown{};
|
|
6811
6933
|
EnrichedMarkdownTextMarkdownStyleStruct markdownStyle{};
|
|
6934
|
+
bool emitLinkLayout{false};
|
|
6935
|
+
bool emitSelectionChange{false};
|
|
6812
6936
|
bool enableTaskListItemToggle{true};
|
|
6813
6937
|
bool enableLinkPreview{true};
|
|
6814
6938
|
bool selectable{false};
|