lucid-extension-sdk 0.0.32 → 0.0.33
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
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.findProxyClass = void 0;
|
|
4
4
|
const customblockproxy_1 = require("./customblockproxy");
|
|
5
5
|
const erdblockproxy_1 = require("./erdblockproxy");
|
|
6
|
-
const
|
|
6
|
+
const linkunfurlblockproxy_1 = require("./linkunfurlblockproxy");
|
|
7
|
+
const allProxyClasses = [erdblockproxy_1.ERDBlockProxy, customblockproxy_1.CustomBlockProxy, linkunfurlblockproxy_1.ExperimentalLinkUnfurlBlockProxy];
|
|
7
8
|
function findProxyClass(className) {
|
|
8
9
|
return allProxyClasses.find((proxy) => proxy.classNameRegex.test(className));
|
|
9
10
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BlockProxy } from '../blockproxy';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*
|
|
5
|
+
* This is the kind of block that appears when a link is pasted onto the canvas of a Lucid editor.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExperimentalLinkUnfurlBlockProxy extends BlockProxy {
|
|
8
|
+
static classNameRegex: RegExp;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the title on the block, which is the main text shown on the block.
|
|
11
|
+
*
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
14
|
+
getTitle(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the name of the service the link belongs to, such as "Lucid" or "Google", as displayed below the title on
|
|
17
|
+
* the block.
|
|
18
|
+
*
|
|
19
|
+
* @ignore
|
|
20
|
+
*/
|
|
21
|
+
getProviderName(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the URL to be loaded in an iframe when the user clicks the "Expand" action on the block.
|
|
24
|
+
*
|
|
25
|
+
* @ignore
|
|
26
|
+
*/
|
|
27
|
+
setIframeUrl(iframeUrl: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the main thumbnail on the block
|
|
30
|
+
*
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
setPreviewThumbnailUrl(thumbnailUrl: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Sets additional thumbnails on the block
|
|
36
|
+
*
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
setThumbnailUrls(thumbnails: string[]): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExperimentalLinkUnfurlBlockProxy = void 0;
|
|
4
|
+
const blockproxy_1 = require("../blockproxy");
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*
|
|
8
|
+
* This is the kind of block that appears when a link is pasted onto the canvas of a Lucid editor.
|
|
9
|
+
*/
|
|
10
|
+
class ExperimentalLinkUnfurlBlockProxy extends blockproxy_1.BlockProxy {
|
|
11
|
+
/**
|
|
12
|
+
* Returns the title on the block, which is the main text shown on the block.
|
|
13
|
+
*
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
getTitle() {
|
|
17
|
+
return this.textAreas.get('t_LinkUnfurlTitle');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns the name of the service the link belongs to, such as "Lucid" or "Google", as displayed below the title on
|
|
21
|
+
* the block.
|
|
22
|
+
*
|
|
23
|
+
* @ignore
|
|
24
|
+
*/
|
|
25
|
+
getProviderName() {
|
|
26
|
+
return this.textAreas.get('t_LinkUnfurlProviderName');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sets the URL to be loaded in an iframe when the user clicks the "Expand" action on the block.
|
|
30
|
+
*
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
setIframeUrl(iframeUrl) {
|
|
34
|
+
throw new Error('Not yet implemented');
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sets the main thumbnail on the block
|
|
38
|
+
*
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
41
|
+
setPreviewThumbnailUrl(thumbnailUrl) {
|
|
42
|
+
throw new Error('Not yet implemented');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Sets additional thumbnails on the block
|
|
46
|
+
*
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
setThumbnailUrls(thumbnails) {
|
|
50
|
+
throw new Error('Not yet implemented');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ExperimentalLinkUnfurlBlockProxy = ExperimentalLinkUnfurlBlockProxy;
|
|
54
|
+
ExperimentalLinkUnfurlBlockProxy.classNameRegex = /^LinkUnfurlBlock$/;
|