breadcrumbs-panel.ts 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { EditorView } from '@codemirror/view'
  2. /**
  3. * A panel which contains the editor breadcrumbs
  4. */
  5. export function breadcrumbPanel() {
  6. return [
  7. EditorView.editorAttributes.of({
  8. style: '--breadcrumbs-height: 28px;',
  9. }),
  10. EditorView.baseTheme({
  11. '.ol-cm-breadcrumbs-portal': {
  12. display: 'flex',
  13. pointerEvents: 'none !important',
  14. '& > *': {
  15. pointerEvents: 'all',
  16. },
  17. },
  18. '.ol-cm-breadcrumbs': {
  19. height: 'var(--breadcrumbs-height)',
  20. flex: 1,
  21. display: 'flex',
  22. alignItems: 'center',
  23. gap: 'var(--spacing-01)',
  24. fontSize: 'var(--font-size-01)',
  25. padding: 'var(--spacing-02)',
  26. overflow: 'auto',
  27. scrollbarWidth: 'thin',
  28. '& > *': {
  29. flexShrink: '0',
  30. },
  31. },
  32. '&light .ol-cm-breadcrumb-chevron': {
  33. color: 'var(--neutral-30)',
  34. },
  35. '&dark .ol-cm-breadcrumb-chevron': {
  36. color: 'var(--neutral-50)',
  37. },
  38. }),
  39. ]
  40. }