@lumel/ai-schema-host 1.0.0 → 1.1.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.
@@ -1,4 +1,4 @@
1
- import knowledge from '../knowledge.json';
1
+ import knowledge from '../knowledge';
2
2
  import type { EVisualType, IAISchemaCompiler, IAISchemaCompileInput, IAISchemaApplyResult, IAISchemaValidationResult } from '@lumel/visual-host';
3
3
  import { EVisualStateSchemaType, TVisualStateSchema } from '../schemaTypes/AiSchema.type';
4
4
  /** Shape of the curated, machine-readable schema knowledge JSON. */
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "AISchemaCompiler", {
8
8
  return AISchemaCompiler;
9
9
  }
10
10
  });
11
- const _knowledgejson = /*#__PURE__*/ _interop_require_default(require("../knowledge.json"));
11
+ const _knowledge = /*#__PURE__*/ _interop_require_default(require("../knowledge"));
12
12
  function _interop_require_default(obj) {
13
13
  return obj && obj.__esModule ? obj : {
14
14
  default: obj
@@ -65,6 +65,6 @@ class AISchemaCompiler {
65
65
  }
66
66
  }
67
67
  /** Curated, machine-readable schema knowledge for LLM prompts. */ getKnowledge() {
68
- return _knowledgejson.default;
68
+ return _knowledge.default;
69
69
  }
70
70
  }
package/dist/index.d.ts CHANGED
@@ -2,11 +2,16 @@ export * from './types';
2
2
  import type { TKbDocumentList } from './types';
3
3
  /** Index-ready curated schema knowledge: one document per schema section. */
4
4
  export declare const AI_SCHEMA_KNOWLEDGE: TKbDocumentList;
5
+ export { BASE_KNOWLEDGE, CHART_KNOWLEDGE, VISUAL_KNOWLEDGE } from './knowledge';
5
6
  export * from './schemaTypes/AiSchema.type';
6
7
  export type { IChartSchema } from './schemaTypes/visualStateSchema/ChartSchema/chartSchema.type';
7
8
  export type { IMatrixSchema } from './schemaTypes/visualStateSchema/MatrixSchema/matrixSchema.type';
8
9
  export type { ISuperFiltersSchema } from './schemaTypes/visualStateSchema/SuperFilter/SuperFilterSchema.type';
9
10
  export type { ISecondaryVisualsSchema } from './schemaTypes/visualStateSchema/SecondaryVisual/SecondaryVisualSchema.type';
11
+ export type { IBoxSchema } from './schemaTypes/visualStateSchema/BoxSchema/boxSchema.type';
12
+ export type { ITextSchema } from './schemaTypes/visualStateSchema/TextSchema/textSchema.type';
13
+ export type { IShapeSchema } from './schemaTypes/visualStateSchema/ShapeSchema/shapeSchema.type';
14
+ export type { INavigatorSchema } from './schemaTypes/visualStateSchema/NavigatorSchema/navigatorSchema.type';
10
15
  export * from './compiler/types';
11
16
  export { AISchemaCompiler } from './compiler/AISchemaCompiler';
12
17
  export type { TAiSchemaKnowledge } from './compiler/AISchemaCompiler';
package/dist/index.js CHANGED
@@ -14,10 +14,19 @@ _export(exports, {
14
14
  },
15
15
  get AI_SCHEMA_KNOWLEDGE () {
16
16
  return AI_SCHEMA_KNOWLEDGE;
17
+ },
18
+ get BASE_KNOWLEDGE () {
19
+ return _knowledge.BASE_KNOWLEDGE;
20
+ },
21
+ get CHART_KNOWLEDGE () {
22
+ return _knowledge.CHART_KNOWLEDGE;
23
+ },
24
+ get VISUAL_KNOWLEDGE () {
25
+ return _knowledge.VISUAL_KNOWLEDGE;
17
26
  }
18
27
  });
19
28
  _export_star(require("./types"), exports);
