@memberjunction/ng-composer 6.1.0-edge.1 → 6.1.0-edge.2
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/dist/lib/components/mention/mention-dropdown.component.d.ts +4 -2
- package/dist/lib/components/mention/mention-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-dropdown.component.js +21 -7
- package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.d.ts +73 -1
- package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.js +267 -21
- package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
- package/dist/lib/components/message/message-input-box.component.d.ts +103 -42
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +221 -119
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/events/composer-events.d.ts +40 -0
- package/dist/lib/events/composer-events.d.ts.map +1 -0
- package/dist/lib/events/composer-events.js +40 -0
- package/dist/lib/events/composer-events.js.map +1 -0
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-input-box.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts","../../../../src/lib/components/message/message-input-box.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;;;;;;IC6B1E,iCAQG;IAHD,2LAAS,4BAAqB,wBAAE,wBAAwB,KAAC;IAIzD,wBAAoD;IACtD,iBAAS;;;IARP,sEAAsD;IAItD,AAHA,0CAAqB,iMAG+J;;;;;IAOtL,kCAKG;IAFD,2LAAS,uBA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ACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAEN,MAAM;;kBAMN,MAAM;;kBAEN,MAAM;;kFAnDI,wBAAwB","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { ComposerTriggerProvider, MentionSuggestion } from '../../composer-trigger-provider';\nimport { MentionEditorComponent, PendingAttachment } from '../mention/mention-editor.component';\n\n/**\n * Reusable message input box component (presentational)\n * Now uses MentionEditorComponent for rich @mention functionality with chips\n *\n * Handles:\n * - Text input with keyboard shortcuts via MentionEditorComponent\n * - @mention autocomplete with visual chips (contentEditable)\n * - Send button\n *\n * Does NOT handle:\n * - Saving messages to database\n * - Agent invocation\n * - Artifact creation\n * - Conversation management\n */\n@Component({\n standalone: false,\n selector: 'mj-message-input-box',\n templateUrl: './message-input-box.component.html',\n styleUrls: ['./message-input-box.component.css']\n})\nexport class MessageInputBoxComponent {\n @ViewChild('mentionEditor') mentionEditor?: MentionEditorComponent;\n\n @Input() placeholder: string = 'Type your message to start a new conversation...';\n @Input() disabled: boolean = false;\n @Input() value: string = '';\n @Input() showCharacterCount: boolean = false;\n /** Master switch for all mention/command triggers (pass-through to the mention editor). */\n @Input() enableMentions: boolean = true;\n /** Explicit trigger-provider list (pass-through to the mention editor; explicit list wins over discovery). */\n @Input() TriggerProviders: ComposerTriggerProvider[] | null = null;\n /** Discovery-mode filter: provider Keys to skip (pass-through to the mention editor). */\n @Input() ExcludedTriggerKeys: string[] = [];\n /** Optional metadata provider scoping this composer (pass-through to the mention editor). */\n @Input() Provider: IMetadataProvider | null = null;\n @Input() currentUser?: UserInfo;\n @Input() rows: number = 3;\n\n // Attachment settings\n @Input() enableAttachments: boolean = true;\n @Input() maxAttachments: number = 10;\n @Input() maxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB\n @Input() acceptedFileTypes: string = 'image/*';\n\n /** Shows the in-composer mic button when true. */\n @Input() enableRealtime: boolean = false;\n /** Whether a realtime voice session is currently active (mic renders in its active state). */\n @Input() voiceActive: boolean = false;\n /** Whether a voice session can be started right now (mic disabled when false). */\n @Input() canStartRealtime: boolean = true;\n /** Shows the in-composer Plan Mode toggle button when true. */\n @Input() enablePlanMode: boolean = false;\n /** Current Plan Mode toggle state (renders the button in its active state). */\n @Input() planModeActive: boolean = false;\n\n /** Composer lost focus — hosts persist drafts on this. */\n @Output() blurred = new EventEmitter<void>();\n @Output() textSubmitted = new EventEmitter<string>();\n @Output() valueChange = new EventEmitter<string>();\n @Output() attachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() attachmentError = new EventEmitter<string>();\n @Output() attachmentClicked = new EventEmitter<PendingAttachment>();\n /** Emitted when the user clicks the mic button to start/stop a voice session. */\n @Output() voiceRequested = new EventEmitter<void>();\n /**\n * Emitted when the user clicks the small caret next to the phone button — the host opens the\n * voice agent/model picker so call options (which agent, which voice model) stay reachable\n * without adding friction to the plain phone click's instant-start path.\n */\n @Output() voiceOptionsRequested = new EventEmitter<void>();\n /** Emitted when the user clicks the in-composer Plan Mode toggle button. */\n @Output() planModeToggle = new EventEmitter<void>();\n\n onRealtimeClick(): void {\n this.voiceRequested.emit();\n }\n\n onRealtimeOptionsClick(): void {\n this.voiceOptionsRequested.emit();\n }\n\n get canSend(): boolean {\n const hasText = this.value.trim().length > 0;\n const hasAttachments = this.mentionEditor?.hasAttachments() || false;\n return !this.disabled && (hasText || hasAttachments);\n }\n\n /**\n * Handle value changes from MentionEditorComponent\n */\n onValueChange(newValue: string): void {\n this.value = newValue;\n this.valueChange.emit(this.value);\n }\n\n /**\n * Handle attachment changes from MentionEditorComponent\n */\n onAttachmentsChanged(attachments: PendingAttachment[]): void {\n this.attachmentsChanged.emit(attachments);\n }\n\n /**\n * Handle attachment errors from MentionEditorComponent\n */\n onAttachmentError(error: string): void {\n this.attachmentError.emit(error);\n }\n\n /**\n * Handle attachment click from MentionEditorComponent\n */\n onAttachmentClicked(attachment: PendingAttachment): void {\n this.attachmentClicked.emit(attachment);\n }\n\n /**\n * Handle Enter key from MentionEditorComponent\n * Extracts plain text with JSON-encoded mentions for message submission\n */\n onEnterPressed(_text: string): void {\n this.onSendClick();\n }\n\n /**\n * Handle mention selection from MentionEditorComponent\n */\n onMentionSelected(suggestion: MentionSuggestion): void {\n // MentionEditorComponent already inserts the mention chip\n // This is just for additional tracking/analytics if needed\n }\n\n /**\n * Send the message\n * Extracts plain text with JSON-encoded mentions for proper persistence\n */\n onSendClick(): void {\n if (this.canSend) {\n // Get plain text with JSON-encoded mentions (preserves configuration info)\n const textToSend = this.mentionEditor?.getPlainTextWithJsonMentions() || this.value.trim();\n this.textSubmitted.emit(textToSend);\n this.value = ''; // Clear input after sending\n\n // Clear the editor content\n if (this.mentionEditor) {\n this.mentionEditor.clear();\n }\n\n this.valueChange.emit(this.value);\n }\n }\n\n /**\n * Handle clicks on the container - focus the mention editor\n * Only moves cursor to end if clicking outside the contentEditable area\n */\n onContainerClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Don't handle clicks on the send button\n if (target.closest('.send-button-icon')) {\n return;\n }\n\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (!editor) return;\n\n // If clicking directly on the editor or its children, let the browser handle cursor placement\n if (target === editor || editor.contains(target)) {\n return;\n }\n\n // Only if clicking on the container (empty space), focus and move cursor to end\n editor.focus();\n const selection = window.getSelection();\n const range = document.createRange();\n\n if (selection) {\n range.selectNodeContents(editor);\n range.collapse(false); // Collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /**\n * Public method to focus the input programmatically\n */\n /** Inserts a resolved mention chip + space and focuses (see MentionEditorComponent.InsertMention). */\n InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n return this.mentionEditor?.InsertMention(suggestion, focus) ?? false;\n }\n\n /** Focus with the caret at the end of content (see MentionEditorComponent.FocusCaretAtEnd). */\n FocusCaretAtEnd(): boolean {\n return this.mentionEditor?.FocusCaretAtEnd() ?? false;\n }\n\n focus(): void {\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (editor) {\n editor.focus();\n }\n }\n\n /**\n * Get mention chip data including configuration presets\n */\n getMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n return this.mentionEditor?.getMentionChipsData() || [];\n }\n\n /**\n * Get pending attachments from the editor\n */\n getPendingAttachments(): PendingAttachment[] {\n return this.mentionEditor?.getPendingAttachments() || [];\n }\n\n /**\n * Open file picker programmatically\n */\n openFilePicker(): void {\n this.mentionEditor?.openFilePicker();\n }\n\n /**\n * Add an artifact as a pending attachment (called by parent after artifact selection)\n */\n AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment | undefined {\n return this.mentionEditor?.AddArtifactAttachment(artifact);\n }\n}\n","<div class=\"message-input-box-container\" (click)=\"onContainerClick($event)\">\n <div class=\"input-wrapper\">\n <mj-mention-editor\n #mentionEditor\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [currentUser]=\"currentUser\"\n [enableMentions]=\"enableMentions\"\n [TriggerProviders]=\"TriggerProviders\"\n [ExcludedTriggerKeys]=\"ExcludedTriggerKeys\"\n [Provider]=\"Provider\"\n [enableAttachments]=\"enableAttachments\"\n [maxAttachments]=\"maxAttachments\"\n [maxAttachmentSizeBytes]=\"maxAttachmentSizeBytes\"\n [acceptedFileTypes]=\"acceptedFileTypes\"\n [(ngModel)]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (enterPressed)=\"onEnterPressed($event)\"\n (mentionSelected)=\"onMentionSelected($event)\"\n (attachmentsChanged)=\"onAttachmentsChanged($event)\"\n (attachmentError)=\"onAttachmentError($event)\"\n (attachmentClicked)=\"onAttachmentClicked($event)\"\n (editorBlurred)=\"blurred.emit()\">\n </mj-mention-editor>\n\n <!-- Attach + voice + plan-mode buttons - Positioned over editor -->\n @if (enableAttachments || enableRealtime || enablePlanMode) {\n <div class=\"attach-buttons\">\n @if (enablePlanMode) {\n <button\n class=\"attach-button-icon plan-mode-button-icon\"\n [class.plan-mode-button-icon--active]=\"planModeActive\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"planModeActive\"\n (click)=\"planModeToggle.emit(); $event.stopPropagation()\"\n [title]=\"planModeActive ? 'Plan Mode ON — the agent presents a plan for your approval before it acts' : 'Plan Mode: have the agent present a plan for your approval before it acts'\"\n aria-label=\"Toggle Plan Mode\"\n >\n <i class=\"fa-solid fa-route\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (enableAttachments) {\n <button\n class=\"attach-button-icon\"\n [disabled]=\"disabled\"\n (click)=\"openFilePicker(); $event.stopPropagation()\"\n title=\"Attach file\"\n >\n <i class=\"fa-solid fa-paperclip\"></i>\n </button>\n }\n @if (enableRealtime) {\n <button\n class=\"attach-button-icon voice-button-icon\"\n [class.voice-button-icon--active]=\"voiceActive\"\n [disabled]=\"!canStartRealtime\"\n (click)=\"onRealtimeClick(); $event.stopPropagation()\"\n [title]=\"voiceActive ? 'Voice call active' : 'Start a voice call'\"\n aria-label=\"Start a voice call\"\n >\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </button>\n <!-- Caret beside the phone: opens the agent/model picker so call OPTIONS stay one\n click away while the plain phone click keeps its instant-start behavior. -->\n <button\n class=\"attach-button-icon voice-options-button-icon\"\n [disabled]=\"!canStartRealtime\"\n (click)=\"onRealtimeOptionsClick(); $event.stopPropagation()\"\n title=\"Voice call options (choose agent and voice model)\"\n aria-label=\"Voice call options\"\n >\n <i class=\"fa-solid fa-chevron-down\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Send Button (Icon Only) - Positioned over editor -->\n <button\n class=\"send-button-icon\"\n [disabled]=\"!canSend\"\n (click)=\"onSendClick()\"\n title=\"Send message (Enter)\"\n >\n <i class=\"fa-solid fa-paper-plane\"></i>\n </button>\n </div>\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"message-input-box.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts","../../../../src/lib/components/message/message-input-box.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAIlF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;;;;;;;ICyBnE,kCAUG;IAHD,AADA,+JAAa,uBAAuB,wBAAE,wBAAwB,KAAC,8KACtD,4BAAqB,wBAAE,wBAAwB,KAAC;IAIzD,wBAAkE;IACpE,iBAAS;;;IAVP,iEAAiD;IACjD,0CAAqB;;;;;IAYvB,kCAQG;IAHD,2LAAS,4BAAqB,wBAAE,wBAAwB,KAAC;IAIzD,wBAAoD;IACtD,iBAAS;;;IARP,sEAAsD;IAItD,AAHA,0CAAqB,iMAG+J;;;;;IAOtL,kCAKG;IAFD,2LAAS,uBAAgB,wBAAE,wBAAwB,KAAC;IAGpD,wBAAqC;IACvC,iBAAS;;;IALP,0CAAqB;;;;IAQvB,kCAOG;IAHD,2LAAS,wBAAiB,wBAAE,wBAAwB,KAAC;IAIrD,wBAAoD;IACtD,iBAAS;IAGT,kCAMG;IAHD,2LAAS,+BAAwB,wBAAE,wBAAwB,KAAC;IAI5D,wBAA2D;IAC7D,iBAAS;;;IAlBP,+DAA+C;IAG/C,AAFA,mDAA8B,0EAEoC;IASlE,eAA8B;IAA9B,mDAA8B;;;IAtDlC,8BAA4B;IAC1B,2GAAoB;IAepB,2GAAsB;IAatB,2GAAyB;IAUzB,8FAAsB;IAuBxB,iBAAM;;;IA7DJ,cAcC;IAdD,8CAcC;IACD,cAYC;IAZD,gDAYC;IACD,cASC;IATD,mDASC;IACD,cAsBC;IAtBD,gDAsBC;;ADlFT;;;;;;;;;;;;;;GAcG;AAOH,MAAM,OAAO,wBAAwB;IACP,aAAa,CAA0B;IAE1D,WAAW,GAAW,kDAAkD,CAAC;IACzE,QAAQ,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kBAK/B,SAAS;mBAAC,eAAe;;kBAEzB,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAQL,KAAK;;kBAmBL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAEN,MAAM;;kBAMN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAMN,MAAM;;kFA1FI,wBAAwB","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { ComposerTriggerProvider, MentionSuggestion } from '../../composer-trigger-provider';\nimport { MentionEditorComponent, PendingAttachment } from '../mention/mention-editor.component';\nimport { BeforeSkillsOpenedEventArgs } from '../../events/composer-events';\n\n/**\n * Reusable message input box component (presentational)\n * Now uses MentionEditorComponent for rich @mention functionality with chips\n *\n * Handles:\n * - Text input with keyboard shortcuts via MentionEditorComponent\n * - @mention autocomplete with visual chips (contentEditable)\n * - Send button\n *\n * Does NOT handle:\n * - Saving messages to database\n * - Agent invocation\n * - Artifact creation\n * - Conversation management\n */\n@Component({\n standalone: false,\n selector: 'mj-message-input-box',\n templateUrl: './message-input-box.component.html',\n styleUrls: ['./message-input-box.component.css']\n})\nexport class MessageInputBoxComponent {\n @ViewChild('mentionEditor') mentionEditor?: MentionEditorComponent;\n\n @Input() Placeholder: string = 'Type your message to start a new conversation...';\n @Input() Disabled: boolean = false;\n @Input() Value: string = '';\n @Input() ShowCharacterCount: boolean = false;\n /** Master switch for all mention/command triggers (pass-through to the mention editor). */\n @Input() EnableMentions: boolean = true;\n /** Explicit trigger-provider list (pass-through to the mention editor; explicit list wins over discovery). */\n @Input() TriggerProviders: ComposerTriggerProvider[] | null = null;\n /** Discovery-mode filter: provider Keys to skip (pass-through to the mention editor). */\n @Input() ExcludedTriggerKeys: string[] = [];\n /** Optional metadata provider scoping this composer (pass-through to the mention editor). */\n @Input() Provider: IMetadataProvider | null = null;\n @Input() CurrentUser?: UserInfo;\n @Input() Rows: number = 3;\n\n // Attachment settings\n @Input() EnableAttachments: boolean = true;\n @Input() MaxAttachments: number = 10;\n @Input() MaxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB\n @Input() AcceptedFileTypes: string = 'image/*';\n\n /** Shows the in-composer mic button when true. */\n @Input() EnableRealtime: boolean = false;\n /** Whether a realtime voice session is currently active (mic renders in its active state). */\n @Input() VoiceActive: boolean = false;\n /** Whether a voice session can be started right now (mic Disabled when false). */\n @Input() CanStartRealtime: boolean = true;\n /** Shows the in-composer Plan Mode toggle button when true. */\n @Input() EnablePlanMode: boolean = false;\n /** Current Plan Mode toggle state (renders the button in its active state). */\n @Input() PlanModeActive: boolean = false;\n /**\n * Shows the in-composer Skills button when true.\n *\n * Gated separately from `EnableMentions` because a host can have the `/` trigger active and\n * still not want the button — but the common case is that a composer offering skill commands\n * should advertise them, since `/` is otherwise invisible.\n */\n @Input() EnableSkills: boolean = false;\n /**\n * True while the skill dropdown is open, driving the button's expanded state.\n *\n * Note the ARIA differs from Plan Mode next to it, deliberately: Plan Mode is a toggle BUTTON\n * (a mode that stays on), so `aria-pressed` is right there. This one opens a popup, so it is\n * `aria-expanded` + `aria-haspopup`. Using `aria-pressed` here would have a screen reader\n * announce \"pressed\" for something that actually just revealed a list.\n *\n * DERIVED, not an @Input, and this is the difference from Plan Mode. Plan Mode's active state is\n * a persisted user preference the host owns and threads down. \"Is the skill dropdown open\" is\n * intrinsic to this composer, so an @Input would be an API the host cannot meaningfully answer\n * and would leave the button permanently unpressed if nobody bound it.\n */\n get SkillsActive(): boolean {\n return this.mentionEditor?.IsTriggerOpen('/') ?? false;\n }\n\n /** Composer lost focus — hosts persist drafts on this. */\n @Output() Blurred = new EventEmitter<void>();\n @Output() TextSubmitted = new EventEmitter<string>();\n @Output() ValueChange = new EventEmitter<string>();\n @Output() AttachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() AttachmentError = new EventEmitter<string>();\n @Output() AttachmentClicked = new EventEmitter<PendingAttachment>();\n /** Emitted when the user clicks the mic button to start/stop a voice session. */\n @Output() VoiceRequested = new EventEmitter<void>();\n /**\n * Emitted when the user clicks the small caret next to the phone button — the host opens the\n * voice agent/model picker so call options (which agent, which voice model) stay reachable\n * without adding friction to the plain phone click's instant-start path.\n */\n @Output() VoiceOptionsRequested = new EventEmitter<void>();\n /** Emitted when the user clicks the in-composer Plan Mode toggle button. */\n @Output() PlanModeToggle = new EventEmitter<void>();\n /**\n * Fired BEFORE the Skills button opens the dropdown. Flip `Cancel` to veto — a host gating\n * skills by entitlement, or surfacing them elsewhere, blocks it here.\n *\n * A pair rather than a lone emitter because this is an ACTION a host might reasonably refuse\n * (UI_LAYERING_GUIDE section 6, rule 1). Handlers must be synchronous; `Cancel` travels back\n * through EventEmitter's synchronous dispatch.\n */\n @Output() BeforeSkillsOpened = new EventEmitter<BeforeSkillsOpenedEventArgs>();\n /**\n * Fired AFTER the dropdown actually opened. Not emitted on the canceled path, and not emitted\n * when no active provider owns the trigger — so a host counting this counts dropdowns the user\n * saw, rather than clicks.\n */\n @Output() AfterSkillsOpened = new EventEmitter<void>();\n\n /**\n * Open the skill-command dropdown, the same one `/` opens.\n *\n * Routed through the editor's OpenTrigger rather than a parallel menu so permission filtering,\n * per-skill icons and chip insertion all stay in one implementation.\n */\n /**\n * NOTE: the template pairs this with\n * `(mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"`, and BOTH halves are\n * load-bearing.\n *\n * `preventDefault` — a <button> takes focus on mousedown, which blurs the editor, and the editor\n * closes its dropdown 200ms after losing focus. Without it the menu opened and then shut itself.\n *\n * `stopPropagation` — the editor's click-away listener is on `document:mousedown` and exempts only\n * presses inside the EDITOR's host. This button is a sibling of `<mj-mention-editor>`, so a press\n * on it read as an outside press: mousedown closed the dropdown, then click saw `SkillsActive`\n * already false and reopened it. The menu blinked, could not be dismissed by the button that\n * opened it, and the Before/After pair fired on every click — the exact over-counting the toggle\n * branch below exists to prevent. Stopping propagation states that this press belongs to the\n * dropdown machinery.\n */\n OnSkillsClick(event?: Event): void {\n // Toggle closed first. A disclosure button has to be able to close what it opened, and without\n // this a second click re-ran the open path: it re-emitted the Before/After pair (so a host\n // counting opens over-counted) and re-captured the trigger's baseline at the new caret, which\n // corrupts the query offset once anything has been typed.\n if (this.SkillsActive) {\n this.mentionEditor?.closeMentionDropdown();\n return;\n }\n const args = new BeforeSkillsOpenedEventArgs();\n this.BeforeSkillsOpened.emit(args);\n if (args.Cancel) {\n return;\n }\n const anchor = (event?.currentTarget as HTMLElement | undefined) ?? null;\n if (this.mentionEditor?.OpenTrigger('/', anchor)) {\n this.AfterSkillsOpened.emit();\n }\n }\n\n OnRealtimeClick(): void {\n this.VoiceRequested.emit();\n }\n\n OnRealtimeOptionsClick(): void {\n this.VoiceOptionsRequested.emit();\n }\n\n get CanSend(): boolean {\n const hasText = this.Value.trim().length > 0;\n const hasAttachments = this.mentionEditor?.hasAttachments() || false;\n return !this.Disabled && (hasText || hasAttachments);\n }\n\n /**\n * Handle Value changes from MentionEditorComponent\n */\n OnValueChange(newValue: string): void {\n this.Value = newValue;\n this.ValueChange.emit(this.Value);\n }\n\n /**\n * Handle attachment changes from MentionEditorComponent\n */\n OnAttachmentsChanged(attachments: PendingAttachment[]): void {\n this.AttachmentsChanged.emit(attachments);\n }\n\n /**\n * Handle attachment errors from MentionEditorComponent\n */\n OnAttachmentError(error: string): void {\n this.AttachmentError.emit(error);\n }\n\n /**\n * Handle attachment click from MentionEditorComponent\n */\n OnAttachmentClicked(attachment: PendingAttachment): void {\n this.AttachmentClicked.emit(attachment);\n }\n\n /**\n * Handle Enter key from MentionEditorComponent\n * Extracts plain text with JSON-encoded mentions for message submission\n */\n OnEnterPressed(_text: string): void {\n this.OnSendClick();\n }\n\n /**\n * Handle mention selection from MentionEditorComponent\n */\n OnMentionSelected(suggestion: MentionSuggestion): void {\n // MentionEditorComponent already inserts the mention chip\n // This is just for additional tracking/analytics if needed\n }\n\n /**\n * Send the message\n * Extracts plain text with JSON-encoded mentions for proper persistence\n */\n OnSendClick(): void {\n if (this.CanSend) {\n // Get plain text with JSON-encoded mentions (preserves configuration info)\n const textToSend = this.mentionEditor?.getPlainTextWithJsonMentions() || this.Value.trim();\n this.TextSubmitted.emit(textToSend);\n this.Value = ''; // Clear input after sending\n\n // Clear the editor content\n if (this.mentionEditor) {\n this.mentionEditor.clear();\n }\n\n this.ValueChange.emit(this.Value);\n }\n }\n\n /**\n * Handle clicks on the container - focus the mention editor\n * Only moves cursor to end if clicking outside the contentEditable area\n */\n OnContainerClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Don't handle clicks on the send button\n if (target.closest('.send-button-icon')) {\n return;\n }\n\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (!editor) return;\n\n // If clicking directly on the editor or its children, let the browser handle cursor placement\n if (target === editor || editor.contains(target)) {\n return;\n }\n\n // Only if clicking on the container (empty space), focus and move cursor to end\n editor.focus();\n const selection = window.getSelection();\n const range = document.createRange();\n\n if (selection) {\n range.selectNodeContents(editor);\n range.collapse(false); // Collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /**\n * Public method to focus the input programmatically\n */\n /** Inserts a resolved mention chip + space and focuses (see MentionEditorComponent.InsertMention). */\n InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n return this.mentionEditor?.InsertMention(suggestion, focus) ?? false;\n }\n\n /** Focus with the caret at the end of content (see MentionEditorComponent.FocusCaretAtEnd). */\n FocusCaretAtEnd(): boolean {\n return this.mentionEditor?.FocusCaretAtEnd() ?? false;\n }\n\n focus(): void {\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (editor) {\n editor.focus();\n }\n }\n\n /**\n * Get mention chip data including configuration presets\n */\n GetMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n return this.mentionEditor?.getMentionChipsData() || [];\n }\n\n /**\n * Get pending attachments from the editor\n */\n GetPendingAttachments(): PendingAttachment[] {\n return this.mentionEditor?.getPendingAttachments() || [];\n }\n\n /**\n * Open file picker programmatically\n */\n OpenFilePicker(): void {\n this.mentionEditor?.openFilePicker();\n }\n\n /**\n * Add an artifact as a pending attachment (called by parent after artifact selection)\n */\n AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment | undefined {\n return this.mentionEditor?.AddArtifactAttachment(artifact);\n }\n}\n","<div class=\"message-input-box-container\" (click)=\"OnContainerClick($event)\">\n <div class=\"input-wrapper\">\n <mj-mention-editor\n #mentionEditor\n [placeholder]=\"Placeholder\"\n [disabled]=\"Disabled\"\n [currentUser]=\"CurrentUser\"\n [enableMentions]=\"EnableMentions\"\n [TriggerProviders]=\"TriggerProviders\"\n [ExcludedTriggerKeys]=\"ExcludedTriggerKeys\"\n [Provider]=\"Provider\"\n [enableAttachments]=\"EnableAttachments\"\n [maxAttachments]=\"MaxAttachments\"\n [maxAttachmentSizeBytes]=\"MaxAttachmentSizeBytes\"\n [acceptedFileTypes]=\"AcceptedFileTypes\"\n [(ngModel)]=\"Value\"\n (valueChange)=\"OnValueChange($event)\"\n (enterPressed)=\"OnEnterPressed($event)\"\n (mentionSelected)=\"OnMentionSelected($event)\"\n (attachmentsChanged)=\"OnAttachmentsChanged($event)\"\n (attachmentError)=\"OnAttachmentError($event)\"\n (attachmentClicked)=\"OnAttachmentClicked($event)\"\n (editorBlurred)=\"Blurred.emit()\">\n </mj-mention-editor>\n\n <!-- Attach + voice + plan-mode buttons - Positioned over editor -->\n @if (EnableAttachments || EnableRealtime || EnablePlanMode || EnableSkills) {\n <div class=\"attach-buttons\">\n @if (EnableSkills) {\n <button\n class=\"attach-button-icon skills-button-icon\"\n [class.skills-button-icon--active]=\"SkillsActive\"\n [disabled]=\"Disabled\"\n [attr.aria-expanded]=\"SkillsActive\"\n aria-haspopup=\"true\"\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"\n (click)=\"OnSkillsClick($event); $event.stopPropagation()\"\n title=\"Skills, or type / in the message box\"\n aria-label=\"Show skills\"\n >\n <i class=\"fa-solid fa-wand-magic-sparkles\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (EnablePlanMode) {\n <button\n class=\"attach-button-icon plan-mode-button-icon\"\n [class.plan-mode-button-icon--active]=\"PlanModeActive\"\n [disabled]=\"Disabled\"\n [attr.aria-pressed]=\"PlanModeActive\"\n (click)=\"PlanModeToggle.emit(); $event.stopPropagation()\"\n [title]=\"PlanModeActive ? 'Plan Mode ON — the agent presents a plan for your approval before it acts' : 'Plan Mode: have the agent present a plan for your approval before it acts'\"\n aria-label=\"Toggle Plan Mode\"\n >\n <i class=\"fa-solid fa-route\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (EnableAttachments) {\n <button\n class=\"attach-button-icon\"\n [disabled]=\"Disabled\"\n (click)=\"OpenFilePicker(); $event.stopPropagation()\"\n title=\"Attach file\"\n >\n <i class=\"fa-solid fa-paperclip\"></i>\n </button>\n }\n @if (EnableRealtime) {\n <button\n class=\"attach-button-icon voice-button-icon\"\n [class.voice-button-icon--active]=\"VoiceActive\"\n [disabled]=\"!CanStartRealtime\"\n (click)=\"OnRealtimeClick(); $event.stopPropagation()\"\n [title]=\"VoiceActive ? 'Voice call active' : 'Start a voice call'\"\n aria-label=\"Start a voice call\"\n >\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </button>\n <!-- Caret beside the phone: opens the agent/model picker so call OPTIONS stay one\n click away while the plain phone click keeps its instant-start behavior. -->\n <button\n class=\"attach-button-icon voice-options-button-icon\"\n [disabled]=\"!CanStartRealtime\"\n (click)=\"OnRealtimeOptionsClick(); $event.stopPropagation()\"\n title=\"Voice call options (choose agent and voice model)\"\n aria-label=\"Voice call options\"\n >\n <i class=\"fa-solid fa-chevron-down\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Send Button (Icon Only) - Positioned over editor -->\n <button\n class=\"send-button-icon\"\n [disabled]=\"!CanSend\"\n (click)=\"OnSendClick()\"\n title=\"Send message (Enter)\"\n >\n <i class=\"fa-solid fa-paper-plane\"></i>\n </button>\n </div>\n</div>\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Before/After cancelable event argument classes for the composer.
|
|
3
|
+
*
|
|
4
|
+
* Contract (see `guides/UI_LAYERING_GUIDE.md` section 6): an action a host might veto ships as a
|
|
5
|
+
* `Before*` / `After*` pair. The `Before*` event carries args extending
|
|
6
|
+
* {@link CancellableComposerEventArgs}; a listener flips `Cancel = true`, the component checks
|
|
7
|
+
* `if (args.Cancel) return;` and does NOT emit the matching `After*`. Hosts rely on that, so it is
|
|
8
|
+
* a contract rather than a convention.
|
|
9
|
+
*
|
|
10
|
+
* The base is PER-DOMAIN by design, not shared. The same guide's naming table specifies
|
|
11
|
+
* `Cancellable<Domain>EventArgs` for exactly this class, which is why `ng-base-forms`,
|
|
12
|
+
* `ng-conversations`, `ng-trees`, `ng-entity-viewer` and a dozen others each declare their own
|
|
13
|
+
* rather than inheriting one. A shared base would also be the wrong dependency edge here:
|
|
14
|
+
* `ng-composer` is the generic layer and cannot import from `ng-conversations`.
|
|
15
|
+
*
|
|
16
|
+
* Note for listeners: `Before*` handlers must be SYNCHRONOUS. Angular's `EventEmitter` dispatches
|
|
17
|
+
* synchronously, which is the entire mechanism by which `Cancel` travels back to the component. An
|
|
18
|
+
* `await` inside a handler returns control before the flag is set, and the veto is silently lost.
|
|
19
|
+
*
|
|
20
|
+
* @module @memberjunction/ng-composer
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Base for the composer's cancelable events. Listeners flip `Cancel = true` to halt the default
|
|
24
|
+
* behavior; the matching `After*` event will not fire. `CancelReason` is free-form, for telemetry
|
|
25
|
+
* or for a host that wants to explain itself in the UI.
|
|
26
|
+
*/
|
|
27
|
+
export declare class CancellableComposerEventArgs {
|
|
28
|
+
Cancel: boolean;
|
|
29
|
+
CancelReason?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fired BEFORE the composer opens the skill-command dropdown from its Skills button.
|
|
33
|
+
*
|
|
34
|
+
* Cancel to block it, for example a host that gates skills by entitlement and would rather show its
|
|
35
|
+
* own explanation than an empty list, or one that surfaces skills elsewhere entirely. Canceling
|
|
36
|
+
* suppresses the trigger; the composer does not open, and `AfterSkillsOpened` is not emitted.
|
|
37
|
+
*/
|
|
38
|
+
export declare class BeforeSkillsOpenedEventArgs extends CancellableComposerEventArgs {
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=composer-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-events.d.ts","sourceRoot":"","sources":["../../../src/lib/events/composer-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,qBAAa,4BAA4B;IAC9B,MAAM,EAAE,OAAO,CAAS;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,4BAA4B;CAAG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Before/After cancelable event argument classes for the composer.
|
|
3
|
+
*
|
|
4
|
+
* Contract (see `guides/UI_LAYERING_GUIDE.md` section 6): an action a host might veto ships as a
|
|
5
|
+
* `Before*` / `After*` pair. The `Before*` event carries args extending
|
|
6
|
+
* {@link CancellableComposerEventArgs}; a listener flips `Cancel = true`, the component checks
|
|
7
|
+
* `if (args.Cancel) return;` and does NOT emit the matching `After*`. Hosts rely on that, so it is
|
|
8
|
+
* a contract rather than a convention.
|
|
9
|
+
*
|
|
10
|
+
* The base is PER-DOMAIN by design, not shared. The same guide's naming table specifies
|
|
11
|
+
* `Cancellable<Domain>EventArgs` for exactly this class, which is why `ng-base-forms`,
|
|
12
|
+
* `ng-conversations`, `ng-trees`, `ng-entity-viewer` and a dozen others each declare their own
|
|
13
|
+
* rather than inheriting one. A shared base would also be the wrong dependency edge here:
|
|
14
|
+
* `ng-composer` is the generic layer and cannot import from `ng-conversations`.
|
|
15
|
+
*
|
|
16
|
+
* Note for listeners: `Before*` handlers must be SYNCHRONOUS. Angular's `EventEmitter` dispatches
|
|
17
|
+
* synchronously, which is the entire mechanism by which `Cancel` travels back to the component. An
|
|
18
|
+
* `await` inside a handler returns control before the flag is set, and the veto is silently lost.
|
|
19
|
+
*
|
|
20
|
+
* @module @memberjunction/ng-composer
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Base for the composer's cancelable events. Listeners flip `Cancel = true` to halt the default
|
|
24
|
+
* behavior; the matching `After*` event will not fire. `CancelReason` is free-form, for telemetry
|
|
25
|
+
* or for a host that wants to explain itself in the UI.
|
|
26
|
+
*/
|
|
27
|
+
export class CancellableComposerEventArgs {
|
|
28
|
+
Cancel = false;
|
|
29
|
+
CancelReason;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fired BEFORE the composer opens the skill-command dropdown from its Skills button.
|
|
33
|
+
*
|
|
34
|
+
* Cancel to block it, for example a host that gates skills by entitlement and would rather show its
|
|
35
|
+
* own explanation than an empty list, or one that surfaces skills elsewhere entirely. Canceling
|
|
36
|
+
* suppresses the trigger; the composer does not open, and `AfterSkillsOpened` is not emitted.
|
|
37
|
+
*/
|
|
38
|
+
export class BeforeSkillsOpenedEventArgs extends CancellableComposerEventArgs {
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=composer-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-events.js","sourceRoot":"","sources":["../../../src/lib/events/composer-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IAC9B,MAAM,GAAY,KAAK,CAAC;IACxB,YAAY,CAAU;CAChC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,2BAA4B,SAAQ,4BAA4B;CAAG","sourcesContent":["/**\n * @fileoverview Before/After cancelable event argument classes for the composer.\n *\n * Contract (see `guides/UI_LAYERING_GUIDE.md` section 6): an action a host might veto ships as a\n * `Before*` / `After*` pair. The `Before*` event carries args extending\n * {@link CancellableComposerEventArgs}; a listener flips `Cancel = true`, the component checks\n * `if (args.Cancel) return;` and does NOT emit the matching `After*`. Hosts rely on that, so it is\n * a contract rather than a convention.\n *\n * The base is PER-DOMAIN by design, not shared. The same guide's naming table specifies\n * `Cancellable<Domain>EventArgs` for exactly this class, which is why `ng-base-forms`,\n * `ng-conversations`, `ng-trees`, `ng-entity-viewer` and a dozen others each declare their own\n * rather than inheriting one. A shared base would also be the wrong dependency edge here:\n * `ng-composer` is the generic layer and cannot import from `ng-conversations`.\n *\n * Note for listeners: `Before*` handlers must be SYNCHRONOUS. Angular's `EventEmitter` dispatches\n * synchronously, which is the entire mechanism by which `Cancel` travels back to the component. An\n * `await` inside a handler returns control before the flag is set, and the veto is silently lost.\n *\n * @module @memberjunction/ng-composer\n */\n\n/**\n * Base for the composer's cancelable events. Listeners flip `Cancel = true` to halt the default\n * behavior; the matching `After*` event will not fire. `CancelReason` is free-form, for telemetry\n * or for a host that wants to explain itself in the UI.\n */\nexport class CancellableComposerEventArgs {\n public Cancel: boolean = false;\n public CancelReason?: string;\n}\n\n/**\n * Fired BEFORE the composer opens the skill-command dropdown from its Skills button.\n *\n * Cancel to block it, for example a host that gates skills by entitlement and would rather show its\n * own explanation than an empty list, or one that surfaces skills elsewhere entirely. Canceling\n * suppresses the trigger; the composer does not open, and `AfterSkillsOpened` is not emitted.\n */\nexport class BeforeSkillsOpenedEventArgs extends CancellableComposerEventArgs {}\n"]}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export * from './lib/components/mention/mention-editor.component';
|
|
|
3
3
|
export * from './lib/components/mention/mention-dropdown.component';
|
|
4
4
|
export * from './lib/components/message/message-input-box.component';
|
|
5
5
|
export * from './lib/composer-trigger-provider';
|
|
6
|
+
export * from './lib/events/composer-events';
|
|
6
7
|
//# sourceMappingURL=public-api.d.ts.map
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,uBAAuB,CAAC;AAGtC,cAAc,mDAAmD,CAAC;AAClE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AAIrE,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,uBAAuB,CAAC;AAGtC,cAAc,mDAAmD,CAAC;AAClE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AAIrE,cAAc,iCAAiC,CAAC;AAEhD,cAAc,8BAA8B,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -10,6 +10,8 @@ export * from './lib/components/message/message-input-box.component';
|
|
|
10
10
|
// Pluggable trigger-provider contract (+ MentionSuggestion / MentionSuggestionPreset /
|
|
11
11
|
// ComposerSuggestionRequest / DiscoverComposerTriggerProviders)
|
|
12
12
|
export * from './lib/composer-trigger-provider';
|
|
13
|
+
// Before/After cancelable event args (CancellableComposerEventArgs / BeforeSkillsOpenedEventArgs)
|
|
14
|
+
export * from './lib/events/composer-events';
|
|
13
15
|
// NOTE: MentionAutocompleteService (the AI-aware suggestion engine) moved to
|
|
14
16
|
// @memberjunction/ng-conversations — import it from there directly.
|
|
15
17
|
//# sourceMappingURL=public-api.js.map
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,uBAAuB,CAAC;AAEtC,+DAA+D;AAC/D,cAAc,mDAAmD,CAAC;AAClE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AAErE,uFAAuF;AACvF,gEAAgE;AAChE,cAAc,iCAAiC,CAAC;AAChD,6EAA6E;AAC7E,oEAAoE","sourcesContent":["/*\n * Public API Surface of @memberjunction/ng-composer\n */\n\n// Module\nexport * from './lib/composer.module';\n\n// Components (+ their exported types: PendingAttachment, etc.)\nexport * from './lib/components/mention/mention-editor.component';\nexport * from './lib/components/mention/mention-dropdown.component';\nexport * from './lib/components/message/message-input-box.component';\n\n// Pluggable trigger-provider contract (+ MentionSuggestion / MentionSuggestionPreset /\n// ComposerSuggestionRequest / DiscoverComposerTriggerProviders)\nexport * from './lib/composer-trigger-provider';\n// NOTE: MentionAutocompleteService (the AI-aware suggestion engine) moved to\n// @memberjunction/ng-conversations — import it from there directly.\n"]}
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,uBAAuB,CAAC;AAEtC,+DAA+D;AAC/D,cAAc,mDAAmD,CAAC;AAClE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AAErE,uFAAuF;AACvF,gEAAgE;AAChE,cAAc,iCAAiC,CAAC;AAChD,kGAAkG;AAClG,cAAc,8BAA8B,CAAC;AAC7C,6EAA6E;AAC7E,oEAAoE","sourcesContent":["/*\n * Public API Surface of @memberjunction/ng-composer\n */\n\n// Module\nexport * from './lib/composer.module';\n\n// Components (+ their exported types: PendingAttachment, etc.)\nexport * from './lib/components/mention/mention-editor.component';\nexport * from './lib/components/mention/mention-dropdown.component';\nexport * from './lib/components/message/message-input-box.component';\n\n// Pluggable trigger-provider contract (+ MentionSuggestion / MentionSuggestionPreset /\n// ComposerSuggestionRequest / DiscoverComposerTriggerProviders)\nexport * from './lib/composer-trigger-provider';\n// Before/After cancelable event args (CancellableComposerEventArgs / BeforeSkillsOpenedEventArgs)\nexport * from './lib/events/composer-events';\n// NOTE: MentionAutocompleteService (the AI-aware suggestion engine) moved to\n// @memberjunction/ng-conversations — import it from there directly.\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-composer",
|
|
3
|
-
"version": "6.1.0-edge.
|
|
3
|
+
"version": "6.1.0-edge.2",
|
|
4
4
|
"description": "MemberJunction: Generic message composer components — mention editor with pluggable trigger providers (ComposerTriggerProvider), mention dropdown, and send-button input box wrapper. Ships zero AI knowledge; trigger plugins are supplied by hosts (see @memberjunction/ng-conversations).",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@angular/compiler": "21.1.3",
|
|
15
15
|
"@angular/compiler-cli": "21.1.3",
|
|
16
|
-
"@memberjunction/ng-test-utils": "6.1.0-edge.
|
|
16
|
+
"@memberjunction/ng-test-utils": "6.1.0-edge.2",
|
|
17
17
|
"vitest": "^4.0.18"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"@angular/forms": "^21.1.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@memberjunction/core": "6.1.0-edge.
|
|
26
|
-
"@memberjunction/global": "6.1.0-edge.
|
|
27
|
-
"@memberjunction/ng-ui-components": "6.1.0-edge.
|
|
25
|
+
"@memberjunction/core": "6.1.0-edge.2",
|
|
26
|
+
"@memberjunction/global": "6.1.0-edge.2",
|
|
27
|
+
"@memberjunction/ng-ui-components": "6.1.0-edge.2",
|
|
28
28
|
"tslib": "^2.8.1"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|