@septkit/ui 0.0.29 → 0.0.30
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/create-document-store.js +32 -13
- package/dist/external/.pnpm/@dialecte_core@0.2.15/node_modules/@dialecte/core/dist/helpers.js +5 -0
- package/dist/external/.pnpm/@dialecte_core@0.2.15/node_modules/@dialecte/core/dist/index.js +2 -0
- package/dist/external/.pnpm/@dialecte_core@0.2.15/node_modules/@dialecte/core/dist/project-BOM3Ipbu.js +4886 -0
- package/dist/external/.pnpm/{@dialecte_core@0.2.12/node_modules/@dialecte/core/dist/index-BgyMtFE-.js → @dialecte_core@0.2.15/node_modules/@dialecte/core/dist/utils-B_-lXlpE.js} +14 -2
- package/dist/index.d.ts +50 -20
- package/package.json +2 -2
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as e } from "../external/.pnpm/@dialecte_core@0.2.15/node_modules/@dialecte/core/dist/utils-B_-lXlpE.js";
|
|
2
|
+
import { b as t } from "../external/.pnpm/@dialecte_core@0.2.15/node_modules/@dialecte/core/dist/project-BOM3Ipbu.js";
|
|
3
|
+
import "../external/.pnpm/@dialecte_core@0.2.15/node_modules/@dialecte/core/dist/index.js";
|
|
4
|
+
import { computed as n, shallowRef as r } from "vue";
|
|
3
5
|
//#region lib/dialecte/create-document-store.ts
|
|
4
|
-
function
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function i(i) {
|
|
7
|
+
let o = r(null), s = i?.extensions, c = {}, l = {};
|
|
8
|
+
if (s) for (let [e, t] of Object.entries(s)) t.query && (c[e] = t.query), t.transaction && (l[e] = t.transaction);
|
|
9
|
+
let u = Object.keys(c).length > 0, d = Object.keys(l).length > 0, f = u || d, p = n(() => {
|
|
10
|
+
let n = o.value;
|
|
11
|
+
if (e(n, { detail: "createDocumentStore: document accessed before hydration. Ensure hydrate() is called before consumers read document, or guard with isHydrated." }), !f) return n;
|
|
12
|
+
let r = n;
|
|
13
|
+
return a(r, {
|
|
14
|
+
query: u ? a(r.query, t(c, r.query)) : r.query,
|
|
15
|
+
transaction: d ? (e) => r.transaction((n) => e(a(n, t(l, n)))) : r.transaction
|
|
16
|
+
});
|
|
17
|
+
}), m = n(() => o.value !== null);
|
|
18
|
+
function h(e) {
|
|
19
|
+
o.value = e;
|
|
8
20
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
21
|
+
function g() {
|
|
22
|
+
o.value = null;
|
|
11
23
|
}
|
|
12
24
|
return {
|
|
13
|
-
document:
|
|
14
|
-
isHydrated:
|
|
15
|
-
hydrate:
|
|
16
|
-
clear:
|
|
25
|
+
document: p,
|
|
26
|
+
isHydrated: m,
|
|
27
|
+
hydrate: h,
|
|
28
|
+
clear: g
|
|
17
29
|
};
|
|
18
30
|
}
|
|
31
|
+
function a(e, t) {
|
|
32
|
+
return new Proxy(e, { get(n, r) {
|
|
33
|
+
if (r in t) return t[r];
|
|
34
|
+
let i = Reflect.get(e, r, e);
|
|
35
|
+
return typeof i == "function" ? i.bind(e) : i;
|
|
36
|
+
} });
|
|
37
|
+
}
|
|
19
38
|
//#endregion
|
|
20
|
-
export {
|
|
39
|
+
export { i as createDocumentStore };
|