@airmark/quiver 0.8.0 → 0.10.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.
Files changed (4) hide show
  1. package/README.md +20 -12
  2. package/package.json +6 -15
  3. package/index.d.ts +0 -16
  4. package/index.js +0 -28
package/README.md CHANGED
@@ -17,20 +17,31 @@ and aligned to the current Quillmark spec.
17
17
  ## Install
18
18
 
19
19
  ```bash
20
- npm install @airmark/quiver @quillmark/quiver@0.5.0 @quillmark/wasm@0.66.2
20
+ npm install @airmark/quiver @quillmark/quiver@^0.6.0 @quillmark/wasm
21
21
  ```
22
22
 
23
+ This package ships only the Source Quiver assets (`Quiver.yaml` + `quills/`)
24
+ and exposes no JavaScript API. All loading is performed by `@quillmark/quiver`,
25
+ either from the on-disk package directory or from a packed archive fetched
26
+ over HTTP.
27
+
23
28
  ## Usage
24
29
 
25
- ### Load via the convenience helper
30
+ ### Load from the exported directory
31
+
32
+ Resolve the package's `Quiver.yaml` via `import.meta.resolve` and hand it to
33
+ `@quillmark/quiver`:
26
34
 
27
35
  ```ts
36
+ import { fileURLToPath } from 'node:url';
37
+ import path from 'node:path';
28
38
  import { Quillmark, Document } from '@quillmark/wasm';
29
- import { loadAirmarkQuiver } from '@airmark/quiver';
39
+ import { Quiver } from '@quillmark/quiver/node';
30
40
 
31
- const engine = new Quillmark();
32
- const quiver = await loadAirmarkQuiver();
41
+ const quiverYaml = fileURLToPath(import.meta.resolve('@airmark/quiver/Quiver.yaml'));
42
+ const quiver = await Quiver.fromDir(path.dirname(quiverYaml));
33
43
 
44
+ const engine = new Quillmark();
34
45
  const doc = Document.fromMarkdown(`---
35
46
  QUILL: usaf_memo@0.2
36
47
  memo_for: ["ORG/SYMBOL"]
@@ -45,14 +56,11 @@ const quill = await quiver.getQuill(doc.quillRef, { engine });
45
56
  const { artifacts } = quill.render(doc, { format: 'pdf' });
46
57
  ```
47
58
 
48
- ### Load from the exported directory
59
+ ### Load a packed Quiver via HTTP
49
60
 
50
- ```ts
51
- import { Quiver } from '@quillmark/quiver/node';
52
- import { QUIVER_DIR } from '@airmark/quiver';
53
-
54
- const quiver = await Quiver.fromDir(QUIVER_DIR);
55
- ```
61
+ Publish a packed Quiver archive (e.g. as a CDN or GitHub release asset) and
62
+ load it in the browser or any fetch-capable runtime through `@quillmark/quiver`.
63
+ See the upstream `@quillmark/quiver` docs for the packed-format and HTTP API.
56
64
 
57
65
  ## Layout
58
66
 
package/package.json CHANGED
@@ -1,31 +1,22 @@
1
1
  {
2
2
  "name": "@airmark/quiver",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Airmark Quiver — Air Force and DAF document Quills for Quillmark.",
5
5
  "type": "module",
6
- "main": "./index.js",
7
- "types": "./index.d.ts",
8
6
  "exports": {
9
- ".": {
10
- "types": "./index.d.ts",
11
- "import": "./index.js"
12
- }
7
+ "./Quiver.yaml": "./Quiver.yaml",
8
+ "./quills/*": "./quills/*",
9
+ "./package.json": "./package.json"
13
10
  },
14
11
  "files": [
15
12
  "quills",
16
- "Quiver.yaml",
17
- "index.js",
18
- "index.d.ts"
13
+ "Quiver.yaml"
19
14
  ],
20
15
  "engines": {
21
16
  "node": ">=18"
22
17
  },
23
- "peerDependencies": {
24
- "@quillmark/quiver": ">=0.5.0 <1.0.0",
25
- "@quillmark/wasm": ">=0.66.2 <1.0.0"
26
- },
27
18
  "devDependencies": {
28
- "@quillmark/quiver": "^0.5.0",
19
+ "@quillmark/quiver": "^0.6.0",
29
20
  "@quillmark/wasm": "0.66.2"
30
21
  },
31
22
  "scripts": {
package/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { Quiver } from '@quillmark/quiver/node';
2
-
3
- /**
4
- * Absolute path to the root of this Source Quiver (contains `Quiver.yaml`).
5
- */
6
- export declare const QUIVER_DIR: string;
7
-
8
- /**
9
- * Absolute path to the `quills/` directory inside this Quiver.
10
- */
11
- export declare const QUILLS_DIR: string;
12
-
13
- /**
14
- * Convenience loader that resolves this Source Quiver through `@quillmark/quiver/node`.
15
- */
16
- export declare function loadAirmarkQuiver(): Promise<Quiver>;
package/index.js DELETED
@@ -1,28 +0,0 @@
1
- import path from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = path.dirname(__filename);
6
-
7
- /**
8
- * Absolute path to the root of this Source Quiver (contains `Quiver.yaml`).
9
- */
10
- export const QUIVER_DIR = __dirname;
11
-
12
- /**
13
- * Absolute path to the `quills/` directory inside this Quiver.
14
- */
15
- export const QUILLS_DIR = path.join(__dirname, 'quills');
16
-
17
- /**
18
- * Convenience loader that resolves this Source Quiver through `@quillmark/quiver/node`.
19
- *
20
- * ```ts
21
- * import { loadAirmarkQuiver } from '@airmark/quiver';
22
- * const quiver = await loadAirmarkQuiver();
23
- * ```
24
- */
25
- export async function loadAirmarkQuiver() {
26
- const { Quiver } = await import('@quillmark/quiver/node');
27
- return Quiver.fromDir(QUIVER_DIR);
28
- }