|
28 | 28 | font-size: 4rem; |
29 | 29 | } |
30 | 30 | </style> |
31 | | - <link rel="stylesheet" href="https://esm.sh/graphiql@5.0.6/dist/style.css" /> |
| 31 | + <link rel="stylesheet" href="https://esm.sh/graphiql@5.1.1/dist/style.css" /> |
32 | 32 | <link |
33 | 33 | rel="stylesheet" |
34 | | - href="https://esm.sh/@graphiql/plugin-explorer@5.0.0/dist/style.css" |
| 34 | + href="https://esm.sh/@graphiql/plugin-explorer@5.1.1/dist/style.css" |
35 | 35 | /> |
36 | | - <!-- Note: the ?standalone flag bundles the module along with all of its `dependencies`, excluding `peerDependencies`, into a single JavaScript file. --> |
| 36 | + <!-- |
| 37 | + * Note: |
| 38 | + * The ?standalone flag bundles the module along with all of its `dependencies`, excluding `peerDependencies`, into a single JavaScript file. |
| 39 | + * `@emotion/is-prop-valid` is a shim to remove the console error ` module "@emotion /is-prop-valid" not found`. Upstream issue: https://github.com/motiondivision/motion/issues/3126 |
| 40 | + --> |
37 | 41 | <script type="importmap"> |
38 | 42 | { |
39 | 43 | "imports": { |
40 | 44 | "react": "https://esm.sh/react@19.1.0", |
41 | | - "react/jsx-runtime": "https://esm.sh/react@19.1.0/jsx-runtime", |
| 45 | + "react/": "https://esm.sh/react@19.1.0/", |
42 | 46 |
|
43 | 47 | "react-dom": "https://esm.sh/react-dom@19.1.0", |
44 | | - "react-dom/client": "https://esm.sh/react-dom@19.1.0/client", |
| 48 | + "react-dom/": "https://esm.sh/react-dom@19.1.0/", |
45 | 49 |
|
46 | | - "graphiql": "https://esm.sh/graphiql@5.0.6?standalone&external=react,react-dom,@graphiql/react,graphql", |
47 | | - "@graphiql/plugin-explorer": "https://esm.sh/@graphiql/plugin-explorer@5.0.0?standalone&external=react,@graphiql/react,graphql", |
48 | | - "@graphiql/react": "https://esm.sh/@graphiql/react@0.35.6?standalone&external=react,react-dom,graphql", |
| 50 | + "graphiql": "https://esm.sh/graphiql@5.1.1?standalone&external=react,react-dom,@graphiql/react,graphql", |
| 51 | + "graphiql/": "https://esm.sh/graphiql@5.1.1/", |
| 52 | + "@graphiql/plugin-explorer": "https://esm.sh/@graphiql/plugin-explorer@5.1.1?standalone&external=react,@graphiql/react,graphql", |
| 53 | + "@graphiql/react": "https://esm.sh/@graphiql/react@0.37.0?standalone&external=react,react-dom,graphql,@graphiql/toolkit,@emotion/is-prop-valid", |
49 | 54 |
|
50 | 55 | "@graphiql/toolkit": "https://esm.sh/@graphiql/toolkit@0.11.3?standalone&external=graphql", |
51 | | - "graphql": "https://esm.sh/graphql@16.11.0" |
| 56 | + "graphql": "https://esm.sh/graphql@16.11.0", |
| 57 | + "@emotion/is-prop-valid": "data:text/javascript," |
52 | 58 | } |
53 | 59 | } |
54 | 60 | </script> |
55 | 61 | <script type="module"> |
56 | 62 | <!-- inject --> |
57 | | - // Import React and ReactDOM |
58 | 63 | import React from 'react'; |
59 | 64 | import ReactDOM from 'react-dom/client'; |
60 | | - // Import GraphiQL and the Explorer plugin |
61 | 65 | import { GraphiQL, HISTORY_PLUGIN } from 'graphiql'; |
62 | 66 | import { createGraphiQLFetcher } from '@graphiql/toolkit'; |
63 | 67 | import { explorerPlugin } from '@graphiql/plugin-explorer'; |
64 | | - |
65 | | - import createJSONWorker from 'https://esm.sh/monaco-editor/esm/vs/language/json/json.worker.js?worker'; |
66 | | - import createGraphQLWorker from 'https://esm.sh/monaco-graphql/esm/graphql.worker.js?worker'; |
67 | | - import createEditorWorker from 'https://esm.sh/monaco-editor/esm/vs/editor/editor.worker.js?worker'; |
68 | | - |
69 | | - globalThis.MonacoEnvironment = { |
70 | | - getWorker(_workerId, label) { |
71 | | - console.info('MonacoEnvironment.getWorker', { label }); |
72 | | - switch (label) { |
73 | | - case 'json': |
74 | | - return createJSONWorker(); |
75 | | - case 'graphql': |
76 | | - return createGraphQLWorker(); |
77 | | - } |
78 | | - return createEditorWorker(); |
79 | | - }, |
80 | | - }; |
| 68 | + import 'graphiql/setup-workers/esm.sh'; |
81 | 69 |
|
82 | 70 | const fetcher = createGraphiQLFetcher({ |
83 | 71 | url: JUNIPER_URL, |
|
0 commit comments