@nocobase/plugin-field-code 2.0.3

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.
Files changed (51) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +99 -0
  3. package/client.d.ts +2 -0
  4. package/client.js +1 -0
  5. package/dist/client/16aa9f37d369f6e2.js +10 -0
  6. package/dist/client/19f99a0c5a40ead1.js +10 -0
  7. package/dist/client/2c65737397b4cb3b.js +10 -0
  8. package/dist/client/493578e28b69643e.js +10 -0
  9. package/dist/client/74267117e0d4b7ff.js +10 -0
  10. package/dist/client/82436e2d7ff0bc4b.js +10 -0
  11. package/dist/client/876bd327755c8631.js +10 -0
  12. package/dist/client/CodeEditor.d.ts +16 -0
  13. package/dist/client/ccd3cdd796458d5f.js +10 -0
  14. package/dist/client/cdf9d585d88e9a91.js +10 -0
  15. package/dist/client/d171f7d76492119d.js +10 -0
  16. package/dist/client/d2978b5b98ec2eb9.js +10 -0
  17. package/dist/client/f5d42ec1ec8c6c8a.js +10 -0
  18. package/dist/client/index.d.ts +14 -0
  19. package/dist/client/index.js +10 -0
  20. package/dist/client/interface.d.ts +61 -0
  21. package/dist/client/lang.d.ts +9 -0
  22. package/dist/client/languages/index.d.ts +36 -0
  23. package/dist/common/constants.d.ts +9 -0
  24. package/dist/common/constants.js +36 -0
  25. package/dist/externalVersion.js +17 -0
  26. package/dist/index.d.ts +10 -0
  27. package/dist/index.js +48 -0
  28. package/dist/locale/de-DE.json +7 -0
  29. package/dist/locale/en-US.json +7 -0
  30. package/dist/locale/es-ES.json +7 -0
  31. package/dist/locale/fr-FR.json +7 -0
  32. package/dist/locale/hu-HU.json +7 -0
  33. package/dist/locale/id-ID.json +7 -0
  34. package/dist/locale/it-IT.json +7 -0
  35. package/dist/locale/ja-JP.json +7 -0
  36. package/dist/locale/ko-KR.json +7 -0
  37. package/dist/locale/nl-NL.json +7 -0
  38. package/dist/locale/pt-BR.json +7 -0
  39. package/dist/locale/ru-RU.json +7 -0
  40. package/dist/locale/tr-TR.json +7 -0
  41. package/dist/locale/uk-UA.json +7 -0
  42. package/dist/locale/vi-VN.json +7 -0
  43. package/dist/locale/zh-CN.json +7 -0
  44. package/dist/locale/zh-TW.json +7 -0
  45. package/dist/server/index.d.ts +9 -0
  46. package/dist/server/index.js +42 -0
  47. package/dist/server/plugin.d.ts +19 -0
  48. package/dist/server/plugin.js +54 -0
  49. package/package.json +40 -0
  50. package/server.d.ts +2 -0
  51. package/server.js +1 -0
