@portabletext/plugin-markdown-shortcuts 1.0.15 → 1.1.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.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var jsxRuntime = require("react/jsx-runtime"), editor = require("@portabletext/editor"), pluginCharacterPairDecorator = require("@portabletext/plugin-character-pair-decorator"), react = require("react"), behaviors = require("@portabletext/editor/behaviors"), selectors = require("@portabletext/editor/selectors"), utils = require("@portabletext/editor/utils");
3
+ var jsxRuntime = require("react/jsx-runtime"), compilerRuntime = require("react/compiler-runtime"), editor = require("@portabletext/editor"), pluginCharacterPairDecorator = require("@portabletext/plugin-character-pair-decorator"), react = require("react"), behaviors = require("@portabletext/editor/behaviors"), selectors = require("@portabletext/editor/selectors"), utils = require("@portabletext/editor/utils");
4
4
  function _interopNamespaceCompat(e) {
5
5
  if (e && typeof e == "object" && "default" in e) return e;
6
6
  var n = /* @__PURE__ */ Object.create(null);
@@ -20,7 +20,10 @@ var selectors__namespace = /* @__PURE__ */ _interopNamespaceCompat(selectors), u
20
20
  function createMarkdownBehaviors(config) {
21
21
  const automaticBlockquoteOnSpace = behaviors.defineBehavior({
22
22
  on: "insert.text",
23
- guard: ({ snapshot, event }) => {
23
+ guard: ({
24
+ snapshot,
25
+ event
26
+ }) => {
24
27
  if (event.text !== " ")
25
28
  return !1;
26
29
  const selectionCollapsed = selectors__namespace.isSelectionCollapsed(snapshot), focusTextBlock = selectors__namespace.getFocusTextBlock(snapshot), focusSpan = selectors__namespace.getFocusSpan(snapshot);
@@ -29,11 +32,11 @@ function createMarkdownBehaviors(config) {
29
32
  const previousInlineObject = selectors__namespace.getPreviousInlineObject(snapshot), blockOffset = utils__namespace.spanSelectionPointToBlockOffset({
30
33
  context: snapshot.context,
31
34
  selectionPoint: {
32
- path: [
33
- { _key: focusTextBlock.node._key },
34
- "children",
35
- { _key: focusSpan.node._key }
36
- ],
35
+ path: [{
36
+ _key: focusTextBlock.node._key
37
+ }, "children", {
38
+ _key: focusSpan.node._key
39
+ }],
37
40
  offset: snapshot.context.selection?.focus.offset ?? 0
38
41
  }
39
42
  });
@@ -42,44 +45,46 @@ function createMarkdownBehaviors(config) {
42
45
  const blockText = utils__namespace.getTextBlockText(focusTextBlock.node), caretAtTheEndOfQuote = blockOffset.offset === 1, looksLikeMarkdownQuote = /^>/.test(blockText), blockquoteStyle = config.blockquoteStyle?.({
43
46
  schema: snapshot.context.schema
44
47
  });
45
- return caretAtTheEndOfQuote && looksLikeMarkdownQuote && blockquoteStyle !== void 0 ? { focusTextBlock, style: blockquoteStyle } : !1;
48
+ return caretAtTheEndOfQuote && looksLikeMarkdownQuote && blockquoteStyle !== void 0 ? {
49
+ focusTextBlock,
50
+ style: blockquoteStyle
51
+ } : !1;
46
52
  },
47
- actions: [
48
- () => [
49
- behaviors.execute({
50
- type: "insert.text",
51
- text: " "
52
- })
53
- ],
54
- (_, { focusTextBlock, style }) => [
55
- behaviors.execute({
56
- type: "block.unset",
57
- props: ["listItem", "level"],
58
- at: focusTextBlock.path
59
- }),
60
- behaviors.execute({
61
- type: "block.set",
62
- props: { style },
63
- at: focusTextBlock.path
64
- }),
65
- behaviors.execute({
66
- type: "delete.text",
67
- at: {
68
- anchor: {
69
- path: focusTextBlock.path,
70
- offset: 0
71
- },
72
- focus: {
73
- path: focusTextBlock.path,
74
- offset: 2
75
- }
76
- }
77
- })
78
- ]
79
- ]
53
+ actions: [() => [behaviors.execute({
54
+ type: "insert.text",
55
+ text: " "
56
+ })], (_, {
57
+ focusTextBlock,
58
+ style
59
+ }) => [behaviors.execute({
60
+ type: "block.unset",
61
+ props: ["listItem", "level"],
62
+ at: focusTextBlock.path
63
+ }), behaviors.execute({
64
+ type: "block.set",
65
+ props: {
66
+ style
67
+ },
68
+ at: focusTextBlock.path
69
+ }), behaviors.execute({
70
+ type: "delete.text",
71
+ at: {
72
+ anchor: {
73
+ path: focusTextBlock.path,
74
+ offset: 0
75
+ },
76
+ focus: {
77
+ path: focusTextBlock.path,
78
+ offset: 2
79
+ }
80
+ }
81
+ })]]
80
82
  }), automaticHr = behaviors.defineBehavior({
81
83
  on: "insert.text",
82
- guard: ({ snapshot, event }) => {
84
+ guard: ({
85
+ snapshot,
86
+ event
87
+ }) => {
83
88
  const hrCharacter = event.text === "-" ? "-" : event.text === "*" ? "*" : event.text === "_" ? "_" : void 0;
84
89
  if (hrCharacter === void 0)
85
90
  return !1;
@@ -98,81 +103,91 @@ function createMarkdownBehaviors(config) {
98
103
  offset: 3
99
104
  }
100
105
  };
101
- return !previousInlineObject && textBefore === `${hrCharacter}${hrCharacter}` ? { hrObject, focusBlock, hrCharacter, hrBlockOffsets } : !1;
106
+ return !previousInlineObject && textBefore === `${hrCharacter}${hrCharacter}` ? {
107
+ hrObject,
108
+ focusBlock,
109
+ hrCharacter,
110
+ hrBlockOffsets
111
+ } : !1;
102
112
  },
103
- actions: [
104
- (_, { hrCharacter }) => [
105
- behaviors.execute({
106
- type: "insert.text",
107
- text: hrCharacter
108
- })
109
- ],
110
- (_, { hrObject, hrBlockOffsets }) => [
111
- behaviors.execute({
112
- type: "insert.block",
113
- block: {
114
- _type: hrObject.name,
115
- ...hrObject.value ?? {}
116
- },
117
- placement: "before",
118
- select: "none"
119
- }),
120
- behaviors.execute({
121
- type: "delete.text",
122
- at: hrBlockOffsets
123
- })
124
- ]
125
- ]
113
+ actions: [(_, {
114
+ hrCharacter
115
+ }) => [behaviors.execute({
116
+ type: "insert.text",
117
+ text: hrCharacter
118
+ })], (_, {
119
+ hrObject,
120
+ hrBlockOffsets
121
+ }) => [behaviors.execute({
122
+ type: "insert.block",
123
+ block: {
124
+ _type: hrObject.name,
125
+ ...hrObject.value ?? {}
126
+ },
127
+ placement: "before",
128
+ select: "none"
129
+ }), behaviors.execute({
130
+ type: "delete.text",
131
+ at: hrBlockOffsets
132
+ })]]
126
133
  }), automaticHrOnPaste = behaviors.defineBehavior({
127
134
  on: "clipboard.paste",
128
- guard: ({ snapshot, event }) => {
135
+ guard: ({
136
+ snapshot,
137
+ event
138
+ }) => {
129
139
  const text = event.originEvent.dataTransfer.getData("text/plain"), hrRegExp = /^(---)$|(___)$|(\*\*\*)$/, hrCharacters = text.match(hrRegExp)?.[0], hrObject = config.horizontalRuleObject?.({
130
140
  schema: snapshot.context.schema
131
141
  }), focusBlock = selectors__namespace.getFocusBlock(snapshot), focusTextBlock = selectors__namespace.getFocusTextBlock(snapshot);
132
- return !hrCharacters || !hrObject || !focusBlock ? !1 : { hrCharacters, hrObject, focusBlock, focusTextBlock };
142
+ return !hrCharacters || !hrObject || !focusBlock ? !1 : {
143
+ hrCharacters,
144
+ hrObject,
145
+ focusBlock,
146
+ focusTextBlock
147
+ };
133
148
  },
134
- actions: [
135
- (_, { hrCharacters }) => [
136
- behaviors.execute({
137
- type: "insert.text",
138
- text: hrCharacters
139
- })
140
- ],
141
- ({ snapshot }, { hrObject, focusBlock, focusTextBlock }) => focusTextBlock ? [
142
- behaviors.execute({
143
- type: "insert.block",
144
- block: {
145
- _type: snapshot.context.schema.block.name,
146
- children: focusTextBlock.node.children
147
- },
148
- placement: "after"
149
- }),
150
- behaviors.execute({
151
- type: "insert.block",
152
- block: {
153
- _type: hrObject.name,
154
- ...hrObject.value ?? {}
155
- },
156
- placement: "after"
157
- }),
158
- behaviors.execute({
159
- type: "delete.block",
160
- at: focusBlock.path
161
- })
162
- ] : [
163
- behaviors.execute({
164
- type: "insert.block",
165
- block: {
166
- _type: hrObject.name,
167
- ...hrObject.value ?? {}
168
- },
169
- placement: "after"
170
- })
171
- ]
172
- ]
149
+ actions: [(_, {
150
+ hrCharacters
151
+ }) => [behaviors.execute({
152
+ type: "insert.text",
153
+ text: hrCharacters
154
+ })], ({
155
+ snapshot
156
+ }, {
157
+ hrObject,
158
+ focusBlock,
159
+ focusTextBlock
160
+ }) => focusTextBlock ? [behaviors.execute({
161
+ type: "insert.block",
162
+ block: {
163
+ _type: snapshot.context.schema.block.name,
164
+ children: focusTextBlock.node.children
165
+ },
166
+ placement: "after"
167
+ }), behaviors.execute({
168
+ type: "insert.block",
169
+ block: {
170
+ _type: hrObject.name,
171
+ ...hrObject.value ?? {}
172
+ },
173
+ placement: "after"
174
+ }), behaviors.execute({
175
+ type: "delete.block",
176
+ at: focusBlock.path
177
+ })] : [behaviors.execute({
178
+ type: "insert.block",
179
+ block: {
180
+ _type: hrObject.name,
181
+ ...hrObject.value ?? {}
182
+ },
183
+ placement: "after"
184
+ })]]
173
185
  }), automaticHeadingOnSpace = behaviors.defineBehavior({
174
186
  on: "insert.text",
175
- guard: ({ snapshot, event }) => {
187
+ guard: ({
188
+ snapshot,
189
+ event
190
+ }) => {
176
191
  if (event.text !== " ")
177
192
  return !1;
178
193
  const selectionCollapsed = selectors__namespace.isSelectionCollapsed(snapshot), focusTextBlock = selectors__namespace.getFocusTextBlock(snapshot), focusSpan = selectors__namespace.getFocusSpan(snapshot);
@@ -181,11 +196,11 @@ function createMarkdownBehaviors(config) {
181
196
  const blockOffset = utils__namespace.spanSelectionPointToBlockOffset({
182
197
  context: snapshot.context,
183
198
  selectionPoint: {
184
- path: [
185
- { _key: focusTextBlock.node._key },
186
- "children",
187
- { _key: focusSpan.node._key }
188
- ],
199
+ path: [{
200
+ _key: focusTextBlock.node._key
201
+ }, "children", {
202
+ _key: focusSpan.node._key
203
+ }],
189
204
  offset: snapshot.context.selection?.focus.offset ?? 0
190
205
  }
191
206
  });
@@ -194,64 +209,77 @@ function createMarkdownBehaviors(config) {
194
209
  const previousInlineObject = selectors__namespace.getPreviousInlineObject(snapshot), blockText = utils__namespace.getTextBlockText(focusTextBlock.node), markdownHeadingSearch = /^#+/.exec(blockText), level = markdownHeadingSearch ? markdownHeadingSearch[0].length : void 0, caretAtTheEndOfHeading = blockOffset.offset === level;
195
210
  if (previousInlineObject || !caretAtTheEndOfHeading)
196
211
  return !1;
197
- const style = level !== void 0 ? config.headingStyle?.({ schema: snapshot.context.schema, level }) : void 0;
212
+ const style = level !== void 0 ? config.headingStyle?.({
213
+ schema: snapshot.context.schema,
214
+ level
215
+ }) : void 0;
198
216
  return level !== void 0 && style !== void 0 ? {
199
217
  focusTextBlock,
200
218
  style,
201
219
  level
202
220
  } : !1;
203
221
  },
204
- actions: [
205
- ({ event }) => [behaviors.execute(event)],
206
- (_, { focusTextBlock, style, level }) => [
207
- behaviors.execute({
208
- type: "block.unset",
209
- props: ["listItem", "level"],
210
- at: focusTextBlock.path
211
- }),
212
- behaviors.execute({
213
- type: "block.set",
214
- props: { style },
215
- at: focusTextBlock.path
216
- }),
217
- behaviors.execute({
218
- type: "delete.text",
219
- at: {
220
- anchor: {
221
- path: focusTextBlock.path,
222
- offset: 0
223
- },
224
- focus: {
225
- path: focusTextBlock.path,
226
- offset: level + 1
227
- }
228
- }
229
- })
230
- ]
231
- ]
222
+ actions: [({
223
+ event
224
+ }) => [behaviors.execute(event)], (_, {
225
+ focusTextBlock,
226
+ style,
227
+ level
228
+ }) => [behaviors.execute({
229
+ type: "block.unset",
230
+ props: ["listItem", "level"],
231
+ at: focusTextBlock.path
232
+ }), behaviors.execute({
233
+ type: "block.set",
234
+ props: {
235
+ style
236
+ },
237
+ at: focusTextBlock.path
238
+ }), behaviors.execute({
239
+ type: "delete.text",
240
+ at: {
241
+ anchor: {
242
+ path: focusTextBlock.path,
243
+ offset: 0
244
+ },
245
+ focus: {
246
+ path: focusTextBlock.path,
247
+ offset: level + 1
248
+ }
249
+ }
250
+ })]]
232
251
  }), clearStyleOnBackspace = behaviors.defineBehavior({
233
252
  on: "delete.backward",
234
- guard: ({ snapshot }) => {
253
+ guard: ({
254
+ snapshot
255
+ }) => {
235
256
  const selectionCollapsed = selectors__namespace.isSelectionCollapsed(snapshot), focusTextBlock = selectors__namespace.getFocusTextBlock(snapshot), focusSpan = selectors__namespace.getFocusSpan(snapshot);
236
257
  if (!selectionCollapsed || !focusTextBlock || !focusSpan)
237
258
  return !1;
238
259
  const atTheBeginningOfBLock = focusTextBlock.node.children[0]._key === focusSpan.node._key && snapshot.context.selection?.focus.offset === 0, defaultStyle = config.defaultStyle?.({
239
260
  schema: snapshot.context.schema
240
261
  });
241
- return atTheBeginningOfBLock && defaultStyle && focusTextBlock.node.style !== defaultStyle ? { defaultStyle, focusTextBlock } : !1;
262
+ return atTheBeginningOfBLock && defaultStyle && focusTextBlock.node.style !== defaultStyle ? {
263
+ defaultStyle,
264
+ focusTextBlock
265
+ } : !1;
242
266
  },
243
- actions: [
244
- (_, { defaultStyle, focusTextBlock }) => [
245
- behaviors.execute({
246
- type: "block.set",
247
- props: { style: defaultStyle },
248
- at: focusTextBlock.path
249
- })
250
- ]
251
- ]
267
+ actions: [(_, {
268
+ defaultStyle,
269
+ focusTextBlock
270
+ }) => [behaviors.execute({
271
+ type: "block.set",
272
+ props: {
273
+ style: defaultStyle
274
+ },
275
+ at: focusTextBlock.path
276
+ })]]
252
277
  }), automaticListOnSpace = behaviors.defineBehavior({
253
278
  on: "insert.text",
254
- guard: ({ snapshot, event }) => {
279
+ guard: ({
280
+ snapshot,
281
+ event
282
+ }) => {
255
283
  if (event.text !== " ")
256
284
  return !1;
257
285
  const selectionCollapsed = selectors__namespace.isSelectionCollapsed(snapshot), focusTextBlock = selectors__namespace.getFocusTextBlock(snapshot), focusSpan = selectors__namespace.getFocusSpan(snapshot);
@@ -260,11 +288,11 @@ function createMarkdownBehaviors(config) {
260
288
  const previousInlineObject = selectors__namespace.getPreviousInlineObject(snapshot), blockOffset = utils__namespace.spanSelectionPointToBlockOffset({
261
289
  context: snapshot.context,
262
290
  selectionPoint: {
263
- path: [
264
- { _key: focusTextBlock.node._key },
265
- "children",
266
- { _key: focusSpan.node._key }
267
- ],
291
+ path: [{
292
+ _key: focusTextBlock.node._key
293
+ }, "children", {
294
+ _key: focusSpan.node._key
295
+ }],
268
296
  offset: snapshot.context.selection?.focus.offset ?? 0
269
297
  }
270
298
  });
@@ -292,101 +320,88 @@ function createMarkdownBehaviors(config) {
292
320
  style: defaultStyle
293
321
  } : !1;
294
322
  },
295
- actions: [
296
- ({ event }) => [behaviors.execute(event)],
297
- (_, { focusTextBlock, style, listItem, listItemLength }) => [
298
- behaviors.execute({
299
- type: "block.set",
300
- props: {
301
- listItem,
302
- level: 1,
303
- style
304
- },
305
- at: focusTextBlock.path
306
- }),
307
- behaviors.execute({
308
- type: "delete.text",
309
- at: {
310
- anchor: {
311
- path: focusTextBlock.path,
312
- offset: 0
313
- },
314
- focus: {
315
- path: focusTextBlock.path,
316
- offset: listItemLength + 1
317
- }
318
- }
319
- })
320
- ]
321
- ]
323
+ actions: [({
324
+ event
325
+ }) => [behaviors.execute(event)], (_, {
326
+ focusTextBlock,
327
+ style,
328
+ listItem,
329
+ listItemLength
330
+ }) => [behaviors.execute({
331
+ type: "block.set",
332
+ props: {
333
+ listItem,
334
+ level: 1,
335
+ style
336
+ },
337
+ at: focusTextBlock.path
338
+ }), behaviors.execute({
339
+ type: "delete.text",
340
+ at: {
341
+ anchor: {
342
+ path: focusTextBlock.path,
343
+ offset: 0
344
+ },
345
+ focus: {
346
+ path: focusTextBlock.path,
347
+ offset: listItemLength + 1
348
+ }
349
+ }
350
+ })]]
322
351
  });
323
- return [
324
- automaticBlockquoteOnSpace,
325
- automaticHeadingOnSpace,
326
- automaticHr,
327
- automaticHrOnPaste,
328
- clearStyleOnBackspace,
329
- automaticListOnSpace
330
- ];
352
+ return [automaticBlockquoteOnSpace, automaticHeadingOnSpace, automaticHr, automaticHrOnPaste, clearStyleOnBackspace, automaticListOnSpace];
331
353
  }
332
354
  function MarkdownShortcutsPlugin(props) {
333
- const editor$1 = editor.useEditor();
334
- return react.useEffect(() => {
335
- const unregisterBehaviors = createMarkdownBehaviors(props).map(
336
- (behavior) => editor$1.registerBehavior({ behavior })
337
- );
355
+ const $ = compilerRuntime.c(17), editor$1 = editor.useEditor();
356
+ let t0, t1;
357
+ $[0] !== editor$1 || $[1] !== props ? (t0 = () => {
358
+ const unregisterBehaviors = createMarkdownBehaviors(props).map((behavior) => editor$1.registerBehavior({
359
+ behavior
360
+ }));
338
361
  return () => {
339
362
  for (const unregisterBehavior of unregisterBehaviors)
340
363
  unregisterBehavior();
341
364
  };
342
- }, [editor$1, props]), /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
343
- props.boldDecorator ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
344
- /* @__PURE__ */ jsxRuntime.jsx(
345
- pluginCharacterPairDecorator.CharacterPairDecoratorPlugin,
346
- {
347
- decorator: props.boldDecorator,
348
- pair: { char: "*", amount: 2 }
349
- }
350
- ),
351
- /* @__PURE__ */ jsxRuntime.jsx(
352
- pluginCharacterPairDecorator.CharacterPairDecoratorPlugin,
353
- {
354
- decorator: props.boldDecorator,
355
- pair: { char: "_", amount: 2 }
356
- }
357
- )
358
- ] }) : null,
359
- props.codeDecorator ? /* @__PURE__ */ jsxRuntime.jsx(
360
- pluginCharacterPairDecorator.CharacterPairDecoratorPlugin,
361
- {
362
- decorator: props.codeDecorator,
363
- pair: { char: "`", amount: 1 }
364
- }
365
- ) : null,
366
- props.italicDecorator ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
367
- /* @__PURE__ */ jsxRuntime.jsx(
368
- pluginCharacterPairDecorator.CharacterPairDecoratorPlugin,
369
- {
370
- decorator: props.italicDecorator,
371
- pair: { char: "*", amount: 1 }
372
- }
373
- ),
374
- /* @__PURE__ */ jsxRuntime.jsx(
375
- pluginCharacterPairDecorator.CharacterPairDecoratorPlugin,
376
- {
377
- decorator: props.italicDecorator,
378
- pair: { char: "_", amount: 1 }
379
- }
380
- )
381
- ] }) : null,
382
- props.strikeThroughDecorator ? /* @__PURE__ */ jsxRuntime.jsx(
383
- pluginCharacterPairDecorator.CharacterPairDecoratorPlugin,
384
- {
385
- decorator: props.strikeThroughDecorator,
386
- pair: { char: "~", amount: 2 }
387
- }
388
- ) : null
389
- ] });
365
+ }, t1 = [editor$1, props], $[0] = editor$1, $[1] = props, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), react.useEffect(t0, t1);
366
+ let t2;
367
+ $[4] !== props.boldDecorator ? (t2 = props.boldDecorator ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
368
+ /* @__PURE__ */ jsxRuntime.jsx(pluginCharacterPairDecorator.CharacterPairDecoratorPlugin, { decorator: props.boldDecorator, pair: {
369
+ char: "*",
370
+ amount: 2
371
+ } }),
372
+ /* @__PURE__ */ jsxRuntime.jsx(pluginCharacterPairDecorator.CharacterPairDecoratorPlugin, { decorator: props.boldDecorator, pair: {
373
+ char: "_",
374
+ amount: 2
375
+ } })
376
+ ] }) : null, $[4] = props.boldDecorator, $[5] = t2) : t2 = $[5];
377
+ let t3;
378
+ $[6] !== props.codeDecorator ? (t3 = props.codeDecorator ? /* @__PURE__ */ jsxRuntime.jsx(pluginCharacterPairDecorator.CharacterPairDecoratorPlugin, { decorator: props.codeDecorator, pair: {
379
+ char: "`",
380
+ amount: 1
381
+ } }) : null, $[6] = props.codeDecorator, $[7] = t3) : t3 = $[7];
382
+ let t4;
383
+ $[8] !== props.italicDecorator ? (t4 = props.italicDecorator ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
384
+ /* @__PURE__ */ jsxRuntime.jsx(pluginCharacterPairDecorator.CharacterPairDecoratorPlugin, { decorator: props.italicDecorator, pair: {
385
+ char: "*",
386
+ amount: 1
387
+ } }),
388
+ /* @__PURE__ */ jsxRuntime.jsx(pluginCharacterPairDecorator.CharacterPairDecoratorPlugin, { decorator: props.italicDecorator, pair: {
389
+ char: "_",
390
+ amount: 1
391
+ } })
392
+ ] }) : null, $[8] = props.italicDecorator, $[9] = t4) : t4 = $[9];
393
+ let t5;
394
+ $[10] !== props.strikeThroughDecorator ? (t5 = props.strikeThroughDecorator ? /* @__PURE__ */ jsxRuntime.jsx(pluginCharacterPairDecorator.CharacterPairDecoratorPlugin, { decorator: props.strikeThroughDecorator, pair: {
395
+ char: "~",
396
+ amount: 2
397
+ } }) : null, $[10] = props.strikeThroughDecorator, $[11] = t5) : t5 = $[11];
398
+ let t6;
399
+ return $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
400
+ t2,
401
+ t3,
402
+ t4,
403
+ t5
404
+ ] }), $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
390
405
  }
391
406
  exports.MarkdownShortcutsPlugin = MarkdownShortcutsPlugin;
392
407
  //# sourceMappingURL=index.cjs.map