@dialecte/core 0.2.18 → 0.2.20

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,3 +1,3 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, T as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as E, a as D, b as O, c as k, d as A, f as j, g as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, q as V, r as H, s as U, t as W, u as G, v as K, w as q, x as J, y as Y, z as X } from "./project-BLDf8nj6.js";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, T as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as E, a as D, b as O, c as k, d as A, f as j, g as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, q as V, r as H, s as U, t as W, u as G, v as K, w as q, x as J, y as Y, z as X } from "./project-B6LoveZA.js";
2
2
  import { i as Z, r as Q } from "./utils-CmyVTqDb.js";
3
3
  export { d as AnyQuery, a as AnyTransaction, Y as BLOBS_SCHEMA, O as BLOB_DATA_SCHEMA, J as CHANGELOG_SCHEMA, v as DOCUMENTS_SCHEMA, K as DexieStore, f as Document, Z as ERROR_CATALOG, E as InMemoryStore, n as META_SCHEMA, I as ParseSession, W as Project, c as Query, q as TABLE_BLOBS, y as TABLE_BLOB_PREFIX, i as TABLE_CHANGELOG, r as TABLE_DOCUMENTS, m as TABLE_META, F as TABLE_RECORD_PREFIX, B as TEMP_IDB_ID_ATTRIBUTE_NAME, h as Transaction, g as bindExtensions, e as blobTableName, N as buildDocumentState, A as buildXmlDocument, j as downloadFile, z as exportBlob, U as exportDocument, u as findAncestors, S as findByAttributes, b as findDescendants, L as formatXml, x as getAttribute, s as getAttributeFullObject, X as getAttributes, t as getAttributesFullObject, l as getChild, V as getChildren, T as getRecord, C as getRecords, w as getRecordsByTagName, _ as getTree, H as importDocument, R as initEmptyDocument, G as inspectXml, p as isTransactionContext, o as matchesAttributeFilter, k as parseXmlFile, D as reconcileDocumentState, P as recordTableName, M as resolveStore, Q as throwDialecteError };
@@ -7158,10 +7158,11 @@ function jt(e, n) {
7158
7158
  if (!r.has(n)) return;
7159
7159
  let a = {};
7160
7160
  for (let e of Object.values(t.attributes)) {
7161
- let t = e.prefix ? e.local : e.name;
7161
+ let t = e.prefix === "xmlns" && e.local === "" ? "xmlns" : e.prefix ? e.local : e.name;
7162
7162
  a[t] = e.value;
7163
7163
  }
7164
7164
  i[n] = {
7165
+ namespace: t.uri,
7165
7166
  attributes: a,
7166
7167
  value: "",
7167
7168
  children: []
@@ -7329,7 +7330,7 @@ function Bt(e) {
7329
7330
  uri: e.uri
7330
7331
  } : void 0;
7331
7332
  return {
7332
- name: t ? e.local : e.name,
7333
+ name: e.prefix === "xmlns" && e.local === "" ? "xmlns" : t ? e.local : e.name,
7333
7334
  value: e.value,
7334
7335
  ...t && { namespace: t }
7335
7336
  };
package/dist/test.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, h as t, t as n, v as r } from "./project-BLDf8nj6.js";
1
+ import { $ as e, h as t, t as n, v as r } from "./project-B6LoveZA.js";
2
2
  import { DIALECTE_NAMESPACES as i, standardizeRecord as a, toTrackedRecord as o, toTreeRecord as s } from "./helpers.js";
3
3
  import { expect as c, it as l } from "vitest";
4
4
  //#region src/test/assert-xml/xpath-parser.ts
@@ -14,6 +14,8 @@ import { AnyDialecteConfig, AttributesValueObjectOf, ChildrenOf, ElementsOf } fr
14
14
  * // report.Project?.attributes.schemaVersion → string | undefined
15
15
  */
16
16
  export type InspectedElement<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
17
+ /** Namespace URI of this element (from its default or prefixed xmlns declaration). */
18
+ namespace: string;
17
19
  /** All attributes found on the opening tag, keyed by local name. */
18
20
  attributes: Partial<AttributesValueObjectOf<GenericConfig, GenericElement>>;
19
21
  /** Names of child elements found directly under this element. */
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-xml.d.ts","sourceRoot":"","sources":["../../src/xml/inspect-xml.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEjG;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,gBAAgB,CAC3B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,oEAAoE;IACpE,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC3E,iEAAiE;IACjE,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAA;IACrD,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,gBAAgB,CAC3B,aAAa,SAAS,iBAAiB,EACvC,CAAC,SAAS,SAAS,UAAU,CAAC,aAAa,CAAC,EAAE,IAC3C;KACF,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,GAAG,SAAS;CAChE,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,KAAK,CAAC,aAAa,SAAS,iBAAiB,GAAG,iBAAiB,EACjE,KAAK,CAAC,eAAe,SAAS,SAAS,UAAU,CAAC,aAAa,CAAC,EAAE,GACjE,SAAS,UAAU,CAAC,aAAa,CAAC,EAAE,EAErC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,GAC3D,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,aAAa,EAAE,eAAe,CAA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AAC,CAAC,GAAG,SAAS,CAAC,CAsEtF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialecte/core",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "description": "Dialecte - Core functionality for Dialecte SDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,6 +43,11 @@
43
43
  "//====== CHECK ======//": "",
44
44
  "check": "run-p type-check lint:check format:check",
45
45
  "type-check": "tsc --noEmit",
46
+ "//====== TYPE PERF ======//": "",
47
+ "coverage:gen": "dialecte coverage",
48
+ "type-bench": "npm run coverage:gen && dialecte bench",
49
+ "type-bench:check": "npm run coverage:gen && dialecte bench --check",
50
+ "type-narrowing": "npm run coverage:gen && dialecte narrowing",
46
51
  "lint:check": "oxlint",
47
52
  "lint:fix": "oxlint . --fix -D correctness --ignore-path .gitignore",
48
53
  "format:check": "oxfmt --check",
@@ -56,6 +61,7 @@
56
61
  "xml-formatter": "^3.6.7"
57
62
  },
58
63
  "devDependencies": {
64
+ "@dialecte/cli": "0.0.1",
59
65
  "@tsconfig/node24": "^24.0.4",
60
66
  "@types/node": "^24.12.4",
61
67
  "@types/sax": "^1.2.7",
@@ -73,7 +79,7 @@
73
79
  "vite": "^8.0.16",
74
80
  "vite-plugin-dts": "^5.0.2",
75
81
  "vitepress": "^2.0.0-alpha.17",
76
- "vitepress-plugin-llms": "^1.13.1",
82
+ "vitepress-plugin-llms": "^1.13.2",
77
83
  "vitest": "^4.1.8"
78
84
  }
79
85
  }