@yoopta/blockquote 2.0.0 → 2.0.1

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.
@@ -0,0 +1,11 @@
1
+ import { YooEditor } from '@yoopta/editor';
2
+ import { BlockquoteElement } from './types';
3
+ import { Blockquote } from './ui/Blockquote';
4
+ declare module 'slate' {
5
+ interface CustomTypes {
6
+ Editor: YooEditor;
7
+ Element: BlockquoteElement;
8
+ }
9
+ }
10
+ export default Blockquote;
11
+ export { BlockquoteElement };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{createYooptaPlugin as t,generateId as o,getElementClassname as i}from"@yoopta/editor";import{Transforms as r}from"slate";var l="fC-3DSTT";!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".fC-3DSTT{border-left:3px solid;color:inherit;font-size:16px;letter-spacing:-.003em;line-height:28px;margin-bottom:4px;margin-left:0;margin-top:4px;padding:2px 14px;position:relative;width:100%}");const n=({attributes:t,children:o,element:r,HTMLAttributes:n})=>e("blockquote",Object.assign({draggable:!1},n,{className:i({element:r,HTMLAttributes:n,className:l})},t,{children:o}));n.displayName="Blockquote";const s=t({type:"blockquote",renderer:e=>n,shortcut:">",defineElement:()=>({id:o(),type:"blockquote",children:[{text:""}],nodeType:"block"}),createElement:(e,t)=>{var o;const i=Object.assign(Object.assign({},s.getPlugin.defineElement()),t);r.setNodes(e,i,{at:null===(o=e.selection)||void 0===o?void 0:o.anchor})},exports:{markdown:{serialize:(e,t)=>`> ${t}`},html:{serialize:(e,t)=>`<blockquote style="border-left: 3px solid; color: #292929; padding: 2px 14px; margin: 0">${t}</blockquote>`,deserialize:{nodeName:"BLOCKQUOTE"}}},options:{searchString:"blockquote",displayLabel:"Blockquote"}});export{s as default};
@@ -0,0 +1,2 @@
1
+ import { YooptaBaseElement } from '@yoopta/editor';
2
+ export type BlockquoteElement = YooptaBaseElement<'blockquote'>;
@@ -0,0 +1,4 @@
1
+ import { YooptaPluginBaseOptions } from '@yoopta/editor';
2
+ import { BlockquoteElement } from '../types';
3
+ declare const Blockquote: import("@yoopta/editor").YooptaPlugin<YooptaPluginBaseOptions, BlockquoteElement>;
4
+ export { Blockquote };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/blockquote",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
@@ -33,4 +33,4 @@
33
33
  "bugs": {
34
34
  "url": "https://github.com/Darginec05/Editor-Yoopta/issues"
35
35
  }
36
- }
36
+ }