@meowdown/react 0.82.2 → 0.82.3

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 (2) hide show
  1. package/dist/index.js +38 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -230,7 +230,7 @@ function _temp$4(event) {
230
230
  * mode emits a block-level `math[display="block"]` element.
231
231
  */
232
232
  function MathRender(props) {
233
- const $ = c(9);
233
+ const $ = c(10);
234
234
  const { katex, formula, displayMode, className, onMouseDown } = props;
235
235
  const ref = useRef(null);
236
236
  let t0;
@@ -257,21 +257,24 @@ function MathRender(props) {
257
257
  }
258
258
  useLayoutEffect(t0, t1);
259
259
  const t2 = props["data-testid"];
260
- let t3;
261
- if ($[5] !== className || $[6] !== onMouseDown || $[7] !== t2) {
262
- t3 = /* @__PURE__ */ jsx("span", {
260
+ const t3 = props["data-scroll-x"];
261
+ let t4;
262
+ if ($[5] !== className || $[6] !== onMouseDown || $[7] !== t2 || $[8] !== t3) {
263
+ t4 = /* @__PURE__ */ jsx("span", {
263
264
  ref,
264
265
  className,
265
266
  contentEditable: false,
266
267
  "data-testid": t2,
268
+ "data-scroll-x": t3,
267
269
  onMouseDown
268
270
  });
269
271
  $[5] = className;
270
272
  $[6] = onMouseDown;
271
273
  $[7] = t2;
272
274
  $[8] = t3;
273
- } else t3 = $[8];
274
- return t3;
275
+ $[9] = t4;
276
+ } else t4 = $[9];
277
+ return t4;
275
278
  }
276
279
 
277
280
  // src/components/mermaid-render.tsx
@@ -298,7 +301,7 @@ function renderMermaid(renderer, source) {
298
301
  }
299
302
  }
300
303
  function MermaidRender(props) {
301
- const $ = c(16);
304
+ const $ = c(18);
302
305
  const { renderer, source, className, onMouseDown } = props;
303
306
  let t0;
304
307
  if ($[0] !== renderer || $[1] !== source) {
@@ -328,13 +331,15 @@ function MermaidRender(props) {
328
331
  useLayoutEffect(t1, t2);
329
332
  if (output.error) {
330
333
  const t3 = props["data-testid"];
331
- let t4;
332
- if ($[7] !== className || $[8] !== onMouseDown || $[9] !== output.error || $[10] !== t3) {
333
- t4 = /* @__PURE__ */ jsx("span", {
334
+ const t4 = props["data-scroll-x"];
335
+ let t5;
336
+ if ($[7] !== className || $[8] !== onMouseDown || $[9] !== output.error || $[10] !== t3 || $[11] !== t4) {
337
+ t5 = /* @__PURE__ */ jsx("span", {
334
338
  className,
335
339
  contentEditable: false,
336
340
  "data-error": true,
337
341
  "data-testid": t3,
342
+ "data-scroll-x": t4,
338
343
  onMouseDown,
339
344
  children: output.error
340
345
  }, "error");
@@ -343,25 +348,29 @@ function MermaidRender(props) {
343
348
  $[9] = output.error;
344
349
  $[10] = t3;
345
350
  $[11] = t4;
346
- } else t4 = $[11];
347
- return t4;
351
+ $[12] = t5;
352
+ } else t5 = $[12];
353
+ return t5;
348
354
  }
349
355
  const t3 = props["data-testid"];
350
- let t4;
351
- if ($[12] !== className || $[13] !== onMouseDown || $[14] !== t3) {
352
- t4 = /* @__PURE__ */ jsx("span", {
356
+ const t4 = props["data-scroll-x"];
357
+ let t5;
358
+ if ($[13] !== className || $[14] !== onMouseDown || $[15] !== t3 || $[16] !== t4) {
359
+ t5 = /* @__PURE__ */ jsx("span", {
353
360
  ref,
354
361
  className,
355
362
  contentEditable: false,
356
363
  "data-testid": t3,
364
+ "data-scroll-x": t4,
357
365
  onMouseDown
358
366
  }, "svg");
359
- $[12] = className;
360
- $[13] = onMouseDown;
361
- $[14] = t3;
362
- $[15] = t4;
363
- } else t4 = $[15];
364
- return t4;
367
+ $[13] = className;
368
+ $[14] = onMouseDown;
369
+ $[15] = t3;
370
+ $[16] = t4;
371
+ $[17] = t5;
372
+ } else t5 = $[17];
373
+ return t5;
365
374
  }
366
375
 
367
376
  // src/components/code-block-view.tsx
@@ -425,6 +434,7 @@ function CodeBlockView(props) {
425
434
  t6 = /* @__PURE__ */ jsx("pre", {
426
435
  ref: contentRef,
427
436
  "data-language": language,
437
+ "data-scroll-x": true,
428
438
  ...NON_PROSE_PROPS
429
439
  });
430
440
  $[11] = contentRef;
@@ -452,6 +462,7 @@ function CodeBlockView(props) {
452
462
  displayMode: true,
453
463
  className: code_block_view_module_default.Preview,
454
464
  "data-testid": "code-block-math-preview",
465
+ "data-scroll-x": true,
455
466
  onMouseDown: focusSource
456
467
  });
457
468
  $[19] = focusSource;
@@ -467,6 +478,7 @@ function CodeBlockView(props) {
467
478
  source: previewCode,
468
479
  className: `${code_block_view_module_default.Preview} ${code_block_view_module_default.MermaidPreview}`,
469
480
  "data-testid": "code-block-mermaid-preview",
481
+ "data-scroll-x": true,
470
482
  onMouseDown: focusSource
471
483
  });
472
484
  $[24] = focusSource;
@@ -5211,6 +5223,7 @@ function CodeBlock(t0) {
5211
5223
  t5 = /* @__PURE__ */ jsx("pre", {
5212
5224
  "data-code-block": "",
5213
5225
  "data-language": t2,
5226
+ "data-scroll-x": true,
5214
5227
  children: t4
5215
5228
  });
5216
5229
  $[8] = t2;
@@ -5297,7 +5310,8 @@ function MathCodeBlock(t0) {
5297
5310
  formula: code,
5298
5311
  displayMode: true,
5299
5312
  className: code_block_view_module_default.Preview,
5300
- "data-testid": "code-block-math-preview"
5313
+ "data-testid": "code-block-math-preview",
5314
+ "data-scroll-x": true
5301
5315
  });
5302
5316
  $[2] = code;
5303
5317
  $[3] = katex;
@@ -5327,7 +5341,8 @@ function MermaidCodeBlock(t0) {
5327
5341
  renderer,
5328
5342
  source: code,
5329
5343
  className: `${code_block_view_module_default.Preview} ${code_block_view_module_default.MermaidPreview}`,
5330
- "data-testid": "code-block-mermaid-preview"
5344
+ "data-testid": "code-block-mermaid-preview",
5345
+ "data-scroll-x": true
5331
5346
  });
5332
5347
  $[2] = code;
5333
5348
  $[3] = renderer;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/react",
3
3
  "type": "module",
4
- "version": "0.82.2",
4
+ "version": "0.82.3",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",