@yoopta/callout 1.9.0-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/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # `yoopta-callout`
2
+
3
+ > TODO: description
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ const callout = require('yoopta-callout');
9
+
10
+ // TODO: DEMONSTRATE API
11
+ ```
@@ -0,0 +1,11 @@
1
+ import { YoEditor } from '@yoopta/editor';
2
+ import { CalloutElement } from './types';
3
+ import { Callout } from './ui/Callout';
4
+ declare module 'slate' {
5
+ interface CustomTypes {
6
+ Editor: YoEditor;
7
+ Element: CalloutElement;
8
+ }
9
+ }
10
+ export default Callout;
11
+ export { CalloutElement };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{createYoptaPlugin as t,generateId as i}from"@yoopta/editor";import{Transforms as o}from"slate";var r="_22OYfqbf";!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("._22OYfqbf{background:#f5f7f9;border-radius:5px;color:#292929;font-size:16px;letter-spacing:-.003em;line-height:24px;margin-bottom:4px;margin-left:0;margin-top:4px;padding:12px 14px;position:relative;width:100%}");const n=({attributes:t,children:i,element:o})=>e("div",Object.assign({draggable:!1,className:r},t,{children:i}));n.displayName="Callout";const d=t({type:"callout",renderer:e=>n,shortcut:"<",defineElement:()=>({id:i(),type:"callout",children:[{text:""}],nodeType:"block"}),createElement:function(e){var t;const i=d.getPlugin.defineElement();o.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)=>`<div style="background: #f5f7f9; border-radius: 5px; color: #292929; padding: 12px 14px">${t}</div>`,deserialize:{nodeName:"BLOCKQUOTE"}}}});export{d as default};
@@ -0,0 +1,2 @@
1
+ import { YoptaBaseElement } from '@yoopta/editor';
2
+ export type CalloutElement = YoptaBaseElement<'callout'>;
@@ -0,0 +1,3 @@
1
+ import { CalloutElement } from '../types';
2
+ declare const Callout: import("@yoopta/editor").YoptaPlugin<any, CalloutElement>;
3
+ export { Callout };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@yoopta/callout",
3
+ "version": "1.9.0-rc",
4
+ "description": "> TODO: description",
5
+ "author": "Darginec05 <devopsbanda@gmail.com>",
6
+ "homepage": "https://github.com/Darginec05/Editor-Yopta#readme",
7
+ "license": "MIT",
8
+ "private": false,
9
+ "type": "module",
10
+ "main": "dist/index.js",
11
+ "module": "dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "files": [
14
+ "dist/"
15
+ ],
16
+ "peerDependencies": {
17
+ "@yoopta/editor": "1.9.0-rc",
18
+ "react": ">=17.0.2",
19
+ "react-dom": ">=17.0.2",
20
+ "slate": ">=0.72.3",
21
+ "slate-react": ">=0.72.4"
22
+ },
23
+ "publishConfig": {
24
+ "registry": "https://registry.yarnpkg.com"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/Darginec05/Editor-Yopta.git"
29
+ },
30
+ "scripts": {
31
+ "test": "node ./__tests__/yoopta-callout.test.js"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/Darginec05/Editor-Yopta/issues"
35
+ }
36
+ }