-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: UI Extension changes * chore: Removes pre-release versions * chore: Updates ContextMenuData to be app-specific * chore: Adds alpha versions back (for now) * chore: Adds JSDocs * chore: Fixes react package types * chore: Exports headers correctly * chore: Update core package version * chore: Removes `includeEmptySpacing` option * chore: Updates core package version * chore: Make `emptySpaceImageUrl` optional * chore: Updates core package version * chore: Remove pre-release versions
- Loading branch information
1 parent
de7cada
commit f413808
Showing
25 changed files
with
694 additions
and
211 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './doist-card/' | ||
export * from './doist-card' | ||
export * from './types' | ||
export * from './ui-helpers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/** | ||
* Types of actions that the server can invoke on the client via a bridge. | ||
*/ | ||
export type DoistCardBridgeActionType = DoistCardBridge['bridgeActionType'] | ||
|
||
/** | ||
* The notification display type | ||
*/ | ||
export type DoistCardNotificationType = 'success' | 'error' | 'info' | ||
|
||
/** | ||
* The bridge notification. This should be supplied when the `bridgeActionType` is `display.notification` | ||
*/ | ||
export type DoistCardBridgeNotification = { | ||
/** | ||
* The text that should appear in the notification. | ||
* | ||
* NOTE: this should be plain text, Markdown is *not* supported | ||
*/ | ||
text: string | ||
type: DoistCardNotificationType | ||
/** | ||
* The action, this should be a URL and is what will be launched when clicked (if provided) | ||
*/ | ||
actionUrl?: string | ||
/** | ||
* This is the text that will be displayed as the notification action, clicking it will take you to | ||
* what has been assigned to `actionUrl` | ||
*/ | ||
actionText?: string | ||
} | ||
|
||
/** | ||
* The bridge action that closes the UI extension within Twist/Todoist. | ||
*/ | ||
export type FinishedBridge = { | ||
bridgeActionType: 'finished' | ||
} | ||
|
||
/** | ||
* The bridge action that inserts text into the relevant text input field. | ||
*/ | ||
export type ComposerAppendBridge = { | ||
bridgeActionType: 'composer.append' | ||
text: string | ||
} | ||
|
||
/** | ||
* The bridge action that displays a notification and optional action. The action will open a URL in the browser. | ||
*/ | ||
export type DisplayNotificationBridge = { | ||
bridgeActionType: 'display.notification' | ||
notification: DoistCardBridgeNotification | ||
} | ||
|
||
/** | ||
* The bridge action that will trigger a sync request in Todoist. The bridge accepts notifications | ||
* for both success, and error, scenarios. | ||
*/ | ||
export type RequestTodoistSyncBridge = { | ||
bridgeActionType: 'request.sync' | ||
onSuccessNotification?: DoistCardBridgeNotification | ||
onErrorNotification?: DoistCardBridgeNotification | ||
} | ||
|
||
/** | ||
* The bridge represents actions that the server asks the client to invoke locally, | ||
* along with necessary parameters to do so. | ||
*/ | ||
export type DoistCardBridge = | ||
| FinishedBridge | ||
| ComposerAppendBridge | ||
| DisplayNotificationBridge | ||
| RequestTodoistSyncBridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
export * from './bridges' | ||
export * from './data-exchange' | ||
export * from './todoist' | ||
export * from './twist' |
Oops, something went wrong.