@seliseblocks/mailcraft 0.2.1 → 0.2.3
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/DOCS.md +3 -0
- package/dist/mailcraft-editor.bundle.js +61 -50
- package/dist/mailcraft-editor.bundle.js.map +3 -3
- package/package.json +1 -1
- package/src/core/editor-core.js +6 -1
- package/src/core/export.js +2 -1
- package/src/core/i18n/loaders.js +78 -0
- package/src/core/i18n/tables.js +5 -4
- package/src/core/import-html.js +18 -0
- package/src/core/theme.js +1 -1
- package/src/index.js +1 -0
- package/src/mailcraft-editor.js +46 -17
- package/src/render/canvas.js +4 -0
- package/src/render/style.js +503 -488
- package/types/index.d.ts +9 -0
package/types/index.d.ts
CHANGED
|
@@ -31,6 +31,15 @@ export const LOCALES: readonly LocaleInfo[];
|
|
|
31
31
|
/** Every shipped message table, keyed by locale tag. Importing this pulls all translations in. */
|
|
32
32
|
export const LOCALE_TABLES: Record<LocaleTag, MessageTable>;
|
|
33
33
|
|
|
34
|
+
/** One lazy loader per shipped locale — literal dynamic imports, so bundlers code-split each table into its own chunk. What the element's `locale` attribute resolves through. */
|
|
35
|
+
export const LOCALE_LOADERS: Record<LocaleTag, () => Promise<MessageTable>>;
|
|
36
|
+
|
|
37
|
+
/** Fetches (once) and caches a locale's table; resolves `null` for a tag that does not ship. Useful for prefetching before setting `locale`. */
|
|
38
|
+
export function loadLocale(tag: string): Promise<MessageTable | null>;
|
|
39
|
+
|
|
40
|
+
/** The already-loaded table for a tag: the table, `undefined` (ships but not loaded yet), or `null` (does not ship). */
|
|
41
|
+
export function localeTable(tag: string): MessageTable | null | undefined;
|
|
42
|
+
|
|
34
43
|
/** The English table — the fallback for every key a custom table leaves out. */
|
|
35
44
|
export const EN: MessageTable;
|
|
36
45
|
|