@scalar/use-codemirror 0.5.1 → 0.5.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeMirror/CodeMirror.vue.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AA4DlD,KAAK,QAAQ,GACT,OAAO,GACP,GAAG,GACH,SAAS,GACT,QAAQ,GACR,IAAI,GACJ,MAAM,GACN,MAAM,GACN,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,GAAG,GACH,MAAM,GACN,OAAO,GACP,OAAO,GACP,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeMirror/CodeMirror.vue.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AA4DlD,KAAK,QAAQ,GACT,OAAO,GACP,GAAG,GACH,SAAS,GACT,QAAQ,GACR,IAAI,GACJ,MAAM,GACN,MAAM,GACN,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,GAAG,GACH,MAAM,GACN,OAAO,GACP,OAAO,GACP,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LT,wBAAkD"}
|
package/dist/index.js
CHANGED
|
@@ -8340,7 +8340,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8340
8340
|
extensions.push(EditorView$1.editorAttributes.of({ class: classes.join(" ") }));
|
|
8341
8341
|
if (props.extensions) {
|
|
8342
8342
|
props.extensions.forEach((extension) => {
|
|
8343
|
-
extensions.push(extension);
|
|
8343
|
+
extensions.push(toRaw(extension));
|
|
8344
8344
|
});
|
|
8345
8345
|
}
|
|
8346
8346
|
if (props.readOnly) {
|
|
@@ -8392,7 +8392,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8392
8392
|
);
|
|
8393
8393
|
return extensions;
|
|
8394
8394
|
};
|
|
8395
|
-
const {
|
|
8395
|
+
const {
|
|
8396
|
+
codeMirrorRef,
|
|
8397
|
+
setCodeMirrorContent,
|
|
8398
|
+
reconfigureCodeMirror,
|
|
8399
|
+
restartCodeMirror
|
|
8400
|
+
} = useCodeMirror({
|
|
8396
8401
|
content: props.content ?? "",
|
|
8397
8402
|
extensions: getCodeMirrorExtensions(),
|
|
8398
8403
|
withoutTheme: props.withoutTheme,
|
|
@@ -8402,6 +8407,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8402
8407
|
setCodeMirrorContent(props.content ?? "");
|
|
8403
8408
|
reconfigureCodeMirror(getCodeMirrorExtensions());
|
|
8404
8409
|
});
|
|
8410
|
+
watch(
|
|
8411
|
+
() => props.extensions,
|
|
8412
|
+
() => {
|
|
8413
|
+
restartCodeMirror(getCodeMirrorExtensions());
|
|
8414
|
+
}
|
|
8415
|
+
);
|
|
8405
8416
|
__expose({
|
|
8406
8417
|
setCodeMirrorContent
|
|
8407
8418
|
});
|