Complete atomic component library with features.json integration

- Fix TypeScript errors in ComponentTreeRenderer and features.json schema
- Add missing 'sanitize' field to limit parameter
- Build succeeds for Next.js and Storybook
- Dynamic stories load configuration from features.json

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-08 15:03:13 +00:00
parent 95de95e389
commit ea7ba8731c
2 changed files with 9 additions and 6 deletions

View File

@@ -2944,6 +2944,7 @@
"type": "integer",
"description": "Query result limit",
"validation": "^[0-9]+$",
"sanitize": "integer",
"min": 1,
"max": 10000,
"default": 100

View File

@@ -236,7 +236,7 @@ function interpolateValue(value: any, data: Record<string, any>): any {
const [, operation, argsStr] = mathOp;
const safeOps = ['abs', 'ceil', 'floor', 'round', 'max', 'min'];
if (safeOps.includes(operation)) {
if (operation && argsStr && safeOps.includes(operation)) {
try {
// Parse arguments safely
const args = argsStr.split(',').map(arg => {
@@ -258,11 +258,13 @@ function interpolateValue(value: any, data: Record<string, any>): any {
const ternaryMatch = expression.match(/^(.+?)\s*\?\s*(.+?)\s*:\s*(.+)$/);
if (ternaryMatch) {
const [, condition, trueValue, falseValue] = ternaryMatch;
const conditionResult = evaluateCondition(condition.trim(), data);
const targetValue = conditionResult ? trueValue.trim() : falseValue.trim();
// Recursively interpolate the result
return interpolateValue(`{{${targetValue}}}`, data);
if (condition && trueValue !== undefined && falseValue !== undefined) {
const conditionResult = evaluateCondition(condition.trim(), data);
const targetValue = conditionResult ? trueValue.trim() : falseValue.trim();
// Recursively interpolate the result
return interpolateValue(`{{${targetValue}}}`, data);
}
}
// Simple property access