forked from asyncapi/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75b1473
commit 540cb00
Showing
37 changed files
with
14,864 additions
and
26,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
/node_modules | ||
.vscode/ | ||
/lib | ||
/build | ||
/build | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
|
||
/** Preloader */ | ||
#preloader { | ||
position: fixed; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import React from 'react' | ||
import Head from 'next/head' | ||
import 'reactflow/dist/style.css'; | ||
import './globals.css' | ||
import 'tippy.js/dist/tippy.css'; | ||
import 'tippy.js/animations/shift-away.css'; | ||
import '@asyncapi/react-component/styles/default.min.css'; | ||
import { Metadata } from 'next'; | ||
|
||
const title = 'AsyncAPI Studio' | ||
const description = 'Studio for AsyncAPI specification, where you can validate, view preview documentation, and generate templates from AsyncAPI document.' | ||
export const metadata: Metadata = { | ||
title, | ||
description, | ||
openGraph: { | ||
type: 'website', | ||
url: 'https://studio.asyncapi.com/', | ||
title, | ||
description, | ||
images: [ | ||
{ | ||
url: '/img/meta-studio-og-image.jpeg', | ||
width: 800, | ||
height: 600, | ||
alt: 'Og Image Alt', | ||
} | ||
], | ||
}, | ||
twitter: { | ||
card: 'summary_large_image', | ||
site: '@AsyncAPISpec', | ||
creator: '@AsyncAPISpec', | ||
title, | ||
description, | ||
images: [ | ||
{ | ||
url: '/img/meta-studio-og-image.jpeg', | ||
alt: 'Twitter Image Alt', | ||
width: 800, | ||
height: 600, | ||
type: 'image/jpeg', | ||
} | ||
] | ||
}, | ||
} | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<Head> | ||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon-194x194.png" /> | ||
</Head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
{children} | ||
</body> | ||
</html>) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
'use client' | ||
|
||
import React, { useEffect, useState } from 'react'; | ||
import { StrictMode } from 'react'; | ||
import { Provider as ModalsProvider } from '@ebay/nice-modal-react'; | ||
import { createServices, Services, ServicesProvider } from '../src/services'; | ||
import { App} from '../src/App'; | ||
|
||
function configureMonacoEnvironment() { | ||
if (typeof window !== 'undefined') { | ||
window.MonacoEnvironment = { | ||
getWorker(_, label) { | ||
switch (label) { | ||
case 'editorWorkerService': | ||
return new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url)); | ||
case 'json': | ||
return new Worker( | ||
new URL('monaco-editor/esm/vs/language/json/json.worker', import.meta.url), | ||
); | ||
case 'yaml': | ||
case 'yml': | ||
return new Worker(new URL('monaco-yaml/yaml.worker', import.meta.url)); | ||
default: | ||
throw new Error(`Unknown worker ${label}`); | ||
} | ||
}, | ||
}; | ||
} | ||
} | ||
|
||
function Page() { | ||
const [services, setServices] = useState<Services>(); | ||
useEffect(() => { | ||
const fetchData = async () => { | ||
const servicess = await createServices(); | ||
setServices(servicess) | ||
configureMonacoEnvironment(); | ||
}; | ||
|
||
fetchData(); | ||
}, []); | ||
|
||
if (!services) { | ||
return <h1>Loading....</h1>; | ||
} | ||
return ( | ||
<StrictMode> | ||
<ServicesProvider value={services}> | ||
<ModalsProvider> | ||
<App /> | ||
</ModalsProvider> | ||
</ServicesProvider> | ||
</StrictMode> | ||
); | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import withYaml from 'next-plugin-yaml'; | ||
export default withYaml( | ||
{ | ||
webpack: config => { | ||
config.resolve.fallback = { | ||
fs: false | ||
} | ||
return config; | ||
}, | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
import { AsyncAPIStudio } from './studio'; | ||
|
||
import type { FunctionComponent } from 'react'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/studio/src/components/Visualiser/Nodes/ApplicationNode.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.