@dosgato/dialog 1.5.3 → 1.5.5
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/FieldRadio.svelte +2 -2
- package/dist/code/TypeScriptEditor.svelte +6 -8
- 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 +15 -8
package/dist/FieldRadio.svelte
CHANGED
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
onMount(reactToChoices)
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
|
-
<Field {path} {defaultValue} {conditional} {notNull} {number} {date} {datetime} {boolean} {serialize} {deserialize} bind:finalDeserialize let:serialize={finalSerialize} let:value let:valid let:invalid let:onBlur let:
|
|
45
|
-
<Switcher bind:id {path} class={className} name={finalPath} {horizontal} {label} iptValue={value} {valid} {invalid} {required} {related} {extradescid} {helptext} {messages} on:change={
|
|
44
|
+
<Field {path} {defaultValue} {conditional} {notNull} {number} {date} {datetime} {boolean} {serialize} {deserialize} bind:finalDeserialize let:serialize={finalSerialize} let:value let:valid let:invalid let:onBlur let:setVal let:messages>
|
|
45
|
+
<Switcher bind:id {path} class={className} name={finalPath} {horizontal} {label} iptValue={value} {valid} {invalid} {required} {related} {extradescid} {helptext} {messages} on:change={e => setVal(finalDeserialize(e.detail))} {onBlur} choices={choices.map(c => ({ ...c, value: finalSerialize(c.value) }))} />
|
|
46
46
|
</Field>
|
|
@@ -2,9 +2,9 @@
|
|
|
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 'typescript'
|
|
6
5
|
import type { Diagnostic } from '@codemirror/lint'
|
|
7
6
|
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
|
7
|
+
import type { CompilerOptions } from 'typescript'
|
|
8
8
|
import { getDescribedBy } from '..'
|
|
9
9
|
let className = ''
|
|
10
10
|
export { className as class }
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
{ autocompletion, completionKeymap, closeBracketsKeymap },
|
|
39
39
|
{ indentOnInput },
|
|
40
40
|
{ javascript },
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
41
|
+
ts,
|
|
42
|
+
{ createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment, knownLibFilesForCompilerOptions },
|
|
43
|
+
{ tsFacet, tsSync, tsHover }
|
|
44
44
|
] = await Promise.all([
|
|
45
45
|
import('codemirror'),
|
|
46
46
|
import('@codemirror/commands'),
|
|
@@ -48,11 +48,10 @@
|
|
|
48
48
|
import('@codemirror/autocomplete'),
|
|
49
49
|
import('@codemirror/language'),
|
|
50
50
|
import('@codemirror/lang-javascript'),
|
|
51
|
-
import('@valtown/codemirror-ts'),
|
|
52
51
|
import('typescript'),
|
|
53
|
-
import('@typescript/vfs')
|
|
52
|
+
import('@typescript/vfs'),
|
|
53
|
+
import('@valtown/codemirror-ts')
|
|
54
54
|
])
|
|
55
|
-
const ts = tsModule.default ?? tsModule
|
|
56
55
|
|
|
57
56
|
const compilerOptions: CompilerOptions = {
|
|
58
57
|
target: ts.ScriptTarget.ES2024,
|
|
@@ -69,7 +68,6 @@
|
|
|
69
68
|
// ensure all expected lib files exist so TS doesn't throw
|
|
70
69
|
// note: @typescript/vfs has a bug where empty string content is treated as
|
|
71
70
|
// missing (falsy check in getScriptSnapshot), so we use a space
|
|
72
|
-
const { knownLibFilesForCompilerOptions } = await import('@typescript/vfs')
|
|
73
71
|
for (const lib of knownLibFilesForCompilerOptions(compilerOptions, ts)) {
|
|
74
72
|
if (!fsMap.has('/' + lib)) fsMap.set('/' + lib, ' ')
|
|
75
73
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,6 @@ export * from './colorpicker/index.js';
|
|
|
42
42
|
export * from './helpers.js';
|
|
43
43
|
export * from './tree/index.js';
|
|
44
44
|
export * from './cropper/index.js';
|
|
45
|
-
export
|
|
45
|
+
export { default as FieldCodeEditor } from './code/FieldCodeEditor.svelte';
|
|
46
46
|
export * from './imageposition/index.js';
|
|
47
47
|
export * from './tagpicker/index.js';
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,6 @@ export * from './colorpicker/index.js';
|
|
|
42
42
|
export * from './helpers.js';
|
|
43
43
|
export * from './tree/index.js';
|
|
44
44
|
export * from './cropper/index.js';
|
|
45
|
-
export
|
|
45
|
+
export { default as FieldCodeEditor } from './code/FieldCodeEditor.svelte';
|
|
46
46
|
export * from './imageposition/index.js';
|
|
47
47
|
export * from './tagpicker/index.js';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dosgato/dialog",
|
|
3
3
|
"description": "A component library for building forms that edit a JSON document.",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.5",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"prepublishOnly": "
|
|
6
|
+
"prepublishOnly": "npm run package",
|
|
7
7
|
"dev": "vite dev --force",
|
|
8
8
|
"package": "svelte-package",
|
|
9
9
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"svelte": "./dist/index.js",
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
19
|
},
|
|
20
|
+
"./editors": {
|
|
21
|
+
"types": "./dist/code/editors.d.ts",
|
|
22
|
+
"svelte": "./dist/code/editors.js",
|
|
23
|
+
"default": "./dist/code/editors.js"
|
|
24
|
+
},
|
|
20
25
|
"./package.json": "./package.json"
|
|
21
26
|
},
|
|
22
27
|
"dependencies": {
|
|
@@ -28,25 +33,27 @@
|
|
|
28
33
|
"@iconify/svelte": "^4.0.0 || ^5.0.0",
|
|
29
34
|
"@txstate-mws/svelte-components": "^1.6.11",
|
|
30
35
|
"@txstate-mws/svelte-forms": "^2.0.0",
|
|
31
|
-
"@typescript/vfs": "^1.6.4",
|
|
32
|
-
"@valtown/codemirror-ts": "^2.3.1",
|
|
33
|
-
"cm6-graphql": "0.2.1",
|
|
34
36
|
"codemirror": "^6.0.1",
|
|
37
|
+
"graphql": "^16.0.0",
|
|
35
38
|
"txstate-utils": "^1.8.0"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
38
41
|
"@eslint/compat": "^2.0.3",
|
|
39
|
-
"@stylistic/eslint-plugin": "^
|
|
42
|
+
"@stylistic/eslint-plugin": "^5.0.0",
|
|
40
43
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
41
44
|
"@sveltejs/kit": "^2.0.1",
|
|
42
45
|
"@sveltejs/package": "^2.0.1",
|
|
43
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
46
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
47
|
+
"@typescript/vfs": "^1.6.4",
|
|
48
|
+
"@valtown/codemirror-ts": "^2.3.1",
|
|
49
|
+
"cm6-graphql": "0.2.1",
|
|
44
50
|
"eslint-config-love": "^151.0.0",
|
|
51
|
+
"graphql-language-service": "^5.0.0",
|
|
45
52
|
"eslint-plugin-svelte": "^3.0.0",
|
|
46
53
|
"svelte": "^5.0.0",
|
|
47
54
|
"svelte-check": "^4.0.0",
|
|
48
55
|
"typescript": "^5.0.2",
|
|
49
|
-
"vite": "^
|
|
56
|
+
"vite": "^8.0.0"
|
|
50
57
|
},
|
|
51
58
|
"peerDependencies": {
|
|
52
59
|
"svelte": "^3.53.1 || ^4.0.0 || ^5.0.0"
|