@nestia/editor 11.0.0-dev.20260313-5 → 11.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.
package/dist/index.html CHANGED
@@ -1,19 +1,19 @@
1
- <html lang="en">
2
- <head>
3
- <meta charset="UTF-8" />
4
- <meta
5
- name="viewport"
6
- content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1.0, maximum-scale=3.0s"
7
- />
8
- <title>Nestia Editor</title>
9
- <script type="module" src="./assets/index-BvyKi6Cn.js"></script>
10
- </head>
11
- <body style="width: 100%; height: 100%; margin: 0px; overflow: hidden;">
12
- <div id="root" style="width: 100%; height: 100%"></div>
13
- <script>
14
- window.package = "@ORGANIZATION/PROJECT";
15
- window.simulate = false;
16
- window.e2e = false;
17
- </script>
18
- </body>
19
- </html>
1
+ <html lang="en">
2
+ <head>
3
+ <meta charset="UTF-8" />
4
+ <meta
5
+ name="viewport"
6
+ content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1.0, maximum-scale=3.0s"
7
+ />
8
+ <title>Nestia Editor</title>
9
+ <script type="module" src="./assets/index-DUWBgT-P.js"></script>
10
+ </head>
11
+ <body style="width: 100%; height: 100%; margin: 0px; overflow: hidden;">
12
+ <div id="root" style="width: 100%; height: 100%"></div>
13
+ <script>
14
+ window.package = "@ORGANIZATION/PROJECT";
15
+ window.simulate = false;
16
+ window.e2e = false;
17
+ </script>
18
+ </body>
19
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/editor",
3
- "version": "11.0.0-dev.20260313-5",
3
+ "version": "11.0.0",
4
4
  "main": "lib/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -8,6 +8,10 @@
8
8
  "import": "./lib/index.mjs",
9
9
  "default": "./lib/index.js"
10
10
  },
11
+ "./lib/NestiaEditorModule": {
12
+ "types": "./lib/NestiaEditorModule.d.ts",
13
+ "default": "./lib/NestiaEditorModule.js"
14
+ },
11
15
  "./package.json": "./package.json"
12
16
  },
13
17
  "description": "Swagger-UI + Cloud TypeScript Editor",
@@ -35,12 +39,12 @@
35
39
  "dependencies": {
36
40
  "@mui/material": "^5.15.6",
37
41
  "@stackblitz/sdk": "^1.11.0",
38
- "@typia/interface": "12.0.0-dev.20260313-2",
42
+ "@typia/interface": "^12.0.0",
39
43
  "js-yaml": "^4.1.0",
40
44
  "prettier": "^3.8.1",
41
45
  "react-mui-fileuploader": "^0.5.2",
42
- "typia": "12.0.0-dev.20260313-2",
43
- "@nestia/migrate": "^11.0.0-dev.20260313-5"
46
+ "typia": "^12.0.0",
47
+ "@nestia/migrate": "^11.0.0"
44
48
  },
