@brainfish-ai/editor 0.16.3 → 0.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{index-DysiDhtD.js → index-B95nLLma.js} +2 -2
  2. package/dist/{index-D3qfXl4a.js → index-BMZMkble.js} +4 -4
  3. package/dist/{index-DC8dl4wM.js → index-BOu382Ca.js} +3 -3
  4. package/dist/{index-BrHQTa5O.js → index-BPOh7gLI.js} +2 -2
  5. package/dist/{index-CgxTSc3A.js → index-BPUuE877.js} +2 -2
  6. package/dist/{index-CZ_tRMOP.js → index-BSHO896a.js} +3 -3
  7. package/dist/{index-Byx5Rin8.js → index-BdQHIgL9.js} +2 -2
  8. package/dist/{index-BgpucQu9.js → index-BijrthrB.js} +3 -3
  9. package/dist/{index-CSYZYQcP.js → index-BkWCmS7C.js} +2 -2
  10. package/dist/{index-wnkG3YUJ.js → index-Bsd4ABeE.js} +4 -4
  11. package/dist/{index-wcyxRMSc.js → index-Bx9kPv2X.js} +2 -2
  12. package/dist/{index-xzCgWTs0.js → index-C0FriEF6.js} +2 -2
  13. package/dist/{index-ioAG3mIK.js → index-CL74M0IX.js} +3 -3
  14. package/dist/{index-FrO1JgY0.js → index-Ckz8fb1v.js} +4 -4
  15. package/dist/{index-DHS4fqlV.js → index-Cx6qw-AO.js} +2 -2
  16. package/dist/{index-QwNEKxue.js → index-DS89xquM.js} +2 -2
  17. package/dist/{index-hvx6Ru78.js → index-Dr6hZgyB.js} +2 -2
  18. package/dist/{index-B7G61KeU.js → index-DttUK7l_.js} +1 -1
  19. package/dist/{index-nC_e7r57.js → index-DyjkpfqJ.js} +2 -2
  20. package/dist/{index-CHiJxeZP.js → index-Ew91ML7b.js} +2 -2
  21. package/dist/{index-f6Jh9zCn.js → index-PALwbLkY.js} +114 -44
  22. package/dist/{index-D_WC_iU-.js → index-VHSqM6do.js} +2 -2
  23. package/dist/{index-DgawIQVL.js → index-siaDMBtt.js} +3 -3
  24. package/dist/{index-BCU5wvMA.js → index-tFUgwE77.js} +2 -2
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.js +1 -1
  27. package/dist/plugins/emoji/suggest.d.ts +3 -0
  28. package/dist/plugins/mentions/core/types.d.ts +6 -2
  29. package/dist/plugins/mentions/index.d.ts +1 -0
  30. package/dist/plugins/mentions/ui/node-view.d.ts +6 -0
  31. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- import { L as LRParser } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside } from './index-PALwbLkY.js';
3
3
 
