react-native-enriched-markdown-scaffold 1.0.2-scaffold.1 → 1.0.2-scaffold.10
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/build.gradle +2 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +18 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +4 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +18 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +4 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp +148 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h +120 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +30 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +210 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdown.kt +176 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +45 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +112 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +34 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/MeasurementStore.kt +46 -8
- package/android/src/main/java/com/swmansion/enriched/markdown/events/CopyRequestEvent.kt +28 -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 +43 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputView.kt +25 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/InputConnectionWrapper.kt +7 -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/InlineMathStyle.kt +16 -1
- 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/styles/MathStyle.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownViewManagerUtils.kt +51 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/input/PasteTextUtils.kt +34 -2
- 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/HeadlessActionMode.kt +88 -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 +53 -14
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionChangeReporter.kt +232 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/BlockMenuOptions.kt +64 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt +29 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/views/TableContainerView.kt +30 -7
- package/android/src/math/java/com/swmansion/enriched/markdown/renderer/MathInlineRenderer.kt +1 -0
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathInlineSpan.kt +13 -6
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathMeasureHelper.kt +2 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +25 -9
- package/docs/API_REFERENCE.md +183 -4
- package/docs/COPY_OPTIONS.md +40 -0
- package/docs/INPUT.md +3 -1
- package/docs/MENTIONS.md +8 -1
- package/docs/STYLES.md +27 -0
- package/docs/TEXT.md +2 -0
- package/docs/WEB.md +1 -0
- package/ios/EnrichedMarkdown.mm +321 -9
- package/ios/EnrichedMarkdownText.mm +203 -6
- package/ios/attachments/ENRMMathInlineAttachment+macOS.m +2 -1
- package/ios/attachments/ENRMMathInlineAttachment.h +3 -0
- package/ios/attachments/ENRMMathInlineAttachment.m +2 -1
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.cpp +148 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.h +120 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +30 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +210 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +50 -2
- package/ios/internals/MeasurementCache.h +8 -2
- package/ios/math/ENRMRaTeXBridge.swift +23 -5
- package/ios/renderer/ENRMMathInlineRenderer.m +1 -0
- package/ios/renderer/LinkRenderer.m +47 -15
- package/ios/styles/StyleConfig.h +20 -0
- package/ios/styles/StyleConfig.mm +84 -0
- package/ios/utils/CodeBackground.m +3 -65
- package/ios/utils/ENRMBlockMenu.h +66 -0
- 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 +213 -0
- package/ios/utils/ENRMLinkLayout.h +50 -0
- package/ios/utils/ENRMLinkLayout.m +45 -0
- package/ios/utils/ENRMSelectionChange.h +120 -0
- package/ios/utils/ENRMSelectionChange.m +282 -0
- package/ios/utils/EditMenuUtils+macOS.m +4 -1
- package/ios/utils/EditMenuUtils.h +35 -6
- package/ios/utils/EditMenuUtils.m +171 -15
- 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 +47 -1
- package/ios/utils/TextViewLayoutManager.mm +3 -0
- package/ios/views/ENRMCodeBlockContainerView.h +16 -2
- package/ios/views/ENRMCodeBlockContainerView.m +22 -19
- package/ios/views/ENRMMathContainerView.h +11 -0
- package/ios/views/ENRMMathContainerView.m +17 -20
- package/ios/views/TableContainerView.h +14 -0
- package/ios/views/TableContainerView.m +34 -18
- package/lib/module/EnrichedMarkdownNativeComponent.ts +138 -1
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +138 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/jest/index.js +14 -0
- package/lib/module/jest/index.js.map +1 -1
- package/lib/module/native/EnrichedMarkdownText.js +169 -11
- package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.js +17 -4
- package/lib/module/normalizeMarkdownStyle.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.web.js +17 -4
- 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 +123 -2
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +123 -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 +50 -5
- package/lib/typescript/src/types/MarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts +12 -0
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts +144 -11
- 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 +66 -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 +138 -1
- package/src/EnrichedMarkdownTextNativeComponent.ts +138 -1
- package/src/index.tsx +6 -0
- package/src/index.web.tsx +5 -1
- package/src/jest/index.tsx +22 -1
- package/src/native/EnrichedMarkdownText.tsx +220 -9
- package/src/normalizeMarkdownStyle.ts +15 -0
- package/src/normalizeMarkdownStyle.web.ts +13 -0
- package/src/types/MarkdownStyle.ts +51 -5
- package/src/types/MarkdownStyleInternal.ts +12 -0
- package/src/types/MarkdownTextProps.ts +151 -11
- package/src/types/MarkdownTextProps.web.ts +43 -1
- package/src/types/events.ts +69 -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
|
@@ -25,6 +25,53 @@ 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
|
+
bool adjusting;
|
|
73
|
+
};
|
|
74
|
+
|
|
28
75
|
struct OnTaskListItemPress {
|
|
29
76
|
int index;
|
|
30
77
|
bool checked;
|
|
@@ -36,6 +83,13 @@ class EnrichedMarkdownEventEmitter : public ViewEventEmitter {
|
|
|
36
83
|
std::string language;
|
|
37
84
|
};
|
|
38
85
|
|
|
86
|
+
struct OnCopyRequest {
|
|
87
|
+
std::string source;
|
|
88
|
+
std::string markdown;
|
|
89
|
+
std::string text;
|
|
90
|
+
bool whole;
|
|
91
|
+
};
|
|
92
|
+
|
|
39
93
|
struct OnContextMenuItemPress {
|
|
40
94
|
std::string itemText;
|
|
41
95
|
std::string selectedText;
|
|
@@ -46,10 +100,16 @@ class EnrichedMarkdownEventEmitter : public ViewEventEmitter {
|
|
|
46
100
|
|
|
47
101
|
void onLinkLongPress(OnLinkLongPress value) const;
|
|
48
102
|
|
|
103
|
+
void onLinkLayout(OnLinkLayout value) const;
|
|
104
|
+
|
|
105
|
+
void onSelectionChange(OnSelectionChange value) const;
|
|
106
|
+
|
|
49
107
|
void onTaskListItemPress(OnTaskListItemPress value) const;
|
|
50
108
|
|
|
51
109
|
void onCopyPress(OnCopyPress value) const;
|
|
52
110
|
|
|
111
|
+
void onCopyRequest(OnCopyRequest value) const;
|
|
112
|
+
|
|
53
113
|
void onContextMenuItemPress(OnContextMenuItemPress value) const;
|
|
54
114
|
};
|
|
55
115
|
class EnrichedMarkdownTextInputEventEmitter : public ViewEventEmitter {
|
|
@@ -292,6 +352,53 @@ class EnrichedMarkdownTextEventEmitter : public ViewEventEmitter {
|
|
|
292
352
|
std::string url;
|
|
293
353
|
};
|
|
294
354
|
|
|
355
|
+
struct OnLinkLayoutFragments {
|
|
356
|
+
int linkIndex;
|
|
357
|
+
std::string url;
|
|
358
|
+
std::string text;
|
|
359
|
+
double x;
|
|
360
|
+
double y;
|
|
361
|
+
double width;
|
|
362
|
+
double height;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
struct OnLinkLayout {
|
|
366
|
+
std::vector<OnLinkLayoutFragments> fragments;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
struct OnSelectionChangeRect {
|
|
370
|
+
double x;
|
|
371
|
+
double y;
|
|
372
|
+
double width;
|
|
373
|
+
double height;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
struct OnSelectionChangeStartRect {
|
|
377
|
+
double x;
|
|
378
|
+
double y;
|
|
379
|
+
double width;
|
|
380
|
+
double height;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
struct OnSelectionChangeEndRect {
|
|
384
|
+
double x;
|
|
385
|
+
double y;
|
|
386
|
+
double width;
|
|
387
|
+
double height;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
struct OnSelectionChange {
|
|
391
|
+
bool active;
|
|
392
|
+
std::string source;
|
|
393
|
+
std::string text;
|
|
394
|
+
std::string markdown;
|
|
395
|
+
bool whole;
|
|
396
|
+
OnSelectionChangeRect rect;
|
|
397
|
+
OnSelectionChangeStartRect startRect;
|
|
398
|
+
OnSelectionChangeEndRect endRect;
|
|
399
|
+
bool adjusting;
|
|
400
|
+
};
|
|
401
|
+
|
|
295
402
|
struct OnTaskListItemPress {
|
|
296
403
|
int index;
|
|
297
404
|
bool checked;
|
|
@@ -303,6 +410,13 @@ class EnrichedMarkdownTextEventEmitter : public ViewEventEmitter {
|
|
|
303
410
|
std::string language;
|
|
304
411
|
};
|
|
305
412
|
|
|
413
|
+
struct OnCopyRequest {
|
|
414
|
+
std::string source;
|
|
415
|
+
std::string markdown;
|
|
416
|
+
std::string text;
|
|
417
|
+
bool whole;
|
|
418
|
+
};
|
|
419
|
+
|
|
306
420
|
struct OnContextMenuItemPress {
|
|
307
421
|
std::string itemText;
|
|
308
422
|
std::string selectedText;
|
|
@@ -313,10 +427,16 @@ class EnrichedMarkdownTextEventEmitter : public ViewEventEmitter {
|
|
|
313
427
|
|
|
314
428
|
void onLinkLongPress(OnLinkLongPress value) const;
|
|
315
429
|
|
|
430
|
+
void onLinkLayout(OnLinkLayout value) const;
|
|
431
|
+
|
|
432
|
+
void onSelectionChange(OnSelectionChange value) const;
|
|
433
|
+
|
|
316
434
|
void onTaskListItemPress(OnTaskListItemPress value) const;
|
|
317
435
|
|
|
318
436
|
void onCopyPress(OnCopyPress value) const;
|
|
319
437
|
|
|
438
|
+
void onCopyRequest(OnCopyRequest value) const;
|
|
439
|
+
|
|
320
440
|
void onContextMenuItemPress(OnContextMenuItemPress value) const;
|
|
321
441
|
};
|
|
322
442
|
} // namespace facebook::react
|
|
@@ -21,8 +21,11 @@ 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})),
|
|
28
|
+
linkLongPressSelects(convertRawProp(context, rawProps, "linkLongPressSelects", sourceProps.linkLongPressSelects, {false})),
|
|
26
29
|
selectable(convertRawProp(context, rawProps, "selectable", sourceProps.selectable, {false})),
|
|
27
30
|
selectionColor(convertRawProp(context, rawProps, "selectionColor", sourceProps.selectionColor, {})),
|
|
28
31
|
selectionHandleColor(convertRawProp(context, rawProps, "selectionHandleColor", sourceProps.selectionHandleColor, {})),
|
|
@@ -66,6 +69,14 @@ folly::dynamic EnrichedMarkdownProps::getDiffProps(
|
|
|
66
69
|
result["markdownStyle"] = toDynamic(markdownStyle);
|
|
67
70
|
}
|
|
68
71
|
|
|
72
|
+
if (emitLinkLayout != oldProps->emitLinkLayout) {
|
|
73
|
+
result["emitLinkLayout"] = emitLinkLayout;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (emitSelectionChange != oldProps->emitSelectionChange) {
|
|
77
|
+
result["emitSelectionChange"] = emitSelectionChange;
|
|
78
|
+
}
|
|
79
|
+
|
|
69
80
|
if (enableTaskListItemToggle != oldProps->enableTaskListItemToggle) {
|
|
70
81
|
result["enableTaskListItemToggle"] = enableTaskListItemToggle;
|
|
71
82
|
}
|
|
@@ -74,6 +85,10 @@ folly::dynamic EnrichedMarkdownProps::getDiffProps(
|
|
|
74
85
|
result["enableLinkPreview"] = enableLinkPreview;
|
|
75
86
|
}
|
|
76
87
|
|
|
88
|
+
if (linkLongPressSelects != oldProps->linkLongPressSelects) {
|
|
89
|
+
result["linkLongPressSelects"] = linkLongPressSelects;
|
|
90
|
+
}
|
|
91
|
+
|
|
77
92
|
if (selectable != oldProps->selectable) {
|
|
78
93
|
result["selectable"] = selectable;
|
|
79
94
|
}
|
|
@@ -304,8 +319,11 @@ EnrichedMarkdownTextProps::EnrichedMarkdownTextProps(
|
|
|
304
319
|
|
|
305
320
|
markdown(convertRawProp(context, rawProps, "markdown", sourceProps.markdown, {})),
|
|
306
321
|
markdownStyle(convertRawProp(context, rawProps, "markdownStyle", sourceProps.markdownStyle, {})),
|
|
322
|
+
emitLinkLayout(convertRawProp(context, rawProps, "emitLinkLayout", sourceProps.emitLinkLayout, {false})),
|
|
323
|
+
emitSelectionChange(convertRawProp(context, rawProps, "emitSelectionChange", sourceProps.emitSelectionChange, {false})),
|
|
307
324
|
enableTaskListItemToggle(convertRawProp(context, rawProps, "enableTaskListItemToggle", sourceProps.enableTaskListItemToggle, {true})),
|
|
308
325
|
enableLinkPreview(convertRawProp(context, rawProps, "enableLinkPreview", sourceProps.enableLinkPreview, {true})),
|
|
326
|
+
linkLongPressSelects(convertRawProp(context, rawProps, "linkLongPressSelects", sourceProps.linkLongPressSelects, {false})),
|
|
309
327
|
selectable(convertRawProp(context, rawProps, "selectable", sourceProps.selectable, {false})),
|
|
310
328
|
selectionColor(convertRawProp(context, rawProps, "selectionColor", sourceProps.selectionColor, {})),
|
|
311
329
|
selectionHandleColor(convertRawProp(context, rawProps, "selectionHandleColor", sourceProps.selectionHandleColor, {})),
|
|
@@ -349,6 +367,14 @@ folly::dynamic EnrichedMarkdownTextProps::getDiffProps(
|
|
|
349
367
|
result["markdownStyle"] = toDynamic(markdownStyle);
|
|
350
368
|
}
|
|
351
369
|
|
|
370
|
+
if (emitLinkLayout != oldProps->emitLinkLayout) {
|
|
371
|
+
result["emitLinkLayout"] = emitLinkLayout;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
if (emitSelectionChange != oldProps->emitSelectionChange) {
|
|
375
|
+
result["emitSelectionChange"] = emitSelectionChange;
|
|
376
|
+
}
|
|
377
|
+
|
|
352
378
|
if (enableTaskListItemToggle != oldProps->enableTaskListItemToggle) {
|
|
353
379
|
result["enableTaskListItemToggle"] = enableTaskListItemToggle;
|
|
354
380
|
}
|
|
@@ -357,6 +383,10 @@ folly::dynamic EnrichedMarkdownTextProps::getDiffProps(
|
|
|
357
383
|
result["enableLinkPreview"] = enableLinkPreview;
|
|
358
384
|
}
|
|
359
385
|
|
|
386
|
+
if (linkLongPressSelects != oldProps->linkLongPressSelects) {
|
|
387
|
+
result["linkLongPressSelects"] = linkLongPressSelects;
|
|
388
|
+
}
|
|
389
|
+
|
|
360
390
|
if (selectable != oldProps->selectable) {
|
|
361
391
|
result["selectable"] = selectable;
|
|
362
392
|
}
|
|
@@ -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) {
|
|
@@ -1701,6 +1761,7 @@ struct EnrichedMarkdownMarkdownStyleMathStruct {
|
|
|
1701
1761
|
Float marginBottom{0.0};
|
|
1702
1762
|
std::string textAlign{};
|
|
1703
1763
|
std::string fontWeight{};
|
|
1764
|
+
Float glyphOverflow{0.0};
|
|
1704
1765
|
|
|
1705
1766
|
|
|
1706
1767
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1716,6 +1777,7 @@ struct EnrichedMarkdownMarkdownStyleMathStruct {
|
|
|
1716
1777
|
result["marginBottom"] = marginBottom;
|
|
1717
1778
|
result["textAlign"] = textAlign;
|
|
1718
1779
|
result["fontWeight"] = fontWeight;
|
|
1780
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
1719
1781
|
return result;
|
|
1720
1782
|
}
|
|
1721
1783
|
#endif
|
|
@@ -1756,6 +1818,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1756
1818
|
if (tmp_fontWeight != map.end()) {
|
|
1757
1819
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
1758
1820
|
}
|
|
1821
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
1822
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
1823
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
1824
|
+
}
|
|
1759
1825
|
}
|
|
1760
1826
|
|
|
1761
1827
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleMathStruct &value) {
|
|
@@ -1772,6 +1838,7 @@ struct EnrichedMarkdownMarkdownStyleInlineMathStruct {
|
|
|
1772
1838
|
SharedColor color{};
|
|
1773
1839
|
Float paddingVertical{0.0};
|
|
1774
1840
|
std::string fontWeight{};
|
|
1841
|
+
Float glyphOverflow{0.0};
|
|
1775
1842
|
|
|
1776
1843
|
|
|
1777
1844
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1782,6 +1849,7 @@ struct EnrichedMarkdownMarkdownStyleInlineMathStruct {
|
|
|
1782
1849
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
1783
1850
|
result["paddingVertical"] = paddingVertical;
|
|
1784
1851
|
result["fontWeight"] = fontWeight;
|
|
1852
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
1785
1853
|
return result;
|
|
1786
1854
|
}
|
|
1787
1855
|
#endif
|
|
@@ -1802,6 +1870,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1802
1870
|
if (tmp_fontWeight != map.end()) {
|
|
1803
1871
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
1804
1872
|
}
|
|
1873
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
1874
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
1875
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
1876
|
+
}
|
|
1805
1877
|
}
|
|
1806
1878
|
|
|
1807
1879
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleInlineMathStruct &value) {
|
|
@@ -2462,6 +2534,11 @@ struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
|
2462
2534
|
std::string copyImageUrlLabel{};
|
|
2463
2535
|
std::string copyImageUrlsLabel{};
|
|
2464
2536
|
std::vector<std::string> copyImageUrlPluralTemplates{};
|
|
2537
|
+
bool copyEnabled{false};
|
|
2538
|
+
bool copyFormatMarkdown{false};
|
|
2539
|
+
bool systemItemsNone{false};
|
|
2540
|
+
bool codeBlockCopyButton{false};
|
|
2541
|
+
bool interceptCopy{false};
|
|
2465
2542
|
|
|
2466
2543
|
|
|
2467
2544
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2476,6 +2553,11 @@ struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
|
2476
2553
|
result["copyImageUrlLabel"] = copyImageUrlLabel;
|
|
2477
2554
|
result["copyImageUrlsLabel"] = copyImageUrlsLabel;
|
|
2478
2555
|
result["copyImageUrlPluralTemplates"] = ::facebook::react::toDynamic(copyImageUrlPluralTemplates);
|
|
2556
|
+
result["copyEnabled"] = copyEnabled;
|
|
2557
|
+
result["copyFormatMarkdown"] = copyFormatMarkdown;
|
|
2558
|
+
result["systemItemsNone"] = systemItemsNone;
|
|
2559
|
+
result["codeBlockCopyButton"] = codeBlockCopyButton;
|
|
2560
|
+
result["interceptCopy"] = interceptCopy;
|
|
2479
2561
|
return result;
|
|
2480
2562
|
}
|
|
2481
2563
|
#endif
|
|
@@ -2512,6 +2594,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2512
2594
|
if (tmp_copyImageUrlPluralTemplates != map.end()) {
|
|
2513
2595
|
fromRawValue(context, tmp_copyImageUrlPluralTemplates->second, result.copyImageUrlPluralTemplates);
|
|
2514
2596
|
}
|
|
2597
|
+
auto tmp_copyEnabled = map.find("copyEnabled");
|
|
2598
|
+
if (tmp_copyEnabled != map.end()) {
|
|
2599
|
+
fromRawValue(context, tmp_copyEnabled->second, result.copyEnabled);
|
|
2600
|
+
}
|
|
2601
|
+
auto tmp_copyFormatMarkdown = map.find("copyFormatMarkdown");
|
|
2602
|
+
if (tmp_copyFormatMarkdown != map.end()) {
|
|
2603
|
+
fromRawValue(context, tmp_copyFormatMarkdown->second, result.copyFormatMarkdown);
|
|
2604
|
+
}
|
|
2605
|
+
auto tmp_systemItemsNone = map.find("systemItemsNone");
|
|
2606
|
+
if (tmp_systemItemsNone != map.end()) {
|
|
2607
|
+
fromRawValue(context, tmp_systemItemsNone->second, result.systemItemsNone);
|
|
2608
|
+
}
|
|
2609
|
+
auto tmp_codeBlockCopyButton = map.find("codeBlockCopyButton");
|
|
2610
|
+
if (tmp_codeBlockCopyButton != map.end()) {
|
|
2611
|
+
fromRawValue(context, tmp_codeBlockCopyButton->second, result.codeBlockCopyButton);
|
|
2612
|
+
}
|
|
2613
|
+
auto tmp_interceptCopy = map.find("interceptCopy");
|
|
2614
|
+
if (tmp_interceptCopy != map.end()) {
|
|
2615
|
+
fromRawValue(context, tmp_interceptCopy->second, result.interceptCopy);
|
|
2616
|
+
}
|
|
2515
2617
|
}
|
|
2516
2618
|
|
|
2517
2619
|
static inline std::string toString(const EnrichedMarkdownSelectionMenuConfigStruct &value) {
|
|
@@ -2796,8 +2898,11 @@ class EnrichedMarkdownProps final : public ViewProps {
|
|
|
2796
2898
|
|
|
2797
2899
|
std::string markdown{};
|
|
2798
2900
|
EnrichedMarkdownMarkdownStyleStruct markdownStyle{};
|
|
2901
|
+
bool emitLinkLayout{false};
|
|
2902
|
+
bool emitSelectionChange{false};
|
|
2799
2903
|
bool enableTaskListItemToggle{true};
|
|
2800
2904
|
bool enableLinkPreview{true};
|
|
2905
|
+
bool linkLongPressSelects{false};
|
|
2801
2906
|
bool selectable{false};
|
|
2802
2907
|
SharedColor selectionColor{};
|
|
2803
2908
|
SharedColor selectionHandleColor{};
|
|
@@ -4950,6 +5055,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
|
4950
5055
|
SharedColor color{};
|
|
4951
5056
|
bool underline{false};
|
|
4952
5057
|
SharedColor backgroundColor{};
|
|
5058
|
+
Float borderRadius{0.0};
|
|
5059
|
+
Float paddingHorizontal{0.0};
|
|
5060
|
+
Float paddingVertical{0.0};
|
|
5061
|
+
SharedColor borderColor{};
|
|
5062
|
+
Float borderWidth{0.0};
|
|
4953
5063
|
|
|
4954
5064
|
|
|
4955
5065
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4961,6 +5071,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
|
4961
5071
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
4962
5072
|
result["underline"] = underline;
|
|
4963
5073
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
5074
|
+
result["borderRadius"] = borderRadius;
|
|
5075
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
5076
|
+
result["paddingVertical"] = paddingVertical;
|
|
5077
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
5078
|
+
result["borderWidth"] = borderWidth;
|
|
4964
5079
|
return result;
|
|
4965
5080
|
}
|
|
4966
5081
|
#endif
|
|
@@ -4985,6 +5100,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4985
5100
|
if (tmp_backgroundColor != map.end()) {
|
|
4986
5101
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
4987
5102
|
}
|
|
5103
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
5104
|
+
if (tmp_borderRadius != map.end()) {
|
|
5105
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
5106
|
+
}
|
|
5107
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
5108
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
5109
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
5110
|
+
}
|
|
5111
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
5112
|
+
if (tmp_paddingVertical != map.end()) {
|
|
5113
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
5114
|
+
}
|
|
5115
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
5116
|
+
if (tmp_borderColor != map.end()) {
|
|
5117
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
5118
|
+
}
|
|
5119
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
5120
|
+
if (tmp_borderWidth != map.end()) {
|
|
5121
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
5122
|
+
}
|
|
4988
5123
|
}
|
|
4989
5124
|
|
|
4990
5125
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkStruct &value) {
|
|
@@ -5002,6 +5137,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct {
|
|
|
5002
5137
|
SharedColor color{};
|
|
5003
5138
|
bool underline{false};
|
|
5004
5139
|
SharedColor backgroundColor{};
|
|
5140
|
+
Float borderRadius{0.0};
|
|
5141
|
+
Float paddingHorizontal{0.0};
|
|
5142
|
+
Float paddingVertical{0.0};
|
|
5143
|
+
SharedColor borderColor{};
|
|
5144
|
+
Float borderWidth{0.0};
|
|
5005
5145
|
|
|
5006
5146
|
|
|
5007
5147
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5013,6 +5153,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct {
|
|
|
5013
5153
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
5014
5154
|
result["underline"] = underline;
|
|
5015
5155
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
5156
|
+
result["borderRadius"] = borderRadius;
|
|
5157
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
5158
|
+
result["paddingVertical"] = paddingVertical;
|
|
5159
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
5160
|
+
result["borderWidth"] = borderWidth;
|
|
5016
5161
|
return result;
|
|
5017
5162
|
}
|
|
5018
5163
|
#endif
|
|
@@ -5037,6 +5182,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5037
5182
|
if (tmp_backgroundColor != map.end()) {
|
|
5038
5183
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
5039
5184
|
}
|
|
5185
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
5186
|
+
if (tmp_borderRadius != map.end()) {
|
|
5187
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
5188
|
+
}
|
|
5189
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
5190
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
5191
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
5192
|
+
}
|
|
5193
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
5194
|
+
if (tmp_paddingVertical != map.end()) {
|
|
5195
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
5196
|
+
}
|
|
5197
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
5198
|
+
if (tmp_borderColor != map.end()) {
|
|
5199
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
5200
|
+
}
|
|
5201
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
5202
|
+
if (tmp_borderWidth != map.end()) {
|
|
5203
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
5204
|
+
}
|
|
5040
5205
|
}
|
|
5041
5206
|
|
|
5042
5207
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct &value) {
|
|
@@ -5654,6 +5819,7 @@ struct EnrichedMarkdownTextMarkdownStyleMathStruct {
|
|
|
5654
5819
|
Float marginBottom{0.0};
|
|
5655
5820
|
std::string textAlign{};
|
|
5656
5821
|
std::string fontWeight{};
|
|
5822
|
+
Float glyphOverflow{0.0};
|
|
5657
5823
|
|
|
5658
5824
|
|
|
5659
5825
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5669,6 +5835,7 @@ struct EnrichedMarkdownTextMarkdownStyleMathStruct {
|
|
|
5669
5835
|
result["marginBottom"] = marginBottom;
|
|
5670
5836
|
result["textAlign"] = textAlign;
|
|
5671
5837
|
result["fontWeight"] = fontWeight;
|
|
5838
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
5672
5839
|
return result;
|
|
5673
5840
|
}
|
|
5674
5841
|
#endif
|
|
@@ -5709,6 +5876,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5709
5876
|
if (tmp_fontWeight != map.end()) {
|
|
5710
5877
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
5711
5878
|
}
|
|
5879
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
5880
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
5881
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
5882
|
+
}
|
|
5712
5883
|
}
|
|
5713
5884
|
|
|
5714
5885
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleMathStruct &value) {
|
|
@@ -5725,6 +5896,7 @@ struct EnrichedMarkdownTextMarkdownStyleInlineMathStruct {
|
|
|
5725
5896
|
SharedColor color{};
|
|
5726
5897
|
Float paddingVertical{0.0};
|
|
5727
5898
|
std::string fontWeight{};
|
|
5899
|
+
Float glyphOverflow{0.0};
|
|
5728
5900
|
|
|
5729
5901
|
|
|
5730
5902
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5735,6 +5907,7 @@ struct EnrichedMarkdownTextMarkdownStyleInlineMathStruct {
|
|
|
5735
5907
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
5736
5908
|
result["paddingVertical"] = paddingVertical;
|
|
5737
5909
|
result["fontWeight"] = fontWeight;
|
|
5910
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
5738
5911
|
return result;
|
|
5739
5912
|
}
|
|
5740
5913
|
#endif
|
|
@@ -5755,6 +5928,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5755
5928
|
if (tmp_fontWeight != map.end()) {
|
|
5756
5929
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
5757
5930
|
}
|
|
5931
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
5932
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
5933
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
5934
|
+
}
|
|
5758
5935
|
}
|
|
5759
5936
|
|
|
5760
5937
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleInlineMathStruct &value) {
|
|
@@ -6415,6 +6592,11 @@ struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
|
6415
6592
|
std::string copyImageUrlLabel{};
|
|
6416
6593
|
std::string copyImageUrlsLabel{};
|
|
6417
6594
|
std::vector<std::string> copyImageUrlPluralTemplates{};
|
|
6595
|
+
bool copyEnabled{false};
|
|
6596
|
+
bool copyFormatMarkdown{false};
|
|
6597
|
+
bool systemItemsNone{false};
|
|
6598
|
+
bool codeBlockCopyButton{false};
|
|
6599
|
+
bool interceptCopy{false};
|
|
6418
6600
|
|
|
6419
6601
|
|
|
6420
6602
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -6429,6 +6611,11 @@ struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
|
6429
6611
|
result["copyImageUrlLabel"] = copyImageUrlLabel;
|
|
6430
6612
|
result["copyImageUrlsLabel"] = copyImageUrlsLabel;
|
|
6431
6613
|
result["copyImageUrlPluralTemplates"] = ::facebook::react::toDynamic(copyImageUrlPluralTemplates);
|
|
6614
|
+
result["copyEnabled"] = copyEnabled;
|
|
6615
|
+
result["copyFormatMarkdown"] = copyFormatMarkdown;
|
|
6616
|
+
result["systemItemsNone"] = systemItemsNone;
|
|
6617
|
+
result["codeBlockCopyButton"] = codeBlockCopyButton;
|
|
6618
|
+
result["interceptCopy"] = interceptCopy;
|
|
6432
6619
|
return result;
|
|
6433
6620
|
}
|
|
6434
6621
|
#endif
|
|
@@ -6465,6 +6652,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
6465
6652
|
if (tmp_copyImageUrlPluralTemplates != map.end()) {
|
|
6466
6653
|
fromRawValue(context, tmp_copyImageUrlPluralTemplates->second, result.copyImageUrlPluralTemplates);
|
|
6467
6654
|
}
|
|
6655
|
+
auto tmp_copyEnabled = map.find("copyEnabled");
|
|
6656
|
+
if (tmp_copyEnabled != map.end()) {
|
|
6657
|
+
fromRawValue(context, tmp_copyEnabled->second, result.copyEnabled);
|
|
6658
|
+
}
|
|
6659
|
+
auto tmp_copyFormatMarkdown = map.find("copyFormatMarkdown");
|
|
6660
|
+
if (tmp_copyFormatMarkdown != map.end()) {
|
|
6661
|
+
fromRawValue(context, tmp_copyFormatMarkdown->second, result.copyFormatMarkdown);
|
|
6662
|
+
}
|
|
6663
|
+
auto tmp_systemItemsNone = map.find("systemItemsNone");
|
|
6664
|
+
if (tmp_systemItemsNone != map.end()) {
|
|
6665
|
+
fromRawValue(context, tmp_systemItemsNone->second, result.systemItemsNone);
|
|
6666
|
+
}
|
|
6667
|
+
auto tmp_codeBlockCopyButton = map.find("codeBlockCopyButton");
|
|
6668
|
+
if (tmp_codeBlockCopyButton != map.end()) {
|
|
6669
|
+
fromRawValue(context, tmp_codeBlockCopyButton->second, result.codeBlockCopyButton);
|
|
6670
|
+
}
|
|
6671
|
+
auto tmp_interceptCopy = map.find("interceptCopy");
|
|
6672
|
+
if (tmp_interceptCopy != map.end()) {
|
|
6673
|
+
fromRawValue(context, tmp_interceptCopy->second, result.interceptCopy);
|
|
6674
|
+
}
|
|
6468
6675
|
}
|
|
6469
6676
|
|
|
6470
6677
|
static inline std::string toString(const EnrichedMarkdownTextSelectionMenuConfigStruct &value) {
|
|
@@ -6749,8 +6956,11 @@ class EnrichedMarkdownTextProps final : public ViewProps {
|
|
|
6749
6956
|
|
|
6750
6957
|
std::string markdown{};
|
|
6751
6958
|
EnrichedMarkdownTextMarkdownStyleStruct markdownStyle{};
|
|
6959
|
+
bool emitLinkLayout{false};
|
|
6960
|
+
bool emitSelectionChange{false};
|
|
6752
6961
|
bool enableTaskListItemToggle{true};
|
|
6753
6962
|
bool enableLinkPreview{true};
|
|
6963
|
+
bool linkLongPressSelects{false};
|
|
6754
6964
|
bool selectable{false};
|
|
6755
6965
|
SharedColor selectionColor{};
|
|
6756
6966
|
SharedColor selectionHandleColor{};
|