@septkit/ui 0.0.88 → 0.0.89
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/change-id-window.js +14 -0
- package/dist/dialecte/composables/use-live-data.js +154 -31
- package/dist/dialecte/create-document-store.js +16 -7
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/dialecte-DHj8__Ch.js +7293 -0
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/helpers-Bfv2XDC-.js +351 -0
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/index.js +6 -0
- package/dist/external/.pnpm/{@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/open-connections-D59wm6nb.js → @dialecte_core@0.12.1/node_modules/@dialecte/core/dist/open-connections-ClJo0-Af.js} +2 -2
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/project-key-DD8DyQ8-.js +1751 -0
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/qname-definition-C6GUFWL8.js +56 -0
- package/dist/external/.pnpm/{@dialecte_core@0.11.0 → @dialecte_core@0.12.1}/node_modules/@dialecte/core/dist/rolldown-runtime-CYdcPHCu.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/same-json-value-boJ4pSRe.js → @dialecte_core@0.12.1/node_modules/@dialecte/core/dist/same-json-value-DTtSsGUF.js} +491 -370
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/utils-Q5zsKl3Y.js +2449 -0
- package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/utils.js +2 -0
- package/dist/external/.pnpm/@tanstack_virtual-core@3.17.3/node_modules/@tanstack/virtual-core/dist/esm/index.js +627 -0
- package/dist/external/.pnpm/@tanstack_virtual-core@3.17.3/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +31 -0
- package/dist/external/.pnpm/@tanstack_virtual-core@3.17.3/node_modules/@tanstack/virtual-core/dist/esm/utils.js +38 -0
- package/dist/external/.pnpm/@tanstack_vue-virtual@3.13.31_vue@3.5.39_typescript@5.8.3_/node_modules/@tanstack/vue-virtual/dist/esm/index.js +28 -0
- package/dist/external/.pnpm/@vueuse_core@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js +24 -2
- package/dist/index.d.ts +266 -7
- package/dist/index.js +7 -1
- package/dist/ui.css +1 -1
- package/dist/virtual/grid-aria.js +16 -0
- package/dist/virtual/grid-navigation.js +84 -0
- package/dist/virtual/index.js +6 -0
- package/dist/virtual/kept-range.js +32 -0
- package/dist/virtual/use-virtual-scroller.js +180 -0
- package/dist/virtual/virtual.constants.js +7 -0
- package/package.json +6 -4
- package/dist/external/.pnpm/@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/dialecte-Cs_XRP4I.js +0 -4426
- package/dist/external/.pnpm/@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/helpers-D8p0KiJu.js +0 -130
- package/dist/external/.pnpm/@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/index.js +0 -6
- package/dist/external/.pnpm/@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/project-key-sr4wkl2Q.js +0 -1371
- package/dist/external/.pnpm/@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/utils-Cv4oHia0.js +0 -865
- package/dist/external/.pnpm/@dialecte_core@0.11.0/node_modules/@dialecte/core/dist/utils.js +0 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region lib/dialecte/composables/change-id-window.ts
|
|
2
|
+
function e() {
|
|
3
|
+
let e = /* @__PURE__ */ new Set();
|
|
4
|
+
return {
|
|
5
|
+
isNew(t) {
|
|
6
|
+
return t === void 0 ? !0 : e.has(t) ? !1 : (e.add(t), e.size > 256 && e.delete(e.values().next().value), !0);
|
|
7
|
+
},
|
|
8
|
+
clear() {
|
|
9
|
+
e.clear();
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as createChangeIdWindow };
|
|
@@ -1,57 +1,180 @@
|
|
|
1
1
|
import { tryOnScopeDispose as e, useDebounceFn as t } from "../../external/.pnpm/@vueuse_shared@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/shared/dist/index.js";
|
|
2
2
|
import { useAsyncState as n } from "../../external/.pnpm/@vueuse_core@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js";
|
|
3
3
|
import { useDialecteChannel as r } from "./use-dialecte-channel.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createChangeIdWindow as i } from "./change-id-window.js";
|
|
5
|
+
import { computed as a, toValue as o, watch as s } from "vue";
|
|
5
6
|
//#region lib/dialecte/composables/use-live-data.ts
|
|
6
|
-
function
|
|
7
|
-
let { document: t, fetcher: n, initial:
|
|
8
|
-
|
|
9
|
-
e?.type === "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
function c(e) {
|
|
8
|
+
let { document: t, fetcher: n, initial: c, dependsOn: l } = e, { state: f, isLoading: p, error: m, refresh: h, refreshNow: g, restart: _, dropQueuedRefetch: v, joinRestart: y } = u(n, c), b = a(() => o(t)), { data: x } = r(a(() => b.value?.channelName)), S = i();
|
|
9
|
+
s(x, function(e) {
|
|
10
|
+
if (e?.type === "resync") {
|
|
11
|
+
S.clear(), h();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
e?.type !== "commit" || e.documentId !== b.value?.documentId || S.isNew(e.changeId) && d({
|
|
15
|
+
message: e,
|
|
16
|
+
dependsOn: l
|
|
17
|
+
}) && h();
|
|
18
|
+
});
|
|
19
|
+
let C;
|
|
20
|
+
s(() => b.value?.documentId, function(e) {
|
|
21
|
+
if (C = e, f.value = c, m.value = void 0, !e) {
|
|
22
|
+
v();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
_();
|
|
26
|
+
}, { immediate: !0 });
|
|
27
|
+
function w() {
|
|
28
|
+
let e = b.value?.documentId;
|
|
29
|
+
return e ? e === C ? g() : y() : Promise.resolve();
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
state: f,
|
|
33
|
+
isLoading: p,
|
|
34
|
+
error: m,
|
|
35
|
+
refresh: w
|
|
17
36
|
};
|
|
18
37
|
}
|
|
19
|
-
function
|
|
20
|
-
let { project: t, fetcher: n, initial:
|
|
21
|
-
|
|
38
|
+
function l(e) {
|
|
39
|
+
let { project: t, fetcher: n, initial: c, dependsOn: l } = e, { state: f, isLoading: p, error: m, refresh: h, refreshNow: g, restart: _, dropQueuedRefetch: v, joinRestart: y } = u(n, c), b = a(() => o(t)?.channelName), { data: x } = r(b), S = i();
|
|
40
|
+
s(x, function(e) {
|
|
22
41
|
switch (e?.type) {
|
|
23
42
|
case "commit":
|
|
43
|
+
S.isNew(e.changeId) && d({
|
|
44
|
+
message: e,
|
|
45
|
+
dependsOn: l
|
|
46
|
+
}) && h();
|
|
47
|
+
return;
|
|
48
|
+
case "resync":
|
|
49
|
+
S.clear(), h();
|
|
50
|
+
return;
|
|
24
51
|
case "init-empty-document":
|
|
25
52
|
case "document-removed":
|
|
26
53
|
case "document-imported":
|
|
27
|
-
case "document-updated":
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
case "document-updated": h();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
let C;
|
|
58
|
+
s(b, function(e) {
|
|
59
|
+
if (C = e, f.value = c, m.value = void 0, !e) {
|
|
60
|
+
v();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
_();
|
|
64
|
+
}, { immediate: !0 });
|
|
65
|
+
function w() {
|
|
66
|
+
let e = b.value;
|
|
67
|
+
return e ? e === C ? g() : y() : Promise.resolve();
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
state: f,
|
|
71
|
+
isLoading: p,
|
|
72
|
+
error: m,
|
|
73
|
+
refresh: w
|
|
36
74
|
};
|
|
37
75
|
}
|
|
38
|
-
function
|
|
76
|
+
function u(r, i) {
|
|
39
77
|
let a = !1;
|
|
40
78
|
e(() => {
|
|
41
79
|
a = !0;
|
|
42
80
|
});
|
|
43
|
-
let o =
|
|
81
|
+
let o = 0;
|
|
82
|
+
async function s() {
|
|
83
|
+
let e = o;
|
|
84
|
+
try {
|
|
85
|
+
let t = await r();
|
|
86
|
+
return e === o ? t : c.state.value;
|
|
87
|
+
} catch (t) {
|
|
88
|
+
if (e !== o) return c.state.value;
|
|
89
|
+
throw t;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let c = n(s, i, {
|
|
44
93
|
immediate: !1,
|
|
94
|
+
resetOnExecute: !1,
|
|
45
95
|
onError: (e) => {
|
|
46
96
|
a || globalThis.reportError?.(e);
|
|
47
97
|
}
|
|
48
|
-
}),
|
|
49
|
-
|
|
98
|
+
}), l, u = -1, d, p = [];
|
|
99
|
+
function m() {
|
|
100
|
+
let e = c.execute().then(() => void 0);
|
|
101
|
+
return l = e, u = o, e.then(() => h(e));
|
|
102
|
+
}
|
|
103
|
+
function h(e) {
|
|
104
|
+
if (l && l !== e) {
|
|
105
|
+
let e = l;
|
|
106
|
+
return e.then(() => h(e));
|
|
107
|
+
}
|
|
108
|
+
if (l !== e) return Promise.resolve();
|
|
109
|
+
l = void 0;
|
|
110
|
+
let t = d;
|
|
111
|
+
return d = void 0, t && a && t.resolve(), t && !a && m().then(t.resolve), Promise.resolve();
|
|
112
|
+
}
|
|
113
|
+
function g() {
|
|
114
|
+
return a ? Promise.resolve() : l ? (d ??= f(), d.promise) : m();
|
|
115
|
+
}
|
|
116
|
+
function _() {
|
|
117
|
+
let e = d ? [...p, d] : p;
|
|
118
|
+
return d = void 0, p = [], e;
|
|
119
|
+
}
|
|
120
|
+
function v() {
|
|
121
|
+
let e = _();
|
|
122
|
+
if (a) {
|
|
123
|
+
e.forEach((e) => e.resolve());
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
(u === o ? l ?? Promise.resolve() : m()).then(() => e.forEach((e) => e.resolve()));
|
|
127
|
+
}
|
|
128
|
+
function y() {
|
|
129
|
+
o++, _().forEach((e) => e.resolve());
|
|
130
|
+
}
|
|
131
|
+
let b = t(function(e) {
|
|
132
|
+
e === o && g();
|
|
133
|
+
}, 50), x = t(function(e) {
|
|
134
|
+
e === o && v();
|
|
50
135
|
}, 50);
|
|
136
|
+
function S() {
|
|
137
|
+
b(o);
|
|
138
|
+
}
|
|
139
|
+
function C() {
|
|
140
|
+
let e = f();
|
|
141
|
+
return p.push(e), e.promise;
|
|
142
|
+
}
|
|
143
|
+
function w() {
|
|
144
|
+
o++, p = _(), x(o);
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
...c,
|
|
148
|
+
refresh: S,
|
|
149
|
+
refreshNow: g,
|
|
150
|
+
restart: w,
|
|
151
|
+
dropQueuedRefetch: y,
|
|
152
|
+
joinRestart: C
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function d(e) {
|
|
156
|
+
let { message: t, dependsOn: n } = e, { changes: r, documentId: i } = t;
|
|
157
|
+
if (!n || !r || "unknown" in r) return !0;
|
|
158
|
+
if (typeof n == "function") try {
|
|
159
|
+
return n({
|
|
160
|
+
documentId: i,
|
|
161
|
+
changes: r
|
|
162
|
+
});
|
|
163
|
+
} catch (e) {
|
|
164
|
+
return globalThis.reportError?.(e), !0;
|
|
165
|
+
}
|
|
166
|
+
return [
|
|
167
|
+
r.created,
|
|
168
|
+
r.updated,
|
|
169
|
+
r.deleted
|
|
170
|
+
].some((e) => e.some((e) => n.includes(e.tagName)));
|
|
171
|
+
}
|
|
172
|
+
function f() {
|
|
173
|
+
let e = () => {};
|
|
51
174
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
175
|
+
promise: new Promise((t) => e = t),
|
|
176
|
+
resolve: e
|
|
54
177
|
};
|
|
55
178
|
}
|
|
56
179
|
//#endregion
|
|
57
|
-
export {
|
|
180
|
+
export { c as useLiveData, l as useProjectLiveData };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as e } from "../external/.pnpm/@dialecte_core@0.
|
|
2
|
-
import "../external/.pnpm/@dialecte_core@0.
|
|
3
|
-
import {
|
|
4
|
-
import "../external/.pnpm/@dialecte_core@0.
|
|
1
|
+
import { f as e } from "../external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/utils-Q5zsKl3Y.js";
|
|
2
|
+
import "../external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/utils.js";
|
|
3
|
+
import { G as t } from "../external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/dialecte-DHj8__Ch.js";
|
|
4
|
+
import "../external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/index.js";
|
|
5
5
|
import { computed as n, shallowRef as r } from "vue";
|
|
6
6
|
//#region lib/dialecte/create-document-store.ts
|
|
7
7
|
function i(i) {
|
|
@@ -10,10 +10,19 @@ function i(i) {
|
|
|
10
10
|
let d = Object.keys(l).length > 0, f = Object.keys(u).length > 0, p = d || f, m = n(() => {
|
|
11
11
|
let n = s.value;
|
|
12
12
|
if (e(n, { detail: "createDocumentStore: document accessed before hydration. Ensure hydrate() is called before consumers read document, or guard with isHydrated." }), !p) return n;
|
|
13
|
-
let r = n;
|
|
13
|
+
let r = n, i = d ? o(r.query, a(t(l, r.query), r.query)) : r.query, c = (e) => o(e, a(t(u, e), e)), m = {};
|
|
14
|
+
if (f) {
|
|
15
|
+
m.transaction = function(e, t) {
|
|
16
|
+
return r.transaction.call(r, (t) => e(c(t)), t);
|
|
17
|
+
};
|
|
18
|
+
let e = r.prepare;
|
|
19
|
+
e && (m.prepare = function(t, n) {
|
|
20
|
+
return e.call(r, (e) => t(c(e)), n);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
14
23
|
return o(r, {
|
|
15
|
-
query:
|
|
16
|
-
|
|
24
|
+
query: i,
|
|
25
|
+
...m
|
|
17
26
|
});
|
|
18
27
|
}), h = n(() => s.value !== null);
|
|
19
28
|
function g(e) {
|