PageSourceSearch

https://pika.page/assets/@tiptap--extension-blockquote-04dac80b6b5…c65a676f168b9723b23d5aae550ae9581dd63811.js

js pika.page collected 2026-10-03 21:39:03 UTC 2,061 bytes, 8 lines download raw bytes

1// @tiptap/[email protected] downloaded from https://ga.jspm.io/npm:@tiptap/[email protected]/dist/index.js
2
3import{Node as e,wrappingInputRule as t,mergeAttributes as n}from"@tiptap/core";import{Slice as r}from"@tiptap/pm/model";import{TextSelection as i}from"@tiptap/pm/state";import{jsx as a}from"@tiptap/core/jsx-runtime";const o=(e,t)=>{var n;let{state:a}=e,{selection:o}=a;if(!o.empty)return!1;let{$from:s}=o;if(s.parentOffset!==0)return!1;let c=s.depth-1;if(c<0)return!1;let l=s.node(c),u=s.index(c);if(u===0)return!1;if(l.type===t)return e.commands.lift(t.name);let d=l.child(u-1);if(d.type!==t||!((n=d.lastChild)!=null&&n.isTextblock))return!1;let f=s.before()-1-1;return e.commands.command(({tr:e,dispatch:t})=>{if(!t)return!0;let n=s.parent.content,a=new r(n,0,0);return e.replace(f,s.after(),a),e.setSelection(i.create(e.doc,f+n.size)),e.scrollIntoView(),t(e),!0})},s=/^\s*>\s$/,c=e.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return/* @__PURE__ */ a(`blockquote`,{...n(this.options.HTMLAttributes,e),children:/* @__PURE__ */ a(`slot`,{})})},parseMarkdown:(e,t)=>{var n;let r=(n=t.parseBlockChildren)==null?t.parseChildren:n;return t.createNode(`blockquote`,void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=`>`,r=[];return e.content.forEach((e,n)=>{var i,a;let o=((i=(a=t.renderChild)==null?void 0:a.call(t,e,n))==null?t.renderChildren([e]):i).split(`
4`).map(e=>e.trim()===``?`>`:`> ${e}`);r.push(o.join(`
5`))}),r.join(`
6>
7`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>o(this.editor,this.type)}}
7,addInputRules(){return[t({find:s,type:this.type})]}});var l=c;export{c as Blockquote,l as default,s as inputRegex};
8

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.