@dialecte/core 0.2.11 → 0.2.12

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/index.js CHANGED
@@ -1,48 +1,49 @@
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-BdP_eGXx.js";
2
- import { E as q, t as z } from "./index-DWV6tSGF.js";
1
+ import { A as s, a as t, C as r, b as o, D as n, c as i, I as A, M as c, d as E, P as l, Q as m, T as u, e as T, f as D, g as d, h as C, i as _, j as b, k as g, l as M, m as S, n as O, o as R, p as y, q as B, r as L, s as N, t as f, u as p, v as F, w as G, y as H, z as I, B as h, E as x, F as P, G as j, H as X, J as w, K as Q, L as U, N as v, O as k } from "./index-Bvh3Qxyf.js";
2
+ import { E as z, t as J } from "./index-BgyMtFE-.js";
3
3
  export {
4
4
  s as AnyQuery,
5
5
  t as AnyTransaction,
6
6
  r as CHANGELOG_SCHEMA,
7
7
  o as DOCUMENTS_SCHEMA,
8
- i as DexieStore,
9
- n as Document,
10
- q as ERROR_CATALOG,
11
- A as META_SCHEMA,
12
- c as ParseSession,
13
- E as Project,
14
- l as Query,
8
+ n as DexieStore,
9
+ i as Document,
10
+ z as ERROR_CATALOG,
11
+ A as InMemoryStore,
12
+ c as META_SCHEMA,
13
+ E as ParseSession,
14
+ l as Project,
15
+ m as Query,
15
16
  u as TABLE_CHANGELOG,
16
17
  T as TABLE_DOCUMENTS,
17
- m as TABLE_META,
18
- D as TABLE_RECORD_PREFIX,
19
- d as TEMP_IDB_ID_ATTRIBUTE_NAME,
20
- C as Transaction,
21
- _ as buildDocumentState,
22
- b as buildXmlDocument,
23
- g as downloadFile,
24
- M as exportDocument,
25
- R as findAncestors,
26
- S as findByAttributes,
27
- B as findDescendants,
28
- O as formatXml,
29
- y as getAttribute,
30
- L as getAttributeFullObject,
31
- N as getAttributes,
32
- f as getAttributesFullObject,
33
- p as getChild,
34
- F as getChildren,
35
- G as getRecord,
36
- H as getRecords,
18
+ D as TABLE_META,
19
+ d as TABLE_RECORD_PREFIX,
20
+ C as TEMP_IDB_ID_ATTRIBUTE_NAME,
21
+ _ as Transaction,
22
+ b as buildDocumentState,
23
+ g as buildXmlDocument,
24
+ M as downloadFile,
25
+ S as exportDocument,
26
+ O as findAncestors,
27
+ R as findByAttributes,
28
+ y as findDescendants,
29
+ B as formatXml,
30
+ L as getAttribute,
31
+ N as getAttributeFullObject,
32
+ f as getAttributes,
33
+ p as getAttributesFullObject,
34
+ F as getChild,
35
+ G as getChildren,
36
+ H as getRecord,
37
+ I as getRecords,
37
38
  h as getRecordsByTagName,
38
39
  x as getTree,
39
- I as importDocument,
40
- P as initEmptyDocument,
41
- j as isTransactionContext,
42
- X as matchesAttributeFilter,
43
- w as parseXmlFile,
44
- Q as reconcileDocumentState,
45
- U as recordTableName,
46
- v as resolveStore,
47
- z as throwDialecteError
40
+ P as importDocument,
41
+ j as initEmptyDocument,
42
+ X as isTransactionContext,
43
+ w as matchesAttributeFilter,
44
+ Q as parseXmlFile,
45
+ U as reconcileDocumentState,
46
+ v as recordTableName,
47
+ k as resolveStore,
48
+ J as throwDialecteError
48
49
  };
