@novaprose/core 0.2.0 → 0.3.0

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/src/style.css CHANGED
@@ -28,6 +28,11 @@
28
28
  --nova-success: #1a7f37;
29
29
  --nova-success-bg: #dafbe1;
30
30
  --nova-warning-bg: #fff8c5;
31
+ --nova-comment-bg: rgba(212, 167, 44, 0.22);
32
+ --nova-comment-active-bg: rgba(212, 167, 44, 0.45);
33
+ --nova-comment-line: #d4a72c;
34
+ --nova-diff-added-bg: rgba(26, 127, 55, 0.16);
35
+ --nova-diff-removed-bg: rgba(207, 34, 46, 0.12);
31
36
  --nova-code-bg: #f6f8fa;
32
37
  --nova-quote: #d0d7de;
33
38
  --nova-selection: rgba(9, 105, 218, 0.18);
@@ -71,6 +76,11 @@
71
76
  --nova-success: #3fb950;
72
77
  --nova-success-bg: #0f2a19;
73
78
  --nova-warning-bg: #2e2510;
79
+ --nova-comment-bg: rgba(187, 128, 9, 0.25);
80
+ --nova-comment-active-bg: rgba(187, 128, 9, 0.5);
81
+ --nova-comment-line: #bb8009;
82
+ --nova-diff-added-bg: rgba(63, 185, 80, 0.2);
83
+ --nova-diff-removed-bg: rgba(248, 81, 73, 0.18);
74
84
  --nova-code-bg: #161b22;
75
85
  --nova-quote: #30363d;
76
86
  --nova-selection: rgba(56, 139, 253, 0.3);
@@ -104,6 +114,11 @@
104
114
  --nova-success: #3fb950;
105
115
  --nova-success-bg: #0f2a19;
106
116
  --nova-warning-bg: #2e2510;
117
+ --nova-comment-bg: rgba(187, 128, 9, 0.25);
118
+ --nova-comment-active-bg: rgba(187, 128, 9, 0.5);
119
+ --nova-comment-line: #bb8009;
120
+ --nova-diff-added-bg: rgba(63, 185, 80, 0.2);
121
+ --nova-diff-removed-bg: rgba(248, 81, 73, 0.18);
107
122
  --nova-code-bg: #161b22;
108
123
  --nova-quote: #30363d;
109
124
  --nova-selection: rgba(56, 139, 253, 0.3);
@@ -1729,3 +1744,453 @@ html.nova-fullscreen-lock body {
1729
1744
  padding: 0;
1730
1745
  margin-left: -2px;
1731
1746
  }
