@nocobase/plugin-block-markdown 2.1.0-beta.24 → 2.1.0-beta.26
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/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client-v2/index.d.ts +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +10 -0
- package/dist/client-v2/models/MarkdownBlockModel.d.ts +13 -0
- package/dist/client-v2/models/index.d.ts +10 -0
- package/dist/client-v2/plugin.d.ts +15 -0
- package/dist/externalVersion.js +4 -3
- package/package.json +3 -2
package/client-v2.d.ts
ADDED
package/client-v2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/client-v2/index.js');
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export { default } from './plugin';
|
|
10
|
+
export { MarkdownBlockModel } from './models/MarkdownBlockModel';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-block-markdown",["@nocobase/client-v2","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-block-markdown"]=t(require("@nocobase/client-v2"),require("@nocobase/flow-engine")):e["@nocobase/plugin-block-markdown"]=t(e["@nocobase/client-v2"],e["@nocobase/flow-engine"])}(self,function(e,t){return function(){"use strict";var n={530:function(e,t,n){n.r(t),n.d(t,{MarkdownBlockModel:function(){return l}});var r=n(485),o=n(694),c=JSON.parse('{"UU":"@nocobase/plugin-block-markdown"}');function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var l=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r,o,c;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=i(t),e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,u()?Reflect.construct(t,r||[],i(this).constructor):t.apply(this,r)),c=void 0,(o="_previousStepParams")in e?Object.defineProperty(e,o,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[o]=c,e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&a(n,e),t=[{key:"renderComponent",value:function(){return this.props.content}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(r.BlockModel);l.define({label:(0,o.tExpr)("Markdown",{ns:[c.UU,"client"]})}),l.registerFlow(r.editMarkdownFlow)},485:function(t){t.exports=e},694:function(e){e.exports=t}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var c=r[e]={exports:{}};return n[e](c,c.exports,o),c.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.g.importScripts&&(c=o.g.location+"");var c,i=o.g.document;if(!c&&i&&(i.currentScript&&"SCRIPT"===i.currentScript.tagName.toUpperCase()&&(c=i.currentScript.src),!c)){var a=i.getElementsByTagName("script");if(a.length)for(var u=a.length-1;u>-1&&(!c||!/^http(s?):/.test(c));)c=a[u--].src}if(!c)throw Error("Automatic publicPath is not supported in this browser");o.p=c.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var l={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-block-markdown/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",c=r.indexOf("/v2/");e=c>=0?r.slice(0,c+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-block-markdown/dist/client-v2/"}o.p=e}(),!function(){o.r(l),o.d(l,{MarkdownBlockModel:function(){return s.MarkdownBlockModel},default:function(){return f}});var e=o(485);function t(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function n(e,t,r){return(n=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return n(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,e)})(e)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var f=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function a(){var e,t;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");return e=a,t=arguments,e=c(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,u()?Reflect.construct(e,t||[],c(this).constructor):e.apply(this,t))}return a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),e&&i(a,e),n=[{key:"load",value:function(){var e;return(e=function(){return function(e,t){var n,r,o,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(i,"next",{value:u(0)}),a(i,"throw",{value:u(1)}),a(i,"return",{value:u(2)}),"function"==typeof Symbol&&a(i,Symbol.iterator,{value:function(){return this}}),i;function u(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(c=0)),c;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,r=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){c=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){c.label=l[1];break}if(6===l[0]&&c.label<o[1]){c.label=o[1],o=l;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(l);break}o[2]&&c.ops.pop(),c.trys.pop();continue}l=t.call(e,c)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.flowEngine.registerModelLoaders({MarkdownBlockModel:{loader:function(){return Promise.resolve().then(o.bind(o,530))}}}),[2]})},function(){var n=this,r=arguments;return new Promise(function(o,c){var i=e.apply(n,r);function a(e){t(i,o,c,a,u,"next",e)}function u(e){t(i,o,c,a,u,"throw",e)}a(void 0)})}).call(this)}},{key:"getCDN",value:function(){return this.app.getPublicPath()+"static/plugins/@nocobase/plugin-block-markdown/dist/client/vditor"}},{key:"initVditorDependency",value:function(){var e=this,t=this.getCDN();try{var n,o="plugin-block-markdown-dep",c=(n={},r(n,"".concat(o,".katex"),"".concat(t,"/dist/js/katex/katex.min.js?v=0.16.9")),r(n,"".concat(o,".ABCJS"),"".concat(t,"/dist/js/abcjs/abcjs_basic.min")),r(n,"".concat(o,".plantumlEncoder"),"".concat(t,"/dist/js/plantuml/plantuml-encoder.min")),r(n,"".concat(o,".echarts"),"".concat(t,"/dist/js/echarts/echarts.min")),r(n,"".concat(o,".flowchart"),"".concat(t,"/dist/js/flowchart.js/flowchart.min")),r(n,"".concat(o,".Viz"),"".concat(t,"/dist/js/graphviz/viz")),r(n,"".concat(o,".mermaid"),"".concat(t,"/dist/js/mermaid/mermaid.min")),n);this.app.requirejs.require.config({waitSeconds:120,paths:c}),Object.keys(c).forEach(function(t){e.app.requirejs.require([t],function(e){window[t.split(".")[1]]=e})})}catch(e){console.log("initVditorDependency failed",e)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,n),a}(a(e.Plugin)),s=o(530)}(),l}()});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useT(): (str: string) => string;
|
|
10
|
+
export declare function tExpr(key: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { BlockModel } from '@nocobase/client-v2';
|
|
10
|
+
export declare class MarkdownBlockModel extends BlockModel {
|
|
11
|
+
_previousStepParams: any;
|
|
12
|
+
renderComponent(): any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { MarkdownBlockModel } from './MarkdownBlockModel';
|
|
10
|
+
export { MarkdownBlockModel };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from '@nocobase/client-v2';
|
|
10
|
+
export declare class PluginBlockMarkdownClient extends Plugin {
|
|
11
|
+
load(): Promise<void>;
|
|
12
|
+
getCDN(): string;
|
|
13
|
+
initVditorDependency(): void;
|
|
14
|
+
}
|
|
15
|
+
export default PluginBlockMarkdownClient;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/flow-engine": "2.1.0-beta.
|
|
12
|
-
"@nocobase/client": "2.1.0-beta.
|
|
13
|
-
"@nocobase/
|
|
11
|
+
"@nocobase/flow-engine": "2.1.0-beta.26",
|
|
12
|
+
"@nocobase/client": "2.1.0-beta.26",
|
|
13
|
+
"@nocobase/client-v2": "2.1.0-beta.26",
|
|
14
|
+
"@nocobase/server": "2.1.0-beta.26"
|
|
14
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-block-markdown",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.26",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"displayName": "Block: Markdown",
|
|
6
6
|
"displayName.zh-CN": "Markdown",
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-markdown",
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"@nocobase/client": "2.x",
|
|
14
|
+
"@nocobase/client-v2": "2.x",
|
|
14
15
|
"@nocobase/server": "2.x",
|
|
15
16
|
"@nocobase/test": "2.x"
|
|
16
17
|
},
|
|
17
18
|
"keywords": [
|
|
18
19
|
"Blocks"
|
|
19
20
|
],
|
|
20
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "b17e1a72057813fa27d8435bf0f2af67ea4b059f"
|
|
21
22
|
}
|