lucid-extension-sdk 0.0.172 → 0.0.173

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/commandtypes.d.ts CHANGED
@@ -1137,7 +1137,9 @@ export declare type RegisterPanelQuery = {
1137
1137
  /** Named action that returns whether the button to open the panel should be visible */
1138
1138
  'v'?: string | undefined;
1139
1139
  /** Content to display in the panel; full HTML page preferred */
1140
- 'c': string;
1140
+ 'c'?: string | undefined;
1141
+ /** URL to display in the panel (this or c is required). Can be relative to /public directory in the package */
1142
+ 'u'?: string | undefined;
1141
1143
  /** Icon URL, preferably a base64-encoded URL */
1142
1144
  'i': string;
1143
1145
  /** tooltip */
@@ -1287,7 +1289,9 @@ export declare type ShowModalQuery = {
1287
1289
  /** TransparentBackground or not */
1288
1290
  'tb'?: boolean | undefined;
1289
1291
  /** Content to display in the modal; full HTML page preferred */
1290
- 'c': string;
1292
+ 'c'?: string | undefined;
1293
+ /** URL to display in the modal (this or c is required). Can be relative to /public directory in the package */
1294
+ 'u'?: string | undefined;
1291
1295
  };
1292
1296
  export declare type ShowModalResult = undefined;
1293
1297
  export declare type ShowPackageSettingsModalQuery = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.172",
3
+ "version": "0.0.173",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/ui/modal.d.ts CHANGED
@@ -3,10 +3,17 @@ import { IframeUI } from './iframeui';
3
3
  /**
4
4
  * Configuration required to display a [Modal](#classes_ui_modal-Modal).
5
5
  */
6
- export declare type ModalConfig = {
6
+ export declare type ModalConfig = ({
7
7
  /** Content to display in the modal's iframe. This is set as the srcdoc on a sandboxed iframe. */
8
8
  content: string;
9
- } & ({
9
+ /** URL to load in the iframe. Can be either an absolute URL or one relative to the /public directory in this package */
10
+ url?: never;
11
+ } | {
12
+ /** Content to display in the modal's iframe. This is set as the srcdoc on a sandboxed iframe. */
13
+ content?: never;
14
+ /** URL to load in the iframe. Can be either an absolute URL or one relative to the /public directory in this package */
15
+ url: string;
16
+ }) & ({
10
17
  /** Title to display in the header bar of the modal. */
11
18
  title: string;
12
19
  /** If true, the header bar won't display (and no title is needed). */
package/ui/modal.js CHANGED
@@ -33,6 +33,7 @@ class Modal extends iframeui_1.IframeUI {
33
33
  'fs': this.config.fullScreen,
34
34
  'tb': this.config.transparentBackground,
35
35
  'c': this.config.content,
36
+ 'u': this.config.url,
36
37
  });
37
38
  this.visible = true;
38
39
  }
package/ui/panel.d.ts CHANGED
@@ -11,11 +11,9 @@ export declare enum PanelLocation {
11
11
  /** In Lucidspark, add a new tab to the image search callout component */
12
12
  ImageSearchTab = 3
13
13
  }
14
- export interface PanelConfig {
14
+ export declare type PanelConfig = {
15
15
  /** Title to display at the top of the panel */
16
16
  title: string;
17
- /** Content to display in the panel's iframe. This is set as the srcdoc on a sandboxed iframe. */
18
- content: string;
19
17
  /** Location to display the panel */
20
18
  location: PanelLocation;
21
19
  /** If specified, what action's return value should determine if the button to toggle this panel is visible? */
@@ -26,7 +24,17 @@ export interface PanelConfig {
26
24
  toolTip?: string;
27
25
  /** If set true, we will persist the panel's iframe in the background if it's not currently active*/
28
26
  persist?: boolean;
29
- }
27
+ } & ({
28
+ /** Content to display in the panel's iframe. This is set as the srcdoc on a sandboxed iframe. */
29
+ content: string;
30
+ /** URL to load in the iframe. Can be either an absolute URL or one relative to the /public directory in this package */
31
+ url?: never;
32
+ } | {
33
+ /** Content to display in the panel's iframe. This is set as the srcdoc on a sandboxed iframe. */
34
+ content?: never;
35
+ /** URL to load in the iframe. Can be either an absolute URL or one relative to the /public directory in this package */
36
+ url: string;
37
+ });
30
38
  /**
31
39
  * Extend this class to show a custom panel to the user, whose contents are displayed in a sandboxed
32
40
  * iframe controlled by your extension.
package/ui/panel.js CHANGED
@@ -34,6 +34,7 @@ class Panel extends iframeui_1.IframeUI {
34
34
  't': this.config.title,
35
35
  'l': this.config.location,
36
36
  'c': this.config.content,
37
+ 'u': this.config.url,
37
38
  'v': this.config.visibleAction,
38
39
  'i': this.config.iconUrl,
39
40
  'to': this.config.toolTip,