@seed-ship/mcp-ui-solid 2.2.3 → 2.2.6
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/components/ComponentToolbar.cjs +76 -0
- package/dist/components/ComponentToolbar.cjs.map +1 -0
- package/dist/components/ComponentToolbar.d.ts +47 -0
- package/dist/components/ComponentToolbar.d.ts.map +1 -0
- package/dist/components/ComponentToolbar.js +76 -0
- package/dist/components/ComponentToolbar.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/services/component-registry.cjs +405 -1
- package/dist/services/component-registry.cjs.map +1 -1
- package/dist/services/component-registry.d.ts +40 -0
- package/dist/services/component-registry.d.ts.map +1 -1
- package/dist/services/component-registry.js +406 -2
- package/dist/services/component-registry.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ComponentToolbar.tsx +101 -0
- package/src/index.ts +2 -0
- package/src/services/component-registry.test.ts +49 -41
- package/src/services/component-registry.ts +444 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -48,6 +48,46 @@ export declare const CarouselRegistry: ComponentRegistryEntry;
|
|
|
48
48
|
* Display downloadable artifacts like generated files
|
|
49
49
|
*/
|
|
50
50
|
export declare const ArtifactRegistry: ComponentRegistryEntry;
|
|
51
|
+
/**
|
|
52
|
+
* Code Block Registry Entry
|
|
53
|
+
*/
|
|
54
|
+
export declare const CodeRegistry: ComponentRegistryEntry;
|
|
55
|
+
/**
|
|
56
|
+
* Map Registry Entry
|
|
57
|
+
*/
|
|
58
|
+
export declare const MapRegistry: ComponentRegistryEntry;
|
|
59
|
+
/**
|
|
60
|
+
* Form Registry Entry
|
|
61
|
+
*/
|
|
62
|
+
export declare const FormRegistry: ComponentRegistryEntry;
|
|
63
|
+
/**
|
|
64
|
+
* Modal Registry Entry
|
|
65
|
+
*/
|
|
66
|
+
export declare const ModalRegistry: ComponentRegistryEntry;
|
|
67
|
+
/**
|
|
68
|
+
* Action Group Registry Entry
|
|
69
|
+
*/
|
|
70
|
+
export declare const ActionGroupRegistry: ComponentRegistryEntry;
|
|
71
|
+
/**
|
|
72
|
+
* Image Gallery Registry Entry
|
|
73
|
+
*/
|
|
74
|
+
export declare const ImageGalleryRegistry: ComponentRegistryEntry;
|
|
75
|
+
/**
|
|
76
|
+
* Video Registry Entry
|
|
77
|
+
*/
|
|
78
|
+
export declare const VideoRegistry: ComponentRegistryEntry;
|
|
79
|
+
/**
|
|
80
|
+
* Iframe Registry Entry
|
|
81
|
+
*/
|
|
82
|
+
export declare const IframeRegistry: ComponentRegistryEntry;
|
|
83
|
+
/**
|
|
84
|
+
* Image Registry Entry
|
|
85
|
+
*/
|
|
86
|
+
export declare const ImageRegistry: ComponentRegistryEntry;
|
|
87
|
+
/**
|
|
88
|
+
* Link Registry Entry
|
|
89
|
+
*/
|
|
90
|
+
export declare const LinkRegistry: ComponentRegistryEntry;
|
|
51
91
|
/**
|
|
52
92
|
* Component Registry - All components indexed by type
|
|
53
93
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../../src/services/component-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGrE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,sBA0GhC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,sBAqE3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,sBA2D5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,sBA2C1B,CAAA;AAMD;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,sBAsC1B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,sBAqD5B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,sBAgD5B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAsB9B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAsC9B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,aAAa,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../../src/services/component-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGrE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,sBA0GhC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,sBAqE3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,sBA2D5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,sBA2C1B,CAAA;AAMD;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,sBAsC1B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,sBAqD5B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,sBAgD5B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAsB9B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAsC9B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,sBAkC1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,sBAgDzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,sBAiD1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,sBAgC3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,sBA+CjC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,sBA+ClC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,sBAiC3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,sBA+B5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,sBA+B3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,sBA+B1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,aAAa,EAAE,sBAAsB,CAsBvE,CAAA;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,sBAAsB,GAAG,SAAS,CAEzF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAc1C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,GAAG,GACV;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAmB5D"}
|
|
@@ -478,6 +478,389 @@ const ArtifactRegistry = {
|
|
|
478
478
|
renderTimeout: 1e3
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
|
+
const CodeRegistry = {
|
|
482
|
+
type: "code",
|
|
483
|
+
name: "CodeBlock",
|
|
484
|
+
description: "Render syntax-highlighted code blocks with line numbers, copy button, and word wrap toggle. Supports all languages via highlight.js auto-detection. Best for displaying source code, configuration files, CLI output, or API responses.",
|
|
485
|
+
schema: {
|
|
486
|
+
type: "object",
|
|
487
|
+
properties: {
|
|
488
|
+
code: { type: "string", description: "The code content to display" },
|
|
489
|
+
language: { type: "string", description: "Programming language for syntax highlighting (auto-detected if omitted)" },
|
|
490
|
+
filename: { type: "string", description: "Filename shown in header bar" },
|
|
491
|
+
showLineNumbers: { type: "boolean", description: "Show line numbers (default: true)" },
|
|
492
|
+
startLine: { type: "number", description: "Starting line number (default: 1)" },
|
|
493
|
+
maxHeight: { type: "string", description: "CSS max-height for scrollable code blocks" },
|
|
494
|
+
theme: { type: "string", enum: ["light", "dark"], description: "Color theme (follows system preference by default)" }
|
|
495
|
+
},
|
|
496
|
+
required: ["code"]
|
|
497
|
+
},
|
|
498
|
+
examples: [
|
|
499
|
+
{
|
|
500
|
+
query: "Show me how to connect to the API",
|
|
501
|
+
component: {
|
|
502
|
+
id: "example-code-1",
|
|
503
|
+
type: "code",
|
|
504
|
+
position: { colStart: 1, colSpan: 8 },
|
|
505
|
+
params: {
|
|
506
|
+
code: 'const client = new MCPClient({ url: "https://api.example.com" });\nawait client.connect();\nconst result = await client.query("SELECT * FROM documents");',
|
|
507
|
+
language: "typescript",
|
|
508
|
+
filename: "example.ts"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
514
|
+
};
|
|
515
|
+
const MapRegistry = {
|
|
516
|
+
type: "map",
|
|
517
|
+
name: "InteractiveMap",
|
|
518
|
+
description: "Render interactive maps with markers using Leaflet. Supports marker clustering, custom tile layers, and auto-fitting bounds. Best for displaying geographic data with up to 1000 markers.",
|
|
519
|
+
schema: {
|
|
520
|
+
type: "object",
|
|
521
|
+
properties: {
|
|
522
|
+
center: { type: "array", items: { type: "number" }, minItems: 2, maxItems: 2, description: "Map center [lat, lng]" },
|
|
523
|
+
zoom: { type: "number", description: "Zoom level (1-18, default: 13)" },
|
|
524
|
+
markers: {
|
|
525
|
+
type: "array",
|
|
526
|
+
items: {
|
|
527
|
+
type: "object",
|
|
528
|
+
properties: {
|
|
529
|
+
position: { type: "array", items: { type: "number" }, minItems: 2, maxItems: 2 },
|
|
530
|
+
title: { type: "string" },
|
|
531
|
+
popup: { type: "string" }
|
|
532
|
+
},
|
|
533
|
+
required: ["position"]
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
height: { type: "string", description: "CSS height (default: 400px)" },
|
|
537
|
+
fitBounds: { type: "boolean", description: "Auto-fit to show all markers" },
|
|
538
|
+
clustering: { type: "boolean", description: "Enable marker clustering for large datasets" }
|
|
539
|
+
},
|
|
540
|
+
required: []
|
|
541
|
+
},
|
|
542
|
+
examples: [
|
|
543
|
+
{
|
|
544
|
+
query: "Show office locations on a map",
|
|
545
|
+
component: {
|
|
546
|
+
id: "example-map-1",
|
|
547
|
+
type: "map",
|
|
548
|
+
position: { colStart: 1, colSpan: 12 },
|
|
549
|
+
params: {
|
|
550
|
+
center: [48.8566, 2.3522],
|
|
551
|
+
zoom: 5,
|
|
552
|
+
markers: [
|
|
553
|
+
{ position: [48.8566, 2.3522], tooltip: "Paris", popup: "HQ — 120 employees" },
|
|
554
|
+
{ position: [51.5074, -0.1278], tooltip: "London", popup: "UK Office — 45 employees" }
|
|
555
|
+
],
|
|
556
|
+
fitBounds: true
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
562
|
+
};
|
|
563
|
+
const FormRegistry = {
|
|
564
|
+
type: "form",
|
|
565
|
+
name: "Form",
|
|
566
|
+
description: "Render interactive forms with text inputs, selects, checkboxes, date pickers, and conditional fields. Supports persistence, validation, and submit actions that trigger MCP tool calls.",
|
|
567
|
+
schema: {
|
|
568
|
+
type: "object",
|
|
569
|
+
properties: {
|
|
570
|
+
title: { type: "string", description: "Form title" },
|
|
571
|
+
fields: {
|
|
572
|
+
type: "array",
|
|
573
|
+
items: {
|
|
574
|
+
type: "object",
|
|
575
|
+
properties: {
|
|
576
|
+
name: { type: "string" },
|
|
577
|
+
label: { type: "string" },
|
|
578
|
+
type: { type: "string", enum: ["text", "number", "email", "password", "textarea", "select", "checkbox", "radio", "date"] },
|
|
579
|
+
required: { type: "boolean" },
|
|
580
|
+
placeholder: { type: "string" },
|
|
581
|
+
options: { type: "array", items: { type: "object", properties: { label: { type: "string" }, value: { type: "string" } } } }
|
|
582
|
+
},
|
|
583
|
+
required: ["name", "label", "type"]
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
submitLabel: { type: "string", description: 'Submit button text (default: "Submit")' },
|
|
587
|
+
layout: { type: "string", enum: ["vertical", "horizontal", "inline"] }
|
|
588
|
+
},
|
|
589
|
+
required: ["fields"]
|
|
590
|
+
},
|
|
591
|
+
examples: [
|
|
592
|
+
{
|
|
593
|
+
query: "Create a document upload form",
|
|
594
|
+
component: {
|
|
595
|
+
id: "example-form-1",
|
|
596
|
+
type: "form",
|
|
597
|
+
position: { colStart: 1, colSpan: 6 },
|
|
598
|
+
params: {
|
|
599
|
+
title: "Upload Document",
|
|
600
|
+
fields: [
|
|
601
|
+
{ name: "title", label: "Document Title", type: "text", required: true },
|
|
602
|
+
{ name: "category", label: "Category", type: "select", options: [{ label: "Report", value: "report" }, { label: "Invoice", value: "invoice" }] },
|
|
603
|
+
{ name: "notes", label: "Notes", type: "textarea" }
|
|
604
|
+
],
|
|
605
|
+
submitLabel: "Upload"
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
611
|
+
};
|
|
612
|
+
const ModalRegistry = {
|
|
613
|
+
type: "modal",
|
|
614
|
+
name: "Modal",
|
|
615
|
+
description: "Render a dialog overlay with Portal rendering. Supports sizes from small to fullscreen, close on Escape/backdrop, and nested content. Best for confirmations, detail views, and focused interactions.",
|
|
616
|
+
schema: {
|
|
617
|
+
type: "object",
|
|
618
|
+
properties: {
|
|
619
|
+
title: { type: "string", description: "Modal header title" },
|
|
620
|
+
size: { type: "string", enum: ["sm", "md", "lg", "xl", "full"], description: "Modal width (default: md)" },
|
|
621
|
+
showClose: { type: "boolean", description: "Show close button (default: true)" },
|
|
622
|
+
closeOnEscape: { type: "boolean", description: "Close on Escape key (default: true)" },
|
|
623
|
+
closeOnBackdrop: { type: "boolean", description: "Close on backdrop click (default: true)" },
|
|
624
|
+
maxHeight: { type: "string", description: "CSS max-height for scrollable content" }
|
|
625
|
+
},
|
|
626
|
+
required: []
|
|
627
|
+
},
|
|
628
|
+
examples: [
|
|
629
|
+
{
|
|
630
|
+
query: "Show document details in a dialog",
|
|
631
|
+
component: {
|
|
632
|
+
id: "example-modal-1",
|
|
633
|
+
type: "modal",
|
|
634
|
+
position: { colStart: 1, colSpan: 12 },
|
|
635
|
+
params: {
|
|
636
|
+
title: "Document Details",
|
|
637
|
+
size: "lg"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
643
|
+
};
|
|
644
|
+
const ActionGroupRegistry = {
|
|
645
|
+
type: "action-group",
|
|
646
|
+
name: "ActionGroup",
|
|
647
|
+
description: "Render a group of action buttons in horizontal, vertical, or grid layout. Each action triggers an MCP tool call. Best for presenting multiple related actions like CRUD operations or workflow steps.",
|
|
648
|
+
schema: {
|
|
649
|
+
type: "object",
|
|
650
|
+
properties: {
|
|
651
|
+
actions: {
|
|
652
|
+
type: "array",
|
|
653
|
+
items: {
|
|
654
|
+
type: "object",
|
|
655
|
+
properties: {
|
|
656
|
+
label: { type: "string" },
|
|
657
|
+
toolName: { type: "string" },
|
|
658
|
+
params: { type: "object" },
|
|
659
|
+
variant: { type: "string", enum: ["primary", "secondary", "danger", "ghost"] },
|
|
660
|
+
icon: { type: "string" }
|
|
661
|
+
},
|
|
662
|
+
required: ["label", "toolName"]
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
layout: { type: "string", enum: ["horizontal", "vertical", "grid"], description: "Button layout" },
|
|
666
|
+
label: { type: "string", description: "Group label" }
|
|
667
|
+
},
|
|
668
|
+
required: ["actions"]
|
|
669
|
+
},
|
|
670
|
+
examples: [
|
|
671
|
+
{
|
|
672
|
+
query: "Show actions for this document",
|
|
673
|
+
component: {
|
|
674
|
+
id: "example-action-group-1",
|
|
675
|
+
type: "action-group",
|
|
676
|
+
position: { colStart: 1, colSpan: 6 },
|
|
677
|
+
params: {
|
|
678
|
+
label: "Document Actions",
|
|
679
|
+
actions: [
|
|
680
|
+
{ label: "Download", type: "button", action: "tool-call", toolName: "document_download", params: { id: "123" }, variant: "primary" },
|
|
681
|
+
{ label: "Share", type: "button", action: "tool-call", toolName: "document_share", params: { id: "123" }, variant: "secondary" },
|
|
682
|
+
{ label: "Delete", type: "button", action: "tool-call", toolName: "document_delete", params: { id: "123" }, variant: "danger" }
|
|
683
|
+
],
|
|
684
|
+
layout: "horizontal"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
690
|
+
};
|
|
691
|
+
const ImageGalleryRegistry = {
|
|
692
|
+
type: "image-gallery",
|
|
693
|
+
name: "ImageGallery",
|
|
694
|
+
description: "Render a grid of images with lightbox overlay for fullscreen viewing. Supports captions, configurable columns, aspect ratios, and keyboard navigation in lightbox mode.",
|
|
695
|
+
schema: {
|
|
696
|
+
type: "object",
|
|
697
|
+
properties: {
|
|
698
|
+
title: { type: "string", description: "Gallery title" },
|
|
699
|
+
images: {
|
|
700
|
+
type: "array",
|
|
701
|
+
items: {
|
|
702
|
+
type: "object",
|
|
703
|
+
properties: {
|
|
704
|
+
url: { type: "string", description: "Image URL" },
|
|
705
|
+
alt: { type: "string", description: "Alt text" },
|
|
706
|
+
caption: { type: "string", description: "Caption text" },
|
|
707
|
+
thumbnail: { type: "string", description: "Thumbnail URL (optional, falls back to url)" }
|
|
708
|
+
},
|
|
709
|
+
required: ["url"]
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
columns: { type: "number", enum: [2, 3, 4, 5], description: "Grid columns (default: 3)" },
|
|
713
|
+
aspectRatio: { type: "string", enum: ["1:1", "16:9", "4:3", "auto"] },
|
|
714
|
+
lightbox: { type: "boolean", description: "Enable lightbox overlay (default: true)" }
|
|
715
|
+
},
|
|
716
|
+
required: ["images"]
|
|
717
|
+
},
|
|
718
|
+
examples: [
|
|
719
|
+
{
|
|
720
|
+
query: "Show document thumbnails",
|
|
721
|
+
component: {
|
|
722
|
+
id: "example-gallery-1",
|
|
723
|
+
type: "image-gallery",
|
|
724
|
+
position: { colStart: 1, colSpan: 12 },
|
|
725
|
+
params: {
|
|
726
|
+
title: "Recent Documents",
|
|
727
|
+
images: [
|
|
728
|
+
{ url: "/thumbnails/doc1.png", alt: "Q4 Report", caption: "Q4 Report — 24 pages" },
|
|
729
|
+
{ url: "/thumbnails/doc2.png", alt: "Invoice #4521", caption: "Invoice #4521" }
|
|
730
|
+
],
|
|
731
|
+
columns: 4
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
737
|
+
};
|
|
738
|
+
const VideoRegistry = {
|
|
739
|
+
type: "video",
|
|
740
|
+
name: "Video",
|
|
741
|
+
description: "Embed video from YouTube, Vimeo, or direct URLs. Auto-detects provider from URL and renders appropriate embed. Supports aspect ratios, autoplay, and start time.",
|
|
742
|
+
schema: {
|
|
743
|
+
type: "object",
|
|
744
|
+
properties: {
|
|
745
|
+
url: { type: "string", description: "Video URL (YouTube, Vimeo, or direct)" },
|
|
746
|
+
title: { type: "string", description: "Video title" },
|
|
747
|
+
caption: { type: "string", description: "Caption below video" },
|
|
748
|
+
aspectRatio: { type: "string", enum: ["16:9", "4:3", "1:1", "21:9"], description: "Aspect ratio (default: 16:9)" },
|
|
749
|
+
autoplay: { type: "boolean", description: "Auto-play video" },
|
|
750
|
+
startTime: { type: "number", description: "Start time in seconds" }
|
|
751
|
+
},
|
|
752
|
+
required: ["url"]
|
|
753
|
+
},
|
|
754
|
+
examples: [
|
|
755
|
+
{
|
|
756
|
+
query: "Show the product demo video",
|
|
757
|
+
component: {
|
|
758
|
+
id: "example-video-1",
|
|
759
|
+
type: "video",
|
|
760
|
+
position: { colStart: 1, colSpan: 8 },
|
|
761
|
+
params: {
|
|
762
|
+
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
763
|
+
title: "Product Demo",
|
|
764
|
+
aspectRatio: "16:9"
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
],
|
|
769
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
770
|
+
};
|
|
771
|
+
const IframeRegistry = {
|
|
772
|
+
type: "iframe",
|
|
773
|
+
name: "Iframe",
|
|
774
|
+
description: "Embed external content via sandboxed iframe. Domain whitelist enforced for security. Supports Mermaid diagrams, Excalidraw, GitHub Gists, Figma, and 60+ whitelisted domains.",
|
|
775
|
+
schema: {
|
|
776
|
+
type: "object",
|
|
777
|
+
properties: {
|
|
778
|
+
url: { type: "string", description: "URL to embed (must be on whitelist)" },
|
|
779
|
+
title: { type: "string", description: "Iframe title for accessibility" },
|
|
780
|
+
height: { type: "string", description: "CSS height (default: 400px)" },
|
|
781
|
+
sandbox: { type: "string", description: "Sandbox attribute (default: restrictive)" }
|
|
782
|
+
},
|
|
783
|
+
required: ["url"]
|
|
784
|
+
},
|
|
785
|
+
examples: [
|
|
786
|
+
{
|
|
787
|
+
query: "Show the architecture diagram",
|
|
788
|
+
component: {
|
|
789
|
+
id: "example-iframe-1",
|
|
790
|
+
type: "iframe",
|
|
791
|
+
position: { colStart: 1, colSpan: 12 },
|
|
792
|
+
params: {
|
|
793
|
+
url: "https://mermaid.ink/svg/graph+TD;A-->B;B-->C",
|
|
794
|
+
title: "Architecture Diagram",
|
|
795
|
+
height: "500px"
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
801
|
+
};
|
|
802
|
+
const ImageRegistry = {
|
|
803
|
+
type: "image",
|
|
804
|
+
name: "Image",
|
|
805
|
+
description: "Render a single image with optional alt text, caption, and link. Best for logos, screenshots, diagrams, or any standalone visual content.",
|
|
806
|
+
schema: {
|
|
807
|
+
type: "object",
|
|
808
|
+
properties: {
|
|
809
|
+
url: { type: "string", description: "Image URL" },
|
|
810
|
+
alt: { type: "string", description: "Alt text for accessibility" },
|
|
811
|
+
title: { type: "string", description: "Image title / heading" },
|
|
812
|
+
width: { type: "string", description: "CSS width" },
|
|
813
|
+
height: { type: "string", description: "CSS height" }
|
|
814
|
+
},
|
|
815
|
+
required: ["url"]
|
|
816
|
+
},
|
|
817
|
+
examples: [
|
|
818
|
+
{
|
|
819
|
+
query: "Show the company logo",
|
|
820
|
+
component: {
|
|
821
|
+
id: "example-image-1",
|
|
822
|
+
type: "image",
|
|
823
|
+
position: { colStart: 1, colSpan: 4 },
|
|
824
|
+
params: {
|
|
825
|
+
url: "/images/logo.png",
|
|
826
|
+
alt: "Company Logo"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
],
|
|
831
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
832
|
+
};
|
|
833
|
+
const LinkRegistry = {
|
|
834
|
+
type: "link",
|
|
835
|
+
name: "Link",
|
|
836
|
+
description: "Render a styled link card with title, description, and URL. Best for navigation, references, and external resource links.",
|
|
837
|
+
schema: {
|
|
838
|
+
type: "object",
|
|
839
|
+
properties: {
|
|
840
|
+
url: { type: "string", description: "Link destination URL" },
|
|
841
|
+
label: { type: "string", description: "Link display text" },
|
|
842
|
+
description: { type: "string", description: "Link description" },
|
|
843
|
+
icon: { type: "string", description: "Icon identifier" }
|
|
844
|
+
},
|
|
845
|
+
required: ["url", "label"]
|
|
846
|
+
},
|
|
847
|
+
examples: [
|
|
848
|
+
{
|
|
849
|
+
query: "Link to the API documentation",
|
|
850
|
+
component: {
|
|
851
|
+
id: "example-link-1",
|
|
852
|
+
type: "link",
|
|
853
|
+
position: { colStart: 1, colSpan: 4 },
|
|
854
|
+
params: {
|
|
855
|
+
url: "https://docs.example.com/api",
|
|
856
|
+
label: "API Documentation",
|
|
857
|
+
description: "Full reference for the REST API"
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
],
|
|
862
|
+
limits: DEFAULT_RESOURCE_LIMITS
|
|
863
|
+
};
|
|
481
864
|
const ComponentRegistry = /* @__PURE__ */ new Map([
|
|
482
865
|
["chart", QuickchartRegistry],
|
|
483
866
|
["table", TableRegistry],
|
|
@@ -488,18 +871,39 @@ const ComponentRegistry = /* @__PURE__ */ new Map([
|
|
|
488
871
|
["action", ActionRegistry],
|
|
489
872
|
["footer", FooterRegistry],
|
|
490
873
|
["carousel", CarouselRegistry],
|
|
491
|
-
["artifact", ArtifactRegistry]
|
|
874
|
+
["artifact", ArtifactRegistry],
|
|
875
|
+
// v2.2.5: Complete registry
|
|
876
|
+
["code", CodeRegistry],
|
|
877
|
+
["map", MapRegistry],
|
|
878
|
+
["form", FormRegistry],
|
|
879
|
+
["modal", ModalRegistry],
|
|
880
|
+
["action-group", ActionGroupRegistry],
|
|
881
|
+
["image-gallery", ImageGalleryRegistry],
|
|
882
|
+
["video", VideoRegistry],
|
|
883
|
+
["iframe", IframeRegistry],
|
|
884
|
+
["image", ImageRegistry],
|
|
885
|
+
["link", LinkRegistry]
|
|
492
886
|
]);
|
|
493
887
|
export {
|
|
888
|
+
ActionGroupRegistry,
|
|
494
889
|
ActionRegistry,
|
|
495
890
|
ArtifactRegistry,
|
|
496
891
|
CarouselRegistry,
|
|
892
|
+
CodeRegistry,
|
|
497
893
|
ComponentRegistry,
|
|
498
894
|
FooterRegistry,
|
|
895
|
+
FormRegistry,
|
|
499
896
|
GridRegistry,
|
|
897
|
+
IframeRegistry,
|
|
898
|
+
ImageGalleryRegistry,
|
|
899
|
+
ImageRegistry,
|
|
900
|
+
LinkRegistry,
|
|
901
|
+
MapRegistry,
|
|
500
902
|
MetricRegistry,
|
|
903
|
+
ModalRegistry,
|
|
501
904
|
QuickchartRegistry,
|
|
502
905
|
TableRegistry,
|
|
503
|
-
TextRegistry
|
|
906
|
+
TextRegistry,
|
|
907
|
+
VideoRegistry
|
|
504
908
|
};
|
|
505
909
|
//# sourceMappingURL=component-registry.js.map
|