@brainfish-ai/editor 0.16.4 → 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 (29) hide show
  1. package/dist/{index-DnZLLzeC.js → index-B95nLLma.js} +2 -2
  2. package/dist/{index-BkpCLtjh.js → index-BMZMkble.js} +4 -4
  3. package/dist/{index-BiT1CaUK.js → index-BOu382Ca.js} +3 -3
  4. package/dist/{index-4Mg03NZ0.js → index-BPOh7gLI.js} +2 -2
  5. package/dist/{index-ImG4tGZ8.js → index-BPUuE877.js} +2 -2
  6. package/dist/{index-CvcXtLfn.js → index-BSHO896a.js} +3 -3
  7. package/dist/{index-DOSUqw2E.js → index-BdQHIgL9.js} +2 -2
  8. package/dist/{index-D_DH6CLj.js → index-BijrthrB.js} +3 -3
  9. package/dist/{index-BdcQa21o.js → index-BkWCmS7C.js} +2 -2
  10. package/dist/{index-DH5dBgli.js → index-Bsd4ABeE.js} +4 -4
  11. package/dist/{index-B72hrXZp.js → index-Bx9kPv2X.js} +2 -2
  12. package/dist/{index-B44gf6lc.js → index-C0FriEF6.js} +2 -2
  13. package/dist/{index-BuU-LxbL.js → index-CL74M0IX.js} +3 -3
  14. package/dist/{index-BzH29qwV.js → index-Ckz8fb1v.js} +4 -4
  15. package/dist/{index-BFdVwXxe.js → index-Cx6qw-AO.js} +2 -2
  16. package/dist/{index-DRSHBn8E.js → index-DS89xquM.js} +2 -2
  17. package/dist/{index-MGiiJ6ZI.js → index-Dr6hZgyB.js} +2 -2
  18. package/dist/{index-CIzWSWLU.js → index-DttUK7l_.js} +1 -1
  19. package/dist/{index-Ck4GUp6S.js → index-DyjkpfqJ.js} +2 -2
  20. package/dist/{index-Ce_sp8_S.js → index-Ew91ML7b.js} +2 -2
  21. package/dist/{index-BL3BrmJG.js → index-PALwbLkY.js} +47 -28
  22. package/dist/{index-DKpql_7V.js → index-VHSqM6do.js} +2 -2
  23. package/dist/{index-C7heuyel.js → index-siaDMBtt.js} +3 -3
  24. package/dist/{index-F6dIPhGZ.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/mentions/index.d.ts +1 -0
  28. package/dist/plugins/mentions/ui/node-view.d.ts +6 -0
  29. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { L as LRParser } from './index-CIzWSWLU.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-BL3BrmJG.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-BL3BrmJG.js';
2
- import { html } from './index-DH5dBgli.js';
3
- import { javascriptLanguage } from './index-B44gf6lc.js';
4
- import { L as LRParser, a as LocalTokenGroup } from './index-CIzWSWLU.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-CIzWSWLU.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-BL3BrmJG.js';
3
- import { html } from './index-DH5dBgli.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-BL3BrmJG.js';
2
- import { L as LRParser } from './index-CIzWSWLU.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-BL3BrmJG.js';
2
- import { html, htmlCompletionSource } from './index-DH5dBgli.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-BL3BrmJG.js';
2
- import { html } from './index-DH5dBgli.js';
3
- import { L as LRParser, E as ExternalTokenizer } from './index-CIzWSWLU.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-CIzWSWLU.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-BL3BrmJG.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-BL3BrmJG.js';
2
- import { html } from './index-DH5dBgli.js';
3
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-CIzWSWLU.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-CIzWSWLU.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-BL3BrmJG.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-CIzWSWLU.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-BL3BrmJG.js';
3
- import { cssLanguage, css } from './index-DKpql_7V.js';
4
- import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from './index-B44gf6lc.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-CIzWSWLU.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-BL3BrmJG.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-CIzWSWLU.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-BL3BrmJG.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-CIzWSWLU.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-BL3BrmJG.js';
3
- import { defineCSSCompletionSource } from './index-DKpql_7V.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-BL3BrmJG.js';
2
- import { html } from './index-DH5dBgli.js';
3
- import { javascriptLanguage } from './index-B44gf6lc.js';
4
- import { L as LRParser, E as ExternalTokenizer } from './index-CIzWSWLU.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-CIzWSWLU.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-BL3BrmJG.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-BL3BrmJG.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-BL3BrmJG.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-BL3BrmJG.js';
2
- import { E as ExternalTokenizer, L as LRParser } from './index-CIzWSWLU.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-BL3BrmJG.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-CIzWSWLU.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-BL3BrmJG.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-CIzWSWLU.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-BL3BrmJG.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,
@@ -41816,9 +41816,28 @@ function mentionContextFromNode(attrs, anchor, close) {
41816
41816
  close
41817
41817
  };
41818
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
+ }
41819
41825
  const MentionNodeView = () => {
41820
41826
  const { node, selected, view, getPos } = useNodeViewContext();
41821
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]);
41822
41841
  const providers = useMentionProviders();
