@manuscripts/body-editor 3.13.10 → 3.13.12

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 (69) hide show
  1. package/dist/cjs/commands.js +21 -2
  2. package/dist/cjs/components/views/FigureDropdown.js +8 -0
  3. package/dist/cjs/configs/editor-views.js +6 -0
  4. package/dist/cjs/icons.js +2 -1
  5. package/dist/cjs/lib/files.js +6 -1
  6. package/dist/cjs/menus.js +8 -0
  7. package/dist/cjs/node-type-icons.js +4 -0
  8. package/dist/cjs/plugins/accessibility_element.js +2 -1
  9. package/dist/cjs/versions.js +1 -1
  10. package/dist/cjs/views/accessibility_element.js +7 -1
  11. package/dist/cjs/views/affiliations.js +5 -1
  12. package/dist/cjs/views/caption.js +0 -1
  13. package/dist/cjs/views/caption_title.js +0 -1
  14. package/dist/cjs/views/headshot_element.js +74 -0
  15. package/dist/cjs/views/headshot_element_editable.js +20 -0
  16. package/dist/cjs/views/headshot_grid.js +82 -0
  17. package/dist/cjs/views/headshot_grid_editable.js +21 -0
  18. package/dist/cjs/views/headshot_image_editable.js +79 -0
  19. package/dist/cjs/views/supplement.js +16 -1
  20. package/dist/es/commands.js +18 -0
  21. package/dist/es/components/views/FigureDropdown.js +8 -0
  22. package/dist/es/configs/editor-views.js +6 -0
  23. package/dist/es/icons.js +2 -1
  24. package/dist/es/lib/files.js +6 -1
  25. package/dist/es/menus.js +9 -1
  26. package/dist/es/node-type-icons.js +5 -1
  27. package/dist/es/plugins/accessibility_element.js +2 -1
  28. package/dist/es/versions.js +1 -1
  29. package/dist/es/views/accessibility_element.js +7 -1
  30. package/dist/es/views/affiliations.js +5 -1
  31. package/dist/es/views/caption.js +0 -1
  32. package/dist/es/views/caption_title.js +0 -1
  33. package/dist/es/views/headshot_element.js +70 -0
  34. package/dist/es/views/headshot_element_editable.js +18 -0
  35. package/dist/es/views/headshot_grid.js +75 -0
  36. package/dist/es/views/headshot_grid_editable.js +19 -0
  37. package/dist/es/views/headshot_image_editable.js +75 -0
  38. package/dist/es/views/supplement.js +16 -1
  39. package/dist/types/commands.d.ts +1 -0
  40. package/dist/types/icons.d.ts +1 -0
  41. package/dist/types/versions.d.ts +1 -1
  42. package/dist/types/views/headshot_element.d.ts +29 -0
  43. package/dist/types/views/headshot_element_editable.d.ts +18 -0
  44. package/dist/types/views/headshot_grid.d.ts +28 -0
  45. package/dist/types/views/headshot_grid_editable.d.ts +44 -0
  46. package/dist/types/views/headshot_image_editable.d.ts +28 -0
  47. package/dist/types/views/supplement.d.ts +1 -0
  48. package/package.json +2 -2
  49. package/src/commands.ts +27 -0
  50. package/src/components/views/FigureDropdown.tsx +11 -0
  51. package/src/configs/editor-views.ts +6 -0
  52. package/src/icons.ts +2 -0
  53. package/src/lib/files.ts +7 -1
  54. package/src/menus.tsx +10 -0
  55. package/src/node-type-icons.tsx +12 -0
  56. package/src/plugins/accessibility_element.ts +4 -1
  57. package/src/versions.ts +1 -1
  58. package/src/views/accessibility_element.ts +7 -1
  59. package/src/views/affiliations.ts +6 -1
  60. package/src/views/caption.ts +0 -1
  61. package/src/views/caption_title.ts +0 -1
  62. package/src/views/headshot_element.ts +98 -0
  63. package/src/views/headshot_element_editable.ts +20 -0
  64. package/src/views/headshot_grid.ts +98 -0
  65. package/src/views/headshot_grid_editable.ts +21 -0
  66. package/src/views/headshot_image_editable.ts +93 -0
  67. package/src/views/supplement.ts +15 -2
  68. package/styles/AdvancedEditor.css +169 -1
  69. package/styles/Editor.css +1 -1
