mce 0.15.11 → 0.15.12
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/index.js +7 -1
- package/dist/mixins/0.context.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -892,6 +892,7 @@ const _0_context = defineMixin((editor) => {
|
|
|
892
892
|
const drawboardPointer = ref();
|
|
893
893
|
const drawboardContextMenuPointer = ref();
|
|
894
894
|
const doc = ref(new Doc());
|
|
895
|
+
const docLoading = ref(false);
|
|
895
896
|
const root = computed(() => doc.value.root);
|
|
896
897
|
const nodes = ref([]);
|
|
897
898
|
const nodeIndexMap = reactive(/* @__PURE__ */ new Map());
|
|
@@ -965,6 +966,7 @@ const _0_context = defineMixin((editor) => {
|
|
|
965
966
|
camera,
|
|
966
967
|
drawboardEffect,
|
|
967
968
|
doc,
|
|
969
|
+
docLoading,
|
|
968
970
|
root,
|
|
969
971
|
nodes,
|
|
970
972
|
nodeIndexMap,
|
|
@@ -2851,6 +2853,7 @@ const _4_3_element = defineMixin((editor) => {
|
|
|
2851
2853
|
const _4_4_doc = defineMixin((editor, options) => {
|
|
2852
2854
|
const {
|
|
2853
2855
|
doc,
|
|
2856
|
+
docLoading,
|
|
2854
2857
|
renderEngine,
|
|
2855
2858
|
emit,
|
|
2856
2859
|
selection,
|
|
@@ -2922,13 +2925,16 @@ const _4_4_doc = defineMixin((editor, options) => {
|
|
|
2922
2925
|
return _doc;
|
|
2923
2926
|
};
|
|
2924
2927
|
const loadDoc = async (source) => {
|
|
2928
|
+
docLoading.value = true;
|
|
2925
2929
|
emit("docLoading", source);
|
|
2926
2930
|
try {
|
|
2927
2931
|
const _doc = await setDoc(await load(source));
|
|
2928
2932
|
emit("docLoaded", source, _doc);
|
|
2933
|
+
docLoading.value = false;
|
|
2929
2934
|
return _doc;
|
|
2930
2935
|
} catch (err) {
|
|
2931
2936
|
emit("docLoaded", source, err);
|
|
2937
|
+
docLoading.value = false;
|
|
2932
2938
|
throw err;
|
|
2933
2939
|
}
|
|
2934
2940
|
};
|
|
@@ -5179,7 +5185,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5179
5185
|
if (node.foreground.isValid() && node.foreground.image) {
|
|
5180
5186
|
value = t("image");
|
|
5181
5187
|
} else if (node.text.isValid()) {
|
|
5182
|
-
value = node.text.
|
|
5188
|
+
value = node.text.textContent;
|
|
5183
5189
|
}
|
|
5184
5190
|
}
|
|
5185
5191
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.12",
|
|
5
5
|
"description": "The headless canvas editor framework. only the ESM.",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"diff": "^8.0.2",
|
|
62
62
|
"file-saver": "^2.0.5",
|
|
63
63
|
"lodash-es": "^4.17.22",
|
|
64
|
-
"modern-canvas": "^0.14.
|
|
64
|
+
"modern-canvas": "^0.14.26",
|
|
65
65
|
"modern-font": "^0.4.4",
|
|
66
66
|
"modern-idoc": "^0.10.8",
|
|
67
67
|
"modern-text": "^1.10.7",
|