// src/vibe/presets.ts
var VIBE_PRESETS = {
  messy_sketch: {
    preset: "messy_sketch",
    roughness: 1.6,
    bowing: 1.5,
    strokeWidth: 1.5,
    stroke: "#1f2937",
    fill: "#1f2937",
    fillStyle: "hachure",
    fillWeight: 1,
    hachureAngle: -41,
    hachureGap: 4,
    curveStepCount: 9,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 1,
    fontFamily: '"Comic Neue", "Comic Sans MS", "Segoe Print", cursive',
    fontSize: 14
  },
  clean_blueprint: {
    preset: "clean_blueprint",
    roughness: 0.6,
    bowing: 0.4,
    strokeWidth: 1.25,
    stroke: "#1d4ed8",
    fill: "#3b82f6",
    fillStyle: "cross-hatch",
    fillWeight: 0.5,
    hachureAngle: 45,
    hachureGap: 6,
    curveStepCount: 14,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 7,
    fontFamily: '"Cousine", "Courier New", ui-monospace, monospace',
    fontSize: 13
  },
  chaotic_notebook: {
    preset: "chaotic_notebook",
    roughness: 2.8,
    bowing: 2.5,
    strokeWidth: 2,
    stroke: "#111827",
    fill: "#f59e0b",
    fillStyle: "zigzag",
    fillWeight: 1.5,
    hachureAngle: 17,
    hachureGap: 3,
    curveStepCount: 6,
    curveTightness: 0.2,
    disableMultiStroke: false,
    seed: 13,
    fontFamily: '"Gloria Hallelujah", "Comic Sans MS", "Segoe Print", cursive',
    fontSize: 15
  },
  pencil: {
    preset: "pencil",
    roughness: 1.2,
    bowing: 1,
    strokeWidth: 0.9,
    stroke: "#4b5563",
    fill: "#9ca3af",
    fillStyle: "hachure",
    fillWeight: 0.6,
    hachureAngle: -35,
    hachureGap: 3,
    curveStepCount: 11,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 3,
    fontFamily: '"Caveat", "Segoe Print", "Bradley Hand", cursive',
    fontSize: 13
  },
  marker: {
    preset: "marker",
    roughness: 1,
    bowing: 0.8,
    strokeWidth: 3.5,
    stroke: "#0f172a",
    fill: "#38bdf8",
    fillStyle: "solid",
    fillWeight: 2,
    hachureAngle: 0,
    hachureGap: 5,
    curveStepCount: 10,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 5,
    fontFamily: '"Permanent Marker", "Marker Felt", cursive',
    fontSize: 15
  },
  ink: {
    preset: "ink",
    roughness: 0.8,
    bowing: 0.6,
    strokeWidth: 1.6,
    stroke: "#0b1020",
    fill: "#1e293b",
    fillStyle: "cross-hatch",
    fillWeight: 0.7,
    hachureAngle: 41,
    hachureGap: 5,
    curveStepCount: 13,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 9,
    fontFamily: '"Spectral", "Iowan Old Style", Georgia, serif',
    fontSize: 14
  },
  crayon: {
    preset: "crayon",
    roughness: 2.2,
    bowing: 1.8,
    strokeWidth: 2.8,
    stroke: "#7c2d12",
    fill: "#fb923c",
    fillStyle: "zigzag",
    fillWeight: 2.5,
    hachureAngle: 25,
    hachureGap: 4,
    curveStepCount: 7,
    curveTightness: 0.15,
    disableMultiStroke: false,
    seed: 21,
    fontFamily: '"Schoolbell", "Comic Sans MS", "Chalkboard", cursive',
    fontSize: 15
  },
  // Leonardo's notebooks: fine, confident iron-gall (sepia) pen on a warm
  // sienna cross-hatch. The negative hachure angle mimics his left-handed
  // shading, which slants top-left → bottom-right. Seed = his birth year.
  davinci_journal: {
    preset: "davinci_journal",
    roughness: 1,
    bowing: 0.7,
    strokeWidth: 1.1,
    stroke: "#4a3520",
    fill: "#b08a55",
    fillStyle: "cross-hatch",
    fillWeight: 0.45,
    hachureAngle: -52,
    hachureGap: 7,
    curveStepCount: 14,
    curveTightness: 0,
    // Single-stroke so connectors and outlines read as one confident pen line
    // rather than a doubled, scratchy one. (Fill hatching is unaffected.)
    disableMultiStroke: true,
    seed: 1452,
    fontFamily: '"EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif',
    fontSize: 14,
    // Aged-parchment page so the ink has somewhere to sit; this also drives the
    // node fill and the gap behind zone labels, so no stark-white seams show.
    background: "#f2e8cf"
  },
  // Classic drafting blueprint: crisp white/cyan ink on a deep blue page — the
  // inverse of clean_blueprint.
  blueprint_dark: {
    preset: "blueprint_dark",
    roughness: 0.6,
    bowing: 0.4,
    strokeWidth: 1.25,
    stroke: "#dbeafe",
    fill: "#93c5fd",
    fillStyle: "cross-hatch",
    fillWeight: 0.5,
    hachureAngle: 45,
    hachureGap: 6,
    curveStepCount: 14,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 23,
    fontFamily: '"Cousine", "Courier New", ui-monospace, monospace',
    fontSize: 13,
    background: "#0e3a66"
  },
  // Chalk on a slate board: dusty white strokes and hachure, casual hand.
  chalkboard: {
    preset: "chalkboard",
    roughness: 1.4,
    bowing: 1.1,
    strokeWidth: 1.4,
    stroke: "#eef0e9",
    fill: "#cdd3c8",
    fillStyle: "hachure",
    fillWeight: 0.7,
    hachureAngle: -30,
    hachureGap: 4,
    curveStepCount: 9,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 28,
    fontFamily: '"Schoolbell", "Comic Sans MS", cursive',
    fontSize: 15,
    background: "#2e3b35"
  },
  // Neon signage: bright cyan tubes and a fuchsia cross-hatch on near-black.
  neon: {
    preset: "neon",
    roughness: 0.5,
    bowing: 0.3,
    strokeWidth: 1.7,
    stroke: "#22d3ee",
    fill: "#d946ef",
    fillStyle: "cross-hatch",
    fillWeight: 0.6,
    hachureAngle: 45,
    hachureGap: 7,
    curveStepCount: 16,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 31,
    fontFamily: '"Orbitron", ui-monospace, monospace',
    fontSize: 13,
    background: "#0a0a12"
  },
  // Comic book: thick black ink outlines and bold solid fills, punchy lettering.
  comic_book: {
    preset: "comic_book",
    roughness: 0.9,
    bowing: 0.6,
    strokeWidth: 2.8,
    stroke: "#111111",
    fill: "#ef4444",
    fillStyle: "solid",
    fillWeight: 2,
    hachureAngle: 0,
    hachureGap: 5,
    curveStepCount: 12,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 37,
    fontFamily: '"Bangers", "Comic Sans MS", cursive',
    fontSize: 16,
    background: "#fffdf6"
  },
  // Phosphor-green CRT terminal: crisp green glyphs and sparse hatch on black.
  terminal: {
    preset: "terminal",
    roughness: 0.6,
    bowing: 0.3,
    strokeWidth: 1.3,
    stroke: "#4ade80",
    fill: "#22c55e",
    fillStyle: "cross-hatch",
    fillWeight: 0.5,
    hachureAngle: 0,
    hachureGap: 7,
    curveStepCount: 14,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 41,
    fontFamily: '"VT323", ui-monospace, monospace',
    fontSize: 17,
    background: "#08120b"
  },
  // Watercolour: soft muted ink, pale solid washes, gently wavy edges on paper.
  watercolor: {
    preset: "watercolor",
    roughness: 0.9,
    bowing: 1.2,
    strokeWidth: 1.1,
    stroke: "#5b6b7a",
    fill: "#bcd3e6",
    fillStyle: "solid",
    fillWeight: 1,
    hachureAngle: 60,
    hachureGap: 5,
    curveStepCount: 16,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 47,
    fontFamily: '"Quicksand", system-ui, sans-serif',
    fontSize: 14,
    background: "#fbfaf5"
  },
  // Newsprint: high-contrast black ink and dense cross-hatch on cream stock.
  newsprint: {
    preset: "newsprint",
    roughness: 0.8,
    bowing: 0.5,
    strokeWidth: 1.3,
    stroke: "#1a1a1a",
    fill: "#3f3f46",
    fillStyle: "cross-hatch",
    fillWeight: 0.6,
    hachureAngle: 45,
    hachureGap: 4,
    curveStepCount: 13,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 53,
    fontFamily: '"Playfair Display", Georgia, serif',
    fontSize: 14,
    background: "#f1ece0"
  },
  // Dry-erase whiteboard: bold blue marker and a light wash on a clean board.
  whiteboard: {
    preset: "whiteboard",
    roughness: 1,
    bowing: 0.7,
    strokeWidth: 2.2,
    stroke: "#2563eb",
    fill: "#bfdbfe",
    fillStyle: "solid",
    fillWeight: 2,
    hachureAngle: 0,
    hachureGap: 5,
    curveStepCount: 11,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 59,
    fontFamily: '"Comic Neue", "Comic Sans MS", cursive',
    fontSize: 14,
    background: "#fbfdff"
  },
  // Typewriter: faded, slightly uneven ink and a thin hatch on cream paper.
  typewriter: {
    preset: "typewriter",
    roughness: 1,
    bowing: 0.5,
    strokeWidth: 1.1,
    stroke: "#2b2b2b",
    fill: "#bdb9ab",
    fillStyle: "hachure",
    fillWeight: 0.5,
    hachureAngle: -30,
    hachureGap: 5,
    curveStepCount: 11,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 61,
    fontFamily: '"Special Elite", "Courier New", ui-monospace, monospace',
    fontSize: 13,
    background: "#f5f1e6"
  },
  // Midnight dashboard: cool light ink and a crisp accent fill on deep slate.
  midnight: {
    preset: "midnight",
    roughness: 0.6,
    bowing: 0.3,
    strokeWidth: 1.3,
    stroke: "#cbd5e1",
    fill: "#0ea5e9",
    fillStyle: "solid",
    fillWeight: 2,
    hachureAngle: 0,
    hachureGap: 6,
    curveStepCount: 14,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 67,
    fontFamily: '"IBM Plex Sans", system-ui, sans-serif',
    fontSize: 13,
    background: "#0f172a"
  },
  // Art deco: elegant gold lines and a sparse gilt hatch on midnight navy.
  art_deco: {
    preset: "art_deco",
    roughness: 0.5,
    bowing: 0.3,
    strokeWidth: 1.3,
    stroke: "#d4af37",
    fill: "#caa83a",
    fillStyle: "cross-hatch",
    fillWeight: 0.4,
    hachureAngle: 45,
    hachureGap: 8,
    curveStepCount: 16,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 71,
    fontFamily: '"Cinzel", Georgia, serif',
    fontSize: 13,
    background: "#0c1c3a"
  },
  // Manga: bold black ink and a dotted screentone fill on white.
  manga: {
    preset: "manga",
    roughness: 0.8,
    bowing: 0.5,
    strokeWidth: 1.8,
    stroke: "#111111",
    fill: "#1a1a1a",
    fillStyle: "dots",
    fillWeight: 1,
    hachureAngle: 0,
    hachureGap: 4,
    curveStepCount: 12,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 73,
    fontFamily: '"Bangers", "Comic Sans MS", cursive',
    fontSize: 15,
    background: "#fdfdfd"
  },
  // Highlighter: thin pen lines under a bright marker swipe, on notebook white.
  highlighter: {
    preset: "highlighter",
    roughness: 1.1,
    bowing: 0.9,
    strokeWidth: 1.1,
    stroke: "#374151",
    fill: "#fde047",
    fillStyle: "solid",
    fillWeight: 2,
    hachureAngle: 0,
    hachureGap: 5,
    curveStepCount: 11,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 79,
    fontFamily: '"Caveat", "Segoe Print", cursive',
    fontSize: 15,
    background: "#fffef9"
  },
  // Kraft: dark stamped ink and a brown hatch on recycled cardboard.
  kraft: {
    preset: "kraft",
    roughness: 1.1,
    bowing: 0.7,
    strokeWidth: 1.4,
    stroke: "#3b2f23",
    fill: "#9c7b4f",
    fillStyle: "hachure",
    fillWeight: 0.7,
    hachureAngle: -45,
    hachureGap: 4,
    curveStepCount: 11,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 83,
    fontFamily: '"Special Elite", "Courier New", ui-monospace, monospace',
    fontSize: 13,
    background: "#c9aa77"
  },
  // Synthwave: hot-magenta tubes and a purple cross-hatch on deep indigo.
  synthwave: {
    preset: "synthwave",
    roughness: 0.5,
    bowing: 0.3,
    strokeWidth: 1.7,
    stroke: "#ff4fd8",
    fill: "#7c3aed",
    fillStyle: "cross-hatch",
    fillWeight: 0.6,
    hachureAngle: 45,
    hachureGap: 6,
    curveStepCount: 16,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 89,
    fontFamily: '"Orbitron", ui-monospace, monospace',
    fontSize: 13,
    background: "#190a36"
  },
  // Botanical plate: fine green ink and a soft sage hatch on aged ivory.
  botanical: {
    preset: "botanical",
    roughness: 1,
    bowing: 0.8,
    strokeWidth: 1,
    stroke: "#3e5a36",
    fill: "#8aa06a",
    fillStyle: "hachure",
    fillWeight: 0.5,
    hachureAngle: -40,
    hachureGap: 5,
    curveStepCount: 14,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 97,
    fontFamily: '"EB Garamond", Georgia, serif',
    fontSize: 14,
    background: "#f4f1e4"
  },
  // Risograph: bold fluoro-pink fills and a blue keyline on uncoated stock.
  risograph: {
    preset: "risograph",
    roughness: 0.8,
    bowing: 0.6,
    strokeWidth: 1.6,
    stroke: "#2742d6",
    fill: "#ff5fa2",
    fillStyle: "solid",
    fillWeight: 2,
    hachureAngle: 0,
    hachureGap: 5,
    curveStepCount: 12,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 101,
    fontFamily: '"IBM Plex Sans", system-ui, sans-serif',
    fontSize: 13,
    background: "#f4f0e7"
  },
  // Sticky note: casual pen and a faint hatch on a bright square of paper.
  sticky_note: {
    preset: "sticky_note",
    roughness: 1.3,
    bowing: 1,
    strokeWidth: 1.3,
    stroke: "#3f3a33",
    fill: "#eab308",
    fillStyle: "hachure",
    fillWeight: 0.6,
    hachureAngle: -35,
    hachureGap: 4,
    curveStepCount: 9,
    curveTightness: 0,
    disableMultiStroke: false,
    seed: 103,
    fontFamily: '"Caveat", "Segoe Print", cursive',
    fontSize: 16,
    background: "#ffe27a"
  },
  // Amber CRT: warm amber phosphor glyphs and a sparse hatch on near-black.
  amber_crt: {
    preset: "amber_crt",
    roughness: 0.6,
    bowing: 0.3,
    strokeWidth: 1.3,
    stroke: "#ffb000",
    fill: "#cc8800",
    fillStyle: "cross-hatch",
    fillWeight: 0.5,
    hachureAngle: 0,
    hachureGap: 7,
    curveStepCount: 14,
    curveTightness: 0,
    disableMultiStroke: true,
    seed: 107,
    fontFamily: '"VT323", ui-monospace, monospace',
    fontSize: 17,
    background: "#0d0a05"
  }
};
var DEFAULT_VIBE = "messy_sketch";
var PAPER_TEXTURED = [
  "messy_sketch",
  "chaotic_notebook",
  "pencil",
  "crayon",
  "davinci_journal",
  "chalkboard",
  "watercolor",
  "newsprint",
  "kraft",
  "botanical",
  "risograph",
  "sticky_note",
  "typewriter"
];
for (const p of PAPER_TEXTURED) {
  VIBE_PRESETS[p].texture = "paper";
}

