@clipbus/plugin-sdk 0.8.5 → 0.8.7
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/preview/chrome.d.ts +34 -10
- package/dist/preview/index.cjs +822 -193
- package/dist/preview/index.d.cts +9 -4
- package/dist/preview/index.d.ts +9 -4
- package/dist/preview/index.js +822 -193
- package/dist/preview/inputPanel.d.ts +57 -0
- package/dist/preview/styles.d.ts +18 -14
- package/docs/preview.md +74 -11
- package/package.json +1 -1
package/dist/preview/chrome.d.ts
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
* Pure DOM workbench chrome — no framework dependencies.
|
|
3
3
|
*
|
|
4
4
|
* Responsibilities:
|
|
5
|
-
* -
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - Viewport centered in
|
|
5
|
+
* - Header: Wire Bench wordmark + controls console
|
|
6
|
+
* (Surface toggle, Scenario select, Theme select, Width slider)
|
|
7
|
+
* - Stage: workspace hero (left) + dock (right, position:sticky)
|
|
8
|
+
* - Workspace: ws-head label + ws-surface holding the frozen specimen card
|
|
9
|
+
* subtree (card shell → viewport → webview slot) + dims readout + growth floor
|
|
10
|
+
* - Dock: IN attachment card (Wire Input mount point) over OUT attachment card
|
|
11
|
+
* (Native Calls single-open accordion)
|
|
12
|
+
* - Viewport centered in workspace; width driven by range slider per mode
|
|
13
13
|
* - Fixed-height viewport driven by setHeight calls
|
|
14
14
|
* - Host button strip; click dispatches host-invoke events
|
|
15
15
|
* - clipbus-plugin-set-buttons listener (updates button strip from plugin)
|
|
16
|
-
* -
|
|
16
|
+
* - Native Calls OUT panel: single-open accordion, newest auto-opens
|
|
17
17
|
*/
|
|
18
18
|
import type { PreviewScenario, PreviewWorkbenchOptions } from './types.js';
|
|
19
19
|
import type { PreviewThemePreset } from './theme.js';
|
|
@@ -54,6 +54,11 @@ export interface ChromeHandlers {
|
|
|
54
54
|
export interface ChromeResult {
|
|
55
55
|
/** The <div> slot where the plugin UI should be mounted. */
|
|
56
56
|
slotEl: HTMLElement;
|
|
57
|
+
/**
|
|
58
|
+
* The scroll container of the IN attachment card where renderWireInput()
|
|
59
|
+
* should mount the Wire Input collapsible sections.
|
|
60
|
+
*/
|
|
61
|
+
inputContainer: HTMLElement;
|
|
57
62
|
setViewportHeight(height: number): void;
|
|
58
63
|
/** Update the viewport width imperatively (also moves the slider thumb). */
|
|
59
64
|
setViewportWidth(px: number): void;
|
|
@@ -83,7 +88,26 @@ export interface ChromeResult {
|
|
|
83
88
|
destroy(): void;
|
|
84
89
|
}
|
|
85
90
|
/**
|
|
86
|
-
* Render the
|
|
91
|
+
* Render the Wire Bench chrome into `root` and return imperative handles.
|
|
92
|
+
*
|
|
93
|
+
* DOM structure:
|
|
94
|
+
* .cbp-wb
|
|
95
|
+
* .cbp-wb__header (brand + controls console)
|
|
96
|
+
* .cbp-wb__rule (separator)
|
|
97
|
+
* .cbp-wb__stage
|
|
98
|
+
* .cbp-wb__workspace (hero — fills left column)
|
|
99
|
+
* .cbp-wb__ws-head
|
|
100
|
+
* .cbp-wb__ws-surface
|
|
101
|
+
* .cbp-wb__specimen-wrap
|
|
102
|
+
* .cbp-wb__card-shell [frozen]
|
|
103
|
+
* .cbp-wb__viewport [frozen]
|
|
104
|
+
* .cbp-wb__webview [frozen slotEl]
|
|
105
|
+
* .cbp-wb__strip [frozen]
|
|
106
|
+
* .cbp-wb__ws-dims
|
|
107
|
+
* .cbp-wb__ws-floor
|
|
108
|
+
* .cbp-wb__dock (sticky right column)
|
|
109
|
+
* .cbp-wb__att.cbp-wb__att--in (Wire Input — inputContainer)
|
|
110
|
+
* .cbp-wb__att.cbp-wb__att--out (Native Calls accordion)
|
|
87
111
|
*
|
|
88
112
|
* @param root - Container element (e.g. document.body or a div).
|
|
89
113
|
* @param scenarios - Full list of scenarios.
|