20
- const _knowledgejson = /*#__PURE__*/ _interop_require_default(require("./knowledge.json"));
29
+ const _knowledge = /*#__PURE__*/ _interop_require_wildcard(require("./knowledge"));
21
30
  _export_star(require("./schemaTypes/AiSchema.type"), exports);
22
31
  _export_star(require("./compiler/types"), exports);
23
32
  const _AISchemaCompiler = require("./compiler/AISchemaCompiler");
@@ -34,9 +43,45 @@ function _export_star(from, to) {
34
43
  });
35
44
  return from;
36
45
  }
37
- function _interop_require_default(obj) {
38
- return obj && obj.__esModule ? obj : {
39
- default: obj
46
+ function _getRequireWildcardCache(nodeInterop) {
47
+ if (typeof WeakMap !== "function") return null;
48
+ var cacheBabelInterop = new WeakMap();
49
+ var cacheNodeInterop = new WeakMap();
50
+ return (_getRequireWildcardCache = function(nodeInterop) {
51
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
52
+ })(nodeInterop);
53
+ }
54
+ function _interop_require_wildcard(obj, nodeInterop) {
55
+ if (!nodeInterop && obj && obj.__esModule) {
56
+ return obj;
57
+ }
58
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
59
+ return {
60
+ default: obj
61
+ };
62
+ }
63
+ var cache = _getRequireWildcardCache(nodeInterop);
64
+ if (cache && cache.has(obj)) {
65
+ return cache.get(obj);
66
+ }
67
+ var newObj = {
68
+ __proto__: null
40
69
  };
70
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
71
+ for(var key in obj){
72
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
73
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
74
+ if (desc && (desc.get || desc.set)) {
75
+ Object.defineProperty(newObj, key, desc);
76
+ } else {
77
+ newObj[key] = obj[key];
78
+ }
79
+ }
80
+ }
81
+ newObj.default = obj;
82
+ if (cache) {
83
+ cache.set(obj, newObj);
84
+ }
85
+ return newObj;
41
86
  }
