@useinsider/guido 3.9.1-beta.c64c39e → 3.9.1-beta.de8e72f

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.9.1-beta.c64c39e",
3
+ "version": "3.9.1-beta.de8e72f",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,34 +0,0 @@
1
- import { useToaster as m } from "../composables/useToaster.js";
2
- import { useTranslations as c } from "../composables/useTranslations.js";
3
- import { BLANK_TEMPLATE_HTML_URL as T, BLANK_TEMPLATE_CSS_URL as i } from "../enums/defaults.js";
4
- import { ToasterTypeOptions as p } from "../enums/toaster.js";
5
- const a = 3, f = 1e3;
6
- let s = null;
7
- const u = (e) => new Promise((t) => {
8
- setTimeout(t, e);
9
- }), n = async (e) => {
10
- const t = await fetch(e);
11
- if (!t.ok)
12
- throw new Error(`Blank template request failed: ${t.status}`);
13
- return t.text();
14
- }, k = () => {
15
- const { showToaster: e } = m(), t = c();
16
- return { getBlankTemplate: async () => {
17
- if (s)
18
- return s;
19
- for (let r = 1; r <= a; r++)
20
- try {
21
- const [o, l] = await Promise.all([
22
- n(T),
23
- n(i)
24
- ]);
25
- return s = { html: o, css: l }, s;
26
- } catch (o) {
27
- console.error(`Failed to fetch blank template (attempt ${r}/${a}):`, o), r < a && await u(r * f);
28
- }
29
- return e({ type: p.Alert, message: t("errors-pages.undefined-response") }), { html: "", css: "" };
30
- } };
31
- };
32
- export {
33
- k as useBlankTemplate
34
- };
@@ -1,11 +0,0 @@
1
- import type { Template } from '@@/Types/stripo';
2
- /**
3
- * Fetches the blank starter template (html + css) from the email CDN — the single
4
- * source of truth shared with email-fe. Retries a few times, caches the result for
5
- * the session, and on persistent failure returns an empty template (the editor still
6
- * opens) plus a toaster. Kept separate from stripoApi: this is a CDN asset fetch, not
7
- * a Stripo backend call.
8
- */
9
- export declare const useBlankTemplate: () => {
10
- getBlankTemplate: () => Promise<Template>;
11
- };