@type32/codemirror-rich-obsidian-editor 0.1.6 → 0.1.8
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/module.json
CHANGED
|
@@ -19,6 +19,7 @@ type __VLS_Props = {
|
|
|
19
19
|
* Pass a CodeMirror Extension (e.g., from @codemirror/theme-one-dark)
|
|
20
20
|
*/
|
|
21
21
|
darkTheme?: Extension;
|
|
22
|
+
colorMode?: string;
|
|
22
23
|
};
|
|
23
24
|
type __VLS_ModelProps = {
|
|
24
25
|
modelValue?: string;
|
|
@@ -30,6 +31,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
30
31
|
"update:modelValue": (value: string | undefined) => any;
|
|
31
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
33
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
33
|
-
}>, {
|
|
34
|
+
}>, {
|
|
35
|
+
colorMode: string;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
37
|
declare const _default: typeof __VLS_export;
|
|
35
38
|
export default _default;
|
|
@@ -40,7 +40,8 @@ const props = defineProps({
|
|
|
40
40
|
debug: { type: Boolean, required: false },
|
|
41
41
|
searchOptions: { type: Object, required: false },
|
|
42
42
|
lightTheme: { type: [Object, Array], required: false },
|
|
43
|
-
darkTheme: { type: [Object, Array], required: false }
|
|
43
|
+
darkTheme: { type: [Object, Array], required: false },
|
|
44
|
+
colorMode: { type: String, required: false, default: "dark" }
|
|
44
45
|
});
|
|
45
46
|
const emit = defineEmits([]);
|
|
46
47
|
const extensions = shallowRef([]);
|
|
@@ -48,8 +49,7 @@ const view = shallowRef();
|
|
|
48
49
|
const ast = ref([]);
|
|
49
50
|
const languageCompartment = new Compartment();
|
|
50
51
|
const themeCompartment = new Compartment();
|
|
51
|
-
const
|
|
52
|
-
const isDark = computed(() => colorMode.value === "dark");
|
|
52
|
+
const isDark = computed(() => props.colorMode === "dark");
|
|
53
53
|
const currentTheme = computed(() => {
|
|
54
54
|
if (isDark.value) {
|
|
55
55
|
return props.darkTheme || catppuccinMocha;
|
|
@@ -19,6 +19,7 @@ type __VLS_Props = {
|
|
|
19
19
|
* Pass a CodeMirror Extension (e.g., from @codemirror/theme-one-dark)
|
|
20
20
|
*/
|
|
21
21
|
darkTheme?: Extension;
|
|
22
|
+
colorMode?: string;
|
|
22
23
|
};
|
|
23
24
|
type __VLS_ModelProps = {
|
|
24
25
|
modelValue?: string;
|
|
@@ -30,6 +31,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
30
31
|
"update:modelValue": (value: string | undefined) => any;
|
|
31
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
33
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
33
|
-
}>, {
|
|
34
|
+
}>, {
|
|
35
|
+
colorMode: string;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
37
|
declare const _default: typeof __VLS_export;
|
|
35
38
|
export default _default;
|