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