@diy-website-builder/sdk 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/README.md +52 -0
- package/dist/diy-website-builder-editor.js +1021 -0
- package/dist/diy-website-builder-editor.js.LICENSE.txt +6 -0
- package/dist/index.d.ts +59 -0
- package/package.json +31 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public TypeScript surface for `@diy-website-builder/sdk`.
|
|
3
|
+
* Kept free of workspace `shared-library` imports so the npm package is self-contained.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type EditorToastType = "success" | "error" | "info" | "progress";
|
|
7
|
+
|
|
8
|
+
/** Matches `DeploymentEnvironments` in shared-library. */
|
|
9
|
+
export declare enum DeploymentEnvironments {
|
|
10
|
+
SANDBOX = "SandBox",
|
|
11
|
+
PRODUCTION = "Prod",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type PaidFeatureEventTypes =
|
|
15
|
+
| "pageLimitReached"
|
|
16
|
+
| "monthlyVisitReached"
|
|
17
|
+
| "projectLimitReached"
|
|
18
|
+
| "maximumProjectExceeded"
|
|
19
|
+
| "projectBackupLimitReached"
|
|
20
|
+
| "metricsViewRestricted"
|
|
21
|
+
| "projectShareRestricted"
|
|
22
|
+
| "transferOwnershipAttempted"
|
|
23
|
+
| "defaultUpgradeAttempted"
|
|
24
|
+
| "addADomainAttempted"
|
|
25
|
+
| "premiumComponentUsed"
|
|
26
|
+
| "storageLimitReached"
|
|
27
|
+
| "shortIdChangeAttempted"
|
|
28
|
+
| "pageDownloadRestricted"
|
|
29
|
+
| "mainComponentRestricted"
|
|
30
|
+
| "storageUpgradeAttempted"
|
|
31
|
+
| "websiteExportRestricted"
|
|
32
|
+
| "premiumComponentRestricted"
|
|
33
|
+
| "vibeRestricted";
|
|
34
|
+
|
|
35
|
+
export type EditorInit = {
|
|
36
|
+
apiKey: string;
|
|
37
|
+
shortId: string;
|
|
38
|
+
container: HTMLElement;
|
|
39
|
+
environment?: DeploymentEnvironments | `${DeploymentEnvironments}`;
|
|
40
|
+
language?: string;
|
|
41
|
+
font?: string;
|
|
42
|
+
exitURL?: string;
|
|
43
|
+
enableAI?: boolean;
|
|
44
|
+
onPublish?: (url?: string) => void;
|
|
45
|
+
onPaidFeatureClick?: (event: PaidFeatureEventTypes) => void;
|
|
46
|
+
showMessage?: (message: string, type: EditorToastType, options?: { id?: string }) => void;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export declare class Builder {
|
|
50
|
+
constructor(options: EditorInit);
|
|
51
|
+
destroy(): void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare const DIYWebsiteBuilderEditor: {
|
|
55
|
+
Builder: typeof Builder;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { DIYWebsiteBuilderEditor };
|
|
59
|
+
export default DIYWebsiteBuilderEditor;
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@diy-website-builder/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Framework-agnostic v3 website builder editor. Mount into any HTMLElement via DIYWebsiteBuilderEditor.Builder.",
|
|
5
|
+
"main": "dist/diy-website-builder-editor.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/diy-website-builder-editor.js",
|
|
11
|
+
"require": "./dist/diy-website-builder-editor.js",
|
|
12
|
+
"default": "./dist/diy-website-builder-editor.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"keywords": [
|
|
21
|
+
"website-builder",
|
|
22
|
+
"visual-editor",
|
|
23
|
+
"drag-and-drop",
|
|
24
|
+
"diy-website-builder"
|
|
25
|
+
],
|
|
26
|
+
"author": "Jay Ademola",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|