@nanahoshi/mona-ui 0.1.1 → 0.2.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.
Files changed (170) hide show
  1. package/auto-complete/package.json +4 -0
  2. package/avatar/package.json +4 -0
  3. package/breadcrumb/package.json +4 -0
  4. package/button/package.json +4 -0
  5. package/button-group/package.json +4 -0
  6. package/calendar/package.json +4 -0
  7. package/check-box/package.json +4 -0
  8. package/chip/package.json +4 -0
  9. package/circular-progress-bar/package.json +4 -0
  10. package/color-gradient/package.json +4 -0
  11. package/color-palette/package.json +4 -0
  12. package/color-picker/package.json +4 -0
  13. package/combo-box/package.json +4 -0
  14. package/common/package.json +4 -0
  15. package/contextmenu/package.json +4 -0
  16. package/date-input/package.json +4 -0
  17. package/date-picker/package.json +4 -0
  18. package/datetime-picker/package.json +4 -0
  19. package/dialog/package.json +4 -0
  20. package/dropdown-button/package.json +4 -0
  21. package/dropdown-list/package.json +4 -0
  22. package/dropdowns/package.json +4 -0
  23. package/editor/package.json +4 -0
  24. package/expansion-panel/package.json +4 -0
  25. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +38 -53
  26. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +19 -53
  27. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +15 -26
  28. package/fesm2022/nanahoshi-mona-ui-button.mjs +67 -68
  29. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +53 -149
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +48 -95
  31. package/fesm2022/nanahoshi-mona-ui-chip.mjs +35 -45
  32. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +9 -23
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +26 -77
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +16 -38
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +41 -46
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +32 -52
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +9 -12
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +40 -27
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +51 -51
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +40 -153
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +32 -53
  42. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +7 -12
  43. package/fesm2022/nanahoshi-mona-ui-editor.mjs +59 -219
  44. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +24 -75
  45. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +11 -44
  46. package/fesm2022/nanahoshi-mona-ui-filter.mjs +11 -41
  47. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B2ETh-uI.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +2 -2
  48. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DZk18LJC.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
  49. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-C7WKhhig.mjs → nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs} +9 -16
  50. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-BRiY0CDX.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +15 -44
  51. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BrYpFMyF.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs} +11 -20
  52. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +109 -393
  53. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  54. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
  55. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +26 -56
  56. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +31 -122
  57. package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +4 -26
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +5 -18
  60. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +48 -154
  61. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +35 -62
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +24 -108
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +37 -63
  64. package/fesm2022/nanahoshi-mona-ui-pager.mjs +21 -73
  65. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +8 -30
  66. package/fesm2022/nanahoshi-mona-ui-popover.mjs +29 -50
  67. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +36 -108
  68. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +19 -60
  69. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +47 -92
  70. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +53 -144
  71. package/fesm2022/nanahoshi-mona-ui-slider.mjs +54 -110
  72. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +7 -20
  73. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +15 -50
  74. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +28 -91
  75. package/fesm2022/nanahoshi-mona-ui-switch.mjs +37 -58
  76. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +35 -107
  77. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +22 -30
  78. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +40 -61
  79. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  80. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +41 -27
  81. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +35 -99
  82. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +13 -41
  83. package/fesm2022/nanahoshi-mona-ui-window.mjs +29 -108
  84. package/fieldset/package.json +4 -0
  85. package/filter/package.json +4 -0
  86. package/grid/package.json +4 -0
  87. package/internal/filter-input/package.json +4 -0
  88. package/internal/indicator-icon/package.json +4 -0
  89. package/internal/list/package.json +4 -0
  90. package/internal/package.json +4 -0
  91. package/internal/tree/package.json +4 -0
  92. package/list/package.json +4 -0
  93. package/list-box/package.json +4 -0
  94. package/list-view/package.json +4 -0
  95. package/menubar/package.json +4 -0
  96. package/multi-select/package.json +4 -0
  97. package/notification/package.json +4 -0
  98. package/numeric-text-box/package.json +4 -0
  99. package/package.json +2 -1
  100. package/pager/package.json +4 -0
  101. package/placeholder/package.json +4 -0
  102. package/popover/package.json +4 -0
  103. package/popup/package.json +4 -0
  104. package/popup-menu/package.json +4 -0
  105. package/progress-bar/package.json +4 -0
  106. package/query/package.json +4 -0
  107. package/radio-button/package.json +4 -0
  108. package/scroll-view/package.json +4 -0
  109. package/slider/package.json +4 -0
  110. package/split-button/package.json +4 -0
  111. package/splitter/package.json +4 -0
  112. package/stepper/package.json +4 -0
  113. package/switch/package.json +4 -0
  114. package/tabs/package.json +4 -0
  115. package/text-area/package.json +4 -0
  116. package/text-box/package.json +4 -0
  117. package/theme/package.json +4 -0
  118. package/time-picker/package.json +4 -0
  119. package/time-selector/package.json +4 -0
  120. package/tooltip/package.json +4 -0
  121. package/tree-view/package.json +4 -0
  122. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
  123. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
  124. package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
  125. package/types/nanahoshi-mona-ui-button.d.ts +2 -3
  126. package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
  127. package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
  128. package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
  129. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
  130. package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
  131. package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
  132. package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -5
  133. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
  134. package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
  135. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
  136. package/types/nanahoshi-mona-ui-dialog.d.ts +6 -7
  137. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
  138. package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
  139. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
  140. package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
  141. package/types/nanahoshi-mona-ui-filter.d.ts +2 -3
  142. package/types/nanahoshi-mona-ui-grid.d.ts +14 -15
  143. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
  144. package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
  145. package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
  146. package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
  147. package/types/nanahoshi-mona-ui-menubar.d.ts +6 -7
  148. package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
  149. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
  150. package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
  151. package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
  152. package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
  153. package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
  154. package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
  155. package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
  156. package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
  157. package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
  158. package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
  159. package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
  160. package/types/nanahoshi-mona-ui-stepper.d.ts +12 -13
  161. package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
  162. package/types/nanahoshi-mona-ui-tabs.d.ts +14 -16
  163. package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
  164. package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
  165. package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
  166. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
  167. package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
  168. package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
  169. package/types/nanahoshi-mona-ui-window.d.ts +16 -17
  170. package/window/package.json +4 -0