45
49
  "devDependencies": {
46
50
  "@eslint/js": "^9.13.0",
@@ -1,94 +1,94 @@
1
- import { Typography } from "@mui/material";
2
- import React from "react";
3
-
4
- import { NestiaEditorIframe } from "./NestiaEditorIframe";
5
- import { NestiaEditorUploader } from "./NestiaEditorUploader";
6
-
7
- export function NestiaEditorApplication() {
8
- const [ready, setReady] = React.useState(false);
9
- const [asset, setAsset] = React.useState<IAsset | null>(null);
10
-
11
- React.useEffect(() => {
12
- (async () => {
13
- try {
14
- setAsset(await getAsset());
15
- } catch {
16
- setAsset(null);
17
- }
18
- setReady(true);
19
- })().catch(() => {});
20
- }, []);
21
- if (ready === false) return <></>;
22
-
23
- return asset !== null ? (
24
- <NestiaEditorIframe
25
- swagger={asset.url}
26
- package={asset.package}
27
- simulate={asset.simulate}
28
- e2e={asset.e2e}
29
- mode={asset.mode}
30
- />
31
- ) : (
32
- <div
33
- style={{
34
- padding: 25,
35
- }}
36
- >
37
- <Typography variant="h4">Nestia Editor</Typography>
38
- <hr />
39
- <br />
40
- <NestiaEditorUploader />
41
- </div>
42
- );
43
- }
44
-
45
- async function getAsset(): Promise<IAsset | null> {
46
- const index: number = window.location.href.indexOf("?");
47
- const query: URLSearchParams = new URLSearchParams(
48
- index === -1 ? "" : window.location.href.substring(index + 1),
49
- );
50
- if (query.has("uploader")) return null;
51
-
52
- const url: string | null =
53
- query.get("url") ??
54
- (await findSwagger("./swagger.json")) ??
55
- (await findSwagger("./swagger.yaml"));
56
- if (url === null) return null;
57
-
58
- const mode: string | null = query.get("mode");
59
- const packageName: string | null =
60
- query.get("package") ?? (window as any).package;
61
- const keyword: boolean | string | null =
62
- query.get("keyword") ?? (window as any).keyword;
63
- const simulate: boolean | string | null =
64
- query.get("simulate") ?? (window as any).simulate;
65
- const e2e: boolean | string | null = query.get("e2e") ?? (window as any).e2e;
66
- return {
67
- mode: mode === "nest" ? "nest" : "sdk",
68
- package: packageName ?? "@ORGANIZATION/PROJECT",
69
- url,
70
- keyword:
71
- keyword !== null
72
- ? keyword === true || keyword === "true" || keyword === "1"
73
- : false,
74
- simulate:
75
- simulate !== null
76
- ? simulate === true || simulate === "true" || simulate === "1"
77
- : false,
78
- e2e: e2e !== null ? e2e === true || e2e === "true" || e2e === "1" : false,
79
- };
80
- }
81
-
82
- async function findSwagger(file: string): Promise<string | null> {
83
- const response: Response = await fetch(file);
84
- return response.status === 200 ? file : null;
85
- }
86
-
87
- interface IAsset {
88
- mode: "nest" | "sdk";
89
- package: string;
90
- url: string;
91
- keyword: boolean;
92
- simulate: boolean;
93
- e2e: boolean;
94
- }
1
+ import { Typography } from "@mui/material";
2
+ import React from "react";
3
+
4
+ import { NestiaEditorIframe } from "./NestiaEditorIframe";
5
+ import { NestiaEditorUploader } from "./NestiaEditorUploader";
6
+
7
+ export function NestiaEditorApplication() {
8
+ const [ready, setReady] = React.useState(false);
9
+ const [asset, setAsset] = React.useState<IAsset | null>(null);
10
+
11
+ React.useEffect(() => {
12
+ (async () => {
13
+ try {
14
+ setAsset(await getAsset());
15
+ } catch {
16
+ setAsset(null);
17
+ }
18
+ setReady(true);
19
+ })().catch(() => {});
20
+ }, []);
21
+ if (ready === false) return <></>;
22
+
23
+ return asset !== null ? (
24
+ <NestiaEditorIframe
25
+ swagger={asset.url}
26
+ package={asset.package}
27
+ simulate={asset.simulate}
28
+ e2e={asset.e2e}
29
+ mode={asset.mode}
30
+ />
31
+ ) : (
32
+ <div
33
+ style={{
34
+ padding: 25,
35
+ }}
36
+ >
37
+ <Typography variant="h4">Nestia Editor</Typography>
38
+ <hr />
39
+ <br />
40
+ <NestiaEditorUploader />
41
+ </div>
42
+ );
43
+ }
44
+
45
+ async function getAsset(): Promise<IAsset | null> {
46
+ const index: number = window.location.href.indexOf("?");
47
+ const query: URLSearchParams = new URLSearchParams(
48
+ index === -1 ? "" : window.location.href.substring(index + 1),
49
+ );
50
+ if (query.has("uploader")) return null;
51
+
52
+ const url: string | null =
53
+ query.get("url") ??
54
+ (await findSwagger("./swagger.json")) ??
55
+ (await findSwagger("./swagger.yaml"));
56
+ if (url === null) return null;
57
+
58
+ const mode: string | null = query.get("mode");
59
+ const packageName: string | null =
60
+ query.get("package") ?? (window as any).package;
61
+ const keyword: boolean | string | null =
62
+ query.get("keyword") ?? (window as any).keyword;
63
+ const simulate: boolean | string | null =
64
+ query.get("simulate") ?? (window as any).simulate;
65
+ const e2e: boolean | string | null = query.get("e2e") ?? (window as any).e2e;
66
+ return {
67
+ mode: mode === "nest" ? "nest" : "sdk",
68
+ package: packageName ?? "@ORGANIZATION/PROJECT",
69
+ url,
70
+ keyword:
71
+ keyword !== null
72
+ ? keyword === true || keyword === "true" || keyword === "1"
73
+ : false,
74
+ simulate:
75
+ simulate !== null
76
+ ? simulate === true || simulate === "true" || simulate === "1"
77
+ : false,
78
+ e2e: e2e !== null ? e2e === true || e2e === "true" || e2e === "1" : false,
79
+ };
80
+ }
81
+
82
+ async function findSwagger(file: string): Promise<string | null> {
83
+ const response: Response = await fetch(file);
84
+ return response.status === 200 ? file : null;
85
+ }
86
+
87
+ interface IAsset {
88
+ mode: "nest" | "sdk";
89
+ package: string;
90
+ url: string;
91
+ keyword: boolean;
92
+ simulate: boolean;
93
+ e2e: boolean;
94
+ }