@dialecte/core 0.6.0 → 0.6.2
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/query/any/any-query.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attribute.d.ts +7 -6
- package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attributes.d.ts +6 -5
- package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
- package/dist/document/query/get/record/index.d.ts +1 -0
- package/dist/document/query/get/record/index.d.ts.map +1 -1
- package/dist/document/query/get/record/resolve-record.d.ts +19 -0
- package/dist/document/query/get/record/resolve-record.d.ts.map +1 -0
- package/dist/document/query/main.d.ts.map +1 -1
- package/dist/helpers/standardizing.d.ts.map +1 -1
- package/dist/helpers.js +74 -71
- package/dist/index.js +3 -3
- package/dist/{project-DwtNI4J5.js → project-DQ6Yf6lO.js} +1410 -1388
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +3 -1
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
- package/dist/test.js +204 -191
- package/dist/utils/namespaces.d.ts +6 -1
- package/dist/utils/namespaces.d.ts.map +1 -1
- package/dist/{utils-CZ12wsuC.js → utils-CTBHUFs9.js} +7 -3
- package/dist/utils.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyDialecteConfig, Namespace } from '../types';
|
|
1
|
+
import { AnyDialecteConfig, Namespace, Wildcard } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Resolve a namespace declared in the config by its prefix (e.g. `ext`,
|
|
4
4
|
* `dev`). Returns `undefined` for an empty prefix or an unknown one —
|
|
@@ -44,4 +44,9 @@ export declare function orderAttributesBySequence<GenericAttribute extends {
|
|
|
44
44
|
name: string;
|
|
45
45
|
namespace?: Namespace;
|
|
46
46
|
}>(attributes: readonly GenericAttribute[], sequence: readonly string[]): GenericAttribute[];
|
|
47
|
+
/** Whether a wildcard allows a namespace (`''` = none): the namespaces it lists, or every one it does not exclude. */
|
|
48
|
+
export declare function isNamespaceAllowedByWildcard(params: {
|
|
49
|
+
wildcard: Wildcard | undefined;
|
|
50
|
+
namespaceUri: string;
|
|
51
|
+
}): boolean;
|
|
47
52
|
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../src/utils/namespaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../src/utils/namespaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAErE;;;;GAIG;AACH,wBAAgB,wBAAwB,CACvC,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,EACrD,MAAM,EAAE,MAAM,GACZ,SAAS,GAAG,SAAS,CAIvB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACtC,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,EACrD,KAAK,EAAE,MAAM,GACX,SAAS,GAAG,SAAS,CAGvB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC5C,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,EACrD,cAAc,EAAE,MAAM,GACpB,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACzC,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,EAC1C,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,GACxC,MAAM,CAMR;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACxC,gBAAgB,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,EAC/D,UAAU,EAAE,SAAS,gBAAgB,EAAE,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAS1F;AAED,sHAAsH;AACtH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACpD,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC9B,YAAY,EAAE,MAAM,CAAA;CACpB,GAAG,OAAO,CAMV"}
|
|
@@ -574,9 +574,13 @@ function Y(e, t) {
|
|
|
574
574
|
let n = t.flatMap((t) => e.filter((e) => e.name === t)), r = e.filter((e) => !t.includes(e.name)).sort(J);
|
|
575
575
|
return [...n, ...r];
|
|
576
576
|
}
|
|
577
|
+
function X(e) {
|
|
578
|
+
let { wildcard: t, namespaceUri: n } = e;
|
|
579
|
+
return t === void 0 ? !1 : t.namespace === void 0 ? !(t.notNamespace ?? []).includes(n) : t.namespace.includes(n);
|
|
580
|
+
}
|
|
577
581
|
//#endregion
|
|
578
582
|
//#region src/utils/order-children.ts
|
|
579
|
-
function
|
|
583
|
+
function Z(e) {
|
|
580
584
|
let { parentTagName: t, children: n, childrenConfig: r } = e, i = r[t];
|
|
581
585
|
if (!i || i.length === 0) return n;
|
|
582
586
|
let a = new Set(i), o = /* @__PURE__ */ new Map();
|
|
@@ -595,7 +599,7 @@ function X(e) {
|
|
|
595
599
|
}
|
|
596
600
|
//#endregion
|
|
597
601
|
//#region src/utils/save-to-disk.ts
|
|
598
|
-
async function
|
|
602
|
+
async function Q(e) {
|
|
599
603
|
let { data: t, filename: n, pickerType: r } = e;
|
|
600
604
|
if ("showSaveFilePicker" in window) try {
|
|
601
605
|
let e = await (await window.showSaveFilePicker({
|
|
@@ -613,4 +617,4 @@ async function Z(e) {
|
|
|
613
617
|
a.href = i, a.download = n, document.body.appendChild(a), a.click(), a.remove(), URL.revokeObjectURL(i);
|
|
614
618
|
}
|
|
615
619
|
//#endregion
|
|
616
|
-
export {
|
|
620
|
+
export { h as A, x as C, u as D, f as E, r as F, o as I, t as L, m as M, p as N, d as O, n as P, a as R, b as S, y as T, M as _, Y as a, S as b, q as c, L as d, F as f, N as g, j as h, X as i, g as j, _ as k, W as l, P as m, Z as n, G as o, I as p, J as r, K as s, Q as t, U as u, E as v, C as w, v as x, T as y, e as z };
|
package/dist/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, y as b } from "./utils-CTBHUFs9.js";
|
|
2
|
+
export { y as admittedXsiTypes, r as canonicalXsiType, h as compareQualifiedAttributes, o as enumeratedValues, d as extractLocalName, v as formatEmbeddedXml, a as formatXml, c as getAttributeRules, u as invariant, l as isNamespaceAllowedByWildcard, s as isSchemaDefaultValue, n as orderAttributesBySequence, f as orderByConfigSequence, b as resolveDefinition, p as resolveNamespaceByPrefix, g as resolveNamespaceByScope, i as resolvePrefixByNamespaceScope, t as resolveSchemaAttributeValue, e as resolveXsiType, _ as saveToDisk, m as valuePatterns };
|