@babav/knowledge-core-client 0.26.0 → 0.27.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.ts +6 -0
- package/package.json +1 -1
- package/src/index.ts +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,10 @@ export interface QueryRequest {
|
|
|
90
90
|
filter?: MetadataFilter;
|
|
91
91
|
visual?: VisualRequest;
|
|
92
92
|
}
|
|
93
|
+
/** The spatial arrangement a conceptual visual encodes (the geometry that carries the meaning).
|
|
94
|
+
* "free" = renderer's judgment / not a declared arrangement (also the value for non-conceptual
|
|
95
|
+
* registers). */
|
|
96
|
+
export type VisualLayout = "linear-flow" | "ring-cycle" | "nesting" | "radial-hub" | "side-by-side" | "stacked-layers" | "two-state" | "free";
|
|
93
97
|
/** A visual attached to a response, anchored by char offsets into `answer` (SAME coordinate
|
|
94
98
|
* system as citations). For delivery="svg", `rendered_svg` is set; scenic sets `image`. */
|
|
95
99
|
export interface Visual {
|
|
@@ -101,6 +105,8 @@ export interface Visual {
|
|
|
101
105
|
register: "chart" | "structural" | "conceptual" | "scenic";
|
|
102
106
|
priority: number;
|
|
103
107
|
payload: Record<string, unknown>;
|
|
108
|
+
/** Declared spatial arrangement (meaningful for `conceptual`; "free" otherwise). */
|
|
109
|
+
layout: VisualLayout;
|
|
104
110
|
rendered_svg?: string;
|
|
105
111
|
image?: {
|
|
106
112
|
url: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babav/knowledge-core-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "TypeScript client for the Babav Knowledge Core API (Deno + Node 18+, zero deps). Includes the babav.visual grammar TYPES at the ./visual subpath (types only; all visual rendering is server-side).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/index.ts
CHANGED
|
@@ -115,6 +115,19 @@ export interface QueryRequest {
|
|
|
115
115
|
visual?: VisualRequest;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/** The spatial arrangement a conceptual visual encodes (the geometry that carries the meaning).
|
|
119
|
+
* "free" = renderer's judgment / not a declared arrangement (also the value for non-conceptual
|
|
120
|
+
* registers). */
|
|
121
|
+
export type VisualLayout =
|
|
122
|
+
| "linear-flow"
|
|
123
|
+
| "ring-cycle"
|
|
124
|
+
| "nesting"
|
|
125
|
+
| "radial-hub"
|
|
126
|
+
| "side-by-side"
|
|
127
|
+
| "stacked-layers"
|
|
128
|
+
| "two-state"
|
|
129
|
+
| "free";
|
|
130
|
+
|
|
118
131
|
/** A visual attached to a response, anchored by char offsets into `answer` (SAME coordinate
|
|
119
132
|
* system as citations). For delivery="svg", `rendered_svg` is set; scenic sets `image`. */
|
|
120
133
|
export interface Visual {
|
|
@@ -123,6 +136,8 @@ export interface Visual {
|
|
|
123
136
|
register: "chart" | "structural" | "conceptual" | "scenic";
|
|
124
137
|
priority: number;
|
|
125
138
|
payload: Record<string, unknown>; // {kind: "grammar"|"vega_lite"|"svg"|"image", ...}
|
|
139
|
+
/** Declared spatial arrangement (meaningful for `conceptual`; "free" otherwise). */
|
|
140
|
+
layout: VisualLayout;
|
|
126
141
|
rendered_svg?: string;
|
|
127
142
|
image?: { url: string; expires_at: number; width: number; height: number };
|
|
128
143
|
}
|