@gravity-ui/markdown-editor 13.9.0 → 13.10.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.
@@ -1,8 +1,11 @@
1
+ import { BaseTarget, StylesObject } from '@diplodoc/html-extension/plugin';
1
2
  import type { ExtensionNodeSpec } from '../../../../core';
2
3
  export { yfmHtmlBlockNodeName } from './const';
3
4
  export declare type YfmHtmlBlockSpecsOptions = {
4
5
  nodeView?: ExtensionNodeSpec['view'];
5
6
  sanitize?: (dirtyHtml: string) => string;
7
+ styles?: string | StylesObject;
8
+ baseTarget?: BaseTarget;
6
9
  };
7
10
  export declare const YfmHtmlBlockSpecs: import("../../../../core").ExtensionWithOptions<YfmHtmlBlockSpecsOptions> & {
8
11
  readonly NodeName: "yfm_html_block";
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.YfmHtmlBlockSpecs = exports.yfmHtmlBlockNodeName = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  // eslint-disable-next-line import/no-extraneous-dependencies
5
6
  const html_extension_1 = require("@diplodoc/html-extension");
6
7
  const const_1 = require("./const");
7
8
  var const_2 = require("./const");
8
9
  Object.defineProperty(exports, "yfmHtmlBlockNodeName", { enumerable: true, get: function () { return const_2.yfmHtmlBlockNodeName; } });
9
- const YfmHtmlBlockSpecsExtension = (builder, { nodeView, sanitize }) => {
10
+ const YfmHtmlBlockSpecsExtension = (builder, _a) => {
11
+ var { nodeView } = _a, options = tslib_1.__rest(_a, ["nodeView"]);
10
12
  builder
11
- .configureMd((md) => md.use((0, html_extension_1.transform)({ bundle: false, sanitize }), {}))
13
+ .configureMd((md) => md.use((0, html_extension_1.transform)(Object.assign({ bundle: false }, options)), {}))
12
14
  .addNode(const_1.YfmHtmlBlockConsts.NodeName, () => ({
13
15
  fromMd: {
14
16
  tokenSpec: {
@@ -1,9 +1,12 @@
1
+ import { BaseTarget, StylesObject } from '@diplodoc/html-extension/plugin';
1
2
  import type { IHTMLIFrameElementConfig } from '@diplodoc/html-extension/runtime';
2
3
  import { Action, ExtensionAuto } from '../../../core';
3
4
  import { YfmHtmlBlockAction } from './YfmHtmlBlockSpecs/const';
4
5
  export declare type YfmHtmlBlockOptions = {
5
6
  useConfig?: () => IHTMLIFrameElementConfig | undefined;
6
7
  sanitize?: (dirtyHtml: string) => string;
8
+ styles?: string | StylesObject;
9
+ baseTarget?: BaseTarget;
7
10
  };
8
11
  export declare const YfmHtmlBlock: ExtensionAuto<YfmHtmlBlockOptions>;
9
12
  declare global {
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.YfmHtmlBlock = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const YfmHtmlBlockNodeView_1 = require("./YfmHtmlBlockNodeView");
5
6
  const YfmHtmlBlockSpecs_1 = require("./YfmHtmlBlockSpecs");
6
7
  const const_1 = require("./YfmHtmlBlockSpecs/const");
7
8
  const actions_1 = require("./actions");
8
- const YfmHtmlBlock = (builder, options) => {
9
- builder.use(YfmHtmlBlockSpecs_1.YfmHtmlBlockSpecs, {
10
- nodeView: YfmHtmlBlockNodeViewFactory(options),
11
- sanitize: options.sanitize,
12
- });
9
+ const YfmHtmlBlock = (builder, _a) => {
10
+ var { useConfig: _ } = _a, options = tslib_1.__rest(_a, ["useConfig"]);
11
+ builder.use(YfmHtmlBlockSpecs_1.YfmHtmlBlockSpecs, Object.assign({ nodeView: YfmHtmlBlockNodeViewFactory(options) }, options));
13
12
  builder.addAction(const_1.YfmHtmlBlockAction, () => actions_1.addYfmHtmlBlock);
14
13
  };
15
14
  exports.YfmHtmlBlock = YfmHtmlBlock;
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  /** During build process, the current version will be injected here */
5
- exports.VERSION = typeof '13.9.0' !== 'undefined' ? '13.9.0' : 'unknown';
5
+ exports.VERSION = typeof '13.10.0' !== 'undefined' ? '13.10.0' : 'unknown';
@@ -1,8 +1,11 @@
1
+ import { BaseTarget, StylesObject } from '@diplodoc/html-extension/plugin';
1
2
  import type { ExtensionNodeSpec } from '../../../../core';
2
3
  export { yfmHtmlBlockNodeName } from './const';
3
4
  export declare type YfmHtmlBlockSpecsOptions = {
4
5
  nodeView?: ExtensionNodeSpec['view'];
5
6
  sanitize?: (dirtyHtml: string) => string;
7
+ styles?: string | StylesObject;
8
+ baseTarget?: BaseTarget;
6
9
  };
7
10
  export declare const YfmHtmlBlockSpecs: import("../../../../core").ExtensionWithOptions<YfmHtmlBlockSpecsOptions> & {
8
11
  readonly NodeName: "yfm_html_block";
@@ -1,10 +1,12 @@
1
+ import { __rest } from "tslib";
1
2
  // eslint-disable-next-line import/no-extraneous-dependencies
2
3
  import { transform } from '@diplodoc/html-extension';
3
4
  import { YfmHtmlBlockConsts } from './const';
4
5
  export { yfmHtmlBlockNodeName } from './const';
5
- const YfmHtmlBlockSpecsExtension = (builder, { nodeView, sanitize }) => {
6
+ const YfmHtmlBlockSpecsExtension = (builder, _a) => {
7
+ var { nodeView } = _a, options = __rest(_a, ["nodeView"]);
6
8
  builder
7
- .configureMd((md) => md.use(transform({ bundle: false, sanitize }), {}))
9
+ .configureMd((md) => md.use(transform(Object.assign({ bundle: false }, options)), {}))
8
10
  .addNode(YfmHtmlBlockConsts.NodeName, () => ({
9
11
  fromMd: {
10
12
  tokenSpec: {
@@ -1,9 +1,12 @@
1
+ import { BaseTarget, StylesObject } from '@diplodoc/html-extension/plugin';
1
2
  import type { IHTMLIFrameElementConfig } from '@diplodoc/html-extension/runtime';
2
3
  import { Action, ExtensionAuto } from '../../../core';
3
4
  import { YfmHtmlBlockAction } from './YfmHtmlBlockSpecs/const';
4
5
  export declare type YfmHtmlBlockOptions = {
5
6
  useConfig?: () => IHTMLIFrameElementConfig | undefined;
6
7
  sanitize?: (dirtyHtml: string) => string;
8
+ styles?: string | StylesObject;
9
+ baseTarget?: BaseTarget;
7
10
  };
8
11
  export declare const YfmHtmlBlock: ExtensionAuto<YfmHtmlBlockOptions>;
9
12
  declare global {
@@ -1,12 +1,11 @@
1
+ import { __rest } from "tslib";
1
2
  import { WYfmHtmlBlockNodeView } from './YfmHtmlBlockNodeView';
2
3
  import { YfmHtmlBlockSpecs } from './YfmHtmlBlockSpecs';
3
4
  import { YfmHtmlBlockAction } from './YfmHtmlBlockSpecs/const';
4
5
  import { addYfmHtmlBlock } from './actions';
5
- export const YfmHtmlBlock = (builder, options) => {
6
- builder.use(YfmHtmlBlockSpecs, {
7
- nodeView: YfmHtmlBlockNodeViewFactory(options),
8
- sanitize: options.sanitize,
9
- });
6
+ export const YfmHtmlBlock = (builder, _a) => {
7
+ var { useConfig: _ } = _a, options = __rest(_a, ["useConfig"]);
8
+ builder.use(YfmHtmlBlockSpecs, Object.assign({ nodeView: YfmHtmlBlockNodeViewFactory(options) }, options));
10
9
  builder.addAction(YfmHtmlBlockAction, () => addYfmHtmlBlock);
11
10
  };
12
11
  const YfmHtmlBlockNodeViewFactory = (options) => () => (node, view, getPos) => {
@@ -1,2 +1,2 @@
1
1
  /** During build process, the current version will be injected here */
2
- export const VERSION = typeof '13.9.0' !== 'undefined' ? '13.9.0' : 'unknown';
2
+ export const VERSION = typeof '13.10.0' !== 'undefined' ? '13.10.0' : 'unknown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/markdown-editor",
3
- "version": "13.9.0",
3
+ "version": "13.10.0",
4
4
  "description": "Markdown wysiwyg and markup editor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -200,7 +200,7 @@
200
200
  },
201
201
  "devDependencies": {
202
202
  "@diplodoc/folding-headings-extension": "0.1.0",
203
- "@diplodoc/html-extension": "1.2.7",
203
+ "@diplodoc/html-extension": "1.3.1",
204
204
  "@diplodoc/latex-extension": "1.0.3",
205
205
  "@diplodoc/mermaid-extension": "1.2.1",
206
206
  "@diplodoc/transform": "4.22.0",