@pretextbook/pretext-html 0.17.0 → 0.18.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/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RenderOptions } from './renderer.js';
1
+ import { RenderOptions, RenderResult } from './renderer.js';
2
2
  interface CliArgs {
3
3
  options: RenderOptions;
4
4
  output?: string;
@@ -13,5 +13,16 @@ interface CliArgs {
13
13
  printPreview?: string | true;
14
14
  }
15
15
  export declare function parseArgs(argv: string[]): CliArgs;
16
+ /**
17
+ * Point the page's `external/` and `generated/` URLs at the project's files,
18
+ * relative to `pageDir`, so a page written to disk opens with its images.
19
+ *
20
+ * A real build copies both directories next to its pages; the CLI writes one
21
+ * page and copies nothing, so it links the files where they are. A file that
22
+ * does not exist gets the same placeholder the VS Code preview shows, which
23
+ * says what to generate. A file on another drive than the page (Windows) has
24
+ * no relative path, and gets an absolute file URL instead.
25
+ */
26
+ export declare function linkAssetsFrom(html: string, assetDirs: RenderResult["assetDirs"], pageDir: string): string;
16
27
  export declare function main(argv: string[]): Promise<void>;
17
28
  export {};
package/dist/cli.js CHANGED
@@ -1,8 +1,13 @@
1
+ import "node:fs";
1
2
  import "node:fs/promises";
3
+ import "node:path";
2
4
  import "node:process";
5
+ import "node:url";
6
+ import "./assets.js";
3
7
  import "./printout.js";
4
- import { n as a, t as i } from "./cli-C0JwLhuv.js";
8
+ import { u as n, q as A, v as f } from "./cli-CddPgMt-.js";
5
9
  export {
6
- a as main,
7
- i as parseArgs
10
+ n as linkAssetsFrom,
11
+ A as main,
12
+ f as parseArgs
8
13
  };
@@ -11,9 +11,9 @@
11
11
  * rather than tracked as "latest".
12
12
  */
13
13
  /** html-static release, passed to the stylesheets as `cli.version`. */
14
- export declare const HTML_STATIC_VERSION = "2.55.0";
14
+ export declare const HTML_STATIC_VERSION = "2.56.1";
15
15
  /** Runestone Services release built into it, reported as `eBookConfig.runestone_version`. */
16
- export declare const RUNESTONE_VERSION = "8.3.3";
16
+ export declare const RUNESTONE_VERSION = "8.3.6";
17
17
  /** Scripts that turn Runestone's inert exercise markup into working exercises. */
18
18
  export declare const RUNESTONE_JS: readonly string[];
19
19
  /** Stylesheets those scripts expect. */
@@ -30,7 +30,7 @@ export type { SourceCacheOptions } from './source-cache.js';
30
30
  export type { SourceReader } from './xinclude.js';
31
31
  export { findSourceMapEntry } from './sourcemap.js';
32
32
  export type { PtxSourceMap, SourceMapEntry } from './sourcemap.js';
33
- export { forcePortablePublication } from './publication.js';
33
+ export { forcePreviewPublication, forcePortablePublication, } from './publication.js';
34
34
  export type { PublicationOverrides } from './publication.js';
35
35
  export { detectRenderTarget } from './target.js';
36
36
  export type { RenderTarget } from './target.js';