@@ -2,7 +2,6 @@ import * as i0 from '@angular/core';
2
2
  import { signal, Injectable, computed, inject, Component, DOCUMENT, output, viewChild, DestroyRef, input, effect, untracked, afterNextRender } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { FormsModule } from '@angular/forms';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { twMerge } from 'tailwind-merge';
7
6
  import { ImmutableSet, any, List } from '@mirei/ts-collections';
8
7
  import { Extension, Editor } from '@tiptap/core';
@@ -453,12 +452,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
453
452
  type: Injectable
454
453
  }] });
455
454
 
456
- const editorBaseVariants = cva(`
457
- flex flex-col bg-background text-foreground
458
- border border-solid border-border
459
- transition-[border-color] duration-150 ease-in
460
- focus-visible:ring-2 focus-visible:ring-primary/40
461
- focus-visible:border-primary
455
+ const editorBaseThemeVariants = cva(`
456
+ flex flex-col
457
+ bg-surface text-foreground
458
+ border border-border
459
+ transition-[border-color,box-shadow] duration-150 ease-in
460
+ focus-within:border-focus-indicator
461
+ focus-within:ring-2 focus-within:ring-focus-indicator/35
462
462
 
463
463
  prose prose-neutral max-w-none
464
464
  prose-headings:text-foreground prose-headings:font-bold
@@ -471,13 +471,13 @@ const editorBaseVariants = cva(`
471
471
 
472
472
  [&_blockquote]:border-l-4
473
473
  [&_blockquote]:border-l-solid
474
- [&_blockquote]:border-l-primary
474
+ [&_blockquote]:border-l-border-control-hover
475
475
  [&_blockquote]:px-4 [&_blockquote]:py-2
476
476
  [&_blockquote]:ms-4
477
- [&_blockquote]:bg-background-light
477
+ [&_blockquote]:bg-surface-muted
478
478
 
479
- [&_hr]:border [&_hr]:border-solid [&_hr]:border-border
480
- [&_hr]:bg-background-dark [&_hr]:my-1
479
+ [&_hr]:my-1 [&_hr]:bg-border-subtle
480
+ [&_hr]:border [&_hr]:border-border-subtle
481
481
 
482
482
  [&_ul[data-type='taskList']_li]:flex
483
483
  [&_ul[data-type='taskList']_li]:py-0.5
@@ -492,10 +492,10 @@ const editorBaseVariants = cva(`
492
492
  [&_img]:max-w-full
493
493
  [&_img]:h-auto
494
494
  [&_img.ProseMirror-selectednode]:outline-3
495
- [&_img.ProseMirror-selectednode]:outline-primary
495
+ [&_img.ProseMirror-selectednode]:outline-focus-indicator
496
496
 
497
- [&_pre]:bg-background-dark
498
- [&_pre]:border [&_pre]:border-solid [&_pre]:border-border
497
+ [&_pre]:bg-surface-muted
498
+ [&_pre]:border [&_pre]:border-border-subtle
499
499
  [&_pre]:whitespace-pre-wrap
500
500
  [&_pre]:font-mono
501
501
  [&_pre_code]:p-0
@@ -509,20 +509,20 @@ const editorBaseVariants = cva(`
509
509
  [&_table]:overflow-hidden
510
510
  [&_table]:table-fixed
511
511
  [&_table]:w-full
512
- [&_table_td]:border [&_table_td]:border-solid [&_table_td]:border-foreground/40
512
+ [&_table_td]:border [&_table_td]:border-border-subtle
513
513
  [&_table_td]:p-2 [&_table_td]:align-top [&_table_td]:relative
514
- [&_table_th]:border [&_table_th]:border-solid [&_table_th]:border-foreground/40
514
+ [&_table_th]:border [&_table_th]:border-border-subtle
515
515
  [&_table_th]:p-2 [&_table_th]:align-top [&_table_th]:relative
516
516
 
517
- [&_table_th]:bg-background-darker [&_table_th]:color-foreground [&_table_th]:font-bold
517
+ [&_table_th]:bg-surface-muted [&_table_th]:text-foreground [&_table_th]:font-bold
518
518
 
519
519
  [&_.selectedCell]:after:content-[''] [&_.selectedCell]:after:absolute [&_.selectedCell]:after:inset-0
520
520
  [&_.selectedCell]:after:pointer-events-none
521
521
  [&_.selectedCell]:after:z-2
522
- [&_.selectedCell]:after:bg-primary
522
+ [&_.selectedCell]:after:bg-active/70
523
523
 
524
524
  [&_.column-resize-handle]:absolute
525
- [&_.column-resize-handle]:bg-primary
525
+ [&_.column-resize-handle]:bg-focus-indicator
526
526
  [&_.column-resize-handle]:w-1
527
527
  [&_.column-resize-handle]:pointer-events-none
528
528
  [&_.column-resize-handle]:top-0
@@ -532,8 +532,8 @@ const editorBaseVariants = cva(`
532
532
  [&_.ProseMirror.resize-cursor]:cursor-ew-resize
533
533
 
534
534
  `);
535
- const editorContainerVariants = cva(`
536
- bg-background w-full h-full
535
+ const editorContainerThemeVariants = cva(`
536
+ h-full w-full bg-surface
537
537
  [&_div:first-child[contenteditable='true']]:p-1.5
538
538
  [&_div:first-child[contenteditable='true']]:text-foreground
539
539
  [&_div:first-child[contenteditable='true']]:border-none
@@ -542,186 +542,58 @@ const editorContainerVariants = cva(`
542
542
  [&_div:first-child[contenteditable='true']]:h-full
543
543
  [&_div:first-child[contenteditable='true']]:overflow-auto
544
544
  [&_div:first-child[contenteditable='true']]:resize-none
545
+ [&_div:first-child[contenteditable='true']]:[scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)]
545
546
  [&_div:first-child[contenteditable='true']]:[scrollbar-width:thin]
546
547
  `);
547
- const editorFontColorPreviewVariants = cva(`
548
+ const editorFontColorPreviewThemeVariants = cva(`
548
549
  w-full flex h-[2px]
549
550
  `);
550
- const editorFontColorValueVariants = cva(`
551
+ const editorFontColorValueThemeVariants = cva(`
551
552
  flex flex-col items-center justify-center
552
553
  gap-0.5 ps-1.25 text-sm
553
554
  `);
554
- const editorFontFamilyDropdownListVariants = cva(`
555
+ const editorFontFamilyDropdownListThemeVariants = cva(`
555
556
  w-[12em]
556
557
  `);
557
- const editorFontHighlightPreviewVariants = cva(`
558
+ const editorFontHighlightPreviewThemeVariants = cva(`
558
559
  w-full flex h-[2px]
559
560
  `);
560
- const editorFontHighlightValueVariants = cva(`
561
+ const editorFontHighlightValueThemeVariants = cva(`
561
562
  flex flex-col items-center justify-center
562
563
  gap-0.5 ps-1.25 text-sm
563
564
  `);
564
- const editorFontSizeDropdownListVariants = cva(`
565
+ const editorFontSizeDropdownListThemeVariants = cva(`
565
566
  w-[8em]
566
567
  `);
567
- const editorHeadingsDropdownListVariants = cva(`
568
+ const editorHeadingsDropdownListThemeVariants = cva(`
568
569
  w-[14em]
569
570
  `);
570
- const editorImageInserterActionsVariants = cva(`
571
+ const editorImageInserterActionsThemeVariants = cva(`
571
572
  flex justify-end gap-1 px-2 py-1
572
- bg-background-dark
573
- border-t border-t-solid border-t-border
573
+ bg-surface-muted
574
+ border-t border-t-border-subtle
574
575
  `);
575
- const editorImageInserterFormVariants = cva(`
576
+ const editorImageInserterFormThemeVariants = cva(`
576
577
  flex flex-col gap-1.5 pt-2
577
578
  `);
578
- const editorImageInserterRowLabelVariants = cva(`
579
+ const editorImageInserterRowLabelThemeVariants = cva(`
579
580
  mb-0.5 ps-0.5 text-sm font-semibold
580
581
  `);
581
- const editorImageInserterRowVariants = cva(`
582
+ const editorImageInserterRowThemeVariants = cva(`
582
583
  flex flex-col justify-center px-2
583
584
  `);
584
- const editorTableCreatorVariants = cva(`
585
+ const editorTableCreatorThemeVariants = cva(`
585
586
  grid grid-cols-8 gap-0.5 p-1
586
587
  `);
587
- const editorTableCreatorCellVariants = cva(`
588
- flex border border-solid border-border
589
- w-6 h-6 bg-background-light
588
+ const editorTableCreatorCellThemeVariants = cva(`
589
+ flex h-6 w-6
590
+ bg-input-background border border-input-border
590
591
  `);
591
- const editorToolbarVariants = cva(`
592
+ const editorToolbarThemeVariants = cva(`
592
593
  flex flex-wrap items-center justify-start gap-1 p-1
593
- bg-background-dark text-foreground border-b border-b-solid border-b-border
594
+ bg-surface-muted text-foreground border-b border-b-border-subtle
594
595
  `);
595
596
 
596
- const editorBaseThemeVariants = (theme) => {
597
- switch (theme) {
598
- case "mona":
599
- return editorBaseVariants;
600
- default:
601
- return editorBaseVariants;
602
- }
603
- };
604
- const editorContainerThemeVariants = (theme) => {
605
- switch (theme) {
606
- case "mona":
607
- return editorContainerVariants;
608
- default:
609
- return editorContainerVariants;
610
- }
611
- };
612
- const editorFontColorPreviewThemeVariants = (theme) => {
613
- switch (theme) {
614
- case "mona":
615
- return editorFontColorPreviewVariants;
616
- default:
617
- return editorFontColorPreviewVariants;
618
- }
619
- };
620
- const editorFontColorValueThemeVariants = (theme) => {
621
- switch (theme) {
622
- case "mona":
623
- return editorFontColorValueVariants;
624
- default:
625
- return editorFontColorValueVariants;
626
- }
627
- };
628
- const editorFontFamilyDropdownListThemeVariants = (theme) => {
629
- switch (theme) {
630
- case "mona":
631
- return editorFontFamilyDropdownListVariants;
632
- default:
633
- return editorFontFamilyDropdownListVariants;
634
- }
635
- };
636
- const editorFontHighlightPreviewThemeVariants = (theme) => {
637
- switch (theme) {
638
- case "mona":
639
- return editorFontHighlightPreviewVariants;
640
- default:
641
- return editorFontHighlightPreviewVariants;
642
- }
643
- };
644
- const editorFontHighlightValueThemeVariants = (theme) => {
645
- switch (theme) {
646
- case "mona":
647
- return editorFontHighlightValueVariants;
648
- default:
649
- return editorFontHighlightValueVariants;
650
- }
651
- };
652
- const editorFontSizeDropdownListThemeVariants = (theme) => {
653
- switch (theme) {
654
- case "mona":
655
- return editorFontSizeDropdownListVariants;
656
- default:
657
- return editorFontSizeDropdownListVariants;
658
- }
659
- };
660
- const editorHeadingsDropdownListThemeVariants = (theme) => {
661
- switch (theme) {
662
- case "mona":
663
- return editorHeadingsDropdownListVariants;
664
- default:
665
- return editorHeadingsDropdownListVariants;
666
- }
667
- };
668
- const editorImageInserterActionsThemeVariants = (theme) => {
669
- switch (theme) {
670
- case "mona":
671
- return editorImageInserterActionsVariants;
672
- default:
673
- return editorImageInserterActionsVariants;
674
- }
675
- };
676
- const editorImageInserterFormThemeVariants = (theme) => {
677
- switch (theme) {
678
- case "mona":
679
- return editorImageInserterFormVariants;
680
- default:
681
- return editorImageInserterFormVariants;
682
- }
683
- };
684
- const editorImageInserterRowLabelThemeVariants = (theme) => {
685
- switch (theme) {
686
- case "mona":
687
- return editorImageInserterRowLabelVariants;
688
- default:
689
- return editorImageInserterRowLabelVariants;
690
- }
691
- };
692
- const editorImageInserterRowThemeVariants = (theme) => {
693
- switch (theme) {
694
- case "mona":
695
- return editorImageInserterRowVariants;
696
- default:
697
- return editorImageInserterRowVariants;
698
- }
699
- };
700
- const editorTableCreatorCellThemeVariants = (theme) => {
701
- switch (theme) {
702
- case "mona":
703
- return editorTableCreatorCellVariants;
704
- default:
705
- return editorTableCreatorCellVariants;
706
- }
707
- };
708
- const editorTableCreatorThemeVariants = (theme) => {
709
- switch (theme) {
710
- case "mona":
711
- return editorTableCreatorVariants;
712
- default:
713
- return editorTableCreatorVariants;
714
- }
715
- };
716
- const editorToolbarThemeVariants = (theme) => {
717
- switch (theme) {
718
- case "mona":
719
- return editorToolbarVariants;
720
- default:
721
- return editorToolbarVariants;
722
- }
723
- };
724
-
725
597
  class EditorBasicTextStylesComponent {
726
598
  constructor() {
727
599
  this.anyToolVisible = computed(() => {
@@ -906,16 +778,13 @@ class EditorFontColorComponent {
906
778
  constructor() {
907
779
  this.#document = inject(DOCUMENT);
908
780
  this.#editorService = inject(EditorService);
909
- this.#themeService = inject(ThemeService);
910
781
  this.#lastColor = "";
911
782
  this.colorPreviewClass = computed(() => {
912
- const theme = this.#themeService.theme();
913
- return editorFontColorPreviewThemeVariants(theme)();
783
+ return editorFontColorPreviewThemeVariants();
914
784
  }, /* @ts-ignore */
915
785
  ...(ngDevMode ? [{ debugName: "colorPreviewClass" }] : /* istanbul ignore next */ []));
916
786
  this.colorValueClass = computed(() => {
917
- const theme = this.#themeService.theme();
918
- return editorFontColorValueThemeVariants(theme)();
787
+ return editorFontColorValueThemeVariants();
919
788
  }, /* @ts-ignore */
920
789
  ...(ngDevMode ? [{ debugName: "colorValueClass" }] : /* istanbul ignore next */ []));
921
790
  this.selectedColor = computed(() => {
@@ -928,7 +797,6 @@ class EditorFontColorComponent {
928
797
  }
929
798
  #document;
930
799
  #editorService;
931
- #themeService;
932
800
  #lastColor;
933
801
  onColorChange(color) {
934
802
  if (color) {
@@ -949,10 +817,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
949
817
 
950
818
  class EditorFontFamilyComponent {
951
819
  constructor() {
952
- this.#themeService = inject(ThemeService);
953
820
  this.dropdownListClass = computed(() => {
954
- const theme = this.#themeService.theme();
955
- return editorFontFamilyDropdownListThemeVariants(theme)();
821
+ return editorFontFamilyDropdownListThemeVariants();
956
822
  }, /* @ts-ignore */
957
823
  ...(ngDevMode ? [{ debugName: "dropdownListClass" }] : /* istanbul ignore next */ []));
958
824
  this.editorService = inject(EditorService);
@@ -964,7 +830,6 @@ class EditorFontFamilyComponent {
964
830
  }, /* @ts-ignore */
965
831
  ...(ngDevMode ? [{ debugName: "selectedFontFamily" }] : /* istanbul ignore next */ []));
966
832
  }
967
- #themeService;
968
833
  ngOnInit() {
969
834
  const defaultFontFamily = this.editorService.fonts().first();
970
835
  this.editorService.editor.chain().focus().setFontFamily(defaultFontFamily).run();
@@ -986,16 +851,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
986
851
  class EditorFontHighlightComponent {
987
852
  constructor() {
988
853
  this.#editorService = inject(EditorService);
989
- this.#themeService = inject(ThemeService);
990
854
  this.#lastColor = "";
991
855
  this.highlightPreviewClass = computed(() => {
992
- const theme = this.#themeService.theme();
993
- return editorFontHighlightPreviewThemeVariants(theme)();
856
+ return editorFontHighlightPreviewThemeVariants();
994
857
  }, /* @ts-ignore */
995
858
  ...(ngDevMode ? [{ debugName: "highlightPreviewClass" }] : /* istanbul ignore next */ []));
996
859
  this.highlightValueClass = computed(() => {
997
- const theme = this.#themeService.theme();
998
- return editorFontHighlightValueThemeVariants(theme)();
860
+ return editorFontHighlightValueThemeVariants();
999
861
  }, /* @ts-ignore */
1000
862
  ...(ngDevMode ? [{ debugName: "highlightValueClass" }] : /* istanbul ignore next */ []));
1001
863
  this.selectedColor = computed(() => {
@@ -1017,7 +879,6 @@ class EditorFontHighlightComponent {
1017
879
  ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
1018
880
  }
1019
881
  #editorService;
1020
- #themeService;
1021
882
  #lastColor;
1022
883
  onColorChange(color) {
1023
884
  if (color) {
@@ -1039,10 +900,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1039
900
  class EditorFontSizeComponent {
1040
901
  constructor() {
1041
902
  this.editorService = inject(EditorService);
1042
- this.#themeService = inject(ThemeService);
1043
903
  this.dropdownListClass = computed(() => {
1044
- const theme = this.#themeService.theme();
1045
- return editorFontSizeDropdownListThemeVariants(theme)();
904
+ return editorFontSizeDropdownListThemeVariants();
1046
905
  }, /* @ts-ignore */
1047
906
  ...(ngDevMode ? [{ debugName: "dropdownListClass" }] : /* istanbul ignore next */ []));
1048
907
  this.selectedFontSize = computed(() => {
@@ -1053,7 +912,6 @@ class EditorFontSizeComponent {
1053
912
  }, /* @ts-ignore */
1054
913
  ...(ngDevMode ? [{ debugName: "selectedFontSize" }] : /* istanbul ignore next */ []));
1055
914
  }
1056
- #themeService;
1057
915
  onFontSizeChange(fontSize) {
1058
916
  if (!fontSize) {
1059
917
  return;
@@ -1082,11 +940,9 @@ var HeadingType;
1082
940
  class EditorHeadingsComponent {
1083
941
  constructor() {
1084
942
  this.#editorService = inject(EditorService);
1085
- this.#themeService = inject(ThemeService);
1086
943
  this.HeadingType = HeadingType;
1087
944
  this.dropdownListClass = computed(() => {
1088
- const theme = this.#themeService.theme();
1089
- return editorHeadingsDropdownListThemeVariants(theme)();
945
+ return editorHeadingsDropdownListThemeVariants();
1090
946
  }, /* @ts-ignore */
1091
947
  ...(ngDevMode ? [{ debugName: "dropdownListClass" }] : /* istanbul ignore next */ []));
1092
948
  this.headingsDropdownListData = [
@@ -1109,7 +965,6 @@ class EditorHeadingsComponent {
1109
965
  ...(ngDevMode ? [{ debugName: "selectedHeadingsDropdownItem" }] : /* istanbul ignore next */ []));
1110
966
  }
1111
967
  #editorService;
1112
- #themeService;
1113
968
  onFormatChange(headingItem) {
1114
969
  if (!headingItem) {
1115
970
  return;
@@ -1180,15 +1035,12 @@ class EditorImageInserterComponent {
1180
1035
  width: null
1181
1036
  }, /* @ts-ignore */
1182
1037
  ...(ngDevMode ? [{ debugName: "#imageFormModel" }] : /* istanbul ignore next */ []));
1183
- this.#themeService = inject(ThemeService);
1184
1038
  this.actionsClass = computed(() => {
1185
- const theme = this.#themeService.theme();
1186
- return editorImageInserterActionsThemeVariants(theme)();
1039
+ return editorImageInserterActionsThemeVariants();
1187
1040
  }, /* @ts-ignore */
1188
1041
  ...(ngDevMode ? [{ debugName: "actionsClass" }] : /* istanbul ignore next */ []));
1189
1042
  this.formClass = computed(() => {
1190
- const theme = this.#themeService.theme();
1191
- return editorImageInserterFormThemeVariants(theme)();
1043
+ return editorImageInserterFormThemeVariants();
1192
1044
  }, /* @ts-ignore */
1193
1045
  ...(ngDevMode ? [{ debugName: "formClass" }] : /* istanbul ignore next */ []));
1194
1046
  this.iForm = form(this.#imageFormModel, schema => {
@@ -1196,20 +1048,17 @@ class EditorImageInserterComponent {
1196
1048
  maxLength(schema.link, 2048);
1197
1049
  });
1198
1050
  this.rowClass = computed(() => {
1199
- const theme = this.#themeService.theme();
1200
- return editorImageInserterRowThemeVariants(theme)();
1051
+ return editorImageInserterRowThemeVariants();
1201
1052
  }, /* @ts-ignore */
1202
1053
  ...(ngDevMode ? [{ debugName: "rowClass" }] : /* istanbul ignore next */ []));
1203
1054
  this.rowLabelClass = computed(() => {
1204
- const theme = this.#themeService.theme();
1205
- return editorImageInserterRowLabelThemeVariants(theme)();
1055
+ return editorImageInserterRowLabelThemeVariants();
1206
1056
  }, /* @ts-ignore */
1207
1057
  ...(ngDevMode ? [{ debugName: "rowLabelClass" }] : /* istanbul ignore next */ []));
1208
1058
  this.cancel = output();
1209
1059
  this.insert = output();
1210
1060
  }
1211
1061
  #imageFormModel;
1212
- #themeService;
1213
1062
  onCancel() {
1214
1063
  this.cancel.emit();
1215
1064
  }
@@ -1380,21 +1229,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1380
1229
 
1381
1230
  class EditorTableCreatorComponent {
1382
1231
  constructor() {
1383
- this.#themeService = inject(ThemeService);
1384
1232
  this.highlightedCell = { row: 0, col: 0 };
1385
1233
  this.tableCreatorCellClass = computed(() => {
1386
- const theme = this.#themeService.theme();
1387
- return editorTableCreatorCellThemeVariants(theme)();
1234
+ return editorTableCreatorCellThemeVariants();
1388
1235
  }, /* @ts-ignore */
1389
1236
  ...(ngDevMode ? [{ debugName: "tableCreatorCellClass" }] : /* istanbul ignore next */ []));
1390
1237
  this.tableCreatorClass = computed(() => {
1391
- const theme = this.#themeService.theme();
1392
- return editorTableCreatorThemeVariants(theme)();
1238
+ return editorTableCreatorThemeVariants();
1393
1239
  }, /* @ts-ignore */
1394
1240
  ...(ngDevMode ? [{ debugName: "tableCreatorClass" }] : /* istanbul ignore next */ []));
1395
1241
  this.insert = output();
1396
1242
  }
1397
- #themeService;
1398
1243
  onCellClick(row, col) {
1399
1244
  this.insert.emit({ row, col });
1400
1245
  this.highlightedCell = { row: 0, col: 0 };
@@ -1406,11 +1251,11 @@ class EditorTableCreatorComponent {
1406
1251
  this.highlightedCell = { row: 0, col: 0 };
1407
1252
  }
1408
1253
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableCreatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1409
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorTableCreatorComponent, isStandalone: true, selector: "mona-editor-table-creator", outputs: { insert: "insert" }, ngImport: i0, template: "<div [class]=\"tableCreatorClass()\" (pointerleave)=\"onCellMouseLeave()\">\n @for (rx of [1, 2, 3, 4, 5, 6, 7, 8]; track rx) {\n @for (cx of [1, 2, 3, 4, 5, 6, 7, 8]; track cx) {\n <div\n [class]=\"tableCreatorCellClass()\"\n [style.background-color]=\"\n rx <= highlightedCell.row && cx <= highlightedCell.col\n ? 'var(--color-primary)'\n : 'var(--color-background-light)'\n \"\n (click)=\"onCellClick(rx, cx)\"\n (pointerenter)=\"onCellMouseEnter(rx, cx)\"></div>\n }\n }\n</div>\n" }); }
1254
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorTableCreatorComponent, isStandalone: true, selector: "mona-editor-table-creator", outputs: { insert: "insert" }, ngImport: i0, template: "<div [class]=\"tableCreatorClass()\" (pointerleave)=\"onCellMouseLeave()\">\n @for (rx of [1, 2, 3, 4, 5, 6, 7, 8]; track rx) {\n @for (cx of [1, 2, 3, 4, 5, 6, 7, 8]; track cx) {\n <div\n [class]=\"tableCreatorCellClass()\"\n [style.background-color]=\"\n rx <= highlightedCell.row && cx <= highlightedCell.col\n ? 'var(--color-primary)'\n : 'var(--color-surface-muted)'\n \"\n (click)=\"onCellClick(rx, cx)\"\n (pointerenter)=\"onCellMouseEnter(rx, cx)\"></div>\n }\n }\n</div>\n" }); }
1410
1255
  }
1411
1256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableCreatorComponent, decorators: [{
1412
1257
  type: Component,
1413
- args: [{ selector: "mona-editor-table-creator", template: "<div [class]=\"tableCreatorClass()\" (pointerleave)=\"onCellMouseLeave()\">\n @for (rx of [1, 2, 3, 4, 5, 6, 7, 8]; track rx) {\n @for (cx of [1, 2, 3, 4, 5, 6, 7, 8]; track cx) {\n <div\n [class]=\"tableCreatorCellClass()\"\n [style.background-color]=\"\n rx <= highlightedCell.row && cx <= highlightedCell.col\n ? 'var(--color-primary)'\n : 'var(--color-background-light)'\n \"\n (click)=\"onCellClick(rx, cx)\"\n (pointerenter)=\"onCellMouseEnter(rx, cx)\"></div>\n }\n }\n</div>\n" }]
1258
+ args: [{ selector: "mona-editor-table-creator", template: "<div [class]=\"tableCreatorClass()\" (pointerleave)=\"onCellMouseLeave()\">\n @for (rx of [1, 2, 3, 4, 5, 6, 7, 8]; track rx) {\n @for (cx of [1, 2, 3, 4, 5, 6, 7, 8]; track cx) {\n <div\n [class]=\"tableCreatorCellClass()\"\n [style.background-color]=\"\n rx <= highlightedCell.row && cx <= highlightedCell.col\n ? 'var(--color-primary)'\n : 'var(--color-surface-muted)'\n \"\n (click)=\"onCellClick(rx, cx)\"\n (pointerenter)=\"onCellMouseEnter(rx, cx)\"></div>\n }\n }\n</div>\n" }]
1414
1259
  }], propDecorators: { insert: [{ type: i0.Output, args: ["insert"] }] } });
1415
1260
 
1416
1261
  class EditorTableComponent {
@@ -1623,28 +1468,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1623
1468
 
1624
1469
  class EditorComponent {
1625
1470
  #destroyRef;
1626
- #themeService;
1627
1471
  constructor() {
1628
1472
  this.#destroyRef = inject(DestroyRef);
1629
- this.#themeService = inject(ThemeService);
1630
1473
  this.baseClass = computed(() => {
1631
- const theme = this.#themeService.theme();
1632
1474
  const userClass = this.userClass();
1633
- const variantClass = editorBaseThemeVariants(theme)();
1475
+ const variantClass = editorBaseThemeVariants();
1634
1476
  return twMerge(variantClass, userClass);
1635
1477
  }, /* @ts-ignore */
1636
1478
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
1637
1479
  this.containerClass = computed(() => {
1638
- const theme = this.#themeService.theme();
1639
- return editorContainerThemeVariants(theme)();
1480
+ return editorContainerThemeVariants();
1640
1481
  }, /* @ts-ignore */
1641
1482
  ...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
1642
1483
  this.editorContainer = viewChild.required("editorContainer", /* @ts-ignore */
1643
1484
  ...(ngDevMode ? [{ debugName: "editorContainer" }] : /* istanbul ignore next */ []));
1644
1485
  this.editorService = inject(EditorService);
1645
1486
  this.toolbarClass = computed(() => {
1646
- const theme = this.#themeService.theme();
1647
- return editorToolbarThemeVariants(theme)();
1487
+ return editorToolbarThemeVariants();
1648
1488
  }, /* @ts-ignore */
1649
1489
  ...(ngDevMode ? [{ debugName: "toolbarClass" }] : /* istanbul ignore next */ []));
1650
1490
  /**