@vertesia/fusion-ux 1.3.0 → 1.4.0-dev.20260615.042033Z
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/LICENSE +198 -10
- package/lib/fusion-fragment/ChartRenderer.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/ChartRenderer.js +8 -6
- package/lib/fusion-fragment/ChartRenderer.js.map +1 -0
- package/lib/{types/fusion-fragment → fusion-fragment}/FieldRenderer.d.ts +1 -1
- package/lib/fusion-fragment/FieldRenderer.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/FieldRenderer.js +14 -8
- package/lib/fusion-fragment/FieldRenderer.js.map +1 -0
- package/lib/{types/fusion-fragment → fusion-fragment}/FusionFragmentContext.d.ts +3 -3
- package/lib/fusion-fragment/FusionFragmentContext.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/FusionFragmentContext.js +2 -2
- package/lib/fusion-fragment/FusionFragmentContext.js.map +1 -0
- package/lib/fusion-fragment/FusionFragmentHandler.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/FusionFragmentHandler.js +7 -14
- package/lib/fusion-fragment/FusionFragmentHandler.js.map +1 -0
- package/lib/fusion-fragment/FusionFragmentRenderer.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/FusionFragmentRenderer.js +2 -2
- package/lib/fusion-fragment/FusionFragmentRenderer.js.map +1 -0
- package/lib/{types/fusion-fragment → fusion-fragment}/SectionRenderer.d.ts +1 -1
- package/lib/fusion-fragment/SectionRenderer.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/SectionRenderer.js +12 -5
- package/lib/fusion-fragment/SectionRenderer.js.map +1 -0
- package/lib/fusion-fragment/TableRenderer.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/TableRenderer.js +9 -7
- package/lib/fusion-fragment/TableRenderer.js.map +1 -0
- package/lib/{types/fusion-fragment → fusion-fragment}/index.d.ts +4 -4
- package/lib/fusion-fragment/index.d.ts.map +1 -0
- package/lib/{esm/fusion-fragment → fusion-fragment}/index.js +4 -4
- package/lib/fusion-fragment/index.js.map +1 -0
- package/lib/{types/index.d.ts → index.d.ts} +4 -4
- package/lib/index.d.ts.map +1 -0
- package/lib/{esm/index.js → index.js} +4 -4
- package/lib/index.js.map +1 -0
- package/lib/{types/render → render}/index.d.ts +1 -1
- package/lib/render/index.d.ts.map +1 -0
- package/lib/{esm/render → render}/index.js +1 -1
- package/lib/render/index.js.map +1 -0
- package/lib/render/textPreview.d.ts.map +1 -0
- package/lib/{esm/render → render}/textPreview.js +12 -9
- package/lib/render/textPreview.js.map +1 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js.map +1 -0
- package/lib/validation/formatErrors.d.ts.map +1 -0
- package/lib/{esm/validation → validation}/formatErrors.js +1 -1
- package/lib/validation/formatErrors.js.map +1 -0
- package/lib/validation/fuzzyMatch.d.ts.map +1 -0
- package/lib/{esm/validation → validation}/fuzzyMatch.js +3 -4
- package/lib/validation/fuzzyMatch.js.map +1 -0
- package/lib/validation/index.d.ts +8 -0
- package/lib/validation/index.d.ts.map +1 -0
- package/lib/validation/index.js +8 -0
- package/lib/validation/index.js.map +1 -0
- package/lib/{types/validation → validation}/schemas.d.ts +1 -1
- package/lib/validation/schemas.d.ts.map +1 -0
- package/lib/{esm/validation → validation}/schemas.js +25 -25
- package/lib/validation/schemas.js.map +1 -0
- package/lib/validation/validateTemplate.d.ts.map +1 -0
- package/lib/{esm/validation → validation}/validateTemplate.js +23 -21
- package/lib/validation/validateTemplate.js.map +1 -0
- package/lib/vertesia-fusion-ux.js +1 -1
- package/lib/vertesia-fusion-ux.js.map +1 -1
- package/package.json +23 -35
- package/src/fusion-fragment/ChartRenderer.tsx +95 -96
- package/src/fusion-fragment/FieldRenderer.tsx +173 -174
- package/src/fusion-fragment/FusionFragmentContext.tsx +31 -37
- package/src/fusion-fragment/FusionFragmentHandler.tsx +214 -223
- package/src/fusion-fragment/FusionFragmentRenderer.tsx +102 -107
- package/src/fusion-fragment/SectionRenderer.tsx +174 -169
- package/src/fusion-fragment/TableRenderer.tsx +175 -171
- package/src/fusion-fragment/index.ts +11 -11
- package/src/index.ts +42 -45
- package/src/render/index.ts +3 -3
- package/src/render/textPreview.ts +183 -186
- package/src/types.ts +174 -174
- package/src/validation/formatErrors.ts +86 -86
- package/src/validation/fuzzyMatch.ts +69 -77
- package/src/validation/index.ts +3 -3
- package/src/validation/schemas.ts +120 -120
- package/src/validation/validateTemplate.ts +225 -226
- package/lib/esm/fusion-fragment/ChartRenderer.js.map +0 -1
- package/lib/esm/fusion-fragment/FieldRenderer.js.map +0 -1
- package/lib/esm/fusion-fragment/FusionFragmentContext.js.map +0 -1
- package/lib/esm/fusion-fragment/FusionFragmentHandler.js.map +0 -1
- package/lib/esm/fusion-fragment/FusionFragmentRenderer.js.map +0 -1
- package/lib/esm/fusion-fragment/SectionRenderer.js.map +0 -1
- package/lib/esm/fusion-fragment/TableRenderer.js.map +0 -1
- package/lib/esm/fusion-fragment/index.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/render/index.js.map +0 -1
- package/lib/esm/render/textPreview.js.map +0 -1
- package/lib/esm/types.js.map +0 -1
- package/lib/esm/validation/formatErrors.js.map +0 -1
- package/lib/esm/validation/fuzzyMatch.js.map +0 -1
- package/lib/esm/validation/index.js +0 -8
- package/lib/esm/validation/index.js.map +0 -1
- package/lib/esm/validation/schemas.js.map +0 -1
- package/lib/esm/validation/validateTemplate.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/fusion-fragment/ChartRenderer.d.ts.map +0 -1
- package/lib/types/fusion-fragment/FieldRenderer.d.ts.map +0 -1
- package/lib/types/fusion-fragment/FusionFragmentContext.d.ts.map +0 -1
- package/lib/types/fusion-fragment/FusionFragmentHandler.d.ts.map +0 -1
- package/lib/types/fusion-fragment/FusionFragmentRenderer.d.ts.map +0 -1
- package/lib/types/fusion-fragment/SectionRenderer.d.ts.map +0 -1
- package/lib/types/fusion-fragment/TableRenderer.d.ts.map +0 -1
- package/lib/types/fusion-fragment/index.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/render/index.d.ts.map +0 -1
- package/lib/types/render/textPreview.d.ts.map +0 -1
- package/lib/types/types.d.ts.map +0 -1
- package/lib/types/validation/formatErrors.d.ts.map +0 -1
- package/lib/types/validation/fuzzyMatch.d.ts.map +0 -1
- package/lib/types/validation/index.d.ts +0 -8
- package/lib/types/validation/index.d.ts.map +0 -1
- package/lib/types/validation/schemas.d.ts.map +0 -1
- package/lib/types/validation/validateTemplate.d.ts.map +0 -1
- /package/lib/{types/fusion-fragment → fusion-fragment}/ChartRenderer.d.ts +0 -0
- /package/lib/{types/fusion-fragment → fusion-fragment}/FusionFragmentHandler.d.ts +0 -0
- /package/lib/{types/fusion-fragment → fusion-fragment}/FusionFragmentRenderer.d.ts +0 -0
- /package/lib/{types/fusion-fragment → fusion-fragment}/TableRenderer.d.ts +0 -0
- /package/lib/{types/render → render}/textPreview.d.ts +0 -0
- /package/lib/{types/types.d.ts → types.d.ts} +0 -0
- /package/lib/{esm/types.js → types.js} +0 -0
- /package/lib/{types/validation → validation}/formatErrors.d.ts +0 -0
- /package/lib/{types/validation → validation}/fuzzyMatch.d.ts +0 -0
- /package/lib/{types/validation → validation}/validateTemplate.d.ts +0 -0
|
@@ -3,202 +3,206 @@
|
|
|
3
3
|
* Renders a table with columns and row data
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { type ReactElement, useMemo } from 'react';
|
|
7
7
|
import type { ColumnTemplate } from '../types.js';
|
|
8
8
|
|
|
9
9
|
const styles = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
10
|
+
container: {
|
|
11
|
+
width: '100%',
|
|
12
|
+
overflowX: 'auto' as const,
|
|
13
|
+
},
|
|
14
|
+
table: {
|
|
15
|
+
width: '100%',
|
|
16
|
+
borderCollapse: 'collapse' as const,
|
|
17
|
+
fontSize: '13px',
|
|
18
|
+
},
|
|
19
|
+
thead: {
|
|
20
|
+
backgroundColor: 'var(--gray-3, #f3f4f6)',
|
|
21
|
+
},
|
|
22
|
+
th: {
|
|
23
|
+
padding: '10px 12px',
|
|
24
|
+
textAlign: 'left' as const,
|
|
25
|
+
fontWeight: 600,
|
|
26
|
+
fontSize: '11px',
|
|
27
|
+
textTransform: 'uppercase' as const,
|
|
28
|
+
letterSpacing: '0.5px',
|
|
29
|
+
color: 'var(--gray-11, #6b7280)',
|
|
30
|
+
borderBottom: '2px solid var(--gray-5, #e5e7eb)',
|
|
31
|
+
},
|
|
32
|
+
td: {
|
|
33
|
+
padding: '10px 12px',
|
|
34
|
+
borderBottom: '1px solid var(--gray-4, #e5e7eb)',
|
|
35
|
+
fontFamily: 'var(--font-mono, ui-monospace, monospace)',
|
|
36
|
+
fontVariantNumeric: 'tabular-nums' as const,
|
|
37
|
+
},
|
|
38
|
+
trHover: {
|
|
39
|
+
backgroundColor: 'var(--gray-2, #f9fafb)',
|
|
40
|
+
},
|
|
41
|
+
empty: {
|
|
42
|
+
padding: '20px',
|
|
43
|
+
textAlign: 'center' as const,
|
|
44
|
+
color: 'var(--gray-10, #9ca3af)',
|
|
45
|
+
fontStyle: 'italic' as const,
|
|
46
|
+
},
|
|
47
|
+
highlight: {
|
|
48
|
+
success: { color: 'var(--green-11, #15803d)' },
|
|
49
|
+
warning: { color: 'var(--yellow-11, #ca8a04)' },
|
|
50
|
+
error: { color: 'var(--red-11, #dc2626)' },
|
|
51
|
+
info: { color: 'var(--blue-11, #2563eb)' },
|
|
52
|
+
},
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
export interface TableRendererProps {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
columns: ColumnTemplate[];
|
|
57
|
+
rows: Record<string, unknown>[];
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Format a cell value according to column format
|
|
62
62
|
*/
|
|
63
63
|
function formatCellValue(value: unknown, column: ColumnTemplate): string {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
switch (column.format) {
|
|
69
|
-
case 'number': {
|
|
70
|
-
const num = typeof value === 'number' ? value : parseFloat(String(value));
|
|
71
|
-
if (isNaN(num)) return String(value);
|
|
72
|
-
return new Intl.NumberFormat('en-US', {
|
|
73
|
-
minimumFractionDigits: 0,
|
|
74
|
-
maximumFractionDigits: column.decimals ?? 2,
|
|
75
|
-
}).format(num);
|
|
64
|
+
if (value === null || value === undefined) {
|
|
65
|
+
return '—';
|
|
76
66
|
}
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
68
|
+
switch (column.format) {
|
|
69
|
+
case 'number': {
|
|
70
|
+
const num = typeof value === 'number' ? value : parseFloat(String(value));
|
|
71
|
+
if (Number.isNaN(num)) return String(value);
|
|
72
|
+
return new Intl.NumberFormat('en-US', {
|
|
73
|
+
minimumFractionDigits: 0,
|
|
74
|
+
maximumFractionDigits: column.decimals ?? 2,
|
|
75
|
+
}).format(num);
|
|
76
|
+
}
|
|
88
77
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
78
|
+
case 'currency': {
|
|
79
|
+
const num = typeof value === 'number' ? value : parseFloat(String(value));
|
|
80
|
+
if (Number.isNaN(num)) return String(value);
|
|
81
|
+
return new Intl.NumberFormat('en-US', {
|
|
82
|
+
style: 'currency',
|
|
83
|
+
currency: column.currency || 'USD',
|
|
84
|
+
minimumFractionDigits: column.decimals ?? 0,
|
|
85
|
+
maximumFractionDigits: column.decimals ?? 0,
|
|
86
|
+
}).format(num);
|
|
87
|
+
}
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
case 'percent': {
|
|
90
|
+
const num = typeof value === 'number' ? value : parseFloat(String(value));
|
|
91
|
+
if (Number.isNaN(num)) return String(value);
|
|
92
|
+
const pct = num < 1 && num > -1 && num !== 0 ? num * 100 : num;
|
|
93
|
+
return `${pct.toFixed(column.decimals ?? 1)}%`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
case 'date': {
|
|
97
|
+
const date = value instanceof Date ? value : new Date(String(value));
|
|
98
|
+
if (Number.isNaN(date.getTime())) return String(value);
|
|
99
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
100
|
+
year: 'numeric',
|
|
101
|
+
month: 'short',
|
|
102
|
+
day: 'numeric',
|
|
103
|
+
}).format(date);
|
|
104
|
+
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
case 'boolean':
|
|
107
|
+
return value ? 'Yes' : 'No';
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
default:
|
|
110
|
+
return String(value);
|
|
111
|
+
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* TableRenderer component
|
|
116
116
|
*/
|
|
117
117
|
export function TableRenderer({ columns, rows }: TableRendererProps): ReactElement {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
const alignmentStyle = useMemo(() => {
|
|
119
|
+
return columns.reduce(
|
|
120
|
+
(acc, col) => {
|
|
121
|
+
acc[col.key] =
|
|
122
|
+
col.align ||
|
|
123
|
+
(col.format === 'number' || col.format === 'currency' || col.format === 'percent'
|
|
124
|
+
? 'right'
|
|
125
|
+
: 'left');
|
|
126
|
+
return acc;
|
|
127
|
+
},
|
|
128
|
+
{} as Record<string, string>,
|
|
129
|
+
);
|
|
130
|
+
}, [columns]);
|
|
128
131
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
132
|
+
if (rows.length === 0) {
|
|
133
|
+
return (
|
|
134
|
+
<div style={styles.container}>
|
|
135
|
+
<table style={styles.table}>
|
|
136
|
+
<thead style={styles.thead}>
|
|
137
|
+
<tr>
|
|
138
|
+
{columns.map((col) => (
|
|
139
|
+
<th
|
|
140
|
+
key={col.key}
|
|
141
|
+
style={{
|
|
142
|
+
...styles.th,
|
|
143
|
+
textAlign: alignmentStyle[col.key] as 'left' | 'center' | 'right',
|
|
144
|
+
width: col.width,
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
{col.header}
|
|
148
|
+
</th>
|
|
149
|
+
))}
|
|
150
|
+
</tr>
|
|
151
|
+
</thead>
|
|
152
|
+
<tbody>
|
|
153
|
+
<tr>
|
|
154
|
+
<td colSpan={columns.length} style={styles.empty}>
|
|
155
|
+
No data available
|
|
156
|
+
</td>
|
|
157
|
+
</tr>
|
|
158
|
+
</tbody>
|
|
159
|
+
</table>
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
160
163
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
164
|
+
return (
|
|
165
|
+
<div style={styles.container}>
|
|
166
|
+
<table style={styles.table}>
|
|
167
|
+
<thead style={styles.thead}>
|
|
168
|
+
<tr>
|
|
169
|
+
{columns.map((col) => (
|
|
170
|
+
<th
|
|
171
|
+
key={col.key}
|
|
172
|
+
style={{
|
|
173
|
+
...styles.th,
|
|
174
|
+
textAlign: alignmentStyle[col.key] as 'left' | 'center' | 'right',
|
|
175
|
+
width: col.width,
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
{col.header}
|
|
179
|
+
</th>
|
|
180
|
+
))}
|
|
181
|
+
</tr>
|
|
182
|
+
</thead>
|
|
183
|
+
<tbody>
|
|
184
|
+
{rows.map((row, rowIndex) => (
|
|
185
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: list order is stable for this render
|
|
186
|
+
<tr key={rowIndex}>
|
|
187
|
+
{columns.map((col) => {
|
|
188
|
+
const value = row[col.key];
|
|
189
|
+
const formatted = formatCellValue(value, col);
|
|
190
|
+
const cellStyle = {
|
|
191
|
+
...styles.td,
|
|
192
|
+
textAlign: alignmentStyle[col.key] as 'left' | 'center' | 'right',
|
|
193
|
+
...(col.highlight ? styles.highlight[col.highlight] : {}),
|
|
194
|
+
};
|
|
191
195
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
196
|
+
return (
|
|
197
|
+
<td key={col.key} style={cellStyle}>
|
|
198
|
+
{formatted}
|
|
199
|
+
</td>
|
|
200
|
+
);
|
|
201
|
+
})}
|
|
202
|
+
</tr>
|
|
203
|
+
))}
|
|
204
|
+
</tbody>
|
|
205
|
+
</table>
|
|
206
|
+
</div>
|
|
207
|
+
);
|
|
204
208
|
}
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* FusionFragment component exports
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export { FusionFragmentRenderer } from './FusionFragmentRenderer.js';
|
|
6
|
-
export { SectionRenderer } from './SectionRenderer.js';
|
|
7
|
-
export { FieldRenderer } from './FieldRenderer.js';
|
|
8
|
-
export { TableRenderer, type TableRendererProps } from './TableRenderer.js';
|
|
9
5
|
export { ChartRenderer, type ChartRendererProps } from './ChartRenderer.js';
|
|
6
|
+
export { FieldRenderer } from './FieldRenderer.js';
|
|
10
7
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
FusionFragmentProvider,
|
|
9
|
+
type FusionFragmentProviderProps,
|
|
10
|
+
useFusionFragmentContext,
|
|
11
|
+
useFusionFragmentContextSafe,
|
|
15
12
|
} from './FusionFragmentContext.js';
|
|
16
13
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
createFusionFragmentCodeBlockRenderer,
|
|
15
|
+
FusionFragmentHandler,
|
|
16
|
+
type FusionFragmentHandlerProps,
|
|
20
17
|
} from './FusionFragmentHandler.js';
|
|
18
|
+
export { FusionFragmentRenderer } from './FusionFragmentRenderer.js';
|
|
19
|
+
export { SectionRenderer } from './SectionRenderer.js';
|
|
20
|
+
export { TableRenderer, type TableRendererProps } from './TableRenderer.js';
|
package/src/index.ts
CHANGED
|
@@ -36,54 +36,51 @@
|
|
|
36
36
|
* @packageDocumentation
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
// Types
|
|
40
|
-
export type {
|
|
41
|
-
FragmentTemplate,
|
|
42
|
-
SectionTemplate,
|
|
43
|
-
FieldTemplate,
|
|
44
|
-
ColumnTemplate,
|
|
45
|
-
ChartTemplate,
|
|
46
|
-
VegaLiteSpec,
|
|
47
|
-
ValidationResult,
|
|
48
|
-
ValidationError,
|
|
49
|
-
FusionFragmentRendererProps,
|
|
50
|
-
SectionRendererProps,
|
|
51
|
-
FieldRendererProps,
|
|
52
|
-
FusionFragmentContextValue,
|
|
53
|
-
ValidateFusionFragmentInput,
|
|
54
|
-
} from './types.js';
|
|
55
|
-
|
|
56
39
|
// Components
|
|
57
40
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
41
|
+
createFusionFragmentCodeBlockRenderer,
|
|
42
|
+
FieldRenderer,
|
|
43
|
+
FusionFragmentHandler,
|
|
44
|
+
type FusionFragmentHandlerProps,
|
|
45
|
+
FusionFragmentProvider,
|
|
46
|
+
type FusionFragmentProviderProps,
|
|
47
|
+
FusionFragmentRenderer,
|
|
48
|
+
SectionRenderer,
|
|
49
|
+
useFusionFragmentContext,
|
|
50
|
+
useFusionFragmentContextSafe,
|
|
68
51
|
} from './fusion-fragment/index.js';
|
|
69
|
-
|
|
70
|
-
// Validation utilities
|
|
71
|
-
export {
|
|
72
|
-
validateTemplate,
|
|
73
|
-
parseAndValidateTemplate,
|
|
74
|
-
FragmentTemplateSchema,
|
|
75
|
-
SectionTemplateSchema,
|
|
76
|
-
FieldTemplateSchema,
|
|
77
|
-
findClosestKey,
|
|
78
|
-
findSimilarKeys,
|
|
79
|
-
formatValidationErrors,
|
|
80
|
-
formatValidationSuccess,
|
|
81
|
-
formatAvailableKeys,
|
|
82
|
-
} from './validation/index.js';
|
|
83
|
-
|
|
84
52
|
// Render utilities (text preview only - image rendering is in apps/tools)
|
|
85
53
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
54
|
+
generateCompactPreview,
|
|
55
|
+
generateSampleData,
|
|
56
|
+
generateTextPreview,
|
|
89
57
|
} from './render/index.js';
|
|
58
|
+
// Types
|
|
59
|
+
export type {
|
|
60
|
+
ChartTemplate,
|
|
61
|
+
ColumnTemplate,
|
|
62
|
+
FieldRendererProps,
|
|
63
|
+
FieldTemplate,
|
|
64
|
+
FragmentTemplate,
|
|
65
|
+
FusionFragmentContextValue,
|
|
66
|
+
FusionFragmentRendererProps,
|
|
67
|
+
SectionRendererProps,
|
|
68
|
+
SectionTemplate,
|
|
69
|
+
ValidateFusionFragmentInput,
|
|
70
|
+
ValidationError,
|
|
71
|
+
ValidationResult,
|
|
72
|
+
VegaLiteSpec,
|
|
73
|
+
} from './types.js';
|
|
74
|
+
// Validation utilities
|
|
75
|
+
export {
|
|
76
|
+
FieldTemplateSchema,
|
|
77
|
+
FragmentTemplateSchema,
|
|
78
|
+
findClosestKey,
|
|
79
|
+
findSimilarKeys,
|
|
80
|
+
formatAvailableKeys,
|
|
81
|
+
formatValidationErrors,
|
|
82
|
+
formatValidationSuccess,
|
|
83
|
+
parseAndValidateTemplate,
|
|
84
|
+
SectionTemplateSchema,
|
|
85
|
+
validateTemplate,
|
|
86
|
+
} from './validation/index.js';
|
package/src/render/index.ts
CHANGED