// src/vibe/resolveVibe.ts
function presetOrDefault(preset) {
  if (preset === void 0) {
    return VIBE_PRESETS[DEFAULT_VIBE];
  }
  const found = VIBE_PRESETS[preset];
  if (found === void 0) {
    console.warn(
      `[goldenchart] Unknown vibe preset "${preset}"; falling back to "${DEFAULT_VIBE}". Valid presets: ${Object.keys(VIBE_PRESETS).join(", ")}.`
    );
    return VIBE_PRESETS[DEFAULT_VIBE];
  }
  return found;
}
function applyDefined(target, source) {
  const mutable = target;
  for (const key of Object.keys(source)) {
    const value = source[key];
    if (value !== void 0) {
      mutable[key] = value;
    }
  }
}
function resolveVibe(config, brandOverrides) {
  const hasBrand = brandOverrides !== void 0 && Object.keys(brandOverrides).length > 0;
  if (config === void 0 && !hasBrand) {
    return VIBE_PRESETS[DEFAULT_VIBE];
  }
  if (typeof config === "string" && !hasBrand) {
    return presetOrDefault(config);
  }
  const base = typeof config === "string" || config === void 0 ? presetOrDefault(config) : presetOrDefault(config.preset);
  const merged = { ...base };
  if (hasBrand) {
    applyDefined(merged, brandOverrides);
  }
  if (typeof config === "object" && config !== void 0) {
    const { preset: _preset, fill, ...overrides } = config;
    applyDefined(merged, overrides);
    if (fill !== void 0) {
      merged.fill = fill;
    }
  }
  return merged;
}
function vibeToRoughOptions(vibe, seedOverride) {
  const options = {
    roughness: vibe.roughness,
    bowing: vibe.bowing,
    stroke: vibe.stroke,
    strokeWidth: vibe.strokeWidth,
    fillStyle: vibe.fillStyle,
    fillWeight: vibe.fillWeight,
    hachureAngle: vibe.hachureAngle,
    hachureGap: vibe.hachureGap,
    curveStepCount: vibe.curveStepCount,
    curveTightness: vibe.curveTightness,
    disableMultiStroke: vibe.disableMultiStroke,
    seed: seedOverride ?? vibe.seed
  };
  if (vibe.fill !== null) {
    options.fill = vibe.fill;
  }
  return options;
}

export { DEFAULT_VIBE, VIBE_PRESETS, resolveVibe, vibeToRoughOptions };
//# sourceMappingURL=chunk-3TD64277.js.map
//# sourceMappingURL=chunk-3TD64277.js.map