@acorex/components 22.4.50 → 22.4.52
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/conversation/README.md +16 -0
- package/fesm2022/{acorex-components-conversation-acorex-components-conversation-CccEQ_Wr.mjs → acorex-components-conversation-acorex-components-conversation-CzzR4rLf.mjs} +65 -75
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-CzzR4rLf.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-6Is-walP.mjs → acorex-components-conversation-picker-rename-file-dialog.component-DXJF8zIY.mjs} +2 -2
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-6Is-walP.mjs.map → acorex-components-conversation-picker-rename-file-dialog.component-DXJF8zIY.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-lookup.mjs +56 -29
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-text-editor.mjs +63 -31
- package/fesm2022/acorex-components-text-editor.mjs.map +1 -1
- package/lookup/README.md +1 -1
- package/package.json +3 -3
- package/types/acorex-components-conversation.d.ts +17 -8
- package/types/acorex-components-lookup.d.ts +19 -3
- package/types/acorex-components-text-editor.d.ts +4 -1
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-CccEQ_Wr.mjs.map +0 -1
|
@@ -4,13 +4,14 @@ import { AXDecoratorIconComponent, AXDecoratorGenericComponent } from '@acorex/c
|
|
|
4
4
|
import { AXTranslatorPipe, AXTranslationService } from '@acorex/core/translation';
|
|
5
5
|
import { DOCUMENT, AsyncPipe, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { inject, signal, computed, Injectable, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, PLATFORM_ID, NgZone, afterNextRender, effect, TemplateRef, Directive, untracked, DestroyRef, ViewContainerRef, contentChild, output, numberAttribute, forwardRef, model,
|
|
7
|
+
import { inject, signal, computed, Injectable, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, PLATFORM_ID, NgZone, afterNextRender, effect, TemplateRef, Directive, untracked, DestroyRef, viewChild, ViewContainerRef, contentChild, output, numberAttribute, forwardRef, model, NgModule } from '@angular/core';
|
|
8
8
|
import { AXTextEditor, AX_TEXT_EDITOR_ZOOM_MAX, AX_TEXT_EDITOR_ZOOM_MIN, resolveTextEditorMentions, textEditorMentionAvatar, AX_TEXT_EDITOR_DEFAULT_TEXT_COLORS, AX_TEXT_EDITOR_DEFAULT_BACKGROUND_COLORS, AX_TEXT_EDITOR_ZOOM_PRESETS, AX_TEXT_EDITOR_FONT_SIZES } from '@acorex/cdk/text-editor';
|
|
9
9
|
import { isEqual } from 'lodash-es';
|
|
10
10
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
11
|
import * as i1 from '@angular/forms';
|
|
12
12
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
13
13
|
import { classes } from 'polytype';
|
|
14
|
+
import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
14
15
|
import { AXHorizontalScrollDirective } from '@acorex/cdk/horizontal-scroll';
|
|
15
16
|
import { AXDropdownButtonComponent } from '@acorex/components/dropdown-button';
|
|
16
17
|
import { AXBadgeComponent } from '@acorex/components/badge';
|
|
@@ -424,14 +425,14 @@ class AXTextEditorContentComponent extends AXTextEditorSlot {
|
|
|
424
425
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AXTextEditorContentComponent, isStandalone: true, selector: "ax-text-editor-content", providers: [
|
|
425
426
|
{ provide: AXComponent, useExisting: AXTextEditorContentComponent },
|
|
426
427
|
{ provide: AXTextEditorSlot, useExisting: AXTextEditorContentComponent },
|
|
427
|
-
], usesInheritance: true, ngImport: i0, template: `<div class="ax-text-editor-surface" #surface></div>`, isInline: true, styles: ["@layer properties;@layer components{ax-text-editor-content{position:relative;display:block;width:100%;max-width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-surface{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-prose{width:100%;min-width:calc(var(--spacing, .25rem) * 0);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);--tw-outline-style: none;outline-style:none;min-height:var( --ax-comp-text-editor-min-height, calc(var(--ax-comp-text-editor-initial-line, 6) * 1.5em + 1.5rem) );color:var(--ax-comp-text-editor-text-color, var(--ax-sys-color-on-surface, inherit));zoom:var(--ax-comp-text-editor-zoom, 1)}.ax-text-editor-prose a{color:rgba(var(--ax-sys-color-primary-600));text-decoration-line:underline;text-underline-offset:2px;text-decoration-thickness:1px}.ax-text-editor-prose a:hover{color:rgba(var(--ax-sys-color-primary-700));text-decoration-thickness:2px}.ax-text-editor-prose blockquote{margin-block:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1);border-inline-start:3px solid var(--ax-sys-color-primary, #3b82f6);color:var(--ax-comp-text-editor-text-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose blockquote{color:color-mix(in oklab,var(--ax-comp-text-editor-text-color, currentColor) 72%,transparent)}}.ax-text-editor-prose blockquote p{margin:0}.ax-text-editor-prose pre,.ax-text-editor-prose pre.ax-text-editor-code-block{margin-block:calc(var(--spacing, .25rem) * 2);display:block;width:100%;overflow-x:auto;border-radius:var(--radius-xl, .75rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3);background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:0;color:inherit;font-family:inherit;white-space:pre-wrap}.ax-text-editor-prose pre code{display:block;border-radius:0;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);color:inherit;font-family:inherit;font-size:inherit}.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{pointer-events:none;float:left;height:calc(var(--spacing, .25rem) * 0);content:attr(data-placeholder);color:var(--ax-comp-text-editor-placeholder-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{color:var(--ax-comp-text-editor-placeholder-color, color-mix(in oklab, currentColor 45%, transparent))}}.ax-text-editor-prose sup{font-size:.75em;line-height:0;position:relative;top:-.4em;vertical-align:baseline}.ax-text-editor-prose sub{font-size:.75em;line-height:0;position:relative;bottom:-.2em;vertical-align:baseline}.ax-text-editor-prose table{width:100%;border-collapse:collapse;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose th,.ax-text-editor-prose td{position:relative;min-width:calc(var(--spacing, .25rem) * 16);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 1);vertical-align:top;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose .selectedCell{background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose .selectedCell{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}.ax-text-editor-prose .column-resize-handle{pointer-events:none;position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * -.5);top:calc(var(--spacing, .25rem) * 0);bottom:calc(var(--spacing, .25rem) * 0);width:calc(var(--spacing, .25rem) * 1);background:var(--ax-sys-color-primary, #3b82f6)}.ax-text-editor-prose .tableWrapper{margin-block:calc(var(--spacing, .25rem) * 2);overflow-x:auto}.ax-text-editor-prose img.ax-text-editor-image,.ax-text-editor-prose img{margin-block:calc(var(--spacing, .25rem) * 2);height:auto;max-width:100%;border-radius:var(--ax-sys-border-radius)}.ax-text-editor-prose video.ax-text-editor-video,.ax-text-editor-prose video,.ax-text-editor-prose [data-text-editor-video] iframe,.ax-text-editor-prose [data-wysiwyg-video] iframe{margin-block:calc(var(--spacing, .25rem) * 2);max-width:100%;border-radius:var(--ax-sys-border-radius);width:100%;aspect-ratio:16 / 9}.resize-cursor{cursor:col-resize}}ax-text-editor .ax-text-editor-prose :not(pre)>code,ax-text-editor .ax-text-editor-prose code.ax-text-editor-code{display:inline;border-radius:.5rem;padding:.25rem .625rem;background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:1px solid var(--ax-comp-text-editor-code-border-color, rgba(var(--ax-sys-color-border-surface)));color:inherit;font-family:inherit;font-size:.875em}ax-text-editor .ax-text-editor-prose pre code{display:block;border:0;border-radius:0;padding:0;background-color:transparent;color:inherit;font-family:inherit;font-size:inherit}ax-text-editor .ax-text-editor-prose ul,ax-text-editor .ax-text-editor-prose ul.ax-text-editor-bullet-list{list-style-type:disc!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ol,ax-text-editor .ax-text-editor-prose ol.ax-text-editor-ordered-list{list-style-type:decimal!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ul ul{list-style-type:circle!important}ax-text-editor .ax-text-editor-prose ol ol{list-style-type:lower-alpha!important}ax-text-editor .ax-text-editor-prose li{display:list-item!important}ax-text-editor .ax-text-editor-prose li p{margin:0}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention{-webkit-user-select:all;user-select:all}.ax-text-editor-mention-avatar{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;border-radius:999px;object-fit:cover;background:var(--ax-sys-color-primary, #3b82f6);color:var(--ax-sys-color-primary, #1d4ed8);font-size:.68rem;font-weight:700;line-height:1}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-mention-avatar{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 18%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{border-radius:.25rem;background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 28%,transparent)}}ax-text-editor .ax-text-editor-prose p{font-size:1em;font-weight:400}ax-text-editor .ax-text-editor-prose h1,ax-text-editor .ax-text-editor-prose h2,ax-text-editor .ax-text-editor-prose h3{margin-block:.6em .35em;letter-spacing:-.02em;color:inherit}ax-text-editor .ax-text-editor-prose h1{font-size:2.5rem!important;font-weight:600!important;line-height:1.2}ax-text-editor .ax-text-editor-prose h2{font-size:2rem!important;font-weight:600!important;line-height:1.25}ax-text-editor .ax-text-editor-prose h3{font-size:1.5rem!important;font-weight:600!important;line-height:1.3}ax-text-editor .ax-text-editor-prose>:first-child{margin-top:0}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n", ":is(.ax-text-editor-mention,.ax-conversation-mention){display:inline-flex;align-items:center;gap:.2rem;box-sizing:border-box;max-inline-size:calc(100% - .1rem);margin-inline:.05rem;padding-inline:.12rem .35rem;border-radius:999px;color:var(--ax-comp-mention-color, var(--ax-sys-color-primary, #1d4ed8));background:color-mix(in oklab,currentColor 14%,transparent);font-weight:600;line-height:1;vertical-align:middle}.ax-text-editor-prose p .ax-text-editor-mention{line-height:inherit;block-size:1lh;vertical-align:top}:is(.ax-text-editor-mention-text,.ax-conversation-mention-text){min-inline-size:0;overflow:hidden;line-height:1;text-overflow:ellipsis;white-space:nowrap}:is(.ax-text-editor-mention-avatar-host,.ax-conversation-mention-avatar){display:inline-flex;flex:none;align-items:center;justify-content:center;overflow:hidden;border-radius:999px;line-height:0}\n", "ax-text-editor .ax-text-editor-prose .ax-text-editor-spoiler,ax-conversation-emoji-text .ax-conversation-fmt-spoiler:not(.ax-conversation-fmt-spoiler-open){--ax-spoiler-particle: radial-gradient(circle, currentColor .45px, transparent .85px);--ax-spoiler-faint-particle: radial-gradient( circle, color-mix(in oklab, currentColor 55%, transparent) .3px, transparent .75px );background-image:var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle);background-size:19px 17px,23px 19px,29px 23px,17px 23px,31px 17px,23px 29px,29px 19px;background-position:1px -3px,-4px 2px,3px 5px,-7px 3px,5px -4px,-4px -7px,9px -8px;box-decoration-break:clone;-webkit-box-decoration-break:clone}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
428
|
+
], usesInheritance: true, ngImport: i0, template: `<div class="ax-text-editor-surface" #surface></div>`, isInline: true, styles: ["@layer properties;@layer components{ax-text-editor-content{position:relative;display:block;width:100%;max-width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-surface{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-prose{width:100%;min-width:calc(var(--spacing, .25rem) * 0);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);--tw-outline-style: none;outline-style:none;min-height:var( --ax-comp-text-editor-min-height, calc(var(--ax-comp-text-editor-initial-line, 6) * 1.5em + 1.5rem) );color:var(--ax-comp-text-editor-text-color, var(--ax-sys-color-on-surface, inherit));zoom:var(--ax-comp-text-editor-zoom, 1)}.ax-text-editor-prose a{color:rgba(var(--ax-sys-color-primary-600));text-decoration-line:underline;text-underline-offset:2px;text-decoration-thickness:1px}.ax-text-editor-prose a:hover{color:rgba(var(--ax-sys-color-primary-700));text-decoration-thickness:2px}.ax-text-editor-prose blockquote{margin-block:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1);border-inline-start:3px solid var(--ax-sys-color-primary, #3b82f6);color:var(--ax-comp-text-editor-text-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose blockquote{color:color-mix(in oklab,var(--ax-comp-text-editor-text-color, currentColor) 72%,transparent)}}.ax-text-editor-prose blockquote p{margin:0}.ax-text-editor-prose pre,.ax-text-editor-prose pre.ax-text-editor-code-block{margin-block:calc(var(--spacing, .25rem) * 2);display:block;width:100%;overflow-x:auto;border-radius:var(--radius-xl, .75rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3);background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:0;color:inherit;font-family:inherit;white-space:pre-wrap}.ax-text-editor-prose pre code{display:block;border-radius:0;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);color:inherit;font-family:inherit;font-size:inherit}.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{pointer-events:none;float:left;height:calc(var(--spacing, .25rem) * 0);content:attr(data-placeholder);color:var(--ax-comp-text-editor-placeholder-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{color:var(--ax-comp-text-editor-placeholder-color, color-mix(in oklab, currentColor 45%, transparent))}}.ax-text-editor-prose sup{font-size:.75em;line-height:0;position:relative;top:-.4em;vertical-align:baseline}.ax-text-editor-prose sub{font-size:.75em;line-height:0;position:relative;bottom:-.2em;vertical-align:baseline}.ax-text-editor-prose table{width:100%;border-collapse:collapse;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose th,.ax-text-editor-prose td{position:relative;min-width:calc(var(--spacing, .25rem) * 16);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 1);vertical-align:top;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose .selectedCell{background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose .selectedCell{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}.ax-text-editor-prose .column-resize-handle{pointer-events:none;position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * -.5);top:calc(var(--spacing, .25rem) * 0);bottom:calc(var(--spacing, .25rem) * 0);width:calc(var(--spacing, .25rem) * 1);background:var(--ax-sys-color-primary, #3b82f6)}.ax-text-editor-prose .tableWrapper{margin-block:calc(var(--spacing, .25rem) * 2);overflow-x:auto}.ax-text-editor-prose img.ax-text-editor-image,.ax-text-editor-prose img{margin-block:calc(var(--spacing, .25rem) * 2);height:auto;max-width:100%;border-radius:var(--ax-sys-border-radius)}.ax-text-editor-prose video.ax-text-editor-video,.ax-text-editor-prose video,.ax-text-editor-prose [data-text-editor-video] iframe,.ax-text-editor-prose [data-wysiwyg-video] iframe{margin-block:calc(var(--spacing, .25rem) * 2);max-width:100%;border-radius:var(--ax-sys-border-radius);width:100%;aspect-ratio:16 / 9}.resize-cursor{cursor:col-resize}}ax-text-editor .ax-text-editor-prose :not(pre)>code,ax-text-editor .ax-text-editor-prose code.ax-text-editor-code{display:inline;border-radius:.5rem;padding:.25rem .625rem;background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:1px solid var(--ax-comp-text-editor-code-border-color, rgba(var(--ax-sys-color-border-surface)));color:inherit;font-family:inherit;font-size:.875em}ax-text-editor .ax-text-editor-prose pre code{display:block;border:0;border-radius:0;padding:0;background-color:transparent;color:inherit;font-family:inherit;font-size:inherit}ax-text-editor .ax-text-editor-prose ul,ax-text-editor .ax-text-editor-prose ul.ax-text-editor-bullet-list{list-style-type:disc!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ol,ax-text-editor .ax-text-editor-prose ol.ax-text-editor-ordered-list{list-style-type:decimal!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ul ul{list-style-type:circle!important}ax-text-editor .ax-text-editor-prose ol ol{list-style-type:lower-alpha!important}ax-text-editor .ax-text-editor-prose li{display:list-item!important}ax-text-editor .ax-text-editor-prose li p{margin:0}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention{-webkit-user-select:none;user-select:none}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-selected{background-color:Highlight;color:HighlightText}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-selected .ax-text-editor-mention-avatar{color:inherit}.ax-text-editor-mention-avatar{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;border-radius:999px;object-fit:cover;background:var(--ax-sys-color-primary, #3b82f6);color:var(--ax-sys-color-primary, #1d4ed8);font-size:.68rem;font-weight:700;line-height:1}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-mention-avatar{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 18%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{border-radius:.25rem;background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 28%,transparent)}}ax-text-editor .ax-text-editor-prose p{font-size:1em;font-weight:400}ax-text-editor .ax-text-editor-prose h1,ax-text-editor .ax-text-editor-prose h2,ax-text-editor .ax-text-editor-prose h3{margin-block:.6em .35em;letter-spacing:-.02em;color:inherit}ax-text-editor .ax-text-editor-prose h1{font-size:2.5rem!important;font-weight:600!important;line-height:1.2}ax-text-editor .ax-text-editor-prose h2{font-size:2rem!important;font-weight:600!important;line-height:1.25}ax-text-editor .ax-text-editor-prose h3{font-size:1.5rem!important;font-weight:600!important;line-height:1.3}ax-text-editor .ax-text-editor-prose>:first-child{margin-top:0}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n", ":is(.ax-text-editor-mention,.ax-conversation-mention){display:inline-flex;align-items:center;gap:.2rem;box-sizing:border-box;max-inline-size:calc(100% - .1rem);margin-inline:.05rem;padding-inline:.12rem .35rem;border-radius:999px;color:var(--ax-comp-mention-color, var(--ax-sys-color-primary, #1d4ed8));background:color-mix(in oklab,currentColor 14%,transparent);font-weight:600;line-height:1;vertical-align:middle}.ax-text-editor-prose p .ax-text-editor-mention{line-height:inherit;block-size:1lh;vertical-align:top}:is(.ax-text-editor-mention-text,.ax-conversation-mention-text){min-inline-size:0;overflow:hidden;line-height:1;text-overflow:ellipsis;white-space:nowrap}:is(.ax-text-editor-mention-avatar-host,.ax-conversation-mention-avatar){display:inline-flex;flex:none;align-items:center;justify-content:center;overflow:hidden;border-radius:999px;line-height:0}\n", "ax-text-editor .ax-text-editor-prose .ax-text-editor-spoiler,ax-conversation-emoji-text .ax-conversation-fmt-spoiler:not(.ax-conversation-fmt-spoiler-open){--ax-spoiler-particle: radial-gradient(circle, currentColor .45px, transparent .85px);--ax-spoiler-faint-particle: radial-gradient( circle, color-mix(in oklab, currentColor 55%, transparent) .3px, transparent .75px );background-image:var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle);background-size:19px 17px,23px 19px,29px 23px,17px 23px,31px 17px,23px 29px,29px 19px;background-position:1px -3px,-4px 2px,3px 5px,-7px 3px,5px -4px,-4px -7px,9px -8px;box-decoration-break:clone;-webkit-box-decoration-break:clone}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
428
429
|
}
|
|
429
430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTextEditorContentComponent, decorators: [{
|
|
430
431
|
type: Component,
|
|
431
432
|
args: [{ selector: 'ax-text-editor-content', template: `<div class="ax-text-editor-surface" #surface></div>`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
432
433
|
{ provide: AXComponent, useExisting: AXTextEditorContentComponent },
|
|
433
434
|
{ provide: AXTextEditorSlot, useExisting: AXTextEditorContentComponent },
|
|
434
|
-
], styles: ["@layer properties;@layer components{ax-text-editor-content{position:relative;display:block;width:100%;max-width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-surface{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-prose{width:100%;min-width:calc(var(--spacing, .25rem) * 0);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);--tw-outline-style: none;outline-style:none;min-height:var( --ax-comp-text-editor-min-height, calc(var(--ax-comp-text-editor-initial-line, 6) * 1.5em + 1.5rem) );color:var(--ax-comp-text-editor-text-color, var(--ax-sys-color-on-surface, inherit));zoom:var(--ax-comp-text-editor-zoom, 1)}.ax-text-editor-prose a{color:rgba(var(--ax-sys-color-primary-600));text-decoration-line:underline;text-underline-offset:2px;text-decoration-thickness:1px}.ax-text-editor-prose a:hover{color:rgba(var(--ax-sys-color-primary-700));text-decoration-thickness:2px}.ax-text-editor-prose blockquote{margin-block:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1);border-inline-start:3px solid var(--ax-sys-color-primary, #3b82f6);color:var(--ax-comp-text-editor-text-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose blockquote{color:color-mix(in oklab,var(--ax-comp-text-editor-text-color, currentColor) 72%,transparent)}}.ax-text-editor-prose blockquote p{margin:0}.ax-text-editor-prose pre,.ax-text-editor-prose pre.ax-text-editor-code-block{margin-block:calc(var(--spacing, .25rem) * 2);display:block;width:100%;overflow-x:auto;border-radius:var(--radius-xl, .75rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3);background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:0;color:inherit;font-family:inherit;white-space:pre-wrap}.ax-text-editor-prose pre code{display:block;border-radius:0;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);color:inherit;font-family:inherit;font-size:inherit}.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{pointer-events:none;float:left;height:calc(var(--spacing, .25rem) * 0);content:attr(data-placeholder);color:var(--ax-comp-text-editor-placeholder-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{color:var(--ax-comp-text-editor-placeholder-color, color-mix(in oklab, currentColor 45%, transparent))}}.ax-text-editor-prose sup{font-size:.75em;line-height:0;position:relative;top:-.4em;vertical-align:baseline}.ax-text-editor-prose sub{font-size:.75em;line-height:0;position:relative;bottom:-.2em;vertical-align:baseline}.ax-text-editor-prose table{width:100%;border-collapse:collapse;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose th,.ax-text-editor-prose td{position:relative;min-width:calc(var(--spacing, .25rem) * 16);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 1);vertical-align:top;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose .selectedCell{background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose .selectedCell{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}.ax-text-editor-prose .column-resize-handle{pointer-events:none;position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * -.5);top:calc(var(--spacing, .25rem) * 0);bottom:calc(var(--spacing, .25rem) * 0);width:calc(var(--spacing, .25rem) * 1);background:var(--ax-sys-color-primary, #3b82f6)}.ax-text-editor-prose .tableWrapper{margin-block:calc(var(--spacing, .25rem) * 2);overflow-x:auto}.ax-text-editor-prose img.ax-text-editor-image,.ax-text-editor-prose img{margin-block:calc(var(--spacing, .25rem) * 2);height:auto;max-width:100%;border-radius:var(--ax-sys-border-radius)}.ax-text-editor-prose video.ax-text-editor-video,.ax-text-editor-prose video,.ax-text-editor-prose [data-text-editor-video] iframe,.ax-text-editor-prose [data-wysiwyg-video] iframe{margin-block:calc(var(--spacing, .25rem) * 2);max-width:100%;border-radius:var(--ax-sys-border-radius);width:100%;aspect-ratio:16 / 9}.resize-cursor{cursor:col-resize}}ax-text-editor .ax-text-editor-prose :not(pre)>code,ax-text-editor .ax-text-editor-prose code.ax-text-editor-code{display:inline;border-radius:.5rem;padding:.25rem .625rem;background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:1px solid var(--ax-comp-text-editor-code-border-color, rgba(var(--ax-sys-color-border-surface)));color:inherit;font-family:inherit;font-size:.875em}ax-text-editor .ax-text-editor-prose pre code{display:block;border:0;border-radius:0;padding:0;background-color:transparent;color:inherit;font-family:inherit;font-size:inherit}ax-text-editor .ax-text-editor-prose ul,ax-text-editor .ax-text-editor-prose ul.ax-text-editor-bullet-list{list-style-type:disc!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ol,ax-text-editor .ax-text-editor-prose ol.ax-text-editor-ordered-list{list-style-type:decimal!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ul ul{list-style-type:circle!important}ax-text-editor .ax-text-editor-prose ol ol{list-style-type:lower-alpha!important}ax-text-editor .ax-text-editor-prose li{display:list-item!important}ax-text-editor .ax-text-editor-prose li p{margin:0}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention{-webkit-user-select:all;user-select:all}.ax-text-editor-mention-avatar{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;border-radius:999px;object-fit:cover;background:var(--ax-sys-color-primary, #3b82f6);color:var(--ax-sys-color-primary, #1d4ed8);font-size:.68rem;font-weight:700;line-height:1}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-mention-avatar{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 18%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{border-radius:.25rem;background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 28%,transparent)}}ax-text-editor .ax-text-editor-prose p{font-size:1em;font-weight:400}ax-text-editor .ax-text-editor-prose h1,ax-text-editor .ax-text-editor-prose h2,ax-text-editor .ax-text-editor-prose h3{margin-block:.6em .35em;letter-spacing:-.02em;color:inherit}ax-text-editor .ax-text-editor-prose h1{font-size:2.5rem!important;font-weight:600!important;line-height:1.2}ax-text-editor .ax-text-editor-prose h2{font-size:2rem!important;font-weight:600!important;line-height:1.25}ax-text-editor .ax-text-editor-prose h3{font-size:1.5rem!important;font-weight:600!important;line-height:1.3}ax-text-editor .ax-text-editor-prose>:first-child{margin-top:0}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n", ":is(.ax-text-editor-mention,.ax-conversation-mention){display:inline-flex;align-items:center;gap:.2rem;box-sizing:border-box;max-inline-size:calc(100% - .1rem);margin-inline:.05rem;padding-inline:.12rem .35rem;border-radius:999px;color:var(--ax-comp-mention-color, var(--ax-sys-color-primary, #1d4ed8));background:color-mix(in oklab,currentColor 14%,transparent);font-weight:600;line-height:1;vertical-align:middle}.ax-text-editor-prose p .ax-text-editor-mention{line-height:inherit;block-size:1lh;vertical-align:top}:is(.ax-text-editor-mention-text,.ax-conversation-mention-text){min-inline-size:0;overflow:hidden;line-height:1;text-overflow:ellipsis;white-space:nowrap}:is(.ax-text-editor-mention-avatar-host,.ax-conversation-mention-avatar){display:inline-flex;flex:none;align-items:center;justify-content:center;overflow:hidden;border-radius:999px;line-height:0}\n", "ax-text-editor .ax-text-editor-prose .ax-text-editor-spoiler,ax-conversation-emoji-text .ax-conversation-fmt-spoiler:not(.ax-conversation-fmt-spoiler-open){--ax-spoiler-particle: radial-gradient(circle, currentColor .45px, transparent .85px);--ax-spoiler-faint-particle: radial-gradient( circle, color-mix(in oklab, currentColor 55%, transparent) .3px, transparent .75px );background-image:var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle);background-size:19px 17px,23px 19px,29px 23px,17px 23px,31px 17px,23px 29px,29px 19px;background-position:1px -3px,-4px 2px,3px 5px,-7px 3px,5px -4px,-4px -7px,9px -8px;box-decoration-break:clone;-webkit-box-decoration-break:clone}\n"] }]
|
|
435
|
+
], styles: ["@layer properties;@layer components{ax-text-editor-content{position:relative;display:block;width:100%;max-width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-surface{width:100%;min-width:calc(var(--spacing, .25rem) * 0)}.ax-text-editor-prose{width:100%;min-width:calc(var(--spacing, .25rem) * 0);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);--tw-outline-style: none;outline-style:none;min-height:var( --ax-comp-text-editor-min-height, calc(var(--ax-comp-text-editor-initial-line, 6) * 1.5em + 1.5rem) );color:var(--ax-comp-text-editor-text-color, var(--ax-sys-color-on-surface, inherit));zoom:var(--ax-comp-text-editor-zoom, 1)}.ax-text-editor-prose a{color:rgba(var(--ax-sys-color-primary-600));text-decoration-line:underline;text-underline-offset:2px;text-decoration-thickness:1px}.ax-text-editor-prose a:hover{color:rgba(var(--ax-sys-color-primary-700));text-decoration-thickness:2px}.ax-text-editor-prose blockquote{margin-block:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1);border-inline-start:3px solid var(--ax-sys-color-primary, #3b82f6);color:var(--ax-comp-text-editor-text-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose blockquote{color:color-mix(in oklab,var(--ax-comp-text-editor-text-color, currentColor) 72%,transparent)}}.ax-text-editor-prose blockquote p{margin:0}.ax-text-editor-prose pre,.ax-text-editor-prose pre.ax-text-editor-code-block{margin-block:calc(var(--spacing, .25rem) * 2);display:block;width:100%;overflow-x:auto;border-radius:var(--radius-xl, .75rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3);background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:0;color:inherit;font-family:inherit;white-space:pre-wrap}.ax-text-editor-prose pre code{display:block;border-radius:0;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);color:inherit;font-family:inherit;font-size:inherit}.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{pointer-events:none;float:left;height:calc(var(--spacing, .25rem) * 0);content:attr(data-placeholder);color:var(--ax-comp-text-editor-placeholder-color, currentColor)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose p.is-empty:first-child:before,.ax-text-editor-prose p.is-editor-empty:first-child:before{color:var(--ax-comp-text-editor-placeholder-color, color-mix(in oklab, currentColor 45%, transparent))}}.ax-text-editor-prose sup{font-size:.75em;line-height:0;position:relative;top:-.4em;vertical-align:baseline}.ax-text-editor-prose sub{font-size:.75em;line-height:0;position:relative;bottom:-.2em;vertical-align:baseline}.ax-text-editor-prose table{width:100%;border-collapse:collapse;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose th,.ax-text-editor-prose td{position:relative;min-width:calc(var(--spacing, .25rem) * 16);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 1);vertical-align:top;border:1px solid var(--ax-comp-text-editor-table-border-color, var(--ax-sys-color-border-lightest, #e5e7eb))}.ax-text-editor-prose .selectedCell{background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-prose .selectedCell{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}.ax-text-editor-prose .column-resize-handle{pointer-events:none;position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * -.5);top:calc(var(--spacing, .25rem) * 0);bottom:calc(var(--spacing, .25rem) * 0);width:calc(var(--spacing, .25rem) * 1);background:var(--ax-sys-color-primary, #3b82f6)}.ax-text-editor-prose .tableWrapper{margin-block:calc(var(--spacing, .25rem) * 2);overflow-x:auto}.ax-text-editor-prose img.ax-text-editor-image,.ax-text-editor-prose img{margin-block:calc(var(--spacing, .25rem) * 2);height:auto;max-width:100%;border-radius:var(--ax-sys-border-radius)}.ax-text-editor-prose video.ax-text-editor-video,.ax-text-editor-prose video,.ax-text-editor-prose [data-text-editor-video] iframe,.ax-text-editor-prose [data-wysiwyg-video] iframe{margin-block:calc(var(--spacing, .25rem) * 2);max-width:100%;border-radius:var(--ax-sys-border-radius);width:100%;aspect-ratio:16 / 9}.resize-cursor{cursor:col-resize}}ax-text-editor .ax-text-editor-prose :not(pre)>code,ax-text-editor .ax-text-editor-prose code.ax-text-editor-code{display:inline;border-radius:.5rem;padding:.25rem .625rem;background-color:var(--ax-comp-text-editor-code-bg-color, rgba(var(--ax-sys-color-surface)));border:1px solid var(--ax-comp-text-editor-code-border-color, rgba(var(--ax-sys-color-border-surface)));color:inherit;font-family:inherit;font-size:.875em}ax-text-editor .ax-text-editor-prose pre code{display:block;border:0;border-radius:0;padding:0;background-color:transparent;color:inherit;font-family:inherit;font-size:inherit}ax-text-editor .ax-text-editor-prose ul,ax-text-editor .ax-text-editor-prose ul.ax-text-editor-bullet-list{list-style-type:disc!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ol,ax-text-editor .ax-text-editor-prose ol.ax-text-editor-ordered-list{list-style-type:decimal!important;list-style-position:outside;margin-block:.5em;padding-inline-start:1.75rem}ax-text-editor .ax-text-editor-prose ul ul{list-style-type:circle!important}ax-text-editor .ax-text-editor-prose ol ol{list-style-type:lower-alpha!important}ax-text-editor .ax-text-editor-prose li{display:list-item!important}ax-text-editor .ax-text-editor-prose li p{margin:0}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention{-webkit-user-select:none;user-select:none}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-selected{background-color:Highlight;color:HighlightText}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-selected .ax-text-editor-mention-avatar{color:inherit}.ax-text-editor-mention-avatar{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;border-radius:999px;object-fit:cover;background:var(--ax-sys-color-primary, #3b82f6);color:var(--ax-sys-color-primary, #1d4ed8);font-size:.68rem;font-weight:700;line-height:1}@supports (color: color-mix(in lab,red,red)){.ax-text-editor-mention-avatar{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 18%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{border-radius:.25rem;background:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-mention-query{background:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 16%,transparent)}}ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:var(--ax-sys-color-primary, #3b82f6)}@supports (color: color-mix(in lab,red,red)){ax-text-editor .ax-text-editor-prose .ax-text-editor-kept-selection{background-color:color-mix(in oklab,var(--ax-sys-color-primary, #3b82f6) 28%,transparent)}}ax-text-editor .ax-text-editor-prose p{font-size:1em;font-weight:400}ax-text-editor .ax-text-editor-prose h1,ax-text-editor .ax-text-editor-prose h2,ax-text-editor .ax-text-editor-prose h3{margin-block:.6em .35em;letter-spacing:-.02em;color:inherit}ax-text-editor .ax-text-editor-prose h1{font-size:2.5rem!important;font-weight:600!important;line-height:1.2}ax-text-editor .ax-text-editor-prose h2{font-size:2rem!important;font-weight:600!important;line-height:1.25}ax-text-editor .ax-text-editor-prose h3{font-size:1.5rem!important;font-weight:600!important;line-height:1.3}ax-text-editor .ax-text-editor-prose>:first-child{margin-top:0}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n", ":is(.ax-text-editor-mention,.ax-conversation-mention){display:inline-flex;align-items:center;gap:.2rem;box-sizing:border-box;max-inline-size:calc(100% - .1rem);margin-inline:.05rem;padding-inline:.12rem .35rem;border-radius:999px;color:var(--ax-comp-mention-color, var(--ax-sys-color-primary, #1d4ed8));background:color-mix(in oklab,currentColor 14%,transparent);font-weight:600;line-height:1;vertical-align:middle}.ax-text-editor-prose p .ax-text-editor-mention{line-height:inherit;block-size:1lh;vertical-align:top}:is(.ax-text-editor-mention-text,.ax-conversation-mention-text){min-inline-size:0;overflow:hidden;line-height:1;text-overflow:ellipsis;white-space:nowrap}:is(.ax-text-editor-mention-avatar-host,.ax-conversation-mention-avatar){display:inline-flex;flex:none;align-items:center;justify-content:center;overflow:hidden;border-radius:999px;line-height:0}\n", "ax-text-editor .ax-text-editor-prose .ax-text-editor-spoiler,ax-conversation-emoji-text .ax-conversation-fmt-spoiler:not(.ax-conversation-fmt-spoiler-open){--ax-spoiler-particle: radial-gradient(circle, currentColor .45px, transparent .85px);--ax-spoiler-faint-particle: radial-gradient( circle, color-mix(in oklab, currentColor 55%, transparent) .3px, transparent .75px );background-image:var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle),var(--ax-spoiler-faint-particle);background-size:19px 17px,23px 19px,29px 23px,17px 23px,31px 17px,23px 29px,29px 19px;background-position:1px -3px,-4px 2px,3px 5px,-7px 3px,5px -4px,-4px -7px,9px -8px;box-decoration-break:clone;-webkit-box-decoration-break:clone}\n"] }]
|
|
435
436
|
}], ctorParameters: () => [] });
|
|
436
437
|
|
|
437
438
|
/** Portrait for a mention. The template context is the mention item. */
|
|
@@ -660,8 +661,12 @@ class AXTextEditorInlineToolbarComponent extends AXTextEditorSlot {
|
|
|
660
661
|
constructor() {
|
|
661
662
|
super();
|
|
662
663
|
this.editorService = inject(AXTextEditorService);
|
|
664
|
+
this.overlayService = inject(AXOverlayService);
|
|
663
665
|
this.elementRef = inject((ElementRef));
|
|
664
666
|
this.destroyRef = inject(DestroyRef);
|
|
667
|
+
this.toolbar = viewChild.required('toolbar', /* @ts-ignore */
|
|
668
|
+
...(ngDevMode ? [{ debugName: "toolbar" }] : /* istanbul ignore next */ []));
|
|
669
|
+
this.panel = null;
|
|
665
670
|
this.open = signal(false, /* @ts-ignore */
|
|
666
671
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
667
672
|
this.below = signal(false, /* @ts-ignore */
|
|
@@ -675,6 +680,26 @@ class AXTextEditorInlineToolbarComponent extends AXTextEditorSlot {
|
|
|
675
680
|
this.editorService.mentionSuggestion();
|
|
676
681
|
untracked(() => this.place());
|
|
677
682
|
});
|
|
683
|
+
effect((onCleanup) => {
|
|
684
|
+
if (!this.open())
|
|
685
|
+
return;
|
|
686
|
+
const overlay = this.overlayService.create(this.toolbar(), {
|
|
687
|
+
centered: false,
|
|
688
|
+
contextElement: this.elementRef.nativeElement,
|
|
689
|
+
});
|
|
690
|
+
let closed = false;
|
|
691
|
+
onCleanup(() => {
|
|
692
|
+
closed = true;
|
|
693
|
+
this.panel = null;
|
|
694
|
+
void overlay.then((ref) => ref.dispose());
|
|
695
|
+
});
|
|
696
|
+
void overlay.then((ref) => {
|
|
697
|
+
if (closed)
|
|
698
|
+
return;
|
|
699
|
+
this.panel = ref.overlayElement?.querySelector('.ax-text-editor-inline-toolbar') ?? null;
|
|
700
|
+
this.place();
|
|
701
|
+
});
|
|
702
|
+
});
|
|
678
703
|
afterNextRender(() => {
|
|
679
704
|
const place = () => this.place();
|
|
680
705
|
document.addEventListener('scroll', place, true);
|
|
@@ -710,17 +735,12 @@ class AXTextEditorInlineToolbarComponent extends AXTextEditorSlot {
|
|
|
710
735
|
this.open.set(false);
|
|
711
736
|
return;
|
|
712
737
|
}
|
|
713
|
-
const toolbarHeight = this.
|
|
714
|
-
const below = rect.top - toolbarHeight <
|
|
738
|
+
const toolbarHeight = this.panel?.offsetHeight || 40;
|
|
739
|
+
const below = rect.top - toolbarHeight < 14;
|
|
715
740
|
this.below.set(below);
|
|
716
741
|
this.top.set(Math.round(below ? rect.bottom : rect.top));
|
|
717
742
|
this.left.set(this.clampLeft(rect));
|
|
718
743
|
this.open.set(true);
|
|
719
|
-
queueMicrotask(() => {
|
|
720
|
-
if (!this.open())
|
|
721
|
-
return;
|
|
722
|
-
this.left.set(this.clampLeft(rect));
|
|
723
|
-
});
|
|
724
744
|
}
|
|
725
745
|
/** The line of text under the caret, ignoring the stretched box select-all creates. */
|
|
726
746
|
selectionLineRect(editor) {
|
|
@@ -754,40 +774,52 @@ class AXTextEditorInlineToolbarComponent extends AXTextEditorSlot {
|
|
|
754
774
|
: best);
|
|
755
775
|
}
|
|
756
776
|
clampLeft(rect) {
|
|
757
|
-
const width = this.
|
|
777
|
+
const width = this.panel?.offsetWidth || 240;
|
|
758
778
|
const half = width / 2;
|
|
759
779
|
const center = rect.left + rect.width / 2;
|
|
760
780
|
return Math.round(Math.min(window.innerWidth - 8 - half, Math.max(8 + half, center)));
|
|
761
781
|
}
|
|
762
782
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTextEditorInlineToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
763
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
783
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: AXTextEditorInlineToolbarComponent, isStandalone: true, selector: "ax-text-editor-inline-toolbar", providers: [
|
|
764
784
|
{ provide: AXComponent, useExisting: AXTextEditorInlineToolbarComponent },
|
|
765
785
|
{ provide: AXTextEditorSlot, useExisting: AXTextEditorInlineToolbarComponent },
|
|
766
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
767
|
-
<
|
|
768
|
-
<
|
|
769
|
-
|
|
770
|
-
|
|
786
|
+
], viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
787
|
+
<ng-template #toolbar>
|
|
788
|
+
<div
|
|
789
|
+
class="ax-text-editor-inline-toolbar"
|
|
790
|
+
[class.ax-below]="below()"
|
|
791
|
+
[style.top.px]="top()"
|
|
792
|
+
[style.left.px]="left()"
|
|
793
|
+
(mousedown)="onMouseDown($event)"
|
|
794
|
+
>
|
|
795
|
+
<div class="ax-text-editor-inline-toolbar-tools">
|
|
796
|
+
<ng-content></ng-content>
|
|
797
|
+
</div>
|
|
798
|
+
</div>
|
|
799
|
+
</ng-template>
|
|
800
|
+
`, isInline: true, styles: ["@layer components{ax-text-editor-inline-toolbar{display:none}.ax-text-editor-inline-toolbar{position:fixed;display:flex;max-width:calc(100vw - 1rem);padding:.25rem;border-radius:.75rem;border:1px solid rgba(var(--ax-sys-color-border-lightest-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));color:rgba(var(--ax-sys-color-on-surface));box-shadow:0 10px 28px #00000029;transform:translate(-50%,calc(-100% - .4rem));-webkit-user-select:none;user-select:none}.ax-text-editor-inline-toolbar.ax-below{transform:translate(-50%,.4rem)}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools{display:flex;min-width:0;align-items:center;gap:.25rem}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>*{display:flex;flex-shrink:0;align-items:center;gap:.125rem}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>ax-divider{display:block;align-self:stretch;width:1px;min-height:1.25rem;margin-inline:.125rem;background-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>ax-text-editor-font-style>ax-text-editor-command[command=code]{display:flex;align-items:center}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>ax-text-editor-font-style>ax-text-editor-command[command=code]:before{content:\"\";width:1px;height:1.25rem;margin-inline:.125rem;background-color:rgba(var(--ax-sys-color-border-light-surface))}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools ax-button button.ax-state-selected{background-color:var(--ax-comp-bg-lighter, var(--color-surface));color:var(--ax-comp-text-lighter, var(--color-on-surface))}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools ax-text-editor-command svg{width:1rem;height:1rem;display:block}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
771
801
|
}
|
|
772
802
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTextEditorInlineToolbarComponent, decorators: [{
|
|
773
803
|
type: Component,
|
|
774
804
|
args: [{ selector: 'ax-text-editor-inline-toolbar', template: `
|
|
775
|
-
<
|
|
776
|
-
<
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
805
|
+
<ng-template #toolbar>
|
|
806
|
+
<div
|
|
807
|
+
class="ax-text-editor-inline-toolbar"
|
|
808
|
+
[class.ax-below]="below()"
|
|
809
|
+
[style.top.px]="top()"
|
|
810
|
+
[style.left.px]="left()"
|
|
811
|
+
(mousedown)="onMouseDown($event)"
|
|
812
|
+
>
|
|
813
|
+
<div class="ax-text-editor-inline-toolbar-tools">
|
|
814
|
+
<ng-content></ng-content>
|
|
815
|
+
</div>
|
|
816
|
+
</div>
|
|
817
|
+
</ng-template>
|
|
818
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
787
819
|
{ provide: AXComponent, useExisting: AXTextEditorInlineToolbarComponent },
|
|
788
820
|
{ provide: AXTextEditorSlot, useExisting: AXTextEditorInlineToolbarComponent },
|
|
789
|
-
], styles: ["@layer components{ax-text-editor-inline-toolbar{position:fixed;
|
|
790
|
-
}], ctorParameters: () => [] });
|
|
821
|
+
], styles: ["@layer components{ax-text-editor-inline-toolbar{display:none}.ax-text-editor-inline-toolbar{position:fixed;display:flex;max-width:calc(100vw - 1rem);padding:.25rem;border-radius:.75rem;border:1px solid rgba(var(--ax-sys-color-border-lightest-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));color:rgba(var(--ax-sys-color-on-surface));box-shadow:0 10px 28px #00000029;transform:translate(-50%,calc(-100% - .4rem));-webkit-user-select:none;user-select:none}.ax-text-editor-inline-toolbar.ax-below{transform:translate(-50%,.4rem)}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools{display:flex;min-width:0;align-items:center;gap:.25rem}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>*{display:flex;flex-shrink:0;align-items:center;gap:.125rem}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>ax-divider{display:block;align-self:stretch;width:1px;min-height:1.25rem;margin-inline:.125rem;background-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>ax-text-editor-font-style>ax-text-editor-command[command=code]{display:flex;align-items:center}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools>ax-text-editor-font-style>ax-text-editor-command[command=code]:before{content:\"\";width:1px;height:1.25rem;margin-inline:.125rem;background-color:rgba(var(--ax-sys-color-border-light-surface))}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools ax-button button.ax-state-selected{background-color:var(--ax-comp-bg-lighter, var(--color-surface));color:var(--ax-comp-text-lighter, var(--color-on-surface))}.ax-text-editor-inline-toolbar .ax-text-editor-inline-toolbar-tools ax-text-editor-command svg{width:1rem;height:1rem;display:block}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
822
|
+
}], ctorParameters: () => [], propDecorators: { toolbar: [{ type: i0.ViewChild, args: ['toolbar', { isSignal: true }] }] } });
|
|
791
823
|
|
|
792
824
|
class AXTextEditorComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
|
|
793
825
|
static parseLineCount(value) {
|