graphql-playground-html
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -9,3 +9,11 @@ import { GraphQLConfigData } from 'graphql-config'; | ||
config?: GraphQLConfigData; | ||
settings?: ISettings; | ||
} | ||
export declare type Theme = 'dark' | 'light'; | ||
export interface ISettings { | ||
['general.betaUpdates']: boolean; | ||
['editor.theme']: Theme; | ||
['editor.reuseHeaders']: boolean; | ||
['tracing.hideTracingResponse']: boolean; | ||
} | ||
export interface RenderPageOptions extends MiddlewareOptions { | ||
@@ -12,0 +20,0 @@ version: string; |
@@ -13,2 +13,3 @@ "use strict"; | ||
var loading = get_loading_markup_1.default(); | ||
var getCdnMarkup = function (options) { return "\n <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/graphql-playground-react@" + options.version + "/build/static/css/index.css\" />\n <link rel=\"shortcut icon\" href=\"//cdn.jsdelivr.net/npm/graphql-playground-react@" + options.version + "/build/favicon.png\" />\n <script src=\"//cdn.jsdelivr.net/npm/graphql-playground-react@" + options.version + "/build/static/js/middleware.js\"></script>\n"; }; | ||
function renderPlaygroundPage(options) { | ||
@@ -29,5 +30,7 @@ var extendedOptions = __assign({}, options, { canSaveConfig: false }); | ||
} | ||
return "\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=utf-8 />\n <meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui\">\n <title>GraphQL Playground</title>\n <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/graphql-playground-react@" + options.version + "/build/static/css/index.css\" />\n <link rel=\"shortcut icon\" href=\"//cdn.jsdelivr.net/npm/graphql-playground-react@" + options.version + "/build/favicon.png\" />\n <script src=\"//cdn.jsdelivr.net/npm/graphql-playground-react@" + options.version + "/build/static/js/middleware.js\"></script>\n </head>\n <body>\n <style type=\"text/css\">\n html {\n font-family: \"Open Sans\", sans-serif;\n overflow: hidden;\n }\n \n body {\n margin: 0;\n background: #172a3a;\n }\n \n .playgroundIn {\n -webkit-animation: playgroundIn 0.5s ease-out forwards;\n animation: playgroundIn 0.5s ease-out forwards;\n }\n \n @-webkit-keyframes playgroundIn {\n from {\n opacity: 0;\n -webkit-transform: translateY(10px);\n -ms-transform: translateY(10px);\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n -webkit-transform: translateY(0);\n -ms-transform: translateY(0);\n transform: translateY(0);\n }\n }\n \n @keyframes playgroundIn {\n from {\n opacity: 0;\n -webkit-transform: translateY(10px);\n -ms-transform: translateY(10px);\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n -webkit-transform: translateY(0);\n -ms-transform: translateY(0);\n transform: translateY(0);\n }\n }\n </style>\n " + loading.container + "\n <div id=\"root\" />\n <script type=\"text/javascript\">\n window.addEventListener('load', function (event) {\n " + loading.script + "\n \n const root = document.getElementById('root');\n root.classList.add('playgroundIn');\n \n GraphQLPlayground.init(root, " + JSON.stringify(extendedOptions, null, 2) + ")\n })\n </script>\n </body>\n </html>\n"; | ||
return "\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=utf-8 />\n <meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui\">\n <link rel=\"shortcut icon\" href=\"https://graphcool-playground.netlify.com/favicon.png\">\n <title>" + extendedOptions.title + "</title>\n " + (extendedOptions.env === 'react' || extendedOptions.env === 'electron' | ||
? '' | ||
: getCdnMarkup(extendedOptions)) + "\n </head>\n <body>\n <style type=\"text/css\">\n html {\n font-family: \"Open Sans\", sans-serif;\n overflow: hidden;\n }\n \n body {\n margin: 0;\n background: #172a3a;\n }\n \n .playgroundIn {\n -webkit-animation: playgroundIn 0.5s ease-out forwards;\n animation: playgroundIn 0.5s ease-out forwards;\n }\n \n @-webkit-keyframes playgroundIn {\n from {\n opacity: 0;\n -webkit-transform: translateY(10px);\n -ms-transform: translateY(10px);\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n -webkit-transform: translateY(0);\n -ms-transform: translateY(0);\n transform: translateY(0);\n }\n }\n \n @keyframes playgroundIn {\n from {\n opacity: 0;\n -webkit-transform: translateY(10px);\n -ms-transform: translateY(10px);\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n -webkit-transform: translateY(0);\n -ms-transform: translateY(0);\n transform: translateY(0);\n }\n }\n </style>\n " + loading.container + "\n <div id=\"root\" />\n <script type=\"text/javascript\">\n window.addEventListener('load', function (event) {\n " + loading.script + "\n \n const root = document.getElementById('root');\n root.classList.add('playgroundIn');\n \n GraphQLPlayground.init(root, " + JSON.stringify(extendedOptions, null, 2) + ")\n })\n </script>\n </body>\n </html>\n"; | ||
} | ||
exports.renderPlaygroundPage = renderPlaygroundPage; | ||
//# sourceMappingURL=render-playground-page.js.map |
{ | ||
"name": "graphql-playground-html", | ||
"version": "1.5.2", | ||
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html", | ||
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).", | ||
"version": "1.5.3", | ||
"homepage": | ||
"https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html", | ||
"description": | ||
"GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).", | ||
"contributors": [ | ||
@@ -14,5 +16,3 @@ "Tim Suchanek <tim@graph.cool>", | ||
"main": "dist/index.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"files": ["dist"], | ||
"scripts": { | ||
@@ -22,10 +22,6 @@ "build": "rimraf dist && tsc", | ||
}, | ||
"keywords": [ | ||
"graphql", | ||
"graphiql", | ||
"playground", | ||
"graphcool" | ||
], | ||
"keywords": ["graphql", "graphiql", "playground", "graphcool"], | ||
"devDependencies": { | ||
"@types/node": "8.5.5", | ||
"@types/node": "9.4.0", | ||
"graphql-config": "1.1.7", | ||
"rimraf": "2.6.2", | ||
@@ -32,0 +28,0 @@ "typescript": "2.6.2" |
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
24298
133
4