@dialecte/core 0.2.6 → 0.2.8
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/document/document.d.ts +2 -2
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/index.d.ts +1 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/transaction/commit/commit.d.ts +2 -2
- package/dist/document/transaction/commit/commit.d.ts.map +1 -1
- package/dist/document/transaction/main.d.ts +3 -3
- package/dist/document/transaction/main.d.ts.map +1 -1
- package/dist/document/types.d.ts +1 -1
- package/dist/document/types.d.ts.map +1 -1
- package/dist/{index-Bza8g-6Z.js → index-1D8DELEq.js} +257 -257
- package/dist/index.js +1 -1
- package/dist/project/index.d.ts +1 -1
- package/dist/project/state/document-state.d.ts +3 -3
- package/dist/project/types.d.ts +9 -9
- package/dist/project/types.d.ts.map +1 -1
- package/dist/test.js +1 -1
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, a as t, C as r, b as o, D as i, c as n, M as A, d as c, P as E, Q as l, T as u, e as T, f as m, g as D, h as d, i as C, j as _, k as b, l as g, m as M, n as R, o as S, p as B, q as O, r as y, s as L, t as N, u as f, v as p, w as F, y as G, z as H, B as h, E as x, F as I, G as P, H as j, I as X, J as w, K as Q, L as U, N as v } from "./index-
|
|
1
|
+
import { A as s, a as t, C as r, b as o, D as i, c as n, M as A, d as c, P as E, Q as l, T as u, e as T, f as m, g as D, h as d, i as C, j as _, k as b, l as g, m as M, n as R, o as S, p as B, q as O, r as y, s as L, t as N, u as f, v as p, w as F, y as G, z as H, B as h, E as x, F as I, G as P, H as j, I as X, J as w, K as Q, L as U, N as v } from "./index-1D8DELEq.js";
|
|
2
2
|
import { E as q, t as z } from "./index-DWV6tSGF.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AnyQuery,
|
package/dist/project/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export { exportDocument } from './io/export-document';
|
|
|
4
4
|
export { initEmptyDocument } from './io/init-empty-document';
|
|
5
5
|
export { importDocument } from './io/import-document';
|
|
6
6
|
export { resolveStore } from '../store/resolve-store';
|
|
7
|
-
export type { ProjectParams, InitEmptyDocumentOptions, ImportDocumentOptions, ExportDocumentOptions, StorageParam, DocumentRecord,
|
|
7
|
+
export type { ProjectParams, InitEmptyDocumentOptions, ImportDocumentOptions, ExportDocumentOptions, StorageParam, DocumentRecord, DocumentEntry, ProjectState, } from './types';
|
|
8
8
|
export type { InitEmptyDocumentParams, InitEmptyDocumentResult, ImportDocumentParams, ImportDocumentResult, ExportDocumentParams, ExportDocumentResult, } from './types';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentEntry, DocumentRecord } from '..';
|
|
2
2
|
/**
|
|
3
3
|
* Build the initial DocumentState for a newly registered document.
|
|
4
4
|
*/
|
|
5
|
-
export declare function buildDocumentState(document: DocumentRecord):
|
|
5
|
+
export declare function buildDocumentState(document: DocumentRecord): DocumentEntry;
|
|
6
6
|
/**
|
|
7
7
|
* Reconcile in-memory document state Map with the current store contents.
|
|
8
8
|
* Adds new documents, removes stale ones. Returns the mutated map for convenience.
|
|
9
9
|
*/
|
|
10
|
-
export declare function reconcileDocumentState(state: Map<string,
|
|
10
|
+
export declare function reconcileDocumentState(state: Map<string, DocumentEntry>, storeDocuments: DocumentRecord[]): Map<string, DocumentEntry>;
|
|
11
11
|
//# sourceMappingURL=document-state.d.ts.map
|
package/dist/project/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentState, ExtensionModules } from '../document';
|
|
2
2
|
import { Store } from '../store/store.types';
|
|
3
3
|
import { AnyDialecteConfig, ChunkOptions, TransactionHooks } from '../types';
|
|
4
4
|
/**
|
|
@@ -23,10 +23,10 @@ export type DocumentRecord = {
|
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* DocumentState - observable state for a single document within a Project.
|
|
26
|
-
* Extends
|
|
26
|
+
* Extends DocumentState with project-level fields.
|
|
27
27
|
*/
|
|
28
|
-
export type
|
|
29
|
-
|
|
28
|
+
export type DocumentEntry = DocumentState & {
|
|
29
|
+
record: DocumentRecord;
|
|
30
30
|
canUndo: boolean;
|
|
31
31
|
canRedo: boolean;
|
|
32
32
|
};
|
|
@@ -35,7 +35,7 @@ export type DocumentState = DocumentActivity & {
|
|
|
35
35
|
* In Vue: reactive(project.state) makes all fields trigger re-renders.
|
|
36
36
|
*/
|
|
37
37
|
export type ProjectState = {
|
|
38
|
-
documents: Map<string,
|
|
38
|
+
documents: Map<string, DocumentEntry>;
|
|
39
39
|
activeTransactions: number;
|
|
40
40
|
};
|
|
41
41
|
export type StorageParam = {
|
|
@@ -81,8 +81,8 @@ export type InitEmptyDocumentParams = {
|
|
|
81
81
|
};
|
|
82
82
|
export type InitEmptyDocumentResult = {
|
|
83
83
|
documentId: string;
|
|
84
|
-
|
|
85
|
-
documentState:
|
|
84
|
+
record: DocumentRecord;
|
|
85
|
+
documentState: DocumentEntry;
|
|
86
86
|
};
|
|
87
87
|
export type ImportDocumentOptions = {
|
|
88
88
|
/** Key into configs registry. Defaults to defaultConfigKey. */
|
|
@@ -103,8 +103,8 @@ export type ImportDocumentParams = {
|
|
|
103
103
|
};
|
|
104
104
|
export type ImportDocumentResult = {
|
|
105
105
|
documentId: string;
|
|
106
|
-
|
|
107
|
-
documentState:
|
|
106
|
+
record: DocumentRecord;
|
|
107
|
+
documentState: DocumentEntry;
|
|
108
108
|
recordCount: number;
|
|
109
109
|
};
|
|
110
110
|
export type ExportDocumentParams = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
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DAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;IACpC,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC1C,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;IACtB,aAAa,EAAE,aAAa,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;CACnB,CAAA;AAID,MAAM,MAAM,oBAAoB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC1C,KAAK,EAAE,KAAK,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IACnC,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA"}
|
package/dist/test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect as m, it as p } from "vitest";
|
|
2
|
-
import { x as D, D as w, P as L } from "./index-
|
|
2
|
+
import { x as D, D as w, P as L } from "./index-1D8DELEq.js";
|
|
3
3
|
import { D as T, s as g, o as O, n as M } from "./merge-extensions-dj7By9gG.js";
|
|
4
4
|
function v(B) {
|
|
5
5
|
const e = k(B);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/xml/parse/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAO9C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,SAAS,CAAA;AAC1D,OAAO,KAAK,EAEX,iBAAiB,EAMjB,MAAM,SAAS,CAAA;AAIhB;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IACpC,cAAc,EAAE,iBAAiB,CAAA;IACjC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACrB,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/xml/parse/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAO9C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,SAAS,CAAA;AAC1D,OAAO,KAAK,EAEX,iBAAiB,EAMjB,MAAM,SAAS,CAAA;AAIhB;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IACpC,cAAc,EAAE,iBAAiB,CAAA;IACjC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACrB,GAAG,cAAc,CA4DjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialecte/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Dialecte - Core functionality for Dialecte SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"dexie": "4.2.0",
|
|
55
|
-
"pyodide": "^0.29.3",
|
|
56
55
|
"sax": "^1.4.3",
|
|
57
56
|
"xml-formatter": "^3.6.7"
|
|
58
57
|
},
|