/* esm.sh - @milkdown/plugin-indent@7.22.3 */
import{AllSelection as d,TextSelection as s}from"../../../prose@7.22.3/X-ZHByb3NlbWlycm9yLW1vZGVsQDEuMjUuMTI/es2022/state.mjs";import{$ctx as l,$shortcut as f}from"../../../utils@7.22.3/X-ZEBtaWxrZG93bi9jb3JlQDcuMjIuMyxAbWlsa2Rvd24vY3R4QDcuMjIuMyxAbWlsa2Rvd24vcHJvc2VANy4yMi4zLHByb3NlbWlycm9yLW1vZGVsQDEuMjUuMTI/es2022/utils.mjs";function p(n,e){let{doc:o,selection:t}=n;if(!o||!t||!(t instanceof s||t instanceof d))return n;let{to:r}=t,i=e.type==="space"?Array(e.size).fill(" ").join(""):"	";return n.insertText(i,r)}var a=l({type:"space",size:2},"indentConfig");a.meta={package:"@milkdown/plugin-indent",displayName:"Ctx<indentConfig>"};var c=f(n=>({Tab:(e,o)=>{let t=n.get(a.key),{tr:r}=e,i=p(r,t);return i.docChanged?(o?.(i),!0):!1}}));c.meta={package:"@milkdown/plugin-indent",displayName:"Shortcut<indent>"};var m=[a,c];export{m as indent,a as indentConfig,c as indentPlugin};
//# sourceMappingURL=plugin-indent.mjs.map