@alpaca-editor/core 1.0.3781 → 1.0.3787
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/components.json +21 -0
- package/dev.css +3 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +32 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/editor/Titlebar.js +1 -1
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/client/EditorClient.js +7 -6
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/menubar/ActionsMenu.js +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +2 -2
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.js +3 -3
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/reviews/Comment.js +18 -14
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/sidebar/Insert.js +2 -2
- package/dist/editor/sidebar/Insert.js.map +1 -1
- package/dist/editor/sidebar/MainContentTree.js +2 -0
- package/dist/editor/sidebar/MainContentTree.js.map +1 -1
- package/dist/editor/sidebar/Translations.js +4 -4
- package/dist/editor/sidebar/Translations.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +1 -1
- package/dist/editor/ui/SimpleTable.js +2 -2
- package/dist/editor/ui/SimpleTable.js.map +1 -1
- package/dist/editor/utils.js +7 -6
- package/dist/editor/utils.js.map +1 -1
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +303 -11
- package/package.json +9 -3
- package/src/components/ui/button.tsx +62 -0
- package/src/editor/Titlebar.tsx +1 -1
- package/src/editor/client/EditorClient.tsx +7 -6
- package/src/editor/menubar/ActionsMenu.tsx +1 -1
- package/src/editor/page-editor-chrome/CommentHighlighting.tsx +8 -9
- package/src/editor/page-viewer/MiniMap.tsx +11 -11
- package/src/editor/reviews/Comment.tsx +38 -33
- package/src/editor/sidebar/Insert.tsx +2 -2
- package/src/editor/sidebar/MainContentTree.tsx +1 -0
- package/src/editor/sidebar/Translations.tsx +12 -12
- package/src/editor/sidebar/ViewSelector.tsx +1 -1
- package/src/editor/ui/SimpleTable.tsx +3 -6
- package/src/editor/utils.ts +32 -29
- package/src/lib/utils.ts +6 -0
- package/styles.css +124 -0
- package/tsconfig.build.json +3 -0
- package/tsconfig.json +3 -0
package/dist/styles.css
CHANGED
|
@@ -80,9 +80,6 @@
|
|
|
80
80
|
--font-weight-medium: 500;
|
|
81
81
|
--font-weight-semibold: 600;
|
|
82
82
|
--font-weight-bold: 700;
|
|
83
|
-
--radius-sm: 0.25rem;
|
|
84
|
-
--radius-md: 0.375rem;
|
|
85
|
-
--radius-lg: 0.5rem;
|
|
86
83
|
--animate-spin: spin 1s linear infinite;
|
|
87
84
|
--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
88
85
|
--default-transition-duration: 150ms;
|
|
@@ -364,6 +361,10 @@
|
|
|
364
361
|
.inline-flex {
|
|
365
362
|
display: inline-flex;
|
|
366
363
|
}
|
|
364
|
+
.size-9 {
|
|
365
|
+
width: calc(var(--spacing) * 9);
|
|
366
|
+
height: calc(var(--spacing) * 9);
|
|
367
|
+
}
|
|
367
368
|
.size-full {
|
|
368
369
|
width: 100%;
|
|
369
370
|
height: 100%;
|
|
@@ -395,6 +396,9 @@
|
|
|
395
396
|
.h-10 {
|
|
396
397
|
height: calc(var(--spacing) * 10);
|
|
397
398
|
}
|
|
399
|
+
.h-11 {
|
|
400
|
+
height: calc(var(--spacing) * 11);
|
|
401
|
+
}
|
|
398
402
|
.h-12 {
|
|
399
403
|
height: calc(var(--spacing) * 12);
|
|
400
404
|
}
|
|
@@ -452,6 +456,9 @@
|
|
|
452
456
|
.min-h-10 {
|
|
453
457
|
min-height: calc(var(--spacing) * 10);
|
|
454
458
|
}
|
|
459
|
+
.min-h-11 {
|
|
460
|
+
min-height: calc(var(--spacing) * 11);
|
|
461
|
+
}
|
|
455
462
|
.min-h-12 {
|
|
456
463
|
min-height: calc(var(--spacing) * 12);
|
|
457
464
|
}
|
|
@@ -772,31 +779,31 @@
|
|
|
772
779
|
border-radius: calc(infinity * 1px);
|
|
773
780
|
}
|
|
774
781
|
.rounded-lg {
|
|
775
|
-
border-radius: var(--radius
|
|
782
|
+
border-radius: var(--radius);
|
|
776
783
|
}
|
|
777
784
|
.rounded-md {
|
|
778
|
-
border-radius: var(--radius-
|
|
785
|
+
border-radius: calc(var(--radius) - 2px);
|
|
779
786
|
}
|
|
780
787
|
.rounded-none {
|
|
781
788
|
border-radius: 0;
|
|
782
789
|
}
|
|
783
790
|
.rounded-sm {
|
|
784
|
-
border-radius: var(--radius-
|
|
791
|
+
border-radius: calc(var(--radius) - 4px);
|
|
785
792
|
}
|
|
786
793
|
.rounded-t-lg {
|
|
787
|
-
border-top-left-radius: var(--radius
|
|
788
|
-
border-top-right-radius: var(--radius
|
|
794
|
+
border-top-left-radius: var(--radius);
|
|
795
|
+
border-top-right-radius: var(--radius);
|
|
789
796
|
}
|
|
790
797
|
.rounded-l-full {
|
|
791
798
|
border-top-left-radius: calc(infinity * 1px);
|
|
792
799
|
border-bottom-left-radius: calc(infinity * 1px);
|
|
793
800
|
}
|
|
794
801
|
.rounded-l-lg {
|
|
795
|
-
border-top-left-radius: var(--radius
|
|
796
|
-
border-bottom-left-radius: var(--radius
|
|
802
|
+
border-top-left-radius: var(--radius);
|
|
803
|
+
border-bottom-left-radius: var(--radius);
|
|
797
804
|
}
|
|
798
805
|
.rounded-bl-lg {
|
|
799
|
-
border-bottom-left-radius: var(--radius
|
|
806
|
+
border-bottom-left-radius: var(--radius);
|
|
800
807
|
}
|
|
801
808
|
.border {
|
|
802
809
|
border-style: var(--tw-border-style);
|
|
@@ -910,6 +917,9 @@
|
|
|
910
917
|
.border-t-transparent {
|
|
911
918
|
border-top-color: transparent;
|
|
912
919
|
}
|
|
920
|
+
.bg-background {
|
|
921
|
+
background-color: var(--background);
|
|
922
|
+
}
|
|
913
923
|
.bg-black {
|
|
914
924
|
background-color: var(--color-black);
|
|
915
925
|
}
|
|
@@ -931,6 +941,9 @@
|
|
|
931
941
|
.bg-blue-600 {
|
|
932
942
|
background-color: var(--color-blue-600);
|
|
933
943
|
}
|
|
944
|
+
.bg-destructive {
|
|
945
|
+
background-color: var(--destructive);
|
|
946
|
+
}
|
|
934
947
|
.bg-gray-50 {
|
|
935
948
|
background-color: var(--color-gray-50);
|
|
936
949
|
}
|
|
@@ -976,6 +989,9 @@
|
|
|
976
989
|
.bg-pink-400 {
|
|
977
990
|
background-color: var(--color-pink-400);
|
|
978
991
|
}
|
|
992
|
+
.bg-primary {
|
|
993
|
+
background-color: var(--primary);
|
|
994
|
+
}
|
|
979
995
|
.bg-purple-400 {
|
|
980
996
|
background-color: var(--color-purple-400);
|
|
981
997
|
}
|
|
@@ -988,6 +1004,9 @@
|
|
|
988
1004
|
.bg-red-500 {
|
|
989
1005
|
background-color: var(--color-red-500);
|
|
990
1006
|
}
|
|
1007
|
+
.bg-secondary {
|
|
1008
|
+
background-color: var(--secondary);
|
|
1009
|
+
}
|
|
991
1010
|
.bg-sky-200 {
|
|
992
1011
|
background-color: var(--color-sky-200);
|
|
993
1012
|
}
|
|
@@ -1250,6 +1269,9 @@
|
|
|
1250
1269
|
.break-all {
|
|
1251
1270
|
word-break: break-all;
|
|
1252
1271
|
}
|
|
1272
|
+
.whitespace-nowrap {
|
|
1273
|
+
white-space: nowrap;
|
|
1274
|
+
}
|
|
1253
1275
|
.whitespace-pre-wrap {
|
|
1254
1276
|
white-space: pre-wrap;
|
|
1255
1277
|
}
|
|
@@ -1325,6 +1347,12 @@
|
|
|
1325
1347
|
.text-pink-400 {
|
|
1326
1348
|
color: var(--color-pink-400);
|
|
1327
1349
|
}
|
|
1350
|
+
.text-primary {
|
|
1351
|
+
color: var(--primary);
|
|
1352
|
+
}
|
|
1353
|
+
.text-primary-foreground {
|
|
1354
|
+
color: var(--primary-foreground);
|
|
1355
|
+
}
|
|
1328
1356
|
.text-red-400 {
|
|
1329
1357
|
color: var(--color-red-400);
|
|
1330
1358
|
}
|
|
@@ -1337,6 +1365,9 @@
|
|
|
1337
1365
|
.text-red-800 {
|
|
1338
1366
|
color: var(--color-red-800);
|
|
1339
1367
|
}
|
|
1368
|
+
.text-secondary-foreground {
|
|
1369
|
+
color: var(--secondary-foreground);
|
|
1370
|
+
}
|
|
1340
1371
|
.text-white {
|
|
1341
1372
|
color: var(--color-white);
|
|
1342
1373
|
}
|
|
@@ -1355,6 +1386,9 @@
|
|
|
1355
1386
|
.underline {
|
|
1356
1387
|
text-decoration-line: underline;
|
|
1357
1388
|
}
|
|
1389
|
+
.underline-offset-4 {
|
|
1390
|
+
text-underline-offset: 4px;
|
|
1391
|
+
}
|
|
1358
1392
|
.opacity-0 {
|
|
1359
1393
|
opacity: 0%;
|
|
1360
1394
|
}
|
|
@@ -1364,6 +1398,9 @@
|
|
|
1364
1398
|
.opacity-50 {
|
|
1365
1399
|
opacity: 50%;
|
|
1366
1400
|
}
|
|
1401
|
+
.opacity-60 {
|
|
1402
|
+
opacity: 60%;
|
|
1403
|
+
}
|
|
1367
1404
|
.opacity-70 {
|
|
1368
1405
|
opacity: 70%;
|
|
1369
1406
|
}
|
|
@@ -1400,12 +1437,19 @@
|
|
|
1400
1437
|
--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1401
1438
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1402
1439
|
}
|
|
1440
|
+
.shadow-xs {
|
|
1441
|
+
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));
|
|
1442
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1443
|
+
}
|
|
1403
1444
|
.shadow-black {
|
|
1404
1445
|
--tw-shadow-color: var(--color-black);
|
|
1405
1446
|
}
|
|
1406
1447
|
.shadow-blue-500\/50 {
|
|
1407
1448
|
--tw-shadow-color: color-mix(in oklab, var(--color-blue-500) 50%, transparent);
|
|
1408
1449
|
}
|
|
1450
|
+
.ring-offset-background {
|
|
1451
|
+
--tw-ring-offset-color: var(--background);
|
|
1452
|
+
}
|
|
1409
1453
|
.outline {
|
|
1410
1454
|
outline-style: var(--tw-outline-style);
|
|
1411
1455
|
outline-width: 1px;
|
|
@@ -1485,6 +1529,10 @@
|
|
|
1485
1529
|
--tw-ease: linear;
|
|
1486
1530
|
transition-timing-function: linear;
|
|
1487
1531
|
}
|
|
1532
|
+
.outline-none {
|
|
1533
|
+
--tw-outline-style: none;
|
|
1534
|
+
outline-style: none;
|
|
1535
|
+
}
|
|
1488
1536
|
.select-none {
|
|
1489
1537
|
-webkit-user-select: none;
|
|
1490
1538
|
user-select: none;
|
|
@@ -1571,6 +1619,13 @@
|
|
|
1571
1619
|
}
|
|
1572
1620
|
}
|
|
1573
1621
|
}
|
|
1622
|
+
.hover\:bg-accent {
|
|
1623
|
+
&:hover {
|
|
1624
|
+
@media (hover: hover) {
|
|
1625
|
+
background-color: var(--accent);
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1574
1629
|
.hover\:bg-blue-600 {
|
|
1575
1630
|
&:hover {
|
|
1576
1631
|
@media (hover: hover) {
|
|
@@ -1585,6 +1640,13 @@
|
|
|
1585
1640
|
}
|
|
1586
1641
|
}
|
|
1587
1642
|
}
|
|
1643
|
+
.hover\:bg-destructive\/90 {
|
|
1644
|
+
&:hover {
|
|
1645
|
+
@media (hover: hover) {
|
|
1646
|
+
background-color: color-mix(in oklab, var(--destructive) 90%, transparent);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1588
1650
|
.hover\:bg-gray-50 {
|
|
1589
1651
|
&:hover {
|
|
1590
1652
|
@media (hover: hover) {
|
|
@@ -1641,6 +1703,13 @@
|
|
|
1641
1703
|
}
|
|
1642
1704
|
}
|
|
1643
1705
|
}
|
|
1706
|
+
.hover\:bg-primary\/90 {
|
|
1707
|
+
&:hover {
|
|
1708
|
+
@media (hover: hover) {
|
|
1709
|
+
background-color: color-mix(in oklab, var(--primary) 90%, transparent);
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1644
1713
|
.hover\:bg-red-600 {
|
|
1645
1714
|
&:hover {
|
|
1646
1715
|
@media (hover: hover) {
|
|
@@ -1648,6 +1717,20 @@
|
|
|
1648
1717
|
}
|
|
1649
1718
|
}
|
|
1650
1719
|
}
|
|
1720
|
+
.hover\:bg-secondary\/80 {
|
|
1721
|
+
&:hover {
|
|
1722
|
+
@media (hover: hover) {
|
|
1723
|
+
background-color: color-mix(in oklab, var(--secondary) 80%, transparent);
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
.hover\:text-accent-foreground {
|
|
1728
|
+
&:hover {
|
|
1729
|
+
@media (hover: hover) {
|
|
1730
|
+
color: var(--accent-foreground);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1651
1734
|
.hover\:text-blue-600 {
|
|
1652
1735
|
&:hover {
|
|
1653
1736
|
@media (hover: hover) {
|
|
@@ -1711,6 +1794,13 @@
|
|
|
1711
1794
|
}
|
|
1712
1795
|
}
|
|
1713
1796
|
}
|
|
1797
|
+
.hover\:opacity-65 {
|
|
1798
|
+
&:hover {
|
|
1799
|
+
@media (hover: hover) {
|
|
1800
|
+
opacity: 65%;
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1714
1804
|
.hover\:opacity-85 {
|
|
1715
1805
|
&:hover {
|
|
1716
1806
|
@media (hover: hover) {
|
|
@@ -1762,12 +1852,38 @@
|
|
|
1762
1852
|
outline-style: none;
|
|
1763
1853
|
}
|
|
1764
1854
|
}
|
|
1855
|
+
.focus-visible\:border-ring {
|
|
1856
|
+
&:focus-visible {
|
|
1857
|
+
border-color: var(--ring);
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1765
1860
|
.focus-visible\:ring-2 {
|
|
1766
1861
|
&:focus-visible {
|
|
1767
1862
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentColor);
|
|
1768
1863
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1769
1864
|
}
|
|
1770
1865
|
}
|
|
1866
|
+
.focus-visible\:ring-\[3px\] {
|
|
1867
|
+
&:focus-visible {
|
|
1868
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentColor);
|
|
1869
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
.focus-visible\:ring-destructive\/20 {
|
|
1873
|
+
&:focus-visible {
|
|
1874
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
.focus-visible\:ring-ring {
|
|
1878
|
+
&:focus-visible {
|
|
1879
|
+
--tw-ring-color: var(--ring);
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
.focus-visible\:ring-ring\/50 {
|
|
1883
|
+
&:focus-visible {
|
|
1884
|
+
--tw-ring-color: color-mix(in oklab, var(--ring) 50%, transparent);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1771
1887
|
.focus-visible\:ring-offset-2 {
|
|
1772
1888
|
&:focus-visible {
|
|
1773
1889
|
--tw-ring-offset-width: 2px;
|
|
@@ -1780,6 +1896,11 @@
|
|
|
1780
1896
|
outline-style: none;
|
|
1781
1897
|
}
|
|
1782
1898
|
}
|
|
1899
|
+
.disabled\:pointer-events-none {
|
|
1900
|
+
&:disabled {
|
|
1901
|
+
pointer-events: none;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1783
1904
|
.disabled\:cursor-not-allowed {
|
|
1784
1905
|
&:disabled {
|
|
1785
1906
|
cursor: not-allowed;
|
|
@@ -1800,6 +1921,31 @@
|
|
|
1800
1921
|
opacity: 50%;
|
|
1801
1922
|
}
|
|
1802
1923
|
}
|
|
1924
|
+
.has-\[\>svg\]\:px-2\.5 {
|
|
1925
|
+
&:has(>svg) {
|
|
1926
|
+
padding-inline: calc(var(--spacing) * 2.5);
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
.has-\[\>svg\]\:px-3 {
|
|
1930
|
+
&:has(>svg) {
|
|
1931
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
.has-\[\>svg\]\:px-4 {
|
|
1935
|
+
&:has(>svg) {
|
|
1936
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
.aria-invalid\:border-destructive {
|
|
1940
|
+
&[aria-invalid="true"] {
|
|
1941
|
+
border-color: var(--destructive);
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
.aria-invalid\:ring-destructive\/20 {
|
|
1945
|
+
&[aria-invalid="true"] {
|
|
1946
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1803
1949
|
.lg\:pr-20 {
|
|
1804
1950
|
@media (width >= 64rem) {
|
|
1805
1951
|
padding-right: calc(var(--spacing) * 20);
|
|
@@ -1810,6 +1956,53 @@
|
|
|
1810
1956
|
padding-right: calc(var(--spacing) * 32);
|
|
1811
1957
|
}
|
|
1812
1958
|
}
|
|
1959
|
+
.dark\:border-input {
|
|
1960
|
+
@media (prefers-color-scheme: dark) {
|
|
1961
|
+
border-color: var(--input);
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
.dark\:bg-destructive\/60 {
|
|
1965
|
+
@media (prefers-color-scheme: dark) {
|
|
1966
|
+
background-color: color-mix(in oklab, var(--destructive) 60%, transparent);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
.dark\:bg-input\/30 {
|
|
1970
|
+
@media (prefers-color-scheme: dark) {
|
|
1971
|
+
background-color: color-mix(in oklab, var(--input) 30%, transparent);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
.dark\:hover\:bg-accent\/50 {
|
|
1975
|
+
@media (prefers-color-scheme: dark) {
|
|
1976
|
+
&:hover {
|
|
1977
|
+
@media (hover: hover) {
|
|
1978
|
+
background-color: color-mix(in oklab, var(--accent) 50%, transparent);
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
.dark\:hover\:bg-input\/50 {
|
|
1984
|
+
@media (prefers-color-scheme: dark) {
|
|
1985
|
+
&:hover {
|
|
1986
|
+
@media (hover: hover) {
|
|
1987
|
+
background-color: color-mix(in oklab, var(--input) 50%, transparent);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
.dark\:focus-visible\:ring-destructive\/40 {
|
|
1993
|
+
@media (prefers-color-scheme: dark) {
|
|
1994
|
+
&:focus-visible {
|
|
1995
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
.dark\:aria-invalid\:ring-destructive\/40 {
|
|
2000
|
+
@media (prefers-color-scheme: dark) {
|
|
2001
|
+
&[aria-invalid="true"] {
|
|
2002
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
1813
2006
|
.\[\&_li\]\:my-1 {
|
|
1814
2007
|
& li {
|
|
1815
2008
|
margin-block: calc(var(--spacing) * 1);
|
|
@@ -1820,6 +2013,22 @@
|
|
|
1820
2013
|
margin-block: calc(var(--spacing) * 1);
|
|
1821
2014
|
}
|
|
1822
2015
|
}
|
|
2016
|
+
.\[\&_svg\]\:pointer-events-none {
|
|
2017
|
+
& svg {
|
|
2018
|
+
pointer-events: none;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
.\[\&_svg\]\:shrink-0 {
|
|
2022
|
+
& svg {
|
|
2023
|
+
flex-shrink: 0;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 {
|
|
2027
|
+
& svg:not([class*='size-']) {
|
|
2028
|
+
width: calc(var(--spacing) * 4);
|
|
2029
|
+
height: calc(var(--spacing) * 4);
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
1823
2032
|
.\[\&_ul\]\:list-disc {
|
|
1824
2033
|
& ul {
|
|
1825
2034
|
list-style-type: disc;
|
|
@@ -1837,6 +2046,85 @@
|
|
|
1837
2046
|
}
|
|
1838
2047
|
}
|
|
1839
2048
|
@layer alpaca-editor {
|
|
2049
|
+
:root {
|
|
2050
|
+
--background: oklch(1 0 0);
|
|
2051
|
+
--foreground: oklch(0.145 0 0);
|
|
2052
|
+
--card: oklch(1 0 0);
|
|
2053
|
+
--card-foreground: oklch(0.145 0 0);
|
|
2054
|
+
--popover: oklch(1 0 0);
|
|
2055
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
2056
|
+
--primary: oklch(0.205 0 0);
|
|
2057
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
2058
|
+
--secondary: oklch(0.97 0 0);
|
|
2059
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
2060
|
+
--muted: oklch(0.97 0 0);
|
|
2061
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
2062
|
+
--accent: oklch(0.97 0 0);
|
|
2063
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
2064
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
2065
|
+
--destructive-foreground: oklch(0.577 0.245 27.325);
|
|
2066
|
+
--border: oklch(0.922 0 0);
|
|
2067
|
+
--input: oklch(0.922 0 0);
|
|
2068
|
+
--ring: oklch(0.708 0 0);
|
|
2069
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
2070
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
2071
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
2072
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
2073
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
2074
|
+
--radius: 0.625rem;
|
|
2075
|
+
--sidebar: oklch(0.985 0 0);
|
|
2076
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
2077
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
2078
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
2079
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
2080
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
2081
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
2082
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
2083
|
+
}
|
|
2084
|
+
.dark {
|
|
2085
|
+
--background: oklch(0.145 0 0);
|
|
2086
|
+
--foreground: oklch(0.985 0 0);
|
|
2087
|
+
--card: oklch(0.145 0 0);
|
|
2088
|
+
--card-foreground: oklch(0.985 0 0);
|
|
2089
|
+
--popover: oklch(0.145 0 0);
|
|
2090
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
2091
|
+
--primary: oklch(0.985 0 0);
|
|
2092
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
2093
|
+
--secondary: oklch(0.269 0 0);
|
|
2094
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
2095
|
+
--muted: oklch(0.269 0 0);
|
|
2096
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
2097
|
+
--accent: oklch(0.269 0 0);
|
|
2098
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
2099
|
+
--destructive: oklch(0.396 0.141 25.723);
|
|
2100
|
+
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
2101
|
+
--border: oklch(0.269 0 0);
|
|
2102
|
+
--input: oklch(0.269 0 0);
|
|
2103
|
+
--ring: oklch(0.439 0 0);
|
|
2104
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
2105
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
2106
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
2107
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
2108
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
2109
|
+
--sidebar: oklch(0.205 0 0);
|
|
2110
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
2111
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
2112
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
2113
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
2114
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
2115
|
+
--sidebar-border: oklch(0.269 0 0);
|
|
2116
|
+
--sidebar-ring: oklch(0.439 0 0);
|
|
2117
|
+
}
|
|
2118
|
+
@layer base {
|
|
2119
|
+
* {
|
|
2120
|
+
border-color: var(--border);
|
|
2121
|
+
outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
|
|
2122
|
+
}
|
|
2123
|
+
body {
|
|
2124
|
+
background-color: var(--background);
|
|
2125
|
+
color: var(--foreground);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
1840
2128
|
@layer alpaca-editor {
|
|
1841
2129
|
.bg-shape-black {
|
|
1842
2130
|
background-color: black;
|
|
@@ -2204,6 +2492,10 @@
|
|
|
2204
2492
|
overflow: auto;
|
|
2205
2493
|
resize: vertical;
|
|
2206
2494
|
}
|
|
2495
|
+
.p-checkbox-box {
|
|
2496
|
+
width: 15px;
|
|
2497
|
+
height: 15px;
|
|
2498
|
+
}
|
|
2207
2499
|
}
|
|
2208
2500
|
@property --tw-border-spacing-x {
|
|
2209
2501
|
syntax: "<length>";
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpaca-editor/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3787",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.ts",
|
|
9
|
-
"./styles.css": "./dist/styles.css"
|
|
9
|
+
"./styles.css": "./dist/styles.css",
|
|
10
|
+
"./dev-styles.css": "./dev.css"
|
|
10
11
|
},
|
|
11
12
|
"type": "module",
|
|
12
13
|
"scripts": {
|
|
@@ -28,12 +29,16 @@
|
|
|
28
29
|
"typescript": "5.8.2"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
32
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
31
33
|
"@tailwindcss/postcss": "^4.0.14",
|
|
32
34
|
"@types/lodash": "^4.17.16",
|
|
33
35
|
"@uiw/react-md-editor": "^4.0.5",
|
|
34
36
|
"@uiw/react-textarea-code-editor": "^1.5.24",
|
|
35
37
|
"allotment": "^1.20.3",
|
|
36
38
|
"axios": "^1.6.7",
|
|
39
|
+
"class-variance-authority": "^0.7.1",
|
|
40
|
+
"clsx": "^2.1.1",
|
|
41
|
+
"lucide-react": "^0.486.0",
|
|
37
42
|
"morphdom": "^2.7.4",
|
|
38
43
|
"postcss": "^8.5.3",
|
|
39
44
|
"primeicons": "^7.0.0",
|
|
@@ -45,8 +50,9 @@
|
|
|
45
50
|
"react-json-view-lite": "^2.4.1",
|
|
46
51
|
"react-quill-new": "^3.4.1",
|
|
47
52
|
"react-uuid": "^2.0.0",
|
|
48
|
-
"tailwind-merge": "^3.0
|
|
53
|
+
"tailwind-merge": "^3.1.0",
|
|
49
54
|
"tailwindcss": "^4.0.14",
|
|
55
|
+
"tw-animate-css": "^1.2.5",
|
|
50
56
|
"universal-cookie": "^8.0.0",
|
|
51
57
|
"use-debounce": "^10.0.4"
|
|
52
58
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default:
|
|
13
|
+
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
14
|
+
destructive:
|
|
15
|
+
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
16
|
+
outline:
|
|
17
|
+
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
18
|
+
secondary:
|
|
19
|
+
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
20
|
+
ghost:
|
|
21
|
+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
default: "h-8 px-3 py-2 has-[>svg]:px-3",
|
|
26
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
27
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
+
icon: "size-9",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "default",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
function Button({
|
|
39
|
+
className,
|
|
40
|
+
variant,
|
|
41
|
+
size,
|
|
42
|
+
asChild = false,
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<"button"> &
|
|
45
|
+
VariantProps<typeof buttonVariants> & {
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
}) {
|
|
48
|
+
const Comp = asChild ? Slot : "button";
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
data-slot="button"
|
|
53
|
+
className={cn(
|
|
54
|
+
"cursor-pointer",
|
|
55
|
+
buttonVariants({ variant, size, className }),
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { Button, buttonVariants };
|
package/src/editor/Titlebar.tsx
CHANGED
|
@@ -6,7 +6,7 @@ export function Titlebar() {
|
|
|
6
6
|
if (!editContext?.view) return null;
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
|
-
<div className="z-1 flex
|
|
9
|
+
<div className="z-1 flex min-h-11 items-center justify-between bg-gradient-to-r from-gray-900 from-10% to-indigo-950">
|
|
10
10
|
<div className="relative flex items-center gap-2 pl-2 font-bold text-white">
|
|
11
11
|
<a
|
|
12
12
|
href="/sitecore/shell/sitecore/client/Applications/Launchpad"
|
|
@@ -1606,16 +1606,17 @@ export function EditorClient({
|
|
|
1606
1606
|
showComments,
|
|
1607
1607
|
setShowComments,
|
|
1608
1608
|
addComment: async () => {
|
|
1609
|
-
|
|
1609
|
+
const descriptor = contentEditorItem?.descriptor;
|
|
1610
|
+
if (!descriptor) return;
|
|
1610
1611
|
const itemId =
|
|
1611
1612
|
focusedField?.item.id ||
|
|
1612
1613
|
(selection.length > 0 ? selection[0] : undefined) ||
|
|
1613
|
-
|
|
1614
|
+
descriptor.id;
|
|
1614
1615
|
|
|
1615
1616
|
if (!itemId) return;
|
|
1616
1617
|
|
|
1617
|
-
const language =
|
|
1618
|
-
const version =
|
|
1618
|
+
const language = descriptor.language;
|
|
1619
|
+
const version = descriptor.version;
|
|
1619
1620
|
|
|
1620
1621
|
const getFieldName = async () => {
|
|
1621
1622
|
if (!focusedField) return "";
|
|
@@ -1635,11 +1636,11 @@ export function EditorClient({
|
|
|
1635
1636
|
const newComment = {
|
|
1636
1637
|
id: uuid(),
|
|
1637
1638
|
isNew: true,
|
|
1638
|
-
itemId: focusedField?.item.id ||
|
|
1639
|
+
itemId: focusedField?.item.id || descriptor.id,
|
|
1639
1640
|
itemName: await getItemName(),
|
|
1640
1641
|
fieldId: focusedField?.fieldId,
|
|
1641
1642
|
fieldName: await getFieldName(),
|
|
1642
|
-
mainItemId:
|
|
1643
|
+
mainItemId: descriptor.id,
|
|
1643
1644
|
language,
|
|
1644
1645
|
version,
|
|
1645
1646
|
position: 0,
|
|
@@ -32,7 +32,7 @@ export function ActionsMenu() {
|
|
|
32
32
|
<>
|
|
33
33
|
<div
|
|
34
34
|
id="actions-menu"
|
|
35
|
-
className="ml-2 flex h-
|
|
35
|
+
className="ml-2 flex h-11 cursor-pointer items-center gap-2 bg-blue-500 px-4 text-white hover:bg-blue-600"
|
|
36
36
|
onClick={async (ev) => {
|
|
37
37
|
overlaypanel.current!.toggle(ev);
|
|
38
38
|
}}
|