@yoopta/paragraph 2.0.1 → 4.0.0-rc.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/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { YooEditor } from '@yoopta/editor';
2
1
  import { ParagraphElement } from './types';
3
- import { Paragraph } from './ui/Paragraph';
2
+ import { Paragraph } from './plugin';
3
+ import './styles.css';
4
4
  declare module 'slate' {
5
5
  interface CustomTypes {
6
- Editor: YooEditor;
7
6
  Element: ParagraphElement;
8
7
  }
9
8
  }
10
9
  export default Paragraph;
11
10
  export { ParagraphElement };
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,cAAc,CAAC;AAEtB,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,WAAW;QACnB,OAAO,EAAE,gBAAgB,CAAC;KAC3B;CACF;AAED,eAAe,SAAS,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createYooptaPlugin as t,generateId as a,getElementClassname as i}from"@yoopta/editor";import{Transforms as r}from"slate";var n="hwZ8eR7o";!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".hwZ8eR7o{color:inherit;font-size:16px;letter-spacing:-.003em;line-height:28px;margin-bottom:1px;margin-top:2px;padding-bottom:2px;padding-top:2px;position:relative}");const o=({attributes:t,children:a,element:r,HTMLAttributes:o})=>e("p",Object.assign({draggable:!1},o,{className:i({element:r,HTMLAttributes:o,className:n})},t,{children:a}));o.displayName="Paragraph";const s=t({type:"paragraph",renderer:e=>o,defineElement:()=>({id:a(),type:"paragraph",children:[{text:""}],nodeType:"block"}),createElement:(e,t)=>{var a;const i=Object.assign(Object.assign({},s.getPlugin.defineElement()),t);r.setNodes(e,i,{at:null===(a=e.selection)||void 0===a?void 0:a.anchor})},exports:{markdown:{serialize:(e,t)=>`${t}\n`},html:{serialize:(e,t)=>`<p>${t}</p>`,deserialize:{nodeName:"P"}}},options:{searchString:"text paragraph",displayLabel:"Paragraph"}});export{s as default};
1
+ import{YooptaPlugin as e}from"@yoopta/editor";import{jsx as t}from"react/jsx-runtime";const a=new e({type:"Paragraph",elements:{paragraph:{render:e=>t("p",Object.assign({"data-element-type":"Paragraph",className:"yoo-p-leading-7 yoo-p-mt-2"},e.attributes,{children:e.children}))}},options:{displayLabel:"Text",shortcuts:["p","text"]}});!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".yoo-p-mt-2{margin-top:.5rem}.yoo-p-leading-7{line-height:1.75rem}");export{a as default};
@@ -0,0 +1,3 @@
1
+ declare const Paragraph: any;
2
+ export { Paragraph };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS,KAWb,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- import { YooptaBaseElement } from '@yoopta/editor';
2
- export type ParagraphElement = YooptaBaseElement<'paragraph'>;
1
+ import { SlateElement } from '@yoopta/editor';
2
+ export type ParagraphElement = SlateElement<'paragraph'>;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { YooptaPluginBaseOptions } from '@yoopta/editor';
2
- import { ParagraphElement } from '../types';
3
- declare const Paragraph: import("@yoopta/editor").YooptaPlugin<YooptaPluginBaseOptions, ParagraphElement>;
4
- export { Paragraph };
1
+ /// <reference types="react" />
2
+ declare const ParagraphRender: (props: PluginElementRenderProps) => JSX.Element;
3
+ export { ParagraphRender };
4
+ //# sourceMappingURL=Paragraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../src/ui/Paragraph.tsx"],"names":[],"mappings":";AAEA,QAAA,MAAM,eAAe,kDAMpB,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/paragraph",
3
- "version": "2.0.1",
3
+ "version": "4.0.0-rc.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.18-rc",
17
+ "@yoopta/editor": ">=4.0.0-rc.0",
18
18
  "react": ">=17.0.2",
19
19
  "react-dom": ">=17.0.2",
20
20
  "slate": ">=0.72.3",
@@ -28,7 +28,10 @@
28
28
  "url": "git+https://github.com/Darginec05/Editor-Yoopta.git"
29
29
  },
30
30
  "scripts": {
31
- "test": "node ./__tests__/@yoopta/paragraph.test.js"
31
+ "test": "node ./__tests__/@yoopta/paragraph.test.js",
32
+ "start": "rollup --config rollup.config.js --watch --bundleConfigAsCjs --environment NODE_ENV:development",
33
+ "build": "rollup --config rollup.config.js --bundleConfigAsCjs --environment NODE_ENV:production",
34
+ "publish": "yarn build && npm publish --access public"
32
35
  },
33
36
  "bugs": {
34
37
  "url": "https://github.com/Darginec05/Editor-Yoopta/issues"