1747
+
1748
+ /* ---------- Комментарии (плагин comments) ---------- */
1749
+
1750
+ .nova-comment {
1751
+ background: var(--nova-comment-bg);
1752
+ border-bottom: 2px solid var(--nova-comment-line);
1753
+ cursor: pointer;
1754
+ }
1755
+ .nova-comment.is-active {
1756
+ background: var(--nova-comment-active-bg);
1757
+ }
1758
+
1759
+ /* Текст и панель рядом; когда места мало (узкий экран), панель уходит под текст во всю ширину. */
1760
+ .nova-body {
1761
+ display: flex;
1762
+ flex-wrap: wrap;
1763
+ flex: 1;
1764
+ min-height: 0;
1765
+ min-width: 0;
1766
+ }
1767
+ .nova-body > .nova-content {
1768
+ flex: 999 1 360px;
1769
+ }
1770
+
1771
+ .nova-comments {
1772
+ display: flex;
1773
+ flex: 1 1 280px;
1774
+ flex-direction: column;
1775
+ gap: 8px;
1776
+ max-height: 70vh;
1777
+ min-width: 0;
1778
+ padding: 10px;
1779
+ overflow: auto;
1780
+ border-inline-start: 1px solid var(--nova-border);
1781
+ background: var(--nova-toolbar-bg);
1782
+ font-size: 13px;
1783
+ }
1784
+ .nova-comments[hidden] {
1785
+ display: none;
1786
+ }
1787
+ .nova-comments-head {
1788
+ display: flex;
1789
+ align-items: center;
1790
+ gap: 6px;
1791
+ }
1792
+ .nova-comments-title {
1793
+ margin: 0;
1794
+ font-size: 14px;
1795
+ font-weight: 600;
1796
+ }
1797
+ .nova-comments-count:not(:empty) {
1798
+ padding: 0 6px;
1799
+ border-radius: 999px;
1800
+ background: var(--nova-hover);
1801
+ color: var(--nova-muted);
1802
+ font-size: 12px;
1803
+ }
1804
+ .nova-comments-close {
1805
+ margin-inline-start: auto;
1806
+ font-size: 18px;
1807
+ line-height: 1;
1808
+ }
1809
+ .nova-comments-filter {
1810
+ display: inline-flex;
1811
+ align-items: center;
1812
+ gap: 6px;
1813
+ color: var(--nova-muted);
1814
+ }
1815
+ .nova-comments-filter input {
1816
+ accent-color: var(--nova-accent);
1817
+ }
1818
+ .nova-comments-list {
1819
+ display: flex;
1820
+ flex-direction: column;
1821
+ gap: 8px;
1822
+ }
1823
+ .nova-comments-empty {
1824
+ margin: 8px 2px;
1825
+ color: var(--nova-muted);
1826
+ line-height: 1.5;
1827
+ }
1828
+
1829
+ .nova-thread {
1830
+ display: flex;
1831
+ flex-direction: column;
1832
+ gap: 8px;
1833
+ padding: 10px;
1834
+ border: 1px solid var(--nova-border);
1835
+ border-radius: var(--nova-radius);
1836
+ background: var(--nova-surface);
1837
+ cursor: pointer;
1838
+ }
1839
+ .nova-thread.is-active {
1840
+ border-color: var(--nova-comment-line);
1841
+ box-shadow: var(--nova-shadow);
1842
+ cursor: default;
1843
+ }
1844
+ .nova-thread.is-resolved {
1845
+ opacity: 0.75;
1846
+ }
1847
+ .nova-thread:focus-visible {
1848
+ outline: 2px solid var(--nova-focus);
1849
+ outline-offset: 1px;
1850
+ }
1851
+ .nova-thread-quote {
1852
+ margin: 0;
1853
+ padding-inline-start: 8px;
1854
+ border-inline-start: 3px solid var(--nova-comment-line);
1855
+ color: var(--nova-muted);
1856
+ overflow-wrap: anywhere;
1857
+ }
1858
+ .nova-thread-orphan,
1859
+ .nova-thread-resolved {
1860
+ margin: 0;
1861
+ color: var(--nova-muted);
1862
+ font-style: italic;
1863
+ }
1864
+ .nova-thread-tools,
1865
+ .nova-comment-actions {
1866
+ display: flex;
1867
+ flex-wrap: wrap;
1868
+ justify-content: flex-end;
1869
+ gap: 6px;
1870
+ }
1871
+ .nova-thread .nova-button {
1872
+ height: 28px;
1873
+ padding: 0 10px;
1874
+ font-size: 12px;
1875
+ }
1876
+ .nova-thread:not(.is-active):not(:hover):not(:focus-within) .nova-thread-tools {
1877
+ display: none;
1878
+ }
1879
+ .nova-button-danger {
1880
+ color: var(--nova-danger);
1881
+ }
1882
+
1883
+ .nova-comment-item + .nova-comment-item {
1884
+ padding-top: 8px;
1885
+ border-top: 1px solid var(--nova-border);
1886
+ }
1887
+ .nova-comment-head {
1888
+ display: flex;
1889
+ flex-wrap: wrap;
1890
+ align-items: center;
1891
+ gap: 6px;
1892
+ color: var(--nova-muted);
1893
+ font-size: 12px;
1894
+ }
1895
+ .nova-comment-avatar {
1896
+ display: grid;
1897
+ place-items: center;
1898
+ min-width: 22px;
1899
+ height: 22px;
1900
+ padding: 0 4px;
1901
+ border-radius: 999px;
1902
+ color: #fff;
1903
+ font-size: 10px;
1904
+ font-weight: 600;
1905
+ }
1906
+ .nova-comment-author {
1907
+ color: var(--nova-fg);
1908
+ font-weight: 600;
1909
+ }
1910
+ .nova-comment-you {
1911
+ color: var(--nova-muted);
1912
+ font-weight: 400;
1913
+ }
1914
+ .nova-comment-text {
1915
+ margin: 4px 0 0;
1916
+ white-space: pre-wrap;
1917
+ overflow-wrap: anywhere;
1918
+ line-height: 1.45;
1919
+ }
1920
+ .nova-comment-tools {
1921
+ display: flex;
1922
+ gap: 10px;
1923
+ margin-top: 2px;
1924
+ }
1925
+ .nova-link-btn {
1926
+ padding: 0;
1927
+ border: 0;
1928
+ background: none;
1929
+ color: var(--nova-accent);
1930
+ font: inherit;
1931
+ font-size: 12px;
1932
+ cursor: pointer;
1933
+ }
1934
+ .nova-link-btn:hover {
1935
+ text-decoration: underline;
1936
+ }
1937
+ .nova-link-btn:focus-visible {
1938
+ outline: 2px solid var(--nova-focus);
1939
+ outline-offset: 2px;
1940
+ border-radius: 2px;
1941
+ }
1942
+ .nova-comment-composer {
1943
+ display: flex;
1944
+ flex-direction: column;
1945
+ gap: 6px;
1946
+ }
1947
+ .nova-comment-input {
1948
+ width: 100%;
1949
+ min-height: 52px;
1950
+ resize: vertical;
1951
+ font: inherit;
1952
+ }
1953
+
1954
+ /* Узкий редактор: панель под текстом, отделена сверху (порог = 360 + 280 из flex-basis выше). */
1955
+ .nova-body {
1956
+ container-type: inline-size;
1957
+ }
1958
+ @container (max-width: 640px) {
1959
+ .nova-body > .nova-comments {
1960
+ flex-basis: 100%;
1961
+ max-height: none;
1962
+ border-inline-start: 0;
1963
+ border-top: 1px solid var(--nova-border);
1964
+ }
1965
+ }
1966
+
1967
+ /* ---------- Упоминания (плагин mentions и «@» в комментариях) ---------- */
1968
+
1969
+ .nova-prosemirror [data-mention],
1970
+ .nova-comment-mention {
1971
+ padding: 0 2px;
1972
+ border-radius: 4px;
1973
+ background: var(--nova-active);
1974
+ color: var(--nova-active-fg);
1975
+ font-weight: 500;
1976
+ white-space: nowrap;
1977
+ }
1978
+ .nova-mention-wrap {
1979
+ position: relative;
1980
+ }
1981
+ .nova-mention-list {
1982
+ position: absolute;
1983
+ z-index: 2;
1984
+ inset-inline: 0;
1985
+ top: 100%;
1986
+ margin: 4px 0 0;
1987
+ padding: 4px;
1988
+ max-height: 220px;
1989
+ overflow: auto;
1990
+ list-style: none;
1991
+ border: 1px solid var(--nova-border);
1992
+ border-radius: var(--nova-radius);
1993
+ background: var(--nova-surface);
1994
+ box-shadow: var(--nova-shadow);
1995
+ }
1996
+ .nova-mention-list[hidden] {
1997
+ display: none;
1998
+ }
1999
+ .nova-mention-option {
2000
+ display: flex;
2001
+ align-items: center;
2002
+ gap: 8px;
2003
+ padding: 5px 6px;
2004
+ border-radius: var(--nova-radius-sm);
2005
+ cursor: pointer;
2006
+ }
2007
+ .nova-mention-option[aria-selected='true'] {
2008
+ background: var(--nova-active);
2009
+ color: var(--nova-active-fg);
2010
+ }
2011
+ .nova-mention-name {
2012
+ font-weight: 500;
2013
+ }
2014
+ .nova-mention-detail {
2015
+ margin-inline-start: auto;
2016
+ color: var(--nova-muted);
2017
+ font-size: 12px;
2018
+ overflow: hidden;
2019
+ text-overflow: ellipsis;
2020
+ white-space: nowrap;
2021
+ }
2022
+ .nova-mention-empty {
2023
+ padding: 5px 6px;
2024
+ color: var(--nova-muted);
2025
+ }
2026
+
2027
+ /* ---------- История версий (плагин revisionhistory) ---------- */
2028
+
2029
+ .nova-editor.nova-history-open {
2030
+ min-height: 460px;
2031
+ }
2032
+ .nova-history {
2033
+ position: absolute;
2034
+ inset: 0;
2035
+ z-index: 5;
2036
+ display: flex;
2037
+ flex-direction: column;
2038
+ border-radius: inherit;
2039
+ background: var(--nova-bg);
2040
+ container-type: inline-size;
2041
+ }
2042
+ .nova-history-head {
2043
+ display: flex;
2044
+ flex-wrap: wrap;
2045
+ align-items: center;
2046
+ gap: 8px 10px;
2047
+ padding: 8px 10px;
2048
+ border-bottom: 1px solid var(--nova-border);
2049
+ background: var(--nova-toolbar-bg);
2050
+ }
2051
+ .nova-history-title {
2052
+ margin: 0;
2053
+ font-size: 15px;
2054
+ font-weight: 600;
2055
+ }
2056
+ .nova-history-spacer {
2057
+ flex: 1;
2058
+ }
2059
+ .nova-history-legend {
2060
+ display: flex;
2061
+ flex-wrap: wrap;
2062
+ align-items: center;
2063
+ gap: 4px 12px;
2064
+ color: var(--nova-muted);
2065
+ font-size: 12px;
2066
+ }
2067
+ .nova-history-toggle {
2068
+ display: inline-flex;
2069
+ align-items: center;
2070
+ gap: 5px;
2071
+ }
2072
+ .nova-history-toggle input {
2073
+ accent-color: var(--nova-accent);
2074
+ }
2075
+ .nova-history-swatch::before {
2076
+ content: '';
2077
+ display: inline-block;
2078
+ width: 10px;
2079
+ height: 10px;
2080
+ margin-inline-end: 5px;
2081
+ border-radius: 2px;
2082
+ vertical-align: -1px;
2083
+ }
2084
+ .nova-history-swatch.is-added::before {
2085
+ background: var(--nova-diff-added-bg);
2086
+ }
2087
+ .nova-history-swatch.is-removed::before {
2088
+ background: var(--nova-diff-removed-bg);
2089
+ }
2090
+ .nova-history-body {
2091
+ display: flex;
2092
+ flex: 1;
2093
+ min-height: 0;
2094
+ }
2095
+ .nova-history-preview {
2096
+ flex: 1;
2097
+ min-width: 0;
2098
+ overflow: auto;
2099
+ }
2100
+ .nova-history-side {
2101
+ width: 260px;
2102
+ flex: none;
2103
+ overflow: auto;
2104
+ padding: 8px;
2105
+ border-inline-start: 1px solid var(--nova-border);
2106
+ background: var(--nova-toolbar-bg);
2107
+ }
2108
+ .nova-history-status:empty {
2109
+ display: none;
2110
+ }
2111
+ .nova-history-status {
2112
+ margin: 4px 4px 8px;
2113
+ color: var(--nova-muted);
2114
+ font-size: 13px;
2115
+ }
2116
+ .nova-history-list {
2117
+ display: flex;
2118
+ flex-direction: column;
2119
+ gap: 2px;
2120
+ margin: 0;
2121
+ padding: 0;
2122
+ list-style: none;
2123
+ }
2124
+ .nova-history-item {
2125
+ display: flex;
2126
+ flex-direction: column;
2127
+ align-items: flex-start;
2128
+ gap: 2px;
2129
+ width: 100%;
2130
+ padding: 7px 9px;
2131
+ border: 1px solid transparent;
2132
+ border-radius: var(--nova-radius-sm);
2133
+ background: none;
2134
+ color: inherit;
2135
+ font: inherit;
2136
+ font-size: 13px;
2137
+ text-align: start;
2138
+ cursor: pointer;
2139
+ }
2140
+ .nova-history-item:hover {
2141
+ background: var(--nova-hover);
2142
+ }
2143
+ .nova-history-item[aria-current='true'] {
2144
+ border-color: var(--nova-accent);
2145
+ background: var(--nova-active);
2146
+ }
2147
+ .nova-history-item:focus-visible {
2148
+ outline: 2px solid var(--nova-focus);
2149
+ outline-offset: 1px;
2150
+ }
2151
+ .nova-history-time {
2152
+ font-weight: 600;
2153
+ }
2154
+ .nova-history-label {
2155
+ padding: 0 6px;
2156
+ border-radius: 999px;
2157
+ background: var(--nova-hover);
2158
+ font-size: 12px;
2159
+ }
2160
+ .nova-history-authors {
2161
+ color: var(--nova-muted);
2162
+ font-size: 12px;
2163
+ }
2164
+ .nova-diff-added {
2165
+ background: var(--nova-diff-added-bg);
2166
+ text-decoration: underline 2px var(--nova-success);
2167
+ text-underline-offset: 3px;
2168
+ }
2169
+ .nova-diff-removed {
2170
+ background: var(--nova-diff-removed-bg);
2171
+ color: var(--nova-danger);
2172
+ text-decoration: line-through;
2173
+ }
2174
+ div.nova-diff-removed {
2175
+ margin: 0.5em 0;
2176
+ padding: 2px 6px;
2177
+ border-radius: var(--nova-radius-sm);
2178
+ }
2179
+
2180
+ /* Узко: список версий над текстом, полосой. */
2181
+ @container (max-width: 600px) {
2182
+ .nova-history-body {
2183
+ flex-direction: column-reverse;
2184
+ }
2185
+ .nova-history-side {
2186
+ width: auto;
2187
+ max-height: 150px;
2188
+ border-inline-start: 0;
2189
+ border-bottom: 1px solid var(--nova-border);
2190
+ }
2191
+ }
2192
+ /* Кнопки истории — одной группой в первой строке, легенда — второй строкой. */
2193
+ .nova-history-legend {
2194
+ order: 1;
2195
+ flex-basis: 100%;
2196
+ }