useblocks 1.1.70 → 1.1.72

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,25 +1,25 @@
1
1
  (function(){try{if(typeof document<"u"){var o=document.createElement("style");o.setAttribute("data-useblocks","true"),o.appendChild(document.createTextNode('.monaco-editor{width:100%;height:100%}.monaco-editor .monaco-hover{border-radius:6px}.monaco-editor .monaco-editor .scroll-decoration{box-shadow:none}.monaco-editor,.monaco-editor *,.monaco-editor .view-lines,.monaco-editor .view-lines *,.monaco-editor .view-lines .view-line,.monaco-editor .view-lines .monaco-mouse-cursor-text,.monaco-editor .view-line,.monaco-editor .monaco-mouse-cursor-text{font-family:var(--monaco-editor-font-family,"Source Code Pro", Consolas, "Courier New", monospace)!important}.monaco-editor .view-line,.monaco-editor .view-line span,.monaco-editor .view-line span.inline-selected-text{font-variant-ligatures:none;font-feature-settings:"liga" 0, "calt" 0;font-kerning:none;white-space:pre;font-family:var(--monaco-monospace-font,var(--monaco-editor-font-family,"Source Code Pro", Consolas, "Courier New", monospace))!important;font-size:var(--monaco-editor-font-size,14px)!important;font-weight:400!important}.monaco-editor .standalone-colorpicker-body{max-width:460px!important}.monaco-editor .standalone-colorpicker-body .colorpicker-body .saturation-wrap{flex:0 auto;max-width:280px}.blocks-app .colorpicker-body .saturation-box,.blocks-app .colorpicker-body .strip{border-radius:4px}.blocks-app .scrollbar.vertical{width:5px!important}.blocks-app .scrollbar.vertical .slider{border-radius:5px!important;width:5px!important}.blocks-app .user-cursor{z-index:10;border-left:2px solid #ff00e1;width:2px;height:20px;position:absolute}.blocks-app .cursor-hover{color:#fff;text-wrap-mode:nowrap;z-index:10000;border-radius:7px 7px 7px 0;margin-left:-2px;padding:0 5px;font-size:12px;position:absolute;top:-17px}.blocks-app .user-selection-decoration{background-color:#8080eb4d}.monaco-editor__spin{z-index:1000;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- __useblocks__.define("static/core/c3b45fb6.js", [
2
+ __useblocks__.define("static/core/ffc83e02.js", [
3
3
  "require",
4
4
  "exports",
5
5
  "module",
6
6
  "static/core/df237243.js",
7
- "static/core/ea6c5c93.js",
7
+ "static/core/bfab4558.js",
8
8
  "static/core/e57e8a80.js",
9
9
  "static/core/9355751a.js",
10
- "static/core/d3bbb05e.js",
10
+ "static/core/24c3f399.js",
11
11
  "static/core/c370a46c.js",
12
12
  "static/core/db5fa769.js",
13
13
  "static/core/3bda5ccf2.js",
14
- "static/core/3f22a9d32.js",
14
+ "static/core/dd94baa62.js",
15
15
  "static/core/6e2a0152.js",
16
- "static/core/68ec11c8.js",
16
+ "static/core/842c8d41.js",
17
17
  "react",
18
18
  "react/jsx-runtime"
19
19
  ], function(de, wc, Ky) {
20
- const w = de("./df237243.js"), v = de("./ea6c5c93.js"), un = de("./e57e8a80.js"), ge = de("./9355751a.js"), ot = de("./d3bbb05e.js"), as = de("./c370a46c.js");
20
+ const w = de("./df237243.js"), v = de("./bfab4558.js"), un = de("./e57e8a80.js"), ge = de("./9355751a.js"), ot = de("./24c3f399.js"), as = de("./c370a46c.js");
21
21
  de("./db5fa769.js");
22
- const Ae = de("./3bda5ccf2.js"), sr = de("./3f22a9d32.js"), or = de("./6e2a0152.js"), be = de("./68ec11c8.js");
22
+ const Ae = de("./3bda5ccf2.js"), sr = de("./dd94baa62.js"), or = de("./6e2a0152.js"), be = de("./842c8d41.js");
23
23
  let S = de("react"), $ = w.__toESM(S, 1);
24
24
  S = w.__toESM(S);
25
25
  let Dt = de("react/jsx-runtime");
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <title>Two-step flow: design → subject/preheader (headless)</title>
6
- <script id="plugin-script" type="text/javascript" src="useblocks.js?d9c7d790"></script>
6
+ <script id="plugin-script" type="text/javascript" src="useblocks.js?8837a348"></script>
7
7
  <style>
8
8
  body {
9
9
  margin: 0;
@@ -3,16 +3,16 @@ __useblocks__.define("core", [
3
3
  "exports",
4
4
  "module",
5
5
  "static/core/df237243.js",
6
- "static/core/ea6c5c93.js",
7
- "static/core/9ab1c444.js",
8
- "static/core/23546a64.js"
6
+ "static/core/bfab4558.js",
7
+ "static/core/efbe495c.js",
8
+ "static/core/45b5e246.js"
9
9
  ], function(f, E, Se) {
10
10
  Object.defineProperties(E, {
11
11
  __esModule: { value: !0 },
12
12
  [Symbol.toStringTag]: { value: "Module" }
13
13
  });
14
14
  f("./static/core/df237243.js");
15
- const n = f("./static/core/ea6c5c93.js"), l = f("./static/core/9ab1c444.js"), S = f("./static/core/23546a64.js");
15
+ const n = f("./static/core/bfab4558.js"), l = f("./static/core/efbe495c.js"), S = f("./static/core/45b5e246.js");
16
16
  var A = "Editor instance was destroyed and cannot be reused. A fresh instance will be created instead.";
17
17
  function w() {
18
18
  const e = new Error(A);
@@ -534,7 +534,7 @@ __useblocks__.define("core", [
534
534
  R
535
535
  ];
536
536
  async function Z() {
537
- return (await Promise.resolve().then(() => f("./static/core/b3ee36b6.js"))).default;
537
+ return (await Promise.resolve().then(() => f("./static/core/d19e8c6f.js"))).default;
538
538
  }
539
539
  var ee = (e) => {
540
540
  let t = null, o = !1;
@@ -669,5 +669,5 @@ __useblocks__.define("core", [
669
669
  ampHtml: o
670
670
  };
671
671
  }
672
- E.init = ae, E.parseAMP = le, E.version = "1.1.70";
672
+ E.init = ae, E.parseAMP = le, E.version = "1.1.72";
673
673
  });
package/useblocks-esm.js CHANGED
@@ -76,7 +76,7 @@ import { a as b, i as ke, n as Ue, r as J, t as _ } from "./static/esm/2474de05.
76
76
  } catch {
77
77
  return y.slice(-1) !== "/" && (y += "/"), t(y + m);
78
78
  }
79
- }), e.version || (e.version = "1.1.70");
79
+ }), e.version || (e.version = "1.1.72");
80
80
  var n = e.modules = /* @__PURE__ */ Object.create(null), r = import("./runtime/index.js"), c = import("./ui-kit/index.js");
81
81
  n.React = r.then(function(o) {
82
82
  return o.React;
@@ -786,8 +786,8 @@ import { a as b, i as ke, n as Ue, r as J, t as _ } from "./static/esm/2474de05.
786
786
  `)(e), typeof e.require == "function" && typeof e.require.config == "function" && e.require.config({
787
787
  baseUrl: "./",
788
788
  paths: {
789
- core: "useblocks-core.d9c7d790.js",
790
- po: "useblocks-po.d9c7d790.js"
789
+ core: "useblocks-core.8837a348.js",
790
+ po: "useblocks-po.8837a348.js"
791
791
  }
792
792
  });
793
793
  var p = typeof e.prefetch == "function" ? e.prefetch : void 0;
@@ -1761,7 +1761,7 @@ function N(e, ...n) {
1761
1761
  const r = _.get(e);
1762
1762
  n.some((c) => c !== void 0 && c === r) && _.delete(e);
1763
1763
  }
1764
- var Er = "1.1.70";
1764
+ var Er = "1.1.72";
1765
1765
  async function Ir(e) {
1766
1766
  await le(typeof window.__useblocks__ < "u" ? window.__useblocks__ : void 0);
1767
1767
  }
@@ -5941,5 +5941,5 @@ __useblocks__.define("po", [
5941
5941
  });
5942
5942
  return ea(t?.locale_data?.default);
5943
5943
  }
5944
- ct.parsePoCatalog = ta, ct.version = "1.1.70";
5944
+ ct.parsePoCatalog = ta, ct.version = "1.1.72";
5945
5945
  });
package/useblocks.d.ts CHANGED
@@ -834,6 +834,63 @@ export declare namespace ExportedApi {
834
834
  syntax: string[];
835
835
  items: MergeTag[];
836
836
  }
837
+ /** Font face rendering style, as in CSS `font-style`. */
838
+ export type ProjectStyleFontStyle = 'normal' | 'italic' | 'oblique';
839
+ /**
840
+ * Brand color offered in the editor color pickers.
841
+ * Order follows the array; `id` is optional and only used to match the record back to your data.
842
+ */
843
+ export type ProjectStyleColor = {
844
+ /** Human-readable name shown in project styles, e.g. "Primary brand". */
845
+ name: string;
846
+ /** `#rrggbb`; a value without `#` is accepted and normalized. */
847
+ hex: string;
848
+ id?: string;
849
+ };
850
+ /**
851
+ * Custom font of the project: appears in the font picker and is applied on the canvas.
852
+ * The source kind is derived from **`source_url`** — a `.css` address or Google Fonts is attached
853
+ * as a stylesheet `<link>`, anything else as a font file in `@font-face`.
854
+ */
855
+ export type ProjectStyleFont = {
856
+ /** CSS font family name, e.g. "Inter". */
857
+ family: string;
858
+ /** Absolute `https:` address of the font file or of the stylesheet. */
859
+ source_url: string;
860
+ /** Label in the font picker; defaults to **`family`**. */
861
+ name?: string;
862
+ /** CSS `font-weight`; defaults to `400`. */
863
+ weight?: string;
864
+ /** Defaults to `normal`. */
865
+ style?: ProjectStyleFontStyle;
866
+ id?: string;
867
+ };
868
+ /**
869
+ * Social network link of the project: prefills the "Social" element instead of the placeholder.
870
+ * Icon comes either from the built-in catalog (**`icon_key`**) or from **`icon_url`**; an icon
871
+ * given by URL must be a raster image — email clients do not render SVG.
872
+ */
873
+ export type ProjectStyleSocial = {
874
+ /** Absolute `https:` link; a value without a scheme is normalized to `https://`. */
875
+ url: string;
876
+ /** Human-readable name, e.g. "Main community". */
877
+ name?: string;
878
+ /** Platform key of the built-in icon catalog: `vk`, `telegram`, `youtube`, … */
879
+ icon_key?: string;
880
+ /** Absolute `https:` address of a raster icon; wins over **`icon_key`**. */
881
+ icon_url?: string;
882
+ id?: string;
883
+ };
884
+ /**
885
+ * Brand assets of the project supplied by the host: palette, custom fonts and social links.
886
+ * Read-only for the editor. Records that fail validation are skipped with a console warning;
887
+ * lists are capped at 32 colors, 20 fonts and 20 socials.
888
+ */
889
+ export type ProjectStyles = {
890
+ colors?: ProjectStyleColor[];
891
+ fonts?: ProjectStyleFont[];
892
+ socials?: ProjectStyleSocial[];
893
+ };
837
894
  type LimitName = 'AiImgCount' | 'AiChatCount' | 'AiGeneratorCount' |
838
895
  /** @deprecated For plugin hosts: use per-type `LinkCheckCount` / `ImageCheckCount` / `SpamCheckCount` instead. */
839
896
  'OptimizationCount' | 'LinkCheckCount' | 'ImageCheckCount' | 'SpamCheckCount';
@@ -1131,6 +1188,11 @@ export declare namespace ExportedApi {
1131
1188
  mergeTags?: MergeTagsInfo;
1132
1189
  /** Toolbar / sidebar button that opens merge-tag picker (independent from **`mergeTags`** data presence). */
1133
1190
  mergeTagsShow?: boolean;
1191
+ /**
1192
+ * Brand palette, custom fonts and social links of the project. In the plugin this is the only
1193
+ * source of project styles — the SaaS endpoint is not reachable with a host token.
1194
+ */
1195
+ projectStyles?: ProjectStyles;
1134
1196
  /** Preset addresses for “send test email” quick-pick (UI convenience). */
1135
1197
  testEmails?: string[];
1136
1198
  /** Sidebar UI switch for alternate/simple configuration layout (persisted runtime key **`configSwither`**). */
package/useblocks.js CHANGED
@@ -689,7 +689,7 @@ var __amdEnv = window.__useblocks__ || (window.__useblocks__ = {});
689
689
 
690
690
 
691
691
  // Configure AMD loader
692
- __amdEnv.require.config({ baseUrl: "./", paths: {"core":"useblocks-core.d9c7d790.js","po":"useblocks-po.d9c7d790.js"} });
692
+ __amdEnv.require.config({ baseUrl: "./", paths: {"core":"useblocks-core.8837a348.js","po":"useblocks-po.8837a348.js"} });
693
693
 
694
694
  // PublicPath (script detection: entry script lookup → document.currentScript)
695
695
  if (!__useblocks__.publicPath) {
@@ -1037,7 +1037,7 @@ if (!ns.assetUrl) {
1037
1037
  }
1038
1038
 
1039
1039
  if (!ns.version) {
1040
- ns.version = "1.1.70";
1040
+ ns.version = "1.1.72";
1041
1041
  }
1042
1042
 
1043
1043
  var modules = ns.modules = Object.create(null);
@@ -2785,7 +2785,7 @@ __useblocks__.define("useblocks.js", [
2785
2785
  const r = S.get(e);
2786
2786
  t.some((n) => n !== void 0 && n === r) && S.delete(e);
2787
2787
  }
2788
- var rn = "1.1.70";
2788
+ var rn = "1.1.72";
2789
2789
  async function nn(e) {
2790
2790
  await _e(typeof __useblocks__ < "u" ? __useblocks__ : void 0);
2791
2791
  }