@gravity-ui/markdown-editor 15.4.1 → 15.4.2
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/build/cjs/version.js +1 -1
- package/build/cjs/version.js.map +1 -1
- package/build/cjs/view/hocs/withYfmHtml/index.d.ts +1 -0
- package/build/cjs/view/hocs/withYfmHtml/index.js.map +1 -1
- package/build/cjs/view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.js +2 -1
- package/build/cjs/view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.js.map +1 -1
- package/build/esm/version.js +1 -1
- package/build/esm/version.js.map +1 -1
- package/build/esm/view/hocs/withYfmHtml/index.d.ts +1 -0
- package/build/esm/view/hocs/withYfmHtml/index.js.map +1 -1
- package/build/esm/view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.js +2 -1
- package/build/esm/view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.js.map +1 -1
- package/package.json +1 -1
package/build/cjs/version.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
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 '15.4.
|
|
5
|
+
exports.VERSION = typeof '15.4.2' !== 'undefined' ? '15.4.2' : 'unknown';
|
|
6
6
|
//# sourceMappingURL=version.js.map
|
package/build/cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"../../src","sources":["version.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACzD,QAAA,OAAO,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC","sourcesContent":["/** During build process, the current version will be injected here */\nexport const VERSION = typeof '15.4.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"../../src","sources":["version.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACzD,QAAA,OAAO,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC","sourcesContent":["/** During build process, the current version will be injected here */\nexport const VERSION = typeof '15.4.2' !== 'undefined' ? '15.4.2' : 'unknown';\n"]}
|
|
@@ -8,6 +8,7 @@ export type WithYfmHtmlBlockOptions = {
|
|
|
8
8
|
export type WithYfmHtmlBlockProps = {
|
|
9
9
|
meta: TransformMeta;
|
|
10
10
|
yfmHtmlBlockConfig?: IHTMLIFrameElementConfig;
|
|
11
|
+
/** Works only with html-extension dep version 2.7.1 and higher */
|
|
11
12
|
htmlRuntimeConfig?: HTMLRuntimeConfig;
|
|
12
13
|
};
|
|
13
14
|
export declare function withYfmHtmlBlock(opts: WithYfmHtmlBlockOptions): <T extends {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/index.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/index.tsx"],"names":[],"mappings":";;AAqBA,4CAsBC;;AA3CD,iCAAoF;AAGpF,0DAAoF;AAKpF,wEAAgE;AAahE,SAAgB,gBAAgB,CAAC,IAA6B;IAC1D,OAAO,CACH,SAA2D,EAC7D,EAAE,CACA,IAAA,kBAAU,EAA4C,SAAS,WAAW,CAAC,KAAK,EAAE,GAAG;QACjF,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,GAAG,KAAK,CAAC;QAElE,IAAA,+CAAsB,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAE9D,MAAM,YAAY,GAAG,IAAA,4CAAoC,GAAE,CAAC;QAE5D,IAAA,iBAAS,EAAC,GAAG,EAAE;YACX,IAAI,YAAY,EAAE,CAAC;gBACf,IAAI,kBAAkB,EAAE,CAAC;oBACrB,YAAY,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;gBAC/C,CAAC;gBACD,YAAY,CAAC,UAAU,EAAE,CAAC;YAC9B,CAAC;QACL,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAE7C,OAAO,uBAAC,SAAS,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;IAC9C,CAAC,CAAC,CAAC;AACX,CAAC","sourcesContent":["import {type ComponentType, type RefAttributes, forwardRef, useEffect} from 'react';\n\nimport type {HTMLRuntimeConfig} from '@diplodoc/html-extension';\nimport {useDiplodocEmbeddedContentController} from '@diplodoc/html-extension/react';\nimport type {IHTMLIFrameElementConfig} from '@diplodoc/html-extension/runtime';\n\nimport type {PluginRuntime, TransformMeta} from '../withMermaid/types';\n\nimport {useYfmHtmlBlockRuntime} from './useYfmHtmlBlockRuntime';\n\nexport type WithYfmHtmlBlockOptions = {\n runtime: PluginRuntime;\n};\n\nexport type WithYfmHtmlBlockProps = {\n meta: TransformMeta;\n yfmHtmlBlockConfig?: IHTMLIFrameElementConfig;\n /** Works only with html-extension dep version 2.7.1 and higher */\n htmlRuntimeConfig?: HTMLRuntimeConfig;\n};\n\nexport function withYfmHtmlBlock(opts: WithYfmHtmlBlockOptions) {\n return <T extends {html: string}>(\n Component: ComponentType<T & RefAttributes<HTMLDivElement>>,\n ) =>\n forwardRef<HTMLDivElement, T & WithYfmHtmlBlockProps>(function WithYfmHtml(props, ref) {\n const {meta, html, yfmHtmlBlockConfig, htmlRuntimeConfig} = props;\n\n useYfmHtmlBlockRuntime(meta, opts.runtime, htmlRuntimeConfig);\n\n const yfmHtmlBlock = useDiplodocEmbeddedContentController();\n\n useEffect(() => {\n if (yfmHtmlBlock) {\n if (yfmHtmlBlockConfig) {\n yfmHtmlBlock.setConfig(yfmHtmlBlockConfig);\n }\n yfmHtmlBlock.initialize();\n }\n }, [yfmHtmlBlock, html, yfmHtmlBlockConfig]);\n\n return <Component {...props} ref={ref} />;\n });\n}\n"]}
|
|
@@ -5,7 +5,8 @@ const utils_1 = require("@diplodoc/html-extension/utils");
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
function useYfmHtmlBlockRuntime(meta, runtime = '_assets/html-extension.js', htmlRuntimeConfig = {}) {
|
|
7
7
|
if (meta?.script?.includes(runtime)) {
|
|
8
|
-
|
|
8
|
+
// MAJOR: update html-extension peer on ^2.7.1 and remove optional chain
|
|
9
|
+
(0, utils_1.setupRuntimeConfig)?.(htmlRuntimeConfig);
|
|
9
10
|
import(/* webpackChunkName: "yfm-html-runtime" */ '@diplodoc/html-extension/runtime');
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useYfmHtmlBlockRuntime.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.ts"],"names":[],"mappings":";;AAMA,
|
|
1
|
+
{"version":3,"file":"useYfmHtmlBlockRuntime.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.ts"],"names":[],"mappings":";;AAMA,wDAUC;AAfD,0DAAkE;AAIlE,gBAAgB;AAChB,SAAgB,sBAAsB,CAClC,IAAmB,EACnB,UAAyB,2BAA2B,EACpD,oBAAuC,EAAE;IAEzC,IAAI,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,wEAAwE;QACxE,IAAA,0BAAkB,CAAA,EAAE,CAAC,iBAAiB,CAAC,CAAC;QACxC,MAAM,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,CAAC;IAC1F,CAAC;AACL,CAAC","sourcesContent":["import type {HTMLRuntimeConfig} from '@diplodoc/html-extension';\nimport {setupRuntimeConfig} from '@diplodoc/html-extension/utils';\n\nimport type {PluginRuntime, TransformMeta} from './types';\n\n/** @internal */\nexport function useYfmHtmlBlockRuntime(\n meta: TransformMeta,\n runtime: PluginRuntime = '_assets/html-extension.js',\n htmlRuntimeConfig: HTMLRuntimeConfig = {},\n) {\n if (meta?.script?.includes(runtime)) {\n // MAJOR: update html-extension peer on ^2.7.1 and remove optional chain\n setupRuntimeConfig?.(htmlRuntimeConfig);\n import(/* webpackChunkName: \"yfm-html-runtime\" */ '@diplodoc/html-extension/runtime');\n }\n}\n"]}
|
package/build/esm/version.js
CHANGED
package/build/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"../../src","sources":["version.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC","sourcesContent":["/** During build process, the current version will be injected here */\nexport const VERSION = typeof '15.4.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"../../src","sources":["version.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC","sourcesContent":["/** During build process, the current version will be injected here */\nexport const VERSION = typeof '15.4.2' !== 'undefined' ? '15.4.2' : 'unknown';\n"]}
|
|
@@ -8,6 +8,7 @@ export type WithYfmHtmlBlockOptions = {
|
|
|
8
8
|
export type WithYfmHtmlBlockProps = {
|
|
9
9
|
meta: TransformMeta;
|
|
10
10
|
yfmHtmlBlockConfig?: IHTMLIFrameElementConfig;
|
|
11
|
+
/** Works only with html-extension dep version 2.7.1 and higher */
|
|
11
12
|
htmlRuntimeConfig?: HTMLRuntimeConfig;
|
|
12
13
|
};
|
|
13
14
|
export declare function withYfmHtmlBlock(opts: WithYfmHtmlBlockOptions): <T extends {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAyC,UAAU,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAC,oCAAoC,EAAC,MAAM,gCAAgC,CAAC;AAKpF,OAAO,EAAC,sBAAsB,EAAC,oCAAiC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAyC,UAAU,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAC,oCAAoC,EAAC,MAAM,gCAAgC,CAAC;AAKpF,OAAO,EAAC,sBAAsB,EAAC,oCAAiC;AAahE,MAAM,UAAU,gBAAgB,CAAC,IAA6B;IAC1D,OAAO,CACH,SAA2D,EAC7D,EAAE,CACA,UAAU,CAA4C,SAAS,WAAW,CAAC,KAAK,EAAE,GAAG;QACjF,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,GAAG,KAAK,CAAC;QAElE,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAE9D,MAAM,YAAY,GAAG,oCAAoC,EAAE,CAAC;QAE5D,SAAS,CAAC,GAAG,EAAE;YACX,IAAI,YAAY,EAAE,CAAC;gBACf,IAAI,kBAAkB,EAAE,CAAC;oBACrB,YAAY,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;gBAC/C,CAAC;gBACD,YAAY,CAAC,UAAU,EAAE,CAAC;YAC9B,CAAC;QACL,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAE7C,OAAO,KAAC,SAAS,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;IAC9C,CAAC,CAAC,CAAC;AACX,CAAC","sourcesContent":["import {type ComponentType, type RefAttributes, forwardRef, useEffect} from 'react';\n\nimport type {HTMLRuntimeConfig} from '@diplodoc/html-extension';\nimport {useDiplodocEmbeddedContentController} from '@diplodoc/html-extension/react';\nimport type {IHTMLIFrameElementConfig} from '@diplodoc/html-extension/runtime';\n\nimport type {PluginRuntime, TransformMeta} from '../withMermaid/types';\n\nimport {useYfmHtmlBlockRuntime} from './useYfmHtmlBlockRuntime';\n\nexport type WithYfmHtmlBlockOptions = {\n runtime: PluginRuntime;\n};\n\nexport type WithYfmHtmlBlockProps = {\n meta: TransformMeta;\n yfmHtmlBlockConfig?: IHTMLIFrameElementConfig;\n /** Works only with html-extension dep version 2.7.1 and higher */\n htmlRuntimeConfig?: HTMLRuntimeConfig;\n};\n\nexport function withYfmHtmlBlock(opts: WithYfmHtmlBlockOptions) {\n return <T extends {html: string}>(\n Component: ComponentType<T & RefAttributes<HTMLDivElement>>,\n ) =>\n forwardRef<HTMLDivElement, T & WithYfmHtmlBlockProps>(function WithYfmHtml(props, ref) {\n const {meta, html, yfmHtmlBlockConfig, htmlRuntimeConfig} = props;\n\n useYfmHtmlBlockRuntime(meta, opts.runtime, htmlRuntimeConfig);\n\n const yfmHtmlBlock = useDiplodocEmbeddedContentController();\n\n useEffect(() => {\n if (yfmHtmlBlock) {\n if (yfmHtmlBlockConfig) {\n yfmHtmlBlock.setConfig(yfmHtmlBlockConfig);\n }\n yfmHtmlBlock.initialize();\n }\n }, [yfmHtmlBlock, html, yfmHtmlBlockConfig]);\n\n return <Component {...props} ref={ref} />;\n });\n}\n"]}
|
|
@@ -2,7 +2,8 @@ import { setupRuntimeConfig } from '@diplodoc/html-extension/utils';
|
|
|
2
2
|
/** @internal */
|
|
3
3
|
export function useYfmHtmlBlockRuntime(meta, runtime = '_assets/html-extension.js', htmlRuntimeConfig = {}) {
|
|
4
4
|
if (meta?.script?.includes(runtime)) {
|
|
5
|
-
|
|
5
|
+
// MAJOR: update html-extension peer on ^2.7.1 and remove optional chain
|
|
6
|
+
setupRuntimeConfig?.(htmlRuntimeConfig);
|
|
6
7
|
import(/* webpackChunkName: "yfm-html-runtime" */ '@diplodoc/html-extension/runtime');
|
|
7
8
|
}
|
|
8
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useYfmHtmlBlockRuntime.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAIlE,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CAClC,IAAmB,EACnB,UAAyB,2BAA2B,EACpD,oBAAuC,EAAE;IAEzC,IAAI,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useYfmHtmlBlockRuntime.js","sourceRoot":"../../../../../src","sources":["view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAIlE,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CAClC,IAAmB,EACnB,UAAyB,2BAA2B,EACpD,oBAAuC,EAAE;IAEzC,IAAI,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,wEAAwE;QACxE,kBAAkB,EAAE,CAAC,iBAAiB,CAAC,CAAC;QACxC,MAAM,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,CAAC;IAC1F,CAAC;AACL,CAAC","sourcesContent":["import type {HTMLRuntimeConfig} from '@diplodoc/html-extension';\nimport {setupRuntimeConfig} from '@diplodoc/html-extension/utils';\n\nimport type {PluginRuntime, TransformMeta} from './types';\n\n/** @internal */\nexport function useYfmHtmlBlockRuntime(\n meta: TransformMeta,\n runtime: PluginRuntime = '_assets/html-extension.js',\n htmlRuntimeConfig: HTMLRuntimeConfig = {},\n) {\n if (meta?.script?.includes(runtime)) {\n // MAJOR: update html-extension peer on ^2.7.1 and remove optional chain\n setupRuntimeConfig?.(htmlRuntimeConfig);\n import(/* webpackChunkName: \"yfm-html-runtime\" */ '@diplodoc/html-extension/runtime');\n }\n}\n"]}
|