@ai-matrx/rich-content 0.2.159 → 0.2.161

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.161
4
+
5
+ UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
6
+ Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/rich-content/src`.
7
+
8
+ ## 0.2.160
9
+
10
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
11
+ `git diff npm/rich-content/v0.2.159..npm/rich-content/v0.2.160 -- apps/shared/rich-content`).
12
+ No source changes intended and no consumer action required.
13
+
3
14
  ## 0.2.159
4
15
  ### Unreleased
5
16
 
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { renderElement } from "@ai-matrx/alchemy/operate/capture";
4
4
  import { downloadFile, downloadUrl } from "@ai-matrx/kit/download";
5
- import { Button, Chip } from "@ai-matrx/design-system/controls";
5
+ import { Button, Chip, Select } from "@ai-matrx/design-system/controls";
6
6
  import {
7
7
  useState,
8
8
  useCallback,
@@ -1408,18 +1408,19 @@ const DiagramFlow = ({
1408
1408
  ] }),
1409
1409
  selectedIsSection ? /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1410
1410
  "Border",
1411
- /* @__PURE__ */ jsxs(
1412
- "select",
1411
+ /* @__PURE__ */ jsx(
1412
+ Select,
1413
1413
  {
1414
+ "aria-label": "Border",
1415
+ className: "mt-1 w-full",
1414
1416
  value: selectedNode.data.groupStyle === "solid" || selectedNode.data.groupStyle === "dotted" ? selectedNode.data.groupStyle : "dashed",
1415
- onChange: (event) => patchSelectedNode({
1416
- groupStyle: event.target.value
1417
+ onValueChange: (v) => patchSelectedNode({
1418
+ groupStyle: v
1417
1419
  }),
1418
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1419
- children: [
1420
- /* @__PURE__ */ jsx("option", { value: "dashed", children: "Dashed" }),
1421
- /* @__PURE__ */ jsx("option", { value: "dotted", children: "Dotted" }),
1422
- /* @__PURE__ */ jsx("option", { value: "solid", children: "Solid" })
1420
+ options: [
1421
+ { value: "dashed", label: "Dashed" },
1422
+ { value: "dotted", label: "Dotted" },
1423
+ { value: "solid", label: "Solid" }
1423
1424
  ]
1424
1425
  }
1425
1426
  )
@@ -1442,36 +1443,38 @@ const DiagramFlow = ({
1442
1443
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1443
1444
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1444
1445
  "Style",
1445
- /* @__PURE__ */ jsxs(
1446
- "select",
1446
+ /* @__PURE__ */ jsx(
1447
+ Select,
1447
1448
  {
1449
+ "aria-label": "Style",
1450
+ className: "mt-1 w-full",
1448
1451
  value: typeof selectedNode.data.nodeType === "string" ? selectedNode.data.nodeType : "default",
1449
- onChange: (event) => patchSelectedNode({ nodeType: event.target.value }),
1450
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1451
- children: [
1452
- /* @__PURE__ */ jsx("option", { value: "default", children: "Plain" }),
1453
- /* @__PURE__ */ jsx("option", { value: "start", children: "Start" }),
1454
- /* @__PURE__ */ jsx("option", { value: "process", children: "Step" }),
1455
- /* @__PURE__ */ jsx("option", { value: "decision", children: "Decision" }),
1456
- /* @__PURE__ */ jsx("option", { value: "data", children: "Information" }),
1457
- /* @__PURE__ */ jsx("option", { value: "end", children: "Finish" })
1452
+ onValueChange: (v) => patchSelectedNode({ nodeType: v }),
1453
+ options: [
1454
+ { value: "default", label: "Plain" },
1455
+ { value: "start", label: "Start" },
1456
+ { value: "process", label: "Step" },
1457
+ { value: "decision", label: "Decision" },
1458
+ { value: "data", label: "Information" },
1459
+ { value: "end", label: "Finish" }
1458
1460
  ]
1459
1461
  }
1460
1462
  )
1461
1463
  ] }),
1462
1464
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1463
1465
  "Section",
1464
- /* @__PURE__ */ jsxs(
1465
- "select",
1466
+ /* @__PURE__ */ jsx(
1467
+ Select,
1466
1468
  {
1469
+ "aria-label": "Section",
1470
+ className: "mt-1 w-full",
1467
1471
  value: selectedNode.parentId ?? "none",
1468
- onChange: (event) => moveSelectedBoxToSection(
1469
- event.target.value === "none" ? null : event.target.value
1472
+ onValueChange: (v) => moveSelectedBoxToSection(
1473
+ v === "none" ? null : v
1470
1474
  ),
1471
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1472
- children: [
1473
- /* @__PURE__ */ jsx("option", { value: "none", children: "No section" }),
1474
- sections.map((section) => /* @__PURE__ */ jsx("option", { value: section.id, children: String(section.data.label ?? "Section") }, section.id))
1475
+ options: [
1476
+ { value: "none", label: "No section" },
1477
+ ...sections.map((section) => ({ value: section.id, label: String(section.data.label ?? "Section") }))
1475
1478
  ]
1476
1479
  }
1477
1480
  )
@@ -1533,39 +1536,41 @@ const DiagramFlow = ({
1533
1536
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1534
1537
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1535
1538
  "Shape",
1536
- /* @__PURE__ */ jsxs(
1537
- "select",
1539
+ /* @__PURE__ */ jsx(
1540
+ Select,
1538
1541
  {
1542
+ "aria-label": "Shape",
1543
+ className: "mt-1 w-full",
1539
1544
  value: String(selectedNode.data.shape ?? "rounded"),
1540
- onChange: (event) => patchSelectedNode({
1541
- shape: event.target.value
1545
+ onValueChange: (v) => patchSelectedNode({
1546
+ shape: v
1542
1547
  }),
1543
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1544
- children: [
1545
- /* @__PURE__ */ jsx("option", { value: "rounded", children: "Rounded" }),
1546
- /* @__PURE__ */ jsx("option", { value: "rectangle", children: "Rectangle" }),
1547
- /* @__PURE__ */ jsx("option", { value: "pill", children: "Pill" }),
1548
- /* @__PURE__ */ jsx("option", { value: "circle", children: "Circle" }),
1549
- /* @__PURE__ */ jsx("option", { value: "diamond", children: "Diamond" }),
1550
- /* @__PURE__ */ jsx("option", { value: "hexagon", children: "Hexagon" })
1548
+ options: [
1549
+ { value: "rounded", label: "Rounded" },
1550
+ { value: "rectangle", label: "Rectangle" },
1551
+ { value: "pill", label: "Pill" },
1552
+ { value: "circle", label: "Circle" },
1553
+ { value: "diamond", label: "Diamond" },
1554
+ { value: "hexagon", label: "Hexagon" }
1551
1555
  ]
1552
1556
  }
1553
1557
  )
1554
1558
  ] }),
1555
1559
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1556
1560
  "Border",
1557
- /* @__PURE__ */ jsxs(
1558
- "select",
1561
+ /* @__PURE__ */ jsx(
1562
+ Select,
1559
1563
  {
1564
+ "aria-label": "Border",
1565
+ className: "mt-1 w-full",
1560
1566
  value: String(selectedNode.data.borderStyle ?? "solid"),
1561
- onChange: (event) => patchSelectedNode({
1562
- borderStyle: event.target.value
1567
+ onValueChange: (v) => patchSelectedNode({
1568
+ borderStyle: v
1563
1569
  }),
1564
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1565
- children: [
1566
- /* @__PURE__ */ jsx("option", { value: "solid", children: "Solid" }),
1567
- /* @__PURE__ */ jsx("option", { value: "dashed", children: "Dashed" }),
1568
- /* @__PURE__ */ jsx("option", { value: "dotted", children: "Dotted" })
1570
+ options: [
1571
+ { value: "solid", label: "Solid" },
1572
+ { value: "dashed", label: "Dashed" },
1573
+ { value: "dotted", label: "Dotted" }
1569
1574
  ]
1570
1575
  }
1571
1576
  )
@@ -1573,17 +1578,18 @@ const DiagramFlow = ({
1573
1578
  ] }),
1574
1579
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1575
1580
  "Text",
1576
- /* @__PURE__ */ jsxs(
1577
- "select",
1581
+ /* @__PURE__ */ jsx(
1582
+ Select,
1578
1583
  {
1584
+ "aria-label": "Text",
1585
+ className: "mt-1 w-full",
1579
1586
  value: String(selectedNode.data.textAlign ?? "left"),
1580
- onChange: (event) => patchSelectedNode({
1581
- textAlign: event.target.value
1587
+ onValueChange: (v) => patchSelectedNode({
1588
+ textAlign: v
1582
1589
  }),
1583
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1584
- children: [
1585
- /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
1586
- /* @__PURE__ */ jsx("option", { value: "center", children: "Centered" })
1590
+ options: [
1591
+ { value: "left", label: "Left" },
1592
+ { value: "center", label: "Centered" }
1587
1593
  ]
1588
1594
  }
1589
1595
  )
@@ -1609,37 +1615,39 @@ const DiagramFlow = ({
1609
1615
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1610
1616
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1611
1617
  "Path",
1612
- /* @__PURE__ */ jsxs(
1613
- "select",
1618
+ /* @__PURE__ */ jsx(
1619
+ Select,
1614
1620
  {
1621
+ "aria-label": "Path",
1622
+ className: "mt-1 w-full",
1615
1623
  value: selectedEdge.data?.edgeType === "smoothstep" || selectedEdge.data?.edgeType === "step" || selectedEdge.data?.edgeType === "straight" ? selectedEdge.data.edgeType : "bezier",
1616
- onChange: (event) => patchSelectedEdge({
1617
- edgeType: event.target.value
1624
+ onValueChange: (v) => patchSelectedEdge({
1625
+ edgeType: v
1618
1626
  }),
1619
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1620
- children: [
1621
- /* @__PURE__ */ jsx("option", { value: "bezier", children: "Curved" }),
1622
- /* @__PURE__ */ jsx("option", { value: "smoothstep", children: "Rounded" }),
1623
- /* @__PURE__ */ jsx("option", { value: "step", children: "Stepped" }),
1624
- /* @__PURE__ */ jsx("option", { value: "straight", children: "Straight" })
1627
+ options: [
1628
+ { value: "bezier", label: "Curved" },
1629
+ { value: "smoothstep", label: "Rounded" },
1630
+ { value: "step", label: "Stepped" },
1631
+ { value: "straight", label: "Straight" }
1625
1632
  ]
1626
1633
  }
1627
1634
  )
1628
1635
  ] }),
1629
1636
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1630
1637
  "Line",
1631
- /* @__PURE__ */ jsxs(
1632
- "select",
1638
+ /* @__PURE__ */ jsx(
1639
+ Select,
1633
1640
  {
1641
+ "aria-label": "Line",
1642
+ className: "mt-1 w-full",
1634
1643
  value: selectedEdge.data?.lineStyle === "dashed" || selectedEdge.data?.lineStyle === "dotted" ? selectedEdge.data.lineStyle : "solid",
1635
- onChange: (event) => patchSelectedEdge({
1636
- lineStyle: event.target.value
1644
+ onValueChange: (v) => patchSelectedEdge({
1645
+ lineStyle: v
1637
1646
  }),
1638
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1639
- children: [
1640
- /* @__PURE__ */ jsx("option", { value: "solid", children: "Solid" }),
1641
- /* @__PURE__ */ jsx("option", { value: "dashed", children: "Dashed" }),
1642
- /* @__PURE__ */ jsx("option", { value: "dotted", children: "Dotted" })
1647
+ options: [
1648
+ { value: "solid", label: "Solid" },
1649
+ { value: "dashed", label: "Dashed" },
1650
+ { value: "dotted", label: "Dotted" }
1643
1651
  ]
1644
1652
  }
1645
1653
  )
@@ -1648,38 +1656,40 @@ const DiagramFlow = ({
1648
1656
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1649
1657
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1650
1658
  "Direction",
1651
- /* @__PURE__ */ jsxs(
1652
- "select",
1659
+ /* @__PURE__ */ jsx(
1660
+ Select,
1653
1661
  {
1662
+ "aria-label": "Direction",
1663
+ className: "mt-1 w-full",
1654
1664
  value: String(selectedEdge.data?.marker ?? "end"),
1655
- onChange: (event) => patchSelectedEdge({
1656
- marker: event.target.value
1665
+ onValueChange: (v) => patchSelectedEdge({
1666
+ marker: v
1657
1667
  }),
1658
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1659
- children: [
1660
- /* @__PURE__ */ jsx("option", { value: "end", children: "Forward" }),
1661
- /* @__PURE__ */ jsx("option", { value: "start", children: "Backward" }),
1662
- /* @__PURE__ */ jsx("option", { value: "both", children: "Both ends" }),
1663
- /* @__PURE__ */ jsx("option", { value: "none", children: "No arrowheads" })
1668
+ options: [
1669
+ { value: "end", label: "Forward" },
1670
+ { value: "start", label: "Backward" },
1671
+ { value: "both", label: "Both ends" },
1672
+ { value: "none", label: "No arrowheads" }
1664
1673
  ]
1665
1674
  }
1666
1675
  )
1667
1676
  ] }),
1668
1677
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1669
1678
  "Weight",
1670
- /* @__PURE__ */ jsxs(
1671
- "select",
1679
+ /* @__PURE__ */ jsx(
1680
+ Select,
1672
1681
  {
1682
+ "aria-label": "Weight",
1683
+ className: "mt-1 w-full",
1673
1684
  value: String(selectedEdge.data?.strokeWidth ?? 2),
1674
- onChange: (event) => patchSelectedEdge({
1675
- strokeWidth: Number(event.target.value)
1685
+ onValueChange: (v) => patchSelectedEdge({
1686
+ strokeWidth: Number(v)
1676
1687
  }),
1677
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1678
- children: [
1679
- /* @__PURE__ */ jsx("option", { value: "1", children: "Fine" }),
1680
- /* @__PURE__ */ jsx("option", { value: "2", children: "Regular" }),
1681
- /* @__PURE__ */ jsx("option", { value: "3", children: "Bold" }),
1682
- /* @__PURE__ */ jsx("option", { value: "4", children: "Heavy" })
1688
+ options: [
1689
+ { value: "1", label: "Fine" },
1690
+ { value: "2", label: "Regular" },
1691
+ { value: "3", label: "Bold" },
1692
+ { value: "4", label: "Heavy" }
1683
1693
  ]
1684
1694
  }
1685
1695
  )
@@ -1730,37 +1740,39 @@ const DiagramFlow = ({
1730
1740
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1731
1741
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1732
1742
  "Background",
1733
- /* @__PURE__ */ jsxs(
1734
- "select",
1743
+ /* @__PURE__ */ jsx(
1744
+ Select,
1735
1745
  {
1746
+ "aria-label": "Background",
1747
+ className: "mt-1 w-full",
1736
1748
  value: diagram.renderHints?.background ?? "dots",
1737
- onChange: (event) => chooseBackground(
1738
- event.target.value === "lines" ? BackgroundVariant.Lines : event.target.value === "cross" ? BackgroundVariant.Cross : BackgroundVariant.Dots
1749
+ onValueChange: (v) => chooseBackground(
1750
+ v === "lines" ? BackgroundVariant.Lines : v === "cross" ? BackgroundVariant.Cross : BackgroundVariant.Dots
1739
1751
  ),
1740
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1741
- children: [
1742
- /* @__PURE__ */ jsx("option", { value: "dots", children: "Dots" }),
1743
- /* @__PURE__ */ jsx("option", { value: "lines", children: "Lines" }),
1744
- /* @__PURE__ */ jsx("option", { value: "cross", children: "Crosses" })
1752
+ options: [
1753
+ { value: "dots", label: "Dots" },
1754
+ { value: "lines", label: "Lines" },
1755
+ { value: "cross", label: "Crosses" }
1745
1756
  ]
1746
1757
  }
1747
1758
  )
1748
1759
  ] }),
1749
1760
  /* @__PURE__ */ jsxs("label", { className: "block text-[11px] font-medium text-foreground", children: [
1750
1761
  "Flow",
1751
- /* @__PURE__ */ jsxs(
1752
- "select",
1762
+ /* @__PURE__ */ jsx(
1763
+ Select,
1753
1764
  {
1765
+ "aria-label": "Flow",
1766
+ className: "mt-1 w-full",
1754
1767
  value: diagram.layout?.direction ?? "TB",
1755
- onChange: (event) => patchLayout({
1756
- direction: event.target.value
1768
+ onValueChange: (v) => patchLayout({
1769
+ direction: v
1757
1770
  }),
1758
- className: "mt-1 w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground outline-none focus:border-primary",
1759
- children: [
1760
- /* @__PURE__ */ jsx("option", { value: "TB", children: "Top to bottom" }),
1761
- /* @__PURE__ */ jsx("option", { value: "LR", children: "Left to right" }),
1762
- /* @__PURE__ */ jsx("option", { value: "BT", children: "Bottom to top" }),
1763
- /* @__PURE__ */ jsx("option", { value: "RL", children: "Right to left" })
1771
+ options: [
1772
+ { value: "TB", label: "Top to bottom" },
1773
+ { value: "LR", label: "Left to right" },
1774
+ { value: "BT", label: "Bottom to top" },
1775
+ { value: "RL", label: "Right to left" }
1764
1776
  ]
1765
1777
  }
1766
1778
  )
@@ -15,7 +15,7 @@ const MatrxVariableInline = (props) => {
15
15
  }
16
16
  const prettyLabel = humanizeIdentifier(rawName) || rawName;
17
17
  const tokenString = `{{${rawName}}}`;
18
- return /* @__PURE__ */ jsxs(HoverCard, { openDelay: 120, closeDelay: 80, children: [
18
+ return /* @__PURE__ */ jsxs(HoverCard, { children: [
19
19
  /* @__PURE__ */ jsx(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
20
20
  "span",
21
21
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/rich-content",
3
- "version": "0.2.159",
3
+ "version": "0.2.161",
4
4
  "description": "The AI Matrx formatted-text engine: the one markdown renderer, streaming markdown, the block splitter and renderer, the generic blocks, <RichContent> levels, the rich-document action registry and menus, copy, and the selection toolbar — as portable React.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -131,20 +131,20 @@
131
131
  "unist-util-visit-parents": "^6.0.2",
132
132
  "yaml": "^2.9.1",
133
133
  "@ai-matrx/agents": "latest",
134
- "@ai-matrx/content-ir": "latest",
134
+ "@ai-matrx/alchemy": "latest",
135
135
  "@ai-matrx/api": "latest",
136
+ "@ai-matrx/canvas": "latest",
137
+ "@ai-matrx/content-ir": "latest",
136
138
  "@ai-matrx/content-ir-react": "latest",
137
139
  "@ai-matrx/data": "latest",
138
140
  "@ai-matrx/design-system": "latest",
139
- "@ai-matrx/diff": "latest",
140
141
  "@ai-matrx/icons": "latest",
141
142
  "@ai-matrx/kit": "latest",
142
143
  "@ai-matrx/media": "latest",
143
144
  "@ai-matrx/print": "latest",
144
145
  "@ai-matrx/records": "latest",
145
146
  "@ai-matrx/records-ui": "latest",
146
- "@ai-matrx/alchemy": "latest",
147
- "@ai-matrx/canvas": "latest"
147
+ "@ai-matrx/diff": "latest"
148
148
  },
149
149
  "peerDependencies": {
150
150
  "react": ">=19.0.0",
@@ -205,5 +205,5 @@
205
205
  "verify:modules-tarball": "node ./scripts/verify-modules-tarball.mjs",
206
206
  "verify:tarball": "node ./scripts/verify-tarball.mjs"
207
207
  },
208
- "gitHead": "0a5b9e5c71b418f6b4a72acb6f80b98793c2aec4"
208
+ "gitHead": "8b9cb7a612f386ad8858deac531fe5db8778490d"
209
209
  }