@draftably/mermaid 0.2.2 → 0.2.3

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,4 +1,4 @@
1
- import { c as e, m as s, g as t, i, p as n, r as o, a as d, b as g, d as l, s as f } from "./cdn/index-C8K0jvXo.mjs";
1
+ import { c as e, m as s, g as t, i, p as n, r as o, a as d, b as g, d as l, s as f } from "./cdn/index-xhN9In0x.mjs";
2
2
  export {
3
3
  e as contentLoaded,
4
4
  s as default,
package/dist/mermaid.js CHANGED
@@ -13,7 +13,7 @@ async function F(r) {
13
13
  );
14
14
  const [{ makePlainLabel: n }, { importMermaidFlow: a }] = await Promise.all([
15
15
  import("./chunks/mermaid-facade-BoLWBerE.js"),
16
- import("./chunks/mermaid-importer-BHKoojYC.js")
16
+ import("./chunks/mermaid-importer-DcseMRou.js")
17
17
  ]), e = await (await u)(r);
18
18
  if (!e.ok) return null;
19
19
  const t = a(e, n(document), "");
@@ -9,7 +9,7 @@ import type { Footnote } from './footnote';
9
9
  import type { Note } from './note';
10
10
  import { type FontRole, type TypeProfile } from './fonts';
11
11
  import type { FileConfig } from './link';
12
- export type ThemeId = 'drafting' | 'fieldnotes' | 'signal' | 'ink' | 'blueprint';
12
+ export type ThemeId = 'drafting' | 'fieldnotes' | 'signal' | 'ink' | 'blueprint' | 'drafting-dark';
13
13
  export declare const THEME_IDS: ThemeId[];
14
14
  export declare const DEFAULT_THEME: ThemeId;
15
15
  /** Shade stops. Lower numbers are lighter and higher numbers darker, in every theme. */
@@ -154,6 +154,13 @@ interface Preset {
154
154
  hues?: Partial<Record<string, [number, number]>>;
155
155
  }
156
156
  export declare const PRESETS: Record<ThemeId, Preset>;
157
+ /**
158
+ * The appearance to draw on a page of this scheme. The default theme follows the page, with or
159
+ * without a `theme drafting` line and its size and font overrides: dark draws it as
160
+ * `drafting-dark`. Another named theme, a `theme-color` line or a color override on the `theme`
161
+ * line keeps the file's colors on every page.
162
+ */
163
+ export declare function forScheme(appearance: DiagramAppearance, dark: boolean): DiagramAppearance;
157
164
  /** `a` moved toward `b` by `t` (0–1), in sRGB. */
158
165
  export declare function mixColors(a: string, b: string, t: number): string;
159
166
  export declare function contrast(a: string, b: string): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftably/mermaid",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "A drop-in for the mermaid package that draws diagrams with Draftably.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "mermaid-upstream": "npm:mermaid@12.2.0",
22
- "@draftably/runtime": "0.4.0"
22
+ "@draftably/runtime": "0.5.0"
23
23
  },
24
24
  "engines": {
25
25
  "node": ">=22.21.0"