@mce/bigesj 0.18.0 → 0.18.1
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/composables/useFonts.d.ts +2 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Editor } from 'mce';
|
|
1
2
|
import type { FontLoadedResult } from 'modern-font';
|
|
2
3
|
export type BigeFont = Record<string, any>;
|
|
3
|
-
export declare function useFonts(): {
|
|
4
|
+
export declare function useFonts(editor?: Editor): {
|
|
4
5
|
bigeFonts: import("vue").Ref<BigeFont[], BigeFont[]>;
|
|
5
6
|
searchBigeFont: (keyword: string, fonts?: BigeFont[]) => BigeFont | undefined;
|
|
6
7
|
loadBigeFonts: (url: string, init?: boolean) => Promise<BigeFont[]>;
|
package/dist/index.js
CHANGED
|
@@ -16,8 +16,8 @@ function levenshteinDistance(a, b) {
|
|
|
16
16
|
}
|
|
17
17
|
return matrix[b.length][a.length];
|
|
18
18
|
}
|
|
19
|
-
function useFonts() {
|
|
20
|
-
const { http, loadFont: baseLoadFont } = useEditor();
|
|
19
|
+
function useFonts(editor) {
|
|
20
|
+
const { http, loadFont: baseLoadFont } = editor ?? useEditor();
|
|
21
21
|
async function loadBigeFonts(url, init = false) {
|
|
22
22
|
let result = bigeFonts.value;
|
|
23
23
|
if (!init || !result.length) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mce/bigesj",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.1",
|
|
5
5
|
"description": "Plugin for mce",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"modern-openxml": "^1.10.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"mce": "0.18.
|
|
52
|
+
"mce": "0.18.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"mce": "^0"
|