@lumel/ai-schema-host 1.0.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/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @lumel/ai-schema-host
2
+
3
+ Standalone, dependency-free package that hosts the **AI chart-schema contracts**
4
+ and a **curated schema-knowledge JSON** used by Lumel AI agents (generators,
5
+ validators, resolvers) across visuals.
6
+
7
+ This package was extracted from `@lumel/ap-core`'s `src/ai/schema/types.ts` so
8
+ that any client (chart packages, agent runtimes, devtools, copilots, tests) can
9
+ depend only on a small, stable contract.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ yarn add @lumel/ai-schema-host
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import {
21
+ ChartSchema,
22
+ SCHEMA_VERSION,
23
+ AI_SCHEMA_KNOWLEDGE,
24
+ } from '@lumel/ai-schema-host';
25
+
26
+ const schema: ChartSchema = {
27
+ schemaVersion: SCHEMA_VERSION,
28
+ axis: { x: { enabled: true, label: { bold: true } } },
29
+ };
30
+
31
+ // Index-ready knowledge documents (one per schema section) for the
32
+ // Azure AI Search knowledge base / LLM prompts / devtools.
33
+ const axisDoc = AI_SCHEMA_KNOWLEDGE.find((d) => d.id === 'fabric-chart-axis');
34
+ console.log(axisDoc?.schemaJson, axisDoc?.updatePatterns);
35
+ ```
36
+
37
+ ## What's inside
38
+
39
+ | File | Purpose |
40
+ | --------------------- | ------------------------------------------------------------------------- |
41
+ | `src/types.ts` | Public schema contracts: `ChartSchema`, `AxisGroupSchema`, `IKbDocument`. |
42
+ | `src/knowledge.json` | Index-ready knowledge: array of section documents (build + edit + notes) |
43
+ | `src/index.ts` | Barrel exports |
44
+
45
+ ## Build
46
+
47
+ ```bash
48
+ yarn build # types + JS
49
+ yarn dev # watch mode
50
+ yarn clean # remove dist
51
+ ```
@@ -0,0 +1,42 @@
1
+ import knowledge from '../knowledge.json';
2
+ import type { EVisualType, IAISchemaCompiler, IAISchemaCompileInput, IAISchemaApplyResult, IAISchemaValidationResult } from '@lumel/visual-host';
3
+ import { EVisualStateSchemaType, TVisualStateSchema } from '../schemaTypes/AiSchema.type';
4
+ /** Shape of the curated, machine-readable schema knowledge JSON. */
5
+ export type TAiSchemaKnowledge = typeof knowledge;
6
+ /**
7
+ * Strictly-typed, injectable compiler base for a single visual's AI schema.
8
+ */
9
+ export declare abstract class AISchemaCompiler<TSchema extends TVisualStateSchema = TVisualStateSchema> implements IAISchemaCompiler<TSchema, TAiSchemaKnowledge> {
10
+ /** The visual type this compiler targets. */
11
+ abstract readonly visualType: EVisualType;
12
+ /** The visual-state schema discriminator this compiler owns. */
13
+ abstract readonly schemaType: EVisualStateSchemaType;
14
+ /**
15
+ * Compile and apply a strictly-typed schema to the live visual.
16
+ *
17
+ * Template method: validates the input via {@link validateSchema}, delegates
18
+ * the visual-specific apply to {@link applySchema}, then wraps the resolved
19
+ * schema in a deterministic {@link IAISchemaApplyResult}. Subclasses may
20
+ * override and call `super.compileSchema(input)` to extend this pipeline.
21
+ */
22
+ compileSchema(input: IAISchemaCompileInput<TSchema>): Promise<IAISchemaApplyResult<TSchema>>;
23
+ /**
24
+ * Visual-specific apply. Implementations mutate the live visual store and
25
+ * return the resolved schema. Invoked by {@link compileSchema}.
26
+ */
27
+ protected abstract applySchema(input: IAISchemaCompileInput<TSchema>): Promise<TSchema>;
28
+ /** Read and return the visual's current schema. */
29
+ abstract generateSchema(): Promise<TSchema>;
30
+ /**
31
+ * Validate the schema before apply. Each visual must implement this —
32
+ * validation is visual-specific (e.g. a chart checks whether the requested
33
+ * axis configuration is supported for the current chart type).
34
+ *
35
+ * Return `{ ok: true, issues: [] }` if the schema is valid. Return
36
+ * `{ ok: false, issues: [...] }` to block apply and surface the issues to
37
+ * the fabric caller.
38
+ */
39
+ abstract validateSchema(schema: TSchema): IAISchemaValidationResult;
40
+ /** Curated, machine-readable schema knowledge for LLM prompts. */
41
+ getKnowledge(): TAiSchemaKnowledge;
42
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AISchemaCompiler", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AISchemaCompiler;
9
+ }
10
+ });
11
+ const _knowledgejson = /*#__PURE__*/ _interop_require_default(require("../knowledge.json"));
12
+ function _interop_require_default(obj) {
13
+ return obj && obj.__esModule ? obj : {
14
+ default: obj
15
+ };
16
+ }
17
+ class AISchemaCompiler {
18
+ /**
19
+ * Compile and apply a strictly-typed schema to the live visual.
20
+ *
21
+ * Template method: validates the input via {@link validateSchema}, delegates
22
+ * the visual-specific apply to {@link applySchema}, then wraps the resolved
23
+ * schema in a deterministic {@link IAISchemaApplyResult}. Subclasses may
24
+ * override and call `super.compileSchema(input)` to extend this pipeline.
25
+ */ async compileSchema(input) {
26
+ const validation = this.validateSchema(input.schema);
27
+ if (!validation.ok) {
28
+ return {
29
+ ok: false,
30
+ feedback: {
31
+ tone: 'error',
32
+ message: 'Schema validation failed.'
33
+ },
34
+ schema: input.schema,
35
+ issues: validation.issues
36
+ };
37
+ }
38
+ try {
39
+ const schema = await this.applySchema(input);
40
+ return {
41
+ ok: true,
42
+ feedback: {
43
+ tone: 'success',
44
+ message: 'Schema applied.'
45
+ },
46
+ schema,
47
+ issues: []
48
+ };
49
+ } catch (err) {
50
+ const message = err?.message ?? 'Schema apply failed.';
51
+ return {
52
+ ok: false,
53
+ feedback: {
54
+ tone: 'error',
55
+ message
56
+ },
57
+ schema: input.schema,
58
+ issues: [
59
+ {
60
+ path: '',
61
+ message
62
+ }
63
+ ]
64
+ };
65
+ }
66
+ }
67
+ /** Curated, machine-readable schema knowledge for LLM prompts. */ getKnowledge() {
68
+ return _knowledgejson.default;
69
+ }
70
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The injection contract lives in `@lumel/visual-host` so the visual host has no
3
+ * dependency on this package. It is re-exported here so fabric-side consumers of
4
+ * `@lumel/ai-schema-host` get the strict compiler surface from one place.
5
+ */
6
+ export type { IAISchemaCompiler, IAISchemaCompileInput, IAISchemaApplyResult, IAISchemaValidationResult, IAISchemaIssue, IAISchemaFeedback, } from '@lumel/visual-host';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The injection contract lives in `@lumel/visual-host` so the visual host has no
3
+ * dependency on this package. It is re-exported here so fabric-side consumers of
4
+ * `@lumel/ai-schema-host` get the strict compiler surface from one place.
5
+ */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
@@ -0,0 +1,12 @@
1
+ export * from './types';
2
+ import type { TKbDocumentList } from './types';
3
+ /** Index-ready curated schema knowledge: one document per schema section. */
4
+ export declare const AI_SCHEMA_KNOWLEDGE: TKbDocumentList;
5
+ export * from './schemaTypes/AiSchema.type';
6
+ export type { IChartSchema } from './schemaTypes/visualStateSchema/ChartSchema/chartSchema.type';
7
+ export type { IMatrixSchema } from './schemaTypes/visualStateSchema/MatrixSchema/matrixSchema.type';
8
+ export type { ISuperFiltersSchema } from './schemaTypes/visualStateSchema/SuperFilter/SuperFilterSchema.type';
9
+ export type { ISecondaryVisualsSchema } from './schemaTypes/visualStateSchema/SecondaryVisual/SecondaryVisualSchema.type';
10
+ export * from './compiler/types';
11
+ export { AISchemaCompiler } from './compiler/AISchemaCompiler';
12
+ export type { TAiSchemaKnowledge } from './compiler/AISchemaCompiler';
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
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 AISchemaCompiler () {
13
+ return _AISchemaCompiler.AISchemaCompiler;
14
+ },
15
+ get AI_SCHEMA_KNOWLEDGE () {
16
+ return AI_SCHEMA_KNOWLEDGE;
17
+ }
18
+ });
19
+ _export_star(require("./types"), exports);
20
+ const _knowledgejson = /*#__PURE__*/ _interop_require_default(require("./knowledge.json"));
21
+ _export_star(require("./schemaTypes/AiSchema.type"), exports);
22
+ _export_star(require("./compiler/types"), exports);
23
+ const _AISchemaCompiler = require("./compiler/AISchemaCompiler");
24
+ function _export_star(from, to) {
25
+ Object.keys(from).forEach(function(k) {
26
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
27
+ Object.defineProperty(to, k, {
28
+ enumerable: true,
29
+ get: function() {
30
+ return from[k];
31
+ }
32
+ });
33
+ }
34
+ });
35
+ return from;
36
+ }
37
+ function _interop_require_default(obj) {
38
+ return obj && obj.__esModule ? obj : {
39
+ default: obj
40
+ };
41
+ }
42
+ const AI_SCHEMA_KNOWLEDGE = _knowledgejson.default;
@@ -0,0 +1,470 @@
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
+ {
107
+ "id": "fabric-visual-dimension",
108
+ "scope": "visual",
109
+ "visualType": "COMMON",
110
+ "sectionKey": "dimension",
111
+ "propertyName": "dimension",
112
+ "affectedVisualTypes": ["chart", "matrix", "superFilter", "secondaryVisual"],
113
+ "title": "Visual Dimension",
114
+ "description": "Rendered pixel size of a single visual. Lives on the visual envelope as dimension { width, height }.",
115
+ "structureNote": "BATCH = replace. Send both width and height together when resizing. 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.",
116
+ "schemaJson": {
117
+ "width": { "type": "number", "default": 400, "description": "Rendered width of the visual in px." },
118
+ "height": { "type": "number", "default": 300, "description": "Rendered height of the visual in px." }
119
+ },
120
+ "updatePatterns": {
121
+ "resize": {
122
+ "intent": "Resize the visual (values illustrative)",
123
+ "patch": { "width": 600, "height": 360 }
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "id": "fabric-visual-dimensionConfig",
129
+ "scope": "visual",
130
+ "visualType": "COMMON",
131
+ "sectionKey": "dimensionConfig",
132
+ "propertyName": "dimensionConfig",
133
+ "affectedVisualTypes": ["chart", "matrix", "superFilter", "secondaryVisual"],
134
+ "title": "Visual Dimension Config",
135
+ "description": "Controls how a visual sizes itself: fixed pixels vs filling available space, fill proportion, and min/max bounds.",
136
+ "structureNote": "BATCH = replace. Preserve dimensionType, fillProportion, widthMinMax and heightMinMax keys when patching. 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.",
137
+ "schemaJson": {
138
+ "dimensionType": {
139
+ "_description": "Whether each axis is a fixed size or fills available space.",
140
+ "widthType": { "type": "enum", "default": "fixed", "options": ["fixed", "fill"], "description": "Width sizing mode." },
141
+ "heightType": { "type": "enum", "default": "fixed", "options": ["fixed", "fill"], "description": "Height sizing mode." }
142
+ },
143
+ "fillProportion": { "type": "number", "default": 1, "description": "Relative share of space when using fill mode." },
144
+ "widthMinMax": {
145
+ "_description": "Optional width bounds.",
146
+ "isEnabled": { "type": "boolean", "default": false, "description": "Enable width min/max clamping." },
147
+ "min": { "type": "number | null", "default": null, "description": "Minimum width (px)." },
148
+ "max": { "type": "number | null", "default": null, "description": "Maximum width (px)." }
149
+ },
150
+ "heightMinMax": {
151
+ "_description": "Optional height bounds.",
152
+ "isEnabled": { "type": "boolean", "default": false, "description": "Enable height min/max clamping." },
153
+ "min": { "type": "number | null", "default": null, "description": "Minimum height (px)." },
154
+ "max": { "type": "number | null", "default": null, "description": "Maximum height (px)." }
155
+ }
156
+ },
157
+ "updatePatterns": {
158
+ "fillWidth": {
159
+ "intent": "Make the visual fill the available width",
160
+ "patch": { "dimensionType": { "widthType": "fill" } }
161
+ }
162
+ }
163
+ },
164
+ {
165
+ "id": "fabric-visual-position",
166
+ "scope": "visual",
167
+ "visualType": "COMMON",
168
+ "sectionKey": "position",
169
+ "propertyName": "position",
170
+ "affectedVisualTypes": ["chart", "matrix", "superFilter", "secondaryVisual"],
171
+ "title": "Visual Position",
172
+ "description": "Top-left placement of a visual on the canvas. Lives on the visual envelope as position { x, y }.",
173
+ "structureNote": "BATCH = replace. Send both x and y together when moving. 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.",
174
+ "schemaJson": {
175
+ "x": { "type": "number", "default": 0, "description": "X offset (px) of the visual's top-left corner." },
176
+ "y": { "type": "number", "default": 0, "description": "Y offset (px) of the visual's top-left corner." }
177
+ },
178
+ "updatePatterns": {
179
+ "move": {
180
+ "intent": "Move the visual to a new position (values illustrative)",
181
+ "patch": { "x": 120, "y": 80 }
182
+ }
183
+ }
184
+ },
185
+ {
186
+ "id": "fabric-visual-styles",
187
+ "scope": "visual",
188
+ "visualType": "COMMON",
189
+ "sectionKey": "styles",
190
+ "propertyName": "styles",
191
+ "affectedVisualTypes": ["chart", "matrix", "superFilter", "secondaryVisual"],
192
+ "title": "Visual Element Styles",
193
+ "description": "Container styling for a visual element: background, border, shadow, corner radius, padding and rotation. These wrap the visual regardless of its inner content.",
194
+ "structureNote": "BATCH = replace. Each style group (background, border, shadow, cornerRadius, padding, rotation) is its own object; preserve the groups you are not changing. 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.",
195
+ "schemaJson": {
196
+ "background": {
197
+ "_description": "Container background fill.",
198
+ "color": { "type": "hex-color", "default": "#ffffff", "description": "Background color." },
199
+ "image": { "type": "string | null", "default": null, "description": "Optional background image url." },
200
+ "fillMode": { "type": "enum", "default": "fill", "options": ["fill", "fit", "stretch", "tile"], "description": "How a background image fills the container." },
201
+ "opacity": { "type": "number", "default": 100, "description": "Background opacity (0-100)." }
202
+ },
203
+ "border": {
204
+ "_description": "Container border.",
205
+ "isEnabled": { "type": "boolean", "default": false, "description": "Show the border." },
206
+ "width": { "type": "number", "default": 1, "description": "Border width (px)." },
207
+ "color": { "type": "hex-color", "default": "#cccccc", "description": "Border color." },
208
+ "side": { "type": "enum", "default": "all", "options": ["all", "top", "right", "bottom", "left"], "description": "Which side(s) the border applies to." }
209
+ },
210
+ "shadow": {
211
+ "_description": "Drop shadow around the container.",
212
+ "isEnabled": { "type": "boolean", "default": false, "description": "Show the shadow." },
213
+ "color": { "type": "hex-color", "default": "#00000033", "description": "Shadow color." },
214
+ "blur": { "type": "number", "default": 4, "description": "Shadow blur radius (px)." },
215
+ "distance": { "type": "number", "default": 2, "description": "Shadow offset distance (px)." },
216
+ "angle": { "type": "number", "default": 90, "description": "Shadow direction angle (degrees)." },
217
+ "opacity": { "type": "number", "default": 100, "description": "Shadow opacity (0-100)." }
218
+ },
219
+ "cornerRadius": {
220
+ "_description": "Rounded corners of the container.",
221
+ "isCustomCornerRadius": { "type": "boolean", "default": false, "description": "Use per-corner radii instead of a single value." },
222
+ "radiusTopLeft": { "type": "number", "default": 0, "description": "Top-left corner radius (px)." },
223
+ "radiusTopRight": { "type": "number", "default": 0, "description": "Top-right corner radius (px)." },
224
+ "radiusBottomLeft": { "type": "number", "default": 0, "description": "Bottom-left corner radius (px)." },
225
+ "radiusBottomRight": { "type": "number", "default": 0, "description": "Bottom-right corner radius (px)." }
226
+ },
227
+ "padding": {
228
+ "_description": "Inner padding of the container.",
229
+ "leftPadding": { "type": "number", "default": 0, "description": "Left padding (px)." },
230
+ "rightPadding": { "type": "number", "default": 0, "description": "Right padding (px)." },
231
+ "topPadding": { "type": "number", "default": 0, "description": "Top padding (px)." },
232
+ "bottomPadding": { "type": "number", "default": 0, "description": "Bottom padding (px)." }
233
+ },
234
+ "rotation": {
235
+ "_description": "Container rotation transform.",
236
+ "isEnabled": { "type": "boolean", "default": false, "description": "Enable rotation." },
237
+ "transform": { "type": "number", "default": 0, "description": "Rotation angle (degrees)." }
238
+ }
239
+ },
240
+ "updatePatterns": {
241
+ "addBorder": {
242
+ "intent": "Add a visible border around the visual",
243
+ "patch": { "border": { "isEnabled": true, "width": 1, "color": "#cccccc" } }
244
+ },
245
+ "roundCorners": {
246
+ "intent": "Round the corners of the visual",
247
+ "patch": { "cornerRadius": { "radiusTopLeft": 8, "radiusTopRight": 8, "radiusBottomLeft": 8, "radiusBottomRight": 8 } }
248
+ }
249
+ }
250
+ },
251
+ {
252
+ "id": "fabric-visual-pivotAssignment",
253
+ "scope": "visual",
254
+ "visualType": "COMMON",
255
+ "sectionKey": "pivotAssignment",
256
+ "propertyName": "pivotAssignment",
257
+ "affectedVisualTypes": ["chart", "matrix", "superFilter"],
258
+ "title": "Pivot Assignment",
259
+ "description": "Binds a semantic-model field to a visual bucket (axis, AC, PY, PL, FC, etc.) and configures aggregation. This is how data fields land in the visual's data slots.",
260
+ "structureNote": "BATCH = replace. Each assignment maps one field to one bucket. bucketId must be a valid bucket for the chart template; never invent bucketIds. 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.",
261
+ "schemaJson": {
262
+ "id": { "type": "string", "default": "", "description": "Unique assignment id." },
263
+ "sourceId": { "type": "string", "default": "", "description": "Field id from the semantic model catalog." },
264
+ "name": { "type": "string", "default": "", "description": "Field display name." },
265
+ "columnName": { "type": "string", "default": "", "description": "Underlying column name." },
266
+ "bucketId": { "type": "string", "default": "", "description": "Target visual bucket, e.g. axis, AC, PY, PL, FC, BP." },
267
+ "order": { "type": "number", "default": 0, "description": "Order of the field within the bucket." },
268
+ "dataType": { "type": "enum", "default": "string", "options": ["string", "number", "date", "boolean"], "description": "Column data type." },
269
+ "aggregationType": {
270
+ "type": "enum",
271
+ "default": "SUM",
272
+ "options": ["SUM", "AVERAGE", "MIN", "MAX", "COUNT", "DISTINCT_COUNT", "NONE"],
273
+ "description": "Aggregation applied to a measure field."
274
+ },
275
+ "formatString": { "type": "string | null", "default": null, "description": "Display format string for the field." },
276
+ "customName": { "type": "string | null", "default": null, "description": "Optional override label for the field." }
277
+ },
278
+ "updatePatterns": {
279
+ "changeAggregation": {
280
+ "intent": "Change a measure's aggregation to average",
281
+ "patch": { "aggregationType": "AVERAGE" }
282
+ },
283
+ "renameField": {
284
+ "intent": "Give a field a custom display name",
285
+ "patch": { "customName": "Net Revenue" }
286
+ }
287
+ }
288
+ },
289
+ {
290
+ "id": "fabric-visual-filterAssignments",
291
+ "scope": "visual",
292
+ "visualType": "COMMON",
293
+ "sectionKey": "filterAssignments",
294
+ "propertyName": "filterAssignments",
295
+ "affectedVisualTypes": ["chart", "matrix", "superFilter"],
296
+ "title": "Filter Assignments",
297
+ "description": "Super-filter configuration attached to a visual: which filter rules and pivot assignments scope the visual's data.",
298
+ "structureNote": "BATCH = replace. Preserve filter rule structure; send the full filter slice when editing. 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.",
299
+ "schemaJson": {
300
+ "id": { "type": "string", "default": "", "description": "Filter id." },
301
+ "filterLevel": { "type": "enum", "default": "visual", "options": ["visual", "page", "report"], "description": "Scope at which the filter applies." },
302
+ "isDefault": { "type": "boolean", "default": false, "description": "Whether this is a default filter." },
303
+ "isDeleted": { "type": "boolean", "default": false, "description": "Soft-delete marker." },
304
+ "configuration": { "type": "object", "default": null, "description": "Filter rule definition (operator, values)." },
305
+ "pivotAssignments": { "type": "array", "default": [], "description": "Fields the filter is bound to." }
306
+ },
307
+ "updatePatterns": {
308
+ "disableFilter": {
309
+ "intent": "Remove a filter from the visual",
310
+ "patch": { "isDeleted": true }
311
+ }
312
+ }
313
+ },
314
+ {
315
+ "id": "fabric-chart-axis",
316
+ "scope": "visual",
317
+ "visualType": "CHART",
318
+ "sectionKey": "axis",
319
+ "propertyName": "axis",
320
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "waterfall", "scatter", "bubble"],
321
+ "title": "Chart Axis Configuration",
322
+ "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.",
323
+ "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.",
324
+ "schemaJson": {
325
+ "x": {
326
+ "_description": "Category axis.",
327
+ "enabled": { "type": "boolean", "default": true, "description": "Show or hide the entire x-axis." },
328
+ "display": { "type": "enum", "default": "scaleBand", "options": ["off", "yAxis", "scaleBand", "individualScaling"], "description": "Axis render mode." },
329
+ "label": {
330
+ "_description": "Tick / category label styling.",
331
+ "show": { "type": "boolean", "default": true, "description": "Show category labels." },
332
+ "fontSize": { "type": "number", "default": null, "description": "Label font size (px)." },
333
+ "bold": { "type": "boolean", "default": false, "description": "Bold labels." },
334
+ "italic": { "type": "boolean", "default": false, "description": "Italic labels." },
335
+ "color": { "type": "hex-color", "default": "#333333", "description": "Label text color." }
336
+ },
337
+ "title": {
338
+ "_description": "Axis title text + styling.",
339
+ "show": { "type": "boolean", "default": true, "description": "Show the axis title." },
340
+ "text": { "type": "string", "default": "", "description": "Axis title text (x-axis applies directly)." },
341
+ "fontSize": { "type": "number", "default": null, "description": "Title font size (px)." },
342
+ "bold": { "type": "boolean", "default": false, "description": "Bold title." },
343
+ "italic": { "type": "boolean", "default": false, "description": "Italic title." },
344
+ "color": { "type": "hex-color", "default": "#333333", "description": "Title text color." }
345
+ },
346
+ "gridLine": {
347
+ "_description": "Major gridline visibility, color and width.",
348
+ "show": { "type": "boolean", "default": true, "description": "Show gridlines." },
349
+ "color": { "type": "hex-color", "default": "#cccccc", "description": "Gridline color." },
350
+ "width": { "type": "number", "default": 1, "description": "Gridline width (px)." }
351
+ }
352
+ },
353
+ "y": {
354
+ "_description": "Primary value axis. Same field groups as x. Note y-title style routes to series labels.",
355
+ "enabled": { "type": "boolean", "default": true, "description": "Show or hide the primary y-axis." },
356
+ "display": { "type": "enum", "default": "scaleBand", "options": ["off", "yAxis", "scaleBand", "individualScaling"], "description": "Axis render mode." },
357
+ "label": { "type": "object", "description": "Same label group as x.label." },
358
+ "title": { "type": "object", "description": "Same title group as x.title; only show applies directly, style routes to series label." },
359
+ "gridLine": { "type": "object", "description": "Same gridLine group as x.gridLine." }
360
+ },
361
+ "y2": {
362
+ "_description": "Secondary (dual) value axis. Same structure as y.",
363
+ "enabled": { "type": "boolean", "default": false, "description": "Show or hide the secondary y-axis." }
364
+ },
365
+ "yMeasures": {
366
+ "_description": "Per-measure value axes keyed by multipleYAxis id. Each value has the same structure as a single axis.",
367
+ "<multipleYAxisId>": { "type": "object", "description": "Axis config for one measure (label/title/gridLine)." }
368
+ }
369
+ },
370
+ "updatePatterns": {
371
+ "enableXAxisBoldLabels": {
372
+ "intent": "Enable the x-axis and bold its labels",
373
+ "patch": { "x": { "enabled": true, "label": { "bold": true } } }
374
+ },
375
+ "styleYTitle": {
376
+ "intent": "Color the primary y-axis title and set its size (routes to series labels; values illustrative)",
377
+ "patch": { "y": { "title": { "color": "#ff0000", "fontSize": 14 } } }
378
+ },
379
+ "stylePerMeasureAxis": {
380
+ "intent": "Style a per-measure y-axis label",
381
+ "patch": { "yMeasures": { "<multipleYAxisId>": { "label": { "color": "#333333" } } } }
382
+ },
383
+ "hideXGridLines": {
384
+ "intent": "Hide the x-axis grid lines",
385
+ "patch": { "x": { "gridLine": { "show": false } } }
386
+ }
387
+ }
388
+ },
389
+ {
390
+ "id": "fabric-chart-canvas",
391
+ "scope": "visual",
392
+ "visualType": "CHART",
393
+ "sectionKey": "canvas",
394
+ "propertyName": "canvas",
395
+ "affectedVisualTypes": ["bar", "column", "line", "area", "combo", "pie", "donut", "treemap", "funnel"],
396
+ "title": "Chart Canvas",
397
+ "description": "Chart-level canvas controls: chart theme, background color and typography. Overrides the inherited base canvas for this chart only.",
398
+ "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.",
399
+ "schemaJson": {
400
+ "theme": {
401
+ "type": "enum",
402
+ "default": "ibcs",
403
+ "options": ["ibcs", "default", "ocean", "spring", "autumn", "grayscale"],
404
+ "description": "Active color theme. ibcs = IBCS standard black/gray palette (AC=black, PY=gray). Changing theme resets measuresStyle to theme defaults."
405
+ },
406
+ "background": { "type": "hex-color", "default": "#ffffff", "description": "Chart canvas background color." },
407
+ "font": {
408
+ "_description": "Chart typography.",
409
+ "family": { "type": "string", "default": "Segoe UI", "description": "Font family stack." },
410
+ "size": { "type": "number", "default": 12, "description": "Font size (px)." },
411
+ "color": { "type": "hex-color", "default": "#333333", "description": "Text color." },
412
+ "responsive": { "type": "boolean", "default": true, "description": "Scale fonts responsively." },
413
+ "autoColor": { "type": "boolean", "default": false, "description": "Auto-pick text color for contrast." }
414
+ }
415
+ },
416
+ "updatePatterns": {
417
+ "setChartTheme": {
418
+ "intent": "Switch the chart color theme (e.g. to ocean)",
419
+ "patch": { "theme": "ocean" }
420
+ },
421
+ "setChartBackground": {
422
+ "intent": "Set the chart background color",
423
+ "patch": { "background": "#fafafa" }
424
+ },
425
+ "setChartFont": {
426
+ "intent": "Change the chart font (values illustrative)",
427
+ "patch": { "font": { "family": "Arial", "size": 13 } }
428
+ }
429
+ }
430
+ },
431
+ {
432
+ "id": "fabric-matrix-placeholder",
433
+ "scope": "visual",
434
+ "visualType": "MATRIX",
435
+ "sectionKey": "matrix",
436
+ "propertyName": "matrixSchema",
437
+ "affectedVisualTypes": ["matrix"],
438
+ "title": "Matrix Visual State (pending)",
439
+ "description": "Placeholder for the matrix visual-state schema. The matrix schema is not yet defined; no editable visual-state properties are available here yet.",
440
+ "structureNote": "Schema pending. Do not emit patches for matrix visual-state until this section gains fields.",
441
+ "schemaJson": {},
442
+ "updatePatterns": {}
443
+ },
444
+ {
445
+ "id": "fabric-superFilter-placeholder",
446
+ "scope": "visual",
447
+ "visualType": "SUPER_FILTER",
448
+ "sectionKey": "superFilter",
449
+ "propertyName": "superFiltersSchema",
450
+ "affectedVisualTypes": ["superFilter"],
451
+ "title": "Super Filter Visual State (pending)",
452
+ "description": "Placeholder for the super-filter visual-state schema. The schema is not yet defined; no editable visual-state properties are available here yet.",
453
+ "structureNote": "Schema pending. Do not emit patches for super-filter visual-state until this section gains fields.",
454
+ "schemaJson": {},
455
+ "updatePatterns": {}
456
+ },
457
+ {
458
+ "id": "fabric-secondaryVisual-placeholder",
459
+ "scope": "visual",
460
+ "visualType": "SECONDARY_VISUAL",
461
+ "sectionKey": "secondaryVisual",
462
+ "propertyName": "secondaryVisualsSchema",
463
+ "affectedVisualTypes": ["secondaryVisual"],
464
+ "title": "Secondary Visual State (pending)",
465
+ "description": "Placeholder for the secondary-visual visual-state schema. The schema is not yet defined; no editable visual-state properties are available here yet.",
466
+ "structureNote": "Schema pending. Do not emit patches for secondary-visual visual-state until this section gains fields.",
467
+ "schemaJson": {},
468
+ "updatePatterns": {}
469
+ }
470
+ ]
@@ -0,0 +1,37 @@
1
+ import { IMatrixSchema } from './visualStateSchema/MatrixSchema/matrixSchema.type';
2
+ import { ISecondaryVisualsSchema } from './visualStateSchema/SecondaryVisual/SecondaryVisualSchema.type';
3
+ import { ISuperFiltersSchema } from './visualStateSchema/SuperFilter/SuperFilterSchema.type';
4
+ import { IChartSchema } from './visualStateSchema/ChartSchema/chartSchema.type';
5
+ import type { EThemeType, EVisualType, IGroupElement, IPivotAssignment, ISuperFilter, IVisualDimension, IVisualDimensionConfig, IVisualElementStyles, IVisualPosition } from '@lumel/visual-host';
6
+ export type TVisualStateSchema = IMatrixSchema | IChartSchema | ISuperFiltersSchema | ISecondaryVisualsSchema;
7
+ export declare enum EVisualStateSchemaType {
8
+ CHART = "CHART",
9
+ MATRIX = "MATRIX",
10
+ SUPER_FILTER = "SUPER_FILTER",
11
+ SECONDARY_VISUAL = "SECONDARY_VISUAL"
12
+ }
13
+ export interface IVisualSchema {
14
+ chartType?: string;
15
+ visualId?: string;
16
+ dimensionConfig?: IVisualDimensionConfig;
17
+ dimension?: IVisualDimension;
18
+ position?: IVisualPosition;
19
+ styles?: IVisualElementStyles;
20
+ filterAssignments?: Partial<ISuperFilter>;
21
+ pivotAssignment?: Partial<IPivotAssignment>;
22
+ visualType?: EVisualType;
23
+ visualStateSchema?: TVisualStateSchema;
24
+ }
25
+ export type TVisualGroupMap = Record<TGroupElementId, IGroupElement>;
26
+ export type TGroupElementId = string;
27
+ export interface IThemeSchema {
28
+ name?: EThemeType;
29
+ }
30
+ export interface IAiPlanningSchema {
31
+ baseSchema: {
32
+ themeSchema?: IThemeSchema;
33
+ canvasSchema?: unknown;
34
+ visualGroupMap?: TVisualGroupMap;
35
+ };
36
+ visualSchema?: IVisualSchema[];
37
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "EVisualStateSchemaType", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return EVisualStateSchemaType;
9
+ }
10
+ });
11
+ var EVisualStateSchemaType = /*#__PURE__*/ function(EVisualStateSchemaType) {
12
+ EVisualStateSchemaType["CHART"] = "CHART";
13
+ EVisualStateSchemaType["MATRIX"] = "MATRIX";
14
+ EVisualStateSchemaType["SUPER_FILTER"] = "SUPER_FILTER";
15
+ EVisualStateSchemaType["SECONDARY_VISUAL"] = "SECONDARY_VISUAL";
16
+ return EVisualStateSchemaType;
17
+ }({});
@@ -0,0 +1,53 @@
1
+ export type TChartTheme = string;
2
+ export interface AxisLabelSchema {
3
+ show?: boolean;
4
+ fontSize?: number;
5
+ bold?: boolean;
6
+ italic?: boolean;
7
+ color?: string;
8
+ }
9
+ export interface AxisTitleSchema {
10
+ show?: boolean;
11
+ text?: string;
12
+ fontSize?: number;
13
+ bold?: boolean;
14
+ italic?: boolean;
15
+ color?: string;
16
+ }
17
+ export interface AxisGridLineSchema {
18
+ show?: boolean;
19
+ color?: string;
20
+ width?: number;
21
+ }
22
+ export type TYAxisDisplayType = 'off' | 'yAxis' | 'scaleBand' | 'individualScaling';
23
+ export interface AxisSchema {
24
+ enabled?: boolean;
25
+ /** Y-axis rendering mode. Applies to `axis.y` and `axis.yMeasures.*` only. */
26
+ display?: TYAxisDisplayType;
27
+ label?: AxisLabelSchema;
28
+ title?: AxisTitleSchema;
29
+ gridLine?: AxisGridLineSchema;
30
+ }
31
+ export interface AxisGroupSchema {
32
+ x?: AxisSchema;
33
+ y?: AxisSchema;
34
+ y2?: AxisSchema;
35
+ yMeasures?: Record<string, AxisSchema>;
36
+ }
37
+ export interface CanvasFontSchema {
38
+ family?: string;
39
+ size?: number;
40
+ color?: string;
41
+ responsive?: boolean;
42
+ autoColor?: boolean;
43
+ }
44
+ export interface CanvasSchema {
45
+ theme?: TChartTheme;
46
+ background?: string;
47
+ font?: CanvasFontSchema;
48
+ }
49
+ export interface IChartSchema {
50
+ schemaVersion?: number;
51
+ axis?: AxisGroupSchema;
52
+ canvas?: CanvasSchema;
53
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,2 @@
1
+ export interface IMatrixSchema {
2
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,2 @@
1
+ export interface ISecondaryVisualsSchema {
2
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,2 @@
1
+ export interface ISuperFiltersSchema {
2
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,82 @@
1
+ export declare const SCHEMA_VERSION = 1;
2
+ export type TChartTheme = string;
3
+ export interface AxisLabelSchema {
4
+ show?: boolean;
5
+ fontSize?: number;
6
+ bold?: boolean;
7
+ italic?: boolean;
8
+ color?: string;
9
+ }
10
+ export interface AxisTitleSchema {
11
+ show?: boolean;
12
+ text?: string;
13
+ fontSize?: number;
14
+ bold?: boolean;
15
+ italic?: boolean;
16
+ color?: string;
17
+ }
18
+ export interface AxisGridLineSchema {
19
+ show?: boolean;
20
+ color?: string;
21
+ width?: number;
22
+ }
23
+ export interface AxisSchema {
24
+ enabled?: boolean;
25
+ label?: AxisLabelSchema;
26
+ title?: AxisTitleSchema;
27
+ gridLine?: AxisGridLineSchema;
28
+ }
29
+ export interface AxisGroupSchema {
30
+ x?: AxisSchema;
31
+ y?: AxisSchema;
32
+ y2?: AxisSchema;
33
+ yMeasures?: Record<string, AxisSchema>;
34
+ }
35
+ export interface CanvasFontSchema {
36
+ family?: string;
37
+ size?: number;
38
+ color?: string;
39
+ responsive?: boolean;
40
+ autoColor?: boolean;
41
+ }
42
+ export interface CanvasSchema {
43
+ theme?: TChartTheme;
44
+ background?: string;
45
+ font?: CanvasFontSchema;
46
+ }
47
+ export interface ChartSchema {
48
+ schemaVersion?: number;
49
+ axis?: AxisGroupSchema;
50
+ canvas?: CanvasSchema;
51
+ }
52
+ export type SchemaConcern = 'axis' | 'canvas';
53
+ export declare const SCHEMA_CONCERNS: readonly SchemaConcern[];
54
+ export interface SchemaOperation {
55
+ /** Dotted path into a {@link ChartSchema}, e.g. `axis.x.enabled`. */
56
+ path: string;
57
+ value: unknown;
58
+ }
59
+ export interface SchemaOperationList {
60
+ schemaVersion?: number;
61
+ operations: SchemaOperation[];
62
+ }
63
+ export type TKbScope = 'base' | 'visual';
64
+ export type TKbVisualType = 'COMMON' | 'CHART' | 'MATRIX' | 'SUPER_FILTER' | 'SECONDARY_VISUAL';
65
+ export interface IKbUpdatePattern {
66
+ intent: string;
67
+ patch: Record<string, unknown>;
68
+ }
69
+ export interface IKbDocument {
70
+ id: string;
71
+ scope: TKbScope;
72
+ visualType: TKbVisualType;
73
+ sectionKey: string;
74
+ propertyName: string;
75
+ affectedVisualTypes: string[];
76
+ title: string;
77
+ description: string;
78
+ structureNote: string;
79
+ schemaJson: Record<string, unknown>;
80
+ updatePatterns: Record<string, IKbUpdatePattern>;
81
+ }
82
+ export type TKbDocumentList = IKbDocument[];
package/dist/types.js ADDED
@@ -0,0 +1,23 @@
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 SCHEMA_CONCERNS () {
13
+ return SCHEMA_CONCERNS;
14
+ },
15
+ get SCHEMA_VERSION () {
16
+ return SCHEMA_VERSION;
17
+ }
18
+ });
19
+ const SCHEMA_VERSION = 1;
20
+ const SCHEMA_CONCERNS = [
21
+ 'canvas',
22
+ 'axis'
23
+ ];
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@lumel/ai-schema-host",
3
+ "description": "AI schema contracts and curated schema-knowledge for Lumel chart agents",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "version": "1.0.0",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org/"
13
+ },
14
+ "scripts": {
15
+ "dev": "swc src -d dist --watch --strip-leading-paths --source-maps true --copy-files --config-file .swcrc",
16
+ "build:ts": "swc src -d dist --strip-leading-paths --copy-files --config-file .prod.swcrc",
17
+ "build:ts:debug": "swc src -d dist --strip-leading-paths --source-maps true --copy-files --config-file .swcrc",
18
+ "build:types": "tsc --emitDeclarationOnly",
19
+ "types:only": "yarn run clean && tsc --emitDeclarationOnly",
20
+ "build": "yarn run clean && yarn run build:types && yarn run build:ts",
21
+ "build:debug": "yarn run clean && yarn run build:types && yarn run build:ts:debug",
22
+ "build:packages": "yarn run build",
23
+ "clean": "rimraf dist"
24
+ },
25
+ "author": "Lumel",
26
+ "license": "ISC",
27
+ "peerDependencies": {
28
+ "@lumel/visual-host": "*"
29
+ },
30
+ "devDependencies": {
31
+ "@lumel/visual-host": "workspace:*",
32
+ "@swc/cli": "^0.5.0",
33
+ "@swc/core": "^1.7.23",
34
+ "rimraf": "^6.0.1",
35
+ "typescript": "^5.5.4"
36
+ }
37
+ }