@docx4j/jsonix 3.2.0 → 3.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docx4j/jsonix",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Jsonix (JSON interfaces for XML) is a JavaScript library which allows converting between XML and JSON structures.",
5
5
  "keywords": [
6
6
  "json",
@@ -52,7 +52,7 @@
52
52
  "module": "jsonix.mjs",
53
53
  "repository": {
54
54
  "type": "git",
55
- "url": "https://github.com/plutext/jsonix.git"
55
+ "url": "git+https://github.com/plutext/jsonix.git"
56
56
  },
57
57
  "types": "./types/main.d.ts",
58
58
  "exports": {
@@ -47,7 +47,7 @@
47
47
  "main": "jsonix.js",
48
48
  "repository": {
49
49
  "type": "git",
50
- "url": "https://github.com/plutext/jsonix.git"
50
+ "url": "git+https://github.com/plutext/jsonix.git"
51
51
  },
52
52
  "scripts": {
53
53
  "test": "nodeunit tests/tests.js"
package/types/main.d.ts CHANGED
@@ -52,6 +52,25 @@ export namespace Jsonix {
52
52
  }
53
53
  }
54
54
 
55
+ /**
56
+ * DOM access as the runtime does it: @xmldom/xmldom and xmlhttprequest when injected (Node),
57
+ * the browser's DOMParser / XMLSerializer / XMLHttpRequest otherwise (jsonix-CR-003 part 1).
58
+ */
59
+ export namespace DOM {
60
+ /** True when a DOM implementation (xmldom or the browser's) is available. */
61
+ function isDomImplementationAvailable(): boolean;
62
+ /** A new, empty XML document. Takes no arguments; the runtime ignores any that are passed. */
63
+ function createDocument(): Document;
64
+ /** Serialises a node to XML text; throws if no serializer is available. */
65
+ function serialize(node: Node): string;
66
+ /** Parses XML text into a document; throws on malformed input. */
67
+ function parse(text: string): Document;
68
+ /** Loads and parses the URL through the runtime's XMLHttpRequest transport (see Unmarshaller.unmarshalURL). */
69
+ function load(url: string, callback: (doc: Document) => void, options?: UnmarshalOptions): void;
70
+ /** Whether the xlink namespace work-around for older Chrome builds is needed in this environment. */
71
+ function isXlinkFixRequired(): boolean;
72
+ }
73
+
55
74
  /**
56
75
  * An element: what an unmarshaller returns, what a marshaller accepts, and the value of an
57
76
  * elementRef property. Generated declarations alias this per global element, for example
@@ -168,6 +187,13 @@ export namespace Jsonix {
168
187
  */
169
188
  constructor(mappings: M[], options?: ContextOptions);
170
189
 
190
+ /**
191
+ * The namespace-to-prefix table this context marshals with, copied from
192
+ * `options.namespacePrefixes` at construction. Read-only: derive a per-document table rather
193
+ * than mutating the shared context.
194
+ */
195
+ readonly namespacePrefixes: { readonly [namespaceURI: string]: string };
196
+
171
197
  createUnmarshaller(): Unmarshaller<RootElementOf<M>>;
172
198
  createMarshaller(): Marshaller;
173
199