@@ -0,0 +1,14 @@
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, SchemaSettings } from '@nocobase/client';
10
+ export declare const codeComponentSettings: SchemaSettings<{}>;
11
+ export declare class PluginFieldCodeClient extends Plugin {
12
+ load(): Promise<void>;
13
+ }
14
+ export default PluginFieldCodeClient;
@@ -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"),require("react"),require("@formily/react"),require("antd"),require("antd-style")):"function"==typeof define&&define.amd?define("@nocobase/plugin-field-code",["@nocobase/client","react","@formily/react","antd","antd-style"],t):"object"==typeof exports?exports["@nocobase/plugin-field-code"]=t(require("@nocobase/client"),require("react"),require("@formily/react"),require("antd"),require("antd-style")):e["@nocobase/plugin-field-code"]=t(e["@nocobase/client"],e.react,e["@formily/react"],e.antd,e["antd-style"])}(self,function(e,t,n,r,o){return function(){var i,c,u,a,l,s,f={840:function(e,t,n){"use strict";n.d(t,{S:function(){return u},r:function(){return a}});var r=n(581);function o(e,t,n,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var c=e.apply(t,n);function u(e){o(c,r,i,u,a,"next",e)}function a(e){o(c,r,i,u,a,"throw",e)}u(void 0)})}}function c(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var a=[i,u];if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){c.label=a[1];break}if(6===a[0]&&c.label<o[1]){c.label=o[1],o=a;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(a);break}o[2]&&c.ops.pop(),c.trys.pop();continue}a=t.call(e,c)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}var u=[{value:"javascript",label:"JavaScript",load:function(){return i(function(){return c(this,function(e){switch(e.label){case 0:return[4,r("imported_4vss2k_component",Promise.all([n.e("454"),n.e("685"),n.e("754"),n.e("856"),n.e("453")]).then(n.bind(n,558)))];case 1:return[2,(0,e.sent().javascript)()]}})})()}},{value:"java",label:"Java",load:function(){return i(function(){return c(this,function(e){switch(e.label){case 0:return[4,r("imported_-8tq2d4_component",Promise.all([n.e("454"),n.e("685"),n.e("754"),n.e("555")]).then(n.bind(n,517)))];case 1:return[2,(0,e.sent().java)()]}})})()}},{value:"sql",label:"SQL",load:function(){return i(function(){return c(this,function(e){switch(e.label){case 0:return[4,r("imported_-1s5b33f_component",Promise.all([n.e("454"),n.e("685"),n.e("754"),n.e("856"),n.e("155")]).then(n.bind(n,670)))];case 1:return[2,(0,e.sent().sql)()]}})})()}},{value:"python",label:"Python",load:function(){return i(function(){return c(this,function(e){switch(e.label){case 0:return[4,r("imported_e67311_component",Promise.all([n.e("454"),n.e("754"),n.e("463")]).then(n.bind(n,998)))];case 1:return[2,(0,e.sent().python)()]}})})()}},{value:"groovy",label:"Groovy",load:function(){return i(function(){var e,t;return c(this,function(o){switch(o.label){case 0:return[4,r("imported_-60lkaf_component",Promise.all([n.e("454"),n.e("558")]).then(n.bind(n,220)))];case 1:return e=o.sent().StreamLanguage,[4,r("imported_17juot3_component",n.e("320").then(n.bind(n,509)))];case 2:return t=o.sent().groovy,[2,e.define(t)]}})})()}}],a=Object.fromEntries(u.map(function(e){return[e.value,e]}))},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},505:function(e){"use strict";e.exports=n},772:function(t){"use strict";t.exports=e},721:function(e){"use strict";e.exports=r},202:function(e){"use strict";e.exports=o},156:function(e){"use strict";e.exports=t}},p={};function d(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={exports:{}};return f[e](n,n.exports,d),n.exports}d.m=f,d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,n){return d.f[n](e,t),t},[]))},d.u=function(e){return""+({155:"16aa9f37d369f6e2",222:"74267117e0d4b7ff",320:"cdf9d585d88e9a91",453:"d2978b5b98ec2eb9",454:"f5d42ec1ec8c6c8a",463:"493578e28b69643e",555:"876bd327755c8631",558:"82436e2d7ff0bc4b",606:"19f99a0c5a40ead1",685:"ccd3cdd796458d5f",754:"2c65737397b4cb3b",856:"d171f7d76492119d"})[e]+".js"},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i={},c="@nocobase/plugin-field-code:",d.l=function(e,t,n,r){if(i[e])return void i[e].push(t);if(void 0!==n)for(var o,u,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var s=a[l];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==c+n){o=s;break}}o||(u=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-webpack",c+n),o.src=e),i[e]=[t];var f=function(t,n){o.onerror=o.onload=null,clearTimeout(p);var r=i[e];if(delete i[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=f.bind(null,o.onerror),o.onload=f.bind(null,o.onload),u&&document.head.appendChild(o)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(u=window.__webpack_public_path__||"/").endsWith("/")||(u+="/"),d.p=u+"static/plugins/@nocobase/plugin-field-code/dist/client/",a={909:0},d.f.j=function(e,t){var n=d.o(a,e)?a[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=a[e]=[t,r]});t.push(n[2]=r);var o=d.p+d.u(e),i=Error();d.l(o,function(t){if(d.o(a,e)&&(0!==(n=a[e])&&(a[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},l=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],u=0;if(o.some(function(e){return 0!==a[e]})){for(n in i)d.o(i,n)&&(d.m[n]=i[n]);c&&c(d)}for(e&&e(t);u<o.length;u++)r=o[u],d.o(a,r)&&a[r]&&a[r][0](),a[r]=0},(s=self.webpackChunk_nocobase_plugin_field_code=self.webpackChunk_nocobase_plugin_field_code||[]).forEach(l.bind(null,0)),s.push=l.bind(null,s.push.bind(s));var b={};return!function(){"use strict";d.r(b),d.d(b,{codeComponentSettings:function(){return j},default:function(){return _},PluginFieldCodeClient:function(){return P}});var e=d(156),t=d(505),n=d(772),r="@nocobase/plugin-field-code",o=d(840);function i(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 u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var l=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,u,l,s,f;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return u=t,l=arguments,u=c(u),i(e=function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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,a()?Reflect.construct(u,l||[],c(this).constructor):u.apply(this,l)),"name","code"),i(e,"type","object"),i(e,"group","advanced"),i(e,"order",1),i(e,"title",'{{t("Code", { ns: "'.concat(r,'" })}}')),i(e,"description",'{{t("Programming code editor with syntax highlighting.", { ns: "'.concat(r,'" })}}')),i(e,"sortable",!0),i(e,"default",{type:"text",uiSchema:{type:"string","x-component":"CodeEditor"}}),i(e,"properties",(s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}({},n.defaultProps),f=f={"uiSchema.x-component-props.language":{type:"string",title:'{{t("Programming language", { ns: "'.concat(r,'" })}}'),"x-decorator":"FormItem","x-component":"Select","x-component-props":{showSearch:!0,allowClear:!0,placeholder:'{{t("Choose language", { ns: "'.concat(r,'" })}}')},enum:o.S.map(function(e){return{label:e.label,value:e.value}}),default:"javascript"}},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(f)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(f)).forEach(function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(f,e))}),s)),i(e,"titleUsable",!1),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e),t}(n.CollectionFieldInterface);function s(e){var t,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.i18n.t(e,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),o=o={ns:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t))}var f=d(581);function p(e,t,n,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(r,o)}function h(e,t,n){return(h=O()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&v(o,n.prototype),o}).apply(null,arguments)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t="function"==typeof Map?new Map:void 0;return(g=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,n)}function n(){return h(e,arguments,m(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)})(e)}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}var w=(0,e.lazy)(function(){return f("imported_b24rcf_component",Promise.all([d.e("454"),d.e("685"),d.e("856"),d.e("558"),d.e("606"),d.e("222")]).then(d.bind(d,706)))}),j=new n.SchemaSettings({name:"fieldSettings:component:CodeEditor",items:[{name:"height",type:"modal",useComponentProps:function(){var e,o=(0,t.useField)(),i=(0,t.useFieldSchema)(),c=((0,n.useColumnSchema)()||{}).fieldSchema,u=(0,n.useDesignable)().dn,a=c||i;return{title:s("Content height"),schema:{type:"object",title:s("Content height"),properties:{height:{"x-decorator":"FormItem","x-component":"Input","x-component-props":{},default:(null==i||null==(e=i["x-component-props"])?void 0:e.height)||"auto",description:'{{t(\'Could use CSS values (e.g., "300px" or "50%"). Use "auto" for automatic height adjustment based on content.\', { ns: "'.concat(r,'" })}}')}}},onSubmit:function(e){var t=e.height,n=a["x-component-props"]||{};n.height=t;var r=y({},"x-uid",a["x-uid"]);r["x-component-props"]=n,a["x-component-props"]=n,o.componentProps.height=t,u.emit("patch",{schema:r}),u.refresh()}}}},{name:"indentUnit",type:"modal",useComponentProps:function(){var e,r=(0,t.useField)(),o=(0,t.useFieldSchema)(),i=((0,n.useColumnSchema)()||{}).fieldSchema,c=(0,n.useDesignable)().dn,u=i||o;return{title:s("Indent unit"),schema:{type:"object",title:s("Indent unit"),properties:{indentUnit:{"x-decorator":"FormItem","x-component":"Input","x-component-props":{},default:(null==o||null==(e=o["x-component-props"])?void 0:e.indentUnit)||2}}},onSubmit:function(e){var t=e.indentUnit,n=u["x-component-props"]||{};n.indentUnit=t;var o=y({},"x-uid",u["x-uid"]);o["x-component-props"]=n,u["x-component-props"]=n,r.componentProps.indentUnit=t,c.emit("patch",{schema:o}),c.refresh()}}}}]}),P=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;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=m(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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,O()?Reflect.construct(e,t||[],m(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&v(n,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){return function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var a=[i,u];if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){c.label=a[1];break}if(6===a[0]&&c.label<o[1]){c.label=o[1],o=a;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(a);break}o[2]&&c.ops.pop(),c.trys.pop();continue}a=t.call(e,c)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(e){return t.app.addComponents({CodeEditor:w}),t.app.dataSourceManager.addFieldInterfaces([l]),t.app.schemaSettingsManager.add(j),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){p(i,r,o,c,u,"next",e)}function u(e){p(i,r,o,c,u,"throw",e)}c(void 0)})})()}}],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}(g(n.Plugin)),_=P}(),b}()});
@@ -0,0 +1,61 @@
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 { CollectionFieldInterface } from '@nocobase/client';
10
+ export declare class CodeFieldInterface extends CollectionFieldInterface {
11
+ name: string;
12
+ type: string;
13
+ group: string;
14
+ order: number;
15
+ title: string;
16
+ description: string;
17
+ sortable: boolean;
18
+ default: {
19
+ type: string;
20
+ uiSchema: {
21
+ type: string;
22
+ 'x-component': string;
23
+ };
24
+ };
25
+ properties: {
26
+ 'uiSchema.x-component-props.language': {
27
+ type: string;
28
+ title: string;
29
+ 'x-decorator': string;
30
+ 'x-component': string;
31
+ 'x-component-props': {
32
+ showSearch: boolean;
33
+ allowClear: boolean;
34
+ placeholder: string;
35
+ };
36
+ enum: {
37
+ label: string;
38
+ value: string;
39
+ }[];
40
+ default: string;
41
+ };
42
+ 'uiSchema.title': {
43
+ type: string;
44
+ title: string;
45
+ required: boolean;
46
+ 'x-decorator': string;
47
+ 'x-component': string;
48
+ };
49
+ name: {
50
+ type: string;
51
+ title: string;
52
+ required: boolean;
53
+ 'x-disabled': string;
54
+ 'x-decorator': string;
55
+ 'x-component': string;
56
+ 'x-validator': string;
57
+ description: string;
58
+ };
59
+ };
60
+ titleUsable: boolean;
61
+ }
@@ -0,0 +1,9 @@
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 lang(key: string, options?: {}): string;
@@ -0,0 +1,36 @@
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 const LANGUAGES_LIST: ({
10
+ value: string;
11
+ label: string;
12
+ load(): Promise<import("@codemirror/language").LanguageSupport>;
13
+ } | {
14
+ value: string;
15
+ label: string;
16
+ load(): Promise<import("@codemirror/language").LanguageSupport>;
17
+ } | {
18
+ value: string;
19
+ label: string;
20
+ load(): Promise<import("@codemirror/language").StreamLanguage<unknown>>;
21
+ })[];
22
+ export declare const LANGUAGES_MAP: {
23
+ [k: string]: {
24
+ value: string;
25
+ label: string;
26
+ load(): Promise<import("@codemirror/language").LanguageSupport>;
27
+ } | {
28
+ value: string;
29
+ label: string;
30
+ load(): Promise<import("@codemirror/language").LanguageSupport>;
31
+ } | {
32
+ value: string;
33
+ label: string;
34
+ load(): Promise<import("@codemirror/language").StreamLanguage<unknown>>;
35
+ };
36
+ };
@@ -0,0 +1,9 @@
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 const NAMESPACE = "@nocobase/plugin-field-code";
@@ -0,0 +1,36 @@
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
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var constants_exports = {};
28
+ __export(constants_exports, {
29
+ NAMESPACE: () => NAMESPACE
30
+ });
31
+ module.exports = __toCommonJS(constants_exports);
32
+ const NAMESPACE = "@nocobase/plugin-field-code";
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ NAMESPACE
36
+ });
@@ -0,0 +1,17 @@
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
+ module.exports = {
11
+ "react": "18.2.0",
12
+ "antd": "5.24.2",
13
+ "antd-style": "3.7.1",
14
+ "@formily/react": "2.3.7",
15
+ "@nocobase/client": "2.0.3",
16
+ "@nocobase/server": "2.0.3"
17
+ };
@@ -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 * from './server';
10
+ export { default } from './server';
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
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
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
+ // If the importer is in node compatibility mode or this is not an ESM
31
+ // file that has been converted to a CommonJS file using a Babel-
32
+ // compatible transform (i.e. "__esModule" has not been set), then set
33
+ // "default" to the CommonJS "module.exports" for node compatibility.
34
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
+ mod
36
+ ));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
+ var src_exports = {};
39
+ __export(src_exports, {
40
+ default: () => import_server.default
41
+ });
42
+ module.exports = __toCommonJS(src_exports);
43
+ __reExport(src_exports, require("./server"), module.exports);
44
+ var import_server = __toESM(require("./server"));
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ ...require("./server")
48
+ });
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "代码",
3
+ "Content height": "内容高度",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "可以使用 CSS 值(例如,\"300px\" 或 \"50%\")。使用 \"auto\" 以根据内容自动调整高度。",
5
+ "Programming code editor with syntax highlighting.": "带语法高亮的编程代码编辑器。",
6
+ "Programming language": "编程语言"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "Code": "Code",
3
+ "Content height": "Content height",
4
+ "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
5
+ "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
+ "Programming language": "Programming language"
7
+ }
@@ -0,0 +1,9 @@
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';
@@ -0,0 +1,42 @@
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
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var server_exports = {};
38
+ __export(server_exports, {
39
+ default: () => import_plugin.default
40
+ });
41
+ module.exports = __toCommonJS(server_exports);
42
+ var import_plugin = __toESM(require("./plugin"));
@@ -0,0 +1,19 @@
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/server';
10
+ export declare class PluginFieldCodeServer extends Plugin {
11
+ afterAdd(): Promise<void>;
12
+ beforeLoad(): Promise<void>;
13
+ load(): Promise<void>;
14
+ install(): Promise<void>;
15
+ afterEnable(): Promise<void>;
16
+ afterDisable(): Promise<void>;
17
+ remove(): Promise<void>;
18
+ }
19
+ export default PluginFieldCodeServer;
@@ -0,0 +1,54 @@
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
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var plugin_exports = {};
28
+ __export(plugin_exports, {
29
+ PluginFieldCodeServer: () => PluginFieldCodeServer,
30
+ default: () => plugin_default
31
+ });
32
+ module.exports = __toCommonJS(plugin_exports);
33
+ var import_server = require("@nocobase/server");
34
+ class PluginFieldCodeServer extends import_server.Plugin {
35
+ async afterAdd() {
36
+ }
37
+ async beforeLoad() {
38
+ }
39
+ async load() {
40
+ }
41
+ async install() {
42
+ }
43
+ async afterEnable() {
44
+ }
45
+ async afterDisable() {
46
+ }
47
+ async remove() {
48
+ }
49
+ }
50
+ var plugin_default = PluginFieldCodeServer;
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ PluginFieldCodeServer
54
+ });
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@nocobase/plugin-field-code",
3
+ "displayName": "Collection field: Code",
4
+ "displayName.zh-CN": "数据表字段:代码",
5
+ "description": "For code editing and highlighting, supporting Java, JavaScript, Python, SQL and other languages.",
6
+ "description.zh-CN": "用于代码编辑和高亮显示,支持 Java、JavaScript、Python、SQL 等语言。",
7
+ "version": "2.0.3",
8
+ "main": "dist/server/index.js",
9
+ "nocobase": {
10
+ "supportedVersions": [
11
+ "1.x",
12
+ "2.x"
13
+ ],
14
+ "editionLevel": 0
15
+ },
16
+ "devDependencies": {
17
+ "@codemirror/lang-java": "^6.0.1",
18
+ "@codemirror/lang-javascript": "^6.2.3",
19
+ "@codemirror/lang-python": "^6.1.7",
20
+ "@codemirror/lang-sql": "^6.8.0",
21
+ "@codemirror/language": "^6.11.0",
22
+ "@codemirror/legacy-modes": "^6.5.0",
23
+ "@codemirror/lint": "^6.8.3",
24
+ "@codemirror/state": "^6.4.1",
25
+ "@codemirror/view": "^6.37.2",
26
+ "@uiw/react-codemirror": "4.23.10",
27
+ "codemirror": "^6.0.1",
28
+ "jshint": "^2.13.6"
29
+ },
30
+ "peerDependencies": {
31
+ "@nocobase/client": "2.x",
32
+ "@nocobase/server": "2.x",
33
+ "@nocobase/test": "2.x"
34
+ },
35
+ "keywords": [
36
+ "Collection fields"
37
+ ],
38
+ "license": "Apache-2.0",
39
+ "gitHead": "5bcb42fc092f85adb9511c1a351b388bd7aaf66e"
40
+ }
package/server.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/server';
2
+ export { default } from './dist/server';
package/server.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/server/index.js');