@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.
@@ -2,18 +2,18 @@
2
2
  * Pure DOM workbench chrome — no framework dependencies.
3
3
  *
4
4
  * Responsibilities:
5
- * - Two-level navigation: mode (Renderer / Action) scenario
6
- * - Renderer: native capsule-tab bar (scenario.label as plugin title, accent-
7
- * driven selected state; no attachment count / no shortcut hints)
8
- * - Action: <select> (native action has no tab)
9
- * - Four-preset theme selector; applyTheme writes CSS vars to the workbench root
10
- * - Native card shell around the plugin webview slot
11
- * (10 px padding / 8 px radius / 1 px accent border / surfaceElevated bg / no shadow)
12
- * - Viewport centered in host frame; width controlled by a range slider per mode
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
- * - Call log panel (one entry per native plugin→host call)
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 workbench chrome into `root` and return imperative handles.
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.