42
- const AI_SCHEMA_KNOWLEDGE = _knowledgejson.default;
87
+ const AI_SCHEMA_KNOWLEDGE = _knowledge.default;
@@ -0,0 +1,106 @@
1
+ [
2
+ {
3
+ "id": "fabric-base-theme",
4
+ "scope": "base",
5
+ "visualType": "COMMON",
6
+ "sectionKey": "theme",
7
+ "propertyName": "themeSchema",
8
+ "affectedVisualTypes": ["dashboard", "report", "page"],
9
+ "title": "Base Theme",
10
+ "description": "Top-level dashboard/report theme. Sets the global look (light, dark, IBCS, color-blind, etc.) that every visual inherits unless it overrides locally. Lives on baseSchema.themeSchema.name.",
11
+ "structureNote": "BATCH = replace. themeSchema is a single object { name }. Send the whole themeSchema object when changing the theme. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
12
+ "schemaJson": {
13
+ "name": {
14
+ "type": "enum",
15
+ "default": "DEFAULT",
16
+ "options": ["LIGHT", "DARK", "DEFAULT", "MIDNIGHT", "IBCS", "COLOR_BLIND_LIGHT", "COLOR_BLIND_DARK", "INFORIVER", "CUSTOM"],
17
+ "description": "Global theme applied to the whole layout. IBCS enables IBCS-standard styling for all charts."
18
+ }
19
+ },
20
+ "updatePatterns": {
21
+ "setDarkTheme": {
22
+ "intent": "Switch the dashboard to a dark theme",
23
+ "patch": { "name": "DARK" }
24
+ },
25
+ "setIbcsTheme": {
26
+ "intent": "Apply IBCS standard styling to the whole report",
27
+ "patch": { "name": "IBCS" }
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "id": "fabric-base-canvas",
33
+ "scope": "base",
34
+ "visualType": "COMMON",
35
+ "sectionKey": "canvas",
36
+ "propertyName": "canvasSchema",
37
+ "affectedVisualTypes": ["dashboard", "report", "page"],
38
+ "title": "Base Canvas",
39
+ "description": "Dashboard/report-wide canvas: background and global typography defaults that visuals inherit. Lives on baseSchema.canvasSchema.",
40
+ "structureNote": "BATCH = replace. Re-send the full canvasSchema slice you are changing; preserve sibling keys (background, font). updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
41
+ "schemaJson": {
42
+ "background": {
43
+ "type": "hex-color",
44
+ "default": "#ffffff",
45
+ "description": "CSS color of the canvas background behind all visuals."
46
+ },
47
+ "font": {
48
+ "_description": "Global typography defaults inherited by visuals.",
49
+ "family": { "type": "string", "default": "Segoe UI", "description": "CSS font-family stack for the layout." },
50
+ "size": { "type": "number", "default": 12, "description": "Base font size (px)." },
51
+ "color": { "type": "hex-color", "default": "#333333", "description": "Base text color." },
52
+ "responsive": { "type": "boolean", "default": true, "description": "Scale fonts responsively with the layout size." },
53
+ "autoColor": { "type": "boolean", "default": false, "description": "Auto-pick text color for contrast against the background." }
54
+ }
55
+ },
56
+ "updatePatterns": {
57
+ "setBackground": {
58
+ "intent": "Set the canvas background color",
59
+ "patch": { "background": "#f5f5f5" }
60
+ },
61
+ "setBaseFont": {
62
+ "intent": "Change the global font family and size (values illustrative)",
63
+ "patch": { "font": { "family": "Arial", "size": 14 } }
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "id": "fabric-base-visualGroupMap",
69
+ "scope": "base",
70
+ "visualType": "COMMON",
71
+ "sectionKey": "visualGroupMap",
72
+ "propertyName": "visualGroupMap",
73
+ "affectedVisualTypes": ["dashboard", "report", "page"],
74
+ "title": "Visual Group Map",
75
+ "description": "Map of group elements that bundle visuals together for collective layout, visibility and rotation. Keyed by group element id on baseSchema.visualGroupMap.",
76
+ "structureNote": "BATCH = replace. Each entry is keyed by group id. Send the full group entry when updating; do not drop sibling group entries. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
77
+ "schemaJson": {
78
+ "<groupId>": {
79
+ "name": { "type": "string", "default": "", "description": "Display name of the group." },
80
+ "isHidden": { "type": "boolean", "default": false, "description": "Hide the entire group and its visuals." },
81
+ "isExpanded": { "type": "boolean", "default": true, "description": "Whether the group is expanded in the layout tree." },
82
+ "shallowDelete": { "type": "boolean", "default": false, "description": "Soft-delete marker; keeps the group entry but removes it from render." },
83
+ "dimensionConfig": {
84
+ "_description": "Sizing behavior of the group container (see visual.dimensionConfig).",
85
+ "type": "object"
86
+ },
87
+ "rotation": {
88
+ "_description": "Group rotation transform.",
89
+ "isEnabled": { "type": "boolean", "default": false, "description": "Enable rotation for the group." },
90
+ "transform": { "type": "number", "default": 0, "description": "Rotation angle in degrees." },
91
+ "center": { "type": "object", "default": null, "description": "Optional rotation center { x, y }." }
92
+ }
93
+ }
94
+ },
95
+ "updatePatterns": {
96
+ "hideGroup": {
97
+ "intent": "Hide a visual group",
98
+ "patch": { "<groupId>": { "isHidden": true } }
99
+ },
100
+ "renameGroup": {
101
+ "intent": "Rename a visual group",
102
+ "patch": { "<groupId>": { "name": "KPIs" } }
103
+ }
104
+ }
105
+ }
106
+ ]
@@ -0,0 +1,265 @@
1
+ [
2
+ {
3
+ "id": "fabric-chart-axis",
4
+ "scope": "visual",
5
+ "visualType": "CHART",
6
+ "sectionKey": "axis",
7
+ "propertyName": "axis",
8
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "waterfall", "scatter", "bubble"],
9
+ "title": "Chart Axis Configuration",
10
+ "description": "Controls the chart axes: x (category), y (primary value), y2 (secondary/dual value) and yMeasures (per-measure value axes keyed by multiple-axis id). Each axis has enabled, label, title and gridLine groups. Not applicable to pie/donut/treemap/funnel/sankey/gantt.",
11
+ "structureNote": "BATCH = replace. y-axis title color/size/bold/italic are NOT read from title.* — they route to the matching series label; only title.show + x-axis title.text apply directly. Re-send the full axis slice you change and preserve sibling axes. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
12
+ "schemaJson": {
13
+ "x": {
14
+ "_description": "Category axis.",
15
+ "enabled": { "type": "boolean", "default": true, "description": "Show or hide the entire x-axis." },
16
+ "display": { "type": "enum", "default": "scaleBand", "options": ["off", "yAxis", "scaleBand", "individualScaling"], "description": "Axis render mode." },
17
+ "label": {
18
+ "_description": "Tick / category label styling.",
19
+ "show": { "type": "boolean", "default": true, "description": "Show category labels." },
20
+ "fontSize": { "type": "number", "default": null, "description": "Label font size (px)." },
21
+ "bold": { "type": "boolean", "default": false, "description": "Bold labels." },
22
+ "italic": { "type": "boolean", "default": false, "description": "Italic labels." },
23
+ "color": { "type": "hex-color", "default": "#333333", "description": "Label text color." }
24
+ },
25
+ "title": {
26
+ "_description": "Axis title text + styling.",
27
+ "show": { "type": "boolean", "default": true, "description": "Show the axis title." },
28
+ "text": { "type": "string", "default": "", "description": "Axis title text (x-axis applies directly)." },
29
+ "fontSize": { "type": "number", "default": null, "description": "Title font size (px)." },
30
+ "bold": { "type": "boolean", "default": false, "description": "Bold title." },
31
+ "italic": { "type": "boolean", "default": false, "description": "Italic title." },
32
+ "color": { "type": "hex-color", "default": "#333333", "description": "Title text color." }
33
+ },
34
+ "gridLine": {
35
+ "_description": "Major gridline visibility, color and width.",
36
+ "show": { "type": "boolean", "default": true, "description": "Show gridlines." },
37
+ "color": { "type": "hex-color", "default": "#cccccc", "description": "Gridline color." },
38
+ "width": { "type": "number", "default": 1, "description": "Gridline width (px)." }
39
+ }
40
+ },
41
+ "y": {
42
+ "_description": "Primary value axis. Same field groups as x. Note y-title style routes to series labels.",
43
+ "enabled": { "type": "boolean", "default": true, "description": "Show or hide the primary y-axis." },
44
+ "display": { "type": "enum", "default": "scaleBand", "options": ["off", "yAxis", "scaleBand", "individualScaling"], "description": "Axis render mode." },
45
+ "label": { "type": "object", "description": "Same label group as x.label." },
46
+ "title": { "type": "object", "description": "Same title group as x.title; only show applies directly, style routes to series label." },
47
+ "gridLine": { "type": "object", "description": "Same gridLine group as x.gridLine." }
48
+ },
49
+ "y2": {
50
+ "_description": "Secondary (dual) value axis. Same structure as y.",
51
+ "enabled": { "type": "boolean", "default": false, "description": "Show or hide the secondary y-axis." }
52
+ },
53
+ "yMeasures": {
54
+ "_description": "Per-measure value axes keyed by multipleYAxis id. Each value has the same structure as a single axis.",
55
+ "<multipleYAxisId>": { "type": "object", "description": "Axis config for one measure (label/title/gridLine)." }
56
+ }
57
+ },
58
+ "updatePatterns": {
59
+ "enableXAxisBoldLabels": {
60
+ "intent": "Enable the x-axis and bold its labels",
61
+ "patch": { "x": { "enabled": true, "label": { "bold": true } } }
62
+ },
63
+ "styleYTitle": {
64
+ "intent": "Color the primary y-axis title and set its size (routes to series labels; values illustrative)",
65
+ "patch": { "y": { "title": { "color": "#ff0000", "fontSize": 14 } } }
66
+ },
67
+ "stylePerMeasureAxis": {
68
+ "intent": "Style a per-measure y-axis label",
69
+ "patch": { "yMeasures": { "<multipleYAxisId>": { "label": { "color": "#333333" } } } }
70
+ },
71
+ "hideXGridLines": {
72
+ "intent": "Hide the x-axis grid lines",
73
+ "patch": { "x": { "gridLine": { "show": false } } }
74
+ }
75
+ }
76
+ },
77
+ {
78
+ "id": "fabric-chart-canvas",
79
+ "scope": "visual",
80
+ "visualType": "CHART",
81
+ "sectionKey": "canvas",
82
+ "propertyName": "canvas",
83
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "pie", "donut", "treemap", "funnel"],
84
+ "title": "Chart Canvas",
85
+ "description": "Chart-level canvas controls: chart theme, background color and typography. Overrides the inherited base canvas for this chart only.",
86
+ "structureNote": "BATCH = replace. Preserve sibling keys (theme, background, font) when patching. Changing theme resets measuresStyle to that theme's defaults. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
87
+ "schemaJson": {
88
+ "theme": {
89
+ "type": "enum",
90
+ "default": "ibcs",
91
+ "options": ["ibcs", "default", "ocean", "spring", "autumn", "grayscale"],
92
+ "description": "Active color theme. ibcs = IBCS standard black/gray palette (AC=black, PY=gray). Changing theme resets measuresStyle to theme defaults."
93
+ },
94
+ "background": { "type": "hex-color", "default": "#ffffff", "description": "Chart canvas background color." },
95
+ "font": {
96
+ "_description": "Chart typography.",
97
+ "family": { "type": "string", "default": "Segoe UI", "description": "Font family stack." },
98
+ "size": { "type": "number", "default": 12, "description": "Font size (px)." },
99
+ "color": { "type": "hex-color", "default": "#333333", "description": "Text color." },
100
+ "responsive": { "type": "boolean", "default": true, "description": "Scale fonts responsively." },
101
+ "autoColor": { "type": "boolean", "default": false, "description": "Auto-pick text color for contrast." }
102
+ }
103
+ },
104
+ "updatePatterns": {
105
+ "setChartTheme": {
106
+ "intent": "Switch the chart color theme (e.g. to ocean)",
107
+ "patch": { "theme": "ocean" }
108
+ },
109
+ "setChartBackground": {
110
+ "intent": "Set the chart background color",
111
+ "patch": { "background": "#fafafa" }
112
+ },
113
+ "setChartFont": {
114
+ "intent": "Change the chart font (values illustrative)",
115
+ "patch": { "font": { "family": "Arial", "size": 13 } }
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "id": "fabric-chart-legend",
121
+ "scope": "visual",
122
+ "visualType": "CHART",
123
+ "sectionKey": "legend",
124
+ "propertyName": "legend",
125
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "pie", "donut", "treemap", "funnel"],
126
+ "title": "Chart Legend",
127
+ "description": "Curated legend controls: visibility, layout, alignment, marker style and legend title/label typography. The resolver replays legendSettings reducers and the compiler does a single RESIZE render.",
128
+ "structureNote": "BATCH = replace. title and label are their own style objects; preserve sibling keys when patching. Legend font color/size can be overwritten by a later canvas/theme edit (canvas runs before legend). updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
129
+ "schemaJson": {
130
+ "enabled": { "type": "boolean", "default": false, "description": "Show or hide the legend." },
131
+ "layout": { "type": "enum", "default": "horizontal", "options": ["horizontal", "vertical"], "description": "Legend orientation." },
132
+ "horizontalAlignment": { "type": "enum", "default": "center", "options": ["left", "center", "right"], "description": "Horizontal docking of the legend." },
133
+ "verticalAlignment": { "type": "enum", "default": "top", "options": ["top", "middle", "bottom"], "description": "Vertical docking of the legend." },
134
+ "showIcon": { "type": "boolean", "default": true, "description": "Show the series marker icon next to each legend item." },
135
+ "markerStyle": { "type": "enum", "default": "markerDefault", "options": ["markerDefault", "marker", "line", "lineAndMarkers"], "description": "Shape of the legend marker." },
136
+ "title": {
137
+ "_description": "Legend title text + styling.",
138
+ "show": { "type": "boolean", "default": false, "description": "Show the legend title." },
139
+ "text": { "type": "string", "default": "", "description": "Legend title text." },
140
+ "fontSize": { "type": "number", "default": null, "description": "Title font size (px)." },
141
+ "color": { "type": "hex-color", "default": "#333333", "description": "Title text color." }
142
+ },
143
+ "label": {
144
+ "_description": "Legend item label styling.",
145
+ "show": { "type": "boolean", "default": true, "description": "Show legend item labels." },
146
+ "fontSize": { "type": "number", "default": null, "description": "Label font size (px)." },
147
+ "bold": { "type": "boolean", "default": false, "description": "Bold labels." },
148
+ "italic": { "type": "boolean", "default": false, "description": "Italic labels." },
149
+ "color": { "type": "hex-color", "default": "#333333", "description": "Label text color." }
150
+ }
151
+ },
152
+ "updatePatterns": {
153
+ "enableDockBottomCenter": {
154
+ "intent": "Enable the legend, dock it bottom-center, and bold its labels",
155
+ "patch": { "enabled": true, "verticalAlignment": "bottom", "horizontalAlignment": "center", "label": { "bold": true } }
156
+ },
157
+ "setLegendTitle": {
158
+ "intent": "Give the legend a title",
159
+ "patch": { "title": { "show": true, "text": "Scenarios", "color": "#333333" } }
160
+ }
161
+ }
162
+ },
163
+ {
164
+ "id": "fabric-chart-dataLabel",
165
+ "scope": "visual",
166
+ "visualType": "CHART",
167
+ "sectionKey": "dataLabel",
168
+ "propertyName": "dataLabel",
169
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "waterfall"],
170
+ "title": "Chart Data Labels",
171
+ "description": "Universal (chart-wide) data-label styling, addressed by measure DISPLAY NAME, plus chart-wide variance-label settings. all applies to every measure first; measures entries override per measure; variance styles the variance labels on column/waterfall charts.",
172
+ "structureNote": "BATCH = replace. measures is keyed by the measure's display name (NOT internal role/id); duplicate display names warn + last-wins. all is applied before per-measure overrides. variance is applied to every variance measure. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
173
+ "schemaJson": {
174
+ "all": {
175
+ "_description": "Optional convenience style applied to every measure first, before per-measure overrides. Same fields as a measures entry.",
176
+ "type": "object"
177
+ },
178
+ "measures": {
179
+ "_description": "Per-measure data-label styling keyed by measure display name.",
180
+ "<measureDisplayName>": {
181
+ "show": { "type": "boolean", "default": true, "description": "Show the data label." },
182
+ "display": { "type": "enum", "default": "auto", "options": ["auto", "limited", "minMax", "minOnly", "maxOnly", "firstLast", "firstOnly", "lastOnly", "nthLabel", "none", "outlier", "nthAndLast"], "description": "Which labels to show along the series." },
183
+ "position": { "type": "enum", "default": "auto", "options": ["auto", "outside", "insideTop", "insideCenter", "insideBottom", "center"], "description": "Label position relative to the data point." },
184
+ "fontSize": { "type": "number", "default": null, "description": "Label font size (px)." },
185
+ "color": { "type": "hex-color", "default": "#333333", "description": "Label text color." },
186
+ "bold": { "type": "boolean", "default": false, "description": "Bold label." },
187
+ "italic": { "type": "boolean", "default": false, "description": "Italic label." },
188
+ "underline": { "type": "boolean", "default": false, "description": "Underline label." },
189
+ "background": { "type": "hex-color", "default": "#ffffff", "description": "Label background color." },
190
+ "showBackground": { "type": "boolean", "default": false, "description": "Show the label background." }
191
+ }
192
+ },
193
+ "variance": {
194
+ "_description": "Variance data-label styling (column/waterfall charts with variance measures). Applied to every variance measure.",
195
+ "show": { "type": "boolean", "default": false, "description": "Show the variance labels." },
196
+ "display": { "type": "enum", "default": "auto", "options": ["auto", "limited", "minMax", "minOnly", "maxOnly", "firstLast", "firstOnly", "lastOnly", "nthLabel", "none", "outlier", "nthAndLast"], "description": "Which variance labels to show." },
197
+ "position": { "type": "enum", "default": "auto", "options": ["auto", "outside", "insideTop", "insideCenter", "insideBottom", "center"], "description": "Variance label position." },
198
+ "fontSize": { "type": "number", "default": null, "description": "Variance label font size (px)." },
199
+ "color": { "type": "hex-color", "default": "#333333", "description": "Variance label text color." },
200
+ "bold": { "type": "boolean", "default": false, "description": "Bold variance label." },
201
+ "italic": { "type": "boolean", "default": false, "description": "Italic variance label." },
202
+ "background": { "type": "hex-color", "default": "#ffffff", "description": "Variance label background color." },
203
+ "showBackground": { "type": "boolean", "default": false, "description": "Show the variance label background." }
204
+ }
205
+ },
206
+ "updatePatterns": {
207
+ "styleMeasureLabel": {
208
+ "intent": "Show the Sales data label in bold white",
209
+ "patch": { "measures": { "Sales": { "show": true, "bold": true, "color": "#ffffff" } } }
210
+ },
211
+ "setAllFontSize": {
212
+ "intent": "Set every measure's data-label font size",
213
+ "patch": { "all": { "fontSize": 12 } }
214
+ },
215
+ "styleVarianceLabels": {
216
+ "intent": "Show variance labels at min and max, bold (values illustrative)",
217
+ "patch": { "variance": { "show": true, "display": "minMax", "bold": true, "fontSize": 11, "color": "#cc0000" } }
218
+ }
219
+ }
220
+ },
221
+ {
222
+ "id": "fabric-chart-measureSeries",
223
+ "scope": "visual",
224
+ "visualType": "CHART",
225
+ "sectionKey": "measureSeries",
226
+ "propertyName": "measureSeries",
227
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "waterfall"],
228
+ "title": "Chart Measure & Series",
229
+ "description": "Per-measure series controls addressed by measure DISPLAY NAME: reorder measures, show/hide a measure, change how it is plotted (chartType), and assign it to a y-axis on multi-axis (MAC) charts. Shape is { order?: string[]; measures?: Record<displayName, { show?, chartType?, axis? }> }.",
230
+ "structureNote": "BATCH = replace. measures is keyed by measure display name (NOT internal role/id); duplicate display names warn + last-wins. order may be partial — unlisted measures keep their relative order, after the listed ones; ordering applies within each category (actuals vs variances). chartType allowed values depend on the measure category; axis applies only on multi-axis (MAC) charts. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
231
+ "schemaJson": {
232
+ "order": {
233
+ "type": "array",
234
+ "default": [],
235
+ "description": "Desired display order as a list of measure display names (the drag sequence). May be partial."
236
+ },
237
+ "measures": {
238
+ "_description": "Per-measure series controls keyed by measure display name.",
239
+ "<measureDisplayName>": {
240
+ "show": { "type": "boolean", "default": true, "description": "Show or hide this measure's series." },
241
+ "chartType": { "type": "enum", "default": null, "options": ["groupedBar", "bar", "lollipop", "waterfall", "table", "lineChart", "areaChart", "varianceBar", "variancePin", "varianceWaterfall"], "description": "Render type. Allowed values depend on the measure category; an invalid choice is skipped with a warning." },
242
+ "axis": { "type": "enum", "default": null, "options": ["yAxis1", "yAxis2", "yAxis3", "yAxis4", "yAxis5", "yAxis6", "none"], "description": "Y-axis assignment. Multi-axis (MAC) charts only; ignored with a warning otherwise. Setting yAxis2 also enables the secondary axis." }
243
+ }
244
+ }
245
+ },
246
+ "updatePatterns": {
247
+ "reorderMeasures": {
248
+ "intent": "Reorder the measures (values illustrative)",
249
+ "patch": { "order": ["Budget", "Sales", "Forecast"] }
250
+ },
251
+ "hideMeasure": {
252
+ "intent": "Hide a measure's series",
253
+ "patch": { "measures": { "Forecast": { "show": false } } }
254
+ },
255
+ "changePlotType": {
256
+ "intent": "Plot one measure as a line and another as grouped bars",
257
+ "patch": { "measures": { "Sales": { "chartType": "lineChart" }, "Budget": { "chartType": "groupedBar" } } }
258
+ },
259
+ "moveToSecondaryAxis": {
260
+ "intent": "Move a measure onto the secondary axis",
261
+ "patch": { "measures": { "Growth %": { "axis": "yAxis2" } } }
262
+ }
263
+ }
264
+ }
265
+ ]
@@ -0,0 +1,10 @@
1
+ import type { TKbDocumentList } from '../types';
2
+ /** scope=base documents (dashboard/report/page level). */
3
+ export declare const BASE_KNOWLEDGE: TKbDocumentList;
4
+ /** visualType=CHART documents (axis/canvas/legend/dataLabel/measureSeries). */
5
+ export declare const CHART_KNOWLEDGE: TKbDocumentList;
6
+ /** Remaining scope=visual documents (common envelope, matrix/superFilter/secondary, native box/shape/navigator/text). */
7
+ export declare const VISUAL_KNOWLEDGE: TKbDocumentList;
8
+ /** Combined, index-ready curated schema knowledge: one document per schema section. */
9
+ declare const knowledge: TKbDocumentList;
10
+ export default knowledge;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get BASE_KNOWLEDGE () {
13
+ return BASE_KNOWLEDGE;
14
+ },
15
+ get CHART_KNOWLEDGE () {
16
+ return CHART_KNOWLEDGE;
17
+ },
18
+ get VISUAL_KNOWLEDGE () {
19
+ return VISUAL_KNOWLEDGE;
20
+ },
21
+ get default () {
22
+ return _default;
23
+ }
24
+ });
25
+ const _basejson = /*#__PURE__*/ _interop_require_default(require("./base.json"));
26
+ const _chartjson = /*#__PURE__*/ _interop_require_default(require("./chart.json"));
27
+ const _visualjson = /*#__PURE__*/ _interop_require_default(require("./visual.json"));
28
+ function _interop_require_default(obj) {
29
+ return obj && obj.__esModule ? obj : {
30
+ default: obj
31
+ };
32
+ }
33
+ const BASE_KNOWLEDGE = _basejson.default;
34
+ const CHART_KNOWLEDGE = _chartjson.default;
35
+ const VISUAL_KNOWLEDGE = _visualjson.default;
36
+ /** Combined, index-ready curated schema knowledge: one document per schema section. */ const knowledge = [
37
+ ..._basejson.default,
38
+ ..._chartjson.default,
39
+ ..._visualjson.default
40
+ ];
41
+ const _default = knowledge;