4
4
  const jsonHighlighting = styleTags({
5
5
  String: tags.string,
@@ -1,7 +1,7 @@
1
- import { L as LRLanguage, A as LanguageSupport, S as parseMixed, E as styleTags, F as tags } from './index-f6Jh9zCn.js';
2
- import { html } from './index-wnkG3YUJ.js';
3
- import { javascriptLanguage } from './index-xzCgWTs0.js';
4
- import { L as LRParser, a as LocalTokenGroup } from './index-B7G61KeU.js';
1
+ import { L as LRLanguage, A as LanguageSupport, S as parseMixed, E as styleTags, F as tags } from './index-PALwbLkY.js';
2
+ import { html } from './index-Bsd4ABeE.js';
3
+ import { javascriptLanguage } from './index-C0FriEF6.js';
4
+ import { L as LRParser, a as LocalTokenGroup } from './index-DttUK7l_.js';
5
5
 
6
6
  // This file was generated by lezer-generator. You probably shouldn't edit it.
7
7
  const parser = /*@__PURE__*/LRParser.deserialize({
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, S as parseMixed, L as LRLanguage, B as indentNodeProp, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-f6Jh9zCn.js';
3
- import { html } from './index-wnkG3YUJ.js';
1
+ import { L as LRParser, E as ExternalTokenizer } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, S as parseMixed, L as LRLanguage, B as indentNodeProp, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-PALwbLkY.js';
3
+ import { html } from './index-Bsd4ABeE.js';
4
4
 
5
5
  // This file was generated by lezer-generator. You probably shouldn't edit it.
6
6
  const castOpen = 1,
@@ -1,5 +1,5 @@
1
- import { A as LanguageSupport, L as LRLanguage, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp, M as foldInside, E as styleTags, F as tags } from './index-f6Jh9zCn.js';
2
- import { L as LRParser } from './index-B7G61KeU.js';
1
+ import { A as LanguageSupport, L as LRLanguage, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp, M as foldInside, E as styleTags, F as tags } from './index-PALwbLkY.js';
2
+ import { L as LRParser } from './index-DttUK7l_.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const spec_Keyword = {__proto__:null,anyref:34, dataref:34, eqref:34, externref:34, i31ref:34, funcref:34, i8:34, i16:34, i32:34, i64:34, f32:34, f64:34};
@@ -1,5 +1,5 @@
1
- import { T as Parser, U as NodeType, V as NodeProp, W as Tag, X as NodeSet, E as styleTags, Y as Tree, S as parseMixed, F as tags, I as syntaxTree, R as EditorSelection, Z as countColumn, A as LanguageSupport, _ as Prec, $ as keymap, Q as EditorView, a0 as Language, a1 as indentUnit, a2 as foldService, a3 as defineLanguageFacet, a4 as CompletionContext, a5 as EditorState, D as foldNodeProp, B as indentNodeProp, a6 as languageDataProp, a7 as LanguageDescription, a8 as ParseContext } from './index-f6Jh9zCn.js';
2
- import { html, htmlCompletionSource } from './index-wnkG3YUJ.js';
1
+ import { T as Parser, U as NodeType, V as NodeProp, W as Tag, X as NodeSet, E as styleTags, Y as Tree, S as parseMixed, F as tags, I as syntaxTree, R as EditorSelection, Z as countColumn, A as LanguageSupport, _ as Prec, $ as keymap, Q as EditorView, a0 as Language, a1 as indentUnit, a2 as foldService, a3 as defineLanguageFacet, a4 as CompletionContext, a5 as EditorState, D as foldNodeProp, B as indentNodeProp, a6 as languageDataProp, a7 as LanguageDescription, a8 as ParseContext } from './index-PALwbLkY.js';
2
+ import { html, htmlCompletionSource } from './index-Bsd4ABeE.js';
3
3
 
4
4
  class CompositeBlock {
5
5
  static create(type, value, from, parentHash, end) {
@@ -1,6 +1,6 @@
1
- import { Q as EditorView, R as EditorSelection, A as LanguageSupport, S as parseMixed, I as syntaxTree, L as LRLanguage, E as styleTags, F as tags, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp } from './index-f6Jh9zCn.js';
2
- import { html } from './index-wnkG3YUJ.js';
3
- import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.js';
1
+ import { Q as EditorView, R as EditorSelection, A as LanguageSupport, S as parseMixed, I as syntaxTree, L as LRLanguage, E as styleTags, F as tags, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp } from './index-PALwbLkY.js';
2
+ import { html } from './index-Bsd4ABeE.js';
3
+ import { L as LRParser, E as ExternalTokenizer } from './index-DttUK7l_.js';
4
4
 
5
5
  // This file was generated by lezer-generator. You probably shouldn't edit it.
6
6
  const interpolationStart = 1,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const RawString = 1,
@@ -1,6 +1,6 @@
1
- import { Q as EditorView, R as EditorSelection, A as LanguageSupport, S as parseMixed, I as syntaxTree, L as LRLanguage, E as styleTags, F as tags, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp } from './index-f6Jh9zCn.js';
2
- import { html } from './index-wnkG3YUJ.js';
3
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-B7G61KeU.js';
1
+ import { Q as EditorView, R as EditorSelection, A as LanguageSupport, S as parseMixed, I as syntaxTree, L as LRLanguage, E as styleTags, F as tags, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp } from './index-PALwbLkY.js';
2
+ import { html } from './index-Bsd4ABeE.js';
3
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-DttUK7l_.js';
4
4
 
5
5
  // This file was generated by lezer-generator. You probably shouldn't edit it.
6
6
  const interpolationStart = 1,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, S as parseMixed, L as LRLanguage, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, S as parseMixed, L as LRLanguage, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const blockEnd = 63,
@@ -1,7 +1,7 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { S as parseMixed, E as styleTags, F as tags, Q as EditorView, I as syntaxTree, R as EditorSelection, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, D as foldNodeProp, a9 as bracketMatchingHandle } from './index-f6Jh9zCn.js';
3
- import { cssLanguage, css } from './index-D_WC_iU-.js';
4
- import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from './index-xzCgWTs0.js';
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { S as parseMixed, E as styleTags, F as tags, Q as EditorView, I as syntaxTree, R as EditorSelection, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, D as foldNodeProp, a9 as bracketMatchingHandle } from './index-PALwbLkY.js';
3
+ import { cssLanguage, css } from './index-VHSqM6do.js';
4
+ import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from './index-C0FriEF6.js';
5
5
 
6
6
  // This file was generated by lezer-generator. You probably shouldn't edit it.
7
7
  const scriptText = 55,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, Q as EditorView, I as syntaxTree, R as EditorSelection, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, D as foldNodeProp, a9 as bracketMatchingHandle } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, Q as EditorView, I as syntaxTree, R as EditorSelection, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, D as foldNodeProp, a9 as bracketMatchingHandle } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const StartTag = 1,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, Q as EditorView, I as syntaxTree, R as EditorSelection, A as LanguageSupport, G as ifNotIn, H as completeFromList, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside, ab as sublanguageProp, N as snippetCompletion, a3 as defineLanguageFacet, O as NodeWeakMap, P as IterMode } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, Q as EditorView, I as syntaxTree, R as EditorSelection, A as LanguageSupport, G as ifNotIn, H as completeFromList, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside, ab as sublanguageProp, N as snippetCompletion, a3 as defineLanguageFacet, O as NodeWeakMap, P as IterMode } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const noSemi = 316,
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, D as foldNodeProp, M as foldInside, B as indentNodeProp, C as continuedIndent } from './index-f6Jh9zCn.js';
3
- import { defineCSSCompletionSource } from './index-D_WC_iU-.js';
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, D as foldNodeProp, M as foldInside, B as indentNodeProp, C as continuedIndent } from './index-PALwbLkY.js';
3
+ import { defineCSSCompletionSource } from './index-VHSqM6do.js';
4
4
 
5
5
  // This file was generated by lezer-generator. You probably shouldn't edit it.
6
6
  const indent = 168,
@@ -1,7 +1,7 @@
1
- import { L as LRLanguage, A as LanguageSupport, S as parseMixed, E as styleTags, F as tags } from './index-f6Jh9zCn.js';
2
- import { html } from './index-wnkG3YUJ.js';
3
- import { javascriptLanguage } from './index-xzCgWTs0.js';
4
- import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.js';
1
+ import { L as LRLanguage, A as LanguageSupport, S as parseMixed, E as styleTags, F as tags } from './index-PALwbLkY.js';
2
+ import { html } from './index-Bsd4ABeE.js';
3
+ import { javascriptLanguage } from './index-C0FriEF6.js';
4
+ import { L as LRParser, E as ExternalTokenizer } from './index-DttUK7l_.js';
5
5
 
6
6
  // This file was generated by lezer-generator. You probably shouldn't edit it.
7
7
  const Text = 1,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, G as ifNotIn, H as completeFromList, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside, I as syntaxTree, N as snippetCompletion, O as NodeWeakMap, P as IterMode } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, G as ifNotIn, H as completeFromList, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside, I as syntaxTree, N as snippetCompletion, O as NodeWeakMap, P as IterMode } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const insertedSemi = 177,
