@rcarls/rc-markdown-editor 0.0.0-next-20260921045401

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.
@@ -0,0 +1,1543 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/define.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "custom-element-definition",
12
+ "name": "rc-editor-toolbar",
13
+ "declaration": {
14
+ "name": "RcEditorToolbar",
15
+ "module": "/src/rc-editor-toolbar.js"
16
+ }
17
+ },
18
+ {
19
+ "kind": "custom-element-definition",
20
+ "name": "rc-markdown-editor",
21
+ "declaration": {
22
+ "name": "RcMarkdownEditor",
23
+ "module": "/src/rc-markdown-editor.js"
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/formatting.ts",
31
+ "declarations": [
32
+ {
33
+ "kind": "function",
34
+ "name": "setCodeBlockLanguage",
35
+ "return": {
36
+ "type": {
37
+ "text": "string | null"
38
+ }
39
+ },
40
+ "parameters": [
41
+ {
42
+ "name": "value",
43
+ "type": {
44
+ "text": "string"
45
+ },
46
+ "description": "Full source editor value."
47
+ },
48
+ {
49
+ "name": "selectionStart",
50
+ "type": {
51
+ "text": "number"
52
+ },
53
+ "description": "Cursor offset used to locate the containing fence."
54
+ },
55
+ {
56
+ "name": "language",
57
+ "type": {
58
+ "text": "string"
59
+ },
60
+ "description": "Language string to write (empty string removes the token)."
61
+ }
62
+ ],
63
+ "description": "Replaces the language token on the opening fence of the code block containing\n`selectionStart`. Returns the updated string, or `null` if the cursor is not\ninside a fenced code block."
64
+ },
65
+ {
66
+ "kind": "function",
67
+ "name": "getFormatsFromDecorations",
68
+ "return": {
69
+ "type": {
70
+ "text": "Omit<ActiveFormats, 'codeLanguage'>"
71
+ }
72
+ },
73
+ "parameters": [
74
+ {
75
+ "name": "decorations",
76
+ "type": {
77
+ "text": "readonly Decoration[]"
78
+ }
79
+ },
80
+ {
81
+ "name": "start",
82
+ "type": {
83
+ "text": "number"
84
+ }
85
+ },
86
+ {
87
+ "name": "end",
88
+ "type": {
89
+ "text": "number"
90
+ }
91
+ }
92
+ ],
93
+ "description": "Derives active inline and block formats from the decoration array at a given\nselection range in the markdown source editor. Used for toolbar state sync in\nsource mode."
94
+ }
95
+ ],
96
+ "exports": [
97
+ {
98
+ "kind": "js",
99
+ "name": "setCodeBlockLanguage",
100
+ "declaration": {
101
+ "name": "setCodeBlockLanguage",
102
+ "module": "src/formatting.ts"
103
+ }
104
+ },
105
+ {
106
+ "kind": "js",
107
+ "name": "getFormatsFromDecorations",
108
+ "declaration": {
109
+ "name": "getFormatsFromDecorations",
110
+ "module": "src/formatting.ts"
111
+ }
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "kind": "javascript-module",
117
+ "path": "src/icons.ts",
118
+ "declarations": [
119
+ {
120
+ "kind": "variable",
121
+ "name": "icons",
122
+ "type": {
123
+ "text": "object"
124
+ },
125
+ "default": "{ bold: icon(svg` <path fill=\"currentColor\" d=\"M8.21 13c2.106 0 3.412-1.087 3.412-2.823c0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244c0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415c0 .943-.643 1.449-1.832 1.449H5.907z\"/> `), italic: icon(svg` <path fill=\"currentColor\" d=\"M7.991 11.674L9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z\"/> `), underline: icon(svg` <path fill=\"currentColor\" d=\"M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57s-2.687-1.08-2.687-2.57zM12.5 15h-9v-1h9z\"/> `), strikethrough: icon(svg` <path fill=\"currentColor\" d=\"M6.333 5.686c0 .31.083.581.27.814H5.166a2.8 2.8 0 0 1-.099-.76c0-1.627 1.436-2.768 3.48-2.768c1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743c-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703c1.34 0 2.31-.705 2.31-1.675c0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697c0 1.826-1.436 2.967-3.644 2.967\"/> `), code: icon(svg` <path fill=\"currentColor\" d=\"M5.854 4.854a.5.5 0 1 0-.708-.708l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708L2.707 8zm4.292 0a.5.5 0 0 1 .708-.708l3.5 3.5a.5.5 0 0 1 0 .708l-3.5 3.5a.5.5 0 0 1-.708-.708L13.293 8z\"/> `), link: icon(svg` <g fill=\"currentColor\"> <path d=\"M4.715 6.542L3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199a2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z\"/> <path d=\"M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z\"/> </g> `), blockquote: icon(svg` <path fill=\"currentColor\" d=\"M2.5 3a.5.5 0 0 0 0 1h11a.5.5 0 0 0 0-1zm5 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1zm-5 3a.5.5 0 0 0 0 1h11a.5.5 0 0 0 0-1zm.79-5.373q.168-.117.444-.275L3.524 6q-.183.111-.452.287q-.27.176-.51.428a2.4 2.4 0 0 0-.398.562Q2 7.587 2 7.969q0 .54.217.873q.217.328.72.328q.322 0 .504-.211a.7.7 0 0 0 .188-.463q0-.345-.211-.521q-.205-.182-.568-.182h-.282q.036-.305.123-.498a1.4 1.4 0 0 1 .252-.37a2 2 0 0 1 .346-.298zm2.167 0q.17-.117.445-.275L5.692 6q-.183.111-.452.287q-.27.176-.51.428a2.4 2.4 0 0 0-.398.562q-.165.31-.164.692q0 .54.217.873q.217.328.72.328q.322 0 .504-.211a.7.7 0 0 0 .188-.463q0-.345-.211-.521q-.205-.182-.568-.182h-.282a1.8 1.8 0 0 1 .118-.492q.087-.194.257-.375a2 2 0 0 1 .346-.3z\"/> `), bulletList: icon(svg` <path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m-3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2\"/> `), orderedList: icon(svg` <g fill=\"currentColor\"> <path fill-rule=\"evenodd\" d=\"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5\"/> <path d=\"M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317c0-.185-.158-.31-.361-.31c-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787c.588-.002.954.291.957.703a.595.595 0 0 1-.492.594v.033a.615.615 0 0 1 .569.631c.003.533-.502.8-1.051.8c-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309c.254 0 .424-.145.422-.35c-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844c.583 0 .96.326.96.756c0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508c0-.18-.147-.32-.342-.32a.33.33 0 0 0-.342.338zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635z\"/> </g> `), codeBlock: icon(svg` <path fill=\"currentColor\" d=\"M2.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C3.25 2 2.49 2.759 2.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6M13.886 7.9v.163c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456V7.332c-1.114 0-1.49-.362-1.49-1.456V4.352C13.51 2.759 12.75 2 11.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6\"/> `), source: icon(svg` <g fill=\"currentColor\"> <path d=\"M14 3a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM2 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z\"/> <path fill-rule=\"evenodd\" d=\"M9.146 8.146a.5.5 0 0 1 .708 0L11.5 9.793l1.646-1.647a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 0-.708\"/> <path fill-rule=\"evenodd\" d=\"M11.5 5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1 .5-.5\"/> <path d=\"M3.56 11V7.01h.056l1.428 3.239h.774l1.42-3.24h.056V11h1.073V5.001h-1.2l-1.71 3.894h-.039l-1.71-3.894H2.5V11z\"/> </g> `), }"
126
+ }
127
+ ],
128
+ "exports": [
129
+ {
130
+ "kind": "js",
131
+ "name": "icons",
132
+ "declaration": {
133
+ "name": "icons",
134
+ "module": "src/icons.ts"
135
+ }
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "kind": "javascript-module",
141
+ "path": "src/index.ts",
142
+ "declarations": [],
143
+ "exports": [
144
+ {
145
+ "kind": "js",
146
+ "name": "RcMarkdownEditor",
147
+ "declaration": {
148
+ "name": "RcMarkdownEditor",
149
+ "module": "./rc-markdown-editor.js"
150
+ }
151
+ },
152
+ {
153
+ "kind": "js",
154
+ "name": "RcEditorToolbar",
155
+ "declaration": {
156
+ "name": "RcEditorToolbar",
157
+ "module": "./rc-editor-toolbar.js"
158
+ }
159
+ },
160
+ {
161
+ "kind": "js",
162
+ "name": "EditorToolbarAction",
163
+ "declaration": {
164
+ "name": "EditorToolbarAction",
165
+ "module": "./types.js"
166
+ }
167
+ },
168
+ {
169
+ "kind": "js",
170
+ "name": "EditorToolbarActionDetail",
171
+ "declaration": {
172
+ "name": "EditorToolbarActionDetail",
173
+ "module": "./types.js"
174
+ }
175
+ },
176
+ {
177
+ "kind": "js",
178
+ "name": "ActiveFormats",
179
+ "declaration": {
180
+ "name": "ActiveFormats",
181
+ "module": "./types.js"
182
+ }
183
+ },
184
+ {
185
+ "kind": "js",
186
+ "name": "EditorMode",
187
+ "declaration": {
188
+ "name": "EditorMode",
189
+ "module": "./types.js"
190
+ }
191
+ },
192
+ {
193
+ "kind": "js",
194
+ "name": "HeadingLevel",
195
+ "declaration": {
196
+ "name": "HeadingLevel",
197
+ "module": "./types.js"
198
+ }
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "kind": "javascript-module",
204
+ "path": "src/rc-editor-toolbar.ts",
205
+ "declarations": [
206
+ {
207
+ "kind": "class",
208
+ "description": "Formatting toolbar for `<rc-markdown-editor>`. Renders themed `rc-button`,\n`rc-select`, and `rc-toolbar` controls into its own light DOM so the parent\neditor can provide their shared appearance.\n\nActive-format properties are set by the parent editor and reflected as\n`aria-pressed` on the corresponding buttons. Heading level is shown via an\n`<rc-select>`. Code-block language is shown via a `<input>` when active.",
209
+ "name": "RcEditorToolbar",
210
+ "members": [
211
+ {
212
+ "kind": "field",
213
+ "name": "label",
214
+ "type": {
215
+ "text": "string"
216
+ },
217
+ "default": "'Formatting'",
218
+ "description": "Accessible label applied to the `rc-toolbar` container.",
219
+ "attribute": "label"
220
+ },
221
+ {
222
+ "kind": "field",
223
+ "name": "activeBold",
224
+ "type": {
225
+ "text": "boolean"
226
+ },
227
+ "default": "false",
228
+ "description": "Whether Bold formatting is active at the cursor.",
229
+ "attribute": "active-bold",
230
+ "reflects": true
231
+ },
232
+ {
233
+ "kind": "field",
234
+ "name": "activeItalic",
235
+ "type": {
236
+ "text": "boolean"
237
+ },
238
+ "default": "false",
239
+ "description": "Whether Italic formatting is active at the cursor.",
240
+ "attribute": "active-italic",
241
+ "reflects": true
242
+ },
243
+ {
244
+ "kind": "field",
245
+ "name": "activeUnderline",
246
+ "type": {
247
+ "text": "boolean"
248
+ },
249
+ "default": "false",
250
+ "description": "Whether Underline formatting is active at the cursor.",
251
+ "attribute": "active-underline",
252
+ "reflects": true
253
+ },
254
+ {
255
+ "kind": "field",
256
+ "name": "activeStrikethrough",
257
+ "type": {
258
+ "text": "boolean"
259
+ },
260
+ "default": "false",
261
+ "description": "Whether Strikethrough formatting is active at the cursor.",
262
+ "attribute": "active-strikethrough",
263
+ "reflects": true
264
+ },
265
+ {
266
+ "kind": "field",
267
+ "name": "activeCode",
268
+ "type": {
269
+ "text": "boolean"
270
+ },
271
+ "default": "false",
272
+ "description": "Whether inline Code formatting is active at the cursor.",
273
+ "attribute": "active-code",
274
+ "reflects": true
275
+ },
276
+ {
277
+ "kind": "field",
278
+ "name": "activeLink",
279
+ "type": {
280
+ "text": "boolean"
281
+ },
282
+ "default": "false",
283
+ "description": "Whether the cursor is inside a Link.",
284
+ "attribute": "active-link",
285
+ "reflects": true
286
+ },
287
+ {
288
+ "kind": "field",
289
+ "name": "activeHeading",
290
+ "type": {
291
+ "text": "HeadingLevel | null"
292
+ },
293
+ "default": "null",
294
+ "description": "Heading level active at the cursor, or `null` for paragraph text.",
295
+ "attribute": "active-heading"
296
+ },
297
+ {
298
+ "kind": "field",
299
+ "name": "activeBlockquote",
300
+ "type": {
301
+ "text": "boolean"
302
+ },
303
+ "default": "false",
304
+ "description": "Whether the cursor is inside a Blockquote.",
305
+ "attribute": "active-blockquote",
306
+ "reflects": true
307
+ },
308
+ {
309
+ "kind": "field",
310
+ "name": "activeBulletList",
311
+ "type": {
312
+ "text": "boolean"
313
+ },
314
+ "default": "false",
315
+ "description": "Whether the cursor is inside a Bullet List.",
316
+ "attribute": "active-bullet-list",
317
+ "reflects": true
318
+ },
319
+ {
320
+ "kind": "field",
321
+ "name": "activeOrderedList",
322
+ "type": {
323
+ "text": "boolean"
324
+ },
325
+ "default": "false",
326
+ "description": "Whether the cursor is inside an Ordered List.",
327
+ "attribute": "active-ordered-list",
328
+ "reflects": true
329
+ },
330
+ {
331
+ "kind": "field",
332
+ "name": "activeCodeBlock",
333
+ "type": {
334
+ "text": "boolean"
335
+ },
336
+ "default": "false",
337
+ "description": "Whether the cursor is inside a Code Block.",
338
+ "attribute": "active-code-block",
339
+ "reflects": true
340
+ },
341
+ {
342
+ "kind": "field",
343
+ "name": "codeLanguage",
344
+ "type": {
345
+ "text": "string | null"
346
+ },
347
+ "default": "null",
348
+ "description": "Language of the code block at the cursor. `null` means not in a code block\n(hides the language input). `''` means no language is set.",
349
+ "attribute": "code-language"
350
+ },
351
+ {
352
+ "kind": "field",
353
+ "name": "sourceMode",
354
+ "type": {
355
+ "text": "boolean"
356
+ },
357
+ "default": "false",
358
+ "description": "Whether the editor is in source mode.",
359
+ "attribute": "source-mode",
360
+ "reflects": true
361
+ },
362
+ {
363
+ "kind": "field",
364
+ "name": "_langInputValue",
365
+ "type": {
366
+ "text": "string"
367
+ },
368
+ "privacy": "protected",
369
+ "default": "''"
370
+ },
371
+ {
372
+ "kind": "method",
373
+ "name": "_dispatch",
374
+ "privacy": "protected",
375
+ "return": {
376
+ "type": {
377
+ "text": "void"
378
+ }
379
+ },
380
+ "parameters": [
381
+ {
382
+ "name": "action",
383
+ "type": {
384
+ "text": "EditorToolbarAction"
385
+ }
386
+ },
387
+ {
388
+ "name": "extra",
389
+ "optional": true,
390
+ "type": {
391
+ "text": "Partial<EditorToolbarActionDetail>"
392
+ }
393
+ }
394
+ ]
395
+ },
396
+ {
397
+ "kind": "field",
398
+ "name": "_onClick",
399
+ "privacy": "protected"
400
+ },
401
+ {
402
+ "kind": "field",
403
+ "name": "_onHeadingChange",
404
+ "privacy": "protected"
405
+ },
406
+ {
407
+ "kind": "field",
408
+ "name": "_onLangInput",
409
+ "privacy": "protected"
410
+ },
411
+ {
412
+ "kind": "field",
413
+ "name": "_onLangCommit",
414
+ "privacy": "protected"
415
+ },
416
+ {
417
+ "kind": "field",
418
+ "name": "_onLangKeyDown",
419
+ "privacy": "protected"
420
+ },
421
+ {
422
+ "kind": "method",
423
+ "name": "_renderActionButton",
424
+ "privacy": "protected",
425
+ "return": {
426
+ "type": {
427
+ "text": "TemplateResult"
428
+ }
429
+ },
430
+ "parameters": [
431
+ {
432
+ "name": "action",
433
+ "type": {
434
+ "text": "EditorToolbarAction"
435
+ }
436
+ },
437
+ {
438
+ "name": "label",
439
+ "type": {
440
+ "text": "string"
441
+ }
442
+ },
443
+ {
444
+ "name": "title",
445
+ "type": {
446
+ "text": "string"
447
+ }
448
+ },
449
+ {
450
+ "name": "active",
451
+ "type": {
452
+ "text": "boolean"
453
+ }
454
+ },
455
+ {
456
+ "name": "icon",
457
+ "type": {
458
+ "text": "SVGTemplateResult"
459
+ }
460
+ }
461
+ ]
462
+ }
463
+ ],
464
+ "events": [
465
+ {
466
+ "name": "rc-toolbar-action",
467
+ "type": {
468
+ "text": "CustomEvent"
469
+ },
470
+ "description": "When a formatting button or select is activated."
471
+ }
472
+ ],
473
+ "attributes": [
474
+ {
475
+ "description": "Accessible label applied to the `rc-toolbar` container.",
476
+ "name": "label",
477
+ "type": {
478
+ "text": "string"
479
+ },
480
+ "default": "'Formatting'",
481
+ "fieldName": "label"
482
+ },
483
+ {
484
+ "description": "Whether Bold formatting is active at the cursor.",
485
+ "name": "active-bold",
486
+ "type": {
487
+ "text": "boolean"
488
+ },
489
+ "default": "false",
490
+ "fieldName": "activeBold"
491
+ },
492
+ {
493
+ "description": "Whether Italic formatting is active at the cursor.",
494
+ "name": "active-italic",
495
+ "type": {
496
+ "text": "boolean"
497
+ },
498
+ "default": "false",
499
+ "fieldName": "activeItalic"
500
+ },
501
+ {
502
+ "description": "Whether Underline formatting is active at the cursor.",
503
+ "name": "active-underline",
504
+ "type": {
505
+ "text": "boolean"
506
+ },
507
+ "default": "false",
508
+ "fieldName": "activeUnderline"
509
+ },
510
+ {
511
+ "description": "Whether Strikethrough formatting is active at the cursor.",
512
+ "name": "active-strikethrough",
513
+ "type": {
514
+ "text": "boolean"
515
+ },
516
+ "default": "false",
517
+ "fieldName": "activeStrikethrough"
518
+ },
519
+ {
520
+ "description": "Whether inline Code formatting is active at the cursor.",
521
+ "name": "active-code",
522
+ "type": {
523
+ "text": "boolean"
524
+ },
525
+ "default": "false",
526
+ "fieldName": "activeCode"
527
+ },
528
+ {
529
+ "description": "Whether the cursor is inside a Link.",
530
+ "name": "active-link",
531
+ "type": {
532
+ "text": "boolean"
533
+ },
534
+ "default": "false",
535
+ "fieldName": "activeLink"
536
+ },
537
+ {
538
+ "description": "Heading level active at the cursor, or `null` for paragraph text.",
539
+ "name": "active-heading",
540
+ "type": {
541
+ "text": "HeadingLevel | null"
542
+ },
543
+ "default": "null",
544
+ "fieldName": "activeHeading"
545
+ },
546
+ {
547
+ "description": "Whether the cursor is inside a Blockquote.",
548
+ "name": "active-blockquote",
549
+ "type": {
550
+ "text": "boolean"
551
+ },
552
+ "default": "false",
553
+ "fieldName": "activeBlockquote"
554
+ },
555
+ {
556
+ "description": "Whether the cursor is inside a Bullet List.",
557
+ "name": "active-bullet-list",
558
+ "type": {
559
+ "text": "boolean"
560
+ },
561
+ "default": "false",
562
+ "fieldName": "activeBulletList"
563
+ },
564
+ {
565
+ "description": "Whether the cursor is inside an Ordered List.",
566
+ "name": "active-ordered-list",
567
+ "type": {
568
+ "text": "boolean"
569
+ },
570
+ "default": "false",
571
+ "fieldName": "activeOrderedList"
572
+ },
573
+ {
574
+ "description": "Whether the cursor is inside a Code Block.",
575
+ "name": "active-code-block",
576
+ "type": {
577
+ "text": "boolean"
578
+ },
579
+ "default": "false",
580
+ "fieldName": "activeCodeBlock"
581
+ },
582
+ {
583
+ "description": "Language of the code block at the cursor. `null` means not in a code block\n(hides the language input). `''` means no language is set.",
584
+ "name": "code-language",
585
+ "type": {
586
+ "text": "string | null"
587
+ },
588
+ "default": "null",
589
+ "fieldName": "codeLanguage"
590
+ },
591
+ {
592
+ "description": "Whether the editor is in source mode.",
593
+ "name": "source-mode",
594
+ "type": {
595
+ "text": "boolean"
596
+ },
597
+ "default": "false",
598
+ "fieldName": "sourceMode"
599
+ }
600
+ ],
601
+ "superclass": {
602
+ "name": "LitElement",
603
+ "package": "lit"
604
+ },
605
+ "tagName": "rc-editor-toolbar",
606
+ "customElement": true
607
+ }
608
+ ],
609
+ "exports": [
610
+ {
611
+ "kind": "js",
612
+ "name": "RcEditorToolbar",
613
+ "declaration": {
614
+ "name": "RcEditorToolbar",
615
+ "module": "src/rc-editor-toolbar.ts"
616
+ }
617
+ }
618
+ ]
619
+ },
620
+ {
621
+ "kind": "javascript-module",
622
+ "path": "src/rc-markdown-editor.ts",
623
+ "declarations": [
624
+ {
625
+ "kind": "class",
626
+ "description": "Rich/source Markdown editor with a formatting toolbar, backed by rc-textarea.\n\n- **Rich mode (default)**: A `contenteditable` div shows micromark-rendered\n HTML. DOM mutations are converted back to markdown via turndown and\n written to the backing `<textarea>` for form participation.\n- **Source mode**: An `<rc-textarea>` instance shows the markdown source\n with live decorations. Toggle via `source-mode` attribute or Ctrl+Shift+S.\n\nConsumer markup follows the same progressive-enhancement contract as\n`<rc-textarea>`:\n\n```html\n<rc-markdown-editor>\n <label for=\"body\">Content</label>\n <textarea id=\"body\" name=\"body\"></textarea>\n</rc-markdown-editor>\n```",
627
+ "name": "RcMarkdownEditor",
628
+ "cssProperties": [
629
+ {
630
+ "description": "Font family of the rich-text view",
631
+ "name": "--rc-markdown-editor-font-family",
632
+ "default": "inherit"
633
+ },
634
+ {
635
+ "description": "Font size of the rich-text view",
636
+ "name": "--rc-markdown-editor-font-size",
637
+ "default": "inherit"
638
+ },
639
+ {
640
+ "description": "Line height of the rich-text view",
641
+ "name": "--rc-markdown-editor-line-height",
642
+ "default": "1.6"
643
+ },
644
+ {
645
+ "description": "Padding inside the rich-text view",
646
+ "name": "--rc-markdown-editor-padding",
647
+ "default": "0.75em 1em"
648
+ },
649
+ {
650
+ "description": "Background color of the rich-text view",
651
+ "name": "--rc-markdown-editor-background",
652
+ "default": "Canvas"
653
+ },
654
+ {
655
+ "description": "Text color of the rich-text view",
656
+ "name": "--rc-markdown-editor-color",
657
+ "default": "CanvasText"
658
+ },
659
+ {
660
+ "description": "Border around the rich-text view",
661
+ "name": "--rc-markdown-editor-border",
662
+ "default": "1px solid ButtonBorder"
663
+ },
664
+ {
665
+ "description": "Border radius of the rich-text view",
666
+ "name": "--rc-markdown-editor-border-radius",
667
+ "default": "0 0 4px 4px"
668
+ },
669
+ {
670
+ "description": "Focus ring outline on the rich-text view",
671
+ "name": "--rc-markdown-editor-focus-outline",
672
+ "default": "2px solid Highlight"
673
+ },
674
+ {
675
+ "description": "Font family of the source editor",
676
+ "name": "--rc-markdown-editor-src-font-family",
677
+ "default": "'Cascadia Code', 'Fira Code', ui-monospace, monospace"
678
+ },
679
+ {
680
+ "description": "Gap between toolbar buttons",
681
+ "name": "--rc-markdown-editor-toolbar-gap",
682
+ "default": "1px"
683
+ },
684
+ {
685
+ "description": "Padding inside the toolbar",
686
+ "name": "--rc-markdown-editor-toolbar-padding",
687
+ "default": "4px"
688
+ },
689
+ {
690
+ "description": "Toolbar border radius",
691
+ "name": "--rc-markdown-editor-toolbar-radius",
692
+ "default": "4px 4px 0 0"
693
+ },
694
+ {
695
+ "description": "Toolbar border",
696
+ "name": "--rc-markdown-editor-toolbar-border",
697
+ "default": "1px solid ButtonBorder"
698
+ },
699
+ {
700
+ "description": "Toolbar background",
701
+ "name": "--rc-markdown-editor-toolbar-background",
702
+ "default": "Canvas"
703
+ },
704
+ {
705
+ "description": "Toolbar text color",
706
+ "name": "--rc-markdown-editor-toolbar-color",
707
+ "default": "CanvasText"
708
+ },
709
+ {
710
+ "description": "Minimum inline and block size of toolbar buttons",
711
+ "name": "--rc-markdown-editor-toolbar-button-size",
712
+ "default": "2rem"
713
+ },
714
+ {
715
+ "description": "Toolbar button background",
716
+ "name": "--rc-markdown-editor-toolbar-button-background",
717
+ "default": "transparent"
718
+ },
719
+ {
720
+ "description": "Toolbar button text color",
721
+ "name": "--rc-markdown-editor-toolbar-button-color",
722
+ "default": "ButtonText"
723
+ },
724
+ {
725
+ "description": "Toolbar button border",
726
+ "name": "--rc-markdown-editor-toolbar-button-border",
727
+ "default": "1px solid transparent"
728
+ },
729
+ {
730
+ "description": "Toolbar button border radius",
731
+ "name": "--rc-markdown-editor-toolbar-button-radius",
732
+ "default": "3px"
733
+ },
734
+ {
735
+ "description": "Toolbar button hover state-layer opacity",
736
+ "name": "--rc-markdown-editor-toolbar-button-hover-opacity",
737
+ "default": "0.08"
738
+ },
739
+ {
740
+ "description": "Toolbar button focus state-layer opacity",
741
+ "name": "--rc-markdown-editor-toolbar-button-focus-opacity",
742
+ "default": "0.12"
743
+ },
744
+ {
745
+ "description": "Toolbar button pressed state-layer opacity",
746
+ "name": "--rc-markdown-editor-toolbar-button-pressed-opacity",
747
+ "default": "0.12"
748
+ },
749
+ {
750
+ "description": "Active toolbar button background",
751
+ "name": "--rc-markdown-editor-toolbar-button-active-background",
752
+ "default": "Highlight"
753
+ },
754
+ {
755
+ "description": "Active toolbar button text color",
756
+ "name": "--rc-markdown-editor-toolbar-button-active-color",
757
+ "default": "HighlightText"
758
+ },
759
+ {
760
+ "description": "Active toolbar button border",
761
+ "name": "--rc-markdown-editor-toolbar-button-active-border",
762
+ "default": "1px solid Highlight"
763
+ },
764
+ {
765
+ "description": "Toolbar control focus outline",
766
+ "name": "--rc-markdown-editor-toolbar-focus-outline",
767
+ "default": "2px solid Highlight"
768
+ },
769
+ {
770
+ "description": "Toolbar control focus outline offset",
771
+ "name": "--rc-markdown-editor-toolbar-focus-outline-offset",
772
+ "default": "1px"
773
+ },
774
+ {
775
+ "description": "Toolbar select border",
776
+ "name": "--rc-markdown-editor-toolbar-select-border",
777
+ "default": "1px solid ButtonBorder"
778
+ },
779
+ {
780
+ "description": "Toolbar select border radius",
781
+ "name": "--rc-markdown-editor-toolbar-select-radius",
782
+ "default": "3px"
783
+ },
784
+ {
785
+ "description": "Toolbar select background",
786
+ "name": "--rc-markdown-editor-toolbar-select-background",
787
+ "default": "ButtonFace"
788
+ },
789
+ {
790
+ "description": "Toolbar select text color",
791
+ "name": "--rc-markdown-editor-toolbar-select-color",
792
+ "default": "ButtonText"
793
+ },
794
+ {
795
+ "description": "Active toolbar select background",
796
+ "name": "--rc-markdown-editor-toolbar-select-active-background",
797
+ "default": "Highlight"
798
+ },
799
+ {
800
+ "description": "Active toolbar select text color",
801
+ "name": "--rc-markdown-editor-toolbar-select-active-color",
802
+ "default": "HighlightText"
803
+ },
804
+ {
805
+ "description": "Active toolbar select border color",
806
+ "name": "--rc-markdown-editor-toolbar-select-active-border-color",
807
+ "default": "Highlight"
808
+ },
809
+ {
810
+ "description": "Toolbar input border",
811
+ "name": "--rc-markdown-editor-toolbar-input-border",
812
+ "default": "1px solid ButtonBorder"
813
+ },
814
+ {
815
+ "description": "Toolbar input border radius",
816
+ "name": "--rc-markdown-editor-toolbar-input-radius",
817
+ "default": "3px"
818
+ },
819
+ {
820
+ "description": "Toolbar input background",
821
+ "name": "--rc-markdown-editor-toolbar-input-background",
822
+ "default": "Field"
823
+ },
824
+ {
825
+ "description": "Toolbar input text color",
826
+ "name": "--rc-markdown-editor-toolbar-input-color",
827
+ "default": "FieldText"
828
+ },
829
+ {
830
+ "description": "Source-mode heading token color",
831
+ "name": "--rc-markdown-editor-src-heading-color",
832
+ "default": "light-dark(#1d6fc4, #82b4f5)"
833
+ },
834
+ {
835
+ "description": "Source-mode inline/fenced code token color",
836
+ "name": "--rc-markdown-editor-src-code-color",
837
+ "default": "light-dark(#c94a1a, #f09060)"
838
+ },
839
+ {
840
+ "description": "Source-mode link token color",
841
+ "name": "--rc-markdown-editor-src-link-color",
842
+ "default": "light-dark(#0370b0, #60b8e8)"
843
+ },
844
+ {
845
+ "description": "Source-mode blockquote token color",
846
+ "name": "--rc-markdown-editor-src-blockquote-color",
847
+ "default": "light-dark(#2d7a42, #70b880)"
848
+ },
849
+ {
850
+ "description": "Source-mode list marker token color",
851
+ "name": "--rc-markdown-editor-src-list-color",
852
+ "default": "light-dark(#7a5c0a, #d4ac48)"
853
+ },
854
+ {
855
+ "description": "Source-mode strikethrough token color",
856
+ "name": "--rc-markdown-editor-src-dim-color",
857
+ "default": "GrayText"
858
+ }
859
+ ],
860
+ "cssParts": [
861
+ {
862
+ "description": "The `<rc-editor-toolbar>` element.",
863
+ "name": "toolbar"
864
+ },
865
+ {
866
+ "description": "The contenteditable rich-text view.",
867
+ "name": "rich-view"
868
+ }
869
+ ],
870
+ "slots": [
871
+ {
872
+ "description": "Accepts a native `<textarea>` element (and optional `<label>`) for form wiring.",
873
+ "name": ""
874
+ }
875
+ ],
876
+ "members": [
877
+ {
878
+ "kind": "field",
879
+ "name": "_value",
880
+ "type": {
881
+ "text": "string | undefined"
882
+ },
883
+ "privacy": "private"
884
+ },
885
+ {
886
+ "kind": "field",
887
+ "name": "_defaultValue",
888
+ "type": {
889
+ "text": "string"
890
+ },
891
+ "privacy": "private",
892
+ "default": "''"
893
+ },
894
+ {
895
+ "kind": "field",
896
+ "name": "_valueInitialized",
897
+ "type": {
898
+ "text": "boolean"
899
+ },
900
+ "privacy": "private",
901
+ "default": "false"
902
+ },
903
+ {
904
+ "kind": "field",
905
+ "name": "defaultValue",
906
+ "type": {
907
+ "text": "string"
908
+ },
909
+ "description": "Initial uncontrolled Markdown value.",
910
+ "attribute": "default-value"
911
+ },
912
+ {
913
+ "kind": "field",
914
+ "name": "value",
915
+ "type": {
916
+ "text": "string"
917
+ },
918
+ "description": "Current Markdown value. Host writes are silent.",
919
+ "attribute": "value"
920
+ },
921
+ {
922
+ "kind": "field",
923
+ "name": "_sourceMode",
924
+ "type": {
925
+ "text": "boolean | undefined"
926
+ },
927
+ "privacy": "private"
928
+ },
929
+ {
930
+ "kind": "field",
931
+ "name": "_defaultSourceMode",
932
+ "type": {
933
+ "text": "boolean"
934
+ },
935
+ "privacy": "private",
936
+ "default": "false"
937
+ },
938
+ {
939
+ "kind": "field",
940
+ "name": "_sourceModeInitialized",
941
+ "type": {
942
+ "text": "boolean"
943
+ },
944
+ "privacy": "private",
945
+ "default": "false"
946
+ },
947
+ {
948
+ "kind": "field",
949
+ "name": "defaultSourceMode",
950
+ "type": {
951
+ "text": "boolean"
952
+ },
953
+ "description": "Initial uncontrolled source-mode state.",
954
+ "attribute": "default-source-mode"
955
+ },
956
+ {
957
+ "kind": "field",
958
+ "name": "sourceMode",
959
+ "type": {
960
+ "text": "boolean"
961
+ },
962
+ "description": "Controlled: show the markdown source editor instead of the rich view.\nHost writes are silent; toolbar/keyboard toggles dispatch `rc-mode-change`.",
963
+ "attribute": "source-mode",
964
+ "reflects": true
965
+ },
966
+ {
967
+ "kind": "field",
968
+ "name": "toolbar",
969
+ "type": {
970
+ "text": "boolean"
971
+ },
972
+ "default": "true",
973
+ "description": "Show the formatting toolbar.",
974
+ "attribute": "toolbar",
975
+ "reflects": true
976
+ },
977
+ {
978
+ "kind": "field",
979
+ "name": "readOnly",
980
+ "type": {
981
+ "text": "boolean"
982
+ },
983
+ "default": "false",
984
+ "description": "Make the editor read-only.",
985
+ "attribute": "read-only",
986
+ "reflects": true
987
+ },
988
+ {
989
+ "kind": "field",
990
+ "name": "_$richView",
991
+ "type": {
992
+ "text": "HTMLDivElement"
993
+ },
994
+ "privacy": "protected"
995
+ },
996
+ {
997
+ "kind": "field",
998
+ "name": "_$sourceEditor",
999
+ "type": {
1000
+ "text": "RCTextarea"
1001
+ },
1002
+ "privacy": "protected"
1003
+ },
1004
+ {
1005
+ "kind": "field",
1006
+ "name": "_$toolbar",
1007
+ "type": {
1008
+ "text": "HTMLElement | undefined"
1009
+ },
1010
+ "privacy": "protected"
1011
+ },
1012
+ {
1013
+ "kind": "field",
1014
+ "name": "_observer",
1015
+ "type": {
1016
+ "text": "MutationObserver | null"
1017
+ },
1018
+ "privacy": "protected",
1019
+ "default": "null"
1020
+ },
1021
+ {
1022
+ "kind": "field",
1023
+ "name": "_$savedRange",
1024
+ "type": {
1025
+ "text": "Range | null"
1026
+ },
1027
+ "privacy": "protected",
1028
+ "default": "null"
1029
+ },
1030
+ {
1031
+ "kind": "field",
1032
+ "name": "_activeFormats",
1033
+ "type": {
1034
+ "text": "ActiveFormats"
1035
+ },
1036
+ "privacy": "protected",
1037
+ "default": "{}"
1038
+ },
1039
+ {
1040
+ "kind": "field",
1041
+ "name": "_syncTimer",
1042
+ "type": {
1043
+ "text": "ReturnType<typeof setTimeout> | null"
1044
+ },
1045
+ "privacy": "protected",
1046
+ "default": "null"
1047
+ },
1048
+ {
1049
+ "kind": "field",
1050
+ "name": "_pluginApi",
1051
+ "type": {
1052
+ "text": "RCTextareaPluginAPI | null"
1053
+ },
1054
+ "privacy": "protected",
1055
+ "default": "null"
1056
+ },
1057
+ {
1058
+ "kind": "field",
1059
+ "name": "_ignoreRichMutations",
1060
+ "type": {
1061
+ "text": "boolean"
1062
+ },
1063
+ "privacy": "protected",
1064
+ "default": "false"
1065
+ },
1066
+ {
1067
+ "kind": "field",
1068
+ "name": "_richViewRendered",
1069
+ "type": {
1070
+ "text": "boolean"
1071
+ },
1072
+ "privacy": "protected",
1073
+ "default": "false"
1074
+ },
1075
+ {
1076
+ "kind": "field",
1077
+ "name": "_cachedTree",
1078
+ "type": {
1079
+ "text": "ReturnType<typeof fromMarkdown> | null"
1080
+ },
1081
+ "privacy": "protected",
1082
+ "default": "null"
1083
+ },
1084
+ {
1085
+ "kind": "field",
1086
+ "name": "_renderedMode",
1087
+ "type": {
1088
+ "text": "EditorMode | null"
1089
+ },
1090
+ "privacy": "protected",
1091
+ "default": "null"
1092
+ },
1093
+ {
1094
+ "kind": "field",
1095
+ "name": "_firstUpdatedDone",
1096
+ "type": {
1097
+ "text": "boolean"
1098
+ },
1099
+ "privacy": "protected",
1100
+ "default": "false"
1101
+ },
1102
+ {
1103
+ "kind": "field",
1104
+ "name": "_$linkPopover",
1105
+ "type": {
1106
+ "text": "HTMLDivElement | undefined"
1107
+ },
1108
+ "privacy": "protected"
1109
+ },
1110
+ {
1111
+ "kind": "field",
1112
+ "name": "_$linkPopoverInput",
1113
+ "type": {
1114
+ "text": "HTMLInputElement | undefined"
1115
+ },
1116
+ "privacy": "protected"
1117
+ },
1118
+ {
1119
+ "kind": "field",
1120
+ "name": "_linkPopoverOpen",
1121
+ "type": {
1122
+ "text": "boolean"
1123
+ },
1124
+ "privacy": "protected",
1125
+ "default": "false"
1126
+ },
1127
+ {
1128
+ "kind": "field",
1129
+ "name": "_linkPopoverHref",
1130
+ "type": {
1131
+ "text": "string"
1132
+ },
1133
+ "privacy": "protected",
1134
+ "default": "''"
1135
+ },
1136
+ {
1137
+ "kind": "method",
1138
+ "name": "_setRichViewContent",
1139
+ "privacy": "protected",
1140
+ "parameters": [
1141
+ {
1142
+ "name": "markdown",
1143
+ "type": {
1144
+ "text": "string"
1145
+ }
1146
+ }
1147
+ ]
1148
+ },
1149
+ {
1150
+ "kind": "method",
1151
+ "name": "_renderMarkdown",
1152
+ "privacy": "protected",
1153
+ "return": {
1154
+ "type": {
1155
+ "text": "string"
1156
+ }
1157
+ },
1158
+ "parameters": [
1159
+ {
1160
+ "name": "markdown",
1161
+ "type": {
1162
+ "text": "string"
1163
+ }
1164
+ }
1165
+ ]
1166
+ },
1167
+ {
1168
+ "kind": "method",
1169
+ "name": "_scheduleMarkdownSync",
1170
+ "privacy": "protected"
1171
+ },
1172
+ {
1173
+ "kind": "method",
1174
+ "name": "_syncMarkdownFromRichView",
1175
+ "privacy": "protected"
1176
+ },
1177
+ {
1178
+ "kind": "method",
1179
+ "name": "_switchToSource",
1180
+ "privacy": "protected"
1181
+ },
1182
+ {
1183
+ "kind": "method",
1184
+ "name": "_switchToRich",
1185
+ "privacy": "protected"
1186
+ },
1187
+ {
1188
+ "kind": "method",
1189
+ "name": "_setupSourcePlugin",
1190
+ "privacy": "protected"
1191
+ },
1192
+ {
1193
+ "kind": "method",
1194
+ "name": "_getCodeBlockLanguage",
1195
+ "privacy": "protected",
1196
+ "return": {
1197
+ "type": {
1198
+ "text": "string | null"
1199
+ }
1200
+ },
1201
+ "parameters": [
1202
+ {
1203
+ "name": "tree",
1204
+ "type": {
1205
+ "text": "ReturnType<typeof fromMarkdown>"
1206
+ }
1207
+ },
1208
+ {
1209
+ "name": "offset",
1210
+ "type": {
1211
+ "text": "number"
1212
+ }
1213
+ }
1214
+ ]
1215
+ },
1216
+ {
1217
+ "kind": "field",
1218
+ "name": "_onSourceChange",
1219
+ "privacy": "protected"
1220
+ },
1221
+ {
1222
+ "kind": "field",
1223
+ "name": "_onToolbarAction",
1224
+ "privacy": "protected"
1225
+ },
1226
+ {
1227
+ "kind": "method",
1228
+ "name": "_applyRichFormat",
1229
+ "privacy": "protected",
1230
+ "parameters": [
1231
+ {
1232
+ "name": "action",
1233
+ "type": {
1234
+ "text": "EditorToolbarAction"
1235
+ }
1236
+ }
1237
+ ]
1238
+ },
1239
+ {
1240
+ "kind": "method",
1241
+ "name": "_applySourceFormat",
1242
+ "privacy": "protected",
1243
+ "parameters": [
1244
+ {
1245
+ "name": "action",
1246
+ "type": {
1247
+ "text": "EditorToolbarAction"
1248
+ }
1249
+ }
1250
+ ]
1251
+ },
1252
+ {
1253
+ "kind": "method",
1254
+ "name": "_setSourceHeadingLevel",
1255
+ "privacy": "protected",
1256
+ "parameters": [
1257
+ {
1258
+ "name": "level",
1259
+ "type": {
1260
+ "text": "HeadingLevel | null"
1261
+ }
1262
+ }
1263
+ ],
1264
+ "description": "Sets the heading level on the cursor's line in source mode. null = paragraph."
1265
+ },
1266
+ {
1267
+ "kind": "method",
1268
+ "name": "_setSourceCodeBlockLanguage",
1269
+ "privacy": "protected",
1270
+ "parameters": [
1271
+ {
1272
+ "name": "lang",
1273
+ "type": {
1274
+ "text": "string"
1275
+ }
1276
+ }
1277
+ ],
1278
+ "description": "Updates the language of the code block at the cursor in source mode."
1279
+ },
1280
+ {
1281
+ "kind": "method",
1282
+ "name": "_setRichCodeBlockLanguage",
1283
+ "privacy": "protected",
1284
+ "parameters": [
1285
+ {
1286
+ "name": "lang",
1287
+ "type": {
1288
+ "text": "string"
1289
+ }
1290
+ }
1291
+ ],
1292
+ "description": "Updates the `data-lang` attribute on the `<pre>` at the cursor in rich mode."
1293
+ },
1294
+ {
1295
+ "kind": "method",
1296
+ "name": "_toggleLinePrefix",
1297
+ "privacy": "protected",
1298
+ "parameters": [
1299
+ {
1300
+ "name": "prefix",
1301
+ "type": {
1302
+ "text": "string"
1303
+ }
1304
+ }
1305
+ ],
1306
+ "description": "Toggles a line prefix (e.g. `'> '`, `'- '`) on the cursor's line."
1307
+ },
1308
+ {
1309
+ "kind": "method",
1310
+ "name": "_toggleSourceCodeFence",
1311
+ "privacy": "protected",
1312
+ "description": "Wraps the current selection (or cursor line) with a fenced code block."
1313
+ },
1314
+ {
1315
+ "kind": "method",
1316
+ "name": "_wrapRichSelection",
1317
+ "privacy": "protected",
1318
+ "parameters": [
1319
+ {
1320
+ "name": "tag",
1321
+ "type": {
1322
+ "text": "string"
1323
+ }
1324
+ }
1325
+ ]
1326
+ },
1327
+ {
1328
+ "kind": "method",
1329
+ "name": "_toggleRichCodeBlock",
1330
+ "privacy": "protected"
1331
+ },
1332
+ {
1333
+ "kind": "field",
1334
+ "name": "_onKeyDown",
1335
+ "privacy": "protected"
1336
+ },
1337
+ {
1338
+ "kind": "field",
1339
+ "name": "_onSelectionChange",
1340
+ "privacy": "protected"
1341
+ },
1342
+ {
1343
+ "kind": "method",
1344
+ "name": "_pushToolbarState",
1345
+ "privacy": "protected"
1346
+ },
1347
+ {
1348
+ "kind": "method",
1349
+ "name": "_syncNativeTextarea",
1350
+ "privacy": "protected"
1351
+ },
1352
+ {
1353
+ "kind": "method",
1354
+ "name": "_connectLabel",
1355
+ "privacy": "protected"
1356
+ },
1357
+ {
1358
+ "kind": "field",
1359
+ "name": "_onRichViewClick",
1360
+ "privacy": "protected"
1361
+ },
1362
+ {
1363
+ "kind": "field",
1364
+ "name": "_onDocumentClick",
1365
+ "privacy": "protected"
1366
+ },
1367
+ {
1368
+ "kind": "method",
1369
+ "name": "_expandRichSelectionToWord",
1370
+ "privacy": "protected",
1371
+ "return": {
1372
+ "type": {
1373
+ "text": "void"
1374
+ }
1375
+ }
1376
+ },
1377
+ {
1378
+ "kind": "method",
1379
+ "name": "_positionLinkPopover",
1380
+ "privacy": "protected",
1381
+ "return": {
1382
+ "type": {
1383
+ "text": "void"
1384
+ }
1385
+ }
1386
+ },
1387
+ {
1388
+ "kind": "field",
1389
+ "name": "_applyLink",
1390
+ "privacy": "protected"
1391
+ },
1392
+ {
1393
+ "kind": "field",
1394
+ "name": "_removeLink",
1395
+ "privacy": "protected"
1396
+ },
1397
+ {
1398
+ "kind": "field",
1399
+ "name": "_openLinkHref",
1400
+ "privacy": "protected"
1401
+ },
1402
+ {
1403
+ "kind": "field",
1404
+ "name": "_onLinkPopoverKeyDown",
1405
+ "privacy": "protected"
1406
+ },
1407
+ {
1408
+ "kind": "method",
1409
+ "name": "_dispatchChange",
1410
+ "privacy": "protected",
1411
+ "parameters": [
1412
+ {
1413
+ "name": "value",
1414
+ "type": {
1415
+ "text": "string"
1416
+ }
1417
+ }
1418
+ ]
1419
+ },
1420
+ {
1421
+ "kind": "method",
1422
+ "name": "_dispatchModeChange",
1423
+ "privacy": "protected",
1424
+ "parameters": [
1425
+ {
1426
+ "name": "mode",
1427
+ "type": {
1428
+ "text": "EditorMode"
1429
+ }
1430
+ }
1431
+ ]
1432
+ }
1433
+ ],
1434
+ "events": [
1435
+ {
1436
+ "name": "rc-formatting-change",
1437
+ "type": {
1438
+ "text": "CustomEvent"
1439
+ },
1440
+ "description": "Active formats at cursor changed. Detail: `ActiveFormats`."
1441
+ },
1442
+ {
1443
+ "name": "rc-change",
1444
+ "type": {
1445
+ "text": "CustomEvent"
1446
+ },
1447
+ "description": "Value changed. Detail: `{ value: string }`."
1448
+ },
1449
+ {
1450
+ "name": "rc-mode-change",
1451
+ "type": {
1452
+ "text": "CustomEvent"
1453
+ },
1454
+ "description": "Mode toggled. Detail: `{ mode: EditorMode }`."
1455
+ }
1456
+ ],
1457
+ "attributes": [
1458
+ {
1459
+ "description": "Show the formatting toolbar.",
1460
+ "name": "toolbar",
1461
+ "type": {
1462
+ "text": "boolean"
1463
+ },
1464
+ "default": "true",
1465
+ "fieldName": "toolbar"
1466
+ },
1467
+ {
1468
+ "description": "Controlled: show the markdown source editor instead of the rich view.\nHost writes are silent; toolbar/keyboard toggles dispatch `rc-mode-change`.",
1469
+ "name": "source-mode",
1470
+ "type": {
1471
+ "text": "boolean"
1472
+ },
1473
+ "fieldName": "sourceMode"
1474
+ },
1475
+ {
1476
+ "description": "Initial uncontrolled source-mode state.",
1477
+ "name": "default-source-mode",
1478
+ "type": {
1479
+ "text": "boolean"
1480
+ },
1481
+ "fieldName": "defaultSourceMode"
1482
+ },
1483
+ {
1484
+ "description": "Make the editor read-only.",
1485
+ "name": "read-only",
1486
+ "type": {
1487
+ "text": "boolean"
1488
+ },
1489
+ "default": "false",
1490
+ "fieldName": "readOnly"
1491
+ },
1492
+ {
1493
+ "description": "Current Markdown value. Host writes are silent.",
1494
+ "name": "value",
1495
+ "type": {
1496
+ "text": "string"
1497
+ },
1498
+ "fieldName": "value"
1499
+ },
1500
+ {
1501
+ "description": "Initial uncontrolled Markdown value.",
1502
+ "name": "default-value",
1503
+ "type": {
1504
+ "text": "string"
1505
+ },
1506
+ "fieldName": "defaultValue"
1507
+ }
1508
+ ],
1509
+ "superclass": {
1510
+ "name": "LitElement",
1511
+ "package": "lit"
1512
+ },
1513
+ "tagName": "rc-markdown-editor",
1514
+ "customElement": true
1515
+ },
1516
+ {
1517
+ "kind": "variable",
1518
+ "name": "from"
1519
+ },
1520
+ {
1521
+ "kind": "variable",
1522
+ "name": "to"
1523
+ }
1524
+ ],
1525
+ "exports": [
1526
+ {
1527
+ "kind": "js",
1528
+ "name": "RcMarkdownEditor",
1529
+ "declaration": {
1530
+ "name": "RcMarkdownEditor",
1531
+ "module": "src/rc-markdown-editor.ts"
1532
+ }
1533
+ }
1534
+ ]
1535
+ },
1536
+ {
1537
+ "kind": "javascript-module",
1538
+ "path": "src/types.ts",
1539
+ "declarations": [],
1540
+ "exports": []
1541
+ }
1542
+ ]
1543
+ }