@ai-gui/plugin-ui 0.4.2 → 0.5.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/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -54,7 +54,18 @@ interface MountedCardSlot {
|
|
|
54
54
|
interface RenderMountContext {
|
|
55
55
|
mountCard?: (host: HTMLElement, request: MountCardSlotRequest) => MountedCardSlot | undefined;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
/** What the host can tell a plugin about the surroundings it is rendering into. */
|
|
58
|
+
interface NodeRenderContext {
|
|
59
|
+
/**
|
|
60
|
+
* The host's colour scheme, "light" or "dark" by convention.
|
|
61
|
+
*
|
|
62
|
+
* A diagram or a chart picks its own palette, and a plugin has no way to read the palette of
|
|
63
|
+
* the page it is embedded in, so without this an answer rendered on a dark page comes back
|
|
64
|
+
* with white plot areas.
|
|
65
|
+
*/
|
|
66
|
+
readonly theme?: string;
|
|
67
|
+
}
|
|
68
|
+
type NodeRenderer = (node: ASTNode, context?: NodeRenderContext) => RenderOutput | Promise<RenderOutput>;
|
|
58
69
|
interface PluginCommitContext {
|
|
59
70
|
readonly generation: number;
|
|
60
71
|
emitDebug(type: string, data?: Record<string, unknown>): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,18 @@ interface MountedCardSlot {
|
|
|
54
54
|
interface RenderMountContext {
|
|
55
55
|
mountCard?: (host: HTMLElement, request: MountCardSlotRequest) => MountedCardSlot | undefined;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
/** What the host can tell a plugin about the surroundings it is rendering into. */
|
|
58
|
+
interface NodeRenderContext {
|
|
59
|
+
/**
|
|
60
|
+
* The host's colour scheme, "light" or "dark" by convention.
|
|
61
|
+
*
|
|
62
|
+
* A diagram or a chart picks its own palette, and a plugin has no way to read the palette of
|
|
63
|
+
* the page it is embedded in, so without this an answer rendered on a dark page comes back
|
|
64
|
+
* with white plot areas.
|
|
65
|
+
*/
|
|
66
|
+
readonly theme?: string;
|
|
67
|
+
}
|
|
68
|
+
type NodeRenderer = (node: ASTNode, context?: NodeRenderContext) => RenderOutput | Promise<RenderOutput>;
|
|
58
69
|
interface PluginCommitContext {
|
|
59
70
|
readonly generation: number;
|
|
60
71
|
emitDebug(type: string, data?: Record<string, unknown>): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-gui/plugin-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Bounded declarative AI-generated interfaces for AIGUI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@ai-gui/core": "0.
|
|
52
|
+
"@ai-gui/core": "0.5.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsdown",
|