@bygga.dev/editor 1.9.3 → 1.9.4

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
@@ -193,10 +193,23 @@ rendering. All halves are optional; an absent one is unrestricted.
193
193
 
194
194
  ```js
195
195
  editor.brand = {
196
- // Replaces the free spectrum with exactly these swatches, everywhere a colour is
197
- // picked. Hex with or without '#', shorthand expanded, case-insensitive.
196
+ // Your colours, as swatches everywhere a colour is picked. Hex with or without '#',
197
+ // shorthand expanded, case-insensitive. By default they REPLACE the free spectrum;
198
+ // `anyColor: true` keeps it underneath them.
198
199
  colors: ['#2f2a72', '#a28c67'],
199
200
 
201
+ // A second, local palette under the first — a department's colours inside your
202
+ // brand, say — and the headings the two sections show. Unnamed, two palettes read
203
+ // "Brand colors" and "Local colors"; a single one has no heading at all. A colour in
204
+ // both lists is shown in the first only.
205
+ localColors: ['#8a2be2', '#2e8b57'],
206
+ colorsLabel: 'Acme',
207
+ localColorsLabel: 'Acme Studio',
208
+
209
+ // Keep the free picker (colour field, hue, hex) under the palettes, so authors may
210
+ // still pick any colour. Absent or false: only palette colours can be picked.
211
+ anyColor: false,
212
+
200
213
  // Narrows the email-safe faces the font pickers offer, in your order. The FIRST is
201
214
  // the font a new blank document starts on.
202
215
  fonts: ['georgia', 'arial'],
@@ -437,8 +450,9 @@ as permanent and namespace it (`acme.product-card`). `email()` must be determini
437
450
  and `data` must be plain JSON — the editor re-bakes on load and on every change.
438
451
 
439
452
  **The Brand reaches a plugin where it chooses values.** `create(context)` receives
440
- `context.brand` — your Brand after validation: `colors`, `fonts`, `customFonts`,
441
- `styles`, `custom` (whatever you put in `brand.custom`), and `css`, the block styles
453
+ `context.brand` — your Brand after validation: `colors`, `localColors`, `colorsLabel`,
454
+ `localColorsLabel`, `anyColor`, `fonts`, `customFonts`, `styles`, `custom` (whatever
455
+ you put in `brand.custom`), and `css`, the block styles
442
456
  as ready-to-use CSS — so a new block can start on your look; the settings contexts
443
457
  carry the same `brand`, to offer your palette or a "reset to brand". `css.header`
444
458
  is how a custom header of your own takes the look the Brand gives the built-in one:
@@ -1,5 +1,5 @@
1
1
  import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, I as s, J as c, K as l, L as u, N as d, O as f, P as p, Q as m, S as h, T as g, U as _, V as ee, W as v, X as y, Y as b, Z as x, a as te, at as S, b as ne, ft as C, gt as w, h as T, ht as re, j as E, k as D, lt as O, pt as k, st as ie, t as ae, tt as oe, ut as A, x as j, z as se } from "./providerKeys-ZibeU1i6.js";
2
- import { At as M, Cn as ce, Ct as le, Dt as N, Et as P, Ft as F, It as I, M as ue, Mt as de, Nt as fe, Ot as pe, Pt as L, S as me, Sn as he, St as ge, T as R, Tn as _e, Tt as ve, X as z, Z as ye, _ as be, _t as B, at as xe, bn as Se, bt as Ce, c as we, d as Te, dt as Ee, ft as De, gt as Oe, h as ke, ht as Ae, j as je, jn as Me, jt as V, k as Ne, kn as Pe, kt as H, l as Fe, mt as Ie, n as Le, ot as Re, pt as ze, r as Be, s as Ve, t as He, u as Ue, ut as We, vn as Ge, vt as Ke, w as qe, wn as Je, wt as Ye, xn as Xe, xt as U, y as W, yn as Ze, yt as Qe } from "./urls-Chd8ABaa.js";
2
+ import { At as M, Cn as ce, Ct as le, Dt as N, Et as P, Ft as F, It as I, M as ue, Mt as de, Nt as fe, Ot as pe, Pt as L, S as me, Sn as he, St as ge, T as R, Tn as _e, Tt as ve, X as z, Z as ye, _ as be, _t as B, at as xe, bn as Se, bt as Ce, c as we, d as Te, dt as Ee, ft as De, gt as Oe, h as ke, ht as Ae, j as je, jn as Me, jt as V, k as Ne, kn as Pe, kt as H, l as Fe, mt as Ie, n as Le, ot as Re, pt as ze, r as Be, s as Ve, t as He, u as Ue, ut as We, vn as Ge, vt as Ke, w as qe, wn as Je, wt as Ye, xn as Xe, xt as U, y as W, yn as Ze, yt as Qe } from "./urls-CVNpNWrl.js";
3
3
  //#region ../core/src/render/TextShell.vue?vue&type=script&setup=true&lang.ts
4
4
  var G = ["align"], $e = /* @__PURE__ */ d({
5
5
  __name: "TextShell",