@yoopta/headings 1.9.6-rc → 1.9.7-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{createYooptaPlugin as t,generateId as i,getElementClassname as n}from"@yoopta/editor";import{Transforms as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createYooptaPlugin as t,generateId as i,getElementClassname as n}from"@yoopta/editor";import{Transforms as a}from"slate";function r(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var o="w88lsSKp";r('.w88lsSKp{color:inherit;font-size:30px;font-weight:600;letter-spacing:0;line-height:39px;margin-bottom:1px;margin-top:30px;padding-bottom:2px;padding-top:2px;position:relative;white-space:pre-wrap;word-break:break-word}.w88lsSKp:hover .bxI8aAgg{opacity:1}.bxI8aAgg{align-items:center;color:#007aff;cursor:pointer;display:inline-flex;opacity:0;padding-left:.5rem}.bxI8aAgg:hover{text-decoration:underline}.bxI8aAgg:before{content:"#"}');const d=({attributes:t,children:i,element:a,HTMLAttributes:r})=>e("h1",Object.assign({id:a.id,draggable:!1},r,{className:n({element:a,HTMLAttributes:r,className:o})},t,{children:i}));d.displayName="HeadingOne";const s=t({type:"heading-one",renderer:e=>d,shortcut:["title","h1","heading one","#"],placeholder:"Heading 1",defineElement:()=>({id:i(),type:"heading-one",children:[{text:""}],nodeType:"block"}),createElement:(e,t)=>{var i;const n=Object.assign(Object.assign({},s.getPlugin.defineElement()),t);a.setNodes(e,n,{at:null===(i=e.selection)||void 0===i?void 0:i.anchor})},exports:{markdown:{serialize:(e,t)=>`# ${t}`},html:{serialize:(e,t)=>`<h1>${t}</h1>`,deserialize:{nodeName:"H1"}}},options:{anchor:"#",searchString:"h1 title",displayLabel:"Heading 1"}});var l="Lv0jMMCW";r('.Lv0jMMCW{color:inherit;font-size:24px;font-weight:600;line-height:31px;margin-bottom:4px;margin-top:20px;padding-bottom:2px;padding-top:2px;position:relative;white-space:pre-wrap;word-break:break-word}.Lv0jMMCW:hover .Vt-SkjEH{opacity:1}.Vt-SkjEH{color:#007aff;opacity:0;padding-left:.5rem;transition:opacity .2s;user-select:none}.Vt-SkjEH:hover{text-decoration:underline}.Vt-SkjEH:before{content:"#"}');const c=({attributes:t,children:i,element:a,HTMLAttributes:r})=>e("h2",Object.assign({id:a.id,draggable:!1},r,{className:n({element:a,HTMLAttributes:r,className:l})},t,{children:i}));c.displayName="HeadingTwo";const p=t({type:"heading-two",renderer:e=>c,shortcut:["h2","subtitle","##"],placeholder:"Heading 2",defineElement:()=>({id:i(),type:"heading-two",children:[{text:""}],nodeType:"block"}),createElement:(e,t)=>{var i;const n=Object.assign(Object.assign({},p.getPlugin.defineElement()),t);a.setNodes(e,n,{at:null===(i=e.selection)||void 0===i?void 0:i.anchor})},exports:{markdown:{serialize:(e,t)=>`## ${t}`},html:{serialize:(e,t)=>`<h2>${t}</h2>`,deserialize:{nodeName:"H2"}}},options:{anchor:"#",searchString:"h2 subtitle",displayLabel:"Heading 2"}});var h="K-i6DlWD";r('.K-i6DlWD{color:inherit;font-size:20px;font-weight:600;line-height:26px;margin-bottom:4px;margin-top:16px;padding-bottom:2px;padding-top:2px;position:relative;white-space:pre-wrap;word-break:break-word}.K-i6DlWD:hover .ur9rRlYI{opacity:1}.ur9rRlYI{color:#007aff;opacity:0;padding-left:.5rem;transition:opacity .2s;user-select:none}.ur9rRlYI:hover{text-decoration:underline}.ur9rRlYI:before{content:"#"}');const g=({attributes:t,children:i,element:a,HTMLAttributes:r})=>e("h3",Object.assign({id:a.id,draggable:!1},r,{className:n({element:a,HTMLAttributes:r,className:h})},t,{children:i}));g.displayName="HeadingThree";const m=t({type:"heading-three",renderer:e=>g,shortcut:["h3","subsubtitle","###"],placeholder:"Heading 3",defineElement:()=>({id:i(),type:"heading-three",children:[{text:""}],nodeType:"block"}),createElement:(e,t)=>{var i;const n=Object.assign(Object.assign({},m.getPlugin.defineElement()),t);a.setNodes(e,n,{at:null===(i=e.selection)||void 0===i?void 0:i.anchor})},exports:{markdown:{serialize:(e,t)=>`### ${t}`},html:{serialize:(e,t)=>`<h3>${t}</h3>`,deserialize:{nodeName:["H3","H4","H5","H6"]}}},options:{anchor:"#",searchString:"h3 subsubtitle small heading",displayLabel:"Heading 3"}}),b={HeadingOne:s,HeadingTwo:p,HeadingThree:m};export{s as HeadingOne,m as HeadingThree,p as HeadingTwo,b as default};
|
package/package.json
CHANGED