@yoopta/headings 1.9.0-rc → 1.9.2-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.d.ts CHANGED
@@ -10,9 +10,9 @@ declare module 'slate' {
10
10
  }
11
11
  }
12
12
  declare const Headings: {
13
- HeadingOne: import("@yoopta/editor").YoptaPlugin<import("./types").HeadingOptions, HeadingOneElement>;
14
- HeadingTwo: import("@yoopta/editor").YoptaPlugin<import("./types").HeadingOptions, HeadingTwoElement>;
15
- HeadingThree: import("@yoopta/editor").YoptaPlugin<import("./types").HeadingOptions, HeadingThreeElement>;
13
+ HeadingOne: import("@yoopta/editor").YooptaPlugin<import("./types").HeadingOptions, HeadingOneElement>;
14
+ HeadingTwo: import("@yoopta/editor").YooptaPlugin<import("./types").HeadingOptions, HeadingTwoElement>;
15
+ HeadingThree: import("@yoopta/editor").YooptaPlugin<import("./types").HeadingOptions, HeadingThreeElement>;
16
16
  };
17
17
  export default Headings;
18
18
  export { HeadingOne, HeadingTwo, HeadingThree, HeadingOneElement, HeadingTwoElement, HeadingThreeElement };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createYoptaPlugin as t,generateId as i}from"@yoopta/editor";import{Transforms as n}from"slate";function o(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var r="w88lsSKp";o('.w88lsSKp{color:#292929;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 a=({attributes:t,children:i,element:n})=>e("h1",Object.assign({id:n.id,draggable:!1,className:r},t,{children:i}));a.displayName="HeadingOne";const d=t({type:"heading-one",renderer:e=>a,shortcut:["title","h1","heading one","#"],placeholder:"Heading 1",defineElement:()=>({id:i(),type:"heading-one",children:[{text:""}],nodeType:"block"}),createElement:e=>{var t;const i=d.getPlugin.defineElement();n.setNodes(e,i,{at:null===(t=e.selection)||void 0===t?void 0:t.anchor})},exports:{markdown:{serialize:(e,t)=>`# ${t}`},html:{serialize:(e,t)=>`<h1>${t}</h1>`,deserialize:{nodeName:"H1"}}},options:{anchor:"#"}});var l="Lv0jMMCW";o('.Lv0jMMCW{color:#292929;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 s=({attributes:t,children:i,element:n})=>e("h2",Object.assign({id:n.id,draggable:!1,className:l},t,{children:i}));s.displayName="HeadingTwo";const p=t({type:"heading-two",renderer:e=>s,shortcut:["h2","subtitle","##"],placeholder:"Heading 2",defineElement:()=>({id:i(),type:"heading-two",children:[{text:""}],nodeType:"block"}),createElement:function(e){var t;const i=p.getPlugin.defineElement();n.setNodes(e,i,{at:null===(t=e.selection)||void 0===t?void 0:t.anchor})},exports:{markdown:{serialize:(e,t)=>`## ${t}`},html:{serialize:(e,t)=>`<h2>${t}</h2>`,deserialize:{nodeName:"H2"}}},options:{anchor:"#"}});var c="K-i6DlWD";o('.K-i6DlWD{color:#292929;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 h=({attributes:t,children:i,element:n})=>e("h3",Object.assign({id:n.id,draggable:!1,className:c},t,{children:i}));h.displayName="HeadingThree";const g=t({type:"heading-three",renderer:e=>h,shortcut:["h3","subsubtitle","###"],placeholder:"Heading 3",defineElement:()=>({id:i(),type:"heading-three",children:[{text:""}],nodeType:"block"}),createElement:function(e){var t;const i=g.getPlugin.defineElement();n.setNodes(e,i,{at:null===(t=e.selection)||void 0===t?void 0:t.anchor})},exports:{markdown:{serialize:(e,t)=>`### ${t}`},html:{serialize:(e,t)=>`<h3>${t}</h3>`,deserialize:{nodeName:["H3","H4","H5","H6"]}}},options:{anchor:"#"}}),m={HeadingOne:d,HeadingTwo:p,HeadingThree:g};export{d as HeadingOne,g as HeadingThree,p as HeadingTwo,m as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{createYooptaPlugin as t,generateId as i}from"@yoopta/editor";import{Transforms as n}from"slate";function o(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var r="w88lsSKp";o('.w88lsSKp{color:#292929;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 a=({attributes:t,children:i,element:n,HTMLAttributes:o})=>e("h1",Object.assign({id:n.id,draggable:!1,className:r},o,t,{children:i}));a.displayName="HeadingOne";const d=t({type:"heading-one",renderer:e=>a,shortcut:["title","h1","heading one","#"],placeholder:"Heading 1",defineElement:()=>({id:i(),type:"heading-one",children:[{text:""}],nodeType:"block"}),createElement:e=>{var t;const i=d.getPlugin.defineElement();n.setNodes(e,i,{at:null===(t=e.selection)||void 0===t?void 0:t.anchor})},exports:{markdown:{serialize:(e,t)=>`# ${t}`},html:{serialize:(e,t)=>`<h1>${t}</h1>`,deserialize:{nodeName:"H1"}}},options:{anchor:"#"}});var l="Lv0jMMCW";o('.Lv0jMMCW{color:#292929;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 s=({attributes:t,children:i,element:n,HTMLAttributes:o})=>e("h2",Object.assign({id:n.id,draggable:!1,className:l},o,t,{children:i}));s.displayName="HeadingTwo";const p=t({type:"heading-two",renderer:e=>s,shortcut:["h2","subtitle","##"],placeholder:"Heading 2",defineElement:()=>({id:i(),type:"heading-two",children:[{text:""}],nodeType:"block"}),createElement:function(e){var t;const i=p.getPlugin.defineElement();n.setNodes(e,i,{at:null===(t=e.selection)||void 0===t?void 0:t.anchor})},exports:{markdown:{serialize:(e,t)=>`## ${t}`},html:{serialize:(e,t)=>`<h2>${t}</h2>`,deserialize:{nodeName:"H2"}}},options:{anchor:"#"}});var c="K-i6DlWD";o('.K-i6DlWD{color:#292929;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 h=({attributes:t,children:i,element:n,HTMLAttributes:o})=>e("h3",Object.assign({id:n.id,draggable:!1,className:c},o,t,{children:i}));h.displayName="HeadingThree";const g=t({type:"heading-three",renderer:e=>h,shortcut:["h3","subsubtitle","###"],placeholder:"Heading 3",defineElement:()=>({id:i(),type:"heading-three",children:[{text:""}],nodeType:"block"}),createElement:function(e){var t;const i=g.getPlugin.defineElement();n.setNodes(e,i,{at:null===(t=e.selection)||void 0===t?void 0:t.anchor})},exports:{markdown:{serialize:(e,t)=>`### ${t}`},html:{serialize:(e,t)=>`<h3>${t}</h3>`,deserialize:{nodeName:["H3","H4","H5","H6"]}}},options:{anchor:"#"}}),m={HeadingOne:d,HeadingTwo:p,HeadingThree:g};export{d as HeadingOne,g as HeadingThree,p as HeadingTwo,m as default};
package/dist/types.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { YoptaBaseElement } from '@yoopta/editor';
1
+ import { YooptaBaseElement } from '@yoopta/editor';
2
2
  import { ReactNode } from 'react';
3
3
  export type HeadingOptions = {
4
4
  anchor?: ReactNode | null | false;
5
5
  };
6
- export type HeadingOneElement = YoptaBaseElement<'heading-one'>;
7
- export type HeadingTwoElement = YoptaBaseElement<'heading-two'>;
8
- export type HeadingThreeElement = YoptaBaseElement<'heading-three'>;
6
+ export type HeadingOneElement = YooptaBaseElement<'heading-one'>;
7
+ export type HeadingTwoElement = YooptaBaseElement<'heading-two'>;
8
+ export type HeadingThreeElement = YooptaBaseElement<'heading-three'>;
@@ -1,3 +1,3 @@
1
1
  import { HeadingOneElement, HeadingOptions } from '../types';
2
- declare const HeadingOne: import("@yoopta/editor").YoptaPlugin<HeadingOptions, HeadingOneElement>;
2
+ declare const HeadingOne: import("@yoopta/editor").YooptaPlugin<HeadingOptions, HeadingOneElement>;
3
3
  export { HeadingOne };
@@ -1,3 +1,3 @@
1
1
  import { HeadingOptions, HeadingThreeElement } from '../types';
2
- declare const HeadingThree: import("@yoopta/editor").YoptaPlugin<HeadingOptions, HeadingThreeElement>;
2
+ declare const HeadingThree: import("@yoopta/editor").YooptaPlugin<HeadingOptions, HeadingThreeElement>;
3
3
  export { HeadingThree };
@@ -1,3 +1,3 @@
1
1
  import { HeadingOptions, HeadingTwoElement } from '../types';
2
- declare const HeadingTwo: import("@yoopta/editor").YoptaPlugin<HeadingOptions, HeadingTwoElement>;
2
+ declare const HeadingTwo: import("@yoopta/editor").YooptaPlugin<HeadingOptions, HeadingTwoElement>;
3
3
  export { HeadingTwo };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@yoopta/headings",
3
- "version": "1.9.0-rc",
3
+ "version": "1.9.2-rc",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
- "homepage": "https://github.com/Darginec05/Editor-Yopta#readme",
6
+ "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
7
7
  "license": "MIT",
8
8
  "private": false,
9
9
  "type": "module",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "git+https://github.com/Darginec05/Editor-Yopta.git"
28
+ "url": "git+https://github.com/Darginec05/Editor-Yoopta.git"
29
29
  },
30
30
  "scripts": {
31
31
  "test": "node ./__tests__/@yoopta/paragraph.test.js"
32
32
  },
33
33
  "bugs": {
34
- "url": "https://github.com/Darginec05/Editor-Yopta/issues"
34
+ "url": "https://github.com/Darginec05/Editor-Yoopta/issues"
35
35
  }
36
- }
36
+ }