@septkit/ui 0.0.53 → 0.0.54
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/dialecte/composables/index.js +2 -1
- package/dist/dialecte/composables/use-document-state.js +69 -0
- package/dist/dialecte/create-document-store.js +3 -3
- package/dist/dialecte/index.js +2 -1
- package/dist/external/.pnpm/{@dialecte_core@0.4.11 → @dialecte_core@0.4.12}/node_modules/@dialecte/core/dist/helpers.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.4.11 → @dialecte_core@0.4.12}/node_modules/@dialecte/core/dist/index.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.4.11/node_modules/@dialecte/core/dist/project-BjO7cVmO.js → @dialecte_core@0.4.12/node_modules/@dialecte/core/dist/project-DkMkDgld.js} +845 -763
- package/dist/external/.pnpm/{@dialecte_core@0.4.11 → @dialecte_core@0.4.12}/node_modules/@dialecte/core/dist/utils-C5_11hqg.js +1 -1
- package/dist/external/.pnpm/{@dialecte_scl@0.3.13/node_modules/@dialecte/scl/dist/hooks-D5DJSztS.js → @dialecte_scl@0.3.14/node_modules/@dialecte/scl/dist/hooks-By65uB-0.js} +2 -2
- package/dist/external/.pnpm/{@dialecte_scl@0.3.13 → @dialecte_scl@0.3.14}/node_modules/@dialecte/scl/dist/v2019C1/index.js +3 -3
- package/dist/index.d.ts +71 -0
- package/dist/index.js +26 -23
- package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/merge/merge.service.js +2 -2
- package/dist/progress/document-progress-bar.js +5 -0
- package/dist/progress/document-progress-bar.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/progress/index.js +2 -0
- package/dist/ui.css +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useDialecteChannel as e } from "./use-dialecte-channel.js";
|
|
2
2
|
import { useLiveData as t, useProjectLiveData as n } from "./use-live-data.js";
|
|
3
3
|
import { useActiveDocument as r } from "./use-active-document.js";
|
|
4
|
-
|
|
4
|
+
import { useDocumentProgress as i, useDocumentState as a } from "./use-document-state.js";
|
|
5
|
+
export { r as useActiveDocument, e as useDialecteChannel, i as useDocumentProgress, a as useDocumentState, t as useLiveData, n as useProjectLiveData };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { onScopeDispose as e, shallowRef as t, toValue as n, watch as r } from "vue";
|
|
2
|
+
//#region lib/dialecte/composables/use-document-state.ts
|
|
3
|
+
function i(e) {
|
|
4
|
+
typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : queueMicrotask(e);
|
|
5
|
+
}
|
|
6
|
+
var a = {
|
|
7
|
+
loading: !1,
|
|
8
|
+
error: null,
|
|
9
|
+
progress: null,
|
|
10
|
+
history: [],
|
|
11
|
+
lastUpdate: null
|
|
12
|
+
};
|
|
13
|
+
function o(e) {
|
|
14
|
+
return {
|
|
15
|
+
...e,
|
|
16
|
+
progress: e.progress ? {
|
|
17
|
+
...e.progress,
|
|
18
|
+
step: e.progress.step ? { ...e.progress.step } : null
|
|
19
|
+
} : null,
|
|
20
|
+
history: [...e.history]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function s(s) {
|
|
24
|
+
let c = t(o(a)), l = 0, u = !1, d, f;
|
|
25
|
+
function p() {
|
|
26
|
+
f && (c.value = o(f.state));
|
|
27
|
+
}
|
|
28
|
+
function m(e) {
|
|
29
|
+
if (d?.(), d = void 0, f = e, !e) {
|
|
30
|
+
c.value = o(a);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
c.value = o(e.state), d = e.subscribe((e) => {
|
|
34
|
+
if (e) {
|
|
35
|
+
l++, p();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (u) return;
|
|
39
|
+
u = !0;
|
|
40
|
+
let t = l;
|
|
41
|
+
i(() => {
|
|
42
|
+
u = !1, t === l && p();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return r(() => n(s), m, { immediate: !0 }), e(() => d?.()), c;
|
|
47
|
+
}
|
|
48
|
+
function c(e) {
|
|
49
|
+
let n = s(e), i = t({
|
|
50
|
+
fraction: 0,
|
|
51
|
+
label: ""
|
|
52
|
+
}), a = 0, o = "", c = !1;
|
|
53
|
+
return r(() => n.value.progress, (e) => {
|
|
54
|
+
let t = e !== null;
|
|
55
|
+
if (t && !c && (a = 0, o = ""), c = t, e) {
|
|
56
|
+
let t = e.step && e.step.total > 0 ? e.step.current / e.step.total : 0, n = e.total > 0 ? (e.current + t) / e.total : 0;
|
|
57
|
+
a = Math.max(a, Math.min(1, Math.max(0, n))), e.label && (o = e.label);
|
|
58
|
+
}
|
|
59
|
+
i.value = {
|
|
60
|
+
fraction: a,
|
|
61
|
+
label: o
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
immediate: !0,
|
|
65
|
+
flush: "sync"
|
|
66
|
+
}), i;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { c as useDocumentProgress, s as useDocumentState };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as e } from "../external/.pnpm/@dialecte_core@0.4.
|
|
2
|
-
import {
|
|
3
|
-
import "../external/.pnpm/@dialecte_core@0.4.
|
|
1
|
+
import { r as e } from "../external/.pnpm/@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/utils-C5_11hqg.js";
|
|
2
|
+
import { pt as t } from "../external/.pnpm/@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/project-DkMkDgld.js";
|
|
3
|
+
import "../external/.pnpm/@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/index.js";
|
|
4
4
|
import { computed as n, shallowRef as r } from "vue";
|
|
5
5
|
//#region lib/dialecte/create-document-store.ts
|
|
6
6
|
function i(i) {
|
package/dist/dialecte/index.js
CHANGED
|
@@ -2,5 +2,6 @@ import { createDocumentStore as e } from "./create-document-store.js";
|
|
|
2
2
|
import { useDialecteChannel as t } from "./composables/use-dialecte-channel.js";
|
|
3
3
|
import { useLiveData as n, useProjectLiveData as r } from "./composables/use-live-data.js";
|
|
4
4
|
import { useActiveDocument as i } from "./composables/use-active-document.js";
|
|
5
|
+
import { useDocumentProgress as a, useDocumentState as o } from "./composables/use-document-state.js";
|
|
5
6
|
import "./composables/index.js";
|
|
6
|
-
export { e as createDocumentStore, i as useActiveDocument, t as useDialecteChannel, n as useLiveData, r as useProjectLiveData };
|
|
7
|
+
export { e as createDocumentStore, i as useActiveDocument, t as useDialecteChannel, a as useDocumentProgress, o as useDocumentState, n as useLiveData, r as useProjectLiveData };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, c as t, l as n, o as r, p as i, r as a, u as o } from "./utils-C5_11hqg.js";
|
|
2
|
-
//#region node_modules/.pnpm/@dialecte+core@0.4.
|
|
2
|
+
//#region node_modules/.pnpm/@dialecte+core@0.4.12/node_modules/@dialecte/core/dist/helpers.js
|
|
3
3
|
var s = "db-id", c = {
|
|
4
4
|
uri: "http://dialecte.dev/XML/DEV",
|
|
5
5
|
prefix: "dev"
|