elseware-ui 3.0.7 → 3.0.8

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.mjs CHANGED
@@ -58149,9 +58149,14 @@ function createDefaultPlugins({
58149
58149
  defaultCodeBlockLanguage,
58150
58150
  codeMirrorOptions,
58151
58151
  imageOptions,
58152
- linkDialogOptions
58152
+ linkDialogOptions,
58153
+ dark
58153
58154
  }) {
58154
58155
  const codeBlockLanguages = codeMirrorOptions?.codeBlockLanguages ?? DEFAULT_CODE_BLOCK_LANGUAGES;
58156
+ const codeMirrorExtensions = [
58157
+ ...dark ? [oneDark] : [],
58158
+ ...codeMirrorOptions?.codeMirrorExtensions ?? []
58159
+ ];
58155
58160
  return [
58156
58161
  headingsPlugin(),
58157
58162
  listsPlugin(),
@@ -58167,7 +58172,8 @@ function createDefaultPlugins({
58167
58172
  }),
58168
58173
  codeMirrorPlugin({
58169
58174
  ...codeMirrorOptions,
58170
- codeBlockLanguages
58175
+ codeBlockLanguages,
58176
+ ...codeMirrorExtensions.length > 0 ? { codeMirrorExtensions } : {}
58171
58177
  }),
58172
58178
  ...showToolbar ? [
58173
58179
  toolbarPlugin({
@@ -58225,11 +58231,13 @@ var MDXMarkdownEditor = forwardRef(
58225
58231
  defaultCodeBlockLanguage,
58226
58232
  codeMirrorOptions,
58227
58233
  imageOptions,
58228
- linkDialogOptions
58234
+ linkDialogOptions,
58235
+ dark
58229
58236
  }),
58230
58237
  [
58231
58238
  codeMirrorOptions,
58232
58239
  defaultCodeBlockLanguage,
58240
+ dark,
58233
58241
  imageOptions,
58234
58242
  linkDialogOptions,
58235
58243
  showToolbar,
@@ -58288,6 +58296,7 @@ var MDXMarkdownEditor = forwardRef(
58288
58296
  "aria-readonly": readOnly || void 0,
58289
58297
  "aria-required": required || void 0,
58290
58298
  "aria-invalid": invalid || void 0,
58299
+ "data-theme": dark ? "dark" : void 0,
58291
58300
  onBlurCapture: handleBlur,
58292
58301
  className: classNames69(
58293
58302
  "eui-markdown-adapter",
@@ -58307,7 +58316,11 @@ var MDXMarkdownEditor = forwardRef(
58307
58316
  markdown: currentValue ?? "",
58308
58317
  readOnly: disabled || readOnly,
58309
58318
  plugins: plugins ?? defaultPlugins,
58310
- className: classNames69("eui-markdown-mdx-editor", editorClassName),
58319
+ className: classNames69(
58320
+ "eui-markdown-mdx-editor",
58321
+ dark && ["dark", "dark-theme"],
58322
+ editorClassName
58323
+ ),
58311
58324
  contentEditableClassName: classNames69(
58312
58325
  "eui-markdown-mdx-content",
58313
58326
  contentEditableClassName