@graphql-yoga/render-graphiql 5.18.0 → 5.18.1-alpha-20260116132831-dc9fc0ad2f1ad6ee99bc438c173cf8496ae505a7
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/package.json +47 -30
- package/LICENSE +0 -23
- package/cjs/graphiql.js +0 -9
- package/cjs/index.js +0 -45
- package/cjs/package.json +0 -1
- package/esm/graphiql.js +0 -6
- package/esm/index.js +0 -41
- package/typings/graphiql.d.cts +0 -6
- package/typings/graphiql.d.ts +0 -6
- package/typings/index.d.cts +0 -2
- package/typings/index.d.ts +0 -2
package/esm/index.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { css, editorWorkerService, favicon, graphqlWorker, js, jsonWorker } from './graphiql.js';
|
|
2
|
-
export const renderGraphiQL = (opts) => /* HTML */ `
|
|
3
|
-
<!doctype html>
|
|
4
|
-
<html lang="en">
|
|
5
|
-
<head>
|
|
6
|
-
<meta charset="utf-8" />
|
|
7
|
-
<title>${opts?.title || 'Yoga GraphiQL'}</title>
|
|
8
|
-
<link rel="icon" href="${opts?.favicon || favicon}" />
|
|
9
|
-
<style>
|
|
10
|
-
${css}
|
|
11
|
-
</style>
|
|
12
|
-
</head>
|
|
13
|
-
<body id="body" class="no-focus-outline">
|
|
14
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
15
|
-
<div id="root"></div>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
function prepareBlob(workerContent) {
|
|
19
|
-
const blob = new Blob([workerContent], { type: 'application/javascript' });
|
|
20
|
-
return URL.createObjectURL(blob);
|
|
21
|
-
}
|
|
22
|
-
const workers = {
|
|
23
|
-
editorWorkerService: prepareBlob(${JSON.stringify(editorWorkerService)}),
|
|
24
|
-
json: prepareBlob(${JSON.stringify(jsonWorker)}),
|
|
25
|
-
graphql: prepareBlob(${JSON.stringify(graphqlWorker)}),
|
|
26
|
-
};
|
|
27
|
-
self['MonacoEnvironment'] = {
|
|
28
|
-
globalAPI: false,
|
|
29
|
-
getWorkerUrl: function (moduleId, label) {
|
|
30
|
-
return workers[label];
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
${js};
|
|
34
|
-
YogaGraphiQL.renderYogaGraphiQL(
|
|
35
|
-
window.document.querySelector('#root'),
|
|
36
|
-
${JSON.stringify(opts ?? {})},
|
|
37
|
-
);
|
|
38
|
-
</script>
|
|
39
|
-
</body>
|
|
40
|
-
</html>
|
|
41
|
-
`;
|
package/typings/graphiql.d.cts
DELETED
package/typings/graphiql.d.ts
DELETED
package/typings/index.d.cts
DELETED
package/typings/index.d.ts
DELETED