@meowdown/core 0.81.3 → 0.82.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.d.ts CHANGED
@@ -1110,7 +1110,38 @@ interface EditorConfig extends InlineMarkOptions, FollowLinkHandlers, FilePasteO
1110
1110
  wikilinkEnabled?: boolean | undefined;
1111
1111
  placeholder?: PlaceholderOptions$1['placeholder'] | undefined;
1112
1112
  readOnly?: boolean | undefined;
1113
+ /**
1114
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/spellcheck
1115
+ */
1113
1116
  spellCheck?: boolean | undefined;
1117
+ /**
1118
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/writingsuggestions
1119
+ */
1120
+ writingSuggestions?: boolean | undefined;
1121
+ /**
1122
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect
1123
+ */
1124
+ autoCorrect?: boolean | undefined;
1125
+ /**
1126
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize
1127
+ */
1128
+ autoCapitalize?: 'off' | 'sentences' | 'words' | 'characters' | undefined;
1129
+ /**
1130
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/enterkeyhint
1131
+ */
1132
+ enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
1133
+ /**
1134
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/dir
1135
+ */
1136
+ dir?: 'ltr' | 'rtl' | 'auto' | undefined;
1137
+ /**
1138
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang
1139
+ */
1140
+ lang?: string | undefined;
1141
+ /**
1142
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label
1143
+ */
1144
+ ariaLabel?: string | undefined;
1114
1145
  editorClassName?: string | undefined;
1115
1146
  }
1116
1147
  //#endregion
package/dist/index.js CHANGED
@@ -2113,6 +2113,13 @@ const refreshKeys = /* @__PURE__ */ new Set([
2113
2113
  "placeholder",
2114
2114
  "readOnly",
2115
2115
  "spellCheck",
2116
+ "writingSuggestions",
2117
+ "autoCorrect",
2118
+ "autoCapitalize",
2119
+ "enterKeyHint",
2120
+ "dir",
2121
+ "lang",
2122
+ "ariaLabel",
2116
2123
  "editorClassName"
2117
2124
  ]);
2118
2125
  function updateEditorConfig(editor, patch) {
@@ -7351,10 +7358,17 @@ function defineEditorExtensionImpl(options) {
7351
7358
  },
7352
7359
  strategy: "doc"
7353
7360
  }), defineReadonly((state) => !!getEditorConfig(state).readOnly), defineViewAttributes((state) => {
7354
- const { editorClassName, spellCheck } = getEditorConfig(state);
7361
+ const config = getEditorConfig(state);
7355
7362
  const attributes = { class: "meowdown-content" };
7356
- if (editorClassName) attributes.class += ` ${editorClassName}`;
7357
- if (spellCheck != null) attributes.spellcheck = String(spellCheck);
7363
+ if (config.editorClassName) attributes.class += ` ${config.editorClassName}`;
7364
+ if (config.spellCheck != null) attributes.spellcheck = String(config.spellCheck);
7365
+ if (config.writingSuggestions != null) attributes.writingsuggestions = String(config.writingSuggestions);
7366
+ if (config.autoCorrect != null) attributes.autocorrect = config.autoCorrect ? "on" : "off";
7367
+ if (config.autoCapitalize != null) attributes.autocapitalize = config.autoCapitalize;
7368
+ if (config.enterKeyHint != null) attributes.enterkeyhint = config.enterKeyHint;
7369
+ if (config.dir != null) attributes.dir = config.dir;
7370
+ if (config.lang != null) attributes.lang = config.lang;
7371
+ if (config.ariaLabel != null) attributes["aria-label"] = config.ariaLabel;
7358
7372
  return attributes;
7359
7373
  }), defineCodeBlockSyntaxHighlight(), defineCrossEditorDrag(), defineClickBelow(), defineEscapeCollapse(), defineSoftBreak(), defineMoveBlock(), defineSelectDocBoundary(), defineSingleParagraph(), defineInlineMarkPlugin(getEditorConfig), defineInlineToggle(), defineLinkCommands(), defineWikilink(), defineMath(), defineMarkMode(getMarkMode), defineClipboard(), defineScrollToSelection(), defineHiddenRunCaret(), defineSystemSubstitutionGuard(), defineAtomMarkNavigation({ marks: ATOM_SOURCE_MARK_NAMES.map((name) => ({
7360
7374
  name,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/core",
3
3
  "type": "module",
4
- "version": "0.81.3",
4
+ "version": "0.82.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",