@nestia/editor 12.0.0-rc.3 → 12.0.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.
Files changed (90) hide show
  1. package/dist/assets/index-D7-O5u45.js +4140 -0
  2. package/dist/index.html +1 -1
  3. package/lib/NestiaEditorApplication.mjs +66 -3
  4. package/lib/NestiaEditorApplication.mjs.map +1 -1
  5. package/lib/NestiaEditorIframe.js +11 -17
  6. package/lib/NestiaEditorIframe.js.map +1 -1
  7. package/lib/NestiaEditorIframe.mjs +159 -3
  8. package/lib/NestiaEditorIframe.mjs.map +1 -1
  9. package/lib/NestiaEditorModule.mjs +51 -3
  10. package/lib/NestiaEditorModule.mjs.map +1 -1
  11. package/lib/NestiaEditorUploader.js +4 -11
  12. package/lib/NestiaEditorUploader.js.map +1 -1
  13. package/lib/NestiaEditorUploader.mjs +129 -3
  14. package/lib/NestiaEditorUploader.mjs.map +1 -1
  15. package/lib/index.mjs +4 -2
  16. package/lib/internal/NestiaEditorArchiver.d.ts +20 -0
  17. package/lib/internal/NestiaEditorArchiver.js +38 -0
  18. package/lib/internal/NestiaEditorArchiver.js.map +1 -0
  19. package/lib/internal/NestiaEditorArchiver.mjs +24 -0
  20. package/lib/internal/NestiaEditorArchiver.mjs.map +1 -0
  21. package/lib/internal/NestiaEditorComposer.mjs +52 -3
  22. package/lib/internal/NestiaEditorComposer.mjs.map +1 -1
  23. package/lib/internal/NestiaEditorFileUploader.mjs +43 -3
  24. package/lib/internal/NestiaEditorFileUploader.mjs.map +1 -1
  25. package/lib/main.mjs +9 -3
  26. package/lib/main.mjs.map +1 -1
  27. package/package.json +8 -11
  28. package/src/NestiaEditorIframe.tsx +35 -22
  29. package/src/NestiaEditorUploader.tsx +6 -14
  30. package/src/internal/NestiaEditorArchiver.ts +43 -0
  31. package/dist/assets/index-CkZ2qgCJ.js +0 -4310
  32. package/lib/NestiaEditorApplication2.mjs +0 -86
  33. package/lib/NestiaEditorApplication2.mjs.map +0 -1
  34. package/lib/NestiaEditorIframe2.mjs +0 -139
  35. package/lib/NestiaEditorIframe2.mjs.map +0 -1
  36. package/lib/NestiaEditorModule2.mjs +0 -124
  37. package/lib/NestiaEditorModule2.mjs.map +0 -1
  38. package/lib/NestiaEditorUploader2.mjs +0 -90
  39. package/lib/NestiaEditorUploader2.mjs.map +0 -1
  40. package/lib/_virtual/NestiaEditorApplication.mjs +0 -4
  41. package/lib/_virtual/NestiaEditorApplication.mjs.map +0 -1
  42. package/lib/_virtual/NestiaEditorComposer.mjs +0 -4
  43. package/lib/_virtual/NestiaEditorComposer.mjs.map +0 -1
  44. package/lib/_virtual/NestiaEditorFileUploader.mjs +0 -4
  45. package/lib/_virtual/NestiaEditorFileUploader.mjs.map +0 -1
  46. package/lib/_virtual/NestiaEditorIframe.mjs +0 -4
  47. package/lib/_virtual/NestiaEditorIframe.mjs.map +0 -1
  48. package/lib/_virtual/NestiaEditorModule.mjs +0 -4
  49. package/lib/_virtual/NestiaEditorModule.mjs.map +0 -1
  50. package/lib/_virtual/NestiaEditorUploader.mjs +0 -4
  51. package/lib/_virtual/NestiaEditorUploader.mjs.map +0 -1
  52. package/lib/_virtual/_commonjsHelpers.mjs +0 -35
  53. package/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
  54. package/lib/_virtual/_js-yaml.mjs +0 -7
  55. package/lib/_virtual/_js-yaml.mjs.map +0 -1
  56. package/lib/_virtual/_node_fs.mjs +0 -7
  57. package/lib/_virtual/_node_fs.mjs.map +0 -1
  58. package/lib/_virtual/_react-mui-fileuploader.mjs +0 -7
  59. package/lib/_virtual/_react-mui-fileuploader.mjs.map +0 -1
  60. package/lib/_virtual/_react.mjs +0 -7
  61. package/lib/_virtual/_react.mjs.map +0 -1
  62. package/lib/_virtual/client.mjs +0 -7
  63. package/lib/_virtual/client.mjs.map +0 -1
  64. package/lib/_virtual/estree.mjs +0 -7
  65. package/lib/_virtual/estree.mjs.map +0 -1
  66. package/lib/_virtual/index.mjs +0 -4
  67. package/lib/_virtual/index.mjs.map +0 -1
  68. package/lib/_virtual/jsx-runtime.mjs +0 -7
  69. package/lib/_virtual/jsx-runtime.mjs.map +0 -1
  70. package/lib/_virtual/main.mjs +0 -4
  71. package/lib/_virtual/main.mjs.map +0 -1
  72. package/lib/_virtual/material.mjs +0 -7
  73. package/lib/_virtual/material.mjs.map +0 -1
  74. package/lib/_virtual/migrate.mjs +0 -7
  75. package/lib/_virtual/migrate.mjs.map +0 -1
  76. package/lib/_virtual/sdk.mjs +0 -7
  77. package/lib/_virtual/sdk.mjs.map +0 -1
  78. package/lib/_virtual/standalone.mjs +0 -7
  79. package/lib/_virtual/standalone.mjs.map +0 -1
  80. package/lib/_virtual/typescript.mjs +0 -7
  81. package/lib/_virtual/typescript.mjs.map +0 -1
  82. package/lib/index.mjs.map +0 -1
  83. package/lib/index2.mjs +0 -35
  84. package/lib/index2.mjs.map +0 -1
  85. package/lib/internal/NestiaEditorComposer2.mjs +0 -110
  86. package/lib/internal/NestiaEditorComposer2.mjs.map +0 -1
  87. package/lib/internal/NestiaEditorFileUploader2.mjs +0 -51
  88. package/lib/internal/NestiaEditorFileUploader2.mjs.map +0 -1
  89. package/lib/main2.mjs +0 -16
  90. package/lib/main2.mjs.map +0 -1
