[{"data":1,"prerenderedAt":2642},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fguide\u002Fnode-view":3,"quirekit-source:core\u002Fnode-view\u002Fcounter.ts":176,"quirekit-source:core\u002Fnode-view\u002Fview.ts":177,"mdc-8u0gzc-key":178,"mdc-hxfgzu-key":1585},{"id":4,"title":5,"body":6,"description":165,"extension":166,"keywords":167,"locale":168,"meta":169,"navigation":170,"order":159,"path":171,"section":172,"seo":173,"stem":174,"__hash__":175},"docs\u002Fguide\u002Fnode-view.en.md","Build an interactive NodeView",{"type":7,"value":8,"toc":157},"minimark",[9,24,29,44,48,63,67,82,100,104,107,121,139,143,147,154],[10,11,12,13,17,18,23],"p",{},"A Node defines saved data. A NodeView defines editing interaction. This chapter uses the ",[14,15,16],"strong",{},"DOM backend"," to add a +1 button to a counter block. Canvas\u002FSVG require ",[19,20,22],"a",{"href":21},"\u002Fen\u002Fbuild\u002Fextension","layout and selection adapters","; this DOM button is not automatically a canvas node.",[25,26,28],"h2",{"id":27},"_1-store-count-in-the-document","1. Store count in the document",[10,30,31,35,36,39,40,43],{},[32,33,34],"code",{},"docsCounter"," is a block atom with no editable children. Its ",[32,37,38],{},"count"," attribute defaults to 0. JSON stores the count; ",[32,41,42],{},"renderHTML()"," emits a static element rather than the editing button.",[45,46],"docs-recipe",{"name":47},"core\u002Fnode-view\u002Fcounter",[10,49,50,51,54,55,58,59,62],{},"Install ",[32,52,53],{},"createCounterNode()",", then insert ",[32,56,57],{},"{ type: 'docsCounter', attrs: { count: 0 } }",". ",[32,60,61],{},"atom: true"," treats it as one unit; it does not install format conversion or layout support. This example supplies no Markdown, DOCX or AI contract.",[25,64,66],{"id":65},"_2-read-the-current-position-and-node-on-click","2. Read the current position and node on click",[10,68,69,70,73,74,77,78,81],{},"Edits before the counter move its position. Each click calls ",[32,71,72],{},"getPos()",", then ",[32,75,76],{},"incrementDocsCounter(position)",". The command reads the current node and count from ",[32,79,80],{},"tr.doc",", checks type, numeric bounds and editability, then updates attributes.",[10,83,84,85,88,89,91,92,95,96,99],{},"Do not capture the initial count and repeatedly write ",[32,86,87],{},"initialCount + 1",", or cache the first ",[32,90,72],{}," result. Without ",[32,93,94],{},"dispatch",", the command only validates availability, so ",[32,97,98],{},"can().incrementDocsCounter(position)"," does not increment.",[25,101,103],{"id":102},"_3-keep-the-view-synchronized-with-content","3. Keep the view synchronized with content",[45,105],{"name":106},"core\u002Fnode-view\u002Fview",[10,108,109,112,113,116,117,120],{},[32,110,111],{},"update(next)"," receives a new immutable node. It updates and returns true for the same type; false asks the view to rebuild for another type. ",[32,114,115],{},"contentEditable=false"," keeps the button outside text input, while ",[32,118,119],{},"stopEvent"," assigns button events to the control.",[10,122,123,124,127,128,130,131,134,135,138],{},"This atom has no ",[32,125,126],{},"contentDOM",", so its own button changes can be ignored. A NodeView with editable children needs ",[32,129,126],{}," and must allow editor-owned input and selection changes; do not reuse this example's unconditional ",[32,132,133],{},"ignoreMutation()"," there. ",[32,136,137],{},"destroy()"," removes the listener this view created.",[25,140,142],{"id":141},"_4-try-it-and-inspect-saved-content","4. Try it and inspect saved content",[144,145],"docs-demo",{"name":146},"core\u002Fnode-view\u002Feditor",[10,148,149,150,153],{},"Click +1 twice to reach 2. Undo returns to 0 or the preceding history group. Download JSON and inspect ",[32,151,152],{},"attrs.count","; it must not contain button DOM. Insert a paragraph before the counter and verify that clicking still changes the same node. The preview's source tab includes the mounting component; node and view sources can be read independently.",[10,155,156],{},"The example command enforces read-only mode so the button cannot modify a read-only document. More complex controls also need keyboard access, focus restoration, selected appearance, and cancellation\u002Ffailure handling for external requests.",{"title":158,"searchDepth":159,"depth":159,"links":160},"",2,[161,162,163,164],{"id":27,"depth":159,"text":28},{"id":65,"depth":159,"text":66},{"id":102,"depth":159,"text":103},{"id":141,"depth":159,"text":142},"Add a button to a persistent counter node and connect rendering, positions, transactions and cleanup.","md",null,"en",{},true,"\u002Fen\u002Fguide\u002Fnode-view","Extension development",{"title":5,"description":165},"guide\u002Fnode-view.en","jf882sapy2DvW72QEkhME49JzH_xOAXuYqdtcRT_0pQ","import { Node, mergeAttributes } from \"@quirekit\u002Fcore\";\nimport { createCounterView } from \".\u002Fview\";\n\ndeclare module \"@quirekit\u002Fcore\" {\n  \u002F** Counter commands use the current canonical node, never a stale rendered value. *\u002F\n  interface Commands\u003CReturnType> {\n    \u002F** Counter node behavior. *\u002F\n    docsCounter: {\n      \u002F** @param position - Current position before the counter. @returns Whether increment is possible or accepted. *\u002F\n      incrementDocsCounter: (position: number) => ReturnType;\n    };\n  }\n}\n\n\u002F** @returns A fresh atom node; its count is saved, its button is not. *\u002F\nexport function createCounterNode() {\n  return Node.create({\n    name: \"docsCounter\", group: \"block\", atom: true,\n    \u002F** @returns Canonical count and defensive HTML parsing. *\u002F\n    addAttributes() {\n      return { count: { default: 0,\n        \u002F** @param element - External HTML. @returns A bounded nonnegative integer. *\u002F\n        parseHTML(element: HTMLElement) {\n          const value = Number(element.getAttribute(\"data-count\"));\n          return Number.isSafeInteger(value) && value >= 0 ? value : 0;\n        },\n        \u002F** @param attrs - Canonical count. @returns Portable HTML attribute. *\u002F\n        renderHTML: (attrs: Record\u003Cstring, unknown>) => ({ \"data-count\": attrs.count }),\n      } };\n    },\n    \u002F** @returns Portable HTML matching rule. *\u002F\n    parseHTML() { return [{ tag: \"div[data-docs-counter]\" }]; },\n    \u002F** @param props - Resolved attributes. @returns Static HTML independent of the interactive NodeView. *\u002F\n    renderHTML({ HTMLAttributes }) { return [\"div\", mergeAttributes(HTMLAttributes, { \"data-docs-counter\": \"\" }), String(HTMLAttributes[\"data-count\"])]; },\n    \u002F** @returns One typed transaction command, with no side effects in can(). *\u002F\n    addCommands() {\n      return { incrementDocsCounter: (position: number) => ({ editor, tr, dispatch }) => {\n        if (!editor.isEditable || !Number.isInteger(position) || position \u003C 0 || position >= tr.doc.content.size) return false;\n        const node = tr.doc.nodeAt(position);\n        if (node?.type.name !== this.name || !Number.isSafeInteger(node.attrs.count) || node.attrs.count >= Number.MAX_SAFE_INTEGER) return false;\n        if (dispatch) tr.setNodeMarkup(position, undefined, { ...node.attrs, count: node.attrs.count + 1 });\n        return true;\n      } };\n    },\n    \u002F** @returns The DOM backend's interactive renderer. Canvas requires its own adapters. *\u002F\n    addNodeView() { return createCounterView; },\n  });\n}\n","import type { QuireNodeViewRendererProps } from \"@quirekit\u002Fcore\";\nimport type { Node as PMNode } from \"@quirekit\u002Fpm\";\n\n\u002F**\n * Creates one DOM-only button for a counter atom.\n * @param props - Current node, owning editor and live position resolver.\n * @returns A renderer whose update\u002Fdestroy are owned by the mounted DOM view.\n *\u002F\nexport function createCounterView({ node, editor, view, getPos }: QuireNodeViewRendererProps) {\n  const dom = view.dom.ownerDocument.createElement(\"div\");\n  const button = dom.ownerDocument.createElement(\"button\");\n  dom.dataset.docsCounterView = \"\";\n  dom.contentEditable = \"false\";\n  button.type = \"button\";\n  dom.append(button);\n  \u002F** @param current - New immutable node from the document. *\u002F\n  function paint(current: PMNode): void { button.textContent = `+1 · ${current.attrs.count}`; }\n  \u002F** Reads the position on every click; preceding edits can move this node. *\u002F\n  function increment(): void {\n    const position = getPos();\n    if (typeof position === \"number\") editor.commands.incrementDocsCounter(position);\n  }\n  paint(node);\n  button.addEventListener(\"click\", increment);\n  return {\n    dom,\n    \u002F** @param next - Replacement node. @returns Whether this view can be reused. *\u002F\n    update(next: PMNode): boolean {\n      if (next.type !== node.type) return false;\n      node = next; paint(next); return true;\n    },\n    \u002F** @param event - Native control event. @returns Whether the counter owns the event. *\u002F\n    stopEvent: (event: Event): boolean => !!event.target && button.contains(event.target as globalThis.Node),\n    \u002F** @returns Whether this atom's own DOM changes can be ignored; there is no contentDOM. *\u002F\n    ignoreMutation: (): boolean => true,\n    \u002F** Releases exactly the listener created by this node view. *\u002F\n    destroy(): void { button.removeEventListener(\"click\", increment); },\n  };\n}\n",{"data":179,"body":180},{},{"type":181,"children":182},"root",[183,1579],{"type":184,"tag":185,"props":186,"children":190},"element","pre",{"className":187,"code":188,"language":189,"meta":158,"style":158},"language-ts shiki shiki-themes github-light github-light github-dark","import { Node, mergeAttributes } from \"@quirekit\u002Fcore\";\nimport { createCounterView } from \".\u002Fview\";\n\ndeclare module \"@quirekit\u002Fcore\" {\n  \u002F** Counter commands use the current canonical node, never a stale rendered value. *\u002F\n  interface Commands\u003CReturnType> {\n    \u002F** Counter node behavior. *\u002F\n    docsCounter: {\n      \u002F** @param position - Current position before the counter. @returns Whether increment is possible or accepted. *\u002F\n      incrementDocsCounter: (position: number) => ReturnType;\n    };\n  }\n}\n\n\u002F** @returns A fresh atom node; its count is saved, its button is not. *\u002F\nexport function createCounterNode() {\n  return Node.create({\n    name: \"docsCounter\", group: \"block\", atom: true,\n    \u002F** @returns Canonical count and defensive HTML parsing. *\u002F\n    addAttributes() {\n      return { count: { default: 0,\n        \u002F** @param element - External HTML. @returns A bounded nonnegative integer. *\u002F\n        parseHTML(element: HTMLElement) {\n          const value = Number(element.getAttribute(\"data-count\"));\n          return Number.isSafeInteger(value) && value >= 0 ? value : 0;\n        },\n        \u002F** @param attrs - Canonical count. @returns Portable HTML attribute. *\u002F\n        renderHTML: (attrs: Record\u003Cstring, unknown>) => ({ \"data-count\": attrs.count }),\n      } };\n    },\n    \u002F** @returns Portable HTML matching rule. *\u002F\n    parseHTML() { return [{ tag: \"div[data-docs-counter]\" }]; },\n    \u002F** @param props - Resolved attributes. @returns Static HTML independent of the interactive NodeView. *\u002F\n    renderHTML({ HTMLAttributes }) { return [\"div\", mergeAttributes(HTMLAttributes, { \"data-docs-counter\": \"\" }), String(HTMLAttributes[\"data-count\"])]; },\n    \u002F** @returns One typed transaction command, with no side effects in can(). *\u002F\n    addCommands() {\n      return { incrementDocsCounter: (position: number) => ({ editor, tr, dispatch }) => {\n        if (!editor.isEditable || !Number.isInteger(position) || position \u003C 0 || position >= tr.doc.content.size) return false;\n        const node = tr.doc.nodeAt(position);\n        if (node?.type.name !== this.name || !Number.isSafeInteger(node.attrs.count) || node.attrs.count >= Number.MAX_SAFE_INTEGER) return false;\n        if (dispatch) tr.setNodeMarkup(position, undefined, { ...node.attrs, count: node.attrs.count + 1 });\n        return true;\n      } };\n    },\n    \u002F** @returns The DOM backend's interactive renderer. Canvas requires its own adapters. *\u002F\n    addNodeView() { return createCounterView; },\n  });\n}\n\n","ts",[191],{"type":184,"tag":32,"props":192,"children":193},{"__ignoreMap":158},[194,229,254,263,286,296,326,335,354,388,440,449,458,467,475,493,517,541,580,598,611,634,666,698,746,811,820,851,921,930,939,956,990,1021,1112,1129,1142,1223,1319,1352,1431,1489,1507,1515,1523,1540,1562,1571],{"type":184,"tag":195,"props":196,"children":199},"span",{"class":197,"line":198},"line",1,[200,207,213,218,224],{"type":184,"tag":195,"props":201,"children":203},{"style":202},"--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583",[204],{"type":205,"value":206},"text","import",{"type":184,"tag":195,"props":208,"children":210},{"style":209},"--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8",[211],{"type":205,"value":212}," { Node, mergeAttributes } ",{"type":184,"tag":195,"props":214,"children":215},{"style":202},[216],{"type":205,"value":217},"from",{"type":184,"tag":195,"props":219,"children":221},{"style":220},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF",[222],{"type":205,"value":223}," \"@quirekit\u002Fcore\"",{"type":184,"tag":195,"props":225,"children":226},{"style":209},[227],{"type":205,"value":228},";\n",{"type":184,"tag":195,"props":230,"children":231},{"class":197,"line":159},[232,236,241,245,250],{"type":184,"tag":195,"props":233,"children":234},{"style":202},[235],{"type":205,"value":206},{"type":184,"tag":195,"props":237,"children":238},{"style":209},[239],{"type":205,"value":240}," { createCounterView } ",{"type":184,"tag":195,"props":242,"children":243},{"style":202},[244],{"type":205,"value":217},{"type":184,"tag":195,"props":246,"children":247},{"style":220},[248],{"type":205,"value":249}," \".\u002Fview\"",{"type":184,"tag":195,"props":251,"children":252},{"style":209},[253],{"type":205,"value":228},{"type":184,"tag":195,"props":255,"children":257},{"class":197,"line":256},3,[258],{"type":184,"tag":195,"props":259,"children":260},{"emptyLinePlaceholder":170},[261],{"type":205,"value":262},"\n",{"type":184,"tag":195,"props":264,"children":266},{"class":197,"line":265},4,[267,272,277,281],{"type":184,"tag":195,"props":268,"children":269},{"style":202},[270],{"type":205,"value":271},"declare",{"type":184,"tag":195,"props":273,"children":274},{"style":202},[275],{"type":205,"value":276}," module",{"type":184,"tag":195,"props":278,"children":279},{"style":220},[280],{"type":205,"value":223},{"type":184,"tag":195,"props":282,"children":283},{"style":209},[284],{"type":205,"value":285}," {\n",{"type":184,"tag":195,"props":287,"children":289},{"class":197,"line":288},5,[290],{"type":184,"tag":195,"props":291,"children":293},{"style":292},"--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D",[294],{"type":205,"value":295},"  \u002F** Counter commands use the current canonical node, never a stale rendered value. *\u002F\n",{"type":184,"tag":195,"props":297,"children":299},{"class":197,"line":298},6,[300,305,311,316,321],{"type":184,"tag":195,"props":301,"children":302},{"style":202},[303],{"type":205,"value":304},"  interface",{"type":184,"tag":195,"props":306,"children":308},{"style":307},"--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0",[309],{"type":205,"value":310}," Commands",{"type":184,"tag":195,"props":312,"children":313},{"style":209},[314],{"type":205,"value":315},"\u003C",{"type":184,"tag":195,"props":317,"children":318},{"style":307},[319],{"type":205,"value":320},"ReturnType",{"type":184,"tag":195,"props":322,"children":323},{"style":209},[324],{"type":205,"value":325},"> {\n",{"type":184,"tag":195,"props":327,"children":329},{"class":197,"line":328},7,[330],{"type":184,"tag":195,"props":331,"children":332},{"style":292},[333],{"type":205,"value":334},"    \u002F** Counter node behavior. *\u002F\n",{"type":184,"tag":195,"props":336,"children":338},{"class":197,"line":337},8,[339,345,350],{"type":184,"tag":195,"props":340,"children":342},{"style":341},"--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70",[343],{"type":205,"value":344},"    docsCounter",{"type":184,"tag":195,"props":346,"children":347},{"style":202},[348],{"type":205,"value":349},":",{"type":184,"tag":195,"props":351,"children":352},{"style":209},[353],{"type":205,"value":285},{"type":184,"tag":195,"props":355,"children":357},{"class":197,"line":356},9,[358,363,368,373,378,383],{"type":184,"tag":195,"props":359,"children":360},{"style":292},[361],{"type":205,"value":362},"      \u002F** ",{"type":184,"tag":195,"props":364,"children":365},{"style":202},[366],{"type":205,"value":367},"@param",{"type":184,"tag":195,"props":369,"children":370},{"style":209},[371],{"type":205,"value":372}," position",{"type":184,"tag":195,"props":374,"children":375},{"style":292},[376],{"type":205,"value":377}," - Current position before the counter. ",{"type":184,"tag":195,"props":379,"children":380},{"style":202},[381],{"type":205,"value":382},"@returns",{"type":184,"tag":195,"props":384,"children":385},{"style":292},[386],{"type":205,"value":387}," Whether increment is possible or accepted. *\u002F\n",{"type":184,"tag":195,"props":389,"children":391},{"class":197,"line":390},10,[392,397,401,406,411,415,421,426,431,436],{"type":184,"tag":195,"props":393,"children":394},{"style":307},[395],{"type":205,"value":396},"      incrementDocsCounter",{"type":184,"tag":195,"props":398,"children":399},{"style":202},[400],{"type":205,"value":349},{"type":184,"tag":195,"props":402,"children":403},{"style":209},[404],{"type":205,"value":405}," (",{"type":184,"tag":195,"props":407,"children":408},{"style":341},[409],{"type":205,"value":410},"position",{"type":184,"tag":195,"props":412,"children":413},{"style":202},[414],{"type":205,"value":349},{"type":184,"tag":195,"props":416,"children":418},{"style":417},"--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF",[419],{"type":205,"value":420}," number",{"type":184,"tag":195,"props":422,"children":423},{"style":209},[424],{"type":205,"value":425},") ",{"type":184,"tag":195,"props":427,"children":428},{"style":202},[429],{"type":205,"value":430},"=>",{"type":184,"tag":195,"props":432,"children":433},{"style":307},[434],{"type":205,"value":435}," ReturnType",{"type":184,"tag":195,"props":437,"children":438},{"style":209},[439],{"type":205,"value":228},{"type":184,"tag":195,"props":441,"children":443},{"class":197,"line":442},11,[444],{"type":184,"tag":195,"props":445,"children":446},{"style":209},[447],{"type":205,"value":448},"    };\n",{"type":184,"tag":195,"props":450,"children":452},{"class":197,"line":451},12,[453],{"type":184,"tag":195,"props":454,"children":455},{"style":209},[456],{"type":205,"value":457},"  }\n",{"type":184,"tag":195,"props":459,"children":461},{"class":197,"line":460},13,[462],{"type":184,"tag":195,"props":463,"children":464},{"style":209},[465],{"type":205,"value":466},"}\n",{"type":184,"tag":195,"props":468,"children":470},{"class":197,"line":469},14,[471],{"type":184,"tag":195,"props":472,"children":473},{"emptyLinePlaceholder":170},[474],{"type":205,"value":262},{"type":184,"tag":195,"props":476,"children":478},{"class":197,"line":477},15,[479,484,488],{"type":184,"tag":195,"props":480,"children":481},{"style":292},[482],{"type":205,"value":483},"\u002F** ",{"type":184,"tag":195,"props":485,"children":486},{"style":202},[487],{"type":205,"value":382},{"type":184,"tag":195,"props":489,"children":490},{"style":292},[491],{"type":205,"value":492}," A fresh atom node; its count is saved, its button is not. *\u002F\n",{"type":184,"tag":195,"props":494,"children":496},{"class":197,"line":495},16,[497,502,507,512],{"type":184,"tag":195,"props":498,"children":499},{"style":202},[500],{"type":205,"value":501},"export",{"type":184,"tag":195,"props":503,"children":504},{"style":202},[505],{"type":205,"value":506}," function",{"type":184,"tag":195,"props":508,"children":509},{"style":307},[510],{"type":205,"value":511}," createCounterNode",{"type":184,"tag":195,"props":513,"children":514},{"style":209},[515],{"type":205,"value":516},"() {\n",{"type":184,"tag":195,"props":518,"children":520},{"class":197,"line":519},17,[521,526,531,536],{"type":184,"tag":195,"props":522,"children":523},{"style":202},[524],{"type":205,"value":525},"  return",{"type":184,"tag":195,"props":527,"children":528},{"style":209},[529],{"type":205,"value":530}," Node.",{"type":184,"tag":195,"props":532,"children":533},{"style":307},[534],{"type":205,"value":535},"create",{"type":184,"tag":195,"props":537,"children":538},{"style":209},[539],{"type":205,"value":540},"({\n",{"type":184,"tag":195,"props":542,"children":544},{"class":197,"line":543},18,[545,550,555,560,565,570,575],{"type":184,"tag":195,"props":546,"children":547},{"style":209},[548],{"type":205,"value":549},"    name: ",{"type":184,"tag":195,"props":551,"children":552},{"style":220},[553],{"type":205,"value":554},"\"docsCounter\"",{"type":184,"tag":195,"props":556,"children":557},{"style":209},[558],{"type":205,"value":559},", group: ",{"type":184,"tag":195,"props":561,"children":562},{"style":220},[563],{"type":205,"value":564},"\"block\"",{"type":184,"tag":195,"props":566,"children":567},{"style":209},[568],{"type":205,"value":569},", atom: ",{"type":184,"tag":195,"props":571,"children":572},{"style":417},[573],{"type":205,"value":574},"true",{"type":184,"tag":195,"props":576,"children":577},{"style":209},[578],{"type":205,"value":579},",\n",{"type":184,"tag":195,"props":581,"children":583},{"class":197,"line":582},19,[584,589,593],{"type":184,"tag":195,"props":585,"children":586},{"style":292},[587],{"type":205,"value":588},"    \u002F** ",{"type":184,"tag":195,"props":590,"children":591},{"style":202},[592],{"type":205,"value":382},{"type":184,"tag":195,"props":594,"children":595},{"style":292},[596],{"type":205,"value":597}," Canonical count and defensive HTML parsing. *\u002F\n",{"type":184,"tag":195,"props":599,"children":601},{"class":197,"line":600},20,[602,607],{"type":184,"tag":195,"props":603,"children":604},{"style":307},[605],{"type":205,"value":606},"    addAttributes",{"type":184,"tag":195,"props":608,"children":609},{"style":209},[610],{"type":205,"value":516},{"type":184,"tag":195,"props":612,"children":614},{"class":197,"line":613},21,[615,620,625,630],{"type":184,"tag":195,"props":616,"children":617},{"style":202},[618],{"type":205,"value":619},"      return",{"type":184,"tag":195,"props":621,"children":622},{"style":209},[623],{"type":205,"value":624}," { count: { default: ",{"type":184,"tag":195,"props":626,"children":627},{"style":417},[628],{"type":205,"value":629},"0",{"type":184,"tag":195,"props":631,"children":632},{"style":209},[633],{"type":205,"value":579},{"type":184,"tag":195,"props":635,"children":637},{"class":197,"line":636},22,[638,643,647,652,657,661],{"type":184,"tag":195,"props":639,"children":640},{"style":292},[641],{"type":205,"value":642},"        \u002F** ",{"type":184,"tag":195,"props":644,"children":645},{"style":202},[646],{"type":205,"value":367},{"type":184,"tag":195,"props":648,"children":649},{"style":209},[650],{"type":205,"value":651}," element",{"type":184,"tag":195,"props":653,"children":654},{"style":292},[655],{"type":205,"value":656}," - External HTML. ",{"type":184,"tag":195,"props":658,"children":659},{"style":202},[660],{"type":205,"value":382},{"type":184,"tag":195,"props":662,"children":663},{"style":292},[664],{"type":205,"value":665}," A bounded nonnegative integer. *\u002F\n",{"type":184,"tag":195,"props":667,"children":669},{"class":197,"line":668},23,[670,675,680,684,688,693],{"type":184,"tag":195,"props":671,"children":672},{"style":307},[673],{"type":205,"value":674},"        parseHTML",{"type":184,"tag":195,"props":676,"children":677},{"style":209},[678],{"type":205,"value":679},"(",{"type":184,"tag":195,"props":681,"children":682},{"style":341},[683],{"type":205,"value":184},{"type":184,"tag":195,"props":685,"children":686},{"style":202},[687],{"type":205,"value":349},{"type":184,"tag":195,"props":689,"children":690},{"style":307},[691],{"type":205,"value":692}," HTMLElement",{"type":184,"tag":195,"props":694,"children":695},{"style":209},[696],{"type":205,"value":697},") {\n",{"type":184,"tag":195,"props":699,"children":701},{"class":197,"line":700},24,[702,707,712,717,722,727,732,736,741],{"type":184,"tag":195,"props":703,"children":704},{"style":202},[705],{"type":205,"value":706},"          const",{"type":184,"tag":195,"props":708,"children":709},{"style":417},[710],{"type":205,"value":711}," value",{"type":184,"tag":195,"props":713,"children":714},{"style":202},[715],{"type":205,"value":716}," =",{"type":184,"tag":195,"props":718,"children":719},{"style":307},[720],{"type":205,"value":721}," Number",{"type":184,"tag":195,"props":723,"children":724},{"style":209},[725],{"type":205,"value":726},"(element.",{"type":184,"tag":195,"props":728,"children":729},{"style":307},[730],{"type":205,"value":731},"getAttribute",{"type":184,"tag":195,"props":733,"children":734},{"style":209},[735],{"type":205,"value":679},{"type":184,"tag":195,"props":737,"children":738},{"style":220},[739],{"type":205,"value":740},"\"data-count\"",{"type":184,"tag":195,"props":742,"children":743},{"style":209},[744],{"type":205,"value":745},"));\n",{"type":184,"tag":195,"props":747,"children":749},{"class":197,"line":748},25,[750,755,760,765,770,775,780,785,790,795,799,803,807],{"type":184,"tag":195,"props":751,"children":752},{"style":202},[753],{"type":205,"value":754},"          return",{"type":184,"tag":195,"props":756,"children":757},{"style":209},[758],{"type":205,"value":759}," Number.",{"type":184,"tag":195,"props":761,"children":762},{"style":307},[763],{"type":205,"value":764},"isSafeInteger",{"type":184,"tag":195,"props":766,"children":767},{"style":209},[768],{"type":205,"value":769},"(value) ",{"type":184,"tag":195,"props":771,"children":772},{"style":202},[773],{"type":205,"value":774},"&&",{"type":184,"tag":195,"props":776,"children":777},{"style":209},[778],{"type":205,"value":779}," value ",{"type":184,"tag":195,"props":781,"children":782},{"style":202},[783],{"type":205,"value":784},">=",{"type":184,"tag":195,"props":786,"children":787},{"style":417},[788],{"type":205,"value":789}," 0",{"type":184,"tag":195,"props":791,"children":792},{"style":202},[793],{"type":205,"value":794}," ?",{"type":184,"tag":195,"props":796,"children":797},{"style":209},[798],{"type":205,"value":779},{"type":184,"tag":195,"props":800,"children":801},{"style":202},[802],{"type":205,"value":349},{"type":184,"tag":195,"props":804,"children":805},{"style":417},[806],{"type":205,"value":789},{"type":184,"tag":195,"props":808,"children":809},{"style":209},[810],{"type":205,"value":228},{"type":184,"tag":195,"props":812,"children":814},{"class":197,"line":813},26,[815],{"type":184,"tag":195,"props":816,"children":817},{"style":209},[818],{"type":205,"value":819},"        },\n",{"type":184,"tag":195,"props":821,"children":823},{"class":197,"line":822},27,[824,828,832,837,842,846],{"type":184,"tag":195,"props":825,"children":826},{"style":292},[827],{"type":205,"value":642},{"type":184,"tag":195,"props":829,"children":830},{"style":202},[831],{"type":205,"value":367},{"type":184,"tag":195,"props":833,"children":834},{"style":209},[835],{"type":205,"value":836}," attrs",{"type":184,"tag":195,"props":838,"children":839},{"style":292},[840],{"type":205,"value":841}," - Canonical count. ",{"type":184,"tag":195,"props":843,"children":844},{"style":202},[845],{"type":205,"value":382},{"type":184,"tag":195,"props":847,"children":848},{"style":292},[849],{"type":205,"value":850}," Portable HTML attribute. *\u002F\n",{"type":184,"tag":195,"props":852,"children":854},{"class":197,"line":853},28,[855,860,865,870,874,879,883,888,893,898,903,907,912,916],{"type":184,"tag":195,"props":856,"children":857},{"style":307},[858],{"type":205,"value":859},"        renderHTML",{"type":184,"tag":195,"props":861,"children":862},{"style":209},[863],{"type":205,"value":864},": (",{"type":184,"tag":195,"props":866,"children":867},{"style":341},[868],{"type":205,"value":869},"attrs",{"type":184,"tag":195,"props":871,"children":872},{"style":202},[873],{"type":205,"value":349},{"type":184,"tag":195,"props":875,"children":876},{"style":307},[877],{"type":205,"value":878}," Record",{"type":184,"tag":195,"props":880,"children":881},{"style":209},[882],{"type":205,"value":315},{"type":184,"tag":195,"props":884,"children":885},{"style":417},[886],{"type":205,"value":887},"string",{"type":184,"tag":195,"props":889,"children":890},{"style":209},[891],{"type":205,"value":892},", ",{"type":184,"tag":195,"props":894,"children":895},{"style":417},[896],{"type":205,"value":897},"unknown",{"type":184,"tag":195,"props":899,"children":900},{"style":209},[901],{"type":205,"value":902},">) ",{"type":184,"tag":195,"props":904,"children":905},{"style":202},[906],{"type":205,"value":430},{"type":184,"tag":195,"props":908,"children":909},{"style":209},[910],{"type":205,"value":911}," ({ ",{"type":184,"tag":195,"props":913,"children":914},{"style":220},[915],{"type":205,"value":740},{"type":184,"tag":195,"props":917,"children":918},{"style":209},[919],{"type":205,"value":920},": attrs.count }),\n",{"type":184,"tag":195,"props":922,"children":924},{"class":197,"line":923},29,[925],{"type":184,"tag":195,"props":926,"children":927},{"style":209},[928],{"type":205,"value":929},"      } };\n",{"type":184,"tag":195,"props":931,"children":933},{"class":197,"line":932},30,[934],{"type":184,"tag":195,"props":935,"children":936},{"style":209},[937],{"type":205,"value":938},"    },\n",{"type":184,"tag":195,"props":940,"children":942},{"class":197,"line":941},31,[943,947,951],{"type":184,"tag":195,"props":944,"children":945},{"style":292},[946],{"type":205,"value":588},{"type":184,"tag":195,"props":948,"children":949},{"style":202},[950],{"type":205,"value":382},{"type":184,"tag":195,"props":952,"children":953},{"style":292},[954],{"type":205,"value":955}," Portable HTML matching rule. *\u002F\n",{"type":184,"tag":195,"props":957,"children":959},{"class":197,"line":958},32,[960,965,970,975,980,985],{"type":184,"tag":195,"props":961,"children":962},{"style":307},[963],{"type":205,"value":964},"    parseHTML",{"type":184,"tag":195,"props":966,"children":967},{"style":209},[968],{"type":205,"value":969},"() { ",{"type":184,"tag":195,"props":971,"children":972},{"style":202},[973],{"type":205,"value":974},"return",{"type":184,"tag":195,"props":976,"children":977},{"style":209},[978],{"type":205,"value":979}," [{ tag: ",{"type":184,"tag":195,"props":981,"children":982},{"style":220},[983],{"type":205,"value":984},"\"div[data-docs-counter]\"",{"type":184,"tag":195,"props":986,"children":987},{"style":209},[988],{"type":205,"value":989}," }]; },\n",{"type":184,"tag":195,"props":991,"children":993},{"class":197,"line":992},33,[994,998,1002,1007,1012,1016],{"type":184,"tag":195,"props":995,"children":996},{"style":292},[997],{"type":205,"value":588},{"type":184,"tag":195,"props":999,"children":1000},{"style":202},[1001],{"type":205,"value":367},{"type":184,"tag":195,"props":1003,"children":1004},{"style":209},[1005],{"type":205,"value":1006}," props",{"type":184,"tag":195,"props":1008,"children":1009},{"style":292},[1010],{"type":205,"value":1011}," - Resolved attributes. ",{"type":184,"tag":195,"props":1013,"children":1014},{"style":202},[1015],{"type":205,"value":382},{"type":184,"tag":195,"props":1017,"children":1018},{"style":292},[1019],{"type":205,"value":1020}," Static HTML independent of the interactive NodeView. *\u002F\n",{"type":184,"tag":195,"props":1022,"children":1024},{"class":197,"line":1023},34,[1025,1030,1035,1040,1045,1049,1054,1059,1063,1068,1073,1078,1083,1088,1093,1098,1103,1107],{"type":184,"tag":195,"props":1026,"children":1027},{"style":307},[1028],{"type":205,"value":1029},"    renderHTML",{"type":184,"tag":195,"props":1031,"children":1032},{"style":209},[1033],{"type":205,"value":1034},"({ ",{"type":184,"tag":195,"props":1036,"children":1037},{"style":341},[1038],{"type":205,"value":1039},"HTMLAttributes",{"type":184,"tag":195,"props":1041,"children":1042},{"style":209},[1043],{"type":205,"value":1044}," }) { ",{"type":184,"tag":195,"props":1046,"children":1047},{"style":202},[1048],{"type":205,"value":974},{"type":184,"tag":195,"props":1050,"children":1051},{"style":209},[1052],{"type":205,"value":1053}," [",{"type":184,"tag":195,"props":1055,"children":1056},{"style":220},[1057],{"type":205,"value":1058},"\"div\"",{"type":184,"tag":195,"props":1060,"children":1061},{"style":209},[1062],{"type":205,"value":892},{"type":184,"tag":195,"props":1064,"children":1065},{"style":307},[1066],{"type":205,"value":1067},"mergeAttributes",{"type":184,"tag":195,"props":1069,"children":1070},{"style":209},[1071],{"type":205,"value":1072},"(HTMLAttributes, { ",{"type":184,"tag":195,"props":1074,"children":1075},{"style":220},[1076],{"type":205,"value":1077},"\"data-docs-counter\"",{"type":184,"tag":195,"props":1079,"children":1080},{"style":209},[1081],{"type":205,"value":1082},": ",{"type":184,"tag":195,"props":1084,"children":1085},{"style":220},[1086],{"type":205,"value":1087},"\"\"",{"type":184,"tag":195,"props":1089,"children":1090},{"style":209},[1091],{"type":205,"value":1092}," }), ",{"type":184,"tag":195,"props":1094,"children":1095},{"style":307},[1096],{"type":205,"value":1097},"String",{"type":184,"tag":195,"props":1099,"children":1100},{"style":209},[1101],{"type":205,"value":1102},"(HTMLAttributes[",{"type":184,"tag":195,"props":1104,"children":1105},{"style":220},[1106],{"type":205,"value":740},{"type":184,"tag":195,"props":1108,"children":1109},{"style":209},[1110],{"type":205,"value":1111},"])]; },\n",{"type":184,"tag":195,"props":1113,"children":1115},{"class":197,"line":1114},35,[1116,1120,1124],{"type":184,"tag":195,"props":1117,"children":1118},{"style":292},[1119],{"type":205,"value":588},{"type":184,"tag":195,"props":1121,"children":1122},{"style":202},[1123],{"type":205,"value":382},{"type":184,"tag":195,"props":1125,"children":1126},{"style":292},[1127],{"type":205,"value":1128}," One typed transaction command, with no side effects in can(). *\u002F\n",{"type":184,"tag":195,"props":1130,"children":1132},{"class":197,"line":1131},36,[1133,1138],{"type":184,"tag":195,"props":1134,"children":1135},{"style":307},[1136],{"type":205,"value":1137},"    addCommands",{"type":184,"tag":195,"props":1139,"children":1140},{"style":209},[1141],{"type":205,"value":516},{"type":184,"tag":195,"props":1143,"children":1145},{"class":197,"line":1144},37,[1146,1150,1155,1160,1164,1168,1172,1176,1180,1184,1188,1193,1197,1202,1206,1210,1215,1219],{"type":184,"tag":195,"props":1147,"children":1148},{"style":202},[1149],{"type":205,"value":619},{"type":184,"tag":195,"props":1151,"children":1152},{"style":209},[1153],{"type":205,"value":1154}," { ",{"type":184,"tag":195,"props":1156,"children":1157},{"style":307},[1158],{"type":205,"value":1159},"incrementDocsCounter",{"type":184,"tag":195,"props":1161,"children":1162},{"style":209},[1163],{"type":205,"value":864},{"type":184,"tag":195,"props":1165,"children":1166},{"style":341},[1167],{"type":205,"value":410},{"type":184,"tag":195,"props":1169,"children":1170},{"style":202},[1171],{"type":205,"value":349},{"type":184,"tag":195,"props":1173,"children":1174},{"style":417},[1175],{"type":205,"value":420},{"type":184,"tag":195,"props":1177,"children":1178},{"style":209},[1179],{"type":205,"value":425},{"type":184,"tag":195,"props":1181,"children":1182},{"style":202},[1183],{"type":205,"value":430},{"type":184,"tag":195,"props":1185,"children":1186},{"style":209},[1187],{"type":205,"value":911},{"type":184,"tag":195,"props":1189,"children":1190},{"style":341},[1191],{"type":205,"value":1192},"editor",{"type":184,"tag":195,"props":1194,"children":1195},{"style":209},[1196],{"type":205,"value":892},{"type":184,"tag":195,"props":1198,"children":1199},{"style":341},[1200],{"type":205,"value":1201},"tr",{"type":184,"tag":195,"props":1203,"children":1204},{"style":209},[1205],{"type":205,"value":892},{"type":184,"tag":195,"props":1207,"children":1208},{"style":341},[1209],{"type":205,"value":94},{"type":184,"tag":195,"props":1211,"children":1212},{"style":209},[1213],{"type":205,"value":1214}," }) ",{"type":184,"tag":195,"props":1216,"children":1217},{"style":202},[1218],{"type":205,"value":430},{"type":184,"tag":195,"props":1220,"children":1221},{"style":209},[1222],{"type":205,"value":285},{"type":184,"tag":195,"props":1224,"children":1226},{"class":197,"line":1225},38,[1227,1232,1236,1241,1246,1251,1256,1261,1266,1271,1275,1280,1284,1288,1293,1297,1301,1306,1310,1315],{"type":184,"tag":195,"props":1228,"children":1229},{"style":202},[1230],{"type":205,"value":1231},"        if",{"type":184,"tag":195,"props":1233,"children":1234},{"style":209},[1235],{"type":205,"value":405},{"type":184,"tag":195,"props":1237,"children":1238},{"style":202},[1239],{"type":205,"value":1240},"!",{"type":184,"tag":195,"props":1242,"children":1243},{"style":209},[1244],{"type":205,"value":1245},"editor.isEditable ",{"type":184,"tag":195,"props":1247,"children":1248},{"style":202},[1249],{"type":205,"value":1250},"||",{"type":184,"tag":195,"props":1252,"children":1253},{"style":202},[1254],{"type":205,"value":1255}," !",{"type":184,"tag":195,"props":1257,"children":1258},{"style":209},[1259],{"type":205,"value":1260},"Number.",{"type":184,"tag":195,"props":1262,"children":1263},{"style":307},[1264],{"type":205,"value":1265},"isInteger",{"type":184,"tag":195,"props":1267,"children":1268},{"style":209},[1269],{"type":205,"value":1270},"(position) ",{"type":184,"tag":195,"props":1272,"children":1273},{"style":202},[1274],{"type":205,"value":1250},{"type":184,"tag":195,"props":1276,"children":1277},{"style":209},[1278],{"type":205,"value":1279}," position ",{"type":184,"tag":195,"props":1281,"children":1282},{"style":202},[1283],{"type":205,"value":315},{"type":184,"tag":195,"props":1285,"children":1286},{"style":417},[1287],{"type":205,"value":789},{"type":184,"tag":195,"props":1289,"children":1290},{"style":202},[1291],{"type":205,"value":1292}," ||",{"type":184,"tag":195,"props":1294,"children":1295},{"style":209},[1296],{"type":205,"value":1279},{"type":184,"tag":195,"props":1298,"children":1299},{"style":202},[1300],{"type":205,"value":784},{"type":184,"tag":195,"props":1302,"children":1303},{"style":209},[1304],{"type":205,"value":1305}," tr.doc.content.size) ",{"type":184,"tag":195,"props":1307,"children":1308},{"style":202},[1309],{"type":205,"value":974},{"type":184,"tag":195,"props":1311,"children":1312},{"style":417},[1313],{"type":205,"value":1314}," false",{"type":184,"tag":195,"props":1316,"children":1317},{"style":209},[1318],{"type":205,"value":228},{"type":184,"tag":195,"props":1320,"children":1322},{"class":197,"line":1321},39,[1323,1328,1333,1337,1342,1347],{"type":184,"tag":195,"props":1324,"children":1325},{"style":202},[1326],{"type":205,"value":1327},"        const",{"type":184,"tag":195,"props":1329,"children":1330},{"style":417},[1331],{"type":205,"value":1332}," node",{"type":184,"tag":195,"props":1334,"children":1335},{"style":202},[1336],{"type":205,"value":716},{"type":184,"tag":195,"props":1338,"children":1339},{"style":209},[1340],{"type":205,"value":1341}," tr.doc.",{"type":184,"tag":195,"props":1343,"children":1344},{"style":307},[1345],{"type":205,"value":1346},"nodeAt",{"type":184,"tag":195,"props":1348,"children":1349},{"style":209},[1350],{"type":205,"value":1351},"(position);\n",{"type":184,"tag":195,"props":1353,"children":1355},{"class":197,"line":1354},40,[1356,1360,1365,1370,1375,1380,1384,1388,1392,1396,1401,1405,1410,1414,1419,1423,1427],{"type":184,"tag":195,"props":1357,"children":1358},{"style":202},[1359],{"type":205,"value":1231},{"type":184,"tag":195,"props":1361,"children":1362},{"style":209},[1363],{"type":205,"value":1364}," (node?.type.name ",{"type":184,"tag":195,"props":1366,"children":1367},{"style":202},[1368],{"type":205,"value":1369},"!==",{"type":184,"tag":195,"props":1371,"children":1372},{"style":417},[1373],{"type":205,"value":1374}," this",{"type":184,"tag":195,"props":1376,"children":1377},{"style":209},[1378],{"type":205,"value":1379},".name ",{"type":184,"tag":195,"props":1381,"children":1382},{"style":202},[1383],{"type":205,"value":1250},{"type":184,"tag":195,"props":1385,"children":1386},{"style":202},[1387],{"type":205,"value":1255},{"type":184,"tag":195,"props":1389,"children":1390},{"style":209},[1391],{"type":205,"value":1260},{"type":184,"tag":195,"props":1393,"children":1394},{"style":307},[1395],{"type":205,"value":764},{"type":184,"tag":195,"props":1397,"children":1398},{"style":209},[1399],{"type":205,"value":1400},"(node.attrs.count) ",{"type":184,"tag":195,"props":1402,"children":1403},{"style":202},[1404],{"type":205,"value":1250},{"type":184,"tag":195,"props":1406,"children":1407},{"style":209},[1408],{"type":205,"value":1409}," node.attrs.count ",{"type":184,"tag":195,"props":1411,"children":1412},{"style":202},[1413],{"type":205,"value":784},{"type":184,"tag":195,"props":1415,"children":1416},{"style":209},[1417],{"type":205,"value":1418}," Number.MAX_SAFE_INTEGER) ",{"type":184,"tag":195,"props":1420,"children":1421},{"style":202},[1422],{"type":205,"value":974},{"type":184,"tag":195,"props":1424,"children":1425},{"style":417},[1426],{"type":205,"value":1314},{"type":184,"tag":195,"props":1428,"children":1429},{"style":209},[1430],{"type":205,"value":228},{"type":184,"tag":195,"props":1432,"children":1434},{"class":197,"line":1433},41,[1435,1439,1444,1449,1454,1459,1464,1469,1474,1479,1484],{"type":184,"tag":195,"props":1436,"children":1437},{"style":202},[1438],{"type":205,"value":1231},{"type":184,"tag":195,"props":1440,"children":1441},{"style":209},[1442],{"type":205,"value":1443}," (dispatch) tr.",{"type":184,"tag":195,"props":1445,"children":1446},{"style":307},[1447],{"type":205,"value":1448},"setNodeMarkup",{"type":184,"tag":195,"props":1450,"children":1451},{"style":209},[1452],{"type":205,"value":1453},"(position, ",{"type":184,"tag":195,"props":1455,"children":1456},{"style":417},[1457],{"type":205,"value":1458},"undefined",{"type":184,"tag":195,"props":1460,"children":1461},{"style":209},[1462],{"type":205,"value":1463},", { ",{"type":184,"tag":195,"props":1465,"children":1466},{"style":202},[1467],{"type":205,"value":1468},"...",{"type":184,"tag":195,"props":1470,"children":1471},{"style":209},[1472],{"type":205,"value":1473},"node.attrs, count: node.attrs.count ",{"type":184,"tag":195,"props":1475,"children":1476},{"style":202},[1477],{"type":205,"value":1478},"+",{"type":184,"tag":195,"props":1480,"children":1481},{"style":417},[1482],{"type":205,"value":1483}," 1",{"type":184,"tag":195,"props":1485,"children":1486},{"style":209},[1487],{"type":205,"value":1488}," });\n",{"type":184,"tag":195,"props":1490,"children":1492},{"class":197,"line":1491},42,[1493,1498,1503],{"type":184,"tag":195,"props":1494,"children":1495},{"style":202},[1496],{"type":205,"value":1497},"        return",{"type":184,"tag":195,"props":1499,"children":1500},{"style":417},[1501],{"type":205,"value":1502}," true",{"type":184,"tag":195,"props":1504,"children":1505},{"style":209},[1506],{"type":205,"value":228},{"type":184,"tag":195,"props":1508,"children":1510},{"class":197,"line":1509},43,[1511],{"type":184,"tag":195,"props":1512,"children":1513},{"style":209},[1514],{"type":205,"value":929},{"type":184,"tag":195,"props":1516,"children":1518},{"class":197,"line":1517},44,[1519],{"type":184,"tag":195,"props":1520,"children":1521},{"style":209},[1522],{"type":205,"value":938},{"type":184,"tag":195,"props":1524,"children":1526},{"class":197,"line":1525},45,[1527,1531,1535],{"type":184,"tag":195,"props":1528,"children":1529},{"style":292},[1530],{"type":205,"value":588},{"type":184,"tag":195,"props":1532,"children":1533},{"style":202},[1534],{"type":205,"value":382},{"type":184,"tag":195,"props":1536,"children":1537},{"style":292},[1538],{"type":205,"value":1539}," The DOM backend's interactive renderer. Canvas requires its own adapters. *\u002F\n",{"type":184,"tag":195,"props":1541,"children":1543},{"class":197,"line":1542},46,[1544,1549,1553,1557],{"type":184,"tag":195,"props":1545,"children":1546},{"style":307},[1547],{"type":205,"value":1548},"    addNodeView",{"type":184,"tag":195,"props":1550,"children":1551},{"style":209},[1552],{"type":205,"value":969},{"type":184,"tag":195,"props":1554,"children":1555},{"style":202},[1556],{"type":205,"value":974},{"type":184,"tag":195,"props":1558,"children":1559},{"style":209},[1560],{"type":205,"value":1561}," createCounterView; },\n",{"type":184,"tag":195,"props":1563,"children":1565},{"class":197,"line":1564},47,[1566],{"type":184,"tag":195,"props":1567,"children":1568},{"style":209},[1569],{"type":205,"value":1570},"  });\n",{"type":184,"tag":195,"props":1572,"children":1574},{"class":197,"line":1573},48,[1575],{"type":184,"tag":195,"props":1576,"children":1577},{"style":209},[1578],{"type":205,"value":466},{"type":184,"tag":1580,"props":1581,"children":1582},"style",{},[1583],{"type":205,"value":1584},"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":1586,"body":1587},{},{"type":181,"children":1588},[1589,2638],{"type":184,"tag":185,"props":1590,"children":1592},{"className":187,"code":1591,"language":189,"meta":158,"style":158},"import type { QuireNodeViewRendererProps } from \"@quirekit\u002Fcore\";\nimport type { Node as PMNode } from \"@quirekit\u002Fpm\";\n\n\u002F**\n * Creates one DOM-only button for a counter atom.\n * @param props - Current node, owning editor and live position resolver.\n * @returns A renderer whose update\u002Fdestroy are owned by the mounted DOM view.\n *\u002F\nexport function createCounterView({ node, editor, view, getPos }: QuireNodeViewRendererProps) {\n  const dom = view.dom.ownerDocument.createElement(\"div\");\n  const button = dom.ownerDocument.createElement(\"button\");\n  dom.dataset.docsCounterView = \"\";\n  dom.contentEditable = \"false\";\n  button.type = \"button\";\n  dom.append(button);\n  \u002F** @param current - New immutable node from the document. *\u002F\n  function paint(current: PMNode): void { button.textContent = `+1 · ${current.attrs.count}`; }\n  \u002F** Reads the position on every click; preceding edits can move this node. *\u002F\n  function increment(): void {\n    const position = getPos();\n    if (typeof position === \"number\") editor.commands.incrementDocsCounter(position);\n  }\n  paint(node);\n  button.addEventListener(\"click\", increment);\n  return {\n    dom,\n    \u002F** @param next - Replacement node. @returns Whether this view can be reused. *\u002F\n    update(next: PMNode): boolean {\n      if (next.type !== node.type) return false;\n      node = next; paint(next); return true;\n    },\n    \u002F** @param event - Native control event. @returns Whether the counter owns the event. *\u002F\n    stopEvent: (event: Event): boolean => !!event.target && button.contains(event.target as globalThis.Node),\n    \u002F** @returns Whether this atom's own DOM changes can be ignored; there is no contentDOM. *\u002F\n    ignoreMutation: (): boolean => true,\n    \u002F** Releases exactly the listener created by this node view. *\u002F\n    destroy(): void { button.removeEventListener(\"click\", increment); },\n  };\n}\n\n",[1593],{"type":184,"tag":32,"props":1594,"children":1595},{"__ignoreMap":158},[1596,1625,1664,1671,1679,1687,1708,1724,1732,1801,1841,1879,1901,1922,1943,1961,1983,2073,2081,2110,2136,2180,2187,2200,2227,2238,2246,2276,2318,2352,2391,2398,2428,2523,2539,2572,2580,2623,2631],{"type":184,"tag":195,"props":1597,"children":1598},{"class":197,"line":198},[1599,1603,1608,1613,1617,1621],{"type":184,"tag":195,"props":1600,"children":1601},{"style":202},[1602],{"type":205,"value":206},{"type":184,"tag":195,"props":1604,"children":1605},{"style":202},[1606],{"type":205,"value":1607}," type",{"type":184,"tag":195,"props":1609,"children":1610},{"style":209},[1611],{"type":205,"value":1612}," { QuireNodeViewRendererProps } ",{"type":184,"tag":195,"props":1614,"children":1615},{"style":202},[1616],{"type":205,"value":217},{"type":184,"tag":195,"props":1618,"children":1619},{"style":220},[1620],{"type":205,"value":223},{"type":184,"tag":195,"props":1622,"children":1623},{"style":209},[1624],{"type":205,"value":228},{"type":184,"tag":195,"props":1626,"children":1627},{"class":197,"line":159},[1628,1632,1636,1641,1646,1651,1655,1660],{"type":184,"tag":195,"props":1629,"children":1630},{"style":202},[1631],{"type":205,"value":206},{"type":184,"tag":195,"props":1633,"children":1634},{"style":202},[1635],{"type":205,"value":1607},{"type":184,"tag":195,"props":1637,"children":1638},{"style":209},[1639],{"type":205,"value":1640}," { Node ",{"type":184,"tag":195,"props":1642,"children":1643},{"style":202},[1644],{"type":205,"value":1645},"as",{"type":184,"tag":195,"props":1647,"children":1648},{"style":209},[1649],{"type":205,"value":1650}," PMNode } ",{"type":184,"tag":195,"props":1652,"children":1653},{"style":202},[1654],{"type":205,"value":217},{"type":184,"tag":195,"props":1656,"children":1657},{"style":220},[1658],{"type":205,"value":1659}," \"@quirekit\u002Fpm\"",{"type":184,"tag":195,"props":1661,"children":1662},{"style":209},[1663],{"type":205,"value":228},{"type":184,"tag":195,"props":1665,"children":1666},{"class":197,"line":256},[1667],{"type":184,"tag":195,"props":1668,"children":1669},{"emptyLinePlaceholder":170},[1670],{"type":205,"value":262},{"type":184,"tag":195,"props":1672,"children":1673},{"class":197,"line":265},[1674],{"type":184,"tag":195,"props":1675,"children":1676},{"style":292},[1677],{"type":205,"value":1678},"\u002F**\n",{"type":184,"tag":195,"props":1680,"children":1681},{"class":197,"line":288},[1682],{"type":184,"tag":195,"props":1683,"children":1684},{"style":292},[1685],{"type":205,"value":1686}," * Creates one DOM-only button for a counter atom.\n",{"type":184,"tag":195,"props":1688,"children":1689},{"class":197,"line":298},[1690,1695,1699,1703],{"type":184,"tag":195,"props":1691,"children":1692},{"style":292},[1693],{"type":205,"value":1694}," * ",{"type":184,"tag":195,"props":1696,"children":1697},{"style":202},[1698],{"type":205,"value":367},{"type":184,"tag":195,"props":1700,"children":1701},{"style":209},[1702],{"type":205,"value":1006},{"type":184,"tag":195,"props":1704,"children":1705},{"style":292},[1706],{"type":205,"value":1707}," - Current node, owning editor and live position resolver.\n",{"type":184,"tag":195,"props":1709,"children":1710},{"class":197,"line":328},[1711,1715,1719],{"type":184,"tag":195,"props":1712,"children":1713},{"style":292},[1714],{"type":205,"value":1694},{"type":184,"tag":195,"props":1716,"children":1717},{"style":202},[1718],{"type":205,"value":382},{"type":184,"tag":195,"props":1720,"children":1721},{"style":292},[1722],{"type":205,"value":1723}," A renderer whose update\u002Fdestroy are owned by the mounted DOM view.\n",{"type":184,"tag":195,"props":1725,"children":1726},{"class":197,"line":337},[1727],{"type":184,"tag":195,"props":1728,"children":1729},{"style":292},[1730],{"type":205,"value":1731}," *\u002F\n",{"type":184,"tag":195,"props":1733,"children":1734},{"class":197,"line":356},[1735,1739,1743,1748,1752,1757,1761,1765,1769,1774,1778,1783,1788,1792,1797],{"type":184,"tag":195,"props":1736,"children":1737},{"style":202},[1738],{"type":205,"value":501},{"type":184,"tag":195,"props":1740,"children":1741},{"style":202},[1742],{"type":205,"value":506},{"type":184,"tag":195,"props":1744,"children":1745},{"style":307},[1746],{"type":205,"value":1747}," createCounterView",{"type":184,"tag":195,"props":1749,"children":1750},{"style":209},[1751],{"type":205,"value":1034},{"type":184,"tag":195,"props":1753,"children":1754},{"style":341},[1755],{"type":205,"value":1756},"node",{"type":184,"tag":195,"props":1758,"children":1759},{"style":209},[1760],{"type":205,"value":892},{"type":184,"tag":195,"props":1762,"children":1763},{"style":341},[1764],{"type":205,"value":1192},{"type":184,"tag":195,"props":1766,"children":1767},{"style":209},[1768],{"type":205,"value":892},{"type":184,"tag":195,"props":1770,"children":1771},{"style":341},[1772],{"type":205,"value":1773},"view",{"type":184,"tag":195,"props":1775,"children":1776},{"style":209},[1777],{"type":205,"value":892},{"type":184,"tag":195,"props":1779,"children":1780},{"style":341},[1781],{"type":205,"value":1782},"getPos",{"type":184,"tag":195,"props":1784,"children":1785},{"style":209},[1786],{"type":205,"value":1787}," }",{"type":184,"tag":195,"props":1789,"children":1790},{"style":202},[1791],{"type":205,"value":349},{"type":184,"tag":195,"props":1793,"children":1794},{"style":307},[1795],{"type":205,"value":1796}," QuireNodeViewRendererProps",{"type":184,"tag":195,"props":1798,"children":1799},{"style":209},[1800],{"type":205,"value":697},{"type":184,"tag":195,"props":1802,"children":1803},{"class":197,"line":390},[1804,1809,1814,1818,1823,1828,1832,1836],{"type":184,"tag":195,"props":1805,"children":1806},{"style":202},[1807],{"type":205,"value":1808},"  const",{"type":184,"tag":195,"props":1810,"children":1811},{"style":417},[1812],{"type":205,"value":1813}," dom",{"type":184,"tag":195,"props":1815,"children":1816},{"style":202},[1817],{"type":205,"value":716},{"type":184,"tag":195,"props":1819,"children":1820},{"style":209},[1821],{"type":205,"value":1822}," view.dom.ownerDocument.",{"type":184,"tag":195,"props":1824,"children":1825},{"style":307},[1826],{"type":205,"value":1827},"createElement",{"type":184,"tag":195,"props":1829,"children":1830},{"style":209},[1831],{"type":205,"value":679},{"type":184,"tag":195,"props":1833,"children":1834},{"style":220},[1835],{"type":205,"value":1058},{"type":184,"tag":195,"props":1837,"children":1838},{"style":209},[1839],{"type":205,"value":1840},");\n",{"type":184,"tag":195,"props":1842,"children":1843},{"class":197,"line":442},[1844,1848,1853,1857,1862,1866,1870,1875],{"type":184,"tag":195,"props":1845,"children":1846},{"style":202},[1847],{"type":205,"value":1808},{"type":184,"tag":195,"props":1849,"children":1850},{"style":417},[1851],{"type":205,"value":1852}," button",{"type":184,"tag":195,"props":1854,"children":1855},{"style":202},[1856],{"type":205,"value":716},{"type":184,"tag":195,"props":1858,"children":1859},{"style":209},[1860],{"type":205,"value":1861}," dom.ownerDocument.",{"type":184,"tag":195,"props":1863,"children":1864},{"style":307},[1865],{"type":205,"value":1827},{"type":184,"tag":195,"props":1867,"children":1868},{"style":209},[1869],{"type":205,"value":679},{"type":184,"tag":195,"props":1871,"children":1872},{"style":220},[1873],{"type":205,"value":1874},"\"button\"",{"type":184,"tag":195,"props":1876,"children":1877},{"style":209},[1878],{"type":205,"value":1840},{"type":184,"tag":195,"props":1880,"children":1881},{"class":197,"line":451},[1882,1887,1892,1897],{"type":184,"tag":195,"props":1883,"children":1884},{"style":209},[1885],{"type":205,"value":1886},"  dom.dataset.docsCounterView ",{"type":184,"tag":195,"props":1888,"children":1889},{"style":202},[1890],{"type":205,"value":1891},"=",{"type":184,"tag":195,"props":1893,"children":1894},{"style":220},[1895],{"type":205,"value":1896}," \"\"",{"type":184,"tag":195,"props":1898,"children":1899},{"style":209},[1900],{"type":205,"value":228},{"type":184,"tag":195,"props":1902,"children":1903},{"class":197,"line":460},[1904,1909,1913,1918],{"type":184,"tag":195,"props":1905,"children":1906},{"style":209},[1907],{"type":205,"value":1908},"  dom.contentEditable ",{"type":184,"tag":195,"props":1910,"children":1911},{"style":202},[1912],{"type":205,"value":1891},{"type":184,"tag":195,"props":1914,"children":1915},{"style":220},[1916],{"type":205,"value":1917}," \"false\"",{"type":184,"tag":195,"props":1919,"children":1920},{"style":209},[1921],{"type":205,"value":228},{"type":184,"tag":195,"props":1923,"children":1924},{"class":197,"line":469},[1925,1930,1934,1939],{"type":184,"tag":195,"props":1926,"children":1927},{"style":209},[1928],{"type":205,"value":1929},"  button.type ",{"type":184,"tag":195,"props":1931,"children":1932},{"style":202},[1933],{"type":205,"value":1891},{"type":184,"tag":195,"props":1935,"children":1936},{"style":220},[1937],{"type":205,"value":1938}," \"button\"",{"type":184,"tag":195,"props":1940,"children":1941},{"style":209},[1942],{"type":205,"value":228},{"type":184,"tag":195,"props":1944,"children":1945},{"class":197,"line":477},[1946,1951,1956],{"type":184,"tag":195,"props":1947,"children":1948},{"style":209},[1949],{"type":205,"value":1950},"  dom.",{"type":184,"tag":195,"props":1952,"children":1953},{"style":307},[1954],{"type":205,"value":1955},"append",{"type":184,"tag":195,"props":1957,"children":1958},{"style":209},[1959],{"type":205,"value":1960},"(button);\n",{"type":184,"tag":195,"props":1962,"children":1963},{"class":197,"line":495},[1964,1969,1973,1978],{"type":184,"tag":195,"props":1965,"children":1966},{"style":292},[1967],{"type":205,"value":1968},"  \u002F** ",{"type":184,"tag":195,"props":1970,"children":1971},{"style":202},[1972],{"type":205,"value":367},{"type":184,"tag":195,"props":1974,"children":1975},{"style":209},[1976],{"type":205,"value":1977}," current",{"type":184,"tag":195,"props":1979,"children":1980},{"style":292},[1981],{"type":205,"value":1982}," - New immutable node from the document. *\u002F\n",{"type":184,"tag":195,"props":1984,"children":1985},{"class":197,"line":519},[1986,1991,1996,2000,2005,2009,2014,2019,2023,2028,2033,2037,2042,2046,2051,2055,2059,2063,2068],{"type":184,"tag":195,"props":1987,"children":1988},{"style":202},[1989],{"type":205,"value":1990},"  function",{"type":184,"tag":195,"props":1992,"children":1993},{"style":307},[1994],{"type":205,"value":1995}," paint",{"type":184,"tag":195,"props":1997,"children":1998},{"style":209},[1999],{"type":205,"value":679},{"type":184,"tag":195,"props":2001,"children":2002},{"style":341},[2003],{"type":205,"value":2004},"current",{"type":184,"tag":195,"props":2006,"children":2007},{"style":202},[2008],{"type":205,"value":349},{"type":184,"tag":195,"props":2010,"children":2011},{"style":307},[2012],{"type":205,"value":2013}," PMNode",{"type":184,"tag":195,"props":2015,"children":2016},{"style":209},[2017],{"type":205,"value":2018},")",{"type":184,"tag":195,"props":2020,"children":2021},{"style":202},[2022],{"type":205,"value":349},{"type":184,"tag":195,"props":2024,"children":2025},{"style":417},[2026],{"type":205,"value":2027}," void",{"type":184,"tag":195,"props":2029,"children":2030},{"style":209},[2031],{"type":205,"value":2032}," { button.textContent ",{"type":184,"tag":195,"props":2034,"children":2035},{"style":202},[2036],{"type":205,"value":1891},{"type":184,"tag":195,"props":2038,"children":2039},{"style":220},[2040],{"type":205,"value":2041}," `+1 · ${",{"type":184,"tag":195,"props":2043,"children":2044},{"style":209},[2045],{"type":205,"value":2004},{"type":184,"tag":195,"props":2047,"children":2048},{"style":220},[2049],{"type":205,"value":2050},".",{"type":184,"tag":195,"props":2052,"children":2053},{"style":209},[2054],{"type":205,"value":869},{"type":184,"tag":195,"props":2056,"children":2057},{"style":220},[2058],{"type":205,"value":2050},{"type":184,"tag":195,"props":2060,"children":2061},{"style":209},[2062],{"type":205,"value":38},{"type":184,"tag":195,"props":2064,"children":2065},{"style":220},[2066],{"type":205,"value":2067},"}`",{"type":184,"tag":195,"props":2069,"children":2070},{"style":209},[2071],{"type":205,"value":2072},"; }\n",{"type":184,"tag":195,"props":2074,"children":2075},{"class":197,"line":543},[2076],{"type":184,"tag":195,"props":2077,"children":2078},{"style":292},[2079],{"type":205,"value":2080},"  \u002F** Reads the position on every click; preceding edits can move this node. *\u002F\n",{"type":184,"tag":195,"props":2082,"children":2083},{"class":197,"line":582},[2084,2088,2093,2098,2102,2106],{"type":184,"tag":195,"props":2085,"children":2086},{"style":202},[2087],{"type":205,"value":1990},{"type":184,"tag":195,"props":2089,"children":2090},{"style":307},[2091],{"type":205,"value":2092}," increment",{"type":184,"tag":195,"props":2094,"children":2095},{"style":209},[2096],{"type":205,"value":2097},"()",{"type":184,"tag":195,"props":2099,"children":2100},{"style":202},[2101],{"type":205,"value":349},{"type":184,"tag":195,"props":2103,"children":2104},{"style":417},[2105],{"type":205,"value":2027},{"type":184,"tag":195,"props":2107,"children":2108},{"style":209},[2109],{"type":205,"value":285},{"type":184,"tag":195,"props":2111,"children":2112},{"class":197,"line":600},[2113,2118,2122,2126,2131],{"type":184,"tag":195,"props":2114,"children":2115},{"style":202},[2116],{"type":205,"value":2117},"    const",{"type":184,"tag":195,"props":2119,"children":2120},{"style":417},[2121],{"type":205,"value":372},{"type":184,"tag":195,"props":2123,"children":2124},{"style":202},[2125],{"type":205,"value":716},{"type":184,"tag":195,"props":2127,"children":2128},{"style":307},[2129],{"type":205,"value":2130}," getPos",{"type":184,"tag":195,"props":2132,"children":2133},{"style":209},[2134],{"type":205,"value":2135},"();\n",{"type":184,"tag":195,"props":2137,"children":2138},{"class":197,"line":613},[2139,2144,2148,2153,2157,2162,2167,2172,2176],{"type":184,"tag":195,"props":2140,"children":2141},{"style":202},[2142],{"type":205,"value":2143},"    if",{"type":184,"tag":195,"props":2145,"children":2146},{"style":209},[2147],{"type":205,"value":405},{"type":184,"tag":195,"props":2149,"children":2150},{"style":202},[2151],{"type":205,"value":2152},"typeof",{"type":184,"tag":195,"props":2154,"children":2155},{"style":209},[2156],{"type":205,"value":1279},{"type":184,"tag":195,"props":2158,"children":2159},{"style":202},[2160],{"type":205,"value":2161},"===",{"type":184,"tag":195,"props":2163,"children":2164},{"style":220},[2165],{"type":205,"value":2166}," \"number\"",{"type":184,"tag":195,"props":2168,"children":2169},{"style":209},[2170],{"type":205,"value":2171},") editor.commands.",{"type":184,"tag":195,"props":2173,"children":2174},{"style":307},[2175],{"type":205,"value":1159},{"type":184,"tag":195,"props":2177,"children":2178},{"style":209},[2179],{"type":205,"value":1351},{"type":184,"tag":195,"props":2181,"children":2182},{"class":197,"line":636},[2183],{"type":184,"tag":195,"props":2184,"children":2185},{"style":209},[2186],{"type":205,"value":457},{"type":184,"tag":195,"props":2188,"children":2189},{"class":197,"line":668},[2190,2195],{"type":184,"tag":195,"props":2191,"children":2192},{"style":307},[2193],{"type":205,"value":2194},"  paint",{"type":184,"tag":195,"props":2196,"children":2197},{"style":209},[2198],{"type":205,"value":2199},"(node);\n",{"type":184,"tag":195,"props":2201,"children":2202},{"class":197,"line":700},[2203,2208,2213,2217,2222],{"type":184,"tag":195,"props":2204,"children":2205},{"style":209},[2206],{"type":205,"value":2207},"  button.",{"type":184,"tag":195,"props":2209,"children":2210},{"style":307},[2211],{"type":205,"value":2212},"addEventListener",{"type":184,"tag":195,"props":2214,"children":2215},{"style":209},[2216],{"type":205,"value":679},{"type":184,"tag":195,"props":2218,"children":2219},{"style":220},[2220],{"type":205,"value":2221},"\"click\"",{"type":184,"tag":195,"props":2223,"children":2224},{"style":209},[2225],{"type":205,"value":2226},", increment);\n",{"type":184,"tag":195,"props":2228,"children":2229},{"class":197,"line":748},[2230,2234],{"type":184,"tag":195,"props":2231,"children":2232},{"style":202},[2233],{"type":205,"value":525},{"type":184,"tag":195,"props":2235,"children":2236},{"style":209},[2237],{"type":205,"value":285},{"type":184,"tag":195,"props":2239,"children":2240},{"class":197,"line":813},[2241],{"type":184,"tag":195,"props":2242,"children":2243},{"style":209},[2244],{"type":205,"value":2245},"    dom,\n",{"type":184,"tag":195,"props":2247,"children":2248},{"class":197,"line":822},[2249,2253,2257,2262,2267,2271],{"type":184,"tag":195,"props":2250,"children":2251},{"style":292},[2252],{"type":205,"value":588},{"type":184,"tag":195,"props":2254,"children":2255},{"style":202},[2256],{"type":205,"value":367},{"type":184,"tag":195,"props":2258,"children":2259},{"style":209},[2260],{"type":205,"value":2261}," next",{"type":184,"tag":195,"props":2263,"children":2264},{"style":292},[2265],{"type":205,"value":2266}," - Replacement node. ",{"type":184,"tag":195,"props":2268,"children":2269},{"style":202},[2270],{"type":205,"value":382},{"type":184,"tag":195,"props":2272,"children":2273},{"style":292},[2274],{"type":205,"value":2275}," Whether this view can be reused. *\u002F\n",{"type":184,"tag":195,"props":2277,"children":2278},{"class":197,"line":853},[2279,2284,2288,2293,2297,2301,2305,2309,2314],{"type":184,"tag":195,"props":2280,"children":2281},{"style":307},[2282],{"type":205,"value":2283},"    update",{"type":184,"tag":195,"props":2285,"children":2286},{"style":209},[2287],{"type":205,"value":679},{"type":184,"tag":195,"props":2289,"children":2290},{"style":341},[2291],{"type":205,"value":2292},"next",{"type":184,"tag":195,"props":2294,"children":2295},{"style":202},[2296],{"type":205,"value":349},{"type":184,"tag":195,"props":2298,"children":2299},{"style":307},[2300],{"type":205,"value":2013},{"type":184,"tag":195,"props":2302,"children":2303},{"style":209},[2304],{"type":205,"value":2018},{"type":184,"tag":195,"props":2306,"children":2307},{"style":202},[2308],{"type":205,"value":349},{"type":184,"tag":195,"props":2310,"children":2311},{"style":417},[2312],{"type":205,"value":2313}," boolean",{"type":184,"tag":195,"props":2315,"children":2316},{"style":209},[2317],{"type":205,"value":285},{"type":184,"tag":195,"props":2319,"children":2320},{"class":197,"line":923},[2321,2326,2331,2335,2340,2344,2348],{"type":184,"tag":195,"props":2322,"children":2323},{"style":202},[2324],{"type":205,"value":2325},"      if",{"type":184,"tag":195,"props":2327,"children":2328},{"style":209},[2329],{"type":205,"value":2330}," (next.type ",{"type":184,"tag":195,"props":2332,"children":2333},{"style":202},[2334],{"type":205,"value":1369},{"type":184,"tag":195,"props":2336,"children":2337},{"style":209},[2338],{"type":205,"value":2339}," node.type) ",{"type":184,"tag":195,"props":2341,"children":2342},{"style":202},[2343],{"type":205,"value":974},{"type":184,"tag":195,"props":2345,"children":2346},{"style":417},[2347],{"type":205,"value":1314},{"type":184,"tag":195,"props":2349,"children":2350},{"style":209},[2351],{"type":205,"value":228},{"type":184,"tag":195,"props":2353,"children":2354},{"class":197,"line":932},[2355,2360,2364,2369,2374,2379,2383,2387],{"type":184,"tag":195,"props":2356,"children":2357},{"style":209},[2358],{"type":205,"value":2359},"      node ",{"type":184,"tag":195,"props":2361,"children":2362},{"style":202},[2363],{"type":205,"value":1891},{"type":184,"tag":195,"props":2365,"children":2366},{"style":209},[2367],{"type":205,"value":2368}," next; ",{"type":184,"tag":195,"props":2370,"children":2371},{"style":307},[2372],{"type":205,"value":2373},"paint",{"type":184,"tag":195,"props":2375,"children":2376},{"style":209},[2377],{"type":205,"value":2378},"(next); ",{"type":184,"tag":195,"props":2380,"children":2381},{"style":202},[2382],{"type":205,"value":974},{"type":184,"tag":195,"props":2384,"children":2385},{"style":417},[2386],{"type":205,"value":1502},{"type":184,"tag":195,"props":2388,"children":2389},{"style":209},[2390],{"type":205,"value":228},{"type":184,"tag":195,"props":2392,"children":2393},{"class":197,"line":941},[2394],{"type":184,"tag":195,"props":2395,"children":2396},{"style":209},[2397],{"type":205,"value":938},{"type":184,"tag":195,"props":2399,"children":2400},{"class":197,"line":958},[2401,2405,2409,2414,2419,2423],{"type":184,"tag":195,"props":2402,"children":2403},{"style":292},[2404],{"type":205,"value":588},{"type":184,"tag":195,"props":2406,"children":2407},{"style":202},[2408],{"type":205,"value":367},{"type":184,"tag":195,"props":2410,"children":2411},{"style":209},[2412],{"type":205,"value":2413}," event",{"type":184,"tag":195,"props":2415,"children":2416},{"style":292},[2417],{"type":205,"value":2418}," - Native control event. ",{"type":184,"tag":195,"props":2420,"children":2421},{"style":202},[2422],{"type":205,"value":382},{"type":184,"tag":195,"props":2424,"children":2425},{"style":292},[2426],{"type":205,"value":2427}," Whether the counter owns the event. *\u002F\n",{"type":184,"tag":195,"props":2429,"children":2430},{"class":197,"line":992},[2431,2436,2440,2445,2449,2454,2458,2462,2466,2471,2476,2481,2485,2490,2495,2500,2504,2509,2513,2518],{"type":184,"tag":195,"props":2432,"children":2433},{"style":307},[2434],{"type":205,"value":2435},"    stopEvent",{"type":184,"tag":195,"props":2437,"children":2438},{"style":209},[2439],{"type":205,"value":864},{"type":184,"tag":195,"props":2441,"children":2442},{"style":341},[2443],{"type":205,"value":2444},"event",{"type":184,"tag":195,"props":2446,"children":2447},{"style":202},[2448],{"type":205,"value":349},{"type":184,"tag":195,"props":2450,"children":2451},{"style":307},[2452],{"type":205,"value":2453}," Event",{"type":184,"tag":195,"props":2455,"children":2456},{"style":209},[2457],{"type":205,"value":2018},{"type":184,"tag":195,"props":2459,"children":2460},{"style":202},[2461],{"type":205,"value":349},{"type":184,"tag":195,"props":2463,"children":2464},{"style":417},[2465],{"type":205,"value":2313},{"type":184,"tag":195,"props":2467,"children":2468},{"style":202},[2469],{"type":205,"value":2470}," =>",{"type":184,"tag":195,"props":2472,"children":2473},{"style":202},[2474],{"type":205,"value":2475}," !!",{"type":184,"tag":195,"props":2477,"children":2478},{"style":209},[2479],{"type":205,"value":2480},"event.target ",{"type":184,"tag":195,"props":2482,"children":2483},{"style":202},[2484],{"type":205,"value":774},{"type":184,"tag":195,"props":2486,"children":2487},{"style":209},[2488],{"type":205,"value":2489}," button.",{"type":184,"tag":195,"props":2491,"children":2492},{"style":307},[2493],{"type":205,"value":2494},"contains",{"type":184,"tag":195,"props":2496,"children":2497},{"style":209},[2498],{"type":205,"value":2499},"(event.target ",{"type":184,"tag":195,"props":2501,"children":2502},{"style":202},[2503],{"type":205,"value":1645},{"type":184,"tag":195,"props":2505,"children":2506},{"style":307},[2507],{"type":205,"value":2508}," globalThis",{"type":184,"tag":195,"props":2510,"children":2511},{"style":209},[2512],{"type":205,"value":2050},{"type":184,"tag":195,"props":2514,"children":2515},{"style":307},[2516],{"type":205,"value":2517},"Node",{"type":184,"tag":195,"props":2519,"children":2520},{"style":209},[2521],{"type":205,"value":2522},"),\n",{"type":184,"tag":195,"props":2524,"children":2525},{"class":197,"line":1023},[2526,2530,2534],{"type":184,"tag":195,"props":2527,"children":2528},{"style":292},[2529],{"type":205,"value":588},{"type":184,"tag":195,"props":2531,"children":2532},{"style":202},[2533],{"type":205,"value":382},{"type":184,"tag":195,"props":2535,"children":2536},{"style":292},[2537],{"type":205,"value":2538}," Whether this atom's own DOM changes can be ignored; there is no contentDOM. *\u002F\n",{"type":184,"tag":195,"props":2540,"children":2541},{"class":197,"line":1114},[2542,2547,2552,2556,2560,2564,2568],{"type":184,"tag":195,"props":2543,"children":2544},{"style":307},[2545],{"type":205,"value":2546},"    ignoreMutation",{"type":184,"tag":195,"props":2548,"children":2549},{"style":209},[2550],{"type":205,"value":2551},": ()",{"type":184,"tag":195,"props":2553,"children":2554},{"style":202},[2555],{"type":205,"value":349},{"type":184,"tag":195,"props":2557,"children":2558},{"style":417},[2559],{"type":205,"value":2313},{"type":184,"tag":195,"props":2561,"children":2562},{"style":202},[2563],{"type":205,"value":2470},{"type":184,"tag":195,"props":2565,"children":2566},{"style":417},[2567],{"type":205,"value":1502},{"type":184,"tag":195,"props":2569,"children":2570},{"style":209},[2571],{"type":205,"value":579},{"type":184,"tag":195,"props":2573,"children":2574},{"class":197,"line":1131},[2575],{"type":184,"tag":195,"props":2576,"children":2577},{"style":292},[2578],{"type":205,"value":2579},"    \u002F** Releases exactly the listener created by this node view. *\u002F\n",{"type":184,"tag":195,"props":2581,"children":2582},{"class":197,"line":1144},[2583,2588,2592,2596,2600,2605,2610,2614,2618],{"type":184,"tag":195,"props":2584,"children":2585},{"style":307},[2586],{"type":205,"value":2587},"    destroy",{"type":184,"tag":195,"props":2589,"children":2590},{"style":209},[2591],{"type":205,"value":2097},{"type":184,"tag":195,"props":2593,"children":2594},{"style":202},[2595],{"type":205,"value":349},{"type":184,"tag":195,"props":2597,"children":2598},{"style":417},[2599],{"type":205,"value":2027},{"type":184,"tag":195,"props":2601,"children":2602},{"style":209},[2603],{"type":205,"value":2604}," { button.",{"type":184,"tag":195,"props":2606,"children":2607},{"style":307},[2608],{"type":205,"value":2609},"removeEventListener",{"type":184,"tag":195,"props":2611,"children":2612},{"style":209},[2613],{"type":205,"value":679},{"type":184,"tag":195,"props":2615,"children":2616},{"style":220},[2617],{"type":205,"value":2221},{"type":184,"tag":195,"props":2619,"children":2620},{"style":209},[2621],{"type":205,"value":2622},", increment); },\n",{"type":184,"tag":195,"props":2624,"children":2625},{"class":197,"line":1225},[2626],{"type":184,"tag":195,"props":2627,"children":2628},{"style":209},[2629],{"type":205,"value":2630},"  };\n",{"type":184,"tag":195,"props":2632,"children":2633},{"class":197,"line":1321},[2634],{"type":184,"tag":195,"props":2635,"children":2636},{"style":209},[2637],{"type":205,"value":466},{"type":184,"tag":1580,"props":2639,"children":2640},{},[2641],{"type":205,"value":1584},1793045210564]