@@ -1,5 +1,5 @@
1
- import { u as useInstance, e as editorViewCtx, r as reviewSuggestionsDecoKey, o as orderReviewSuggestionsByResolvedRanges, g as getNextReviewSuggestionId, p as parserCtx, a as parseProposedMd, c as createApplyReviewSuggestionTransaction, i as isMilkdownContextNotFoundError, b as createDismissReviewSuggestionTransaction } from './index-f6Jh9zCn.js';
2
- export { d as applyAllReviewSuggestions, f as buildReviewSuggestionsPlugin, h as createInlineSuggestionElement, j as createReviewSuggestionBulkActions, k as getActiveReviewSuggestions, l as rejectAllReviewSuggestions, m as resolveReviewSuggestionRanges, n as reviewSuggestionApplyMeta, q as reviewSuggestionDismissMeta, s as reviewSuggestionsDecorationPlugin, t as reviewSuggestionsSelectionMeta, v as reviewSuggestionsUpdateMeta, w as useDefaultReviewSuggestionSelection, x as useReviewSuggestionBulkActionsRef, y as useReviewSuggestionSelectionSync, z as useReviewSuggestionsLoader } from './index-f6Jh9zCn.js';
1
+ import { u as useInstance, e as editorViewCtx, r as reviewSuggestionsDecoKey, o as orderReviewSuggestionsByResolvedRanges, g as getNextReviewSuggestionId, p as parserCtx, a as parseProposedMd, c as createApplyReviewSuggestionTransaction, i as isMilkdownContextNotFoundError, b as createDismissReviewSuggestionTransaction } from './index-PALwbLkY.js';
2
+ export { d as applyAllReviewSuggestions, f as buildReviewSuggestionsPlugin, h as createInlineSuggestionElement, j as createReviewSuggestionBulkActions, k as getActiveReviewSuggestions, l as rejectAllReviewSuggestions, m as resolveReviewSuggestionRanges, n as reviewSuggestionApplyMeta, q as reviewSuggestionDismissMeta, s as reviewSuggestionsDecorationPlugin, t as reviewSuggestionsSelectionMeta, v as reviewSuggestionsUpdateMeta, w as useDefaultReviewSuggestionSelection, x as useReviewSuggestionBulkActionsRef, y as useReviewSuggestionSelectionSync, z as useReviewSuggestionsLoader } from './index-PALwbLkY.js';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import * as React from 'react';
5
5
  import { createContext, useRef, useLayoutEffect, useEffect, useContext, useId, useCallback, useMemo, Fragment, createElement, useInsertionEffect, forwardRef, Component } from 'react';
@@ -1,5 +1,5 @@
1
- import { L as LRLanguage, A as LanguageSupport, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, E as styleTags, F as tags, G as ifNotIn, H as completeFromList, I as syntaxTree } from './index-f6Jh9zCn.js';
2
- import { E as ExternalTokenizer, L as LRParser } from './index-B7G61KeU.js';
1
+ import { L as LRLanguage, A as LanguageSupport, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, E as styleTags, F as tags, G as ifNotIn, H as completeFromList, I as syntaxTree } from './index-PALwbLkY.js';
2
+ import { E as ExternalTokenizer, L as LRParser } from './index-DttUK7l_.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const whitespace = 36,
@@ -1,4 +1,4 @@
1
- import { T as Parser, X as NodeSet, U as NodeType, aa as DefaultBufferLength, V as NodeProp, Y as Tree, P as IterMode } from './index-f6Jh9zCn.js';
1
+ import { T as Parser, X as NodeSet, U as NodeType, aa as DefaultBufferLength, V as NodeProp, Y as Tree, P as IterMode } from './index-PALwbLkY.js';
2
2
 
3
3
  /**
4
4
  A parse stack. These are used internally by the parser to track
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, G as ifNotIn, I as syntaxTree, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp, M as foldInside, O as NodeWeakMap, P as IterMode, H as completeFromList, N as snippetCompletion } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, G as ifNotIn, I as syntaxTree, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, K as delimitedIndent, D as foldNodeProp, M as foldInside, O as NodeWeakMap, P as IterMode, H as completeFromList, N as snippetCompletion } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const printKeyword = 1,
@@ -1,5 +1,5 @@
1
- import { L as LRParser } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, J as flatIndent, C as continuedIndent, K as delimitedIndent, D as foldNodeProp, M as foldInside } from './index-PALwbLkY.js';
3
3
 
4
4
  const javaHighlighting = styleTags({
5
5
  null: tags.null,
@@ -41762,6 +41762,10 @@ function findMentionProvider(providers, type) {
41762
41762
  return providers.find((provider) => provider.type === type);
41763
41763
  }
41764
41764
 
41765
+ function pillIcon(provider, refId) {
41766
+ const match = provider?.candidates?.find((row) => row.id === refId);
41767
+ return match?.icon ?? provider?.typeIcon;
41768
+ }
41765
41769
  const MENTION_PILL_CLASS = "bf-mention-pill";
41766
41770
  function selectAdjacentMention(view, event) {
41767
41771
  if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) return false;
@@ -41812,9 +41816,28 @@ function mentionContextFromNode(attrs, anchor, close) {
41812
41816
  close
41813
41817
  };
41814
41818
  }
41819
+ const labelUpdaters = /* @__PURE__ */ new WeakMap();
41820
+ function updateMentionLabel(pill, label) {
41821
+ const update = labelUpdaters.get(pill);
41822
+ update?.(label);
41823
+ return Boolean(update);
41824
+ }
41815
41825
  const MentionNodeView = () => {
41816
41826
  const { node, selected, view, getPos } = useNodeViewContext();
41817
41827
  const pillRef = useRef(null);
41828
+ useEffect(() => {
41829
+ const pill = pillRef.current;
41830
+ if (!pill) return;
41831
+ labelUpdaters.set(pill, (label) => {
41832
+ const pos = getPos();
41833
+ const current = typeof pos === "number" ? view.state.doc.nodeAt(pos) : null;
41834
+ if (typeof pos !== "number" || !current) return;
41835
+ view.dispatch(view.state.tr.setNodeMarkup(pos, void 0, { ...current.attrs, label }));
41836
+ });
41837
+ return () => {
41838
+ labelUpdaters.delete(pill);
41839
+ };
41840
+ }, [view, getPos]);
41818
41841
  const providers = useMentionProviders();
41819
41842
  const parsed = mentionAttrsFromNode({
41820
41843
  type: node.attrs.type,
@@ -41831,7 +41854,7 @@ const MentionNodeView = () => {
41831
41854
  attrs: flattenMentionAttrs(parsed)
41832
41855
  })
41833
41856
  );
41834
- const TypeIcon = provider?.typeIcon;
41857
+ const TypeIcon = pillIcon(provider, provider ? parsed.extra[provider.refAttr] : void 0);
41835
41858
  const canPreview = Boolean(provider?.onClick);
41836
41859
  const [open, setOpen] = useState(false);
41837
41860
  const [content, setContent] = useState(null);
@@ -41881,7 +41904,15 @@ const MentionNodeView = () => {
41881
41904
  moveCaretOffMention(view, pos, node.nodeSize, event.key);
41882
41905
  },
41883
41906
  children: [
41884
- invalid ? /* @__PURE__ */ jsx(Warning, { size: 16, weight: "regular", className: "shrink-0", "data-testid": "mention-pill-warning" }) : TypeIcon ? /* @__PURE__ */ jsx(TypeIcon, { size: 16, weight: "fill", className: "shrink-0", "data-testid": "mention-pill-type-icon" }) : null,
41907
+ invalid ? /* @__PURE__ */ jsx(Warning, { size: 16, weight: "regular", className: "shrink-0", "data-testid": "mention-pill-warning" }) : TypeIcon ? /* @__PURE__ */ jsx(
41908
+ TypeIcon,
41909
+ {
41910
+ size: 16,
41911
+ weight: provider?.iconWeight ?? "regular",
41912
+ className: "shrink-0",
41913
+ "data-testid": "mention-pill-type-icon"
41914
+ }
41915
+ ) : null,
41885
41916
  /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", title: parsed.label || parsed.type, children: parsed.label || parsed.type })
41886
41917
  ]
41887
41918
  }
