@weavour/editor 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +113 -2
- package/dist/classic.d.ts +6 -0
- package/dist/core.d.ts +2 -0
- package/dist/editor-blocks.d.ts +2 -0
- package/dist/editor-theme.d.ts +30 -0
- package/dist/editor.js +653 -0
- package/dist/email-document.d.ts +11 -0
- package/dist/errors.d.ts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +653 -0
- package/dist/legacy.d.ts +1 -0
- package/dist/legacy.js +653 -0
- package/dist/merge-tags.d.ts +26 -0
- package/dist/protocol.d.ts +9 -0
- package/dist/protocol.js +234 -0
- package/dist/template-preview-limits.d.ts +2 -0
- package/dist/types.d.ts +94 -0
- package/package.json +35 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Persisted authored email; editor chrome and export output are separate. */
|
|
2
|
+
export type EmailDocument = {
|
|
3
|
+
schemaVersion: 1;
|
|
4
|
+
content: Record<string, unknown>;
|
|
5
|
+
subject: string;
|
|
6
|
+
preheader: string;
|
|
7
|
+
previewHtml?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function emailDocument(value: unknown): EmailDocument;
|
|
10
|
+
/** Stable object order without altering authored strings or array order. */
|
|
11
|
+
export declare function canonicalJson(value: unknown): string;
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type EditorErrorCode = 'not_ready' | 'destroyed' | 'reloaded' | 'timeout' | 'config_failed' | 'invalid_config' | 'autosave_disabled' | 'demo_restricted' | 'export_failed' | 'incompatible_editor';
|
|
2
|
+
export declare class EditorError extends Error {
|
|
3
|
+
readonly code: EditorErrorCode;
|
|
4
|
+
constructor(code: EditorErrorCode, message: string);
|
|
5
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createSDK } from './core.js';
|
|
2
|
+
export { EditorError } from './errors.js';
|
|
3
|
+
export type { EditorErrorCode } from './errors.js';
|
|
4
|
+
export type * from './types.js';
|
|
5
|
+
export declare const mount: (target: HTMLElement | string, options: import("./types.js").MountOptions) => import("./types.js").EditorInstance;
|