@dialecte/core 0.2.22 → 0.4.0
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 +22 -12
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/transaction/update/update.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +4 -0
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/helpers/converter.d.ts +3 -3
- package/dist/helpers/converter.d.ts.map +1 -1
- package/dist/helpers/standardizing.d.ts.map +1 -1
- package/dist/helpers.js +95 -66
- package/dist/index.js +3 -3
- package/dist/project/index.d.ts +1 -1
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/import-document.d.ts.map +1 -1
- package/dist/project/io/init-empty-document.d.ts.map +1 -1
- package/dist/project/project.d.ts +34 -4
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/types.d.ts +57 -3
- package/dist/project/types.d.ts.map +1 -1
- package/dist/{project-CbTmBW8e.js → project-CblzZXzn.js} +1673 -1610
- package/dist/store/in-memory/in-memory-store.d.ts +4 -0
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/local/dexie-store.d.ts +4 -0
- package/dist/store/local/dexie-store.d.ts.map +1 -1
- package/dist/store/store.types.d.ts +5 -0
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.d.ts +2 -2
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/run-test-cases.d.ts +2 -2
- package/dist/test/run-test-cases.d.ts.map +1 -1
- package/dist/test/run-test-cases.type.d.ts +3 -3
- package/dist/test/run-test-cases.type.d.ts.map +1 -1
- package/dist/test.js +1 -1
- package/dist/types/definition.d.ts +8 -0
- package/dist/types/definition.d.ts.map +1 -1
- package/dist/types/dialecte-config.d.ts +6 -1
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/types/io.d.ts +7 -0
- package/dist/types/io.d.ts.map +1 -1
- package/dist/utils/attribute-rules.d.ts +64 -0
- package/dist/utils/attribute-rules.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/{utils-XD-swXWn.js → utils-DgKwrT2n.js} +37 -4
- package/dist/utils.js +2 -2
- package/dist/xml/parse/parse-xml-document.types.d.ts +3 -1
- package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
- package/dist/xml/parse/parser.d.ts +2 -1
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,9 @@ import { Query } from './query';
|
|
|
2
2
|
import { Transaction } from './transaction';
|
|
3
3
|
import { PreparedTransaction, DocumentState } from './types';
|
|
4
4
|
import { AllExtensions, ExtensionsRegistry, QueryExtensions } from './types.extensions';
|
|
5
|
+
import { ProjectChannelMessage } from '../project/types';
|
|
5
6
|
import { Store } from '../store';
|
|
6
|
-
import { AnyDialecteConfig,
|
|
7
|
+
import { AnyDialecteConfig, DialecteHooks } from '../types';
|
|
7
8
|
/**
|
|
8
9
|
* Document — the public entry point for querying and mutating a dialecte.
|
|
9
10
|
*
|
|
@@ -19,22 +20,31 @@ import { AnyDialecteConfig, TransactionHooks } from '../types';
|
|
|
19
20
|
export declare class Document<GenericConfig extends AnyDialecteConfig, GenericExtension extends ExtensionsRegistry = {}> {
|
|
20
21
|
protected store: Store;
|
|
21
22
|
protected config: GenericConfig;
|
|
22
|
-
protected hooks:
|
|
23
|
+
protected hooks: DialecteHooks<GenericConfig> | undefined;
|
|
23
24
|
readonly documentId: string;
|
|
24
25
|
private extensionsRegistry?;
|
|
26
|
+
/**
|
|
27
|
+
* Observable state, shared with the owning Project's DocumentEntry.
|
|
28
|
+
* Every Document instance opened for the same documentId mutates the same
|
|
29
|
+
* object, so commits (local or folded in from other tabs by the Project)
|
|
30
|
+
* are visible to all of them without any same-tab messaging.
|
|
31
|
+
*/
|
|
25
32
|
readonly state: DocumentState;
|
|
26
|
-
/** Track concurrent transactions to manage loading flag */
|
|
27
|
-
private activeTransactions;
|
|
28
33
|
/**
|
|
29
|
-
* BroadcastChannel
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* BroadcastChannel does not deliver messages back to the sender,
|
|
34
|
-
* so no self-filter is needed.
|
|
34
|
+
* Name of the project's BroadcastChannel. Open your own instance
|
|
35
|
+
* (`new BroadcastChannel(doc.channelName)`) to receive ProjectChannelMessage
|
|
36
|
+
* events for this project, same-tab and cross-tab.
|
|
35
37
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
readonly channelName: string;
|
|
39
|
+
/** Announce a mutation on the project channel (provided by the owning Project) */
|
|
40
|
+
private notify;
|
|
41
|
+
/** Track concurrent transactions to manage loading flag */
|
|
42
|
+
private activeTransactions;
|
|
43
|
+
constructor(store: Store, config: GenericConfig, documentId: string, extensions: GenericExtension | undefined, hooks: DialecteHooks<GenericConfig> | undefined, project: {
|
|
44
|
+
state: DocumentState;
|
|
45
|
+
channelName: string;
|
|
46
|
+
notify: (message: ProjectChannelMessage) => void;
|
|
47
|
+
});
|
|
38
48
|
private withQueryExtensions;
|
|
39
49
|
private withAllExtensions;
|
|
40
50
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/document/document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC5F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["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E,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/document/transaction/update/update.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,KAAK,EACX,iBAAiB,EAGjB,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,MAAM,SAAS,CAAA;AAEhB;;;;GAIG;AACH,wBAAsB,WAAW,CAChC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,aAAa,CAAA;IAC7B,KAAK,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACvC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3B,GAAG,EAAE,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvC,MAAM,EAAE,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CACnD,GAAG,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CA0DpD"}
|
package/dist/errors/codes.d.ts
CHANGED
|
@@ -75,6 +75,10 @@ export declare const ERROR_CATALOG: {
|
|
|
75
75
|
readonly code: "D3005";
|
|
76
76
|
readonly message: "Value is already used within its scope";
|
|
77
77
|
};
|
|
78
|
+
readonly UNKNOWN_NAMESPACE_PREFIX: {
|
|
79
|
+
readonly code: "D3006";
|
|
80
|
+
readonly message: "Unknown namespace prefix on attribute — pass it explicitly as { name, namespace: { prefix, uri } }";
|
|
81
|
+
};
|
|
78
82
|
readonly ALREADY_COMMITTED: {
|
|
79
83
|
readonly code: "D4001";
|
|
80
84
|
readonly message: "Transaction already committed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/errors/codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/errors/codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJhB,CAAA"}
|
|
@@ -23,9 +23,9 @@ export declare function toTreeRecord<GenericConfig extends AnyDialecteConfig, Ge
|
|
|
23
23
|
tree?: TreeRecord<GenericConfig, GenericElement>[];
|
|
24
24
|
}): TreeRecord<GenericConfig, GenericElement>;
|
|
25
25
|
/**
|
|
26
|
-
* Converts attributes to FullAttributeObject array format
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* Converts attributes to FullAttributeObject array format and canonicalizes each
|
|
27
|
+
* attribute name to the two naming rules (see `canonicalizeAttributeName`), so
|
|
28
|
+
* records from import, create, and update share one stored name per attribute.
|
|
29
29
|
*/
|
|
30
30
|
export declare function toFullAttributeArray<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
31
31
|
dialecteConfig: GenericConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../src/helpers/converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../src/helpers/converter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EACX,SAAS,EACT,aAAa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AK,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,GAAG,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standardizing.d.ts","sourceRoot":"","sources":["../../src/helpers/standardizing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standardizing.d.ts","sourceRoot":"","sources":["../../src/helpers/standardizing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,SAAS,EACT,uBAAuB,EACvB,gBAAgB,EAChB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,iBAAiB,CAChC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,aAAa,CAAA;IAC7B,KAAK,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACvC,MAAM,EAAE;QACP,OAAO,EAAE,cAAc,CAAA;QACvB,UAAU,CAAC,EACR,uBAAuB,CAAC,aAAa,EAAE,cAAc,CAAC,GACtD,qBAAqB,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAA;KACzD,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;CACzE,GAAG,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,CA6F3C"}
|
package/dist/helpers.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, c as t, l as n, o as r, r as i, s as a } from "./utils-DgKwrT2n.js";
|
|
2
2
|
//#region src/helpers/constant.ts
|
|
3
|
-
var
|
|
3
|
+
var o = "db-id", s = {
|
|
4
4
|
uri: "http://dialecte.dev/XML/DEV",
|
|
5
5
|
prefix: "dev"
|
|
6
|
-
},
|
|
6
|
+
}, c = `${s.prefix}:${o}`, l = {
|
|
7
7
|
uri: "http://www.w3.org/2001/XMLSchema-instance",
|
|
8
8
|
prefix: "xsi"
|
|
9
|
-
},
|
|
10
|
-
dev:
|
|
11
|
-
xsi:
|
|
12
|
-
},
|
|
9
|
+
}, u = `xmlns:${l.prefix}="${l.uri}"`, d = {
|
|
10
|
+
dev: s,
|
|
11
|
+
xsi: l
|
|
12
|
+
}, f = [
|
|
13
13
|
"id",
|
|
14
14
|
"tagName",
|
|
15
15
|
"namespace",
|
|
@@ -17,42 +17,42 @@ var t = "db-id", n = {
|
|
|
17
17
|
"children",
|
|
18
18
|
"parent",
|
|
19
19
|
"value"
|
|
20
|
-
],
|
|
21
|
-
function
|
|
20
|
+
], p = [...f, "status"], m = [...p, "tree"];
|
|
21
|
+
function h(e, t) {
|
|
22
22
|
if (typeof e != "object" || !e) return !1;
|
|
23
23
|
let n = Object.keys(e);
|
|
24
24
|
return t.every((t) => t in e) && n.every((e) => t.includes(e)) && n.length === t.length;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function g(e) {
|
|
27
27
|
return Array.isArray(e);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function _(e) {
|
|
30
|
+
return h(e, f);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function v(e) {
|
|
33
|
+
return h(e, p);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function y(e) {
|
|
36
|
+
return h(e, m);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function b(e, t) {
|
|
39
39
|
return e.tagName === t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function x(e, t) {
|
|
42
42
|
return e.tagName === t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function S(e, t) {
|
|
45
45
|
return e.tagName === t;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function C(e, t) {
|
|
48
48
|
return t.elements.includes(e);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function w(e, t) {
|
|
51
51
|
return e.attributes.some((e) => e.name === t);
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/helpers/converter.ts
|
|
55
|
-
function
|
|
55
|
+
function T(e) {
|
|
56
56
|
return {
|
|
57
57
|
id: e.id,
|
|
58
58
|
tagName: e.tagName,
|
|
@@ -63,87 +63,116 @@ function b(e) {
|
|
|
63
63
|
children: e.children
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function E(e) {
|
|
67
67
|
let { record: t, status: n } = e, r = n ?? ("status" in t ? t.status : "unchanged");
|
|
68
68
|
return {
|
|
69
|
-
...
|
|
69
|
+
...T(t),
|
|
70
70
|
status: r
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function D(e) {
|
|
74
74
|
let { record: t, status: n, tree: r } = e, i = r ?? ("tree" in t ? t.tree : []);
|
|
75
75
|
return {
|
|
76
|
-
...
|
|
76
|
+
...E({
|
|
77
77
|
record: t,
|
|
78
78
|
status: n
|
|
79
79
|
}),
|
|
80
80
|
tree: i
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function O(e) {
|
|
84
84
|
let { dialecteConfig: t, tagName: n, attributes: r } = e;
|
|
85
|
-
return
|
|
85
|
+
return (g(r) ? r : Object.entries(r).map(([e, r]) => ({
|
|
86
86
|
name: e,
|
|
87
87
|
value: r,
|
|
88
88
|
namespace: t.definition[n]?.attributes.details[e]?.namespace || void 0
|
|
89
|
+
}))).map((e) => k({
|
|
90
|
+
attribute: e,
|
|
91
|
+
dialecteConfig: t,
|
|
92
|
+
tagName: n
|
|
89
93
|
}));
|
|
90
94
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
function k(r) {
|
|
96
|
+
let { attribute: i, dialecteConfig: a, tagName: o } = r, { namespace: s } = i, c = i.name.indexOf(":");
|
|
97
|
+
if (!s && c !== -1) {
|
|
98
|
+
let e = i.name.slice(0, c);
|
|
99
|
+
e !== "xmlns" && (s = t(a, e), s || n("UNKNOWN_NAMESPACE_PREFIX", {
|
|
100
|
+
detail: `Unknown namespace prefix '${e}' on attribute '${i.name}' — pass it explicitly as { name, namespace: { prefix, uri } }.`,
|
|
101
|
+
ref: { tagName: o }
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
return s && s.prefix && s.prefix !== "xmlns" ? {
|
|
105
|
+
...i,
|
|
106
|
+
name: `${s.prefix}:${e(i.name)}`,
|
|
107
|
+
namespace: s
|
|
108
|
+
} : s === i.namespace ? i : {
|
|
109
|
+
...i,
|
|
110
|
+
namespace: s
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function A(e) {
|
|
114
|
+
return i(e, { detail: "The record or ref is undefined" }), {
|
|
115
|
+
id: e.id,
|
|
116
|
+
tagName: e.tagName
|
|
95
117
|
};
|
|
96
118
|
}
|
|
97
119
|
//#endregion
|
|
98
120
|
//#region src/helpers/standardizing.ts
|
|
99
|
-
function
|
|
100
|
-
let { dialecteConfig: t, hooks: n, record:
|
|
101
|
-
tagName:
|
|
102
|
-
attributes:
|
|
121
|
+
function j(e) {
|
|
122
|
+
let { dialecteConfig: t, hooks: n, record: i } = e, { id: o, tagName: s, attributes: c, namespace: l, value: u } = i, d = o ?? crypto.randomUUID(), f = c ? O({
|
|
123
|
+
tagName: s,
|
|
124
|
+
attributes: c,
|
|
103
125
|
dialecteConfig: t
|
|
104
|
-
}) : [],
|
|
105
|
-
id:
|
|
106
|
-
tagName:
|
|
107
|
-
attributes:
|
|
108
|
-
namespace:
|
|
126
|
+
}) : [], p = {
|
|
127
|
+
id: d,
|
|
128
|
+
tagName: s,
|
|
129
|
+
attributes: f,
|
|
130
|
+
namespace: l ?? {
|
|
109
131
|
prefix: "prefixNeededForNotSupportedNamespace",
|
|
110
132
|
uri: "uriNeededForNotSupportedNamespace"
|
|
111
133
|
},
|
|
112
|
-
value:
|
|
113
|
-
parent:
|
|
114
|
-
children:
|
|
134
|
+
value: u ?? "",
|
|
135
|
+
parent: i.parent ?? null,
|
|
136
|
+
children: i.children ?? []
|
|
115
137
|
};
|
|
116
|
-
if (!t.elements.includes(
|
|
117
|
-
let
|
|
118
|
-
let
|
|
119
|
-
|
|
138
|
+
if (!t.elements.includes(s)) return p;
|
|
139
|
+
let m = t.definition[s].attributes.sequence, h = m.flatMap((e) => {
|
|
140
|
+
let n = r({
|
|
141
|
+
dialecteConfig: t,
|
|
142
|
+
tagName: s,
|
|
143
|
+
attributeName: e
|
|
144
|
+
}), i = n.fixed ?? n.default, a = f.find((t) => t.name === e)?.value ?? (n.isRequired ? i ?? "" : i);
|
|
145
|
+
return a === void 0 ? [] : [{
|
|
120
146
|
name: e,
|
|
121
|
-
value:
|
|
122
|
-
namespace: n
|
|
147
|
+
value: a,
|
|
148
|
+
namespace: n.namespace
|
|
123
149
|
}];
|
|
124
|
-
}),
|
|
125
|
-
...
|
|
126
|
-
namespace: t.definition[
|
|
127
|
-
attributes: [...
|
|
150
|
+
}), g = f.filter((e) => "namespace" in e && e.namespace != null && !m.includes(e.name)), _ = i.parent?.tagName, v = _ ? t.definition[_]?.children?.details?.[s]?.namespace : void 0, y = {
|
|
151
|
+
...p,
|
|
152
|
+
namespace: v ?? t.definition[s].namespace,
|
|
153
|
+
attributes: a([...h, ...g], m)
|
|
128
154
|
};
|
|
129
|
-
return n?.afterStandardizedRecord && (
|
|
155
|
+
return n?.afterStandardizedRecord && (y = n.afterStandardizedRecord({ record: y }), y = {
|
|
156
|
+
...y,
|
|
157
|
+
attributes: a(y.attributes, m)
|
|
158
|
+
}), y;
|
|
130
159
|
}
|
|
131
160
|
//#endregion
|
|
132
161
|
//#region src/helpers/merge-extensions.ts
|
|
133
|
-
function
|
|
134
|
-
if (!
|
|
135
|
-
let a = Object.keys(
|
|
136
|
-
|
|
162
|
+
function M(e, t, n, r) {
|
|
163
|
+
if (!e || !t) return;
|
|
164
|
+
let a = Object.keys(t).filter((t) => t in e);
|
|
165
|
+
i(a.length === 0, {
|
|
137
166
|
key: "EXTENSION_METHOD_COLLISION",
|
|
138
|
-
detail: `Module "${
|
|
167
|
+
detail: `Module "${n}" has conflicting ${r} method(s): ${a.map((e) => `"${e}"`).join(", ")}`
|
|
139
168
|
});
|
|
140
169
|
}
|
|
141
|
-
function
|
|
170
|
+
function N(e) {
|
|
142
171
|
let t = {}, n = {}, r = [...Object.entries(e.base ?? {}), ...Object.entries(e.custom ?? {})];
|
|
143
|
-
for (let [e, i] of r) i.query && (
|
|
172
|
+
for (let [e, i] of r) i.query && (M(t[e], i.query, e, "query"), t[e] = {
|
|
144
173
|
...t[e],
|
|
145
174
|
...i.query
|
|
146
|
-
}), i.transaction && (
|
|
175
|
+
}), i.transaction && (M(n[e], i.transaction, e, "transaction"), n[e] = {
|
|
147
176
|
...n[e],
|
|
148
177
|
...i.transaction
|
|
149
178
|
});
|
|
@@ -154,15 +183,15 @@ function D(e) {
|
|
|
154
183
|
}
|
|
155
184
|
//#endregion
|
|
156
185
|
//#region src/helpers/strip-attributes.ts
|
|
157
|
-
function
|
|
186
|
+
function P(e, t) {
|
|
158
187
|
let n = new Set(t), r = {
|
|
159
188
|
...e,
|
|
160
189
|
attributes: e.attributes.filter((e) => !n.has(e.name))
|
|
161
190
|
};
|
|
162
191
|
return "tree" in e ? {
|
|
163
192
|
...r,
|
|
164
|
-
tree: e.tree.map((e) =>
|
|
193
|
+
tree: e.tree.map((e) => P(e, t))
|
|
165
194
|
} : r;
|
|
166
195
|
}
|
|
167
196
|
//#endregion
|
|
168
|
-
export {
|
|
197
|
+
export { c as CUSTOM_RECORD_ID_ATTRIBUTE, o as CUSTOM_RECORD_ID_ATTRIBUTE_NAME, s as DIALECTE_DEV_NAMESPACE, d as DIALECTE_NAMESPACES, u as XMLNS_XSI_NAMESPACE, l as XSI_NAMESPACE, w as isAttributeOf, x as isChildOf, C as isElementOf, g as isFullAttributeArray, S as isParentOf, _ as isRawRecord, b as isRecordOf, v as isTrackedRecord, y as isTreeRecord, N as mergeExtensions, j as standardizeRecord, P as stripAttributes, O as toFullAttributeArray, T as toRawRecord, A as toRef, E as toTrackedRecord, D as toTreeRecord };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as A, c as j, ct as M, d as N, et as P, f as F, g as I, h as L, i as R, it as z, j as B, k as V, l as H, lt as U, m as W, n as G, nt as K, o as q, ot as J, p as Y, q as X, r as Z, rt as Q, s as $, st as ee, t as te, tt as ne, u as re, ut as ie, v as ae, w as oe, x as se, y as ce } from "./project-
|
|
2
|
-
import {
|
|
3
|
-
export { V as AnyQuery, i as AnyTransaction, N as BLOBS_SCHEMA, F as BLOB_DATA_SCHEMA, Y as CHANGELOG_SCHEMA, W as DOCUMENTS_SCHEMA, re as DexieStore, oe as Document,
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as A, c as j, ct as M, d as N, et as P, f as F, g as I, h as L, i as R, it as z, j as B, k as V, l as H, lt as U, m as W, n as G, nt as K, o as q, ot as J, p as Y, q as X, r as Z, rt as Q, s as $, st as ee, t as te, tt as ne, u as re, ut as ie, v as ae, w as oe, x as se, y as ce } from "./project-CblzZXzn.js";
|
|
2
|
+
import { l as le, u as ue } from "./utils-DgKwrT2n.js";
|
|
3
|
+
export { V as AnyQuery, i as AnyTransaction, N as BLOBS_SCHEMA, F as BLOB_DATA_SCHEMA, Y as CHANGELOG_SCHEMA, W as DOCUMENTS_SCHEMA, re as DexieStore, oe as Document, ue as ERROR_CATALOG, H as InMemoryStore, L as META_SCHEMA, p as ParseSession, te as Project, h as Query, I as TABLE_BLOBS, D as TABLE_BLOB_PREFIX, ae as TABLE_CHANGELOG, ce as TABLE_DOCUMENTS, A as TABLE_META, se as TABLE_RECORD_PREFIX, f as TEMP_IDB_ID_ATTRIBUTE_NAME, a as Transaction, C as applyOmit, x as applyOrder, u as applyUnwrap, ie as bindExtensions, y as blobTableName, R as buildDocumentState, g as buildXmlDocument, S as collectSnapshotRecords, o as downloadFile, q as exportBlob, $ as exportDocument, K as findAncestors, P as findByAttributes, e as findDescendants, v as formatXml, E as getAttribute, _ as getAttributeFullObject, T as getAttributes, w as getAttributesFullObject, z as getChild, Q as getChildren, ee as getRecord, J as getRecords, k as getRecordsByTagName, t as getSnapshot, c as getTree, Z as importDocument, M as indexStagedDeletesByParent, G as initEmptyDocument, m as inspectXml, s as isOmitted, b as isTransactionContext, ne as matchesAttributeFilter, U as overlayAllStaged, d as parseOmit, B as parseXmlFile, O as reconcileDocumentState, r as recordTableName, n as recordsToTree, j as resolveStore, X as shouldStopTraversal, le as throwDialecteError, l as xmlDocumentToString };
|
package/dist/project/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export { exportBlob } from './io/export-blob';
|
|
|
5
5
|
export { initEmptyDocument } from './io/init-empty-document';
|
|
6
6
|
export { importDocument } from './io/import-document';
|
|
7
7
|
export { resolveStore } from '../store/resolve-store';
|
|
8
|
-
export type { ProjectParams, InitEmptyDocumentOptions, ImportDocumentOptions, ExportDocumentOptions, ExportBlobOptions, StorageParam, DocumentRecord, DocumentEntry, ProjectState, } from './types';
|
|
8
|
+
export type { ProjectParams, InitEmptyDocumentOptions, ImportDocumentOptions, ExportDocumentOptions, ExportBlobOptions, StorageParam, DocumentRecord, DocumentEntry, ProjectState, ProjectChannelMessage, } from './types';
|
|
9
9
|
export type { InitEmptyDocumentParams, InitEmptyDocumentResult, ImportDocumentParams, ImportDocumentResult, ExportDocumentParams, ExportDocumentResult, ExportBlobParams, ExportBlobResult, } from './types';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,YAAY,EACX,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,YAAY,EACX,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,YAAY,EACZ,qBAAqB,GACrB,MAAM,SAAS,CAAA;AAChB,YAAY,EACX,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-document.d.ts","sourceRoot":"","sources":["../../../src/project/io/import-document.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAG1E;;;GAGG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"import-document.d.ts","sourceRoot":"","sources":["../../../src/project/io/import-document.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAG1E;;;GAGG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA4ChG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-empty-document.d.ts","sourceRoot":"","sources":["../../../src/project/io/init-empty-document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init-empty-document.d.ts","sourceRoot":"","sources":["../../../src/project/io/init-empty-document.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAkB,MAAM,UAAU,CAAA;AAGhG;;;GAGG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,uBAAuB,GAC7B,OAAO,CAAC,uBAAuB,CAAC,CA4ClC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Document, ExtensionModules, MergedExtensions, QueryExtensions, Query } from '../document';
|
|
2
2
|
import { InitEmptyDocumentOptions, ImportDocumentOptions, ExportDocumentOptions, ExportBlobOptions, ExportBlobResult, ProjectParams, ProjectState, DocumentRecord } from './types';
|
|
3
3
|
import { Store } from '../store';
|
|
4
|
-
import { AnyDialecteConfig, BlobAttachment, BlobRecord,
|
|
4
|
+
import { AnyDialecteConfig, BlobAttachment, BlobRecord, DialecteHooks } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Project — top-level entry point for multi-file dialecte workspaces.
|
|
7
7
|
*
|
|
@@ -11,7 +11,16 @@ import { AnyDialecteConfig, BlobAttachment, BlobRecord, TransactionHooks } from
|
|
|
11
11
|
export declare class Project<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericStore extends Store = Store> {
|
|
12
12
|
private _name?;
|
|
13
13
|
private _store?;
|
|
14
|
-
|
|
14
|
+
/** Posting side of the project channel. Never listened to. */
|
|
15
|
+
private _postChannel?;
|
|
16
|
+
/**
|
|
17
|
+
* Listening side of the project channel. A separate instance from
|
|
18
|
+
* _postChannel on purpose: BroadcastChannel withholds a message only from
|
|
19
|
+
* the exact instance that posted it, so this instance also receives this
|
|
20
|
+
* tab's own posts (echo) — one code path folds every mutation source,
|
|
21
|
+
* local and cross-tab, into project state.
|
|
22
|
+
*/
|
|
23
|
+
private _listenChannel?;
|
|
15
24
|
private readonly storage;
|
|
16
25
|
private configs;
|
|
17
26
|
private defaultConfigKey;
|
|
@@ -19,7 +28,20 @@ export declare class Project<GenericConfig extends AnyDialecteConfig, GenericMod
|
|
|
19
28
|
private hooks?;
|
|
20
29
|
get name(): string;
|
|
21
30
|
private get store();
|
|
22
|
-
private get
|
|
31
|
+
private get postChannel();
|
|
32
|
+
/**
|
|
33
|
+
* Name of this project's BroadcastChannel — the public event contract.
|
|
34
|
+
* Open your own instance (see createChannel) to receive every
|
|
35
|
+
* ProjectChannelMessage, same-tab and cross-tab.
|
|
36
|
+
*/
|
|
37
|
+
get channelName(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Convenience: a fresh BroadcastChannel on this project's channel.
|
|
40
|
+
* The caller owns it — call channel.close() when done listening.
|
|
41
|
+
*/
|
|
42
|
+
createChannel(): BroadcastChannel;
|
|
43
|
+
/** Post a message on the project channel. */
|
|
44
|
+
private notify;
|
|
23
45
|
readonly state: ProjectState;
|
|
24
46
|
constructor(params: {
|
|
25
47
|
configs: Record<string, GenericConfig>;
|
|
@@ -29,13 +51,21 @@ export declare class Project<GenericConfig extends AnyDialecteConfig, GenericMod
|
|
|
29
51
|
base?: ExtensionModules;
|
|
30
52
|
custom?: ExtensionModules;
|
|
31
53
|
};
|
|
32
|
-
hooks?:
|
|
54
|
+
hooks?: DialecteHooks<GenericConfig>;
|
|
33
55
|
});
|
|
34
56
|
/**
|
|
35
57
|
* Open a named project: resolve store, open DB connection, hydrate state.
|
|
36
58
|
* Must be called before import/export/openDocument.
|
|
37
59
|
*/
|
|
38
60
|
open(name: string): Promise<this>;
|
|
61
|
+
/**
|
|
62
|
+
* Fold an incoming channel message into project state. Receives this tab's
|
|
63
|
+
* own posts too (see _listenChannel), so every mutation source — local
|
|
64
|
+
* commit, other-tab commit, undo/redo — converges through this one handler.
|
|
65
|
+
*/
|
|
66
|
+
private onChannelMessage;
|
|
67
|
+
/** Recompute canUndo/canRedo for a document from the store's history. */
|
|
68
|
+
private refreshHistoryStatus;
|
|
39
69
|
/**
|
|
40
70
|
* Close the store and release resources.
|
|
41
71
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,OAAO,KAAK,EACX,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project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AAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzF,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO/C;;;OAGG;IACG,UAAU,CAAC,MAAM,EACtB,aAAa,EAAE,CACd,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,KAC3E,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GAC9B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAS9B;;;OAGG;IACG,QAAQ,CAAC,MAAM,EACpB,aAAa,EAAE,CACd,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,KAC3E,OAAO,CAAC,MAAM,EAAE,CAAC,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC;IAYpB,iHAAiH;IACjH,mBAAmB,IAAI,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;YAIxD,YAAY;CAI1B"}
|
package/dist/project/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentState, ExtensionModules } from '../document';
|
|
2
2
|
import { Store } from '../store/store.types';
|
|
3
|
-
import { AnyDialecteConfig, BlobRecord, ChunkOptions,
|
|
3
|
+
import { AnyDialecteConfig, BlobAttachment, BlobRecord, ChunkOptions, DialecteHooks } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* DocumentRecord - metadata entry for a file registered in a Project.
|
|
6
6
|
*
|
|
@@ -38,6 +38,56 @@ export type ProjectState = {
|
|
|
38
38
|
documents: Map<string, DocumentEntry>;
|
|
39
39
|
activeTransactions: number;
|
|
40
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* ProjectChannelMessage - the public event contract of a Project.
|
|
43
|
+
*
|
|
44
|
+
* Every mutation a Project or one of its Documents performs is announced on a
|
|
45
|
+
* BroadcastChannel named `project.channelName`. Open your own channel instance
|
|
46
|
+
* (`project.createChannel()`) to receive every message, same-tab and cross-tab
|
|
47
|
+
* (the spec only withholds a message from the exact instance that posted it).
|
|
48
|
+
*
|
|
49
|
+
* Payloads are structured-cloneable by construction — they cross the channel.
|
|
50
|
+
* Changing a member of this union is a breaking API change.
|
|
51
|
+
*/
|
|
52
|
+
export type ProjectChannelMessage = {
|
|
53
|
+
type: 'commit';
|
|
54
|
+
documentId: string;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'init-empty-document';
|
|
58
|
+
documentId: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'document-removed';
|
|
62
|
+
documentId: string;
|
|
63
|
+
timestamp: number;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'document-imported';
|
|
66
|
+
documentId: string;
|
|
67
|
+
timestamp: number;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'blob-added';
|
|
70
|
+
blobId: string;
|
|
71
|
+
documentId: string;
|
|
72
|
+
timestamp: number;
|
|
73
|
+
} | {
|
|
74
|
+
type: 'blob-attached';
|
|
75
|
+
blobId: string;
|
|
76
|
+
ref: BlobAttachment;
|
|
77
|
+
timestamp: number;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'blob-detached';
|
|
80
|
+
blobId: string;
|
|
81
|
+
ref: {
|
|
82
|
+
documentId: string;
|
|
83
|
+
recordRef: string;
|
|
84
|
+
};
|
|
85
|
+
timestamp: number;
|
|
86
|
+
} | {
|
|
87
|
+
type: 'blob-removed';
|
|
88
|
+
blobId: string;
|
|
89
|
+
timestamp: number;
|
|
90
|
+
};
|
|
41
91
|
export type StorageParam = {
|
|
42
92
|
type: 'local';
|
|
43
93
|
} | {
|
|
@@ -63,8 +113,8 @@ export type ProjectParams<GenericConfig extends AnyDialecteConfig, BaseExtension
|
|
|
63
113
|
base?: BaseExtensions;
|
|
64
114
|
custom?: CustomExtensions;
|
|
65
115
|
};
|
|
66
|
-
/**
|
|
67
|
-
hooks?:
|
|
116
|
+
/** All lifecycle hooks (IO + record), applied to every Document opened from this Project */
|
|
117
|
+
hooks?: DialecteHooks<GenericConfig>;
|
|
68
118
|
};
|
|
69
119
|
export type InitEmptyDocumentOptions = {
|
|
70
120
|
/** Filename without extension. Defaults to 'untitled'. */
|
|
@@ -81,6 +131,8 @@ export type InitEmptyDocumentParams = {
|
|
|
81
131
|
configs: Record<string, AnyDialecteConfig>;
|
|
82
132
|
defaultConfigKey: string;
|
|
83
133
|
options?: InitEmptyDocumentOptions;
|
|
134
|
+
/** Hooks from the Project instance (erased); standardizes the root record */
|
|
135
|
+
hooks?: DialecteHooks<AnyDialecteConfig>;
|
|
84
136
|
};
|
|
85
137
|
export type InitEmptyDocumentResult = {
|
|
86
138
|
documentId: string;
|
|
@@ -103,6 +155,8 @@ export type ImportDocumentParams = {
|
|
|
103
155
|
configs: Record<string, AnyDialecteConfig>;
|
|
104
156
|
defaultConfigKey: string;
|
|
105
157
|
options?: ImportDocumentOptions;
|
|
158
|
+
/** Hooks from the Project instance (erased); io hooks + standardization at import */
|
|
159
|
+
hooks?: DialecteHooks<AnyDialecteConfig>;
|
|
106
160
|
};
|
|
107
161
|
export type ImportDocumentResult = {
|
|
108
162
|
documentId: string;
|
|
@@ -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,
|
|
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;AA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