@mak-98/xml-dirvi-app 0.11.0-beta.20 → 0.11.0-beta.25

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.
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import type { TreeNode } from 'dirvi-lib';
3
2
  declare const xmlIdBrand: unique symbol;
4
3
  /**
5
4
  * An opaque, reference-identity ID for a node in the current XML document.
@@ -9,7 +8,6 @@ export type XmlId = object & {
9
8
  };
10
9
  import type { XmlElementChild, XmlNode } from './xml-doc.js';
11
10
  export type XmlNodeValue = XmlNode;
12
- export type XmlTreeNode = TreeNode<XmlId, XmlNodeValue>;
13
11
  export declare const xmlValueSchema: z.ZodUnion<readonly [z.ZodObject<{
14
12
  kind: z.ZodLiteral<"document">;
15
13
  children: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"xml-tree.d.ts","sourceRoot":"","sources":["../../src/domain/xml-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAM1C,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAM7D,OAAO,KAAK,EAAc,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AACnC,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAqFxD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA7BT,CAAC,CAAC,gBAAgB,CAChC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAFe,CAAC,CAAC,gBAAgB,CAChC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CACtD;;;;;;;;;;;;;;mBAoCiC,CAAC"}
1
+ {"version":3,"file":"xml-tree.d.ts","sourceRoot":"","sources":["../../src/domain/xml-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAM7D,OAAO,KAAK,EAAc,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAqFnC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA7BT,CAAC,CAAC,gBAAgB,CAChC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAFe,CAAC,CAAC,gBAAgB,CAChC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CACtD;;;;;;;;;;;;;;mBAoCiC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { xmlApp as default } from './xml-dirvi-app.js';
2
- export { xmlApp } from './xml-dirvi-app.js';
1
+ export { app as default } from './xml-dirvi-app.js';
2
+ export { app } from './xml-dirvi-app.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { xmlApp as default } from './xml-dirvi-app.js';
2
- export { xmlApp } from './xml-dirvi-app.js';
1
+ export { app as default } from './xml-dirvi-app.js';
2
+ export { app } from './xml-dirvi-app.js';
@@ -1,3 +1,3 @@
1
- import type { CreateAppDefinitionApplicator } from 'dirvi-apis';
2
- export declare const xmlApp: CreateAppDefinitionApplicator;
1
+ import type { CreateAppDefinitionApplicator } from 'treevim';
2
+ export declare const app: CreateAppDefinitionApplicator;
3
3
  //# sourceMappingURL=xml-dirvi-app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xml-dirvi-app.d.ts","sourceRoot":"","sources":["../src/xml-dirvi-app.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,6BAA6B,EAE9B,MAAM,YAAY,CAAC;AAQpB,eAAO,MAAM,MAAM,EAAE,6BA8DpB,CAAC"}
1
+ {"version":3,"file":"xml-dirvi-app.d.ts","sourceRoot":"","sources":["../src/xml-dirvi-app.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,6BAA6B,EAE9B,MAAM,SAAS,CAAC;AAQjB,eAAO,MAAM,GAAG,EAAE,6BAgEjB,CAAC"}
@@ -3,7 +3,7 @@ import { resolve } from 'node:path';
3
3
  import { xmlValueSchema } from './domain/xml-tree.js';
4
4
  import { createXmlFileResyncSubscription } from './infrastructure/create-xml-file-resync.js';
5
5
  import { createXmlDom } from './infrastructure/create-xml-dom.js';
6
- export const xmlApp = (input) => {
6
+ export const app = (input) => {
7
7
  if (input === undefined) {
8
8
  throw new Error('xml-dirvi-app: No file path to XML file given.');
9
9
  }
@@ -43,10 +43,10 @@ export const xmlApp = (input) => {
43
43
  const dom = await getDom();
44
44
  return dom.getDocument();
45
45
  },
46
- presentNode: (_id, value, nodeKind) => [
46
+ createNodePresenter: ({ nerdFonts }) => (_id, value, nodeKind) => [
47
47
  {
48
48
  content: value.kind,
49
- highlight: nodeKind,
49
+ hlToken: nodeKind,
50
50
  },
51
51
  ],
52
52
  subscribeToResync: createXmlFileResyncSubscription(xmlAbsolutePath),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mak-98/xml-dirvi-app",
3
- "version": "0.11.0-beta.20",
3
+ "version": "0.11.0-beta.25",
4
4
  "description": "XML file app for dirvi.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",
@@ -21,13 +21,12 @@
21
21
  "dependencies": {
22
22
  "@rgrove/parse-xml": "^5.0.0",
23
23
  "@xmldom/xmldom": "^0.9.12",
24
- "dirvi-apis": "0.11.0-beta.20",
25
24
  "env-paths": "^4.0.0",
26
25
  "zod": "^4.4.3"
27
26
  },
28
27
  "devDependencies": {
28
+ "treevim": "0.1.0-beta.3",
29
29
  "@types/node": "^22.0.0",
30
- "dirvi-lib": "0.11.0-beta.20",
31
30
  "typescript": "^5.0.0"
32
31
  },
33
32
  "scripts": {