@dosgato/dialog 1.5.3 → 1.5.4
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/code/GraphQLEditor.svelte +1 -3
- package/dist/code/TypeScriptEditor.svelte +3 -9
- package/dist/code/_graphql-env.d.ts +3 -0
- package/dist/code/_graphql-env.js +5704 -0
- package/dist/code/_graphql-env.js.map +1 -0
- package/dist/code/_ts-env.d.ts +5 -0
- package/dist/code/_ts-env.js +160483 -0
- package/dist/code/_ts-env.js.map +1 -0
- package/dist/code/editors.d.ts +2 -0
- package/dist/code/editors.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +13 -6
|
@@ -36,9 +36,7 @@
|
|
|
36
36
|
const { autocompletion, completionKeymap, closeBracketsKeymap } = await import('@codemirror/autocomplete')
|
|
37
37
|
const { setDiagnosticsEffect } = await import('@codemirror/lint')
|
|
38
38
|
const { indentOnInput } = await import('@codemirror/language')
|
|
39
|
-
const { graphql, updateSchema, getSchema, offsetToPos } = await import('
|
|
40
|
-
const { getHoverInformation, getDiagnostics } = await import('graphql-language-service')
|
|
41
|
-
const { GraphQLSchema: GQLSchema, GraphQLObjectType, GraphQLString } = await import('graphql')
|
|
39
|
+
const { graphql, updateSchema, getSchema, offsetToPos, getHoverInformation, getDiagnostics, GraphQLSchema: GQLSchema, GraphQLObjectType, GraphQLString } = await import('./_graphql-env.js')
|
|
42
40
|
|
|
43
41
|
function stripMutations (s?: GraphQLSchema): GraphQLSchema | undefined {
|
|
44
42
|
if (!s || !noMutations) return s
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type HTMLActionEntry, passActions } from '@txstate-mws/svelte-components'
|
|
3
3
|
import type { EditorView, ViewUpdate } from '@codemirror/view'
|
|
4
4
|
import type { CompletionSource } from '@codemirror/autocomplete'
|
|
5
|
-
import type { CompilerOptions } from '
|
|
5
|
+
import type { CompilerOptions } from './_ts-env.js'
|
|
6
6
|
import type { Diagnostic } from '@codemirror/lint'
|
|
7
7
|
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
|
8
8
|
import { getDescribedBy } from '..'
|
|
@@ -38,9 +38,7 @@
|
|
|
38
38
|
{ autocompletion, completionKeymap, closeBracketsKeymap },
|
|
39
39
|
{ indentOnInput },
|
|
40
40
|
{ javascript },
|
|
41
|
-
{ tsFacet, tsSync, tsHover }
|
|
42
|
-
tsModule,
|
|
43
|
-
{ createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment }
|
|
41
|
+
{ ts, tsFacet, tsSync, tsHover, createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment, knownLibFilesForCompilerOptions }
|
|
44
42
|
] = await Promise.all([
|
|
45
43
|
import('codemirror'),
|
|
46
44
|
import('@codemirror/commands'),
|
|
@@ -48,11 +46,8 @@
|
|
|
48
46
|
import('@codemirror/autocomplete'),
|
|
49
47
|
import('@codemirror/language'),
|
|
50
48
|
import('@codemirror/lang-javascript'),
|
|
51
|
-
import('
|
|
52
|
-
import('typescript'),
|
|
53
|
-
import('@typescript/vfs')
|
|
49
|
+
import('./_ts-env.js')
|
|
54
50
|
])
|
|
55
|
-
const ts = tsModule.default ?? tsModule
|
|
56
51
|
|
|
57
52
|
const compilerOptions: CompilerOptions = {
|
|
58
53
|
target: ts.ScriptTarget.ES2024,
|
|
@@ -69,7 +64,6 @@
|
|
|
69
64
|
// ensure all expected lib files exist so TS doesn't throw
|
|
70
65
|
// note: @typescript/vfs has a bug where empty string content is treated as
|
|
71
66
|
// missing (falsy check in getScriptSnapshot), so we use a space
|
|
72
|
-
const { knownLibFilesForCompilerOptions } = await import('@typescript/vfs')
|
|
73
67
|
for (const lib of knownLibFilesForCompilerOptions(compilerOptions, ts)) {
|
|
74
68
|
if (!fsMap.has('/' + lib)) fsMap.set('/' + lib, ' ')
|
|
75
69
|
}
|