@constela/runtime 2.0.5 → 2.0.6

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -562
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -376,6 +376,7 @@ function createTypedStateStore(definitions) {
376
376
  }
377
377
 
378
378
  // src/expression/evaluator.ts
379
+ import { CHART_HELPERS } from "@constela/core";
379
380
  var SAFE_ARRAY_METHODS = /* @__PURE__ */ new Set([
380
381
  "length",
381
382
  "at",
@@ -958,28 +959,8 @@ var GLOBAL_FUNCTIONS = {
958
959
  // Virtual scroll helpers
959
960
  getVisibleRange: (scrollTop, itemHeight, containerHeight, overscan) => getVisibleRange(scrollTop, itemHeight, containerHeight, overscan),
960
961
  getTotalHeight: (itemCount, itemHeight) => getTotalHeight(itemCount, itemHeight),
961
- // Chart helpers - Coordinate calculation
962
- normalizeValue: (value, min, max) => normalizeValue(value, min, max),
963
- scaleValue: (value, domainMin, domainMax, rangeMin, rangeMax) => scaleValue(value, domainMin, domainMax, rangeMin, rangeMax),
964
- getBarDimensions: (data, index, width, height, gap, orientation) => getBarDimensions(data, index, width, height, gap, orientation),
965
- // Chart helpers - Path generation
966
- getLinePath: (points, curved) => getLinePath(points, curved),
967
- getAreaPath: (points, baseline, curved) => getAreaPath(points, baseline, curved),
968
- getArcPath: (cx, cy, radius, startAngle, endAngle) => getArcPath(cx, cy, radius, startAngle, endAngle),
969
- // Chart helpers - Pie/Donut
970
- getPieSlices: (data, valueKey) => getPieSlices(data, valueKey),
971
- getDonutSlices: (data, valueKey, innerRadius) => getDonutSlices(data, valueKey, innerRadius),
972
- // Chart helpers - Radar
973
- getRadarPoints: (data, valueKey, cx, cy, radius, maxValue) => getRadarPoints(data, valueKey, cx, cy, radius, maxValue),
974
- getRadarAxes: (labels, cx, cy, radius) => getRadarAxes(labels, cx, cy, radius),
975
- // Chart helpers - Utilities
976
- getChartBounds: (data, valueKey) => getChartBounds(data, valueKey),
977
- getLinePoints: (data, valueKey, width, height, padding) => getLinePoints(data, valueKey, width, height, padding),
978
- generateTicks: (min, max, count) => generateTicks(min, max, count),
979
- // Chart helpers - Data aggregation
980
- binData: (data, valueKey, binCount) => binData(data, valueKey, binCount),
981
- aggregateData: (data, groupKey, valueKey, aggregation) => aggregateData(data, groupKey, valueKey, aggregation),
982
- downsample: (data, targetCount, method) => downsample(data, targetCount, method)
962
+ // Chart helpers (from @constela/core)
963
+ ...CHART_HELPERS
983
964
  };
984
965
  function callGlobalFunction(method, args) {
985
966
  const fn = GLOBAL_FUNCTIONS[method];
@@ -1312,546 +1293,6 @@ function evaluateBinary(op, left, right, ctx) {
1312
1293
  throw new Error("Unknown binary operator: " + op);
1313
1294
  }
1314
1295
  }
1315
- function normalizeValue(value, min, max) {
1316
- if (typeof value !== "number" || typeof min !== "number" || typeof max !== "number") {
1317
- return void 0;
1318
- }
1319
- if (max === min) {
1320
- return 0;
1321
- }
1322
- return (value - min) / (max - min);
1323
- }
1324
- function scaleValue(value, domainMin, domainMax, rangeMin, rangeMax) {
1325
- if (typeof value !== "number" || typeof domainMin !== "number" || typeof domainMax !== "number" || typeof rangeMin !== "number" || typeof rangeMax !== "number") {
1326
- return void 0;
1327
- }
1328
- if (domainMax === domainMin) {
1329
- return rangeMin;
1330
- }
1331
- const normalized = (value - domainMin) / (domainMax - domainMin);
1332
- return rangeMin + normalized * (rangeMax - rangeMin);
1333
- }
1334
- function getBarDimensions(data, index, width, height, gap, orientation) {
1335
- if (!Array.isArray(data) || data.length === 0) {
1336
- return void 0;
1337
- }
1338
- if (typeof index !== "number" || index < 0 || index >= data.length) {
1339
- return void 0;
1340
- }
1341
- if (typeof width !== "number" || typeof height !== "number" || typeof gap !== "number") {
1342
- return void 0;
1343
- }
1344
- const isVertical = orientation === "vertical";
1345
- const barCount = data.length;
1346
- const values = data.map((d2) => typeof d2 === "number" ? d2 : 0);
1347
- const maxValue = Math.max(...values);
1348
- if (isVertical) {
1349
- const totalGap = gap * (barCount + 1);
1350
- const barWidth = (width - totalGap) / barCount;
1351
- const barX = gap + index * (barWidth + gap);
1352
- const value = values[index] ?? 0;
1353
- const barHeight = maxValue > 0 ? value / maxValue * height : 0;
1354
- const barY = height - barHeight;
1355
- return {
1356
- x: barX,
1357
- y: barY,
1358
- width: barWidth,
1359
- height: barHeight
1360
- };
1361
- } else {
1362
- const totalGap = gap * barCount;
1363
- const barHeight = (height - totalGap) / barCount;
1364
- const barY = gap + index * (barHeight + gap);
1365
- const value = values[index] ?? 0;
1366
- const barWidth = maxValue > 0 ? value / maxValue * width : 0;
1367
- return {
1368
- x: 0,
1369
- y: barY,
1370
- width: barWidth,
1371
- height: barHeight
1372
- };
1373
- }
1374
- }
1375
- function getCurvedPath(points) {
1376
- if (points.length < 2) {
1377
- return points.length === 1 ? `M${points[0].x},${points[0].y}` : "";
1378
- }
1379
- if (points.length === 2) {
1380
- return `M${points[0].x},${points[0].y} L${points[1].x},${points[1].y}`;
1381
- }
1382
- const pathParts = [`M${points[0].x},${points[0].y}`];
1383
- for (let i = 0; i < points.length - 1; i++) {
1384
- const p0 = points[Math.max(0, i - 1)];
1385
- const p1 = points[i];
1386
- const p2 = points[i + 1];
1387
- const p3 = points[Math.min(points.length - 1, i + 2)];
1388
- const cp1x = p1.x + (p2.x - p0.x) / 6;
1389
- const cp1y = p1.y + (p2.y - p0.y) / 6;
1390
- const cp2x = p2.x - (p3.x - p1.x) / 6;
1391
- const cp2y = p2.y - (p3.y - p1.y) / 6;
1392
- pathParts.push(`C${cp1x},${cp1y} ${cp2x},${cp2y} ${p2.x},${p2.y}`);
1393
- }
1394
- return pathParts.join(" ");
1395
- }
1396
- function getLinePath(points, curved) {
1397
- if (!Array.isArray(points)) {
1398
- return void 0;
1399
- }
1400
- if (points.length === 0) {
1401
- return "";
1402
- }
1403
- for (const point of points) {
1404
- if (typeof point !== "object" || point === null || typeof point.x !== "number" || typeof point.y !== "number") {
1405
- return void 0;
1406
- }
1407
- }
1408
- const validPoints = points;
1409
- if (validPoints.length === 1) {
1410
- return `M${validPoints[0].x},${validPoints[0].y}`;
1411
- }
1412
- if (curved !== true) {
1413
- const pathParts = validPoints.map((point, i) => {
1414
- const command = i === 0 ? "M" : "L";
1415
- return `${command}${point.x},${point.y}`;
1416
- });
1417
- return pathParts.join(" ");
1418
- }
1419
- return getCurvedPath(validPoints);
1420
- }
1421
- function getAreaPath(points, baseline, curved) {
1422
- if (!Array.isArray(points)) {
1423
- return void 0;
1424
- }
1425
- if (typeof baseline !== "number") {
1426
- return void 0;
1427
- }
1428
- if (points.length === 0) {
1429
- return "";
1430
- }
1431
- for (const point of points) {
1432
- if (typeof point !== "object" || point === null || typeof point.x !== "number" || typeof point.y !== "number") {
1433
- return void 0;
1434
- }
1435
- }
1436
- const validPoints = points;
1437
- let upperPath;
1438
- if (curved === true && validPoints.length > 2) {
1439
- upperPath = getCurvedPath(validPoints);
1440
- } else {
1441
- upperPath = validPoints.map((p2, i) => (i === 0 ? "M" : "L") + `${p2.x},${p2.y}`).join(" ");
1442
- }
1443
- const lastPoint = validPoints[validPoints.length - 1];
1444
- const firstPoint = validPoints[0];
1445
- return `${upperPath} L${lastPoint.x},${baseline} L${firstPoint.x},${baseline} Z`;
1446
- }
1447
- function getArcPath(cx, cy, radius, startAngle, endAngle) {
1448
- if (typeof cx !== "number" || typeof cy !== "number" || typeof radius !== "number" || typeof startAngle !== "number" || typeof endAngle !== "number") {
1449
- return void 0;
1450
- }
1451
- if (radius <= 0) {
1452
- return void 0;
1453
- }
1454
- const x1 = cx + radius * Math.cos(startAngle);
1455
- const y1 = cy + radius * Math.sin(startAngle);
1456
- const x2 = cx + radius * Math.cos(endAngle);
1457
- const y2 = cy + radius * Math.sin(endAngle);
1458
- const angleDiff = endAngle - startAngle;
1459
- const largeArcFlag = Math.abs(angleDiff) > Math.PI ? 1 : 0;
1460
- return `M${x1},${y1} A${radius},${radius} 0 ${largeArcFlag},1 ${x2},${y2}`;
1461
- }
1462
- function getPieSlices(data, valueKey) {
1463
- if (!Array.isArray(data)) {
1464
- return void 0;
1465
- }
1466
- if (typeof valueKey !== "string") {
1467
- return void 0;
1468
- }
1469
- if (data.length === 0) {
1470
- return [];
1471
- }
1472
- const values = data.map((item) => {
1473
- if (typeof item !== "object" || item === null) return 0;
1474
- const val = item[valueKey];
1475
- return typeof val === "number" ? val : 0;
1476
- });
1477
- const total = values.reduce((sum, val) => sum + val, 0);
1478
- const slices = [];
1479
- let currentAngle = 0;
1480
- for (let i = 0; i < values.length; i++) {
1481
- const value = values[i];
1482
- const percentage = total > 0 ? value / total * 100 : 0;
1483
- const angleSpan = total > 0 ? value / total * Math.PI * 2 : 0;
1484
- slices.push({
1485
- startAngle: currentAngle,
1486
- endAngle: currentAngle + angleSpan,
1487
- value,
1488
- percentage
1489
- });
1490
- currentAngle += angleSpan;
1491
- }
1492
- return slices;
1493
- }
1494
- function getDonutSlices(data, valueKey, innerRadius) {
1495
- if (typeof innerRadius !== "number" || innerRadius < 0) {
1496
- return void 0;
1497
- }
1498
- const pieSlices = getPieSlices(data, valueKey);
1499
- if (pieSlices === void 0) {
1500
- return void 0;
1501
- }
1502
- const outerRadius = 100;
1503
- return pieSlices.map((slice) => ({
1504
- ...slice,
1505
- outerRadius,
1506
- innerRadius
1507
- }));
1508
- }
1509
- function getRadarPoints(data, valueKey, cx, cy, radius, maxValue) {
1510
- if (!Array.isArray(data)) {
1511
- return void 0;
1512
- }
1513
- if (typeof valueKey !== "string") {
1514
- return void 0;
1515
- }
1516
- if (typeof cx !== "number" || typeof cy !== "number" || typeof radius !== "number" || typeof maxValue !== "number") {
1517
- return void 0;
1518
- }
1519
- if (maxValue <= 0) {
1520
- return void 0;
1521
- }
1522
- if (data.length === 0) {
1523
- return [];
1524
- }
1525
- const points = [];
1526
- const angleStep = Math.PI * 2 / data.length;
1527
- for (let i = 0; i < data.length; i++) {
1528
- const item = data[i];
1529
- const value = typeof item === "object" && item !== null ? item[valueKey] : 0;
1530
- const numValue = typeof value === "number" ? value : 0;
1531
- const scaledRadius = numValue / maxValue * radius;
1532
- const angle = -Math.PI / 2 + i * angleStep;
1533
- const x2 = cx + scaledRadius * Math.cos(angle);
1534
- const y2 = cy + scaledRadius * Math.sin(angle);
1535
- points.push({ x: x2, y: y2 });
1536
- }
1537
- return points;
1538
- }
1539
- function getRadarAxes(labels, cx, cy, radius) {
1540
- if (!Array.isArray(labels)) {
1541
- return void 0;
1542
- }
1543
- if (typeof cx !== "number" || typeof cy !== "number" || typeof radius !== "number") {
1544
- return void 0;
1545
- }
1546
- if (radius < 0) {
1547
- return void 0;
1548
- }
1549
- if (labels.length === 0) {
1550
- return [];
1551
- }
1552
- const axes = [];
1553
- const angleStep = Math.PI * 2 / labels.length;
1554
- for (let i = 0; i < labels.length; i++) {
1555
- const label = String(labels[i]);
1556
- const angle = -Math.PI / 2 + i * angleStep;
1557
- const x2 = cx + radius * Math.cos(angle);
1558
- const y2 = cy + radius * Math.sin(angle);
1559
- axes.push({
1560
- x1: cx,
1561
- y1: cy,
1562
- x2,
1563
- y2,
1564
- label,
1565
- angle
1566
- });
1567
- }
1568
- return axes;
1569
- }
1570
- function getChartBounds(data, valueKey) {
1571
- if (!Array.isArray(data) || data.length === 0) {
1572
- return void 0;
1573
- }
1574
- if (typeof valueKey !== "string") {
1575
- return void 0;
1576
- }
1577
- const values = [];
1578
- for (const item of data) {
1579
- if (typeof item !== "object" || item === null) {
1580
- continue;
1581
- }
1582
- const val = item[valueKey];
1583
- if (typeof val === "number") {
1584
- values.push(val);
1585
- }
1586
- }
1587
- if (values.length === 0) {
1588
- return void 0;
1589
- }
1590
- return {
1591
- min: Math.min(...values),
1592
- max: Math.max(...values)
1593
- };
1594
- }
1595
- function getLinePoints(data, valueKey, width, height, padding) {
1596
- if (!Array.isArray(data) || data.length === 0) return void 0;
1597
- if (typeof valueKey !== "string") return void 0;
1598
- if (typeof width !== "number" || typeof height !== "number") return void 0;
1599
- const pad = typeof padding === "number" ? padding : 40;
1600
- const bounds = getChartBounds(data, valueKey);
1601
- if (!bounds) return void 0;
1602
- const { min, max } = bounds;
1603
- const chartWidth = width - pad * 2;
1604
- const chartHeight = height - pad * 2;
1605
- return data.map((item, idx) => {
1606
- const value = item[valueKey];
1607
- if (typeof value !== "number") return { x: 0, y: 0 };
1608
- const x2 = pad + (data.length > 1 ? idx / (data.length - 1) * chartWidth : chartWidth / 2);
1609
- const y2 = min === max ? pad + chartHeight / 2 : pad + chartHeight - scaleValue(value, min, max, 0, chartHeight);
1610
- return { x: x2, y: y2 };
1611
- });
1612
- }
1613
- function generateTicks(min, max, count) {
1614
- if (typeof min !== "number" || typeof max !== "number" || typeof count !== "number") {
1615
- return [];
1616
- }
1617
- if (count <= 0) {
1618
- return [];
1619
- }
1620
- if (min === max) {
1621
- return [min];
1622
- }
1623
- if (count === 1) {
1624
- return [min];
1625
- }
1626
- if (count === 2) {
1627
- return [min, max];
1628
- }
1629
- const range = max - min;
1630
- const rawStep = range / (count - 1);
1631
- const niceStep = getNiceStep(rawStep);
1632
- const niceMin = Math.floor(min / niceStep) * niceStep;
1633
- const ticks = [];
1634
- for (let i = 0; i < count; i++) {
1635
- const tick = niceMin + i * niceStep;
1636
- ticks.push(Math.round(tick * 1e10) / 1e10);
1637
- }
1638
- return ticks;
1639
- }
1640
- function getNiceStep(rawStep) {
1641
- const magnitude = Math.pow(10, Math.floor(Math.log10(rawStep)));
1642
- const normalized = rawStep / magnitude;
1643
- let niceNormalized;
1644
- if (normalized <= 1) {
1645
- niceNormalized = 1;
1646
- } else if (normalized <= 2) {
1647
- niceNormalized = 2;
1648
- } else if (normalized <= 2.5) {
1649
- niceNormalized = 2.5;
1650
- } else if (normalized <= 5) {
1651
- niceNormalized = 5;
1652
- } else {
1653
- niceNormalized = 10;
1654
- }
1655
- return niceNormalized * magnitude;
1656
- }
1657
- function binData(data, valueKey, binCount) {
1658
- if (!Array.isArray(data)) {
1659
- return void 0;
1660
- }
1661
- if (typeof valueKey !== "string") {
1662
- return void 0;
1663
- }
1664
- if (typeof binCount !== "number" || binCount <= 0) {
1665
- return [];
1666
- }
1667
- if (data.length === 0) {
1668
- return [];
1669
- }
1670
- const values = [];
1671
- for (const item of data) {
1672
- if (typeof item !== "object" || item === null) continue;
1673
- const val = item[valueKey];
1674
- if (typeof val === "number") {
1675
- values.push(val);
1676
- }
1677
- }
1678
- if (values.length === 0) {
1679
- return [];
1680
- }
1681
- const minVal = Math.min(...values);
1682
- const maxVal = Math.max(...values);
1683
- const binWidth = maxVal === minVal ? 1 : (maxVal - minVal) / binCount;
1684
- const bins = [];
1685
- for (let i = 0; i < binCount; i++) {
1686
- bins.push({
1687
- binStart: minVal + i * binWidth,
1688
- binEnd: minVal + (i + 1) * binWidth,
1689
- count: 0,
1690
- values: []
1691
- });
1692
- }
1693
- for (const val of values) {
1694
- let binIndex = Math.floor((val - minVal) / binWidth);
1695
- if (binIndex >= binCount) {
1696
- binIndex = binCount - 1;
1697
- }
1698
- bins[binIndex].count++;
1699
- bins[binIndex].values.push(val);
1700
- }
1701
- return bins;
1702
- }
1703
- function aggregateData(data, groupKey, valueKey, aggregation) {
1704
- if (!Array.isArray(data)) {
1705
- return void 0;
1706
- }
1707
- if (typeof groupKey !== "string" || typeof valueKey !== "string") {
1708
- return void 0;
1709
- }
1710
- const validAggregations = /* @__PURE__ */ new Set(["sum", "avg", "min", "max", "count"]);
1711
- if (typeof aggregation !== "string" || !validAggregations.has(aggregation)) {
1712
- return void 0;
1713
- }
1714
- if (data.length === 0) {
1715
- return [];
1716
- }
1717
- const groups = /* @__PURE__ */ new Map();
1718
- for (const item of data) {
1719
- if (typeof item !== "object" || item === null) continue;
1720
- const obj = item;
1721
- const group = String(obj[groupKey] ?? "");
1722
- const val = obj[valueKey];
1723
- const numVal = typeof val === "number" ? val : 0;
1724
- if (!groups.has(group)) {
1725
- groups.set(group, []);
1726
- }
1727
- groups.get(group).push(numVal);
1728
- }
1729
- const result = [];
1730
- for (const [group, values] of groups) {
1731
- let aggregatedValue;
1732
- switch (aggregation) {
1733
- case "sum":
1734
- aggregatedValue = values.reduce((sum, v2) => sum + v2, 0);
1735
- break;
1736
- case "avg":
1737
- aggregatedValue = values.reduce((sum, v2) => sum + v2, 0) / values.length;
1738
- break;
1739
- case "min":
1740
- aggregatedValue = Math.min(...values);
1741
- break;
1742
- case "max":
1743
- aggregatedValue = Math.max(...values);
1744
- break;
1745
- case "count":
1746
- aggregatedValue = values.length;
1747
- break;
1748
- default:
1749
- aggregatedValue = 0;
1750
- }
1751
- result.push({ group, value: aggregatedValue });
1752
- }
1753
- return result;
1754
- }
1755
- function downsample(data, targetCount, method) {
1756
- if (!Array.isArray(data)) {
1757
- return void 0;
1758
- }
1759
- if (typeof targetCount !== "number" || targetCount <= 0) {
1760
- return void 0;
1761
- }
1762
- const validMethods = /* @__PURE__ */ new Set(["uniform", "lttb"]);
1763
- if (typeof method !== "string" || !validMethods.has(method)) {
1764
- return void 0;
1765
- }
1766
- if (data.length === 0) {
1767
- return [];
1768
- }
1769
- if (targetCount >= data.length) {
1770
- return data;
1771
- }
1772
- if (method === "uniform") {
1773
- return downsampleUniform(data, targetCount);
1774
- } else {
1775
- return downsampleLTTB(data, targetCount);
1776
- }
1777
- }
1778
- function downsampleUniform(data, targetCount) {
1779
- if (targetCount === 1) {
1780
- return [data[0]];
1781
- }
1782
- if (targetCount === 2) {
1783
- return [data[0], data[data.length - 1]];
1784
- }
1785
- const result = [];
1786
- const step = (data.length - 1) / (targetCount - 1);
1787
- for (let i = 0; i < targetCount; i++) {
1788
- const index = Math.round(i * step);
1789
- result.push(data[index]);
1790
- }
1791
- return result;
1792
- }
1793
- function downsampleLTTB(data, targetCount) {
1794
- if (targetCount === 1) {
1795
- return [data[0]];
1796
- }
1797
- if (targetCount === 2) {
1798
- return [data[0], data[data.length - 1]];
1799
- }
1800
- const getXY = (point) => {
1801
- if (typeof point !== "object" || point === null) {
1802
- return { x: 0, y: 0 };
1803
- }
1804
- const obj = point;
1805
- const x2 = typeof obj["x"] === "number" ? obj["x"] : typeof obj["timestamp"] === "number" ? obj["timestamp"] : 0;
1806
- const y2 = typeof obj["y"] === "number" ? obj["y"] : typeof obj["value"] === "number" ? obj["value"] : 0;
1807
- return { x: x2, y: y2 };
1808
- };
1809
- const result = [];
1810
- result.push(data[0]);
1811
- const numBuckets = targetCount - 2;
1812
- const middleData = data.length - 2;
1813
- const bucketSize = middleData / numBuckets;
1814
- let prevSelectedIndex = 0;
1815
- for (let bucketIndex = 0; bucketIndex < numBuckets; bucketIndex++) {
1816
- const bucketStart = Math.floor(bucketIndex * bucketSize) + 1;
1817
- const bucketEnd = Math.floor((bucketIndex + 1) * bucketSize) + 1;
1818
- const nextBucketStart = bucketEnd;
1819
- const nextBucketEnd = bucketIndex < numBuckets - 1 ? Math.floor((bucketIndex + 2) * bucketSize) + 1 : data.length;
1820
- let avgX = 0;
1821
- let avgY = 0;
1822
- const nextLen = nextBucketEnd - nextBucketStart;
1823
- if (nextLen > 0) {
1824
- for (let j2 = nextBucketStart; j2 < nextBucketEnd; j2++) {
1825
- const point = getXY(data[j2]);
1826
- avgX += point.x;
1827
- avgY += point.y;
1828
- }
1829
- avgX /= nextLen;
1830
- avgY /= nextLen;
1831
- } else {
1832
- const lastPoint = getXY(data[data.length - 1]);
1833
- avgX = lastPoint.x;
1834
- avgY = lastPoint.y;
1835
- }
1836
- const pointA = getXY(data[prevSelectedIndex]);
1837
- let maxArea = -1;
1838
- let maxAreaIndex = bucketStart;
1839
- for (let j2 = bucketStart; j2 < bucketEnd; j2++) {
1840
- const pointB = getXY(data[j2]);
1841
- const area = Math.abs(
1842
- pointA.x * (pointB.y - avgY) + pointB.x * (avgY - pointA.y) + avgX * (pointA.y - pointB.y)
1843
- );
1844
- if (area > maxArea) {
1845
- maxArea = area;
1846
- maxAreaIndex = j2;
1847
- }
1848
- }
1849
- result.push(data[maxAreaIndex]);
1850
- prevSelectedIndex = maxAreaIndex;
1851
- }
1852
- result.push(data[data.length - 1]);
1853
- return result;
1854
- }
1855
1296
  function evaluateStyle(expr, ctx) {
1856
1297
  const preset = ctx.styles?.[expr.name];
1857
1298
  if (!preset) return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/runtime",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Runtime DOM renderer for Constela UI framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,8 +18,8 @@
18
18
  "dompurify": "^3.3.1",
19
19
  "marked": "^17.0.1",
20
20
  "shiki": "^3.20.0",
21
- "@constela/core": "0.18.2",
22
- "@constela/compiler": "0.15.8"
21
+ "@constela/core": "0.18.3",
22
+ "@constela/compiler": "0.15.9"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/dompurify": "^3.2.0",
@@ -29,10 +29,10 @@
29
29
  "tsup": "^8.0.0",
30
30
  "typescript": "^5.3.0",
31
31
  "vitest": "^2.0.0",
32
- "@constela/server": "14.0.3"
32
+ "@constela/server": "14.0.4"
33
33
  },
34
34
  "peerDependencies": {
35
- "@constela/ai": "3.0.2"
35
+ "@constela/ai": "3.0.3"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "@constela/ai": {