41823
41842
  const parsed = mentionAttrsFromNode({
41824
41843
  type: node.attrs.type,
@@ -70405,7 +70424,7 @@ function legacy(parser) {
70405
70424
  return new LanguageSupport(StreamLanguage.define(parser));
70406
70425
  }
70407
70426
  function sql(dialectName) {
70408
- return import('./index-MGiiJ6ZI.js').then(m => m.sql({ dialect: m[dialectName] }));
70427
+ return import('./index-Dr6hZgyB.js').then(m => m.sql({ dialect: m[dialectName] }));
70409
70428
  }
70410
70429
  /**
70411
70430
  An array of language descriptions for known language packages.
@@ -70416,7 +70435,7 @@ const languages = [
70416
70435
  name: "C",
70417
70436
  extensions: ["c", "h", "ino"],
70418
70437
  load() {
70419
- return import('./index-DOSUqw2E.js').then(m => m.cpp());
70438
+ return import('./index-BdQHIgL9.js').then(m => m.cpp());
70420
70439
  }
70421
70440
  }),
70422
70441
  /*@__PURE__*/LanguageDescription.of({
@@ -70424,7 +70443,7 @@ const languages = [
70424
70443
  alias: ["cpp"],
70425
70444
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
70426
70445
  load() {
70427
- return import('./index-DOSUqw2E.js').then(m => m.cpp());
70446
+ return import('./index-BdQHIgL9.js').then(m => m.cpp());
70428
70447
  }
70429
70448
  }),
70430
70449
  /*@__PURE__*/LanguageDescription.of({
@@ -70437,14 +70456,14 @@ const languages = [
70437
70456
  name: "CSS",
70438
70457
  extensions: ["css"],
70439
70458
  load() {
70440
- return import('./index-DKpql_7V.js').then(m => m.css());
70459
+ return import('./index-VHSqM6do.js').then(m => m.css());
70441
70460
  }
70442
70461
  }),
70443
70462
  /*@__PURE__*/LanguageDescription.of({
70444
70463
  name: "Go",
70445
70464
  extensions: ["go"],
70446
70465
  load() {
70447
- return import('./index-BFdVwXxe.js').then(m => m.go());
70466
+ return import('./index-Cx6qw-AO.js').then(m => m.go());
70448
70467
  }
70449
70468
  }),
70450
70469
  /*@__PURE__*/LanguageDescription.of({
@@ -70452,14 +70471,14 @@ const languages = [
70452
70471
  alias: ["xhtml"],
70453
70472
  extensions: ["html", "htm", "handlebars", "hbs"],
70454
70473
  load() {
70455
- return import('./index-DH5dBgli.js').then(m => m.html());
70474
+ return import('./index-Bsd4ABeE.js').then(m => m.html());
70456
70475
  }
70457
70476
  }),
70458
70477
  /*@__PURE__*/LanguageDescription.of({
70459
70478
  name: "Java",
70460
70479
  extensions: ["java"],
70461
70480
  load() {
70462
- return import('./index-Ce_sp8_S.js').then(m => m.java());
70481
+ return import('./index-Ew91ML7b.js').then(m => m.java());
70463
70482
  }
70464
70483
  }),
70465
70484
  /*@__PURE__*/LanguageDescription.of({
@@ -70467,14 +70486,14 @@ const languages = [
70467
70486
  alias: ["ecmascript", "js", "node"],
70468
70487
  extensions: ["js", "mjs", "cjs"],
70469
70488
  load() {
70470
- return import('./index-B44gf6lc.js').then(m => m.javascript());
70489
+ return import('./index-C0FriEF6.js').then(m => m.javascript());
70471
70490
  }
70472
70491
  }),
70473
70492
  /*@__PURE__*/LanguageDescription.of({
70474
70493
  name: "Jinja",
70475
70494
  extensions: ["j2", "jinja", "jinja2"],
70476
70495
  load() {
70477
- return import('./index-D_DH6CLj.js').then(m => m.jinja());
70496
+ return import('./index-BijrthrB.js').then(m => m.jinja());
70478
70497
  }
70479
70498
  }),
70480
70499
  /*@__PURE__*/LanguageDescription.of({
@@ -70482,28 +70501,28 @@ const languages = [
70482
70501
  alias: ["json5"],
70483
70502
  extensions: ["json", "map"],
70484
70503
  load() {
70485
- return import('./index-DnZLLzeC.js').then(m => m.json());
70504
+ return import('./index-B95nLLma.js').then(m => m.json());
70486
70505
  }
70487
70506
  }),
70488
70507
  /*@__PURE__*/LanguageDescription.of({
70489
70508
  name: "JSX",
70490
70509
  extensions: ["jsx"],
70491
70510
  load() {
70492
- return import('./index-B44gf6lc.js').then(m => m.javascript({ jsx: true }));
70511
+ return import('./index-C0FriEF6.js').then(m => m.javascript({ jsx: true }));
70493
70512
  }
70494
70513
  }),
70495
70514
  /*@__PURE__*/LanguageDescription.of({
70496
70515
  name: "LESS",
70497
70516
  extensions: ["less"],
70498
70517
  load() {
70499
- return import('./index-C7heuyel.js').then(m => m.less());
70518
+ return import('./index-siaDMBtt.js').then(m => m.less());
70500
70519
  }
70501
70520
  }),
70502
70521
  /*@__PURE__*/LanguageDescription.of({
70503
70522
  name: "Liquid",
70504
70523
  extensions: ["liquid"],
70505
70524
  load() {
70506
- return import('./index-CvcXtLfn.js').then(m => m.liquid());
70525
+ return import('./index-BSHO896a.js').then(m => m.liquid());
70507
70526
  }
70508
70527
  }),
70509
70528
  /*@__PURE__*/LanguageDescription.of({
@@ -70514,7 +70533,7 @@ const languages = [
70514
70533
  name: "Markdown",
70515
70534
  extensions: ["md", "markdown", "mkd"],
70516
70535
  load() {
70517
- return import('./index-ImG4tGZ8.js').then(m => m.markdown());
70536
+ return import('./index-BPUuE877.js').then(m => m.markdown());
70518
70537
  }
70519
70538
  }),
70520
70539
  /*@__PURE__*/LanguageDescription.of({
@@ -70529,7 +70548,7 @@ const languages = [
70529
70548
  name: "PHP",
70530
70549
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
70531
70550
  load() {
70532
- return import('./index-BiT1CaUK.js').then(m => m.php());
70551
+ return import('./index-BOu382Ca.js').then(m => m.php());
70533
70552
  }
70534
70553
  }),
70535
70554
  /*@__PURE__*/LanguageDescription.of({
@@ -70546,28 +70565,28 @@ const languages = [
70546
70565
  extensions: ["BUILD", "bzl", "py", "pyw"],
70547
70566
  filename: /^(BUCK|BUILD)$/,
70548
70567
  load() {
70549
- return import('./index-Ck4GUp6S.js').then(m => m.python());
70568
+ return import('./index-DyjkpfqJ.js').then(m => m.python());
70550
70569
  }
70551
70570
  }),
70552
70571
  /*@__PURE__*/LanguageDescription.of({
70553
70572
  name: "Rust",
70554
70573
  extensions: ["rs"],
70555
70574
  load() {
70556
- return import('./index-F6dIPhGZ.js').then(m => m.rust());
70575
+ return import('./index-tFUgwE77.js').then(m => m.rust());
70557
70576
  }
70558
70577
  }),
70559
70578
  /*@__PURE__*/LanguageDescription.of({
70560
70579
  name: "Sass",
70561
70580
  extensions: ["sass"],
70562
70581
  load() {
70563
- return import('./index-BuU-LxbL.js').then(m => m.sass({ indented: true }));
70582
+ return import('./index-CL74M0IX.js').then(m => m.sass({ indented: true }));
70564
70583
  }
70565
70584
  }),
70566
70585
  /*@__PURE__*/LanguageDescription.of({
70567
70586
  name: "SCSS",
70568
70587
  extensions: ["scss"],
70569
70588
  load() {
70570
- return import('./index-BuU-LxbL.js').then(m => m.sass());
70589
+ return import('./index-CL74M0IX.js').then(m => m.sass());
70571
70590
  }
70572
70591
  }),
70573
70592
  /*@__PURE__*/LanguageDescription.of({
@@ -70583,7 +70602,7 @@ const languages = [
70583
70602
  name: "TSX",
70584
70603
  extensions: ["tsx"],
70585
70604
  load() {
70586
- return import('./index-B44gf6lc.js').then(m => m.javascript({ jsx: true, typescript: true }));
70605
+ return import('./index-C0FriEF6.js').then(m => m.javascript({ jsx: true, typescript: true }));
70587
70606
  }
70588
70607
  }),
70589
70608
  /*@__PURE__*/LanguageDescription.of({
@@ -70591,14 +70610,14 @@ const languages = [
70591
70610
  alias: ["ts"],
70592
70611
  extensions: ["ts", "mts", "cts"],
70593
70612
  load() {
70594
- return import('./index-B44gf6lc.js').then(m => m.javascript({ typescript: true }));
70613
+ return import('./index-C0FriEF6.js').then(m => m.javascript({ typescript: true }));
70595
70614
  }
70596
70615
  }),
70597
70616
  /*@__PURE__*/LanguageDescription.of({
70598
70617
  name: "WebAssembly",
70599
70618
  extensions: ["wat", "wast"],
70600
70619
  load() {
70601
- return import('./index-4Mg03NZ0.js').then(m => m.wast());
70620
+ return import('./index-BPOh7gLI.js').then(m => m.wast());
70602
70621
  }
70603
70622
  }),
70604
70623
  /*@__PURE__*/LanguageDescription.of({
@@ -70606,7 +70625,7 @@ const languages = [
70606
70625
  alias: ["rss", "wsdl", "xsd"],
70607
70626
  extensions: ["xml", "xsl", "xsd", "svg"],
70608
70627
  load() {
70609
- return import('./index-B72hrXZp.js').then(m => m.xml());
70628
+ return import('./index-Bx9kPv2X.js').then(m => m.xml());
70610
70629
  }
70611
70630
  }),
70612
70631
  /*@__PURE__*/LanguageDescription.of({
@@ -70614,7 +70633,7 @@ const languages = [
70614
70633
  alias: ["yml"],
70615
70634
  extensions: ["yaml", "yml"],
70616
70635
  load() {
70617
- return import('./index-BdcQa21o.js').then(m => m.yaml());
70636
+ return import('./index-BkWCmS7C.js').then(m => m.yaml());
70618
70637
  }
70619
70638
  }),
70620
70639
  // Legacy modes ported from CodeMirror 5
@@ -71403,13 +71422,13 @@ const languages = [
71403
71422
  name: "Vue",
71404
71423
  extensions: ["vue"],
71405
71424
  load() {
71406
- return import('./index-BkpCLtjh.js').then(m => m.vue());
71425
+ return import('./index-BMZMkble.js').then(m => m.vue());
71407
71426
  }
71408
71427
  }),
71409
71428
  /*@__PURE__*/LanguageDescription.of({
71410
71429
  name: "Angular Template",
71411
71430
  load() {
71412
- return import('./index-BzH29qwV.js').then(m => m.angular());
71431
+ return import('./index-Ckz8fb1v.js').then(m => m.angular());
71413
71432
  }
71414
71433
  })
71415
71434
  ];
@@ -124650,7 +124669,7 @@ function useSlashMenuPortal(container) {
124650
124669
  }
124651
124670
 
124652
124671
  const ReviewSuggestionsViewport = lazy(
124653
- () => import('./index-DRSHBn8E.js').then((module) => ({ default: module.ReviewSuggestionsViewport }))
124672
+ () => import('./index-DS89xquM.js').then((module) => ({ default: module.ReviewSuggestionsViewport }))
124654
124673
  );
124655
124674
  const MilkdownEditorInner = ({
124656
124675
  readOnly = false,
@@ -125083,4 +125102,4 @@ const MarkdownSourceEditor = React.forwardRef(
125083
125102
  }
125084
125103
  );
125085
125104
 
125086
- 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-CIzWSWLU.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-BL3BrmJG.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-BL3BrmJG.js';
2
- import { defineCSSCompletionSource } from './index-DKpql_7V.js';
3
- import { L as LRParser, E as ExternalTokenizer } from './index-CIzWSWLU.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-CIzWSWLU.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-BL3BrmJG.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-BL3BrmJG.js';
1
+ export { ac as BrainfishEditor, ad as MarkdownSourceEditor, ae as MilkdownProvider, j as createReviewSuggestionBulkActions, af as updateMentionLabel } from './index-PALwbLkY.js';
@@ -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.4",
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": [