@@ -1,35 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- function getAugmentedNamespace(n) {
6
- if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
7
- var f = n.default;
8
- if (typeof f == "function") {
9
- var a = function a () {
10
- var isInstance = false;
11
- try {
12
- isInstance = this instanceof a;
13
- } catch {}
14
- if (isInstance) {
15
- return Reflect.construct(f, arguments, this.constructor);
16
- }
17
- return f.apply(this, arguments);
18
- };
19
- a.prototype = f.prototype;
20
- } else a = {};
21
- Object.defineProperty(a, '__esModule', {value: true});
22
- Object.keys(n).forEach(function (k) {
23
- var d = Object.getOwnPropertyDescriptor(n, k);
24
- Object.defineProperty(a, k, d.get ? d : {
25
- enumerable: true,
26
- get: function () {
27
- return n[k];
28
- }
29
- });
30
- });
31
- return a;
32
- }
33
-
34
- export { getAugmentedNamespace, getDefaultExportFromCjs };
35
- //# sourceMappingURL=_commonjsHelpers.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as jsYaml from 'js-yaml';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(jsYaml);
5
-
6
- export { require$$1 as default };
7
- //# sourceMappingURL=_js-yaml.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_js-yaml.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as node_fs from 'node:fs';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(node_fs);
5
-
6
- export { require$$0 as default };
7
- //# sourceMappingURL=_node_fs.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_node_fs.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as reactMuiFileuploader from 'react-mui-fileuploader';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$3 = /*@__PURE__*/getAugmentedNamespace(reactMuiFileuploader);
5
-
6
- export { require$$3 as default };
7
- //# sourceMappingURL=_react-mui-fileuploader.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_react-mui-fileuploader.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as react from 'react';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(react);
5
-
6
- export { require$$1 as default };
7
- //# sourceMappingURL=_react.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_react.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as client from 'react-dom/client';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(client);
5
-
6
- export { require$$2 as default };
7
- //# sourceMappingURL=client.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as estree from 'prettier/plugins/estree';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(estree);
5
-
6
- export { require$$1 as default };
7
- //# sourceMappingURL=estree.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"estree.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,4 +0,0 @@
1
- var lib = {};
2
-
3
- export { lib as __exports };
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,7 +0,0 @@
1
- import * as jsxRuntime from 'react/jsx-runtime';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(jsxRuntime);
5
-
6
- export { require$$0 as default };
7
- //# sourceMappingURL=jsx-runtime.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsx-runtime.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,4 +0,0 @@
1
- var main = {};
2
-
3
- export { main as __exports };
4
- //# sourceMappingURL=main.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,7 +0,0 @@
1
- import * as material from '@mui/material';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(material);
5
-
6
- export { require$$1 as default };
7
- //# sourceMappingURL=material.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"material.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as migrate from '@nestia/migrate';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(migrate);
5
-
6
- export { require$$0 as default };
7
- //# sourceMappingURL=migrate.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as sdk from '@stackblitz/sdk';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(sdk);
5
-
6
- export { require$$2 as default };
7
- //# sourceMappingURL=sdk.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as standalone from 'prettier/standalone';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$3 = /*@__PURE__*/getAugmentedNamespace(standalone);
5
-
6
- export { require$$3 as default };
7
- //# sourceMappingURL=standalone.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standalone.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import * as typescript from 'prettier/plugins/typescript';
2
- import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
3
-
4
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(typescript);
5
-
6
- export { require$$2 as default };
7
- //# sourceMappingURL=typescript.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
package/lib/index.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/lib/index2.mjs DELETED
@@ -1,35 +0,0 @@
1
- import { getDefaultExportFromCjs } from './_virtual/_commonjsHelpers.mjs';
2
- import { __exports as lib } from './_virtual/index.mjs';
3
- import './NestiaEditorApplication2.mjs';
4
- import './NestiaEditorIframe2.mjs';
5
- import './NestiaEditorUploader2.mjs';
6
- import { __exports as NestiaEditorApplication } from './_virtual/NestiaEditorApplication.mjs';
7
- import { __exports as NestiaEditorIframe } from './_virtual/NestiaEditorIframe.mjs';
8
- import { __exports as NestiaEditorUploader } from './_virtual/NestiaEditorUploader.mjs';
9
-
10
- (function (exports) {
11
- var __createBinding = (lib && lib.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- var desc = Object.getOwnPropertyDescriptor(m, k);
14
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
- desc = { enumerable: true, get: function() { return m[k]; } };
16
- }
17
- Object.defineProperty(o, k2, desc);
18
- }) : (function(o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- o[k2] = m[k];
21
- }));
22
- var __exportStar = (lib && lib.__exportStar) || function(m, exports) {
23
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- __exportStar(NestiaEditorApplication, exports);
27
- __exportStar(NestiaEditorIframe, exports);
28
- __exportStar(NestiaEditorUploader, exports);
29
-
30
- } (lib));
31
-
32
- var index = /*@__PURE__*/getDefaultExportFromCjs(lib);
33
-
34
- export { index as default };
35
- //# sourceMappingURL=index2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./NestiaEditorApplication\"), exports);\n__exportStar(require(\"./NestiaEditorIframe\"), exports);\n__exportStar(require(\"./NestiaEditorUploader\"), exports);\n//# sourceMappingURL=index.js.map"],"names":["this","require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;CACA,IAAI,eAAe,GAAG,CAACA,GAAI,IAAIA,GAAI,CAAC,eAAe,MAAM,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;AAChG,KAAI,IAAI,EAAE,KAAK,SAAS,EAAE,EAAE,GAAG,CAAC;KAC5B,IAAI,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC;KAChD,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,EAAE;AACvF,OAAM,IAAI,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACnE,KAAA;KACI,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC;CACtC,CAAC,KAAK,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;AAC5B,KAAI,IAAI,EAAE,KAAK,SAAS,EAAE,EAAE,GAAG,CAAC;KAC5B,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAChB,CAAA,CAAC,CAAC,CAAC;AACH,CAAA,IAAI,YAAY,GAAG,CAACA,GAAI,IAAIA,GAAI,CAAC,YAAY,KAAK,SAAS,CAAC,EAAE,OAAO,EAAE;AACvE,KAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;CAC7H,CAAC;CACD,MAAM,CAAC,cAAc,CAAA,OAAA,EAAU,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAA,YAAY,CAACC,uBAAoC,EAAE,OAAO,CAAC;AAC3D,CAAA,YAAY,CAACC,kBAA+B,EAAE,OAAO,CAAC;AACtD,CAAA,YAAY,CAACC,oBAAiC,EAAE,OAAO,CAAC;AACxD;;;;;;;"}
@@ -1,110 +0,0 @@
1
- import { __exports as NestiaEditorComposer$1 } from '../_virtual/NestiaEditorComposer.mjs';
2
- import require$$0 from '../_virtual/migrate.mjs';
3
- import require$$1 from '../_virtual/estree.mjs';
4
- import require$$2 from '../_virtual/typescript.mjs';
5
- import require$$3 from '../_virtual/standalone.mjs';
6
-
7
- var __createBinding = (NestiaEditorComposer$1 && NestiaEditorComposer$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
- if (k2 === undefined) k2 = k;
9
- var desc = Object.getOwnPropertyDescriptor(m, k);
10
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
- desc = { enumerable: true, get: function() { return m[k]; } };
12
- }
13
- Object.defineProperty(o, k2, desc);
14
- }) : (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- o[k2] = m[k];
17
- }));
18
- var __setModuleDefault = (NestiaEditorComposer$1 && NestiaEditorComposer$1.__setModuleDefault) || (Object.create ? (function(o, v) {
19
- Object.defineProperty(o, "default", { enumerable: true, value: v });
20
- }) : function(o, v) {
21
- o["default"] = v;
22
- });
23
- var __importStar = (NestiaEditorComposer$1 && NestiaEditorComposer$1.__importStar) || (function () {
24
- var ownKeys = function(o) {
25
- ownKeys = Object.getOwnPropertyNames || function (o) {
26
- var ar = [];
27
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28
- return ar;
29
- };
30
- return ownKeys(o);
31
- };
32
- return function (mod) {
33
- if (mod && mod.__esModule) return mod;
34
- var result = {};
35
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36
- __setModuleDefault(result, mod);
37
- return result;
38
- };
39
- })();
40
- var __awaiter = (NestiaEditorComposer$1 && NestiaEditorComposer$1.__awaiter) || function (thisArg, _arguments, P, generator) {
41
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
42
- return new (P || (P = Promise))(function (resolve, reject) {
43
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
46
- step((generator = generator.apply(thisArg, _arguments || [])).next());
47
- });
48
- };
49
- var __importDefault = (NestiaEditorComposer$1 && NestiaEditorComposer$1.__importDefault) || function (mod) {
50
- return (mod && mod.__esModule) ? mod : { "default": mod };
51
- };
52
- Object.defineProperty(NestiaEditorComposer$1, "__esModule", { value: true });
53
- var NestiaEditorComposer_2 = NestiaEditorComposer$1.NestiaEditorComposer = void 0;
54
- const migrate_1 = __importDefault(require$$0);
55
- const prettierEsTreePlugin = __importStar(require$$1);
56
- const prettierTsPlugin = __importStar(require$$2);
57
- const standalone_1 = require$$3;
58
- var NestiaEditorComposer;
59
- (function (NestiaEditorComposer) {
60
- NestiaEditorComposer.nest = (props) => compose({
61
- openFile: "README.md,test/start.ts",
62
- startScript: ["build:test,test", ""],
63
- migrate: (app) => app.nest(props),
64
- })(props);
65
- NestiaEditorComposer.sdk = (props) => __awaiter(this, void 0, void 0, function* () {
66
- return compose({
67
- openFile: "README.md,test/start.ts",
68
- startScript: ["swagger", "hello"],
69
- migrate: (app) => app.sdk(props),
70
- })(props);
71
- });
72
- const compose = (config) => (props) => __awaiter(this, void 0, void 0, function* () {
73
- if (props.files !== undefined)
74
- return {
75
- success: true,
76
- data: {
77
- files: props.files,
78
- openFile: config.openFile,
79
- startScript: config.startScript,
80
- },
81
- };
82
- const result = yield migrate_1.default.NestiaMigrateApplication.validate(props.document);
83
- if (result.success === false)
84
- return result;
85
- const app = result.data;
86
- const files = config.migrate(app);
87
- for (const [key, value] of Object.entries(files))
88
- if (key.substring(key.length - 3) === ".ts")
89
- try {
90
- files[key] = yield (0, standalone_1.format)(value, {
91
- parser: "typescript",
92
- plugins: [prettierEsTreePlugin, prettierTsPlugin],
93
- });
94
- }
95
- catch (exp) {
96
- console.log(exp);
97
- }
98
- return {
99
- success: true,
100
- data: {
101
- files,
102
- openFile: config.openFile,
103
- startScript: config.startScript,
104
- },
105
- };
106
- });
107
- })(NestiaEditorComposer || (NestiaEditorComposer_2 = NestiaEditorComposer$1.NestiaEditorComposer = NestiaEditorComposer = {}));
108
-
109
- export { NestiaEditorComposer_2 as NestiaEditorComposer, NestiaEditorComposer$1 as default };
110
- //# sourceMappingURL=NestiaEditorComposer2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NestiaEditorComposer2.mjs","sources":["NestiaEditorComposer.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NestiaEditorComposer = void 0;\nconst migrate_1 = __importDefault(require(\"@nestia/migrate\"));\nconst prettierEsTreePlugin = __importStar(require(\"prettier/plugins/estree\"));\nconst prettierTsPlugin = __importStar(require(\"prettier/plugins/typescript\"));\nconst standalone_1 = require(\"prettier/standalone\");\nvar NestiaEditorComposer;\n(function (NestiaEditorComposer) {\n NestiaEditorComposer.nest = (props) => compose({\n openFile: \"README.md,test/start.ts\",\n startScript: [\"build:test,test\", \"\"],\n migrate: (app) => app.nest(props),\n })(props);\n NestiaEditorComposer.sdk = (props) => __awaiter(this, void 0, void 0, function* () {\n return compose({\n openFile: \"README.md,test/start.ts\",\n startScript: [\"swagger\", \"hello\"],\n migrate: (app) => app.sdk(props),\n })(props);\n });\n const compose = (config) => (props) => __awaiter(this, void 0, void 0, function* () {\n if (props.files !== undefined)\n return {\n success: true,\n data: {\n files: props.files,\n openFile: config.openFile,\n startScript: config.startScript,\n },\n };\n const result = yield migrate_1.default.NestiaMigrateApplication.validate(props.document);\n if (result.success === false)\n return result;\n const app = result.data;\n const files = config.migrate(app);\n for (const [key, value] of Object.entries(files))\n if (key.substring(key.length - 3) === \".ts\")\n try {\n files[key] = yield (0, standalone_1.format)(value, {\n parser: \"typescript\",\n plugins: [prettierEsTreePlugin, prettierTsPlugin],\n });\n }\n catch (exp) {\n console.log(exp);\n }\n return {\n success: true,\n data: {\n files,\n openFile: config.openFile,\n startScript: config.startScript,\n },\n };\n });\n})(NestiaEditorComposer || (exports.NestiaEditorComposer = NestiaEditorComposer = {}));\n//# sourceMappingURL=NestiaEditorComposer.js.map"],"names":["this","NestiaEditorComposer_1"],"mappings":";;;;;;AACA,IAAI,eAAe,GAAG,CAACA,sBAAI,IAAIA,sBAAI,CAAC,eAAe,MAAM,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;AAChG,IAAI,IAAI,EAAE,KAAK,SAAS,EAAE,EAAE,GAAG,CAAC;AAChC,IAAI,IAAI,IAAI,GAAG,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'../_virtual/NestiaEditorFileUploader.mjs';
2
- import require$$0 from '../_virtual/jsx-runtime.mjs';
3
- import require$$1$1 from '../_virtual/_js-yaml.mjs';
4
- import require$$1 from '../_virtual/_react.mjs';
5
- import require$$3 from '../_virtual/_react-mui-fileuploader.mjs';
6
-
7
- var __awaiter = (NestiaEditorFileUploader$1 && NestiaEditorFileUploader$1.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- var __importDefault = (NestiaEditorFileUploader$1 && NestiaEditorFileUploader$1.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(NestiaEditorFileUploader$1, "__esModule", { value: true });
20
- var NestiaEditorFileUploader_2 = NestiaEditorFileUploader$1.NestiaEditorFileUploader = NestiaEditorFileUploader;
21
- const jsx_runtime_1 = require$$0;
22
- const js_yaml_1 = require$$1$1;
23
- const react_1 = __importDefault(require$$1);
24
- const react_mui_fileuploader_1 = __importDefault(require$$3);
25
- function NestiaEditorFileUploader(props) {
26
- const [elements, setElements] = react_1.default.useState([]);
27
- const onChange = (array) => __awaiter(this, void 0, void 0, function* () {
28
- if (array.length === 0) {
29
- props.onChange(null, null);
30
- return;
31
- }
32
- const file = array[array.length - 1];
33
- const buffer = yield file.arrayBuffer();
34
- const content = new TextDecoder().decode(buffer);
35
- const extension = file.name.split(".").pop();
36
- try {
37
- const json = extension === "json" ? JSON.parse(content) : (0, js_yaml_1.load)(content);
38
- props.onChange(json, null);
39
- }
40
- catch (_a) {
41
- props.onChange(null, extension === "json" ? "Invalid JSON file" : "Invalid YAML file");
42
- return;
43
- }
44
- if (array.length > 1)
45
- setElements([file]);
46
- });
47
- return ((0, jsx_runtime_1.jsx)(react_mui_fileuploader_1.default, { defaultFiles: elements, onFilesChange: onChange, acceptedType: ".json, .yaml", getBase64: false, multiFile: false, maxUploadFiles: 1, title: "Swagger file uploader", header: "Drag and drop a Swagger file here", buttonLabel: "Click Here", rightLabel: "to select swagger.json/yaml file", buttonRemoveLabel: "Clear" }));
48
- }
49
-
50
- export { NestiaEditorFileUploader_2 as NestiaEditorFileUploader, NestiaEditorFileUploader$1 as default };
51
- //# sourceMappingURL=NestiaEditorFileUploader2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NestiaEditorFileUploader2.mjs","sources":["NestiaEditorFileUploader.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NestiaEditorFileUploader = NestiaEditorFileUploader;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst js_yaml_1 = require(\"js-yaml\");\nconst react_1 = __importDefault(require(\"react\"));\nconst react_mui_fileuploader_1 = __importDefault(require(\"react-mui-fileuploader\"));\nfunction NestiaEditorFileUploader(props) {\n const [elements, setElements] = react_1.default.useState([]);\n const onChange = (array) => __awaiter(this, void 0, void 0, function* () {\n if (array.length === 0) {\n props.onChange(null, null);\n return;\n }\n const file = array[array.length - 1];\n const buffer = yield file.arrayBuffer();\n const content = new TextDecoder().decode(buffer);\n const extension = file.name.split(\".\").pop();\n try {\n const json = extension === \"json\" ? JSON.parse(content) : (0, js_yaml_1.load)(content);\n props.onChange(json, null);\n }\n catch (_a) {\n props.onChange(null, extension === \"json\" ? \"Invalid JSON file\" : \"Invalid YAML file\");\n return;\n }\n if (array.length > 1)\n setElements([file]);\n });\n return ((0, jsx_runtime_1.jsx)(react_mui_fileuploader_1.default, { defaultFiles: elements, onFilesChange: onChange, acceptedType: \".json, .yaml\", getBase64: false, multiFile: false, maxUploadFiles: 1, title: \"Swagger file uploader\", header: \"Drag and drop a Swagger file here\", buttonLabel: \"Click Here\", rightLabel: \"to select swagger.json/yaml file\", buttonRemoveLabel: \"Clear\" }));\n}\n//# sourceMappingURL=NestiaEditorFileUploader.js.map"],"names":["this","NestiaEditorFileUploader_1","require$$1","require$$2"],"mappings":";;;;;;AACA,IAAI,SAAS,GAAG,CAACA,0BAAI,IAAIA,0BAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACjG,QAAQ,SAAS,Q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E,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,EAAE,mCAAmC,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,kCAAkC,EAAE,iBAAiB,EAAE,OAAO,EAAE,CAAC;AAClY;;;;"}
package/lib/main2.mjs DELETED
@@ -1,16 +0,0 @@
1
- import { __exports as main } from './_virtual/main.mjs';
2
- import require$$0 from './_virtual/jsx-runtime.mjs';
3
- import require$$1 from './_virtual/_react.mjs';
4
- import require$$2 from './_virtual/client.mjs';
5
- import './NestiaEditorApplication2.mjs';
6
- import { __exports as NestiaEditorApplication } from './_virtual/NestiaEditorApplication.mjs';
7
-
8
- Object.defineProperty(main, "__esModule", { value: true });
9
- const jsx_runtime_1 = require$$0;
10
- const react_1 = require$$1;
11
- const client_1 = require$$2;
12
- const NestiaEditorApplication_1 = NestiaEditorApplication;
13
- (0, client_1.createRoot)(document.getElementById("root")).render((0, jsx_runtime_1.jsx)(react_1.StrictMode, { children: (0, jsx_runtime_1.jsx)(NestiaEditorApplication_1.NestiaEditorApplication, {}) }));
14
-
15
- export { main as default };
16
- //# sourceMappingURL=main2.mjs.map
package/lib/main2.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"main2.mjs","sources":["main.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = require(\"react\");\nconst client_1 = require(\"react-dom/client\");\nconst NestiaEditorApplication_1 = require(\"./NestiaEditorApplication\");\n(0, client_1.createRoot)(document.getElementById(\"root\")).render((0, jsx_runtime_1.jsx)(react_1.StrictMode, { children: (0, jsx_runtime_1.jsx)(NestiaEditorApplication_1.NestiaEditorApplication, {}) }));\n//# sourceMappingURL=main.js.map"],"names":["require$$3"],"mappings":";;;;;;;AACA,MAAM,CAAC,cAAc,CAAC,IAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,MAAM,aAAa,GAAG,UAA4B;AAClD,MAAM,OAAO,GAAG,UAAgB;AAChC,MAAM,QAAQ,GAAG,UAA2B;AAC5C,MAAM,yBAAyB,GAAGA,uBAAoC;AACtE,IAAI,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,aAAa,CAAC,GAAG,EAAE,yBAAyB,CAAC,uBAAuB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;;;;"}