@kdlbs/plugin-sdk 0.3.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdlbs/plugin-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Versioned frontend contracts for Kandev runtime plugins",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/sdk-release.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "sdk_version": "0.3.0",
4
- "host_release": "0.102.0",
5
- "min_kandev_version": "0.102.0",
3
+ "sdk_version": "0.4.0",
4
+ "host_release": "0.103.0",
5
+ "min_kandev_version": "0.103.0",
6
6
  "api_versions": [
7
7
  1,
8
8
  2
package/src/index.ts CHANGED
@@ -6,6 +6,22 @@
6
6
  * all runtime values during initialize and use these structural types at
7
7
  * compile time only.
8
8
  */
9
+
10
+ /** Host-resolved complete grouping, distinct from page-local task-list facets. */
11
+ export type SidebarGroupingReference = `plugin:${string}:${string}`;
12
+ export interface SidebarGroupingProvider {
13
+ reference: SidebarGroupingReference;
14
+ label: string;
15
+ labelKey?: string;
16
+ generation: string;
17
+ }
18
+ export interface SidebarGroupingSnapshot {
19
+ version: 1;
20
+ revision: string;
21
+ complete: true;
22
+ groups: Array<{ id: string; label: string; color?: string }>;
23
+ memberships: Array<{ task_id: string; group_id: string }>;
24
+ }
9
25
  export type HostNode = unknown;
10
26
  // `any` is deliberate at these two React compatibility seams. Reproducing
11
27
  // React's overloaded createElement and recursive ReactNode types would make
@@ -1486,7 +1502,19 @@ export interface IntegrationSettingsActionProps {
1486
1502
  surface: IntegrationSettingsActionSurface;
1487
1503
  }
1488
1504
 
1505
+ /** Host-selected, read-only file bytes. The host grants access before mounting. */
1506
+ export interface FileViewerProps {
1507
+ file: { name: string; sizeBytes: number; generation: string };
1508
+ readBytes(signal: AbortSignal): Promise<ArrayBuffer>;
1509
+ }
1510
+ export interface FileViewerRegistration {
1511
+ id: string;
1512
+ Component: Component<FileViewerProps>;
1513
+ }
1514
+
1489
1515
  export interface PluginRegistry {
1516
+ /** Register a viewer declared in ui.file_viewers. */
1517
+ registerFileViewer(registration: FileViewerRegistration): void;
1490
1518
  registerTranslations(catalogs: PluginTranslationCatalogs): void;
1491
1519
  registerRoute(path: string, component: Component, options?: PluginRouteOptions): void;
1492
1520
  registerNavItem(item: {