@m6d/cortex-react 0.8.0 → 0.9.1
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 +32 -10
- package/dist/index.d.ts +92 -32
- package/dist/index.js +11 -11
- package/dist/styles.css +179 -118
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
color-scheme: light dark;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
@layer cortex
|
|
83
|
+
@layer base.cortex {
|
|
84
84
|
:where(.cortex-widget),
|
|
85
85
|
:where(.cortex-widget) *,
|
|
86
86
|
:where(.cortex-widget) ::before,
|
|
@@ -552,9 +552,14 @@
|
|
|
552
552
|
padding: 1.25rem;
|
|
553
553
|
text-align: center;
|
|
554
554
|
}
|
|
555
|
-
.cortex-widget__landing .cortex-
|
|
556
|
-
width: 100%;
|
|
555
|
+
.cortex-widget__landing .cortex-widget__landing-composer {
|
|
557
556
|
max-width: 26rem;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.cortex-widget__landing-composer {
|
|
560
|
+
width: 100%;
|
|
561
|
+
}
|
|
562
|
+
.cortex-widget__landing-composer .cortex-widget__input-area {
|
|
558
563
|
padding: 1rem 0 0;
|
|
559
564
|
border-top: 0;
|
|
560
565
|
background: transparent;
|
|
@@ -1592,7 +1597,130 @@ cortex-llm-usage-chips {
|
|
|
1592
1597
|
opacity: 0;
|
|
1593
1598
|
}
|
|
1594
1599
|
}
|
|
1600
|
+
.cortex-expandable {
|
|
1601
|
+
display: block;
|
|
1602
|
+
position: relative;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
.cortex-expandable__content {
|
|
1606
|
+
isolation: isolate;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
.cortex-expandable__toolbar {
|
|
1610
|
+
position: absolute;
|
|
1611
|
+
top: 0.375rem;
|
|
1612
|
+
inset-inline-end: 0.375rem;
|
|
1613
|
+
z-index: 1;
|
|
1614
|
+
display: flex;
|
|
1615
|
+
gap: 0.125rem;
|
|
1616
|
+
padding: 0.125rem;
|
|
1617
|
+
border: 1px solid var(--cortex-color-border);
|
|
1618
|
+
border-radius: var(--cortex-radius);
|
|
1619
|
+
background: var(--cortex-color-surface);
|
|
1620
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
1621
|
+
opacity: 0;
|
|
1622
|
+
transition: opacity 0.15s;
|
|
1623
|
+
}
|
|
1624
|
+
.cortex-expandable:hover > .cortex-expandable__toolbar, .cortex-expandable__toolbar:has(:focus-visible) {
|
|
1625
|
+
opacity: 1;
|
|
1626
|
+
}
|
|
1627
|
+
@media (hover: none) {
|
|
1628
|
+
.cortex-expandable__toolbar {
|
|
1629
|
+
position: static;
|
|
1630
|
+
width: fit-content;
|
|
1631
|
+
margin: 0 0 0.25rem;
|
|
1632
|
+
margin-inline-start: auto;
|
|
1633
|
+
opacity: 1;
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
.cortex-expandable__action {
|
|
1638
|
+
flex-shrink: 0;
|
|
1639
|
+
width: 2rem;
|
|
1640
|
+
height: 2rem;
|
|
1641
|
+
border-radius: calc(var(--cortex-radius) * 0.75);
|
|
1642
|
+
display: flex;
|
|
1643
|
+
align-items: center;
|
|
1644
|
+
justify-content: center;
|
|
1645
|
+
background: transparent;
|
|
1646
|
+
border: 0;
|
|
1647
|
+
cursor: pointer;
|
|
1648
|
+
transition: color 0.15s, background-color 0.15s;
|
|
1649
|
+
width: 1.75rem;
|
|
1650
|
+
height: 1.75rem;
|
|
1651
|
+
color: var(--cortex-color-text-muted);
|
|
1652
|
+
}
|
|
1653
|
+
.cortex-expandable__action:hover {
|
|
1654
|
+
color: var(--cortex-color-text);
|
|
1655
|
+
background: var(--cortex-color-hover);
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.cortex-expandable__dialog {
|
|
1659
|
+
width: fit-content;
|
|
1660
|
+
min-width: min(24rem, 100vw - 2rem);
|
|
1661
|
+
max-width: calc(100vw - 2rem);
|
|
1662
|
+
max-height: calc(100dvh - 2rem);
|
|
1663
|
+
margin: auto;
|
|
1664
|
+
padding: 0;
|
|
1665
|
+
overflow: hidden;
|
|
1666
|
+
border: 1px solid var(--cortex-color-border);
|
|
1667
|
+
border-radius: calc(var(--cortex-radius) * 1.5);
|
|
1668
|
+
background: var(--cortex-color-surface);
|
|
1669
|
+
color: var(--cortex-color-text-strong);
|
|
1670
|
+
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
|
|
1671
|
+
}
|
|
1672
|
+
.cortex-expandable__dialog[open] {
|
|
1673
|
+
display: flex;
|
|
1674
|
+
flex-direction: column;
|
|
1675
|
+
animation: cortex-expandable-in 0.18s ease-out;
|
|
1676
|
+
}
|
|
1677
|
+
.cortex-expandable__dialog::backdrop {
|
|
1678
|
+
background: rgba(0, 0, 0, 0.45);
|
|
1679
|
+
animation: cortex-expandable-backdrop-in 0.18s ease-out;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
.cortex-expandable__head {
|
|
1683
|
+
display: flex;
|
|
1684
|
+
align-items: center;
|
|
1685
|
+
gap: 0.125rem;
|
|
1686
|
+
padding-block: 0.375rem;
|
|
1687
|
+
padding-inline: 1rem 0.375rem;
|
|
1688
|
+
border-bottom: 1px solid var(--cortex-color-border);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
.cortex-expandable__title {
|
|
1692
|
+
flex: 1;
|
|
1693
|
+
min-width: 0;
|
|
1694
|
+
margin-inline-end: 0.5rem;
|
|
1695
|
+
overflow: hidden;
|
|
1696
|
+
text-overflow: ellipsis;
|
|
1697
|
+
white-space: nowrap;
|
|
1698
|
+
font-size: 0.875rem;
|
|
1699
|
+
font-weight: 600;
|
|
1700
|
+
color: var(--cortex-color-text-heading);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
.cortex-expandable__body {
|
|
1704
|
+
min-height: 0;
|
|
1705
|
+
overflow: auto;
|
|
1706
|
+
overscroll-behavior: contain;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
@keyframes cortex-expandable-in {
|
|
1710
|
+
from {
|
|
1711
|
+
opacity: 0;
|
|
1712
|
+
transform: translateY(0.5rem) scale(0.98);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
@keyframes cortex-expandable-backdrop-in {
|
|
1716
|
+
from {
|
|
1717
|
+
opacity: 0;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1595
1720
|
.cortex-media-block {
|
|
1721
|
+
display: block;
|
|
1722
|
+
width: 40rem;
|
|
1723
|
+
max-width: 100%;
|
|
1596
1724
|
margin: 0.75em 0;
|
|
1597
1725
|
border: 1px solid var(--cortex-color-border);
|
|
1598
1726
|
border-radius: var(--cortex-radius);
|
|
@@ -1657,6 +1785,7 @@ cortex-llm-usage-chips {
|
|
|
1657
1785
|
}
|
|
1658
1786
|
|
|
1659
1787
|
.cortex-media-block__body {
|
|
1788
|
+
display: block;
|
|
1660
1789
|
padding: 0.75rem;
|
|
1661
1790
|
}
|
|
1662
1791
|
.cortex-media-block__body[hidden] {
|
|
@@ -1671,6 +1800,9 @@ cortex-llm-usage-chips {
|
|
|
1671
1800
|
max-width: 100%;
|
|
1672
1801
|
height: auto;
|
|
1673
1802
|
}
|
|
1803
|
+
.cortex-media-block__body > div > svg {
|
|
1804
|
+
margin-inline: auto;
|
|
1805
|
+
}
|
|
1674
1806
|
.cortex-media-block__body--map {
|
|
1675
1807
|
padding: 0;
|
|
1676
1808
|
height: 18rem;
|
|
@@ -1679,6 +1811,26 @@ cortex-llm-usage-chips {
|
|
|
1679
1811
|
height: 100%;
|
|
1680
1812
|
}
|
|
1681
1813
|
|
|
1814
|
+
.cortex-expandable__body .cortex-media-block__body {
|
|
1815
|
+
width: min(72rem, 100vw - 2rem - 2px);
|
|
1816
|
+
}
|
|
1817
|
+
.cortex-expandable__body .cortex-media-block__body:not(.cortex-media-block__body--map) > div {
|
|
1818
|
+
display: grid;
|
|
1819
|
+
}
|
|
1820
|
+
.cortex-expandable__body .cortex-media-block__body:not(.cortex-media-block__body--map) svg {
|
|
1821
|
+
width: 100%;
|
|
1822
|
+
max-width: none !important;
|
|
1823
|
+
max-height: calc(100dvh - 6.5rem);
|
|
1824
|
+
}
|
|
1825
|
+
.cortex-expandable__body .cortex-media-block__body--map {
|
|
1826
|
+
height: min(48rem, 100dvh - 5rem);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
.cortex-expandable:has(> .cortex-expandable__content > .cortex-media-block__body--map) > .cortex-expandable__toolbar {
|
|
1830
|
+
right: 0.375rem;
|
|
1831
|
+
left: auto;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1682
1834
|
.cortex-media-block__error {
|
|
1683
1835
|
margin: 0;
|
|
1684
1836
|
font-size: 0.8125rem;
|
|
@@ -1701,13 +1853,25 @@ cortex-llm-usage-chips {
|
|
|
1701
1853
|
.cortex-attachment-image {
|
|
1702
1854
|
margin: 0.75em 0;
|
|
1703
1855
|
}
|
|
1704
|
-
.cortex-attachment-image
|
|
1856
|
+
.cortex-attachment-image .cortex-expandable {
|
|
1857
|
+
width: fit-content;
|
|
1858
|
+
max-width: 100%;
|
|
1859
|
+
}
|
|
1860
|
+
.cortex-attachment-image .cortex-expandable__content img {
|
|
1705
1861
|
display: block;
|
|
1706
1862
|
max-width: 100%;
|
|
1707
1863
|
border-radius: var(--cortex-radius);
|
|
1708
1864
|
border: 1px solid var(--cortex-color-border);
|
|
1709
1865
|
}
|
|
1710
1866
|
|
|
1867
|
+
.cortex-expandable__body .cortex-attachment-image__expanded {
|
|
1868
|
+
display: block;
|
|
1869
|
+
max-width: calc(100vw - 2rem - 2px);
|
|
1870
|
+
max-height: calc(100dvh - 5rem);
|
|
1871
|
+
margin: auto;
|
|
1872
|
+
border-radius: 0;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1711
1875
|
.cortex-attachment-image__caption {
|
|
1712
1876
|
margin: 0.25rem 0 0;
|
|
1713
1877
|
font-size: 0.75rem;
|
|
@@ -1716,7 +1880,7 @@ cortex-llm-usage-chips {
|
|
|
1716
1880
|
|
|
1717
1881
|
.cortex-table-block {
|
|
1718
1882
|
display: block;
|
|
1719
|
-
margin: 0.
|
|
1883
|
+
margin: 0.75em 0;
|
|
1720
1884
|
}
|
|
1721
1885
|
.cortex-table-block th {
|
|
1722
1886
|
white-space: nowrap;
|
|
@@ -1727,77 +1891,16 @@ cortex-llm-usage-chips {
|
|
|
1727
1891
|
.cortex-table-block table {
|
|
1728
1892
|
margin: 0;
|
|
1729
1893
|
}
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
justify-content: flex-end;
|
|
1734
|
-
gap: 0.125rem;
|
|
1735
|
-
min-height: 1.75rem;
|
|
1736
|
-
margin-bottom: 0.25rem;
|
|
1737
|
-
opacity: 0;
|
|
1738
|
-
transition: opacity 0.15s;
|
|
1739
|
-
}
|
|
1740
|
-
.cortex-table-block:hover .cortex-table-block__actions, .cortex-table-block:focus-within .cortex-table-block__actions {
|
|
1741
|
-
opacity: 1;
|
|
1742
|
-
}
|
|
1743
|
-
@media (hover: none) {
|
|
1744
|
-
.cortex-table-block__actions {
|
|
1745
|
-
opacity: 1;
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
.cortex-table-block__action {
|
|
1750
|
-
flex-shrink: 0;
|
|
1751
|
-
width: 2rem;
|
|
1752
|
-
height: 2rem;
|
|
1753
|
-
border-radius: calc(var(--cortex-radius) * 0.75);
|
|
1754
|
-
display: flex;
|
|
1755
|
-
align-items: center;
|
|
1756
|
-
justify-content: center;
|
|
1757
|
-
background: transparent;
|
|
1758
|
-
border: 0;
|
|
1759
|
-
cursor: pointer;
|
|
1760
|
-
transition: color 0.15s, background-color 0.15s;
|
|
1761
|
-
width: 1.75rem;
|
|
1762
|
-
height: 1.75rem;
|
|
1763
|
-
color: var(--cortex-color-text-muted);
|
|
1764
|
-
}
|
|
1765
|
-
.cortex-table-block__action:hover {
|
|
1766
|
-
color: var(--cortex-color-text);
|
|
1767
|
-
background: var(--cortex-color-hover);
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
.cortex-table-block__dialog {
|
|
1771
|
-
width: min(72rem, 100vw - 2rem);
|
|
1772
|
-
max-width: none;
|
|
1773
|
-
max-height: calc(100vh - 2rem);
|
|
1774
|
-
margin: auto;
|
|
1775
|
-
padding: 0;
|
|
1776
|
-
border: 1px solid var(--cortex-color-border);
|
|
1777
|
-
border-radius: calc(var(--cortex-radius) * 1.5);
|
|
1778
|
-
background: var(--cortex-color-surface);
|
|
1779
|
-
color: var(--cortex-color-text-strong);
|
|
1780
|
-
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
|
|
1781
|
-
}
|
|
1782
|
-
.cortex-table-block__dialog[open] {
|
|
1783
|
-
display: flex;
|
|
1784
|
-
flex-direction: column;
|
|
1785
|
-
}
|
|
1786
|
-
.cortex-table-block__dialog::backdrop {
|
|
1787
|
-
background: rgba(0, 0, 0, 0.4);
|
|
1894
|
+
.cortex-table-block .cortex-expandable {
|
|
1895
|
+
width: fit-content;
|
|
1896
|
+
max-width: 100%;
|
|
1788
1897
|
}
|
|
1789
1898
|
|
|
1790
|
-
.cortex-table-
|
|
1791
|
-
|
|
1792
|
-
justify-content: flex-end;
|
|
1793
|
-
gap: 0.125rem;
|
|
1794
|
-
padding: 0.375rem;
|
|
1795
|
-
border-bottom: 1px solid var(--cortex-color-border);
|
|
1899
|
+
.cortex-table-block__expanded {
|
|
1900
|
+
padding: 1rem;
|
|
1796
1901
|
}
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
overflow: auto;
|
|
1800
|
-
padding: 0 1rem;
|
|
1902
|
+
.cortex-table-block__expanded td {
|
|
1903
|
+
max-width: 40rem;
|
|
1801
1904
|
}
|
|
1802
1905
|
|
|
1803
1906
|
.cortex-reasoning-details {
|
|
@@ -2453,33 +2556,6 @@ details[open] > summary .cortex-debug-tool__chevron {
|
|
|
2453
2556
|
color: var(--cortex-color-text-heading);
|
|
2454
2557
|
}
|
|
2455
2558
|
|
|
2456
|
-
.cortex-approval-card__sentence--full {
|
|
2457
|
-
padding-top: 0;
|
|
2458
|
-
font-weight: 400;
|
|
2459
|
-
color: var(--cortex-color-text-strong);
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
.cortex-approval-card__rows {
|
|
2463
|
-
display: grid;
|
|
2464
|
-
grid-template-columns: fit-content(40%) minmax(0, 1fr);
|
|
2465
|
-
gap: 0.1875rem 0.75rem;
|
|
2466
|
-
margin: 0;
|
|
2467
|
-
padding: 0 0.75rem 0.75rem;
|
|
2468
|
-
font-size: 0.78125rem;
|
|
2469
|
-
}
|
|
2470
|
-
.cortex-approval-card__rows dt {
|
|
2471
|
-
color: var(--cortex-color-text-secondary);
|
|
2472
|
-
overflow-wrap: anywhere;
|
|
2473
|
-
}
|
|
2474
|
-
.cortex-approval-card__rows dd {
|
|
2475
|
-
max-height: 6rem;
|
|
2476
|
-
margin: 0;
|
|
2477
|
-
overflow-y: auto;
|
|
2478
|
-
white-space: pre-wrap;
|
|
2479
|
-
color: var(--cortex-color-text-strong);
|
|
2480
|
-
overflow-wrap: anywhere;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
2559
|
.cortex-approval-card__foot {
|
|
2484
2560
|
display: flex;
|
|
2485
2561
|
gap: 0.5rem;
|
|
@@ -2507,7 +2583,7 @@ details[open] > summary .cortex-debug-tool__chevron {
|
|
|
2507
2583
|
|
|
2508
2584
|
.cortex-approval-card__line {
|
|
2509
2585
|
display: flex;
|
|
2510
|
-
align-items:
|
|
2586
|
+
align-items: baseline;
|
|
2511
2587
|
gap: 0.5rem;
|
|
2512
2588
|
padding: 0.5rem 0.75rem;
|
|
2513
2589
|
font-size: 0.8125rem;
|
|
@@ -2525,22 +2601,6 @@ details[open] > summary .cortex-debug-tool__chevron {
|
|
|
2525
2601
|
.cortex-approval-card__summary {
|
|
2526
2602
|
min-width: 0;
|
|
2527
2603
|
flex: 1;
|
|
2528
|
-
overflow: hidden;
|
|
2529
|
-
text-overflow: ellipsis;
|
|
2530
|
-
white-space: nowrap;
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
|
-
.cortex-approval-card__details {
|
|
2534
|
-
flex-shrink: 0;
|
|
2535
|
-
border: 0;
|
|
2536
|
-
background: none;
|
|
2537
|
-
padding: 0;
|
|
2538
|
-
font: inherit;
|
|
2539
|
-
font-size: 0.75rem;
|
|
2540
|
-
color: var(--cortex-color-text-secondary);
|
|
2541
|
-
text-decoration: underline;
|
|
2542
|
-
text-underline-offset: 2px;
|
|
2543
|
-
cursor: pointer;
|
|
2544
2604
|
}
|
|
2545
2605
|
|
|
2546
2606
|
.cortex-tool-fold {
|
|
@@ -3662,7 +3722,8 @@ html[dir=ltr] .cortex-llm-inspector__trigger {
|
|
|
3662
3722
|
@media (prefers-reduced-motion: reduce) {
|
|
3663
3723
|
.cortex-widget *,
|
|
3664
3724
|
.cortex-widget *::before,
|
|
3665
|
-
.cortex-widget *::after
|
|
3725
|
+
.cortex-widget *::after,
|
|
3726
|
+
.cortex-widget *::backdrop {
|
|
3666
3727
|
animation-duration: 0.01ms !important;
|
|
3667
3728
|
animation-delay: 0s !important;
|
|
3668
3729
|
animation-iteration-count: 1 !important;
|