@@ -1,4 +1,4 @@
1
- import { i as E } from "./index-DWV6tSGF.js";
1
+ import { i as E } from "./index-BgyMtFE-.js";
2
2
  const D = "db-id", v = {
3
3
  uri: "http://dialecte.dev/XML/DEV",
4
4
  prefix: "dev"
@@ -43,6 +43,9 @@ export type StorageParam = {
43
43
  } | {
44
44
  type: 'custom';
45
45
  store: Store;
46
+ } | {
47
+ type: 'inMemory';
48
+ writable?: boolean;
46
49
  };
47
50
  export type ProjectParams<GenericConfig extends AnyDialecteConfig, BaseExtensions extends ExtensionModules = Record<never, never>, CustomExtensions extends ExtensionModules = Record<never, never>> = {
48
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAIhF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAA;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,CAAA;AAID;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG;IAC3C,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CAChB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACrC,kBAAkB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAID,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAA;AAI/E,MAAM,MAAM,aAAa,CACxB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,gBAAgB,GA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AAC,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"}
@@ -0,0 +1,54 @@
1
+ import { Store, ChangeLogEntry } from '../store.types';
2
+ import { InMemoryStoreOptions } from './types';
3
+ import { DocumentRecord } from '../../project/types';
4
+ import { AnyRawRecord, RecordPatch } from '../../types';
5
+ /**
6
+ * InMemoryStore - Map-backed Store implementation with no persistence.
7
+ *
8
+ * Use cases:
9
+ * - Null-object document placeholder (writable: false)
10
+ * - Test fixtures (writable: true)
11
+ * - Demos and playground (writable: true)
12
+ *
13
+ * When writable is false, any mutation throws STORE_NOT_WRITABLE.
14
+ * Reads always return empty results.
15
+ */
16
+ export declare class InMemoryStore implements Store {
17
+ readonly name: string;
18
+ private readonly writable;
19
+ private documents;
20
+ private records;
21
+ private changelog;
22
+ private heads;
23
+ constructor(name: string, options?: InMemoryStoreOptions);
24
+ open(): Promise<void>;
25
+ close(): void;
26
+ destroy(): Promise<void>;
27
+ registerDocument(file: DocumentRecord): Promise<void>;
28
+ getDocument(documentId: string): Promise<DocumentRecord | undefined>;
29
+ getDocuments(): Promise<DocumentRecord[]>;
30
+ updateDocument(documentId: string, updates: Partial<Pick<DocumentRecord, 'name' | 'metadata'>>): Promise<void>;
31
+ removeDocument(documentId: string): Promise<void>;
32
+ get(id: string, documentId?: string): Promise<AnyRawRecord | undefined>;
33
+ getByDocumentId(documentId: string): Promise<AnyRawRecord[]>;
34
+ getByTagNameInDocument(tagName: string, documentId: string): Promise<AnyRawRecord[]>;
35
+ bulkWrite(documentId: string, ops: {
36
+ creates?: AnyRawRecord[];
37
+ updates?: RecordPatch[];
38
+ deletes?: string[];
39
+ }): Promise<void>;
40
+ commit(params: {
41
+ documentId: string;
42
+ creates: AnyRawRecord[];
43
+ updates: AnyRawRecord[];
44
+ deletes: string[];
45
+ onProgress: (current: number, total: number) => void;
46
+ }): Promise<void>;
47
+ undo(documentId: string): Promise<void>;
48
+ redo(documentId: string): Promise<void>;
49
+ getChangeLog(documentId: string): Promise<ChangeLogEntry[]>;
50
+ getDatabaseInstance(): unknown;
51
+ private getTable;
52
+ private guardWritable;
53
+ }
54
+ //# sourceMappingURL=in-memory-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-store.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/in-memory-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAiB,MAAM,gB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5D,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUpF,SAAS,CACd,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE;QAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAC5E,OAAO,CAAC,IAAI,CAAC;IAgDV,MAAM,CAAC,MAAM,EAAE;QACpB,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,YAAY,EAAE,CAAA;QACvB,OAAO,EAAE,YAAY,EAAE,CAAA;QACvB,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KACpD,GAAG,OAAO,CAAC,IAAI,CAAC;IA0DX,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBvC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBvC,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIjE,mBAAmB,IAAI,OAAO;IAM9B,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,aAAa;CAOrB"}
@@ -0,0 +1,3 @@
1
+ export { InMemoryStore } from './in-memory-store';
2
+ export type { InMemoryStoreOptions } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type InMemoryStoreOptions = {
2
+ /** When false, mutations throw STORE_NOT_WRITABLE. Default: true */
3
+ writable?: boolean;
4
+ };
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IAClC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export type { Store, ChangeLogEntry, ChangeLogMeta, RecordSchema } from './store.types';
2
2
  export * from './local';
3
+ export * from './in-memory';
3
4
  export { TABLE_DOCUMENTS, TABLE_CHANGELOG, TABLE_META, TABLE_RECORD_PREFIX, recordTableName, DOCUMENTS_SCHEMA, CHANGELOG_SCHEMA, META_SCHEMA, } from './store.constants';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACvF,cAAc,SAAS,CAAA;AACvB,OAAO,EACN,eAAe,EACf,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GACX,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACvF,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,OAAO,EACN,eAAe,EACf,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GACX,MAAM,mBAAmB,CAAA"}
@@ -3,7 +3,8 @@ import { Store } from '.';
3
3
  import { AnyDialecteConfig } from '../types';
4
4
  /**
5
5
  * Resolve the Store instance from open params.
6
- * 'local' creates a DexieStore; 'custom' passes through the user-provided store.
6
+ * 'local' creates a DexieStore; 'inMemory' creates an InMemoryStore;
7
+ * 'custom' passes through the user-provided store.
7
8
  */
8
9
  export declare function resolveStore<GenericConfig extends AnyDialecteConfig>(name: string, storage: StorageParam, config: GenericConfig): Store;
9
10
  //# sourceMappingURL=resolve-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-store.d.ts","sourceRoot":"","sources":["../../src/store/resolve-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,aAAa,SAAS,iBAAiB,EACnE,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,aAAa,GACnB,KAAK,CAMP"}
1
+ {"version":3,"file":"resolve-store.d.ts","sourceRoot":"","sources":["../../src/store/resolve-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,aAAa,SAAS,iBAAiB,EACnE,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,aAAa,GACnB,KAAK,CASP"}
package/dist/test.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { expect as m, it as p } from "vitest";
2
- import { x as L, D as T, P as w } from "./index-BdP_eGXx.js";
3
- import { D as g, s as O, o as M, n as k } from "./merge-extensions-dj7By9gG.js";
2
+ import { x as L, D as T, P as w } from "./index-Bvh3Qxyf.js";
3
+ import { D as g, s as O, o as M, n as k } from "./merge-extensions-CU05iRtz.js";
4
4
  function E(a) {
5
5
  const e = R(a);
6
6
  if (e.length === 0)
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as r } from "./index-DWV6tSGF.js";
1
+ import { i as r } from "./index-BgyMtFE-.js";
2
2
  export {
3
3
  r as invariant
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialecte/core",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Dialecte - Core functionality for Dialecte SDK",
5
5
  "license": "MIT",
6
6
  "repository": {