@brainfish-ai/editor 0.16.3 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BrHQTa5O.js → index-4Mg03NZ0.js} +2 -2
- package/dist/{index-xzCgWTs0.js → index-B44gf6lc.js} +2 -2
- package/dist/{index-wcyxRMSc.js → index-B72hrXZp.js} +2 -2
- package/dist/{index-DHS4fqlV.js → index-BFdVwXxe.js} +2 -2
- package/dist/{index-f6Jh9zCn.js → index-BL3BrmJG.js} +94 -43
- package/dist/{index-CSYZYQcP.js → index-BdcQa21o.js} +2 -2
- package/dist/{index-DC8dl4wM.js → index-BiT1CaUK.js} +3 -3
- package/dist/{index-D3qfXl4a.js → index-BkpCLtjh.js} +4 -4
- package/dist/{index-ioAG3mIK.js → index-BuU-LxbL.js} +3 -3
- package/dist/{index-FrO1JgY0.js → index-BzH29qwV.js} +4 -4
- package/dist/{index-DgawIQVL.js → index-C7heuyel.js} +3 -3
- package/dist/{index-B7G61KeU.js → index-CIzWSWLU.js} +1 -1
- package/dist/{index-CHiJxeZP.js → index-Ce_sp8_S.js} +2 -2
- package/dist/{index-nC_e7r57.js → index-Ck4GUp6S.js} +2 -2
- package/dist/{index-CZ_tRMOP.js → index-CvcXtLfn.js} +3 -3
- package/dist/{index-wnkG3YUJ.js → index-DH5dBgli.js} +4 -4
- package/dist/{index-D_WC_iU-.js → index-DKpql_7V.js} +2 -2
- package/dist/{index-Byx5Rin8.js → index-DOSUqw2E.js} +2 -2
- package/dist/{index-QwNEKxue.js → index-DRSHBn8E.js} +2 -2
- package/dist/{index-BgpucQu9.js → index-D_DH6CLj.js} +3 -3
- package/dist/{index-DysiDhtD.js → index-DnZLLzeC.js} +2 -2
- package/dist/{index-BCU5wvMA.js → index-F6dIPhGZ.js} +2 -2
- package/dist/{index-CgxTSc3A.js → index-ImG4tGZ8.js} +2 -2
- package/dist/{index-hvx6Ru78.js → index-MGiiJ6ZI.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/plugins/emoji/suggest.d.ts +3 -0
- package/dist/plugins/mentions/core/types.d.ts +6 -2
- package/package.json +3 -3
|
@@ -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-
|
|
2
|
-
import { L as LRParser } from './index-
|
|
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';
|
|
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, a as LocalTokenGroup, C as ContextTracker } from './index-
|
|
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-
|
|
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';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const noSemi = 316,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-
|
|
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-
|
|
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';
|
|
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-
|
|
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-
|
|
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';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const insertedSemi = 177,
|
|
@@ -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;
|
|
@@ -41831,7 +41835,7 @@ const MentionNodeView = () => {
|
|
|
41831
41835
|
attrs: flattenMentionAttrs(parsed)
|
|
41832
41836
|
})
|
|
41833
41837
|
);
|
|
41834
|
-
const TypeIcon = provider
|
|
41838
|
+
const TypeIcon = pillIcon(provider, provider ? parsed.extra[provider.refAttr] : void 0);
|
|
41835
41839
|
const canPreview = Boolean(provider?.onClick);
|
|
41836
41840
|
const [open, setOpen] = useState(false);
|
|
41837
41841
|
const [content, setContent] = useState(null);
|
|
@@ -41881,7 +41885,15 @@ const MentionNodeView = () => {
|
|
|
41881
41885
|
moveCaretOffMention(view, pos, node.nodeSize, event.key);
|
|
41882
41886
|
},
|
|
41883
41887
|
children: [
|
|
41884
|
-
invalid ? /* @__PURE__ */ jsx(Warning, { size: 16, weight: "regular", className: "shrink-0", "data-testid": "mention-pill-warning" }) : TypeIcon ? /* @__PURE__ */ jsx(
|
|
41888
|
+
invalid ? /* @__PURE__ */ jsx(Warning, { size: 16, weight: "regular", className: "shrink-0", "data-testid": "mention-pill-warning" }) : TypeIcon ? /* @__PURE__ */ jsx(
|
|
41889
|
+
TypeIcon,
|
|
41890
|
+
{
|
|
41891
|
+
size: 16,
|
|
41892
|
+
weight: provider?.iconWeight ?? "regular",
|
|
41893
|
+
className: "shrink-0",
|
|
41894
|
+
"data-testid": "mention-pill-type-icon"
|
|
41895
|
+
}
|
|
41896
|
+
) : null,
|
|
41885
41897
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", title: parsed.label || parsed.type, children: parsed.label || parsed.type })
|
|
41886
41898
|
]
|
|
41887
41899
|
}
|
|
@@ -70393,7 +70405,7 @@ function legacy(parser) {
|
|
|
70393
70405
|
return new LanguageSupport(StreamLanguage.define(parser));
|
|
70394
70406
|
}
|
|
70395
70407
|
function sql(dialectName) {
|
|
70396
|
-
return import('./index-
|
|
70408
|
+
return import('./index-MGiiJ6ZI.js').then(m => m.sql({ dialect: m[dialectName] }));
|
|
70397
70409
|
}
|
|
70398
70410
|
/**
|
|
70399
70411
|
An array of language descriptions for known language packages.
|
|
@@ -70404,7 +70416,7 @@ const languages = [
|
|
|
70404
70416
|
name: "C",
|
|
70405
70417
|
extensions: ["c", "h", "ino"],
|
|
70406
70418
|
load() {
|
|
70407
|
-
return import('./index-
|
|
70419
|
+
return import('./index-DOSUqw2E.js').then(m => m.cpp());
|
|
70408
70420
|
}
|
|
70409
70421
|
}),
|
|
70410
70422
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70412,7 +70424,7 @@ const languages = [
|
|
|
70412
70424
|
alias: ["cpp"],
|
|
70413
70425
|
extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
|
|
70414
70426
|
load() {
|
|
70415
|
-
return import('./index-
|
|
70427
|
+
return import('./index-DOSUqw2E.js').then(m => m.cpp());
|
|
70416
70428
|
}
|
|
70417
70429
|
}),
|
|
70418
70430
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70425,14 +70437,14 @@ const languages = [
|
|
|
70425
70437
|
name: "CSS",
|
|
70426
70438
|
extensions: ["css"],
|
|
70427
70439
|
load() {
|
|
70428
|
-
return import('./index-
|
|
70440
|
+
return import('./index-DKpql_7V.js').then(m => m.css());
|
|
70429
70441
|
}
|
|
70430
70442
|
}),
|
|
70431
70443
|
/*@__PURE__*/LanguageDescription.of({
|
|
70432
70444
|
name: "Go",
|
|
70433
70445
|
extensions: ["go"],
|
|
70434
70446
|
load() {
|
|
70435
|
-
return import('./index-
|
|
70447
|
+
return import('./index-BFdVwXxe.js').then(m => m.go());
|
|
70436
70448
|
}
|
|
70437
70449
|
}),
|
|
70438
70450
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70440,14 +70452,14 @@ const languages = [
|
|
|
70440
70452
|
alias: ["xhtml"],
|
|
70441
70453
|
extensions: ["html", "htm", "handlebars", "hbs"],
|
|
70442
70454
|
load() {
|
|
70443
|
-
return import('./index-
|
|
70455
|
+
return import('./index-DH5dBgli.js').then(m => m.html());
|
|
70444
70456
|
}
|
|
70445
70457
|
}),
|
|
70446
70458
|
/*@__PURE__*/LanguageDescription.of({
|
|
70447
70459
|
name: "Java",
|
|
70448
70460
|
extensions: ["java"],
|
|
70449
70461
|
load() {
|
|
70450
|
-
return import('./index-
|
|
70462
|
+
return import('./index-Ce_sp8_S.js').then(m => m.java());
|
|
70451
70463
|
}
|
|
70452
70464
|
}),
|
|
70453
70465
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70455,14 +70467,14 @@ const languages = [
|
|
|
70455
70467
|
alias: ["ecmascript", "js", "node"],
|
|
70456
70468
|
extensions: ["js", "mjs", "cjs"],
|
|
70457
70469
|
load() {
|
|
70458
|
-
return import('./index-
|
|
70470
|
+
return import('./index-B44gf6lc.js').then(m => m.javascript());
|
|
70459
70471
|
}
|
|
70460
70472
|
}),
|
|
70461
70473
|
/*@__PURE__*/LanguageDescription.of({
|
|
70462
70474
|
name: "Jinja",
|
|
70463
70475
|
extensions: ["j2", "jinja", "jinja2"],
|
|
70464
70476
|
load() {
|
|
70465
|
-
return import('./index-
|
|
70477
|
+
return import('./index-D_DH6CLj.js').then(m => m.jinja());
|
|
70466
70478
|
}
|
|
70467
70479
|
}),
|
|
70468
70480
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70470,28 +70482,28 @@ const languages = [
|
|
|
70470
70482
|
alias: ["json5"],
|
|
70471
70483
|
extensions: ["json", "map"],
|
|
70472
70484
|
load() {
|
|
70473
|
-
return import('./index-
|
|
70485
|
+
return import('./index-DnZLLzeC.js').then(m => m.json());
|
|
70474
70486
|
}
|
|
70475
70487
|
}),
|
|
70476
70488
|
/*@__PURE__*/LanguageDescription.of({
|
|
70477
70489
|
name: "JSX",
|
|
70478
70490
|
extensions: ["jsx"],
|
|
70479
70491
|
load() {
|
|
70480
|
-
return import('./index-
|
|
70492
|
+
return import('./index-B44gf6lc.js').then(m => m.javascript({ jsx: true }));
|
|
70481
70493
|
}
|
|
70482
70494
|
}),
|
|
70483
70495
|
/*@__PURE__*/LanguageDescription.of({
|
|
70484
70496
|
name: "LESS",
|
|
70485
70497
|
extensions: ["less"],
|
|
70486
70498
|
load() {
|
|
70487
|
-
return import('./index-
|
|
70499
|
+
return import('./index-C7heuyel.js').then(m => m.less());
|
|
70488
70500
|
}
|
|
70489
70501
|
}),
|
|
70490
70502
|
/*@__PURE__*/LanguageDescription.of({
|
|
70491
70503
|
name: "Liquid",
|
|
70492
70504
|
extensions: ["liquid"],
|
|
70493
70505
|
load() {
|
|
70494
|
-
return import('./index-
|
|
70506
|
+
return import('./index-CvcXtLfn.js').then(m => m.liquid());
|
|
70495
70507
|
}
|
|
70496
70508
|
}),
|
|
70497
70509
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70502,7 +70514,7 @@ const languages = [
|
|
|
70502
70514
|
name: "Markdown",
|
|
70503
70515
|
extensions: ["md", "markdown", "mkd"],
|
|
70504
70516
|
load() {
|
|
70505
|
-
return import('./index-
|
|
70517
|
+
return import('./index-ImG4tGZ8.js').then(m => m.markdown());
|
|
70506
70518
|
}
|
|
70507
70519
|
}),
|
|
70508
70520
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70517,7 +70529,7 @@ const languages = [
|
|
|
70517
70529
|
name: "PHP",
|
|
70518
70530
|
extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
|
|
70519
70531
|
load() {
|
|
70520
|
-
return import('./index-
|
|
70532
|
+
return import('./index-BiT1CaUK.js').then(m => m.php());
|
|
70521
70533
|
}
|
|
70522
70534
|
}),
|
|
70523
70535
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70534,28 +70546,28 @@ const languages = [
|
|
|
70534
70546
|
extensions: ["BUILD", "bzl", "py", "pyw"],
|
|
70535
70547
|
filename: /^(BUCK|BUILD)$/,
|
|
70536
70548
|
load() {
|
|
70537
|
-
return import('./index-
|
|
70549
|
+
return import('./index-Ck4GUp6S.js').then(m => m.python());
|
|
70538
70550
|
}
|
|
70539
70551
|
}),
|
|
70540
70552
|
/*@__PURE__*/LanguageDescription.of({
|
|
70541
70553
|
name: "Rust",
|
|
70542
70554
|
extensions: ["rs"],
|
|
70543
70555
|
load() {
|
|
70544
|
-
return import('./index-
|
|
70556
|
+
return import('./index-F6dIPhGZ.js').then(m => m.rust());
|
|
70545
70557
|
}
|
|
70546
70558
|
}),
|
|
70547
70559
|
/*@__PURE__*/LanguageDescription.of({
|
|
70548
70560
|
name: "Sass",
|
|
70549
70561
|
extensions: ["sass"],
|
|
70550
70562
|
load() {
|
|
70551
|
-
return import('./index-
|
|
70563
|
+
return import('./index-BuU-LxbL.js').then(m => m.sass({ indented: true }));
|
|
70552
70564
|
}
|
|
70553
70565
|
}),
|
|
70554
70566
|
/*@__PURE__*/LanguageDescription.of({
|
|
70555
70567
|
name: "SCSS",
|
|
70556
70568
|
extensions: ["scss"],
|
|
70557
70569
|
load() {
|
|
70558
|
-
return import('./index-
|
|
70570
|
+
return import('./index-BuU-LxbL.js').then(m => m.sass());
|
|
70559
70571
|
}
|
|
70560
70572
|
}),
|
|
70561
70573
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70571,7 +70583,7 @@ const languages = [
|
|
|
70571
70583
|
name: "TSX",
|
|
70572
70584
|
extensions: ["tsx"],
|
|
70573
70585
|
load() {
|
|
70574
|
-
return import('./index-
|
|
70586
|
+
return import('./index-B44gf6lc.js').then(m => m.javascript({ jsx: true, typescript: true }));
|
|
70575
70587
|
}
|
|
70576
70588
|
}),
|
|
70577
70589
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70579,14 +70591,14 @@ const languages = [
|
|
|
70579
70591
|
alias: ["ts"],
|
|
70580
70592
|
extensions: ["ts", "mts", "cts"],
|
|
70581
70593
|
load() {
|
|
70582
|
-
return import('./index-
|
|
70594
|
+
return import('./index-B44gf6lc.js').then(m => m.javascript({ typescript: true }));
|
|
70583
70595
|
}
|
|
70584
70596
|
}),
|
|
70585
70597
|
/*@__PURE__*/LanguageDescription.of({
|
|
70586
70598
|
name: "WebAssembly",
|
|
70587
70599
|
extensions: ["wat", "wast"],
|
|
70588
70600
|
load() {
|
|
70589
|
-
return import('./index-
|
|
70601
|
+
return import('./index-4Mg03NZ0.js').then(m => m.wast());
|
|
70590
70602
|
}
|
|
70591
70603
|
}),
|
|
70592
70604
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70594,7 +70606,7 @@ const languages = [
|
|
|
70594
70606
|
alias: ["rss", "wsdl", "xsd"],
|
|
70595
70607
|
extensions: ["xml", "xsl", "xsd", "svg"],
|
|
70596
70608
|
load() {
|
|
70597
|
-
return import('./index-
|
|
70609
|
+
return import('./index-B72hrXZp.js').then(m => m.xml());
|
|
70598
70610
|
}
|
|
70599
70611
|
}),
|
|
70600
70612
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -70602,7 +70614,7 @@ const languages = [
|
|
|
70602
70614
|
alias: ["yml"],
|
|
70603
70615
|
extensions: ["yaml", "yml"],
|
|
70604
70616
|
load() {
|
|
70605
|
-
return import('./index-
|
|
70617
|
+
return import('./index-BdcQa21o.js').then(m => m.yaml());
|
|
70606
70618
|
}
|
|
70607
70619
|
}),
|
|
70608
70620
|
// Legacy modes ported from CodeMirror 5
|
|
@@ -71391,13 +71403,13 @@ const languages = [
|
|
|
71391
71403
|
name: "Vue",
|
|
71392
71404
|
extensions: ["vue"],
|
|
71393
71405
|
load() {
|
|
71394
|
-
return import('./index-
|
|
71406
|
+
return import('./index-BkpCLtjh.js').then(m => m.vue());
|
|
71395
71407
|
}
|
|
71396
71408
|
}),
|
|
71397
71409
|
/*@__PURE__*/LanguageDescription.of({
|
|
71398
71410
|
name: "Angular Template",
|
|
71399
71411
|
load() {
|
|
71400
|
-
return import('./index-
|
|
71412
|
+
return import('./index-BzH29qwV.js').then(m => m.angular());
|
|
71401
71413
|
}
|
|
71402
71414
|
})
|
|
71403
71415
|
];
|
|
@@ -122207,6 +122219,7 @@ const emojiSuggestProsePlugin = $prose((ctx) => {
|
|
|
122207
122219
|
selectedIndex = prev.selectedIndex;
|
|
122208
122220
|
if (nav === "next") selectedIndex = (selectedIndex + 1) % items.length;
|
|
122209
122221
|
if (nav === "prev") selectedIndex = (selectedIndex - 1 + items.length) % items.length;
|
|
122222
|
+
if (typeof nav === "number") selectedIndex = Math.min(Math.max(0, nav), items.length - 1);
|
|
122210
122223
|
}
|
|
122211
122224
|
return {
|
|
122212
122225
|
active: true,
|
|
@@ -122250,6 +122263,13 @@ const emojiSuggestProsePlugin = $prose((ctx) => {
|
|
|
122250
122263
|
}
|
|
122251
122264
|
});
|
|
122252
122265
|
});
|
|
122266
|
+
function setEmojiSuggestIndex(view, index) {
|
|
122267
|
+
view.dispatch(view.state.tr.setMeta(emojiSuggestNavMeta, index));
|
|
122268
|
+
}
|
|
122269
|
+
function insertEmojiFromSuggest(ctx, from, to, emoji) {
|
|
122270
|
+
const view = ctx.get(editorViewCtx);
|
|
122271
|
+
insertPicked(view, ctx, from, to, emoji);
|
|
122272
|
+
}
|
|
122253
122273
|
|
|
122254
122274
|
const EMOJI_TOOLTIP_NAME = "emoji-suggest";
|
|
122255
122275
|
const emojiTooltip = tooltipFactory("BRAINFISH_EMOJI");
|
|
@@ -122272,6 +122292,10 @@ function tooltipPosition(view, panel) {
|
|
|
122272
122292
|
const top = above ? coords.top - r.top - GAP : coords.bottom - r.top + GAP;
|
|
122273
122293
|
return { top, left, above };
|
|
122274
122294
|
}
|
|
122295
|
+
function optionIndex(target) {
|
|
122296
|
+
const raw = target.closest?.("[data-index]")?.getAttribute("data-index");
|
|
122297
|
+
return raw == null ? null : Number(raw);
|
|
122298
|
+
}
|
|
122275
122299
|
const EmojiTooltipView = () => {
|
|
122276
122300
|
const { view } = usePluginViewContext();
|
|
122277
122301
|
const { getInstance } = useEditorAction();
|
|
@@ -122297,17 +122321,43 @@ const EmojiTooltipView = () => {
|
|
|
122297
122321
|
left: pos.left,
|
|
122298
122322
|
transform: pos.above ? "translateY(-100%)" : void 0
|
|
122299
122323
|
},
|
|
122300
|
-
children: /* @__PURE__ */ jsx("div", { className: "menu-groups", children: /* @__PURE__ */ jsx("div", { className: "menu-group", children: /* @__PURE__ */ jsx(
|
|
122301
|
-
|
|
122302
|
-
|
|
122303
|
-
|
|
122304
|
-
|
|
122305
|
-
|
|
122306
|
-
|
|
122307
|
-
|
|
122308
|
-
|
|
122309
|
-
|
|
122310
|
-
|
|
122324
|
+
children: /* @__PURE__ */ jsx("div", { className: "menu-groups", children: /* @__PURE__ */ jsx("div", { className: "menu-group", children: /* @__PURE__ */ jsx(
|
|
122325
|
+
"ul",
|
|
122326
|
+
{
|
|
122327
|
+
role: "listbox",
|
|
122328
|
+
onMouseMove: (event) => {
|
|
122329
|
+
const index = optionIndex(event.target);
|
|
122330
|
+
if (index !== null && index !== panel.selectedIndex && view) setEmojiSuggestIndex(view, index);
|
|
122331
|
+
},
|
|
122332
|
+
onMouseDown: (event) => {
|
|
122333
|
+
event.preventDefault();
|
|
122334
|
+
const index = optionIndex(event.target);
|
|
122335
|
+
const item = index === null ? void 0 : panel.items[index];
|
|
122336
|
+
if (item) insertEmojiFromSuggest(ctx, panel.from, panel.to, item.emoji);
|
|
122337
|
+
},
|
|
122338
|
+
children: panel.items.map((item, index) => {
|
|
122339
|
+
const selected = index === panel.selectedIndex;
|
|
122340
|
+
return /* @__PURE__ */ jsxs(
|
|
122341
|
+
"li",
|
|
122342
|
+
{
|
|
122343
|
+
role: "option",
|
|
122344
|
+
"aria-selected": selected,
|
|
122345
|
+
"data-index": index,
|
|
122346
|
+
className: selected ? "hover" : void 0,
|
|
122347
|
+
children: [
|
|
122348
|
+
/* @__PURE__ */ jsx("span", { className: "text-lg leading-none", "aria-hidden": true, children: item.emoji }),
|
|
122349
|
+
/* @__PURE__ */ jsxs("span", { className: "truncate opacity-80", children: [
|
|
122350
|
+
":",
|
|
122351
|
+
item.name,
|
|
122352
|
+
":"
|
|
122353
|
+
] })
|
|
122354
|
+
]
|
|
122355
|
+
},
|
|
122356
|
+
`${item.name}-${index}`
|
|
122357
|
+
);
|
|
122358
|
+
})
|
|
122359
|
+
}
|
|
122360
|
+
) }) })
|
|
122311
122361
|
}
|
|
122312
122362
|
);
|
|
122313
122363
|
};
|
|
@@ -124512,6 +124562,7 @@ function setupCollabContentChange(crepe, onContentChangeRef, localEditPendingRef
|
|
|
124512
124562
|
});
|
|
124513
124563
|
}
|
|
124514
124564
|
|
|
124565
|
+
const SLASH_MENU_SELECTOR = `.milkdown-slash-menu:not([data-name="${EMOJI_TOOLTIP_NAME}"])`;
|
|
124515
124566
|
function useSlashMenuPortal(container) {
|
|
124516
124567
|
const reactId = useId();
|
|
124517
124568
|
const portalRootId = `bf-slash-menu-portal-${reactId.replace(/:/g, "")}`;
|
|
@@ -124556,8 +124607,8 @@ function useSlashMenuPortal(container) {
|
|
|
124556
124607
|
return portalRoot;
|
|
124557
124608
|
};
|
|
124558
124609
|
const portalSlashMenu = () => {
|
|
124559
|
-
const existing = document.getElementById(portalRootId)?.querySelector(
|
|
124560
|
-
const menu = container.querySelector(
|
|
124610
|
+
const existing = document.getElementById(portalRootId)?.querySelector(SLASH_MENU_SELECTOR);
|
|
124611
|
+
const menu = container.querySelector(SLASH_MENU_SELECTOR) ?? (existing instanceof HTMLElement ? existing : null);
|
|
124561
124612
|
if (!menu) return;
|
|
124562
124613
|
const root = getOrCreatePortalRoot();
|
|
124563
124614
|
if (menu.parentElement !== root) {
|
|
@@ -124589,7 +124640,7 @@ function useSlashMenuPortal(container) {
|
|
|
124589
124640
|
observer.disconnect();
|
|
124590
124641
|
window.removeEventListener("scroll", onScrollOrResize, true);
|
|
124591
124642
|
window.removeEventListener("resize", onScrollOrResize);
|
|
124592
|
-
const menu = document.getElementById(portalRootId)?.querySelector(
|
|
124643
|
+
const menu = document.getElementById(portalRootId)?.querySelector(SLASH_MENU_SELECTOR);
|
|
124593
124644
|
if (menu && originalParent?.isConnected) {
|
|
124594
124645
|
originalParent.insertBefore(menu, originalNextSibling);
|
|
124595
124646
|
}
|
|
@@ -124599,7 +124650,7 @@ function useSlashMenuPortal(container) {
|
|
|
124599
124650
|
}
|
|
124600
124651
|
|
|
124601
124652
|
const ReviewSuggestionsViewport = lazy(
|
|
124602
|
-
() => import('./index-
|
|
124653
|
+
() => import('./index-DRSHBn8E.js').then((module) => ({ default: module.ReviewSuggestionsViewport }))
|
|
124603
124654
|
);
|
|
124604
124655
|
const MilkdownEditorInner = ({
|
|
124605
124656
|
readOnly = false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-
|
|
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-
|
|
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';
|
|
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 { L as LRParser, E as ExternalTokenizer } from './index-
|
|
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-
|
|
3
|
-
import { html } from './index-
|
|
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';
|
|
4
4
|
|
|
5
5
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
6
6
|
const castOpen = 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { L as LRLanguage, A as LanguageSupport, S as parseMixed, E as styleTags, F as tags } from './index-
|
|
2
|
-
import { html } from './index-
|
|
3
|
-
import { javascriptLanguage } from './index-
|
|
4
|
-
import { L as LRParser, a as LocalTokenGroup } from './index-
|
|
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';
|
|
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, C as ContextTracker } from './index-
|
|
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-
|
|
3
|
-
import { defineCSSCompletionSource } from './index-
|
|
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';
|
|
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-
|
|
2
|
-
import { html } from './index-
|
|
3
|
-
import { javascriptLanguage } from './index-
|
|
4
|
-
import { L as LRParser, E as ExternalTokenizer } from './index-
|
|
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';
|
|
5
5
|
|
|
6
6
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
7
7
|
const Text = 1,
|
|
@@ -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-
|
|
2
|
-
import { defineCSSCompletionSource } from './index-
|
|
3
|
-
import { L as LRParser, E as ExternalTokenizer } from './index-
|
|
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';
|
|
4
4
|
|
|
5
5
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
6
6
|
const descendantOp = 110,
|
|
@@ -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-
|
|
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';
|
|
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 } from './index-
|
|
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-
|
|
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';
|
|
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-
|
|
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-
|
|
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';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const printKeyword = 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-
|
|
2
|
-
import { html } from './index-
|
|
3
|
-
import { L as LRParser, E as ExternalTokenizer } from './index-
|
|
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';
|
|
4
4
|
|
|
5
5
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
6
6
|
const interpolationStart = 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from './index-
|
|
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-
|
|
3
|
-
import { cssLanguage, css } from './index-
|
|
4
|
-
import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from './index-
|
|
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';
|
|
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, a as LocalTokenGroup } from './index-
|
|
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-
|
|
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';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const descendantOp = 122,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LRParser, E as ExternalTokenizer } from './index-
|
|
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-
|
|
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';
|
|
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 { 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-
|
|
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-
|
|
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';
|
|
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,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-
|
|
2
|
-
import { html } from './index-
|
|
3
|
-
import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from './index-
|
|
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';
|
|
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 } from './index-
|
|
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-
|
|
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';
|
|
3
3
|
|
|
4
4
|
const jsonHighlighting = styleTags({
|
|
5
5
|
String: tags.string,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LRParser, E as ExternalTokenizer } from './index-
|
|
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-
|
|
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';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const closureParamDelim = 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-
|
|
2
|
-
import { html, htmlCompletionSource } from './index-
|
|
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';
|
|
3
3
|
|
|
4
4
|
class CompositeBlock {
|
|
5
5
|
static create(type, value, from, parentHash, end) {
|
|
@@ -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-
|
|
2
|
-
import { E as ExternalTokenizer, L as LRParser } from './index-
|
|
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';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const whitespace = 36,
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ac as BrainfishEditor, ad as MarkdownSourceEditor, ae as MilkdownProvider, j as createReviewSuggestionBulkActions } from './index-
|
|
1
|
+
export { ac as BrainfishEditor, ad as MarkdownSourceEditor, ae as MilkdownProvider, j as createReviewSuggestionBulkActions } from './index-BL3BrmJG.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
|
-
/**
|
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainfish-ai/editor",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
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.
|
|
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.
|
|
97
|
+
"@brainfish-ai/components": "^0.37.1",
|
|
98
98
|
"@phosphor-icons/react": "*",
|
|
99
99
|
"clsx": "*",
|
|
100
100
|
"lodash": "^4.x",
|