@reviewflow/ui 0.0.0-stage → 6.21.0

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.
Files changed (92) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +95 -2
  3. package/package.json +102 -4
  4. package/src/board/bucket-section.tsx +94 -0
  5. package/src/board/dataSource.ts +44 -0
  6. package/src/board/facts.ts +183 -0
  7. package/src/board/index.ts +12 -0
  8. package/src/board/pull-request-board.tsx +239 -0
  9. package/src/board/pull-request-row.tsx +181 -0
  10. package/src/components/branch-diff/diff-themes.ts +6 -0
  11. package/src/components/branch-diff/diff-worker-pool.tsx +12 -0
  12. package/src/components/branch-diff/diff-worker-pool.web.tsx +56 -0
  13. package/src/components/branch-diff/diff-worker.ts +7 -0
  14. package/src/components/branch-diff/use-collapsed-files.ts +49 -0
  15. package/src/components/branch-diff/use-diff-settings.tsx +97 -0
  16. package/src/components/branch-diff/whitespace-button.tsx +32 -0
  17. package/src/components/copyable-code-block.tsx +101 -0
  18. package/src/components/label-pill.tsx +84 -0
  19. package/src/components/link-in-row.ts +6 -0
  20. package/src/components/markdown-suggestion.tsx +60 -0
  21. package/src/components/markdown-text.tsx +1067 -0
  22. package/src/components/pull-request-actions-merge.tsx +341 -0
  23. package/src/components/pull-request-actions-review.tsx +218 -0
  24. package/src/components/pull-request-checks.tsx +86 -0
  25. package/src/components/pull-request-commit-files.ts +143 -0
  26. package/src/components/pull-request-commits.tsx +221 -0
  27. package/src/components/pull-request-conversation-card.tsx +220 -0
  28. package/src/components/pull-request-conversation-edit.tsx +147 -0
  29. package/src/components/pull-request-conversation-event.tsx +267 -0
  30. package/src/components/pull-request-conversation-person.tsx +28 -0
  31. package/src/components/pull-request-conversation-thread.tsx +158 -0
  32. package/src/components/pull-request-diff-annotations.tsx +443 -0
  33. package/src/components/pull-request-diff-collapse.ts +43 -0
  34. package/src/components/pull-request-diff-data.ts +174 -0
  35. package/src/components/pull-request-diff-impacts-summary.tsx +97 -0
  36. package/src/components/pull-request-diff-impacts.ts +45 -0
  37. package/src/components/pull-request-diff-jump.ts +87 -0
  38. package/src/components/pull-request-diff-lines.ts +103 -0
  39. package/src/components/pull-request-diff-overview.tsx +416 -0
  40. package/src/components/pull-request-diff-view.tsx +438 -0
  41. package/src/components/pull-request-diff-viewer.tsx +1374 -0
  42. package/src/components/pull-request-files.tsx +533 -0
  43. package/src/components/pull-request-markdown-input.tsx +91 -0
  44. package/src/components/pull-request-panel.tsx +1270 -0
  45. package/src/components/pull-request-part-notice.tsx +82 -0
  46. package/src/components/pull-request-reactions.tsx +178 -0
  47. package/src/components/pull-request-review.tsx +164 -0
  48. package/src/components/pull-request-revisions.tsx +273 -0
  49. package/src/components/pull-request-screen.tsx +299 -0
  50. package/src/components/pull-request-suggestion-actions.tsx +201 -0
  51. package/src/components/pull-request-timeline.tsx +270 -0
  52. package/src/components/repository-attachment-banner.tsx +42 -0
  53. package/src/components/scroll-parent.ts +50 -0
  54. package/src/css.d.ts +1 -0
  55. package/src/dataSource.ts +242 -0
  56. package/src/editor/alerts.ts +105 -0
  57. package/src/editor/code-editor.native.tsx +25 -0
  58. package/src/editor/code-editor.tsx +112 -0
  59. package/src/editor/codeEditorExtensions.ts +65 -0
  60. package/src/editor/codeHighlight.ts +71 -0
  61. package/src/editor/commands.ts +175 -0
  62. package/src/editor/decorations.ts +425 -0
  63. package/src/editor/editable-file.tsx +224 -0
  64. package/src/editor/emojiCompletion.ts +110 -0
  65. package/src/editor/extensions.ts +149 -0
  66. package/src/editor/frontmatter.ts +76 -0
  67. package/src/editor/inlineFormat.ts +114 -0
  68. package/src/editor/lineTypes.ts +55 -0
  69. package/src/editor/markdown-editor.css +511 -0
  70. package/src/editor/markdown-editor.native.tsx +29 -0
  71. package/src/editor/markdown-editor.tsx +295 -0
  72. package/src/editor/nodeClasses.ts +69 -0
  73. package/src/index.ts +75 -0
  74. package/src/markdown-github/flatten.ts +49 -0
  75. package/src/markdown-github/html-tokens.ts +93 -0
  76. package/src/markdown-github/pair-html.ts +354 -0
  77. package/src/markdown-github/safe-url.ts +15 -0
  78. package/src/markdown-github/table-columns.ts +23 -0
  79. package/src/markdown-github/toggle-task.ts +164 -0
  80. package/src/nativewind-env.d.ts +1 -0
  81. package/src/prStatus.ts +90 -0
  82. package/src/services/PullRequestDraftsProvider.tsx +179 -0
  83. package/src/services/PullRequestReviewDraftProvider.tsx +178 -0
  84. package/src/services/PullRequestSuggestionBatchProvider.tsx +112 -0
  85. package/src/services/emojify.ts +13 -0
  86. package/src/services/errorToMessage.ts +6 -0
  87. package/src/services/expiringDraftStore.ts +102 -0
  88. package/src/services/formatDataAge.ts +12 -0
  89. package/src/services/formatRelativeDate.ts +56 -0
  90. package/src/services/githubImages.tsx +33 -0
  91. package/src/services/isViewerAuthor.ts +7 -0
  92. package/src/slots.tsx +34 -0
