@scalar/use-codemirror 0.7.15 → 0.7.17
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/CHANGELOG.md +12 -0
- package/dist/components/CodeMirror/CodeMirror.vue.d.ts +1 -1
- package/dist/components/CodeMirror/CodeMirror.vue.d.ts.map +1 -1
- package/dist/hooks/useCodeMirror.d.ts +1 -1
- package/dist/hooks/useCodeMirror.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/package.json +18 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scalar/use-codemirror
|
|
2
2
|
|
|
3
|
+
## 0.7.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c171c9d9: fix: request body doesn’t reset on navigating to a request without a body
|
|
8
|
+
|
|
9
|
+
## 0.7.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- a1319e8b: Switched internal component library to use ScalarComponents instead
|
|
14
|
+
|
|
3
15
|
## 0.7.15
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
disableEnter: boolean;
|
|
16
16
|
forceDarkMode: boolean;
|
|
17
17
|
}>, {
|
|
18
|
-
setCodeMirrorContent: (content
|
|
18
|
+
setCodeMirrorContent: (content?: string | undefined) => void;
|
|
19
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
20
|
change: (value: string) => void;
|
|
21
21
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeMirror/CodeMirror.vue.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAUlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeMirror/CodeMirror.vue.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAUlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAoQjC,OAAO;kBADR,OAAO;;AAV1B,wBAmBG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -27,7 +27,7 @@ export declare const useCodeMirror: (parameters: UseCodeMirrorParameters) => {
|
|
|
27
27
|
value: Ref<string>;
|
|
28
28
|
codeMirrorRef: Ref<HTMLDivElement | null>;
|
|
29
29
|
codeMirror: Ref<EditorView | null>;
|
|
30
|
-
setCodeMirrorContent: (content
|
|
30
|
+
setCodeMirrorContent: (content?: string) => void;
|
|
31
31
|
reconfigureCodeMirror: (newExtensions: Extension[]) => void;
|
|
32
32
|
restartCodeMirror: (newExtensions: Extension[]) => void;
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCodeMirror.d.ts","sourceRoot":"","sources":["../../src/hooks/useCodeMirror.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,mBAAmB,CAAA;AAM/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,KAAK,GAAG,EAAc,MAAM,KAAK,CAAA;AAO1C,KAAK,uBAAuB,GAAG;IAC7B;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,aAAa,eACZ,uBAAuB;WAE5B,IAAI,MAAM,CAAC;mBACH,IAAI,cAAc,GAAG,IAAI,CAAC;gBAC7B,IAAI,UAAU,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useCodeMirror.d.ts","sourceRoot":"","sources":["../../src/hooks/useCodeMirror.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,mBAAmB,CAAA;AAM/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,KAAK,GAAG,EAAc,MAAM,KAAK,CAAA;AAO1C,KAAK,uBAAuB,GAAG;IAC7B;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,aAAa,eACZ,uBAAuB;WAE5B,IAAI,MAAM,CAAC;mBACH,IAAI,cAAc,GAAG,IAAI,CAAC;gBAC7B,IAAI,UAAU,GAAG,IAAI,CAAC;qCACD,MAAM,KAAK,IAAI;2CACT,SAAS,EAAE,KAAK,IAAI;uCACxB,SAAS,EAAE,KAAK,IAAI;CAgLxD,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4110,8 +4110,8 @@ const useCodeMirror = (parameters) => {
|
|
|
4110
4110
|
if (value.value === newValue) {
|
|
4111
4111
|
return;
|
|
4112
4112
|
}
|
|
4113
|
-
value.value = newValue;
|
|
4114
|
-
if (codeMirror.value.state.doc.toString() ===
|
|
4113
|
+
value.value = newValue ?? "";
|
|
4114
|
+
if (codeMirror.value.state.doc.toString() === value.value) {
|
|
4115
4115
|
return;
|
|
4116
4116
|
}
|
|
4117
4117
|
codeMirror.value.dispatch({
|
|
@@ -4123,7 +4123,7 @@ const useCodeMirror = (parameters) => {
|
|
|
4123
4123
|
selection: {
|
|
4124
4124
|
anchor: Math.min(
|
|
4125
4125
|
codeMirror.value.state.selection.main.anchor,
|
|
4126
|
-
|
|
4126
|
+
value.value.length
|
|
4127
4127
|
)
|
|
4128
4128
|
}
|
|
4129
4129
|
});
|
|
@@ -4313,10 +4313,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4313
4313
|
watch(
|
|
4314
4314
|
() => props.content,
|
|
4315
4315
|
() => {
|
|
4316
|
-
|
|
4317
|
-
if ((_a = props.content) == null ? void 0 : _a.length) {
|
|
4318
|
-
setCodeMirrorContent(props.content);
|
|
4319
|
-
}
|
|
4316
|
+
setCodeMirrorContent(props.content);
|
|
4320
4317
|
}
|
|
4321
4318
|
);
|
|
4322
4319
|
watch(
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"vue",
|
|
12
12
|
"vue3"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.7.
|
|
14
|
+
"version": "0.7.17",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=20"
|
|
17
17
|
},
|
|
@@ -30,33 +30,31 @@
|
|
|
30
30
|
"url": "https://github.com/scalar/scalar.git",
|
|
31
31
|
"directory": "packages/use-codemirror"
|
|
32
32
|
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@codemirror/lang-html": "^6.4.6",
|
|
35
|
-
"@codemirror/lang-java": "^6.0.1",
|
|
36
|
-
"@codemirror/lang-javascript": "^6.2.1",
|
|
37
|
-
"@codemirror/lang-json": "^6.0.1",
|
|
38
|
-
"@codemirror/lang-python": "^6.1.3",
|
|
39
|
-
"@codemirror/language": "^6.9.1",
|
|
40
|
-
"@codemirror/legacy-modes": "^6.3.3",
|
|
41
|
-
"@codemirror/state": "^6.2.1",
|
|
42
|
-
"@codemirror/view": "^6.20.0",
|
|
43
|
-
"@lezer/common": "^1.1.0",
|
|
44
|
-
"@lezer/highlight": "^1.1.6",
|
|
45
|
-
"@lezer/lr": "^1.3.11",
|
|
46
|
-
"@uiw/codemirror-themes": "^4.21.16",
|
|
47
|
-
"codemirror": "^6.0.1",
|
|
48
|
-
"vue": "^3.3.0"
|
|
49
|
-
},
|
|
50
33
|
"devDependencies": {
|
|
51
34
|
"@vitejs/plugin-vue": "^4.4.0",
|
|
52
35
|
"@vitest/coverage-v8": "^0.34.4",
|
|
53
36
|
"tsc-alias": "^1.8.8",
|
|
54
|
-
"vite": "^4.4.
|
|
37
|
+
"vite": "^4.4.12",
|
|
55
38
|
"vitest": "^0.34.4",
|
|
39
|
+
"vue": "^3.3.0",
|
|
56
40
|
"vue-tsc": "^1.8.19"
|
|
57
41
|
},
|
|
58
42
|
"peerDependencies": {
|
|
59
|
-
"vue": "^3.3.0"
|
|
43
|
+
"vue": "^3.3.0",
|
|
44
|
+
"@codemirror/lang-html": "^6.0.0",
|
|
45
|
+
"@codemirror/lang-java": "^6.0.0",
|
|
46
|
+
"@codemirror/lang-javascript": "^6.0.0",
|
|
47
|
+
"@codemirror/lang-json": "^6.0.0",
|
|
48
|
+
"@codemirror/lang-python": "^6.0.0",
|
|
49
|
+
"@codemirror/language": "^6.0.0",
|
|
50
|
+
"@codemirror/legacy-modes": "^6.0.0",
|
|
51
|
+
"@codemirror/state": "^6.0.0",
|
|
52
|
+
"@codemirror/view": "^6.0.0",
|
|
53
|
+
"@lezer/common": "^1.1.0",
|
|
54
|
+
"@lezer/highlight": "^1.1.0",
|
|
55
|
+
"@lezer/lr": "^1.3.0",
|
|
56
|
+
"@uiw/codemirror-themes": "^4.21.0",
|
|
57
|
+
"codemirror": "^6.0.0"
|
|
60
58
|
},
|
|
61
59
|
"scripts": {
|
|
62
60
|
"build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
|