@algorisys/yappydraw 0.8.267 → 0.8.269

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/README.md CHANGED
@@ -20,7 +20,7 @@ Or with no install, from a CDN:
20
20
 
21
21
  ```html
22
22
  <script type="module">
23
- import { Yappy, mount } from 'https://cdn.jsdelivr.net/npm/@algorisys/yappydraw@0.8.267/yappy.js'
23
+ import { Yappy, mount } from 'https://cdn.jsdelivr.net/npm/@algorisys/yappydraw@0.8.269/yappy.js'
24
24
  </script>
25
25
  ```
26
26
 
@@ -42,4 +42,4 @@ Or with no install, from a CDN:
42
42
  - **Licence: AGPL-3.0-only**, as the rest of YappyDraw. Check that it suits your project before
43
43
  bundling it into software you distribute or run as a network service.
44
44
 
45
- Source: [algorisys-oss/yappydraw @ v0.8.267](https://github.com/algorisys-oss/yappydraw/tree/v0.8.267).
45
+ Source: [algorisys-oss/yappydraw @ v0.8.269](https://github.com/algorisys-oss/yappydraw/tree/v0.8.269).
@@ -1,5 +1,5 @@
1
1
  import { g as w, a as P, b as E, c as T } from "./ai-providers-CycU8sO1.js";
2
- import { s as u, b as r, p as y, u as b, Z as B, f as v, g as j } from "./index-DdYrWfgJ.js";
2
+ import { s as u, b as r, p as y, u as b, _ as B, g as v, f as j } from "./index-N8KIsBvL.js";
3
3
  const z = {
4
4
  rewrite: "Rewrite this text to be clearer and more engaging while keeping its meaning and rough length.",
5
5
  shorten: "Shorten this text to roughly half its length while keeping the key message.",
@@ -1,4 +1,4 @@
1
- import { h as r } from "./index-DdYrWfgJ.js";
1
+ import { h as r } from "./index-N8KIsBvL.js";
2
2
  const [s, t] = r(null);
3
3
  function a(e, n, i) {
4
4
  return s()?.resolve(null), new Promise((o) => t({ title: e, message: n, choices: i, resolve: o }));
@@ -1,7 +1,7 @@
1
1
  import { b as x, c as S } from "./ai-providers-CycU8sO1.js";
2
- import { b as u, _ as A, s as C, f as y, z as M, g as D } from "./index-DdYrWfgJ.js";
3
- const P = 'You are a senior graphic designer. Reply with ONLY a JSON object, no markdown fences, matching exactly: {"headline": string (max 6 words), "subhead": string (max 12 words), "bullets": string[] (0-4 short items), "cta": string (max 5 words, optional), "palette": {"background": hex, "primary": hex, "accent": hex, "text": hex}}. The palette must be harmonious with strong text/background contrast.';
4
- function $(r) {
2
+ import { b as u, $ as A, s as C, g as y, z as M, f as D } from "./index-N8KIsBvL.js";
3
+ const $ = 'You are a senior graphic designer. Reply with ONLY a JSON object, no markdown fences, matching exactly: {"headline": string (max 6 words), "subhead": string (max 12 words), "bullets": string[] (0-4 short items), "cta": string (max 5 words, optional), "palette": {"background": hex, "primary": hex, "accent": hex, "text": hex}}. The palette must be harmonious with strong text/background contrast.';
4
+ function P(r) {
5
5
  try {
6
6
  const e = r.trim().replace(/^```(?:json)?\s*/i, "").replace(/\s*```$/, ""), n = JSON.parse(e);
7
7
  return !n?.headline || !n?.palette?.background ? null : n;
@@ -128,7 +128,7 @@ async function Y(r, e = { width: 1080, height: 1080 }) {
128
128
  provider: n,
129
129
  model: t,
130
130
  apiKey: o,
131
- systemPrompt: P,
131
+ systemPrompt: $,
132
132
  userPrompt: `Design brief: ${r.trim()}
133
133
  Format: ${e.width}×${e.height}px.`,
134
134
  temperature: 0.8,
@@ -136,7 +136,7 @@ Format: ${e.width}×${e.height}px.`,
136
136
  });
137
137
  if (!s.success)
138
138
  return u(s.error || "Design generation failed", "error"), !1;
139
- const i = $(s.content);
139
+ const i = P(s.content);
140
140
  if (!i)
141
141
  return u("The AI returned an unusable design — try again", "error"), !1;
142
142
  A("design", e);
@@ -1,6 +1,6 @@
1
1
  import { l as w, g as v, c as g } from "./ai-providers-CycU8sO1.js";
2
2
  import { a as x } from "./image-utils-CJQBaGoQ.js";
3
- import { $ as A, a0 as N } from "./index-DdYrWfgJ.js";
3
+ import { a0 as A, a1 as N } from "./index-N8KIsBvL.js";
4
4
  function y() {
5
5
  return `You are a diagram generation assistant for YappyDraw. You output ONLY valid JSON DSL — no markdown fences, no explanation, no commentary. Just the raw JSON object.
6
6
 
@@ -1,4 +1,4 @@
1
- import { A as I, B as u, C as l, D as m, E as S, G as U, H as w, I as y, J as E, K as p, L as N, M as O, N as C } from "./index-DdYrWfgJ.js";
1
+ import { A as I, B as u, C as l, D as m, E as S, G as U, H as w, I as y, J as E, K as p, L as N, M as O, N as C } from "./index-N8KIsBvL.js";
2
2
  const f = "yappy:drawings:index", c = (t) => `yappy:drawing:${t}`;
3
3
  function G() {
4
4
  return `d-${typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.floor(Math.random() * 1e9)}`}`;
@@ -1,4 +1,4 @@
1
- import { s as p, u as d, a as g } from "./index-DdYrWfgJ.js";
1
+ import { s as p, u as d, a as g } from "./index-N8KIsBvL.js";
2
2
  function x(n) {
3
3
  return n ? n.split(",").map((r) => r.trim()).filter((r) => r.length > 0) : [];
4
4
  }