@@ -0,0 +1,511 @@
1
+ /*
2
+ * The markdown editor's look, ported from vscode-extension-markdown-beautiful-editor
3
+ * (src/styles/md-inline.css, md-block.css, md-alerts.css, code-tokens.css) with
4
+ * every --vscode-* colour rewritten as an alouette token, so the light and dark
5
+ * themes reach it through the same .light/.dark ancestor as the rest of the app.
6
+ *
7
+ * Everything is scoped under .markdown-editor: the md-* classes are generic
8
+ * names and must not reach anything else on the page.
9
+ *
10
+ * Two rules carried over from the extension, both because CodeMirror measures
11
+ * line boxes with getBoundingClientRect():
12
+ * - never a margin on a .cm-line — it sits outside the measured box, so clicks
13
+ * in the gap resolve to a neighbouring line; vertical space is padding;
14
+ * - line-level rules are scoped to .cm-line.
15
+ */
16
+
17
+ /* set under an info accent scope: the custom property keeps the info ink once
18
+ the current theme is restored below it (see LinkInkScope) */
19
+ .markdown-editor-link-ink {
20
+ display: contents;
21
+ --md-link: var(--color-accent);
22
+ }
23
+
24
+ .markdown-editor {
25
+ --md-code-bg: color-mix(in srgb, var(--color-muted) 14%, transparent);
26
+ --md-code-block-bg: color-mix(in srgb, var(--color-muted) 10%, transparent);
27
+ --md-frontmatter-bg: color-mix(in srgb, var(--color-muted) 7%, transparent);
28
+ --md-quote-bg: color-mix(in srgb, var(--color-muted) 6%, transparent);
29
+
30
+ --md-tok-comment: #6e7781;
31
+ --md-tok-keyword: #cf222e;
32
+ --md-tok-string: #0a3069;
33
+ --md-tok-constant: #0550ae;
34
+ --md-tok-property: #0550ae;
35
+ --md-tok-type: #116329;
36
+ --md-tok-function: #8250df;
37
+ --md-tok-invalid: #82071e;
38
+
39
+ /* fills a column the caller grew; the editor still sizes to its content, and
40
+ the page — the app layout is the scroll container — scrolls a long one */
41
+ display: flex;
42
+ flex-direction: column;
43
+ flex-grow: 1;
44
+ min-height: 240px;
45
+ border: 1px solid var(--color-interactive-outlined-pressable);
46
+ border-radius: 8px;
47
+ background: var(--color-highlight);
48
+ color: var(--color-sharp);
49
+ font-family: var(--font-body);
50
+ font-size: 0.9375rem;
51
+ line-height: 1.7;
52
+ transition: border-color 150ms ease-in;
53
+ }
54
+
55
+ .dark .markdown-editor {
56
+ --md-tok-comment: #8b949e;
57
+ --md-tok-keyword: #ff7b72;
58
+ --md-tok-string: #a5d6ff;
59
+ --md-tok-constant: #79c0ff;
60
+ --md-tok-property: #79c0ff;
61
+ --md-tok-type: #7ee787;
62
+ --md-tok-function: #d2a8ff;
63
+ --md-tok-invalid: #f85149;
64
+ }
65
+
66
+ .markdown-editor:hover {
67
+ border-color: var(--color-interactive-outlined-hover);
68
+ }
69
+
70
+ .markdown-editor:focus-within {
71
+ border-color: var(--color-interactive-outlined-focus);
72
+ }
73
+
74
+ .markdown-editor-readonly {
75
+ min-height: 0;
76
+ border: none;
77
+ background: transparent;
78
+ }
79
+
80
+ .markdown-editor-compact {
81
+ min-height: 96px;
82
+ }
83
+
84
+ /* the code editor shares the frame, the palette and the shell; only the type
85
+ and the height differ */
86
+ .markdown-editor-code {
87
+ min-height: 160px;
88
+ font-family: var(--font-mono);
89
+ font-size: 0.875rem;
90
+ line-height: 1.5;
91
+ }
92
+
93
+ .markdown-editor-code .cm-editor .cm-line {
94
+ padding: 0;
95
+ }
96
+
97
+ /* shell */
98
+
99
+ .markdown-editor .cm-editor {
100
+ flex-grow: 1;
101
+ background: transparent;
102
+ font-family: inherit;
103
+ }
104
+
105
+ /* the frame's `:focus-within` border is the focus indicator; the browser's own
106
+ ring on the contenteditable would be a second one, in the system's accent */
107
+ .markdown-editor .cm-editor.cm-focused,
108
+ .markdown-editor .cm-content:focus-visible {
109
+ outline: none;
110
+ }
111
+
112
+ .markdown-editor .cm-scroller {
113
+ font-family: inherit;
114
+ line-height: inherit;
115
+ }
116
+
117
+ /* Through .cm-editor: CodeMirror injects its base theme as `.ͼ1 .cm-content`
118
+ and `.ͼ1 .cm-line` after this sheet, and a two-class rule loses that tie.
119
+ The inset is on the content rather than the lines, so a block's background
120
+ (frontmatter, a fence, a quote) keeps a gap from the border on every side. */
121
+ .markdown-editor .cm-editor .cm-content {
122
+ padding: 10px;
123
+ caret-color: var(--color-accent);
124
+ }
125
+
126
+ .markdown-editor-readonly .cm-editor .cm-content {
127
+ padding: 0;
128
+ }
129
+
130
+ .markdown-editor .cm-editor .cm-line {
131
+ padding: 0 4px;
132
+ }
133
+
134
+ .markdown-editor-readonly .cm-editor .cm-line {
135
+ padding: 0;
136
+ }
137
+
138
+ .markdown-editor .cm-cursor,
139
+ .markdown-editor .cm-dropCursor {
140
+ border-left-color: var(--color-accent);
141
+ }
142
+
143
+ .markdown-editor .cm-selectionBackground,
144
+ .markdown-editor .cm-focused .cm-selectionBackground,
145
+ .markdown-editor .cm-content ::selection {
146
+ background: var(--color-selection) !important;
147
+ }
148
+
149
+ .markdown-editor .cm-selectionMatch {
150
+ background: color-mix(in srgb, var(--color-accent) 18%, transparent);
151
+ }
152
+
153
+ .markdown-editor .cm-panels {
154
+ background: var(--color-surface);
155
+ color: var(--color-sharp);
156
+ border-color: var(--color-border-muted);
157
+ }
158
+
159
+ .markdown-editor .cm-tooltip.cm-tooltip-autocomplete {
160
+ background: var(--color-surface);
161
+ color: var(--color-sharp);
162
+ border: 1px solid var(--color-border-muted);
163
+ border-radius: 8px;
164
+ overflow: hidden;
165
+ }
166
+
167
+ .markdown-editor .cm-tooltip.cm-tooltip-autocomplete > ul {
168
+ font-family: var(--font-body);
169
+ }
170
+
171
+ .markdown-editor .cm-tooltip.cm-tooltip-autocomplete > ul > li {
172
+ padding: 2px 8px;
173
+ }
174
+
175
+ .markdown-editor .cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected] {
176
+ background: var(--color-selection);
177
+ color: var(--color-sharp);
178
+ }
179
+
180
+ /* inline */
181
+
182
+ .markdown-editor .md-syntax {
183
+ color: var(--color-muted);
184
+ font-family: inherit;
185
+ font-style: normal;
186
+ }
187
+
188
+ /* Sora's weights are separate families on Expo web, so bold is a family, not a
189
+ synthesized font-weight */
190
+ .markdown-editor .md-bold {
191
+ font-family: var(--font-body-bold);
192
+ }
193
+
194
+ .markdown-editor .md-bold .md-syntax {
195
+ font-family: var(--font-body);
196
+ }
197
+
198
+ .markdown-editor .md-italic {
199
+ font-style: italic;
200
+ }
201
+
202
+ /* box-decoration-break keeps a rounded chip on each fragment of a wrapped span */
203
+ .markdown-editor .md-code {
204
+ background: var(--md-code-bg);
205
+ padding: 2px 0.25em;
206
+ border-radius: 5px;
207
+ box-decoration-break: clone;
208
+ -webkit-box-decoration-break: clone;
209
+ font-family: var(--font-mono);
210
+ font-size: 0.9em;
211
+ }
212
+
213
+ .markdown-editor .md-code-info {
214
+ color: var(--color-muted);
215
+ font-family: var(--font-mono);
216
+ }
217
+
218
+ /* the strike is on the text between the ~~, never on the delimiters */
219
+ .markdown-editor .md-strike {
220
+ opacity: 0.7;
221
+ }
222
+
223
+ .markdown-editor .md-strike-text {
224
+ text-decoration: line-through;
225
+ }
226
+
227
+ .markdown-editor .md-task-checked,
228
+ .markdown-editor .md-task-parent-checked {
229
+ text-decoration: line-through;
230
+ opacity: 0.7;
231
+ }
232
+
233
+ .markdown-editor .md-table {
234
+ font-family: var(--font-mono);
235
+ font-size: 0.9em;
236
+ }
237
+
238
+ .markdown-editor .md-table-cell {
239
+ display: inline-block;
240
+ white-space: nowrap;
241
+ padding: 0 6px;
242
+ vertical-align: top;
243
+ }
244
+
245
+ .markdown-editor .md-col-center {
246
+ text-align: center;
247
+ }
248
+
249
+ .markdown-editor .md-col-right {
250
+ text-align: right;
251
+ }
252
+
253
+ .markdown-editor .md-table-sep {
254
+ color: var(--color-muted);
255
+ }
256
+
257
+ .markdown-editor .md-link .md-text,
258
+ .markdown-editor .md-autolink .md-url,
259
+ .markdown-editor .md-link-def .md-ref,
260
+ .markdown-editor .md-image .md-alt {
261
+ color: var(--md-link, var(--color-accent));
262
+ text-decoration: underline;
263
+ }
264
+
265
+ .markdown-editor .md-link .md-url,
266
+ .markdown-editor .md-image .md-url,
267
+ .markdown-editor .md-link-def .md-url,
268
+ .markdown-editor .md-ref-link .md-ref {
269
+ color: var(--color-muted);
270
+ font-size: 0.9em;
271
+ }
272
+
273
+ .markdown-editor .md-link-title,
274
+ .markdown-editor .md-link-def-title {
275
+ color: var(--color-muted);
276
+ font-style: italic;
277
+ }
278
+
279
+ /* lines */
280
+
281
+ .markdown-editor .cm-line.md-heading {
282
+ font-family: var(--font-heading-bold);
283
+ }
284
+
285
+ .markdown-editor .cm-line.md-heading .md-syntax {
286
+ font-family: var(--font-heading);
287
+ }
288
+
289
+ .markdown-editor .cm-line.md-h1 {
290
+ font-size: 1.75em;
291
+ padding-top: 0.5em;
292
+ padding-bottom: 0.25em;
293
+ }
294
+
295
+ .markdown-editor .cm-line.md-h2 {
296
+ font-size: 1.45em;
297
+ padding-top: 0.4em;
298
+ padding-bottom: 0.2em;
299
+ }
300
+
301
+ .markdown-editor .cm-line.md-h3 {
302
+ font-size: 1.25em;
303
+ padding-top: 0.3em;
304
+ padding-bottom: 0.15em;
305
+ }
306
+
307
+ .markdown-editor .cm-line.md-h4 {
308
+ font-size: 1.1em;
309
+ padding-top: 0.2em;
310
+ }
311
+
312
+ .markdown-editor .cm-line.md-h5 {
313
+ font-size: 1em;
314
+ padding-top: 0.15em;
315
+ }
316
+
317
+ .markdown-editor .cm-line.md-h6 {
318
+ font-size: 1em;
319
+ color: var(--color-muted);
320
+ padding-top: 0.1em;
321
+ }
322
+
323
+ /* the ===/--- line under a setext title is its syntax, not a second heading line */
324
+ .markdown-editor .cm-line.md-setext-title {
325
+ padding-bottom: 0;
326
+ }
327
+
328
+ .markdown-editor .cm-line.md-setext-underline {
329
+ padding-bottom: 0.3em;
330
+ }
331
+
332
+ .markdown-editor .cm-line.md-blockquote {
333
+ background: var(--md-quote-bg);
334
+ border-left: 4px solid var(--color-border-muted);
335
+ color: var(--color-muted);
336
+ padding-left: 12px;
337
+ }
338
+
339
+ .markdown-editor .cm-line.blockquote-first.md-blockquote {
340
+ border-top-right-radius: 6px;
341
+ padding-top: 6px;
342
+ }
343
+
344
+ .markdown-editor .cm-line.blockquote-last.md-blockquote {
345
+ border-bottom-right-radius: 6px;
346
+ padding-bottom: 6px;
347
+ }
348
+
349
+ .markdown-editor .cm-line.md-quote-2 {
350
+ padding-left: 1.5em;
351
+ }
352
+
353
+ .markdown-editor .cm-line.md-quote-3 {
354
+ padding-left: 3em;
355
+ }
356
+
357
+ .markdown-editor .cm-line.md-code-block {
358
+ background: var(--md-code-block-bg);
359
+ font-family: var(--font-mono);
360
+ font-size: 0.9em;
361
+ padding-left: 16px;
362
+ padding-right: 16px;
363
+ }
364
+
365
+ .markdown-editor .cm-line.md-code-block-first {
366
+ border-top-left-radius: 8px;
367
+ border-top-right-radius: 8px;
368
+ padding-top: 8px;
369
+ color: var(--color-muted);
370
+ }
371
+
372
+ .markdown-editor .cm-line.md-code-block-last {
373
+ border-bottom-left-radius: 8px;
374
+ border-bottom-right-radius: 8px;
375
+ padding-bottom: 8px;
376
+ color: var(--color-muted);
377
+ }
378
+
379
+ /* frontmatter is metadata: the shape of a code block, quieter */
380
+ .markdown-editor .cm-line.md-frontmatter {
381
+ background: var(--md-frontmatter-bg);
382
+ font-family: var(--font-mono);
383
+ font-size: 0.875em;
384
+ padding-left: 16px;
385
+ padding-right: 16px;
386
+ }
387
+
388
+ .markdown-editor .cm-line.md-frontmatter-first {
389
+ border-top-left-radius: 8px;
390
+ border-top-right-radius: 8px;
391
+ padding-top: 8px;
392
+ }
393
+
394
+ .markdown-editor .cm-line.md-frontmatter-last {
395
+ border-bottom-left-radius: 8px;
396
+ border-bottom-right-radius: 8px;
397
+ padding-bottom: 8px;
398
+ }
399
+
400
+ /* the rule is drawn either side of the literal ---, which stays visible */
401
+ .markdown-editor .cm-line.md-hr {
402
+ display: flex;
403
+ align-items: center;
404
+ color: var(--color-muted);
405
+ padding-top: 0.5em;
406
+ padding-bottom: 0.5em;
407
+ }
408
+
409
+ .markdown-editor .cm-line.md-hr::before,
410
+ .markdown-editor .cm-line.md-hr::after {
411
+ content: "";
412
+ flex: 1;
413
+ height: 1px;
414
+ background: var(--color-border-muted);
415
+ }
416
+
417
+ .markdown-editor .cm-line.md-hr::before {
418
+ margin-right: 1em;
419
+ }
420
+
421
+ .markdown-editor .cm-line.md-hr::after {
422
+ margin-left: 1em;
423
+ }
424
+
425
+ .markdown-editor .md-hr-text {
426
+ letter-spacing: 0.2em;
427
+ flex-shrink: 0;
428
+ }
429
+
430
+ /* GitHub alerts: each type sets only its accent, the bar, wash and label derive from it */
431
+
432
+ .markdown-editor .cm-line.md-alert,
433
+ .markdown-editor .cm-line.md-alert-content {
434
+ --md-alert-accent: var(--color-border-muted);
435
+ background: color-mix(in srgb, var(--md-alert-accent) 12%, transparent);
436
+ border-left: 4px solid var(--md-alert-accent);
437
+ color: var(--color-sharp);
438
+ }
439
+
440
+ .markdown-editor .cm-line.alert-first {
441
+ padding-top: 8px;
442
+ border-top-right-radius: 6px;
443
+ }
444
+
445
+ .markdown-editor .cm-line.alert-last {
446
+ padding-bottom: 8px;
447
+ border-bottom-right-radius: 6px;
448
+ }
449
+
450
+ .markdown-editor .md-alert-type {
451
+ font-family: var(--font-body-bold);
452
+ letter-spacing: 0.02em;
453
+ color: var(--md-alert-accent);
454
+ }
455
+
456
+ .markdown-editor .cm-line.md-alert-note {
457
+ --md-alert-accent: #0969da;
458
+ }
459
+
460
+ .markdown-editor .cm-line.md-alert-tip {
461
+ --md-alert-accent: #1a7f37;
462
+ }
463
+
464
+ .markdown-editor .cm-line.md-alert-important {
465
+ --md-alert-accent: #8250df;
466
+ }
467
+
468
+ .markdown-editor .cm-line.md-alert-warning {
469
+ --md-alert-accent: #9a6700;
470
+ }
471
+
472
+ .markdown-editor .cm-line.md-alert-caution {
473
+ --md-alert-accent: #cf222e;
474
+ }
475
+
476
+ /* code tokens, in fences and in the frontmatter's yaml */
477
+
478
+ .markdown-editor .cm-line .tok-comment {
479
+ color: var(--md-tok-comment);
480
+ font-style: italic;
481
+ }
482
+
483
+ .markdown-editor .cm-line .tok-keyword,
484
+ .markdown-editor .cm-line .tok-operator {
485
+ color: var(--md-tok-keyword);
486
+ }
487
+
488
+ .markdown-editor .cm-line .tok-string {
489
+ color: var(--md-tok-string);
490
+ }
491
+
492
+ .markdown-editor .cm-line .tok-constant {
493
+ color: var(--md-tok-constant);
494
+ }
495
+
496
+ .markdown-editor .cm-line .tok-property {
497
+ color: var(--md-tok-property);
498
+ }
499
+
500
+ .markdown-editor .cm-line .tok-type {
501
+ color: var(--md-tok-type);
502
+ }
503
+
504
+ .markdown-editor .cm-line .tok-function {
505
+ color: var(--md-tok-function);
506
+ }
507
+
508
+ .markdown-editor .cm-line .tok-invalid {
509
+ color: var(--md-tok-invalid);
510
+ text-decoration: underline wavy;
511
+ }
@@ -0,0 +1,29 @@
1
+ import { TextArea } from "alouette";
2
+ import type { ReactNode } from "react";
3
+ import type { MarkdownEditorFieldProps } from "./markdown-editor.tsx";
4
+
5
+ const noop = (): void => undefined;
6
+
7
+ /**
8
+ * What metro picks on a native platform. CodeMirror needs a DOM, so the native
9
+ * build gets a plain `TextArea` over the same props: no toolbar, no styling in
10
+ * place, but the same text in and out.
11
+ */
12
+ export function MarkdownEditor({
13
+ value,
14
+ onChange,
15
+ readOnly = false,
16
+ "aria-label": ariaLabel,
17
+ autoFocus = false,
18
+ }: MarkdownEditorFieldProps): ReactNode {
19
+ return (
20
+ <TextArea
21
+ aria-label={ariaLabel}
22
+ // oxlint-disable-next-line jsx-a11y/no-autofocus -- forwarded from the caller, as on web
23
+ autoFocus={autoFocus}
24
+ disabled={readOnly}
25
+ value={value}
26
+ onChangeText={onChange ?? noop}
27
+ />
28
+ );
29
+ }