@eworkbase/sdk 0.1.1 → 0.2.0
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/index.d.ts +9 -0
- package/dist/index.js +96 -0
- package/dist/types-CYt_KGKR.d.ts +449 -0
- package/dist/ui/index.css.d.ts +2 -0
- package/dist/ui/index.d.ts +118 -0
- package/dist/ui/index.js +195 -0
- package/{ui → dist/ui}/model.d.ts +5 -3
- package/dist/ui/model.js +38 -0
- package/package.json +23 -11
- package/README.md +0 -442
- package/definition.d.ts +0 -7
- package/definition.js +0 -41
- package/host-services.d.ts +0 -168
- package/host-services.js +0 -4
- package/index.d.ts +0 -8
- package/index.js +0 -8
- package/types.d.ts +0 -246
- package/types.js +0 -56
- package/ui/controller.d.ts +0 -5
- package/ui/controller.js +0 -212
- package/ui/index.css.d.ts +0 -1
- package/ui/index.d.ts +0 -7
- package/ui/index.js +0 -35
- package/ui/model.js +0 -50
- package/ui/types.d.ts +0 -108
- package/ui/types.js +0 -4
- /package/{ui → dist/ui}/index.css +0 -0
package/ui/types.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser authoring API and transport contracts for Workbase plugin views.
|
|
3
|
-
*/
|
|
4
|
-
export type PluginUiPromptType = 'confirm' | 'multi-select' | 'select' | 'text';
|
|
5
|
-
export type PluginUiFileSelectionScope = 'project' | 'workspace';
|
|
6
|
-
export type PluginUiFileSelectionItemType = 'any' | 'directory' | 'file';
|
|
7
|
-
export interface PluginUiContextIdentity {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
}
|
|
10
|
-
export interface PluginUiViewIdentity extends PluginUiContextIdentity {
|
|
11
|
-
readonly pluginId: string;
|
|
12
|
-
readonly title: string;
|
|
13
|
-
}
|
|
14
|
-
export interface PluginUiInitializationPayload {
|
|
15
|
-
readonly locale: string;
|
|
16
|
-
readonly params: Readonly<Record<string, unknown>>;
|
|
17
|
-
readonly project: PluginUiContextIdentity;
|
|
18
|
-
readonly route: string | null;
|
|
19
|
-
readonly theme: string;
|
|
20
|
-
readonly view: PluginUiViewIdentity;
|
|
21
|
-
readonly workspace: PluginUiContextIdentity;
|
|
22
|
-
}
|
|
23
|
-
export interface WorkbasePluginUiDefinition {
|
|
24
|
-
readonly onInit: (payload: PluginUiInitializationPayload) => void | Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
export interface PluginUiCommandExecuteOptions {
|
|
27
|
-
readonly executionId?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface PluginUiNavigateOptions {
|
|
30
|
-
readonly replace?: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface PluginUiToastOptions {
|
|
33
|
-
readonly description: string;
|
|
34
|
-
readonly title: string;
|
|
35
|
-
}
|
|
36
|
-
export interface PluginUiPromptChoice<Value = unknown> {
|
|
37
|
-
readonly label: string;
|
|
38
|
-
readonly value: Value;
|
|
39
|
-
}
|
|
40
|
-
export interface PluginUiPromptOptions<Value = unknown> {
|
|
41
|
-
readonly choices?: readonly PluginUiPromptChoice<Value>[];
|
|
42
|
-
readonly defaultValue?: Value | readonly Value[] | null;
|
|
43
|
-
readonly message: string;
|
|
44
|
-
readonly searchable?: boolean;
|
|
45
|
-
readonly submitLabel?: string;
|
|
46
|
-
readonly title: string;
|
|
47
|
-
readonly type: PluginUiPromptType;
|
|
48
|
-
}
|
|
49
|
-
export interface PluginUiFileFilter {
|
|
50
|
-
readonly extensions: readonly string[];
|
|
51
|
-
readonly name: string;
|
|
52
|
-
}
|
|
53
|
-
export interface PluginUiFileSelectOptions {
|
|
54
|
-
readonly filters?: readonly PluginUiFileFilter[];
|
|
55
|
-
readonly itemType?: PluginUiFileSelectionItemType;
|
|
56
|
-
readonly multiple?: boolean;
|
|
57
|
-
readonly rootPath?: string | null;
|
|
58
|
-
readonly scope?: PluginUiFileSelectionScope;
|
|
59
|
-
readonly title?: string;
|
|
60
|
-
}
|
|
61
|
-
export interface PluginUiOutputOptions {
|
|
62
|
-
readonly content: string;
|
|
63
|
-
readonly description?: string | null;
|
|
64
|
-
readonly id: string;
|
|
65
|
-
readonly status?: string | null;
|
|
66
|
-
readonly title: string;
|
|
67
|
-
}
|
|
68
|
-
export interface PluginUiCommands {
|
|
69
|
-
readonly cancel: <Result = unknown>(executionId: string) => Promise<Result>;
|
|
70
|
-
readonly execute: <Result = unknown>(commandId: string, input: unknown, options?: PluginUiCommandExecuteOptions) => Promise<Result>;
|
|
71
|
-
}
|
|
72
|
-
export interface PluginUiStatus {
|
|
73
|
-
readonly resolve: <Result = unknown>(statusId: string, input: unknown) => Promise<Result>;
|
|
74
|
-
}
|
|
75
|
-
export interface PluginUiView {
|
|
76
|
-
readonly call: <Result = unknown>(method: string, input: unknown) => Promise<Result>;
|
|
77
|
-
}
|
|
78
|
-
export interface WorkbasePluginUi {
|
|
79
|
-
readonly closeOutput: <Result = unknown>(id: string) => Promise<Result>;
|
|
80
|
-
readonly commands: PluginUiCommands;
|
|
81
|
-
readonly navigate: <Result = unknown>(to: string, options?: PluginUiNavigateOptions) => Promise<Result>;
|
|
82
|
-
readonly openOutput: <Result = unknown>(options: PluginUiOutputOptions) => Promise<Result>;
|
|
83
|
-
readonly selectFiles: (options?: PluginUiFileSelectOptions) => Promise<string | readonly string[] | null>;
|
|
84
|
-
readonly showPrompt: <Value = unknown>(options: PluginUiPromptOptions<Value>) => Promise<Value | readonly Value[] | null>;
|
|
85
|
-
readonly showToast: <Result = unknown>(options: PluginUiToastOptions) => Promise<Result>;
|
|
86
|
-
readonly status: PluginUiStatus;
|
|
87
|
-
readonly updateOutput: <Result = unknown>(options: PluginUiOutputOptions) => Promise<Result>;
|
|
88
|
-
readonly view: PluginUiView;
|
|
89
|
-
}
|
|
90
|
-
export interface PluginUiHostError extends Error {
|
|
91
|
-
readonly code: string;
|
|
92
|
-
}
|
|
93
|
-
export interface PluginUiHostMethods {
|
|
94
|
-
readonly call: (method: string, params: unknown) => Promise<unknown>;
|
|
95
|
-
readonly reportContentHeight: (height: number) => Promise<void>;
|
|
96
|
-
readonly reportFatal: (message: string) => Promise<void>;
|
|
97
|
-
}
|
|
98
|
-
export interface PluginUiClientMethods {
|
|
99
|
-
readonly initialize: (payload: unknown) => Promise<void>;
|
|
100
|
-
}
|
|
101
|
-
export interface PluginUiTransportConnection {
|
|
102
|
-
readonly destroy: () => void;
|
|
103
|
-
readonly promise: Promise<PluginUiHostMethods>;
|
|
104
|
-
}
|
|
105
|
-
export interface PluginUiControllerOptions {
|
|
106
|
-
readonly connectToHost: (methods: PluginUiClientMethods) => PluginUiTransportConnection;
|
|
107
|
-
readonly targetWindow: Window & typeof globalThis;
|
|
108
|
-
}
|
package/ui/types.js
DELETED
|
File without changes
|