@kispace-io/core 0.8.0 → 0.8.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/api/index.js +2 -2
- package/dist/core/persistenceservice.d.ts +1 -1
- package/dist/core/persistenceservice.d.ts.map +1 -1
- package/dist/externals/third-party.d.ts +1 -1
- package/dist/externals/third-party.d.ts.map +1 -1
- package/dist/externals/third-party.js +6 -1
- package/dist/externals/third-party.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{k-resizable-grid-Ch3iWZaL.js → k-resizable-grid-BRDSTl_B.js} +32 -4
- package/dist/k-resizable-grid-BRDSTl_B.js.map +1 -0
- package/dist/{k-standard-layout-5Gp_163g.js → k-standard-layout-CYAphLXI.js} +2 -2
- package/dist/{k-standard-layout-5Gp_163g.js.map → k-standard-layout-CYAphLXI.js.map} +1 -1
- package/dist/parts/index.js +1 -1
- package/package.json +3 -4
- package/src/core/persistenceservice.ts +40 -9
- package/src/externals/third-party.ts +3 -2
- package/dist/k-resizable-grid-Ch3iWZaL.js.map +0 -1
package/dist/api/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D, F, a, K, S, b, T, c, W, d, e, f, g, i, h, p, t, w } from "../k-standard-layout-
|
|
2
|
-
import { C, E, H, K as K2, a as a2, b as b2, c as c2, M, P, S as S2, d as d2, e as e2, T as T2, f as f2, g as g2, h as h2, i as i2, j, k, l, m, n, o, p as p2, q, r, s, t as t2, u } from "../k-resizable-grid-
|
|
1
|
+
import { D, F, a, K, S, b, T, c, W, d, e, f, g, i, h, p, t, w } from "../k-standard-layout-CYAphLXI.js";
|
|
2
|
+
import { C, E, H, K as K2, a as a2, b as b2, c as c2, M, P, S as S2, d as d2, e as e2, T as T2, f as f2, g as g2, h as h2, i as i2, j, k, l, m, n, o, p as p2, q, r, s, t as t2, u } from "../k-resizable-grid-BRDSTl_B.js";
|
|
3
3
|
import { C as C2, a as a3, E as E2, K as K3, T as T3, b as b3, c as c3, d as d3, e as e3, f as f3, g as g3, h as h3, i as i3, p as p3, j as j2, r as r2, k as k2, s as s2, t as t3, l as l2, m as m2, u as u2, w as w2 } from "../k-icon-BZC7dQV0.js";
|
|
4
4
|
import { publish, subscribe, unsubscribe } from "../core/events.js";
|
|
5
5
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistenceservice.d.ts","sourceRoot":"","sources":["../../src/core/persistenceservice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"persistenceservice.d.ts","sourceRoot":"","sources":["../../src/core/persistenceservice.ts"],"names":[],"mappings":"AAsBA,qBAAa,kBAAkB;IACvB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzD,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAS3C;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"third-party.d.ts","sourceRoot":"","sources":["../../src/externals/third-party.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"third-party.d.ts","sourceRoot":"","sources":["../../src/externals/third-party.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,EAAE,IAAI,MAAM,CAE3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"third-party.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"third-party.js","sources":["../../src/externals/third-party.ts"],"sourcesContent":["/**\n * Third-party library re-exports\n * Centralized re-exports for commonly used third-party libraries.\n * This ensures a single source of truth for these dependencies.\n */\n\nexport function v4(): string {\n return crypto.randomUUID();\n}\n\n"],"names":[],"mappings":"AAMO,SAAS,KAAa;AAC3B,SAAO,OAAO,WAAA;AAChB;"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D, F, a, K, S, b, T, c, W, d, e, f, g, i, h, p, t, w } from "./k-standard-layout-
|
|
2
|
-
import { C, E, H, K as K2, a as a2, b as b2, c as c2, M, P, S as S2, d as d2, e as e2, T as T2, f as f2, g as g2, h as h2, i as i2, j, k, l, m, n, o, p as p2, q, r, s, t as t2, u } from "./k-resizable-grid-
|
|
1
|
+
import { D, F, a, K, S, b, T, c, W, d, e, f, g, i, h, p, t, w } from "./k-standard-layout-CYAphLXI.js";
|
|
2
|
+
import { C, E, H, K as K2, a as a2, b as b2, c as c2, M, P, S as S2, d as d2, e as e2, T as T2, f as f2, g as g2, h as h2, i as i2, j, k, l, m, n, o, p as p2, q, r, s, t as t2, u } from "./k-resizable-grid-BRDSTl_B.js";
|
|
3
3
|
import { C as C2, a as a3, E as E2, K as K3, T as T3, b as b3, c as c3, d as d3, e as e3, f as f3, g as g3, h as h3, i as i3, p as p3, j as j2, r as r2, k as k2, s as s2, t as t3, l as l2, m as m2, u as u2, w as w2 } from "./k-icon-BZC7dQV0.js";
|
|
4
4
|
import { publish, subscribe, unsubscribe } from "./core/events.js";
|
|
5
5
|
export {
|
|
@@ -8,7 +8,6 @@ import { createRef, ref } from "lit/directives/ref.js";
|
|
|
8
8
|
import { when } from "lit/directives/when.js";
|
|
9
9
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
10
|
import { marked } from "marked";
|
|
11
|
-
import { set, get } from "idb-keyval";
|
|
12
11
|
const TOOLBAR_MAIN = "app-toolbars-main";
|
|
13
12
|
const TOOLBAR_MAIN_RIGHT = "app-toolbars-main-right";
|
|
14
13
|
const TOOLBAR_MAIN_CENTER = "app-toolbars-main-center";
|
|
@@ -47,12 +46,41 @@ const constants = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
47
46
|
TOOLBAR_MAIN_CENTER,
|
|
48
47
|
TOOLBAR_MAIN_RIGHT
|
|
49
48
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
49
|
+
const DB_NAME = "appspace-persistence";
|
|
50
|
+
const STORE_NAME = "keyval";
|
|
51
|
+
const DB_VERSION = 1;
|
|
52
|
+
let dbPromise = null;
|
|
53
|
+
function getDB() {
|
|
54
|
+
if (!dbPromise) {
|
|
55
|
+
dbPromise = new Promise((resolve, reject) => {
|
|
56
|
+
const request = indexedDB.open(DB_NAME, DB_VERSION);
|
|
57
|
+
request.onerror = () => reject(request.error);
|
|
58
|
+
request.onsuccess = () => resolve(request.result);
|
|
59
|
+
request.onupgradeneeded = (e) => {
|
|
60
|
+
e.target.result.createObjectStore(STORE_NAME);
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return dbPromise;
|
|
65
|
+
}
|
|
50
66
|
class PersistenceService {
|
|
51
67
|
async persistObject(key, value) {
|
|
52
|
-
|
|
68
|
+
const db = await getDB();
|
|
69
|
+
return new Promise((resolve, reject) => {
|
|
70
|
+
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
71
|
+
const req = tx.objectStore(STORE_NAME).put(value, key);
|
|
72
|
+
req.onsuccess = () => resolve();
|
|
73
|
+
req.onerror = () => reject(req.error);
|
|
74
|
+
});
|
|
53
75
|
}
|
|
54
76
|
async getObject(key) {
|
|
55
|
-
|
|
77
|
+
const db = await getDB();
|
|
78
|
+
return new Promise((resolve, reject) => {
|
|
79
|
+
const tx = db.transaction(STORE_NAME, "readonly");
|
|
80
|
+
const req = tx.objectStore(STORE_NAME).get(key);
|
|
81
|
+
req.onsuccess = () => resolve(req.result);
|
|
82
|
+
req.onerror = () => reject(req.error);
|
|
83
|
+
});
|
|
56
84
|
}
|
|
57
85
|
}
|
|
58
86
|
const persistenceService = new PersistenceService();
|
|
@@ -3154,4 +3182,4 @@ export {
|
|
|
3154
3182
|
dialogService as x,
|
|
3155
3183
|
constants as y
|
|
3156
3184
|
};
|
|
3157
|
-
//# sourceMappingURL=k-resizable-grid-
|
|
3185
|
+
//# sourceMappingURL=k-resizable-grid-BRDSTl_B.js.map
|