@@ -1052,7 +1052,7 @@ figure.block:has(.equation.selected-suggestion) {
1052
1052
  .ProseMirror
1053
1053
  [data-track-op='set_attrs']
1054
1054
  .block:not(.trans-abstract):not(.trans-graphical-abstract),
1055
- .tracking-visible .block:has(figure[data-track-op='set_attrs']),
1055
+ .tracking-visible .block:has(figure[data-track-op='set_attrs']):not(.headshot-grid-container),
1056
1056
  .tracking-visible figure.block:has(.equation.set_attrs),
1057
1057
  .tracking-visible
1058
1058
  .ProseMirror
@@ -1761,6 +1761,174 @@ th:hover > .table-context-menu-button,
1761
1761
  .hero-image-container .position-menu {
1762
1762
  display: none !important;
1763
1763
  }
1764
+
1765
+ /* Headshot Grid Container */
1766
+
1767
+ .ProseMirror .block-headshot_grid > .block {
1768
+ display: grid;
1769
+ gap: 16px;
1770
+ margin: 0 12px;
1771
+ padding: 8px 10px 16px 10px;
1772
+ border-radius: 4px;
1773
+ border: 1px solid #F2F2F2;
1774
+ }
1775
+
1776
+ .ProseMirror .headshot-grid-block {
1777
+ display: grid;
1778
+ gap: 16px;
1779
+ }
1780
+
1781
+ .ProseMirror .headshot-grid-container .headshot-grid-block .headshot-element {
1782
+ border-radius: 4px;
1783
+ border: 1px solid #E2E2E2 !important;
1784
+ background: #FFF;
1785
+ position: relative;
1786
+ }
1787
+
1788
+
1789
+ /* Headshot Element Block */
1790
+
1791
+ .ProseMirror .headshot-element-block {
1792
+ display: grid;
1793
+ grid-template-columns: auto 1fr;
1794
+ grid-template-rows: auto 1fr;
1795
+ column-gap: 16px;
1796
+ row-gap: 8px;
1797
+ padding: 16px 24px;
1798
+ }
1799
+
1800
+ .ProseMirror .headshot-element-block figure {
1801
+ grid-row: 1 / span 2;
1802
+ margin: 0;
1803
+ }
1804
+
1805
+ /* Headshot Image */
1806
+
1807
+ .ProseMirror .headshot-figure {
1808
+ width: 84px;
1809
+ height: 84px;
1810
+ position: relative;
1811
+ }
1812
+
1813
+ .ProseMirror .headshot-figure .figure-image {
1814
+ border-radius: 8px;
1815
+ }
1816
+
1817
+ .ProseMirror .headshot-element-block .figure.placeholder {
1818
+ min-width: 84px;
1819
+ min-height: 84px;
1820
+ padding: 0;
1821
+ border-radius: 8px;
1822
+ background: #f2f2f2;
1823
+ white-space: pre-line;
1824
+ }
1825
+
1826
+ /* Headshot Captions */
1827
+
1828
+ .ProseMirror .headshot-element-block .caption-title,
1829
+ .ProseMirror .headshot-element-block .caption-description {
1830
+ text-align: start;
1831
+ font-size: 12px;
1832
+ font-style: normal;
1833
+ line-height: 16px;
1834
+ }
1835
+
1836
+ .ProseMirror .headshot-element-block .caption-title {
1837
+ font-weight: 700;
1838
+ padding-top: 6px;
1839
+ }
1840
+
1841
+ .ProseMirror .headshot-element-block .caption-description,
1842
+ .ProseMirror .headshot-element-block .caption-title .placeholder-text {
1843
+ font-weight: 400;
1844
+ }
1845
+
1846
+ .ProseMirror .headshot-element-block .caption-title .placeholder-text::before {
1847
+ content: 'Name...';
1848
+ color: #c9c9c9;
1849
+ }
1850
+
1851
+ .ProseMirror .headshot-element-block .caption-description .placeholder-text::before {
1852
+ content: 'Summary...';
1853
+ color: #c9c9c9;
1854
+ }
1855
+
1856
+ /* Add Headshot Button */
1857
+
1858
+ .ProseMirror .add-headshot-element-button {
1859
+ border-radius: 4px;
1860
+ border: 1px dashed #E2E2E2;
1861
+ background: #FAFAFA;
1862
+ padding: 8px 24px;
1863
+ display: inline-flex;
1864
+ justify-content: center;
1865
+ align-items: center;
1866
+ gap: 8px;
1867
+ cursor: pointer;
1868
+ }
1869
+
1870
+ .ProseMirror .add-headshot-element-text {
1871
+ color: #353535;
1872
+ text-align: center;
1873
+ font-size: 10px;
1874
+ font-style: normal;
1875
+ font-weight: 400;
1876
+ line-height: 16px;
1877
+ }
1878
+
1879
+ .ProseMirror .add-headshot-element-button svg rect {
1880
+ fill: #6e6e6e;
1881
+ }
1882
+
1883
+ /* Headshot Remove Buttons */
1884
+
1885
+ .ProseMirror .headshot-element .headshot-remove-button {
1886
+ background: #ffffff;
1887
+ padding: 4px;
1888
+ margin: 8px;
1889
+ cursor: pointer;
1890
+ border: 1px solid #e2e2e2;
1891
+ border-radius: 50%;
1892
+ box-sizing: border-box;
1893
+ display: flex;
1894
+ align-items: center;
1895
+ justify-content: center;
1896
+ position: absolute;
1897
+ top: 0;
1898
+ right: 0;
1899
+ visibility: hidden;
1900
+ z-index: 10;
1901
+ }
1902
+
1903
+ .ProseMirror .headshot-figure .headshot-remove-button {
1904
+ margin: 0;
1905
+ top: -6%;
1906
+ right: -4%;
1907
+ }
1908
+
1909
+ .ProseMirror .headshot-element .headshot-remove-button svg {
1910
+ width: 12px;
1911
+ height: 12px;
1912
+ transform: rotate(45deg);
1913
+ }
1914
+
1915
+ .ProseMirror .headshot-figure .headshot-remove-button svg {
1916
+ width: 8px;
1917
+ height: 8px;
1918
+ }
1919
+
1920
+ .ProseMirror .headshot-element:hover .block > .headshot-remove-button,
1921
+ .ProseMirror .headshot-figure:hover .headshot-remove-button,
1922
+ .ProseMirror .headshot-element:focus-within .headshot-remove-button {
1923
+ visibility: visible;
1924
+ }
1925
+
1926
+ .ProseMirror .headshot-element:focus-visible,
1927
+ .ProseMirror .add-headshot-element-button:focus-visible,
1928
+ .ProseMirror .headshot-remove-button:focus-visible {
1929
+ outline: 3px solid var(--focus-outline-color);
1930
+ }
1931
+
1764
1932
  .toggle-btn {
1765
1933
  cursor: pointer;
1766
1934
  }
package/styles/Editor.css CHANGED
@@ -1320,7 +1320,7 @@
1320
1320
  z-index: 1000;
1321
1321
  }
1322
1322
 
1323
- .ProseMirror .supplement-item:hover {
1323
+ .ProseMirror .supplement-item[draggable="true"]:hover {
1324
1324
  background-color: #f2f2f2 !important;
1325
1325
  cursor: move;
1326
1326
  }