@brainfish-ai/editor 0.16.1 → 0.16.3

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 (40) hide show
  1. package/dist/editor/internal/codeMirrorTheme.d.ts +14 -0
  2. package/dist/{index-FnbDXzus.js → index-B7G61KeU.js} +1 -1
  3. package/dist/{index-D1lvHOEq.js → index-BCU5wvMA.js} +2 -2
  4. package/dist/{index-D2xHwKn1.js → index-BgpucQu9.js} +3 -3
  5. package/dist/{index-B3Tj0aeA.js → index-BrHQTa5O.js} +2 -2
  6. package/dist/{index-DLaMyc-O.js → index-Byx5Rin8.js} +2 -2
  7. package/dist/{index-DaEJooLf.js → index-CHiJxeZP.js} +2 -2
  8. package/dist/{index-DQl-jPCB.js → index-CSYZYQcP.js} +2 -2
  9. package/dist/{index-yGP3q8Ph.js → index-CZ_tRMOP.js} +3 -3
  10. package/dist/{index-ugK_d0Eb.js → index-CgxTSc3A.js} +2 -2
  11. package/dist/{index-DcHkonsK.js → index-D3qfXl4a.js} +4 -4
  12. package/dist/{index-3kIhnnQF.js → index-DC8dl4wM.js} +3 -3
  13. package/dist/{index-BoGCS5K8.js → index-DHS4fqlV.js} +2 -2
  14. package/dist/{index-TzlF4I2U.js → index-D_WC_iU-.js} +2 -2
  15. package/dist/{index-DmshtaDi.js → index-DgawIQVL.js} +3 -3
  16. package/dist/{index-Pbdt_JAa.js → index-DysiDhtD.js} +2 -2
  17. package/dist/{index-DC7kmwxC.js → index-FrO1JgY0.js} +4 -4
  18. package/dist/{index-BgzDJCPK.js → index-QwNEKxue.js} +2 -2
  19. package/dist/{index-o1kUBM0B.js → index-f6Jh9zCn.js} +494 -163
  20. package/dist/{index-DPERyOhC.js → index-hvx6Ru78.js} +2 -2
  21. package/dist/{index-DnIbufdg.js → index-ioAG3mIK.js} +3 -3
  22. package/dist/{index-dd3JkZcJ.js → index-nC_e7r57.js} +2 -2
  23. package/dist/{index-mjlRw27L.js → index-wcyxRMSc.js} +2 -2
  24. package/dist/{index-DO4yrIc-.js → index-wnkG3YUJ.js} +4 -4
  25. package/dist/{index-CkC8SVWG.js → index-xzCgWTs0.js} +2 -2
  26. package/dist/index.js +1 -1
  27. package/dist/markdown-source-editor/MarkdownSourceEditor.d.ts +2 -0
  28. package/dist/plugins/mentions/core/types.d.ts +2 -0
  29. package/dist/plugins/mentions/integration/slash-factory.d.ts +5 -0
  30. package/dist/plugins/mentions/integration/slash-keydown.d.ts +1 -0
  31. package/dist/plugins/mentions/ui/MentionSlashView.d.ts +1 -0
  32. package/dist/plugins/mentions/ui/filterMentionSlashRows.d.ts +16 -0
  33. package/dist/plugins/mentions/ui/loadMentionSlashMenu.d.ts +9 -0
  34. package/dist/plugins/mentions/ui/mentionSlashMenuState.d.ts +57 -0
  35. package/dist/plugins/mentions/ui/runtime.d.ts +5 -0
  36. package/dist/plugins/mentions/ui/useMentionSlashMenu.d.ts +8 -11
  37. package/dist/stories/mentionBreakFixtures.d.ts +11 -0
  38. package/dist/stories/storybook-utils.d.ts +4 -0
  39. package/dist/types.d.ts +8 -0
  40. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { Extension } from '@codemirror/state';
3
+ import { ViewPlugin } from '@codemirror/view';
4
+ /**
5
+ * Crepe bakes the CodeMirror theme when the editor is created. `html.dark` often
6
+ * lands after that (Storybook theme decorator, platform class toggle), so the
7
+ * crepe CSS variables go dark while CodeMirror stays on the light theme.
8
+ * Compartment lets existing and later-mounted code blocks follow the live theme.
9
+ */
10
+ export declare const codeMirrorThemeConfig: (themeRef: MutableRefObject<"light" | "dark">) => {
11
+ theme: Extension;
12
+ extensions: ViewPlugin<{}, undefined>[];
13
+ };
14
+ export declare const syncCodeMirrorTheme: (root: ParentNode, theme: "light" | "dark") => void;
@@ -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-o1kUBM0B.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-f6Jh9zCn.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 } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const closureParamDelim = 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-o1kUBM0B.js';
2
- import { html } from './index-DO4yrIc-.js';
3
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-FnbDXzus.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-f6Jh9zCn.js';
2
+ import { html } from './index-wnkG3YUJ.js';
3
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-B7G61KeU.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 { 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-o1kUBM0B.js';
2
- import { L as LRParser } from './index-FnbDXzus.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-f6Jh9zCn.js';
2
+ import { L as LRParser } from './index-B7G61KeU.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 { L as LRParser, E as ExternalTokenizer } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const RawString = 1,
@@ -1,5 +1,5 @@
1
- import { L as LRParser } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
3
3
 
4
4
  const javaHighlighting = styleTags({
5
5
  null: tags.null,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
3
3
 
4
4
  // This file was generated by lezer-generator. You probably shouldn't edit it.
5
5
  const blockEnd = 63,
@@ -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-o1kUBM0B.js';
2
- import { html } from './index-DO4yrIc-.js';
3
- import { L as LRParser, E as ExternalTokenizer } from './index-FnbDXzus.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-f6Jh9zCn.js';
2
+ import { html } from './index-wnkG3YUJ.js';
3
+ import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.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 { 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-o1kUBM0B.js';
2
- import { html, htmlCompletionSource } from './index-DO4yrIc-.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-f6Jh9zCn.js';
2
+ import { html, htmlCompletionSource } from './index-wnkG3YUJ.js';
3
3
 
4
4
  class CompositeBlock {
5
5
  static create(type, value, from, parentHash, end) {
@@ -1,7 +1,7 @@
1
- import { L as LRLanguage, A as LanguageSupport, S as parseMixed, E as styleTags, F as tags } from './index-o1kUBM0B.js';
2
- import { html } from './index-DO4yrIc-.js';
3
- import { javascriptLanguage } from './index-CkC8SVWG.js';
4
- import { L as LRParser, a as LocalTokenGroup } from './index-FnbDXzus.js';
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';
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-FnbDXzus.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-o1kUBM0B.js';
3
- import { html } from './index-DO4yrIc-.js';
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';
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 { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
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 { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
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-o1kUBM0B.js';
2
- import { defineCSSCompletionSource } from './index-TzlF4I2U.js';
3
- import { L as LRParser, E as ExternalTokenizer } from './index-FnbDXzus.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-f6Jh9zCn.js';
2
+ import { defineCSSCompletionSource } from './index-D_WC_iU-.js';
3
+ import { L as LRParser, E as ExternalTokenizer } from './index-B7G61KeU.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 } from './index-FnbDXzus.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-o1kUBM0B.js';
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';
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-o1kUBM0B.js';
2
- import { html } from './index-DO4yrIc-.js';
3
- import { javascriptLanguage } from './index-CkC8SVWG.js';
4
- import { L as LRParser, E as ExternalTokenizer } from './index-FnbDXzus.js';
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';
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 { 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-o1kUBM0B.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-o1kUBM0B.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-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';
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';