@@ -70393,7 +70424,7 @@ function legacy(parser) {
70393
70424
  return new LanguageSupport(StreamLanguage.define(parser));
70394
70425
  }
70395
70426
  function sql(dialectName) {
70396
- return import('./index-hvx6Ru78.js').then(m => m.sql({ dialect: m[dialectName] }));
70427
+ return import('./index-Dr6hZgyB.js').then(m => m.sql({ dialect: m[dialectName] }));
70397
70428
  }
70398
70429
  /**
70399
70430
  An array of language descriptions for known language packages.
@@ -70404,7 +70435,7 @@ const languages = [
70404
70435
  name: "C",
70405
70436
  extensions: ["c", "h", "ino"],
70406
70437
  load() {
70407
- return import('./index-Byx5Rin8.js').then(m => m.cpp());
70438
+ return import('./index-BdQHIgL9.js').then(m => m.cpp());
70408
70439
  }
70409
70440
  }),
70410
70441
  /*@__PURE__*/LanguageDescription.of({
@@ -70412,7 +70443,7 @@ const languages = [
70412
70443
  alias: ["cpp"],
70413
70444
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
70414
70445
  load() {
70415
- return import('./index-Byx5Rin8.js').then(m => m.cpp());
70446
+ return import('./index-BdQHIgL9.js').then(m => m.cpp());
70416
70447
  }
70417
70448
  }),
70418
70449
  /*@__PURE__*/LanguageDescription.of({
@@ -70425,14 +70456,14 @@ const languages = [
70425
70456
  name: "CSS",
70426
70457
  extensions: ["css"],
70427
70458
  load() {
70428
- return import('./index-D_WC_iU-.js').then(m => m.css());
70459
+ return import('./index-VHSqM6do.js').then(m => m.css());
70429
70460
  }
70430
70461
  }),
70431
70462
  /*@__PURE__*/LanguageDescription.of({
70432
70463
  name: "Go",
70433
70464
  extensions: ["go"],
70434
70465
  load() {
70435
- return import('./index-DHS4fqlV.js').then(m => m.go());
70466
+ return import('./index-Cx6qw-AO.js').then(m => m.go());
70436
70467
  }
70437
70468
  }),
70438
70469
  /*@__PURE__*/LanguageDescription.of({
@@ -70440,14 +70471,14 @@ const languages = [
70440
70471
  alias: ["xhtml"],
70441
70472
  extensions: ["html", "htm", "handlebars", "hbs"],
70442
70473
  load() {
70443
- return import('./index-wnkG3YUJ.js').then(m => m.html());
70474
+ return import('./index-Bsd4ABeE.js').then(m => m.html());
70444
70475
  }
70445
70476
  }),
70446
70477
  /*@__PURE__*/LanguageDescription.of({
70447
70478
  name: "Java",
70448
70479
  extensions: ["java"],
70449
70480
  load() {
70450
- return import('./index-CHiJxeZP.js').then(m => m.java());
70481
+ return import('./index-Ew91ML7b.js').then(m => m.java());
70451
70482
  }
70452
70483
  }),
70453
70484
  /*@__PURE__*/LanguageDescription.of({
@@ -70455,14 +70486,14 @@ const languages = [
70455
70486
  alias: ["ecmascript", "js", "node"],
70456
70487
  extensions: ["js", "mjs", "cjs"],
70457
70488
  load() {
70458
- return import('./index-xzCgWTs0.js').then(m => m.javascript());
70489
+ return import('./index-C0FriEF6.js').then(m => m.javascript());
70459
70490
  }
70460
70491
  }),
70461
70492
  /*@__PURE__*/LanguageDescription.of({
70462
70493
  name: "Jinja",
70463
70494
  extensions: ["j2", "jinja", "jinja2"],
70464
70495
  load() {
70465
- return import('./index-BgpucQu9.js').then(m => m.jinja());
70496
+ return import('./index-BijrthrB.js').then(m => m.jinja());
70466
70497
  }
70467
70498
  }),
70468
70499
  /*@__PURE__*/LanguageDescription.of({
@@ -70470,28 +70501,28 @@ const languages = [
70470
70501
  alias: ["json5"],
70471
70502
  extensions: ["json", "map"],
70472
70503
  load() {
70473
- return import('./index-DysiDhtD.js').then(m => m.json());
70504
+ return import('./index-B95nLLma.js').then(m => m.json());
70474
70505
  }
70475
70506
  }),
70476
70507
  /*@__PURE__*/LanguageDescription.of({
70477
70508
  name: "JSX",
70478
70509
  extensions: ["jsx"],
70479
70510
  load() {
70480
- return import('./index-xzCgWTs0.js').then(m => m.javascript({ jsx: true }));
70511
+ return import('./index-C0FriEF6.js').then(m => m.javascript({ jsx: true }));
70481
70512
  }
70482
70513
  }),
70483
70514
  /*@__PURE__*/LanguageDescription.of({
70484
70515
  name: "LESS",
70485
70516
  extensions: ["less"],
70486
70517
  load() {
70487
- return import('./index-DgawIQVL.js').then(m => m.less());
70518
+ return import('./index-siaDMBtt.js').then(m => m.less());
70488
70519
  }
70489
70520
  }),
70490
70521
  /*@__PURE__*/LanguageDescription.of({
70491
70522
  name: "Liquid",
70492
70523
  extensions: ["liquid"],
70493
70524
  load() {
70494
- return import('./index-CZ_tRMOP.js').then(m => m.liquid());
70525
+ return import('./index-BSHO896a.js').then(m => m.liquid());
70495
70526
  }
70496
70527
  }),
70497
70528
  /*@__PURE__*/LanguageDescription.of({
@@ -70502,7 +70533,7 @@ const languages = [
70502
70533
  name: "Markdown",
70503
70534
  extensions: ["md", "markdown", "mkd"],
70504
70535
  load() {
70505
- return import('./index-CgxTSc3A.js').then(m => m.markdown());
70536
+ return import('./index-BPUuE877.js').then(m => m.markdown());
70506
70537
  }
70507
70538
  }),
70508
70539
  /*@__PURE__*/LanguageDescription.of({
@@ -70517,7 +70548,7 @@ const languages = [
70517
70548
  name: "PHP",
70518
70549
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
70519
70550
  load() {
70520
- return import('./index-DC8dl4wM.js').then(m => m.php());
70551
+ return import('./index-BOu382Ca.js').then(m => m.php());
70521
70552
  }
70522
70553
  }),
70523
70554
  /*@__PURE__*/LanguageDescription.of({
@@ -70534,28 +70565,28 @@ const languages = [
70534
70565
  extensions: ["BUILD", "bzl", "py", "pyw"],
70535
70566
  filename: /^(BUCK|BUILD)$/,
70536
70567
  load() {
70537
- return import('./index-nC_e7r57.js').then(m => m.python());
70568
+ return import('./index-DyjkpfqJ.js').then(m => m.python());
70538
70569
  }
70539
70570
  }),
70540
70571
  /*@__PURE__*/LanguageDescription.of({
70541
70572
  name: "Rust",
70542
70573
  extensions: ["rs"],
70543
70574
  load() {
70544
- return import('./index-BCU5wvMA.js').then(m => m.rust());
70575
+ return import('./index-tFUgwE77.js').then(m => m.rust());
70545
70576
  }
70546
70577
  }),
70547
70578
  /*@__PURE__*/LanguageDescription.of({
70548
70579
  name: "Sass",
70549
70580
  extensions: ["sass"],
70550
70581
  load() {
70551
- return import('./index-ioAG3mIK.js').then(m => m.sass({ indented: true }));
70582
+ return import('./index-CL74M0IX.js').then(m => m.sass({ indented: true }));
70552
70583
  }
70553
70584
  }),
70554
70585
  /*@__PURE__*/LanguageDescription.of({
70555
70586
  name: "SCSS",
70556
70587
  extensions: ["scss"],
70557
70588
  load() {
70558
- return import('./index-ioAG3mIK.js').then(m => m.sass());
70589
+ return import('./index-CL74M0IX.js').then(m => m.sass());
70559
70590
  }
70560
70591
  }),
70561
70592
  /*@__PURE__*/LanguageDescription.of({
@@ -70571,7 +70602,7 @@ const languages = [
70571
70602
  name: "TSX",
70572
70603
  extensions: ["tsx"],
70573
70604
  load() {
70574
- return import('./index-xzCgWTs0.js').then(m => m.javascript({ jsx: true, typescript: true }));
70605
+ return import('./index-C0FriEF6.js').then(m => m.javascript({ jsx: true, typescript: true }));
70575
70606
  }
70576
70607
  }),
70577
70608
  /*@__PURE__*/LanguageDescription.of({
@@ -70579,14 +70610,14 @@ const languages = [
70579
70610
  alias: ["ts"],
70580
70611
  extensions: ["ts", "mts", "cts"],
70581
70612
  load() {
70582
- return import('./index-xzCgWTs0.js').then(m => m.javascript({ typescript: true }));
70613
+ return import('./index-C0FriEF6.js').then(m => m.javascript({ typescript: true }));
70583
70614
  }
70584
70615
  }),
70585
70616
  /*@__PURE__*/LanguageDescription.of({
70586
70617
  name: "WebAssembly",
70587
70618
  extensions: ["wat", "wast"],
70588
70619
  load() {
70589
- return import('./index-BrHQTa5O.js').then(m => m.wast());
70620
+ return import('./index-BPOh7gLI.js').then(m => m.wast());
70590
70621
  }
70591
70622
  }),
70592
70623
  /*@__PURE__*/LanguageDescription.of({
@@ -70594,7 +70625,7 @@ const languages = [
70594
70625
  alias: ["rss", "wsdl", "xsd"],
70595
70626
  extensions: ["xml", "xsl", "xsd", "svg"],
70596
70627
  load() {
70597
- return import('./index-wcyxRMSc.js').then(m => m.xml());
70628
+ return import('./index-Bx9kPv2X.js').then(m => m.xml());
70598
70629
  }
70599
70630
  }),
70600
70631
  /*@__PURE__*/LanguageDescription.of({
@@ -70602,7 +70633,7 @@ const languages = [
70602
70633
  alias: ["yml"],
70603
70634
  extensions: ["yaml", "yml"],
70604
70635
  load() {
70605
- return import('./index-CSYZYQcP.js').then(m => m.yaml());
70636
+ return import('./index-BkWCmS7C.js').then(m => m.yaml());
70606
70637
  }
70607
70638
  }),
70608
70639
  // Legacy modes ported from CodeMirror 5
@@ -71391,13 +71422,13 @@ const languages = [
71391
71422
  name: "Vue",
71392
71423
  extensions: ["vue"],
71393
71424
  load() {
71394
- return import('./index-D3qfXl4a.js').then(m => m.vue());
71425
+ return import('./index-BMZMkble.js').then(m => m.vue());
71395
71426
  }
71396
71427
  }),
71397
71428
  /*@__PURE__*/LanguageDescription.of({
71398
71429
  name: "Angular Template",
71399
71430
  load() {
71400
- return import('./index-FrO1JgY0.js').then(m => m.angular());
71431
+ return import('./index-Ckz8fb1v.js').then(m => m.angular());
71401
71432
  }
71402
71433
  })
71403
71434
  ];
@@ -122207,6 +122238,7 @@ const emojiSuggestProsePlugin = $prose((ctx) => {
122207
122238
  selectedIndex = prev.selectedIndex;
122208
122239
  if (nav === "next") selectedIndex = (selectedIndex + 1) % items.length;
122209
122240
  if (nav === "prev") selectedIndex = (selectedIndex - 1 + items.length) % items.length;
122241
+ if (typeof nav === "number") selectedIndex = Math.min(Math.max(0, nav), items.length - 1);
122210
122242
  }
122211
122243
  return {
122212
122244
  active: true,
@@ -122250,6 +122282,13 @@ const emojiSuggestProsePlugin = $prose((ctx) => {
122250
122282
  }
122251
122283
  });
122252
122284
  });
122285
+ function setEmojiSuggestIndex(view, index) {
122286
+ view.dispatch(view.state.tr.setMeta(emojiSuggestNavMeta, index));
122287
+ }
122288
+ function insertEmojiFromSuggest(ctx, from, to, emoji) {
122289
+ const view = ctx.get(editorViewCtx);
122290
+ insertPicked(view, ctx, from, to, emoji);
122291
+ }
122253
122292
 
122254
122293
  const EMOJI_TOOLTIP_NAME = "emoji-suggest";
122255
122294
  const emojiTooltip = tooltipFactory("BRAINFISH_EMOJI");
@@ -122272,6 +122311,10 @@ function tooltipPosition(view, panel) {
122272
122311
  const top = above ? coords.top - r.top - GAP : coords.bottom - r.top + GAP;
122273
122312
  return { top, left, above };
122274
122313
  }
122314
+ function optionIndex(target) {
122315
+ const raw = target.closest?.("[data-index]")?.getAttribute("data-index");
122316
+ return raw == null ? null : Number(raw);
122317
+ }
122275
122318
  const EmojiTooltipView = () => {
122276
122319
  const { view } = usePluginViewContext();
122277
122320
  const { getInstance } = useEditorAction();
@@ -122297,17 +122340,43 @@ const EmojiTooltipView = () => {
122297
122340
  left: pos.left,
122298
122341
  transform: pos.above ? "translateY(-100%)" : void 0
122299
122342
  },
122300
- children: /* @__PURE__ */ jsx("div", { className: "menu-groups", children: /* @__PURE__ */ jsx("div", { className: "menu-group", children: /* @__PURE__ */ jsx("ul", { children: panel.items.map((item, index) => {
122301
- const selected = index === panel.selectedIndex;
122302
- return /* @__PURE__ */ jsxs("li", { "data-index": index, className: selected ? "hover" : void 0, children: [
122303
- /* @__PURE__ */ jsx("span", { className: "text-lg leading-none", "aria-hidden": true, children: item.emoji }),
122304
- /* @__PURE__ */ jsxs("span", { className: "truncate opacity-80", children: [
122305
- ":",
122306
- item.name,
122307
- ":"
122308
- ] })
122309
- ] }, `${item.name}-${index}`);
122310
- }) }) }) })
122343
+ children: /* @__PURE__ */ jsx("div", { className: "menu-groups", children: /* @__PURE__ */ jsx("div", { className: "menu-group", children: /* @__PURE__ */ jsx(
122344
+ "ul",
122345
+ {
122346
+ role: "listbox",
122347
+ onMouseMove: (event) => {
122348
+ const index = optionIndex(event.target);
122349
+ if (index !== null && index !== panel.selectedIndex && view) setEmojiSuggestIndex(view, index);
122350
+ },
122351
+ onMouseDown: (event) => {
122352
+ event.preventDefault();
122353
+ const index = optionIndex(event.target);
122354
+ const item = index === null ? void 0 : panel.items[index];
122355
+ if (item) insertEmojiFromSuggest(ctx, panel.from, panel.to, item.emoji);
122356
+ },
122357
+ children: panel.items.map((item, index) => {
122358
+ const selected = index === panel.selectedIndex;
122359
+ return /* @__PURE__ */ jsxs(
122360
+ "li",
122361
+ {
122362
+ role: "option",
122363
+ "aria-selected": selected,
122364
+ "data-index": index,
122365
+ className: selected ? "hover" : void 0,
122366
+ children: [
122367
+ /* @__PURE__ */ jsx("span", { className: "text-lg leading-none", "aria-hidden": true, children: item.emoji }),
122368
+ /* @__PURE__ */ jsxs("span", { className: "truncate opacity-80", children: [
122369
+ ":",
122370
+ item.name,
122371
+ ":"
122372
+ ] })
122373
+ ]
122374
+ },
122375
+ `${item.name}-${index}`
122376
+ );
122377
+ })
122378
+ }
122379
+ ) }) })
122311
122380
  }
122312
122381
  );
122313
122382
  };
@@ -124512,6 +124581,7 @@ function setupCollabContentChange(crepe, onContentChangeRef, localEditPendingRef
124512
124581
  });
124513
124582
  }
124514
124583
 
124584
+ const SLASH_MENU_SELECTOR = `.milkdown-slash-menu:not([data-name="${EMOJI_TOOLTIP_NAME}"])`;
124515
124585
  function useSlashMenuPortal(container) {
124516
124586
  const reactId = useId();
124517
124587
  const portalRootId = `bf-slash-menu-portal-${reactId.replace(/:/g, "")}`;
@@ -124556,8 +124626,8 @@ function useSlashMenuPortal(container) {
124556
124626
  return portalRoot;
124557
124627
  };
124558
124628
  const portalSlashMenu = () => {
124559
- const existing = document.getElementById(portalRootId)?.querySelector(".milkdown-slash-menu");
124560
- const menu = container.querySelector(".milkdown-slash-menu") ?? (existing instanceof HTMLElement ? existing : null);
124629
+ const existing = document.getElementById(portalRootId)?.querySelector(SLASH_MENU_SELECTOR);
124630
+ const menu = container.querySelector(SLASH_MENU_SELECTOR) ?? (existing instanceof HTMLElement ? existing : null);
124561
124631
  if (!menu) return;
124562
124632
  const root = getOrCreatePortalRoot();
124563
124633
  if (menu.parentElement !== root) {
@@ -124589,7 +124659,7 @@ function useSlashMenuPortal(container) {
124589
124659
  observer.disconnect();
124590
124660
  window.removeEventListener("scroll", onScrollOrResize, true);
124591
124661
  window.removeEventListener("resize", onScrollOrResize);
124592
- const menu = document.getElementById(portalRootId)?.querySelector(".milkdown-slash-menu");
124662
+ const menu = document.getElementById(portalRootId)?.querySelector(SLASH_MENU_SELECTOR);
124593
124663
  if (menu && originalParent?.isConnected) {
124594
124664
  originalParent.insertBefore(menu, originalNextSibling);
124595
124665
  }
@@ -124599,7 +124669,7 @@ function useSlashMenuPortal(container) {
124599
124669
  }
124600
124670
 
124601
124671
  const ReviewSuggestionsViewport = lazy(
124602
- () => import('./index-QwNEKxue.js').then((module) => ({ default: module.ReviewSuggestionsViewport }))
124672
+ () => import('./index-DS89xquM.js').then((module) => ({ default: module.ReviewSuggestionsViewport }))
124603
124673
  );
124604
124674
  const MilkdownEditorInner = ({
124605
124675
  readOnly = false,
@@ -125032,4 +125102,4 @@ const MarkdownSourceEditor = React.forwardRef(
125032
125102
  }
125033
125103
  );
125034
125104
 
125035
- export { keymap$2 as $, LanguageSupport as A, indentNodeProp as B, continuedIndent as C, foldNodeProp as D, styleTags as E, tags as F, ifNotIn as G, completeFromList as H, syntaxTree as I, flatIndent as J, delimitedIndent as K, LRLanguage as L, foldInside as M, snippetCompletion as N, NodeWeakMap as O, IterMode as P, EditorView as Q, EditorSelection as R, parseMixed as S, Parser as T, NodeType as U, NodeProp as V, Tag as W, NodeSet as X, Tree as Y, countColumn as Z, Prec as _, parseProposedMd as a, Language as a0, indentUnit as a1, foldService as a2, defineLanguageFacet as a3, CompletionContext as a4, EditorState as a5, languageDataProp as a6, LanguageDescription as a7, ParseContext as a8, bracketMatchingHandle as a9, DefaultBufferLength as aa, sublanguageProp as ab, BrainfishEditor as ac, MarkdownSourceEditor as ad, MilkdownProvider as ae, createDismissReviewSuggestionTransaction as b, createApplyReviewSuggestionTransaction as c, applyAllReviewSuggestions as d, editorViewCtx as e, buildReviewSuggestionsPlugin as f, getNextReviewSuggestionId as g, createInlineSuggestionElement as h, isMilkdownContextNotFoundError as i, createReviewSuggestionBulkActions as j, getActiveReviewSuggestions as k, rejectAllReviewSuggestions as l, resolveReviewSuggestionRanges as m, reviewSuggestionApplyMeta as n, orderReviewSuggestionsByResolvedRanges as o, parserCtx as p, reviewSuggestionDismissMeta as q, reviewSuggestionsDecoKey as r, reviewSuggestionsDecorationPlugin as s, reviewSuggestionsSelectionMeta as t, useInstance as u, reviewSuggestionsUpdateMeta as v, useDefaultReviewSuggestionSelection as w, useReviewSuggestionBulkActionsRef as x, useReviewSuggestionSelectionSync as y, useReviewSuggestionsLoader as z };
125105
+ export { keymap$2 as $, LanguageSupport as A, indentNodeProp as B, continuedIndent as C, foldNodeProp as D, styleTags as E, tags as F, ifNotIn as G, completeFromList as H, syntaxTree as I, flatIndent as J, delimitedIndent as K, LRLanguage as L, foldInside as M, snippetCompletion as N, NodeWeakMap as O, IterMode as P, EditorView as Q, EditorSelection as R, parseMixed as S, Parser as T, NodeType as U, NodeProp as V, Tag as W, NodeSet as X, Tree as Y, countColumn as Z, Prec as _, parseProposedMd as a, Language as a0, indentUnit as a1, foldService as a2, defineLanguageFacet as a3, CompletionContext as a4, EditorState as a5, languageDataProp as a6, LanguageDescription as a7, ParseContext as a8, bracketMatchingHandle as a9, DefaultBufferLength as aa, sublanguageProp as ab, BrainfishEditor as ac, MarkdownSourceEditor as ad, MilkdownProvider as ae, updateMentionLabel as af, createDismissReviewSuggestionTransaction as b, createApplyReviewSuggestionTransaction as c, applyAllReviewSuggestions as d, editorViewCtx as e, buildReviewSuggestionsPlugin as f, getNextReviewSuggestionId as g, createInlineSuggestionElement as h, isMilkdownContextNotFoundError as i, createReviewSuggestionBulkActions as j, getActiveReviewSuggestions as k, rejectAllReviewSuggestions as l, resolveReviewSuggestionRanges as m, reviewSuggestionApplyMeta as n, orderReviewSuggestionsByResolvedRanges as o, parserCtx as p, reviewSuggestionDismissMeta as q, reviewSuggestionsDecoKey as r, reviewSuggestionsDecorationPlugin as s, reviewSuggestionsSelectionMeta as t, useInstance as u, reviewSuggestionsUpdateMeta as v, useDefaultReviewSuggestionSelection as w, useReviewSuggestionBulkActionsRef as x, useReviewSuggestionSelectionSync as y, useReviewSuggestionsLoader as z };
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags$1, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside, I as syntaxTree, O as NodeWeakMap, P as IterMode } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags$1, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside, I as syntaxTree, O as NodeWeakMap, P as IterMode } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const descendantOp = 122,
@@ -1,6 +1,6 @@
1
- import { A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside, E as styleTags, F as tags } from './index-f6Jh9zCn.js';
2
- import { defineCSSCompletionSource } from './index-D_WC_iU-.js';
3
- import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.js';
1
+ import { A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside, E as styleTags, F as tags } from './index-PALwbLkY.js';
2
+ import { defineCSSCompletionSource } from './index-VHSqM6do.js';
3
+ import { L as LRParser, E as ExternalTokenizer } from './index-DttUK7l_.js';
4
4
 
5
5
  // This file was generated by lezer-generator. You probably shouldn't edit it.
6
6
  const descendantOp = 110,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.js';
2
- import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside } from './index-f6Jh9zCn.js';
1
+ import { L as LRParser, E as ExternalTokenizer } from './index-DttUK7l_.js';
2
+ import { E as styleTags, F as tags, A as LanguageSupport, L as LRLanguage, B as indentNodeProp, C as continuedIndent, D as foldNodeProp, M as foldInside } from './index-PALwbLkY.js';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const closureParamDelim = 1,
package/dist/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export type { BrainfishEditorProps, DocumentIssue, EditorTheme, ConnectionStatus
5
5
  export type { SyncedHelpers } from './useHocusPocusCollaboration';
6
6
  export type { ReplaceContentFn } from './useEditorReady';
7
7
  export { createReviewSuggestionBulkActions } from './plugins/reviewSuggestions';
8
+ export { updateMentionLabel } from './plugins/mentions';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { ac as BrainfishEditor, ad as MarkdownSourceEditor, ae as MilkdownProvider, j as createReviewSuggestionBulkActions } from './index-f6Jh9zCn.js';
1
+ export { ac as BrainfishEditor, ad as MarkdownSourceEditor, ae as MilkdownProvider, j as createReviewSuggestionBulkActions, af as updateMentionLabel } from './index-PALwbLkY.js';
@@ -1,5 +1,6 @@
1
1
  import { Ctx } from '@milkdown/kit/ctx';
2
2
  import { EditorState } from '@milkdown/kit/prose/state';
3
+ import { EditorView } from '@milkdown/kit/prose/view';
3
4
  export declare const emojiSuggestNavMeta = "emojiSuggestNav";
4
5
  export declare const emojiSuggestPickMeta = "emojiSuggestPick";
5
6
  export declare const emojiSuggestDismissMeta = "emojiSuggestDismiss";
@@ -25,4 +26,6 @@ export declare function findEmojiTrigger(state: EditorState): {
25
26
  } | null;
26
27
  /** `:` autocomplete — register late in the editor so ArrowUp/Down win over other keymaps. */
27
28
  export declare const emojiSuggestProsePlugin: import('@milkdown/utils').$Prose;
29
+ /** Highlight a row (e.g. on pointer hover) without moving the selection. */
30
+ export declare function setEmojiSuggestIndex(view: EditorView, index: number): void;
28
31
  export declare function insertEmojiFromSuggest(ctx: Ctx, from: number, to: number, emoji: string): void;
@@ -1,4 +1,4 @@
1
- import { Icon } from '@phosphor-icons/react';
1
+ import { Icon, IconWeight } from '@phosphor-icons/react';
2
2
  import { ReactNode } from 'react';
3
3
  export type MentionCandidate = {
4
4
  id: string;
@@ -6,7 +6,7 @@ export type MentionCandidate = {
6
6
  type: string;
7
7
  inputCount?: number;
8
8
  description?: string;
9
- /** Overrides provider.typeIcon in the @ slash menu only. */
9
+ /** Glyph for this candidate in the @ menu and on the pill when `provider.candidates` includes this row. */
10
10
  icon?: Icon;
11
11
  };
12
12
  export type MentionContext = {
@@ -23,6 +23,8 @@ export type MentionProvider = {
23
23
  type: string;
24
24
  groupLabel: string;
25
25
  refAttr: string;
26
+ /** Static rows. The pill uses `icon` from the row whose `id` equals `attrs[refAttr]`. */
27
+ candidates?: MentionCandidate[];
26
28
  list: (args: {
27
29
  limit: number;
28
30
  signal: AbortSignal;
@@ -40,4 +42,6 @@ export type MentionProvider = {
40
42
  renderSlashError?: () => ReactNode;
41
43
  /** Phosphor icon for the pill and @ menu. Host owns the glyph. */
42
44
  typeIcon: Icon;
45
+ /** Pill glyph weight. Omitted means `regular`. */
46
+ iconWeight?: IconWeight;
43
47
  };
@@ -1,4 +1,5 @@
1
1
  export { configureMentions } from './integration/configure';
2
2
  export { MentionsRuntimeContext } from './ui/runtime';
3
+ export { updateMentionLabel } from './ui/node-view';
3
4
  export { MENTION_NODE_NAME, MENTION_DIRECTIVE_NAME } from './core/parse';
4
5
  export type { MentionCandidate, MentionContext, MentionProvider, MentionSlashAvailability } from './core/types';
@@ -1,4 +1,10 @@
1
1
  import { Ctx } from '@milkdown/kit/ctx';
2
2
  import { useNodeViewFactory } from '@prosemirror-adapter/react';
3
+ /**
4
+ * Sets the label of the mention rendered as `pill` (a `[data-mention-id]` element) in place.
5
+ * Returns `false` when `pill` is not a mounted mention pill. Hosts use this to keep the pill
6
+ * in sync with config edited outside the editor, without remounting it.
7
+ */
8
+ export declare function updateMentionLabel(pill: HTMLElement, label: string): boolean;
3
9
  export declare const MentionNodeView: () => import("react/jsx-runtime").JSX.Element;
4
10
  export declare function configureMentionNodeView(ctx: Ctx, nodeViewFactory: ReturnType<typeof useNodeViewFactory>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainfish-ai/editor",
3
- "version": "0.16.3",
3
+ "version": "0.16.5",
4
4
  "description": "Markdown editor package for Brainfish based on Milkdown",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": [
@@ -35,7 +35,7 @@
35
35
  "dist"
36
36
  ],
37
37
  "devDependencies": {
38
- "@brainfish-ai/components": "^0.36.0",
38
+ "@brainfish-ai/components": "^0.37.1",
39
39
  "@phosphor-icons/react": "^2.x",
40
40
  "@storybook/addon-docs": "^10.6.3",
41
41
  "@storybook/addon-links": "^10.6.3",
@@ -94,7 +94,7 @@
94
94
  "y-prosemirror": "^1.3.7"
95
95
  },
96
96
  "peerDependencies": {
97
- "@brainfish-ai/components": "^0.36.0",
97
+ "@brainfish-ai/components": "^0.37.1",
98
98
  "@phosphor-icons/react": "*",
99
99
  "clsx": "*",
100
100
  "lodash": "^4.x",