@meowdown/core 0.65.5 → 0.65.6

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 +23 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2572,6 +2572,15 @@ function defineMeowdownHorizontalRule() {
2572
2572
  return union(defineHorizontalRule(), defineHorizontalRuleMarkerAttr());
2573
2573
  }
2574
2574
 
2575
+ //#endregion
2576
+ //#region src/utils/non-prose-attrs.ts
2577
+ const NON_PROSE_ATTRS = {
2578
+ spellcheck: "false",
2579
+ autocorrect: "off",
2580
+ autocapitalize: "off",
2581
+ writingsuggestions: "false"
2582
+ };
2583
+
2575
2584
  //#endregion
2576
2585
  //#region src/extensions/html-comment.ts
2577
2586
  /**
@@ -2602,7 +2611,8 @@ function defineHTMLComment() {
2602
2611
  attrs: { content: { default: "" } },
2603
2612
  toDOM: (node) => ["div", {
2604
2613
  "data-html-comment": node.attrs.content,
2605
- style: "display: none"
2614
+ style: "display: none",
2615
+ ...NON_PROSE_ATTRS
2606
2616
  }],
2607
2617
  parseDOM: [{
2608
2618
  tag: "div[data-html-comment]",
@@ -3928,7 +3938,11 @@ function defineMdStrong() {
3928
3938
  function defineMdCode() {
3929
3939
  return defineMarkSpec({
3930
3940
  name: "mdCode",
3931
- toDOM: () => ["code", 0],
3941
+ toDOM: () => [
3942
+ "code",
3943
+ { ...NON_PROSE_ATTRS },
3944
+ 0
3945
+ ],
3932
3946
  parseDOM: [{ tag: "code" }]
3933
3947
  });
3934
3948
  }
@@ -3959,7 +3973,10 @@ function defineMdLinkUri() {
3959
3973
  inclusive: false,
3960
3974
  toDOM: () => [
3961
3975
  "span",
3962
- { class: "md-link-uri" },
3976
+ {
3977
+ class: "md-link-uri",
3978
+ ...NON_PROSE_ATTRS
3979
+ },
3963
3980
  0
3964
3981
  ],
3965
3982
  parseDOM: [{ tag: "span.md-link-uri" }]
@@ -5097,6 +5114,7 @@ var MathMarkView = class {
5097
5114
  });
5098
5115
  this.#contentDOM = document.createElement("span");
5099
5116
  this.#contentDOM.className = "md-math-view-content";
5117
+ for (const [name, value] of Object.entries(NON_PROSE_ATTRS)) this.#contentDOM.setAttribute(name, value);
5100
5118
  this.#dom.appendChild(this.#preview);
5101
5119
  this.#dom.appendChild(this.#contentDOM);
5102
5120
  this.#render();
@@ -7706,6 +7724,8 @@ var ImageMarkView = class {
7706
7724
  this.#dom.className = "md-image-view md-atom-view";
7707
7725
  this.#contentDOM = document.createElement("span");
7708
7726
  this.#contentDOM.className = "md-image-view-content md-atom-view-content";
7727
+ this.#contentDOM.dataset.testid = "image-source";
7728
+ for (const [name, value] of Object.entries(NON_PROSE_ATTRS)) this.#contentDOM.setAttribute(name, value);
7709
7729
  const preview = this.#renderPreview();
7710
7730
  if (preview) {
7711
7731
  preview.contentEditable = "false";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/core",
3
3
  "type": "module",
4
- "version": "0.65.5",
4
+ "version": "0.65.6",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "remark-stringify": "^11.0.0",
44
44
  "unicode-by-name": "^0.2.0",
45
45
  "unified": "^11.0.5",
46
- "@meowdown/markdown": "^0.65.5"
46
+ "@meowdown/markdown": "^0.65.6"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@ocavue/tsconfig": "^0.7.1",