@topol.io/editor 0.0.0-alfa.3 → 0.0.0-alfa.4
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/dist/topol-plugin.es.js
CHANGED
package/dist/topol-plugin.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,a){typeof exports=="object"&&typeof module!="undefined"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(l=typeof globalThis!="undefined"?globalThis:l||self,a(l["topol-plugin"]={}))})(this,function(l){"use strict";var a=function(t,o,d){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("script");typeof o=="function"&&(d=o,o={}),o=o||{},d=d||function(){},n.type=o.type||"text/javascript",n.charset=o.charset||"utf8",n.async="async"in o?!!o.async:!0,n.src=t,o.attrs&&w(n,o.attrs),o.text&&(n.text=""+o.text);var s="onload"in n?c:f;s(n,d),n.onload||c(n,d),r.appendChild(n)};function w(e,t){for(var o in t)e.setAttribute(o,t[o])}function c(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function f(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}const h="https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js",u=e=>({init:()=>new Promise((i,T)=>{a(h,g=>{g!==null&&T(g),window.TopolPlugin.init(e),i(!0)})}),save:()=>{window.TopolPlugin.save()},load:i=>{window.TopolPlugin.load(i)},togglePreview:()=>{window.TopolPlugin.togglePreview()},togglePreviewSize:()=>{window.TopolPlugin.togglePreviewSize()},chooseFile:i=>{window.TopolPlugin.chooseFile(i)},undo:()=>{window.TopolPlugin.undo()},redo:()=>{window.TopolPlugin.redo()},setSavedBlocks:i=>{window.TopolPlugin.setSavedBlocks(i)},createNotification:i=>{window.TopolPlugin.createNotification(i)},changeEmailToMobile:()=>{window.TopolPlugin.changeEmailToMobile()},changeEmailToDesktop:()=>{window.TopolPlugin.changeEmailToDesktop()},toggleBlocksAndStructuresVisibility:()=>{window.TopolPlugin.toggleBlocksAndStructuresVisibility()},destroy:()=>{window.TopolPlugin.destroy()}});l.createTopolPlugin=u,l.default=u,Object.defineProperty(l,"__esModule",{value:!0}),l[Symbol.toStringTag]="Module"});
|
package/dist/types/src/main.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare global {
|
|
|
7
7
|
TopolPlugin: ITopolPlugin;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
declare const createTopolPlugin: (options: ITopolOptions) => {
|
|
10
|
+
export declare const createTopolPlugin: (options: ITopolOptions) => {
|
|
11
11
|
init: () => Promise<boolean | string>;
|
|
12
12
|
save: () => void;
|
|
13
13
|
load: (json: unknown) => void;
|
|
@@ -24,3 +24,4 @@ declare const createTopolPlugin: (options: ITopolOptions) => {
|
|
|
24
24
|
destroy: () => void;
|
|
25
25
|
};
|
|
26
26
|
export default createTopolPlugin;
|
|
27
|
+
export type { ITopolOptions };
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topol.io/editor",
|
|
3
|
-
"version": "0.0.0-alfa.
|
|
3
|
+
"version": "0.0.0-alfa.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
7
7
|
"module": "./dist/topol-plugin.es.js",
|
|
8
|
-
"types": "./dist/src/main.d.ts",
|
|
8
|
+
"types": "./dist/types/src/main.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"import": "./dist/topol-plugin.es.js",
|
|
12
12
|
"require": "./dist/topol-plugin.umd.js",
|
|
13
|
-
"types": "./dist/src/main.d.ts"
|
|
13
|
+
"types": "./dist/types/src/main.d.ts"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"dev": "vite",
|
|
18
|
-
"build": "vite build",
|
|
18
|
+
"build": "vite build && tsc",
|
|
19
19
|
"lint": "eslint --config '.eslintrc.js' ./**/*.ts --fix",
|
|
20
20
|
"format": "prettier --write .",
|
|
21
21
|
"build:types": "tsc"
|