@ansible-flow/designer 0.0.0-stage → 0.85.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/LICENSE +21 -0
- package/README.md +9 -2
- package/THIRD_PARTY_NOTICES.md +41 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +200 -0
- package/dist/transport.d.ts +16 -0
- package/package.json +31 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ThemeKind } from '@ansible-flow/core/theme';
|
|
2
|
+
import type { DesignerTransport } from './transport';
|
|
3
|
+
export type { ThemeKind } from '@ansible-flow/core/theme';
|
|
4
|
+
export type { DesignerTransport } from './transport';
|
|
5
|
+
/** A theme kind, or `auto`: light or dark as the browser prefers, and it follows a change. */
|
|
6
|
+
export type ThemeChoice = ThemeKind | 'auto';
|
|
7
|
+
export interface MountOptions {
|
|
8
|
+
/** How the designer talks to its host. */
|
|
9
|
+
transport: DesignerTransport;
|
|
10
|
+
/** Default `auto`. */
|
|
11
|
+
theme?: ThemeChoice;
|
|
12
|
+
/**
|
|
13
|
+
* The designer only shows and runs the flow (AFD-270), whatever the host's `config` says. The
|
|
14
|
+
* host must still refuse what a viewer may not send (`@ansible-flow/core/viewer`).
|
|
15
|
+
*/
|
|
16
|
+
viewer?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface MountedDesigner {
|
|
19
|
+
setTheme(theme: ThemeChoice): void;
|
|
20
|
+
/** Removes the designer from the element. The page's theme class and variables stay. */
|
|
21
|
+
unmount(): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Shows the designer in `el`. The designer is made to be the whole page, as it is in a VS Code
|
|
25
|
+
* webview: its stylesheet styles <body>, its keys are handled on the window and its menus open on
|
|
26
|
+
* <body>. Give it a page or an iframe of its own; `el` fills its parent.
|
|
27
|
+
*/
|
|
28
|
+
export declare function mount(el: HTMLElement, options: MountOptions): MountedDesigner;
|