@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.
- package/auto-complete/package.json +4 -0
- package/avatar/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button/package.json +4 -0
- package/button-group/package.json +4 -0
- package/calendar/package.json +4 -0
- package/check-box/package.json +4 -0
- package/chip/package.json +4 -0
- package/circular-progress-bar/package.json +4 -0
- package/color-gradient/package.json +4 -0
- package/color-palette/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/combo-box/package.json +4 -0
- package/common/package.json +4 -0
- package/contextmenu/package.json +4 -0
- package/date-input/package.json +4 -0
- package/date-picker/package.json +4 -0
- package/datetime-picker/package.json +4 -0
- package/dialog/package.json +4 -0
- package/dropdown-button/package.json +4 -0
- package/dropdown-list/package.json +4 -0
- package/dropdowns/package.json +4 -0
- package/editor/package.json +4 -0
- package/expansion-panel/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +38 -53
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +19 -53
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +15 -26
- package/fesm2022/nanahoshi-mona-ui-button.mjs +67 -68
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +53 -149
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +48 -95
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +35 -45
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +9 -23
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +26 -77
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +16 -38
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +41 -46
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +32 -52
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +9 -12
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +40 -27
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +51 -51
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +40 -153
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +32 -53
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +7 -12
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +59 -219
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +24 -75
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +11 -44
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +11 -41
- 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
- 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
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-C7WKhhig.mjs → nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs} +9 -16
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-BRiY0CDX.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +15 -44
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BrYpFMyF.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs} +11 -20
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +109 -393
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +26 -56
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +31 -122
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +4 -26
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +5 -18
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +48 -154
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +35 -62
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +24 -108
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +37 -63
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +21 -73
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +8 -30
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +29 -50
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +36 -108
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +19 -60
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +47 -92
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +53 -144
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +54 -110
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +7 -20
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +15 -50
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +28 -91
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +37 -58
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +35 -107
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +22 -30
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +40 -61
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +41 -27
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +35 -99
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +13 -41
- package/fesm2022/nanahoshi-mona-ui-window.mjs +29 -108
- package/fieldset/package.json +4 -0
- package/filter/package.json +4 -0
- package/grid/package.json +4 -0
- package/internal/filter-input/package.json +4 -0
- package/internal/indicator-icon/package.json +4 -0
- package/internal/list/package.json +4 -0
- package/internal/package.json +4 -0
- package/internal/tree/package.json +4 -0
- package/list/package.json +4 -0
- package/list-box/package.json +4 -0
- package/list-view/package.json +4 -0
- package/menubar/package.json +4 -0
- package/multi-select/package.json +4 -0
- package/notification/package.json +4 -0
- package/numeric-text-box/package.json +4 -0
- package/package.json +2 -1
- package/pager/package.json +4 -0
- package/placeholder/package.json +4 -0
- package/popover/package.json +4 -0
- package/popup/package.json +4 -0
- package/popup-menu/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/query/package.json +4 -0
- package/radio-button/package.json +4 -0
- package/scroll-view/package.json +4 -0
- package/slider/package.json +4 -0
- package/split-button/package.json +4 -0
- package/splitter/package.json +4 -0
- package/stepper/package.json +4 -0
- package/switch/package.json +4 -0
- package/tabs/package.json +4 -0
- package/text-area/package.json +4 -0
- package/text-box/package.json +4 -0
- package/theme/package.json +4 -0
- package/time-picker/package.json +4 -0
- package/time-selector/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/tree-view/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
- package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
- package/types/nanahoshi-mona-ui-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
- package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
- package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
- package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
- package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -5
- package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
- package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-dialog.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
- package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
- package/types/nanahoshi-mona-ui-filter.d.ts +2 -3
- package/types/nanahoshi-mona-ui-grid.d.ts +14 -15
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
- package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
- package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
- package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
- package/types/nanahoshi-mona-ui-menubar.d.ts +6 -7
- package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
- package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
- package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
- package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
- package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
- package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
- package/types/nanahoshi-mona-ui-stepper.d.ts +12 -13
- package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
- package/types/nanahoshi-mona-ui-tabs.d.ts +14 -16
- package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
- package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
- package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
- package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
- package/types/nanahoshi-mona-ui-window.d.ts +16 -17
- 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
|
|
457
|
-
flex flex-col
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
focus-
|
|
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-
|
|
474
|
+
[&_blockquote]:border-l-border-control-hover
|
|
475
475
|
[&_blockquote]:px-4 [&_blockquote]:py-2
|
|
476
476
|
[&_blockquote]:ms-4
|
|
477
|
-
[&_blockquote]:bg-
|
|
477
|
+
[&_blockquote]:bg-surface-muted
|
|
478
478
|
|
|
479
|
-
[&_hr]:
|
|
480
|
-
[&_hr]:
|
|
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-
|
|
495
|
+
[&_img.ProseMirror-selectednode]:outline-focus-indicator
|
|
496
496
|
|
|
497
|
-
[&_pre]:bg-
|
|
498
|
-
[&_pre]:border [&_pre]: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-
|
|
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-
|
|
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-
|
|
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-
|
|
522
|
+
[&_.selectedCell]:after:bg-active/70
|
|
523
523
|
|
|
524
524
|
[&_.column-resize-handle]:absolute
|
|
525
|
-
[&_.column-resize-handle]:bg-
|
|
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
|
|
536
|
-
|
|
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
|
|
548
|
+
const editorFontColorPreviewThemeVariants = cva(`
|
|
548
549
|
w-full flex h-[2px]
|
|
549
550
|
`);
|
|
550
|
-
const
|
|
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
|
|
555
|
+
const editorFontFamilyDropdownListThemeVariants = cva(`
|
|
555
556
|
w-[12em]
|
|
556
557
|
`);
|
|
557
|
-
const
|
|
558
|
+
const editorFontHighlightPreviewThemeVariants = cva(`
|
|
558
559
|
w-full flex h-[2px]
|
|
559
560
|
`);
|
|
560
|
-
const
|
|
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
|
|
565
|
+
const editorFontSizeDropdownListThemeVariants = cva(`
|
|
565
566
|
w-[8em]
|
|
566
567
|
`);
|
|
567
|
-
const
|
|
568
|
+
const editorHeadingsDropdownListThemeVariants = cva(`
|
|
568
569
|
w-[14em]
|
|
569
570
|
`);
|
|
570
|
-
const
|
|
571
|
+
const editorImageInserterActionsThemeVariants = cva(`
|
|
571
572
|
flex justify-end gap-1 px-2 py-1
|
|
572
|
-
bg-
|
|
573
|
-
border-t border-t-
|
|
573
|
+
bg-surface-muted
|
|
574
|
+
border-t border-t-border-subtle
|
|
574
575
|
`);
|
|
575
|
-
const
|
|
576
|
+
const editorImageInserterFormThemeVariants = cva(`
|
|
576
577
|
flex flex-col gap-1.5 pt-2
|
|
577
578
|
`);
|
|
578
|
-
const
|
|
579
|
+
const editorImageInserterRowLabelThemeVariants = cva(`
|
|
579
580
|
mb-0.5 ps-0.5 text-sm font-semibold
|
|
580
581
|
`);
|
|
581
|
-
const
|
|
582
|
+
const editorImageInserterRowThemeVariants = cva(`
|
|
582
583
|
flex flex-col justify-center px-2
|
|
583
584
|
`);
|
|
584
|
-
const
|
|
585
|
+
const editorTableCreatorThemeVariants = cva(`
|
|
585
586
|
grid grid-cols-8 gap-0.5 p-1
|
|
586
587
|
`);
|
|
587
|
-
const
|
|
588
|
-
flex
|
|
589
|
-
|
|
588
|
+
const editorTableCreatorCellThemeVariants = cva(`
|
|
589
|
+
flex h-6 w-6
|
|
590
|
+
bg-input-background border border-input-border
|
|
590
591
|
`);
|
|
591
|
-
const
|
|
592
|
+
const editorToolbarThemeVariants = cva(`
|
|
592
593
|
flex flex-wrap items-center justify-start gap-1 p-1
|
|
593
|
-
bg-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
1647
|
-
return editorToolbarThemeVariants(theme)();
|
|
1487
|
+
return editorToolbarThemeVariants();
|
|
1648
1488
|
}, /* @ts-ignore */
|
|
1649
1489
|
...(ngDevMode ? [{ debugName: "toolbarClass" }] : /* istanbul ignore next */ []));
|
|
1650
1490
|
/**
|