@inboxsdk/core 0.1.2 → 0.2.1

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.
@@ -0,0 +1 @@
1
+ export {};
package/background.js ADDED
@@ -0,0 +1,16 @@
1
+ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
2
+ if (message.type === 'inboxsdk__injectPageWorld' && sender.tab) {
3
+ if (chrome.scripting) {
4
+ // MV3
5
+ chrome.scripting.executeScript({
6
+ target: { tabId: sender.tab.id },
7
+ world: 'MAIN',
8
+ files: ['pageWorld.js']
9
+ });
10
+ sendResponse(true);
11
+ } else {
12
+ // MV2 fallback. Tell content script it needs to figure things out.
13
+ sendResponse(false);
14
+ }
15
+ }
16
+ });
package/inboxsdk.d.ts CHANGED
@@ -537,6 +537,7 @@ export interface DropdownView extends EventEmitter {
537
537
  }
538
538
 
539
539
  export interface ComposeView extends EventEmitter {
540
+ destroyed: boolean;
540
541
  addButton(
541
542
  buttonOptions:
542
543
  | ComposeButtonDescriptor
@@ -561,6 +562,11 @@ export interface ComposeView extends EventEmitter {
561
562
  getSubject(): string;
562
563
  getThreadID(): string;
563
564
  getToRecipients(): Array<Contact>;
565
+ getHTMLContent(): string;
566
+ getTextContent(): string;
567
+ isMinimized(): boolean;
568
+ setMinimized(minimized: boolean): void;
569
+ isFullScreen(): boolean;
564
570
  insertHTMLIntoBodyAtCursor(html: string): HTMLElement;
565
571
  isForward(): boolean;
566
572
  isInlineReplyForm(): boolean;
@@ -574,6 +580,13 @@ export interface ComposeView extends EventEmitter {
574
580
  setSubject(subject: string): void;
575
581
  setTitleBarColor(color: string): () => void;
576
582
  setToRecipients(recipients: string[]): void;
583
+ send(options: SendOptions): void;
584
+ getFromContact(): Contact;
585
+ getFromContactChoices(): Contact[];
586
+ }
587
+
588
+ export interface SendOptions {
589
+ sendAndArchive?: boolean;
577
590
  }
578
591
 
579
592
  export interface ComposeButtonDescriptor {