@punica/editor 1.6.6 → 1.6.8
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
|
@@ -502,6 +502,61 @@ declare module 'punica' {
|
|
|
502
502
|
buildItems: (row: HTMLElement) => MenuItemSpec[];
|
|
503
503
|
onSelect: (value: string, row: HTMLElement) => void;
|
|
504
504
|
}): () => void;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* A capability definition, loosely typed so any surface (extension
|
|
508
|
+
* viewer, llms viewer, ivy-node explorer, capability catalog) can pass
|
|
509
|
+
* its own record shape. Only the fields the detail renderer reads are
|
|
510
|
+
* named; the index signature carries everything else through to the
|
|
511
|
+
* raw-definition block.
|
|
512
|
+
*/
|
|
513
|
+
interface CapabilityDefinitionLike {
|
|
514
|
+
id?: string;
|
|
515
|
+
title?: string;
|
|
516
|
+
description?: string;
|
|
517
|
+
version?: string;
|
|
518
|
+
inputs?: { schema?: unknown };
|
|
519
|
+
outputs?: {
|
|
520
|
+
kind?: string;
|
|
521
|
+
resultEvent?: string;
|
|
522
|
+
errorEvent?: string;
|
|
523
|
+
schema?: unknown;
|
|
524
|
+
};
|
|
525
|
+
policy?: { risk?: string; approval?: string };
|
|
526
|
+
tags?: string[];
|
|
527
|
+
sideEffects?: string[];
|
|
528
|
+
[key: string]: unknown;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
interface CapabilityDetailOptions {
|
|
532
|
+
/** Meta-line "source:" label (extension name / "ivy-node" / "core"). */
|
|
533
|
+
source?: string;
|
|
534
|
+
/**
|
|
535
|
+
* true → a click-to-expand row with a chevron (for lists). Omit or
|
|
536
|
+
* false → the detail body is rendered directly, always visible (for a
|
|
537
|
+
* single-capability tab).
|
|
538
|
+
*/
|
|
539
|
+
collapsible?: boolean;
|
|
540
|
+
/** Initial expanded state when `collapsible`. */
|
|
541
|
+
open?: boolean;
|
|
542
|
+
/**
|
|
543
|
+
* Consumer-specific sections appended after Tags and before the raw
|
|
544
|
+
* block (e.g. an instruction class's Execution Defaults / System
|
|
545
|
+
* Prompt).
|
|
546
|
+
*/
|
|
547
|
+
extraSections?: HTMLElement[];
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Render one capability's detail in the shared catalog look: bold title
|
|
552
|
+
* + mono id, risk/approval pills, a source·id·version·approval meta
|
|
553
|
+
* line, Inputs/Outputs schema blocks, Tags, and a collapsed
|
|
554
|
+
* "Show raw definition" toggle. CSS is injected once (theme-aware).
|
|
555
|
+
*/
|
|
556
|
+
function createCapabilityDetail(
|
|
557
|
+
def: CapabilityDefinitionLike,
|
|
558
|
+
options?: CapabilityDetailOptions
|
|
559
|
+
): HTMLElement;
|
|
505
560
|
}
|
|
506
561
|
|
|
507
562
|
namespace Theme {
|