@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/index.d.cts
CHANGED
|
@@ -29,18 +29,23 @@ export type { FakeHostHooks } from './fakeHost.js';
|
|
|
29
29
|
export { defaultDarkTheme, defaultLightTheme } from './theme.js';
|
|
30
30
|
export { previewThemePresets, DEFAULT_THEME_KEY, getThemePreset, } from './theme.js';
|
|
31
31
|
export { groupScenariosByMode, resolveViewportWidth, clampWidth } from './chrome.js';
|
|
32
|
+
export { classifyWireSections, parsePayloadJson } from './inputPanel.js';
|
|
33
|
+
export type { WireSection } from './inputPanel.js';
|
|
32
34
|
export { PLUGIN_CALL_HANDLER_NAME, WINDOW_SET_HEIGHT_METHOD, } from '../generated/wireConstants.generated.js';
|
|
33
35
|
/**
|
|
34
36
|
* Mount a preview workbench into `root`.
|
|
35
37
|
*
|
|
36
38
|
* Orchestration order:
|
|
37
39
|
* 1. Inject workbench styles.
|
|
38
|
-
* 2. Install fake host (hooks → log
|
|
39
|
-
* 3. Render chrome (
|
|
40
|
+
* 2. Install fake host (hooks → OUT log + viewport height).
|
|
41
|
+
* 3. Render chrome (header/controls, workspace hero, dock with IN/OUT cards).
|
|
40
42
|
* 4. On each scenario activation:
|
|
41
43
|
* a. computeWirePayloads(scenario, presetKey) → injectWire (host→plugin bootstrap).
|
|
42
|
-
* b.
|
|
43
|
-
*
|
|
44
|
+
* b. applyThemeCssVars(slotEl, ...) — mirror --clipbus-* vars to plugin slot.
|
|
45
|
+
* c. renderWireInput(inputContainer, payloads) — populate IN Wire Input panel.
|
|
46
|
+
* d. Call opts.mount(slotEl, { scenario }) → get cleanup fn.
|
|
47
|
+
* 5. On theme change: re-inject wire (no remount) + re-render Wire Input so
|
|
48
|
+
* the theme section reflects the new preset.
|
|
44
49
|
* 6. On scenario switch: cleanup previous → repeat step 4.
|
|
45
50
|
*/
|
|
46
51
|
export declare function createPreviewWorkbench(root: HTMLElement, opts: PreviewWorkbenchOptions): void;
|
package/dist/preview/index.d.ts
CHANGED
|
@@ -29,18 +29,23 @@ export type { FakeHostHooks } from './fakeHost.js';
|
|
|
29
29
|
export { defaultDarkTheme, defaultLightTheme } from './theme.js';
|
|
30
30
|
export { previewThemePresets, DEFAULT_THEME_KEY, getThemePreset, } from './theme.js';
|
|
31
31
|
export { groupScenariosByMode, resolveViewportWidth, clampWidth } from './chrome.js';
|
|
32
|
+
export { classifyWireSections, parsePayloadJson } from './inputPanel.js';
|
|
33
|
+
export type { WireSection } from './inputPanel.js';
|
|
32
34
|
export { PLUGIN_CALL_HANDLER_NAME, WINDOW_SET_HEIGHT_METHOD, } from '../generated/wireConstants.generated.js';
|
|
33
35
|
/**
|
|
34
36
|
* Mount a preview workbench into `root`.
|
|
35
37
|
*
|
|
36
38
|
* Orchestration order:
|
|
37
39
|
* 1. Inject workbench styles.
|
|
38
|
-
* 2. Install fake host (hooks → log
|
|
39
|
-
* 3. Render chrome (
|
|
40
|
+
* 2. Install fake host (hooks → OUT log + viewport height).
|
|
41
|
+
* 3. Render chrome (header/controls, workspace hero, dock with IN/OUT cards).
|
|
40
42
|
* 4. On each scenario activation:
|
|
41
43
|
* a. computeWirePayloads(scenario, presetKey) → injectWire (host→plugin bootstrap).
|
|
42
|
-
* b.
|
|
43
|
-
*
|
|
44
|
+
* b. applyThemeCssVars(slotEl, ...) — mirror --clipbus-* vars to plugin slot.
|
|
45
|
+
* c. renderWireInput(inputContainer, payloads) — populate IN Wire Input panel.
|
|
46
|
+
* d. Call opts.mount(slotEl, { scenario }) → get cleanup fn.
|
|
47
|
+
* 5. On theme change: re-inject wire (no remount) + re-render Wire Input so
|
|
48
|
+
* the theme section reflects the new preset.
|
|
44
49
|
* 6. On scenario switch: cleanup previous → repeat step 4.
|
|
45
50
|
*/
|
|
46
51
|
export declare function createPreviewWorkbench(root: HTMLElement, opts: PreviewWorkbenchOptions): void;
|