@get-bb/plugin-sdk 0.6.164 → 0.6.169
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/README.md +1 -1
- package/bundled-types/bb-plugin-sdk-app.d.ts +137 -106
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +6 -6
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +5 -2
- package/bundled-types/bb-plugin-sdk-internal-thread-event-gate.d.ts +1 -1
- package/bundled-types/bb-plugin-sdk-internal-thread-status.d.ts +2 -2
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +7 -3
- package/bundled-types/bb-plugin-sdk.d.ts +166 -133
- package/dist/internal/host-policy.js +10 -11
- package/dist/internal/plugin-app-collector.js +15 -3
- package/dist/testing/app.js +20 -4
- package/dist/testing/index.js +10 -11
- package/package.json +1 -1
|
@@ -826,7 +826,7 @@ interface PluginTurnFailedEvent {
|
|
|
826
826
|
originPluginId: string | null;
|
|
827
827
|
}
|
|
828
828
|
/**
|
|
829
|
-
* Lifecycle events a plugin can observe with `bb.events.on
|
|
829
|
+
* Lifecycle events a plugin can observe with `bb.events.on`.
|
|
830
830
|
*
|
|
831
831
|
* **Events are announcements core makes.** Something already happened; a
|
|
832
832
|
* handler is told about it and whatever it returns is IGNORED. Handlers run
|
|
@@ -287,8 +287,8 @@ interface PluginThreadStatus {
|
|
|
287
287
|
* the content-script context's `experimental_setThreadRowStatus` (see
|
|
288
288
|
* {@link PluginSdkApp.useSidebarThreadRowStatus}). bb's row draws it in
|
|
289
289
|
* place of the draft glyph while it is set; a replaced list should do the
|
|
290
|
-
* same so a status
|
|
291
|
-
*
|
|
290
|
+
* same so a status another plugin set does not vanish when the list changes
|
|
291
|
+
* hands. No bundled plugin sets one; only content scripts can.
|
|
292
292
|
*/
|
|
293
293
|
type PluginSidebarThreadRowStatus = PluginComposerThreadRowStatus;
|
|
294
294
|
/** Host-rendered status that temporarily replaces a thread's draft glyph. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import * as _get_bb_plugin_sdk from '@get-bb/plugin-sdk';
|
|
9
|
-
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadHeaderRowRegistration, ExperimentalThreadHeaderTitleRegistration, ExperimentalThreadContextCardRowRegistration,
|
|
9
|
+
import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, ExperimentalThreadContextCardSectionRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, InternalDoNotUseSetupGuideSectionRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, ExperimentalThreadHeaderRowRegistration, ExperimentalThreadHeaderTitleRegistration, ExperimentalThreadContextCardRowRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalMessageMetadataRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFilePreviewOptions, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, ExperimentalPluginPanelPage, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, ExperimentalThreadContextKind, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalFilePreviewFile, ExperimentalServers, ExperimentalPanelController, ExperimentalPanelTabs, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
|
|
10
10
|
import { ComponentType, ReactNode } from 'react';
|
|
11
11
|
import { RenderResult } from '@testing-library/react';
|
|
12
12
|
|
|
@@ -56,6 +56,9 @@ type PluginNavPanelFixedTabRegistration = {
|
|
|
56
56
|
layout?: "flush" | "padded";
|
|
57
57
|
experimental_target?: _get_bb_plugin_sdk.ExperimentalFixedTabTargetContract<_get_bb_plugin_sdk.JsonValue>;
|
|
58
58
|
};
|
|
59
|
+
interface CollectedThreadContextCardSectionRegistration extends ExperimentalThreadContextCardSectionRegistration {
|
|
60
|
+
legacyTitle: string | null;
|
|
61
|
+
}
|
|
59
62
|
type CollectedPluginProviderIconRegistration = Omit<PluginProviderIconRegistration, "providerKind"> & {
|
|
60
63
|
providerKind: PluginProviderIconRegistration["providerKind"] | "all";
|
|
61
64
|
};
|
|
@@ -247,7 +250,7 @@ interface CapturedPluginApp {
|
|
|
247
250
|
threadHeaderRows: ExperimentalThreadHeaderRowRegistration[];
|
|
248
251
|
threadHeaderTitles: ExperimentalThreadHeaderTitleRegistration[];
|
|
249
252
|
threadContextCardRows: ExperimentalThreadContextCardRowRegistration[];
|
|
250
|
-
threadContextCardSections:
|
|
253
|
+
threadContextCardSections: CollectedThreadContextCardSectionRegistration[];
|
|
251
254
|
threadActions: PluginThreadActionRegistration<unknown>[];
|
|
252
255
|
browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
|
|
253
256
|
fileOpeners: PluginFileOpenerRegistration[];
|
|
@@ -331,10 +334,11 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
331
334
|
experimental_rpcContract?: NoInfer<Contract>;
|
|
332
335
|
/** `useSettings()` values; omitted → `{ values: undefined, isLoading: false }`. */
|
|
333
336
|
settings?: Record<string, string | number | boolean>;
|
|
334
|
-
/** `useBbContext()` selection;
|
|
337
|
+
/** `useBbContext()` selection; each defaults to null. */
|
|
335
338
|
context?: {
|
|
336
339
|
projectId?: string | null;
|
|
337
340
|
threadId?: string | null;
|
|
341
|
+
experimental_pluginPanel?: ExperimentalPluginPanelPage | null;
|
|
338
342
|
};
|
|
339
343
|
/** `experimental_usePluginId()` value; defaults to `test-plugin`. */
|
|
340
344
|
pluginId?: string;
|