[{"data":1,"prerenderedAt":2150},["ShallowReactive",2],{"quirekit-doc:\u002Fguide\u002Frules":3,"quirekit-source:core\u002Frules\u002Fhighlight.ts":221,"quirekit-source:core\u002Frules\u002Fselection.ts":222,"mdc--oxs1jj-key":223,"mdc-xghu6e-key":1095},{"id":4,"title":5,"body":6,"description":209,"extension":210,"keywords":211,"locale":212,"meta":213,"navigation":214,"order":215,"path":216,"section":217,"seo":218,"stem":219,"__hash__":220},"docs\u002Fguide\u002Frules.zh-CN.md","输入规则与状态插件",{"type":7,"value":8,"toc":201},"minimark",[9,13,18,38,42,73,84,88,95,115,119,141,144,160,170,173,187],[10,11,12],"p",{},"输入规则把用户刚输入的模式转成正文；PM 插件保存事务派生的状态。两者都依附同一个 Editor，无需监听整个页面再手动同步一份文本。",[14,15,17],"h2",{"id":16},"输入规则键入结束符后转换","输入规则：键入结束符后转换",[10,19,20,21,25,26,29,30,33,34,37],{},"本例定义 ",[22,23,24],"code",{},"readingHighlight"," 标记。键入 ",[22,27,28],{},"==重点=="," 的最后一个 ",[22,31,32],{},"="," 后，规则去掉两端符号，把“重点”转成该标记。最后一个正则捕获组是保留的文字；末尾的 ",[22,35,36],{},"$"," 限制匹配到刚输入的位置。",[39,40],"docs-recipe",{"name":41},"core\u002Frules\u002Fhighlight",[10,43,44,45,48,49,52,53,56,57,60,61,64,65,68,69,72],{},"将 ",[22,46,47],{},"createReadingHighlight()"," 加入已有 Editor 的 ",[22,50,51],{},"extensions","。这里的 ",[22,54,55],{},"tone"," 是持久属性，默认 ",[22,58,59],{},"note","；HTML 使用 ",[22,62,63],{},"data-tone"," 保存。",[22,66,67],{},"parseHTML()"," 限定只读取带本产品标识的 ",[22,70,71],{},"\u003Cmark>","，不能把任意外部高亮都当作相同业务含义。",[10,74,75,76,79,80,83],{},"例程的 ",[22,77,78],{},"renderHTML()"," 用于 DOM 与 HTML 转换。Canvas\u002FSVG 需要另外声明该标记的绘制样式；定义 HTML 标签不会自动给画布上色。它也没有声明 Markdown 的 ",[22,81,82],{},"==...=="," 转换规则，输入快捷方式与文件转换是两个合同。",[14,85,87],{"id":86},"粘贴规则一次处理多个匹配","粘贴规则：一次处理多个匹配",[10,89,90,91,94],{},"输入规则通常用末尾锚定表达式；粘贴规则用全局标志 ",[22,92,93],{},"g"," 匹配本次粘贴中的每个片段。例程的两个规则共享同一标记，因此输入后或粘贴后的 JSON 含义相同。",[10,96,97,100,101,104,105,108,109,114],{},[22,98,99],{},"setContent()","、JSON 恢复和服务器导入不应依赖用户输入规则。导入 Markdown、HTML 或文件时，应使用对应格式的解析器。需要关闭规则时，在创建选项中配置 ",[22,102,103],{},"enableInputRules"," \u002F ",[22,106,107],{},"enablePasteRules","，见",[110,111,113],"a",{"href":112},"\u002Fapi\u002Foptions","创建选项","。",[14,116,118],{"id":117},"pm-插件只保存需要的派生状态","PM 插件：只保存需要的派生状态",[10,120,121,122,125,126,104,129,132,133,136,137,140],{},"假设你要显示当前选区的位置。",[22,123,124],{},"createSelectionRange(notify)"," 把 ",[22,127,128],{},"from",[22,130,131],{},"to"," 存入 ",[22,134,135],{},"PluginKey"," 对应的状态，通过 ",[22,138,139],{},"readSelectionRange(editor.state.pm)"," 查询；mounted plugin view 只在范围变化时通知界面。",[39,142],{"name":143},"core\u002Frules\u002Fselection",[10,145,146,147,150,151,154,155,104,157,159],{},"创建时安装 ",[22,148,149],{},"createSelectionRange(range => updateSelectionLabel(range))","，其中 ",[22,152,153],{},"updateSelectionLabel"," 是应用的界面函数。",[22,156,128],{},[22,158,131],{}," 是文档位置，不能用差值当作准确字数：节点边界、UTF-16 和跨块内容都会影响它。",[10,161,162,165,166,169],{},[22,163,164],{},"apply()"," 每次只比较两个位置，不扫描全文，也不发命令。它返回旧对象时，观察者知道界面不需要更新。无视图的 Core 仍有插件状态；",[22,167,168],{},"view()"," 及其 UI 通知只在对应视图挂载时存在。",[14,171,172],{"id":172},"资源和验证",[10,174,175,176,179,180,183,184,186],{},"插件若创建 DOM 监听、定时器或外部订阅，在 plugin view 的 ",[22,177,178],{},"destroy()"," 中清理；与整个 Editor 同寿命的资源可由扩展 ",[22,181,182],{},"onDestroy"," 清理。不要在 ",[22,185,164],{}," 中启动异步请求，或在观察者里无条件写入事务形成循环。",[10,188,189,190,104,193,196,197,114],{},"验证时分别覆盖键入、一次粘贴两个匹配、撤销、JSON 恢复和移动选区。恢复 JSON 不应重新触发正则转换；移动选区只更新派生状态，不改变正文。PM 的 ",[22,191,192],{},"filterTransaction",[22,194,195],{},"appendTransaction"," 会影响全局事务流程，确有需要时再使用，参数见",[110,198,200],{"href":199},"\u002Fapi\u002Fextensions","扩展 API",{"title":202,"searchDepth":203,"depth":203,"links":204},"",2,[205,206,207,208],{"id":16,"depth":203,"text":17},{"id":86,"depth":203,"text":87},{"id":117,"depth":203,"text":118},{"id":172,"depth":203,"text":172},"把 ==文字== 转成标记，并用 PM 插件观察选区，避免维护第二份正文。","md",null,"zh-CN",{},true,1,"\u002Fguide\u002Frules","扩展开发",{"title":5,"description":209},"guide\u002Frules.zh-CN","mSnAsDpuy_jfGgxKuu1FxXolXkdbwcd1tVKyfvjNPTA","import { Mark, markInputRule, markPasteRule, mergeAttributes } from \"@quirekit\u002Fcore\";\n\n\u002F**\n * Creates a small DOM-oriented mark with ==text== typing and paste rules.\n * @returns A fresh mark with semantic HTML and persisted tone attributes.\n *\u002F\nexport function createReadingHighlight() {\n  return Mark.create({\n    name: \"readingHighlight\",\n    \u002F** @returns Persisted semantic tone and its HTML decoding rule. *\u002F\n    addAttributes() {\n      return { tone: { default: \"note\",\n        \u002F** @param element - HTML mark. @returns Supported tone only. *\u002F\n        parseHTML: (element: HTMLElement) => element.getAttribute(\"data-tone\") === \"important\" ? \"important\" : \"note\",\n        \u002F** @param attrs - Canonical attributes. @returns Stable HTML data attributes. *\u002F\n        renderHTML: (attrs: Record\u003Cstring, unknown>) => ({ \"data-tone\": attrs.tone }),\n      } };\n    },\n    \u002F** @returns Only this application's semantic marks are recognized. *\u002F\n    parseHTML() { return [{ tag: \"mark[data-reading-highlight]\" }]; },\n    \u002F** @param props - Resolved attributes. @returns A mark containing its text. *\u002F\n    renderHTML({ HTMLAttributes }) { return [\"mark\", mergeAttributes(HTMLAttributes, { \"data-reading-highlight\": \"\" }), 0]; },\n    \u002F** @returns End-anchored rule, applied after a closing == is typed. *\u002F\n    addInputRules() { return [markInputRule({ find: \u002F==([^=]+)==$\u002Fu, type: this.name })]; },\n    \u002F** @returns Global rule, applied to each match in pasted text. *\u002F\n    addPasteRules() { return [markPasteRule({ find: \u002F==([^=]+)==\u002Fgu, type: this.name })]; },\n  });\n}\n","import { Extension } from \"@quirekit\u002Fcore\";\nimport { Plugin, PluginKey, type EditorState } from \"@quirekit\u002Fpm\";\nimport type { SelectionRange } from \".\u002Ftypes\";\n\nconst key = new PluginKey\u003CSelectionRange>(\"docsSelectionRange\");\n\n\u002F** @param state - Accepted PM state. @returns The extension's immutable range, if installed. *\u002F\nexport function readSelectionRange(state: EditorState): SelectionRange | undefined { return key.getState(state); }\n\n\u002F**\n * Projects selection changes without scanning or serializing the document.\n * @param notify - Mounted UI notification; call no document commands here.\n * @returns Fresh extension owning its plugin state and mounted observer.\n *\u002F\nexport function createSelectionRange(notify: (range: SelectionRange) => void) {\n  return Extension.create({\n    name: \"docsSelectionRange\",\n    \u002F** @returns One state owner; no second editor or document is created. *\u002F\n    addProseMirrorPlugins() {\n      return [new Plugin\u003CSelectionRange>({\n        key,\n        state: {\n          \u002F** @param _config - PM construction options. @param state - Initial state. @returns Initial range. *\u002F\n          init: (_config, state) => ({ from: state.selection.from, to: state.selection.to }),\n          \u002F** @param tr - Accepted transaction. @param value - Last projection. @returns Reused value unless the range changed. *\u002F\n          apply: (tr, value) => tr.selection.from === value.from && tr.selection.to === value.to\n            ? value : { from: tr.selection.from, to: tr.selection.to },\n        },\n        \u002F** @param view - Mounted PM view. @returns A view-scoped observer released with the view. *\u002F\n        view(view) {\n          notify(key.getState(view.state)!);\n          return {\n            \u002F** @param current - Current view. @param previous - Previously accepted state. *\u002F\n            update(current, previous) {\n              const value = key.getState(current.state)!;\n              if (value !== key.getState(previous)) notify(value);\n            },\n          };\n        },\n      })];\n    },\n  });\n}\n",{"data":224,"body":225},{},{"type":226,"children":227},"root",[228,1089],{"type":229,"tag":230,"props":231,"children":235},"element","pre",{"className":232,"code":233,"language":234,"meta":202,"style":202},"language-ts shiki shiki-themes github-light github-light github-dark","import { Mark, markInputRule, markPasteRule, mergeAttributes } from \"@quirekit\u002Fcore\";\n\n\u002F**\n * Creates a small DOM-oriented mark with ==text== typing and paste rules.\n * @returns A fresh mark with semantic HTML and persisted tone attributes.\n *\u002F\nexport function createReadingHighlight() {\n  return Mark.create({\n    name: \"readingHighlight\",\n    \u002F** @returns Persisted semantic tone and its HTML decoding rule. *\u002F\n    addAttributes() {\n      return { tone: { default: \"note\",\n        \u002F** @param element - HTML mark. @returns Supported tone only. *\u002F\n        parseHTML: (element: HTMLElement) => element.getAttribute(\"data-tone\") === \"important\" ? \"important\" : \"note\",\n        \u002F** @param attrs - Canonical attributes. @returns Stable HTML data attributes. *\u002F\n        renderHTML: (attrs: Record\u003Cstring, unknown>) => ({ \"data-tone\": attrs.tone }),\n      } };\n    },\n    \u002F** @returns Only this application's semantic marks are recognized. *\u002F\n    parseHTML() { return [{ tag: \"mark[data-reading-highlight]\" }]; },\n    \u002F** @param props - Resolved attributes. @returns A mark containing its text. *\u002F\n    renderHTML({ HTMLAttributes }) { return [\"mark\", mergeAttributes(HTMLAttributes, { \"data-reading-highlight\": \"\" }), 0]; },\n    \u002F** @returns End-anchored rule, applied after a closing == is typed. *\u002F\n    addInputRules() { return [markInputRule({ find: \u002F==([^=]+)==$\u002Fu, type: this.name })]; },\n    \u002F** @returns Global rule, applied to each match in pasted text. *\u002F\n    addPasteRules() { return [markPasteRule({ find: \u002F==([^=]+)==\u002Fgu, type: this.name })]; },\n  });\n}\n\n","ts",[236],{"type":229,"tag":22,"props":237,"children":238},{"__ignoreMap":202},[239,272,280,290,299,318,327,352,376,395,413,426,449,482,578,609,680,689,698,715,749,780,862,879,975,992,1071,1080],{"type":229,"tag":240,"props":241,"children":243},"span",{"class":242,"line":215},"line",[244,251,257,261,267],{"type":229,"tag":240,"props":245,"children":247},{"style":246},"--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583",[248],{"type":249,"value":250},"text","import",{"type":229,"tag":240,"props":252,"children":254},{"style":253},"--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8",[255],{"type":249,"value":256}," { Mark, markInputRule, markPasteRule, mergeAttributes } ",{"type":229,"tag":240,"props":258,"children":259},{"style":246},[260],{"type":249,"value":128},{"type":229,"tag":240,"props":262,"children":264},{"style":263},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF",[265],{"type":249,"value":266}," \"@quirekit\u002Fcore\"",{"type":229,"tag":240,"props":268,"children":269},{"style":253},[270],{"type":249,"value":271},";\n",{"type":229,"tag":240,"props":273,"children":274},{"class":242,"line":203},[275],{"type":229,"tag":240,"props":276,"children":277},{"emptyLinePlaceholder":214},[278],{"type":249,"value":279},"\n",{"type":229,"tag":240,"props":281,"children":283},{"class":242,"line":282},3,[284],{"type":229,"tag":240,"props":285,"children":287},{"style":286},"--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D",[288],{"type":249,"value":289},"\u002F**\n",{"type":229,"tag":240,"props":291,"children":293},{"class":242,"line":292},4,[294],{"type":229,"tag":240,"props":295,"children":296},{"style":286},[297],{"type":249,"value":298}," * Creates a small DOM-oriented mark with ==text== typing and paste rules.\n",{"type":229,"tag":240,"props":300,"children":302},{"class":242,"line":301},5,[303,308,313],{"type":229,"tag":240,"props":304,"children":305},{"style":286},[306],{"type":249,"value":307}," * ",{"type":229,"tag":240,"props":309,"children":310},{"style":246},[311],{"type":249,"value":312},"@returns",{"type":229,"tag":240,"props":314,"children":315},{"style":286},[316],{"type":249,"value":317}," A fresh mark with semantic HTML and persisted tone attributes.\n",{"type":229,"tag":240,"props":319,"children":321},{"class":242,"line":320},6,[322],{"type":229,"tag":240,"props":323,"children":324},{"style":286},[325],{"type":249,"value":326}," *\u002F\n",{"type":229,"tag":240,"props":328,"children":330},{"class":242,"line":329},7,[331,336,341,347],{"type":229,"tag":240,"props":332,"children":333},{"style":246},[334],{"type":249,"value":335},"export",{"type":229,"tag":240,"props":337,"children":338},{"style":246},[339],{"type":249,"value":340}," function",{"type":229,"tag":240,"props":342,"children":344},{"style":343},"--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0",[345],{"type":249,"value":346}," createReadingHighlight",{"type":229,"tag":240,"props":348,"children":349},{"style":253},[350],{"type":249,"value":351},"() {\n",{"type":229,"tag":240,"props":353,"children":355},{"class":242,"line":354},8,[356,361,366,371],{"type":229,"tag":240,"props":357,"children":358},{"style":246},[359],{"type":249,"value":360},"  return",{"type":229,"tag":240,"props":362,"children":363},{"style":253},[364],{"type":249,"value":365}," Mark.",{"type":229,"tag":240,"props":367,"children":368},{"style":343},[369],{"type":249,"value":370},"create",{"type":229,"tag":240,"props":372,"children":373},{"style":253},[374],{"type":249,"value":375},"({\n",{"type":229,"tag":240,"props":377,"children":379},{"class":242,"line":378},9,[380,385,390],{"type":229,"tag":240,"props":381,"children":382},{"style":253},[383],{"type":249,"value":384},"    name: ",{"type":229,"tag":240,"props":386,"children":387},{"style":263},[388],{"type":249,"value":389},"\"readingHighlight\"",{"type":229,"tag":240,"props":391,"children":392},{"style":253},[393],{"type":249,"value":394},",\n",{"type":229,"tag":240,"props":396,"children":398},{"class":242,"line":397},10,[399,404,408],{"type":229,"tag":240,"props":400,"children":401},{"style":286},[402],{"type":249,"value":403},"    \u002F** ",{"type":229,"tag":240,"props":405,"children":406},{"style":246},[407],{"type":249,"value":312},{"type":229,"tag":240,"props":409,"children":410},{"style":286},[411],{"type":249,"value":412}," Persisted semantic tone and its HTML decoding rule. *\u002F\n",{"type":229,"tag":240,"props":414,"children":416},{"class":242,"line":415},11,[417,422],{"type":229,"tag":240,"props":418,"children":419},{"style":343},[420],{"type":249,"value":421},"    addAttributes",{"type":229,"tag":240,"props":423,"children":424},{"style":253},[425],{"type":249,"value":351},{"type":229,"tag":240,"props":427,"children":429},{"class":242,"line":428},12,[430,435,440,445],{"type":229,"tag":240,"props":431,"children":432},{"style":246},[433],{"type":249,"value":434},"      return",{"type":229,"tag":240,"props":436,"children":437},{"style":253},[438],{"type":249,"value":439}," { tone: { default: ",{"type":229,"tag":240,"props":441,"children":442},{"style":263},[443],{"type":249,"value":444},"\"note\"",{"type":229,"tag":240,"props":446,"children":447},{"style":253},[448],{"type":249,"value":394},{"type":229,"tag":240,"props":450,"children":452},{"class":242,"line":451},13,[453,458,463,468,473,477],{"type":229,"tag":240,"props":454,"children":455},{"style":286},[456],{"type":249,"value":457},"        \u002F** ",{"type":229,"tag":240,"props":459,"children":460},{"style":246},[461],{"type":249,"value":462},"@param",{"type":229,"tag":240,"props":464,"children":465},{"style":253},[466],{"type":249,"value":467}," element",{"type":229,"tag":240,"props":469,"children":470},{"style":286},[471],{"type":249,"value":472}," - HTML mark. ",{"type":229,"tag":240,"props":474,"children":475},{"style":246},[476],{"type":249,"value":312},{"type":229,"tag":240,"props":478,"children":479},{"style":286},[480],{"type":249,"value":481}," Supported tone only. *\u002F\n",{"type":229,"tag":240,"props":483,"children":485},{"class":242,"line":484},14,[486,491,496,501,506,511,516,521,526,531,536,541,545,550,555,560,564,569,574],{"type":229,"tag":240,"props":487,"children":488},{"style":343},[489],{"type":249,"value":490},"        parseHTML",{"type":229,"tag":240,"props":492,"children":493},{"style":253},[494],{"type":249,"value":495},": (",{"type":229,"tag":240,"props":497,"children":499},{"style":498},"--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70",[500],{"type":249,"value":229},{"type":229,"tag":240,"props":502,"children":503},{"style":246},[504],{"type":249,"value":505},":",{"type":229,"tag":240,"props":507,"children":508},{"style":343},[509],{"type":249,"value":510}," HTMLElement",{"type":229,"tag":240,"props":512,"children":513},{"style":253},[514],{"type":249,"value":515},") ",{"type":229,"tag":240,"props":517,"children":518},{"style":246},[519],{"type":249,"value":520},"=>",{"type":229,"tag":240,"props":522,"children":523},{"style":253},[524],{"type":249,"value":525}," element.",{"type":229,"tag":240,"props":527,"children":528},{"style":343},[529],{"type":249,"value":530},"getAttribute",{"type":229,"tag":240,"props":532,"children":533},{"style":253},[534],{"type":249,"value":535},"(",{"type":229,"tag":240,"props":537,"children":538},{"style":263},[539],{"type":249,"value":540},"\"data-tone\"",{"type":229,"tag":240,"props":542,"children":543},{"style":253},[544],{"type":249,"value":515},{"type":229,"tag":240,"props":546,"children":547},{"style":246},[548],{"type":249,"value":549},"===",{"type":229,"tag":240,"props":551,"children":552},{"style":263},[553],{"type":249,"value":554}," \"important\"",{"type":229,"tag":240,"props":556,"children":557},{"style":246},[558],{"type":249,"value":559}," ?",{"type":229,"tag":240,"props":561,"children":562},{"style":263},[563],{"type":249,"value":554},{"type":229,"tag":240,"props":565,"children":566},{"style":246},[567],{"type":249,"value":568}," :",{"type":229,"tag":240,"props":570,"children":571},{"style":263},[572],{"type":249,"value":573}," \"note\"",{"type":229,"tag":240,"props":575,"children":576},{"style":253},[577],{"type":249,"value":394},{"type":229,"tag":240,"props":579,"children":581},{"class":242,"line":580},15,[582,586,590,595,600,604],{"type":229,"tag":240,"props":583,"children":584},{"style":286},[585],{"type":249,"value":457},{"type":229,"tag":240,"props":587,"children":588},{"style":246},[589],{"type":249,"value":462},{"type":229,"tag":240,"props":591,"children":592},{"style":253},[593],{"type":249,"value":594}," attrs",{"type":229,"tag":240,"props":596,"children":597},{"style":286},[598],{"type":249,"value":599}," - Canonical attributes. ",{"type":229,"tag":240,"props":601,"children":602},{"style":246},[603],{"type":249,"value":312},{"type":229,"tag":240,"props":605,"children":606},{"style":286},[607],{"type":249,"value":608}," Stable HTML data attributes. *\u002F\n",{"type":229,"tag":240,"props":610,"children":612},{"class":242,"line":611},16,[613,618,622,627,631,636,641,647,652,657,662,666,671,675],{"type":229,"tag":240,"props":614,"children":615},{"style":343},[616],{"type":249,"value":617},"        renderHTML",{"type":229,"tag":240,"props":619,"children":620},{"style":253},[621],{"type":249,"value":495},{"type":229,"tag":240,"props":623,"children":624},{"style":498},[625],{"type":249,"value":626},"attrs",{"type":229,"tag":240,"props":628,"children":629},{"style":246},[630],{"type":249,"value":505},{"type":229,"tag":240,"props":632,"children":633},{"style":343},[634],{"type":249,"value":635}," Record",{"type":229,"tag":240,"props":637,"children":638},{"style":253},[639],{"type":249,"value":640},"\u003C",{"type":229,"tag":240,"props":642,"children":644},{"style":643},"--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF",[645],{"type":249,"value":646},"string",{"type":229,"tag":240,"props":648,"children":649},{"style":253},[650],{"type":249,"value":651},", ",{"type":229,"tag":240,"props":653,"children":654},{"style":643},[655],{"type":249,"value":656},"unknown",{"type":229,"tag":240,"props":658,"children":659},{"style":253},[660],{"type":249,"value":661},">) ",{"type":229,"tag":240,"props":663,"children":664},{"style":246},[665],{"type":249,"value":520},{"type":229,"tag":240,"props":667,"children":668},{"style":253},[669],{"type":249,"value":670}," ({ ",{"type":229,"tag":240,"props":672,"children":673},{"style":263},[674],{"type":249,"value":540},{"type":229,"tag":240,"props":676,"children":677},{"style":253},[678],{"type":249,"value":679},": attrs.tone }),\n",{"type":229,"tag":240,"props":681,"children":683},{"class":242,"line":682},17,[684],{"type":229,"tag":240,"props":685,"children":686},{"style":253},[687],{"type":249,"value":688},"      } };\n",{"type":229,"tag":240,"props":690,"children":692},{"class":242,"line":691},18,[693],{"type":229,"tag":240,"props":694,"children":695},{"style":253},[696],{"type":249,"value":697},"    },\n",{"type":229,"tag":240,"props":699,"children":701},{"class":242,"line":700},19,[702,706,710],{"type":229,"tag":240,"props":703,"children":704},{"style":286},[705],{"type":249,"value":403},{"type":229,"tag":240,"props":707,"children":708},{"style":246},[709],{"type":249,"value":312},{"type":229,"tag":240,"props":711,"children":712},{"style":286},[713],{"type":249,"value":714}," Only this application's semantic marks are recognized. *\u002F\n",{"type":229,"tag":240,"props":716,"children":718},{"class":242,"line":717},20,[719,724,729,734,739,744],{"type":229,"tag":240,"props":720,"children":721},{"style":343},[722],{"type":249,"value":723},"    parseHTML",{"type":229,"tag":240,"props":725,"children":726},{"style":253},[727],{"type":249,"value":728},"() { ",{"type":229,"tag":240,"props":730,"children":731},{"style":246},[732],{"type":249,"value":733},"return",{"type":229,"tag":240,"props":735,"children":736},{"style":253},[737],{"type":249,"value":738}," [{ tag: ",{"type":229,"tag":240,"props":740,"children":741},{"style":263},[742],{"type":249,"value":743},"\"mark[data-reading-highlight]\"",{"type":229,"tag":240,"props":745,"children":746},{"style":253},[747],{"type":249,"value":748}," }]; },\n",{"type":229,"tag":240,"props":750,"children":752},{"class":242,"line":751},21,[753,757,761,766,771,775],{"type":229,"tag":240,"props":754,"children":755},{"style":286},[756],{"type":249,"value":403},{"type":229,"tag":240,"props":758,"children":759},{"style":246},[760],{"type":249,"value":462},{"type":229,"tag":240,"props":762,"children":763},{"style":253},[764],{"type":249,"value":765}," props",{"type":229,"tag":240,"props":767,"children":768},{"style":286},[769],{"type":249,"value":770}," - Resolved attributes. ",{"type":229,"tag":240,"props":772,"children":773},{"style":246},[774],{"type":249,"value":312},{"type":229,"tag":240,"props":776,"children":777},{"style":286},[778],{"type":249,"value":779}," A mark containing its text. *\u002F\n",{"type":229,"tag":240,"props":781,"children":783},{"class":242,"line":782},22,[784,789,794,799,804,808,813,818,822,827,832,837,842,847,852,857],{"type":229,"tag":240,"props":785,"children":786},{"style":343},[787],{"type":249,"value":788},"    renderHTML",{"type":229,"tag":240,"props":790,"children":791},{"style":253},[792],{"type":249,"value":793},"({ ",{"type":229,"tag":240,"props":795,"children":796},{"style":498},[797],{"type":249,"value":798},"HTMLAttributes",{"type":229,"tag":240,"props":800,"children":801},{"style":253},[802],{"type":249,"value":803}," }) { ",{"type":229,"tag":240,"props":805,"children":806},{"style":246},[807],{"type":249,"value":733},{"type":229,"tag":240,"props":809,"children":810},{"style":253},[811],{"type":249,"value":812}," [",{"type":229,"tag":240,"props":814,"children":815},{"style":263},[816],{"type":249,"value":817},"\"mark\"",{"type":229,"tag":240,"props":819,"children":820},{"style":253},[821],{"type":249,"value":651},{"type":229,"tag":240,"props":823,"children":824},{"style":343},[825],{"type":249,"value":826},"mergeAttributes",{"type":229,"tag":240,"props":828,"children":829},{"style":253},[830],{"type":249,"value":831},"(HTMLAttributes, { ",{"type":229,"tag":240,"props":833,"children":834},{"style":263},[835],{"type":249,"value":836},"\"data-reading-highlight\"",{"type":229,"tag":240,"props":838,"children":839},{"style":253},[840],{"type":249,"value":841},": ",{"type":229,"tag":240,"props":843,"children":844},{"style":263},[845],{"type":249,"value":846},"\"\"",{"type":229,"tag":240,"props":848,"children":849},{"style":253},[850],{"type":249,"value":851}," }), ",{"type":229,"tag":240,"props":853,"children":854},{"style":643},[855],{"type":249,"value":856},"0",{"type":229,"tag":240,"props":858,"children":859},{"style":253},[860],{"type":249,"value":861},"]; },\n",{"type":229,"tag":240,"props":863,"children":865},{"class":242,"line":864},23,[866,870,874],{"type":229,"tag":240,"props":867,"children":868},{"style":286},[869],{"type":249,"value":403},{"type":229,"tag":240,"props":871,"children":872},{"style":246},[873],{"type":249,"value":312},{"type":229,"tag":240,"props":875,"children":876},{"style":286},[877],{"type":249,"value":878}," End-anchored rule, applied after a closing == is typed. *\u002F\n",{"type":229,"tag":240,"props":880,"children":882},{"class":242,"line":881},24,[883,888,892,896,900,905,910,915,921,926,931,936,941,946,950,955,960,965,970],{"type":229,"tag":240,"props":884,"children":885},{"style":343},[886],{"type":249,"value":887},"    addInputRules",{"type":229,"tag":240,"props":889,"children":890},{"style":253},[891],{"type":249,"value":728},{"type":229,"tag":240,"props":893,"children":894},{"style":246},[895],{"type":249,"value":733},{"type":229,"tag":240,"props":897,"children":898},{"style":253},[899],{"type":249,"value":812},{"type":229,"tag":240,"props":901,"children":902},{"style":343},[903],{"type":249,"value":904},"markInputRule",{"type":229,"tag":240,"props":906,"children":907},{"style":253},[908],{"type":249,"value":909},"({ find:",{"type":229,"tag":240,"props":911,"children":912},{"style":263},[913],{"type":249,"value":914}," \u002F",{"type":229,"tag":240,"props":916,"children":918},{"style":917},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#DBEDFF",[919],{"type":249,"value":920},"==(",{"type":229,"tag":240,"props":922,"children":923},{"style":643},[924],{"type":249,"value":925},"[",{"type":229,"tag":240,"props":927,"children":928},{"style":246},[929],{"type":249,"value":930},"^",{"type":229,"tag":240,"props":932,"children":933},{"style":643},[934],{"type":249,"value":935},"=]",{"type":229,"tag":240,"props":937,"children":938},{"style":246},[939],{"type":249,"value":940},"+",{"type":229,"tag":240,"props":942,"children":943},{"style":917},[944],{"type":249,"value":945},")==",{"type":229,"tag":240,"props":947,"children":948},{"style":246},[949],{"type":249,"value":36},{"type":229,"tag":240,"props":951,"children":952},{"style":263},[953],{"type":249,"value":954},"\u002F",{"type":229,"tag":240,"props":956,"children":957},{"style":246},[958],{"type":249,"value":959},"u",{"type":229,"tag":240,"props":961,"children":962},{"style":253},[963],{"type":249,"value":964},", type: ",{"type":229,"tag":240,"props":966,"children":967},{"style":643},[968],{"type":249,"value":969},"this",{"type":229,"tag":240,"props":971,"children":972},{"style":253},[973],{"type":249,"value":974},".name })]; },\n",{"type":229,"tag":240,"props":976,"children":978},{"class":242,"line":977},25,[979,983,987],{"type":229,"tag":240,"props":980,"children":981},{"style":286},[982],{"type":249,"value":403},{"type":229,"tag":240,"props":984,"children":985},{"style":246},[986],{"type":249,"value":312},{"type":229,"tag":240,"props":988,"children":989},{"style":286},[990],{"type":249,"value":991}," Global rule, applied to each match in pasted text. *\u002F\n",{"type":229,"tag":240,"props":993,"children":995},{"class":242,"line":994},26,[996,1001,1005,1009,1013,1018,1022,1026,1030,1034,1038,1042,1046,1050,1054,1059,1063,1067],{"type":229,"tag":240,"props":997,"children":998},{"style":343},[999],{"type":249,"value":1000},"    addPasteRules",{"type":229,"tag":240,"props":1002,"children":1003},{"style":253},[1004],{"type":249,"value":728},{"type":229,"tag":240,"props":1006,"children":1007},{"style":246},[1008],{"type":249,"value":733},{"type":229,"tag":240,"props":1010,"children":1011},{"style":253},[1012],{"type":249,"value":812},{"type":229,"tag":240,"props":1014,"children":1015},{"style":343},[1016],{"type":249,"value":1017},"markPasteRule",{"type":229,"tag":240,"props":1019,"children":1020},{"style":253},[1021],{"type":249,"value":909},{"type":229,"tag":240,"props":1023,"children":1024},{"style":263},[1025],{"type":249,"value":914},{"type":229,"tag":240,"props":1027,"children":1028},{"style":917},[1029],{"type":249,"value":920},{"type":229,"tag":240,"props":1031,"children":1032},{"style":643},[1033],{"type":249,"value":925},{"type":229,"tag":240,"props":1035,"children":1036},{"style":246},[1037],{"type":249,"value":930},{"type":229,"tag":240,"props":1039,"children":1040},{"style":643},[1041],{"type":249,"value":935},{"type":229,"tag":240,"props":1043,"children":1044},{"style":246},[1045],{"type":249,"value":940},{"type":229,"tag":240,"props":1047,"children":1048},{"style":917},[1049],{"type":249,"value":945},{"type":229,"tag":240,"props":1051,"children":1052},{"style":263},[1053],{"type":249,"value":954},{"type":229,"tag":240,"props":1055,"children":1056},{"style":246},[1057],{"type":249,"value":1058},"gu",{"type":229,"tag":240,"props":1060,"children":1061},{"style":253},[1062],{"type":249,"value":964},{"type":229,"tag":240,"props":1064,"children":1065},{"style":643},[1066],{"type":249,"value":969},{"type":229,"tag":240,"props":1068,"children":1069},{"style":253},[1070],{"type":249,"value":974},{"type":229,"tag":240,"props":1072,"children":1074},{"class":242,"line":1073},27,[1075],{"type":229,"tag":240,"props":1076,"children":1077},{"style":253},[1078],{"type":249,"value":1079},"  });\n",{"type":229,"tag":240,"props":1081,"children":1083},{"class":242,"line":1082},28,[1084],{"type":229,"tag":240,"props":1085,"children":1086},{"style":253},[1087],{"type":249,"value":1088},"}\n",{"type":229,"tag":1090,"props":1091,"children":1092},"style",{},[1093],{"type":249,"value":1094},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"data":1096,"body":1097},{},{"type":226,"children":1098},[1099,2146],{"type":229,"tag":230,"props":1100,"children":1102},{"className":232,"code":1101,"language":234,"meta":202,"style":202},"import { Extension } from \"@quirekit\u002Fcore\";\nimport { Plugin, PluginKey, type EditorState } from \"@quirekit\u002Fpm\";\nimport type { SelectionRange } from \".\u002Ftypes\";\n\nconst key = new PluginKey\u003CSelectionRange>(\"docsSelectionRange\");\n\n\u002F** @param state - Accepted PM state. @returns The extension's immutable range, if installed. *\u002F\nexport function readSelectionRange(state: EditorState): SelectionRange | undefined { return key.getState(state); }\n\n\u002F**\n * Projects selection changes without scanning or serializing the document.\n * @param notify - Mounted UI notification; call no document commands here.\n * @returns Fresh extension owning its plugin state and mounted observer.\n *\u002F\nexport function createSelectionRange(notify: (range: SelectionRange) => void) {\n  return Extension.create({\n    name: \"docsSelectionRange\",\n    \u002F** @returns One state owner; no second editor or document is created. *\u002F\n    addProseMirrorPlugins() {\n      return [new Plugin\u003CSelectionRange>({\n        key,\n        state: {\n          \u002F** @param _config - PM construction options. @param state - Initial state. @returns Initial range. *\u002F\n          init: (_config, state) => ({ from: state.selection.from, to: state.selection.to }),\n          \u002F** @param tr - Accepted transaction. @param value - Last projection. @returns Reused value unless the range changed. *\u002F\n          apply: (tr, value) => tr.selection.from === value.from && tr.selection.to === value.to\n            ? value : { from: tr.selection.from, to: tr.selection.to },\n        },\n        \u002F** @param view - Mounted PM view. @returns A view-scoped observer released with the view. *\u002F\n        view(view) {\n          notify(key.getState(view.state)!);\n          return {\n            \u002F** @param current - Current view. @param previous - Previously accepted state. *\u002F\n            update(current, previous) {\n              const value = key.getState(current.state)!;\n              if (value !== key.getState(previous)) notify(value);\n            },\n          };\n        },\n      })];\n    },\n  });\n}\n\n",[1103],{"type":229,"tag":22,"props":1104,"children":1105},{"__ignoreMap":202},[1106,1130,1165,1195,1202,1254,1261,1292,1374,1381,1388,1396,1417,1433,1440,1505,1525,1540,1556,1568,1602,1610,1618,1662,1700,1744,1811,1833,1841,1872,1894,1926,1940,1977,2008,2046,2087,2096,2105,2113,2122,2130,2138],{"type":229,"tag":240,"props":1107,"children":1108},{"class":242,"line":215},[1109,1113,1118,1122,1126],{"type":229,"tag":240,"props":1110,"children":1111},{"style":246},[1112],{"type":249,"value":250},{"type":229,"tag":240,"props":1114,"children":1115},{"style":253},[1116],{"type":249,"value":1117}," { Extension } ",{"type":229,"tag":240,"props":1119,"children":1120},{"style":246},[1121],{"type":249,"value":128},{"type":229,"tag":240,"props":1123,"children":1124},{"style":263},[1125],{"type":249,"value":266},{"type":229,"tag":240,"props":1127,"children":1128},{"style":253},[1129],{"type":249,"value":271},{"type":229,"tag":240,"props":1131,"children":1132},{"class":242,"line":203},[1133,1137,1142,1147,1152,1156,1161],{"type":229,"tag":240,"props":1134,"children":1135},{"style":246},[1136],{"type":249,"value":250},{"type":229,"tag":240,"props":1138,"children":1139},{"style":253},[1140],{"type":249,"value":1141}," { Plugin, PluginKey, ",{"type":229,"tag":240,"props":1143,"children":1144},{"style":246},[1145],{"type":249,"value":1146},"type",{"type":229,"tag":240,"props":1148,"children":1149},{"style":253},[1150],{"type":249,"value":1151}," EditorState } ",{"type":229,"tag":240,"props":1153,"children":1154},{"style":246},[1155],{"type":249,"value":128},{"type":229,"tag":240,"props":1157,"children":1158},{"style":263},[1159],{"type":249,"value":1160}," \"@quirekit\u002Fpm\"",{"type":229,"tag":240,"props":1162,"children":1163},{"style":253},[1164],{"type":249,"value":271},{"type":229,"tag":240,"props":1166,"children":1167},{"class":242,"line":282},[1168,1172,1177,1182,1186,1191],{"type":229,"tag":240,"props":1169,"children":1170},{"style":246},[1171],{"type":249,"value":250},{"type":229,"tag":240,"props":1173,"children":1174},{"style":246},[1175],{"type":249,"value":1176}," type",{"type":229,"tag":240,"props":1178,"children":1179},{"style":253},[1180],{"type":249,"value":1181}," { SelectionRange } ",{"type":229,"tag":240,"props":1183,"children":1184},{"style":246},[1185],{"type":249,"value":128},{"type":229,"tag":240,"props":1187,"children":1188},{"style":263},[1189],{"type":249,"value":1190}," \".\u002Ftypes\"",{"type":229,"tag":240,"props":1192,"children":1193},{"style":253},[1194],{"type":249,"value":271},{"type":229,"tag":240,"props":1196,"children":1197},{"class":242,"line":292},[1198],{"type":229,"tag":240,"props":1199,"children":1200},{"emptyLinePlaceholder":214},[1201],{"type":249,"value":279},{"type":229,"tag":240,"props":1203,"children":1204},{"class":242,"line":301},[1205,1210,1215,1220,1225,1230,1234,1239,1244,1249],{"type":229,"tag":240,"props":1206,"children":1207},{"style":246},[1208],{"type":249,"value":1209},"const",{"type":229,"tag":240,"props":1211,"children":1212},{"style":643},[1213],{"type":249,"value":1214}," key",{"type":229,"tag":240,"props":1216,"children":1217},{"style":246},[1218],{"type":249,"value":1219}," =",{"type":229,"tag":240,"props":1221,"children":1222},{"style":246},[1223],{"type":249,"value":1224}," new",{"type":229,"tag":240,"props":1226,"children":1227},{"style":343},[1228],{"type":249,"value":1229}," PluginKey",{"type":229,"tag":240,"props":1231,"children":1232},{"style":253},[1233],{"type":249,"value":640},{"type":229,"tag":240,"props":1235,"children":1236},{"style":343},[1237],{"type":249,"value":1238},"SelectionRange",{"type":229,"tag":240,"props":1240,"children":1241},{"style":253},[1242],{"type":249,"value":1243},">(",{"type":229,"tag":240,"props":1245,"children":1246},{"style":263},[1247],{"type":249,"value":1248},"\"docsSelectionRange\"",{"type":229,"tag":240,"props":1250,"children":1251},{"style":253},[1252],{"type":249,"value":1253},");\n",{"type":229,"tag":240,"props":1255,"children":1256},{"class":242,"line":320},[1257],{"type":229,"tag":240,"props":1258,"children":1259},{"emptyLinePlaceholder":214},[1260],{"type":249,"value":279},{"type":229,"tag":240,"props":1262,"children":1263},{"class":242,"line":329},[1264,1269,1273,1278,1283,1287],{"type":229,"tag":240,"props":1265,"children":1266},{"style":286},[1267],{"type":249,"value":1268},"\u002F** ",{"type":229,"tag":240,"props":1270,"children":1271},{"style":246},[1272],{"type":249,"value":462},{"type":229,"tag":240,"props":1274,"children":1275},{"style":253},[1276],{"type":249,"value":1277}," state",{"type":229,"tag":240,"props":1279,"children":1280},{"style":286},[1281],{"type":249,"value":1282}," - Accepted PM state. ",{"type":229,"tag":240,"props":1284,"children":1285},{"style":246},[1286],{"type":249,"value":312},{"type":229,"tag":240,"props":1288,"children":1289},{"style":286},[1290],{"type":249,"value":1291}," The extension's immutable range, if installed. *\u002F\n",{"type":229,"tag":240,"props":1293,"children":1294},{"class":242,"line":354},[1295,1299,1303,1308,1312,1317,1321,1326,1331,1335,1340,1345,1350,1355,1359,1364,1369],{"type":229,"tag":240,"props":1296,"children":1297},{"style":246},[1298],{"type":249,"value":335},{"type":229,"tag":240,"props":1300,"children":1301},{"style":246},[1302],{"type":249,"value":340},{"type":229,"tag":240,"props":1304,"children":1305},{"style":343},[1306],{"type":249,"value":1307}," readSelectionRange",{"type":229,"tag":240,"props":1309,"children":1310},{"style":253},[1311],{"type":249,"value":535},{"type":229,"tag":240,"props":1313,"children":1314},{"style":498},[1315],{"type":249,"value":1316},"state",{"type":229,"tag":240,"props":1318,"children":1319},{"style":246},[1320],{"type":249,"value":505},{"type":229,"tag":240,"props":1322,"children":1323},{"style":343},[1324],{"type":249,"value":1325}," EditorState",{"type":229,"tag":240,"props":1327,"children":1328},{"style":253},[1329],{"type":249,"value":1330},")",{"type":229,"tag":240,"props":1332,"children":1333},{"style":246},[1334],{"type":249,"value":505},{"type":229,"tag":240,"props":1336,"children":1337},{"style":343},[1338],{"type":249,"value":1339}," SelectionRange",{"type":229,"tag":240,"props":1341,"children":1342},{"style":246},[1343],{"type":249,"value":1344}," |",{"type":229,"tag":240,"props":1346,"children":1347},{"style":643},[1348],{"type":249,"value":1349}," undefined",{"type":229,"tag":240,"props":1351,"children":1352},{"style":253},[1353],{"type":249,"value":1354}," { ",{"type":229,"tag":240,"props":1356,"children":1357},{"style":246},[1358],{"type":249,"value":733},{"type":229,"tag":240,"props":1360,"children":1361},{"style":253},[1362],{"type":249,"value":1363}," key.",{"type":229,"tag":240,"props":1365,"children":1366},{"style":343},[1367],{"type":249,"value":1368},"getState",{"type":229,"tag":240,"props":1370,"children":1371},{"style":253},[1372],{"type":249,"value":1373},"(state); }\n",{"type":229,"tag":240,"props":1375,"children":1376},{"class":242,"line":378},[1377],{"type":229,"tag":240,"props":1378,"children":1379},{"emptyLinePlaceholder":214},[1380],{"type":249,"value":279},{"type":229,"tag":240,"props":1382,"children":1383},{"class":242,"line":397},[1384],{"type":229,"tag":240,"props":1385,"children":1386},{"style":286},[1387],{"type":249,"value":289},{"type":229,"tag":240,"props":1389,"children":1390},{"class":242,"line":415},[1391],{"type":229,"tag":240,"props":1392,"children":1393},{"style":286},[1394],{"type":249,"value":1395}," * Projects selection changes without scanning or serializing the document.\n",{"type":229,"tag":240,"props":1397,"children":1398},{"class":242,"line":428},[1399,1403,1407,1412],{"type":229,"tag":240,"props":1400,"children":1401},{"style":286},[1402],{"type":249,"value":307},{"type":229,"tag":240,"props":1404,"children":1405},{"style":246},[1406],{"type":249,"value":462},{"type":229,"tag":240,"props":1408,"children":1409},{"style":253},[1410],{"type":249,"value":1411}," notify",{"type":229,"tag":240,"props":1413,"children":1414},{"style":286},[1415],{"type":249,"value":1416}," - Mounted UI notification; call no document commands here.\n",{"type":229,"tag":240,"props":1418,"children":1419},{"class":242,"line":451},[1420,1424,1428],{"type":229,"tag":240,"props":1421,"children":1422},{"style":286},[1423],{"type":249,"value":307},{"type":229,"tag":240,"props":1425,"children":1426},{"style":246},[1427],{"type":249,"value":312},{"type":229,"tag":240,"props":1429,"children":1430},{"style":286},[1431],{"type":249,"value":1432}," Fresh extension owning its plugin state and mounted observer.\n",{"type":229,"tag":240,"props":1434,"children":1435},{"class":242,"line":484},[1436],{"type":229,"tag":240,"props":1437,"children":1438},{"style":286},[1439],{"type":249,"value":326},{"type":229,"tag":240,"props":1441,"children":1442},{"class":242,"line":580},[1443,1447,1451,1456,1460,1465,1469,1474,1479,1483,1487,1491,1495,1500],{"type":229,"tag":240,"props":1444,"children":1445},{"style":246},[1446],{"type":249,"value":335},{"type":229,"tag":240,"props":1448,"children":1449},{"style":246},[1450],{"type":249,"value":340},{"type":229,"tag":240,"props":1452,"children":1453},{"style":343},[1454],{"type":249,"value":1455}," createSelectionRange",{"type":229,"tag":240,"props":1457,"children":1458},{"style":253},[1459],{"type":249,"value":535},{"type":229,"tag":240,"props":1461,"children":1462},{"style":343},[1463],{"type":249,"value":1464},"notify",{"type":229,"tag":240,"props":1466,"children":1467},{"style":246},[1468],{"type":249,"value":505},{"type":229,"tag":240,"props":1470,"children":1471},{"style":253},[1472],{"type":249,"value":1473}," (",{"type":229,"tag":240,"props":1475,"children":1476},{"style":498},[1477],{"type":249,"value":1478},"range",{"type":229,"tag":240,"props":1480,"children":1481},{"style":246},[1482],{"type":249,"value":505},{"type":229,"tag":240,"props":1484,"children":1485},{"style":343},[1486],{"type":249,"value":1339},{"type":229,"tag":240,"props":1488,"children":1489},{"style":253},[1490],{"type":249,"value":515},{"type":229,"tag":240,"props":1492,"children":1493},{"style":246},[1494],{"type":249,"value":520},{"type":229,"tag":240,"props":1496,"children":1497},{"style":643},[1498],{"type":249,"value":1499}," void",{"type":229,"tag":240,"props":1501,"children":1502},{"style":253},[1503],{"type":249,"value":1504},") {\n",{"type":229,"tag":240,"props":1506,"children":1507},{"class":242,"line":611},[1508,1512,1517,1521],{"type":229,"tag":240,"props":1509,"children":1510},{"style":246},[1511],{"type":249,"value":360},{"type":229,"tag":240,"props":1513,"children":1514},{"style":253},[1515],{"type":249,"value":1516}," Extension.",{"type":229,"tag":240,"props":1518,"children":1519},{"style":343},[1520],{"type":249,"value":370},{"type":229,"tag":240,"props":1522,"children":1523},{"style":253},[1524],{"type":249,"value":375},{"type":229,"tag":240,"props":1526,"children":1527},{"class":242,"line":682},[1528,1532,1536],{"type":229,"tag":240,"props":1529,"children":1530},{"style":253},[1531],{"type":249,"value":384},{"type":229,"tag":240,"props":1533,"children":1534},{"style":263},[1535],{"type":249,"value":1248},{"type":229,"tag":240,"props":1537,"children":1538},{"style":253},[1539],{"type":249,"value":394},{"type":229,"tag":240,"props":1541,"children":1542},{"class":242,"line":691},[1543,1547,1551],{"type":229,"tag":240,"props":1544,"children":1545},{"style":286},[1546],{"type":249,"value":403},{"type":229,"tag":240,"props":1548,"children":1549},{"style":246},[1550],{"type":249,"value":312},{"type":229,"tag":240,"props":1552,"children":1553},{"style":286},[1554],{"type":249,"value":1555}," One state owner; no second editor or document is created. *\u002F\n",{"type":229,"tag":240,"props":1557,"children":1558},{"class":242,"line":700},[1559,1564],{"type":229,"tag":240,"props":1560,"children":1561},{"style":343},[1562],{"type":249,"value":1563},"    addProseMirrorPlugins",{"type":229,"tag":240,"props":1565,"children":1566},{"style":253},[1567],{"type":249,"value":351},{"type":229,"tag":240,"props":1569,"children":1570},{"class":242,"line":717},[1571,1575,1579,1584,1589,1593,1597],{"type":229,"tag":240,"props":1572,"children":1573},{"style":246},[1574],{"type":249,"value":434},{"type":229,"tag":240,"props":1576,"children":1577},{"style":253},[1578],{"type":249,"value":812},{"type":229,"tag":240,"props":1580,"children":1581},{"style":246},[1582],{"type":249,"value":1583},"new",{"type":229,"tag":240,"props":1585,"children":1586},{"style":343},[1587],{"type":249,"value":1588}," Plugin",{"type":229,"tag":240,"props":1590,"children":1591},{"style":253},[1592],{"type":249,"value":640},{"type":229,"tag":240,"props":1594,"children":1595},{"style":343},[1596],{"type":249,"value":1238},{"type":229,"tag":240,"props":1598,"children":1599},{"style":253},[1600],{"type":249,"value":1601},">({\n",{"type":229,"tag":240,"props":1603,"children":1604},{"class":242,"line":751},[1605],{"type":229,"tag":240,"props":1606,"children":1607},{"style":253},[1608],{"type":249,"value":1609},"        key,\n",{"type":229,"tag":240,"props":1611,"children":1612},{"class":242,"line":782},[1613],{"type":229,"tag":240,"props":1614,"children":1615},{"style":253},[1616],{"type":249,"value":1617},"        state: {\n",{"type":229,"tag":240,"props":1619,"children":1620},{"class":242,"line":864},[1621,1626,1630,1635,1640,1644,1648,1653,1657],{"type":229,"tag":240,"props":1622,"children":1623},{"style":286},[1624],{"type":249,"value":1625},"          \u002F** ",{"type":229,"tag":240,"props":1627,"children":1628},{"style":246},[1629],{"type":249,"value":462},{"type":229,"tag":240,"props":1631,"children":1632},{"style":253},[1633],{"type":249,"value":1634}," _config",{"type":229,"tag":240,"props":1636,"children":1637},{"style":286},[1638],{"type":249,"value":1639}," - PM construction options. ",{"type":229,"tag":240,"props":1641,"children":1642},{"style":246},[1643],{"type":249,"value":462},{"type":229,"tag":240,"props":1645,"children":1646},{"style":253},[1647],{"type":249,"value":1277},{"type":229,"tag":240,"props":1649,"children":1650},{"style":286},[1651],{"type":249,"value":1652}," - Initial state. ",{"type":229,"tag":240,"props":1654,"children":1655},{"style":246},[1656],{"type":249,"value":312},{"type":229,"tag":240,"props":1658,"children":1659},{"style":286},[1660],{"type":249,"value":1661}," Initial range. *\u002F\n",{"type":229,"tag":240,"props":1663,"children":1664},{"class":242,"line":881},[1665,1670,1674,1679,1683,1687,1691,1695],{"type":229,"tag":240,"props":1666,"children":1667},{"style":343},[1668],{"type":249,"value":1669},"          init",{"type":229,"tag":240,"props":1671,"children":1672},{"style":253},[1673],{"type":249,"value":495},{"type":229,"tag":240,"props":1675,"children":1676},{"style":498},[1677],{"type":249,"value":1678},"_config",{"type":229,"tag":240,"props":1680,"children":1681},{"style":253},[1682],{"type":249,"value":651},{"type":229,"tag":240,"props":1684,"children":1685},{"style":498},[1686],{"type":249,"value":1316},{"type":229,"tag":240,"props":1688,"children":1689},{"style":253},[1690],{"type":249,"value":515},{"type":229,"tag":240,"props":1692,"children":1693},{"style":246},[1694],{"type":249,"value":520},{"type":229,"tag":240,"props":1696,"children":1697},{"style":253},[1698],{"type":249,"value":1699}," ({ from: state.selection.from, to: state.selection.to }),\n",{"type":229,"tag":240,"props":1701,"children":1702},{"class":242,"line":977},[1703,1707,1711,1716,1721,1725,1730,1735,1739],{"type":229,"tag":240,"props":1704,"children":1705},{"style":286},[1706],{"type":249,"value":1625},{"type":229,"tag":240,"props":1708,"children":1709},{"style":246},[1710],{"type":249,"value":462},{"type":229,"tag":240,"props":1712,"children":1713},{"style":253},[1714],{"type":249,"value":1715}," tr",{"type":229,"tag":240,"props":1717,"children":1718},{"style":286},[1719],{"type":249,"value":1720}," - Accepted transaction. ",{"type":229,"tag":240,"props":1722,"children":1723},{"style":246},[1724],{"type":249,"value":462},{"type":229,"tag":240,"props":1726,"children":1727},{"style":253},[1728],{"type":249,"value":1729}," value",{"type":229,"tag":240,"props":1731,"children":1732},{"style":286},[1733],{"type":249,"value":1734}," - Last projection. ",{"type":229,"tag":240,"props":1736,"children":1737},{"style":246},[1738],{"type":249,"value":312},{"type":229,"tag":240,"props":1740,"children":1741},{"style":286},[1742],{"type":249,"value":1743}," Reused value unless the range changed. *\u002F\n",{"type":229,"tag":240,"props":1745,"children":1746},{"class":242,"line":994},[1747,1752,1756,1761,1765,1770,1774,1778,1783,1787,1792,1797,1802,1806],{"type":229,"tag":240,"props":1748,"children":1749},{"style":343},[1750],{"type":249,"value":1751},"          apply",{"type":229,"tag":240,"props":1753,"children":1754},{"style":253},[1755],{"type":249,"value":495},{"type":229,"tag":240,"props":1757,"children":1758},{"style":498},[1759],{"type":249,"value":1760},"tr",{"type":229,"tag":240,"props":1762,"children":1763},{"style":253},[1764],{"type":249,"value":651},{"type":229,"tag":240,"props":1766,"children":1767},{"style":498},[1768],{"type":249,"value":1769},"value",{"type":229,"tag":240,"props":1771,"children":1772},{"style":253},[1773],{"type":249,"value":515},{"type":229,"tag":240,"props":1775,"children":1776},{"style":246},[1777],{"type":249,"value":520},{"type":229,"tag":240,"props":1779,"children":1780},{"style":253},[1781],{"type":249,"value":1782}," tr.selection.from ",{"type":229,"tag":240,"props":1784,"children":1785},{"style":246},[1786],{"type":249,"value":549},{"type":229,"tag":240,"props":1788,"children":1789},{"style":253},[1790],{"type":249,"value":1791}," value.from ",{"type":229,"tag":240,"props":1793,"children":1794},{"style":246},[1795],{"type":249,"value":1796},"&&",{"type":229,"tag":240,"props":1798,"children":1799},{"style":253},[1800],{"type":249,"value":1801}," tr.selection.to ",{"type":229,"tag":240,"props":1803,"children":1804},{"style":246},[1805],{"type":249,"value":549},{"type":229,"tag":240,"props":1807,"children":1808},{"style":253},[1809],{"type":249,"value":1810}," value.to\n",{"type":229,"tag":240,"props":1812,"children":1813},{"class":242,"line":1073},[1814,1819,1824,1828],{"type":229,"tag":240,"props":1815,"children":1816},{"style":246},[1817],{"type":249,"value":1818},"            ?",{"type":229,"tag":240,"props":1820,"children":1821},{"style":253},[1822],{"type":249,"value":1823}," value ",{"type":229,"tag":240,"props":1825,"children":1826},{"style":246},[1827],{"type":249,"value":505},{"type":229,"tag":240,"props":1829,"children":1830},{"style":253},[1831],{"type":249,"value":1832}," { from: tr.selection.from, to: tr.selection.to },\n",{"type":229,"tag":240,"props":1834,"children":1835},{"class":242,"line":1082},[1836],{"type":229,"tag":240,"props":1837,"children":1838},{"style":253},[1839],{"type":249,"value":1840},"        },\n",{"type":229,"tag":240,"props":1842,"children":1844},{"class":242,"line":1843},29,[1845,1849,1853,1858,1863,1867],{"type":229,"tag":240,"props":1846,"children":1847},{"style":286},[1848],{"type":249,"value":457},{"type":229,"tag":240,"props":1850,"children":1851},{"style":246},[1852],{"type":249,"value":462},{"type":229,"tag":240,"props":1854,"children":1855},{"style":253},[1856],{"type":249,"value":1857}," view",{"type":229,"tag":240,"props":1859,"children":1860},{"style":286},[1861],{"type":249,"value":1862}," - Mounted PM view. ",{"type":229,"tag":240,"props":1864,"children":1865},{"style":246},[1866],{"type":249,"value":312},{"type":229,"tag":240,"props":1868,"children":1869},{"style":286},[1870],{"type":249,"value":1871}," A view-scoped observer released with the view. *\u002F\n",{"type":229,"tag":240,"props":1873,"children":1875},{"class":242,"line":1874},30,[1876,1881,1885,1890],{"type":229,"tag":240,"props":1877,"children":1878},{"style":343},[1879],{"type":249,"value":1880},"        view",{"type":229,"tag":240,"props":1882,"children":1883},{"style":253},[1884],{"type":249,"value":535},{"type":229,"tag":240,"props":1886,"children":1887},{"style":498},[1888],{"type":249,"value":1889},"view",{"type":229,"tag":240,"props":1891,"children":1892},{"style":253},[1893],{"type":249,"value":1504},{"type":229,"tag":240,"props":1895,"children":1897},{"class":242,"line":1896},31,[1898,1903,1908,1912,1917,1922],{"type":229,"tag":240,"props":1899,"children":1900},{"style":343},[1901],{"type":249,"value":1902},"          notify",{"type":229,"tag":240,"props":1904,"children":1905},{"style":253},[1906],{"type":249,"value":1907},"(key.",{"type":229,"tag":240,"props":1909,"children":1910},{"style":343},[1911],{"type":249,"value":1368},{"type":229,"tag":240,"props":1913,"children":1914},{"style":253},[1915],{"type":249,"value":1916},"(view.state)",{"type":229,"tag":240,"props":1918,"children":1919},{"style":246},[1920],{"type":249,"value":1921},"!",{"type":229,"tag":240,"props":1923,"children":1924},{"style":253},[1925],{"type":249,"value":1253},{"type":229,"tag":240,"props":1927,"children":1929},{"class":242,"line":1928},32,[1930,1935],{"type":229,"tag":240,"props":1931,"children":1932},{"style":246},[1933],{"type":249,"value":1934},"          return",{"type":229,"tag":240,"props":1936,"children":1937},{"style":253},[1938],{"type":249,"value":1939}," {\n",{"type":229,"tag":240,"props":1941,"children":1943},{"class":242,"line":1942},33,[1944,1949,1953,1958,1963,1967,1972],{"type":229,"tag":240,"props":1945,"children":1946},{"style":286},[1947],{"type":249,"value":1948},"            \u002F** ",{"type":229,"tag":240,"props":1950,"children":1951},{"style":246},[1952],{"type":249,"value":462},{"type":229,"tag":240,"props":1954,"children":1955},{"style":253},[1956],{"type":249,"value":1957}," current",{"type":229,"tag":240,"props":1959,"children":1960},{"style":286},[1961],{"type":249,"value":1962}," - Current view. ",{"type":229,"tag":240,"props":1964,"children":1965},{"style":246},[1966],{"type":249,"value":462},{"type":229,"tag":240,"props":1968,"children":1969},{"style":253},[1970],{"type":249,"value":1971}," previous",{"type":229,"tag":240,"props":1973,"children":1974},{"style":286},[1975],{"type":249,"value":1976}," - Previously accepted state. *\u002F\n",{"type":229,"tag":240,"props":1978,"children":1980},{"class":242,"line":1979},34,[1981,1986,1990,1995,1999,2004],{"type":229,"tag":240,"props":1982,"children":1983},{"style":343},[1984],{"type":249,"value":1985},"            update",{"type":229,"tag":240,"props":1987,"children":1988},{"style":253},[1989],{"type":249,"value":535},{"type":229,"tag":240,"props":1991,"children":1992},{"style":498},[1993],{"type":249,"value":1994},"current",{"type":229,"tag":240,"props":1996,"children":1997},{"style":253},[1998],{"type":249,"value":651},{"type":229,"tag":240,"props":2000,"children":2001},{"style":498},[2002],{"type":249,"value":2003},"previous",{"type":229,"tag":240,"props":2005,"children":2006},{"style":253},[2007],{"type":249,"value":1504},{"type":229,"tag":240,"props":2009,"children":2011},{"class":242,"line":2010},35,[2012,2017,2021,2025,2029,2033,2038,2042],{"type":229,"tag":240,"props":2013,"children":2014},{"style":246},[2015],{"type":249,"value":2016},"              const",{"type":229,"tag":240,"props":2018,"children":2019},{"style":643},[2020],{"type":249,"value":1729},{"type":229,"tag":240,"props":2022,"children":2023},{"style":246},[2024],{"type":249,"value":1219},{"type":229,"tag":240,"props":2026,"children":2027},{"style":253},[2028],{"type":249,"value":1363},{"type":229,"tag":240,"props":2030,"children":2031},{"style":343},[2032],{"type":249,"value":1368},{"type":229,"tag":240,"props":2034,"children":2035},{"style":253},[2036],{"type":249,"value":2037},"(current.state)",{"type":229,"tag":240,"props":2039,"children":2040},{"style":246},[2041],{"type":249,"value":1921},{"type":229,"tag":240,"props":2043,"children":2044},{"style":253},[2045],{"type":249,"value":271},{"type":229,"tag":240,"props":2047,"children":2049},{"class":242,"line":2048},36,[2050,2055,2060,2065,2069,2073,2078,2082],{"type":229,"tag":240,"props":2051,"children":2052},{"style":246},[2053],{"type":249,"value":2054},"              if",{"type":229,"tag":240,"props":2056,"children":2057},{"style":253},[2058],{"type":249,"value":2059}," (value ",{"type":229,"tag":240,"props":2061,"children":2062},{"style":246},[2063],{"type":249,"value":2064},"!==",{"type":229,"tag":240,"props":2066,"children":2067},{"style":253},[2068],{"type":249,"value":1363},{"type":229,"tag":240,"props":2070,"children":2071},{"style":343},[2072],{"type":249,"value":1368},{"type":229,"tag":240,"props":2074,"children":2075},{"style":253},[2076],{"type":249,"value":2077},"(previous)) ",{"type":229,"tag":240,"props":2079,"children":2080},{"style":343},[2081],{"type":249,"value":1464},{"type":229,"tag":240,"props":2083,"children":2084},{"style":253},[2085],{"type":249,"value":2086},"(value);\n",{"type":229,"tag":240,"props":2088,"children":2090},{"class":242,"line":2089},37,[2091],{"type":229,"tag":240,"props":2092,"children":2093},{"style":253},[2094],{"type":249,"value":2095},"            },\n",{"type":229,"tag":240,"props":2097,"children":2099},{"class":242,"line":2098},38,[2100],{"type":229,"tag":240,"props":2101,"children":2102},{"style":253},[2103],{"type":249,"value":2104},"          };\n",{"type":229,"tag":240,"props":2106,"children":2108},{"class":242,"line":2107},39,[2109],{"type":229,"tag":240,"props":2110,"children":2111},{"style":253},[2112],{"type":249,"value":1840},{"type":229,"tag":240,"props":2114,"children":2116},{"class":242,"line":2115},40,[2117],{"type":229,"tag":240,"props":2118,"children":2119},{"style":253},[2120],{"type":249,"value":2121},"      })];\n",{"type":229,"tag":240,"props":2123,"children":2125},{"class":242,"line":2124},41,[2126],{"type":229,"tag":240,"props":2127,"children":2128},{"style":253},[2129],{"type":249,"value":697},{"type":229,"tag":240,"props":2131,"children":2133},{"class":242,"line":2132},42,[2134],{"type":229,"tag":240,"props":2135,"children":2136},{"style":253},[2137],{"type":249,"value":1079},{"type":229,"tag":240,"props":2139,"children":2141},{"class":242,"line":2140},43,[2142],{"type":229,"tag":240,"props":2143,"children":2144},{"style":253},[2145],{"type":249,"value":1088},{"type":229,"tag":1090,"props":2147,"children":2148},{},[2149],{"type":249,"value":1094},1793045209088]