@yoopta/headings 1.9.14-rc → 2.0.0
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/package.json +2 -2
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -1
- package/dist/types.d.ts +0 -8
- package/dist/ui/HeadingOne.d.ts +0 -3
- package/dist/ui/HeadingThree.d.ts +0 -3
- package/dist/ui/HeadingTwo.d.ts +0 -3
- package/dist/utils/getText.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/headings",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dist/"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@yoopta/editor": "1.9.
|
|
17
|
+
"@yoopta/editor": ">=1.9.18-rc",
|
|
18
18
|
"react": ">=17.0.2",
|
|
19
19
|
"react-dom": ">=17.0.2",
|
|
20
20
|
"slate": ">=0.72.3",
|
package/dist/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HeadingOne } from './ui/HeadingOne';
|
|
2
|
-
import { HeadingTwo } from './ui/HeadingTwo';
|
|
3
|
-
import { HeadingThree } from './ui/HeadingThree';
|
|
4
|
-
import { YooEditor } from '@yoopta/editor';
|
|
5
|
-
import { HeadingOneElement, HeadingThreeElement, HeadingTwoElement } from './types';
|
|
6
|
-
declare module 'slate' {
|
|
7
|
-
interface CustomTypes {
|
|
8
|
-
Editor: YooEditor;
|
|
9
|
-
Element: HeadingOneElement | HeadingTwoElement | HeadingThreeElement;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
declare const Headings: {
|
|
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
|
-
};
|
|
17
|
-
export default Headings;
|
|
18
|
-
export { HeadingOne, HeadingTwo, HeadingThree, HeadingOneElement, HeadingTwoElement, HeadingThreeElement };
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/dist/types.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { YooptaBaseElement, YooptaPluginBaseOptions } from '@yoopta/editor';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
export type HeadingOptions = {
|
|
4
|
-
anchor?: ReactNode | null | false;
|
|
5
|
-
} & YooptaPluginBaseOptions;
|
|
6
|
-
export type HeadingOneElement = YooptaBaseElement<'heading-one'>;
|
|
7
|
-
export type HeadingTwoElement = YooptaBaseElement<'heading-two'>;
|
|
8
|
-
export type HeadingThreeElement = YooptaBaseElement<'heading-three'>;
|
package/dist/ui/HeadingOne.d.ts
DELETED
package/dist/ui/HeadingTwo.d.ts
DELETED
package/dist/utils/getText.d.ts
DELETED