@yoopta/blockquote 4.0.0-rc.9 → 4.1.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.js CHANGED
@@ -1 +1 @@
1
- import{YooptaPlugin as e}from"@yoopta/editor";import{jsx as t}from"react/jsx-runtime";"function"==typeof SuppressedError&&SuppressedError;const o=new e({type:"Blockquote",elements:{blockquote:{render:e=>{const o=e.HTMLAttributes||{},{className:r}=o,n=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}(o,["className"]);return t("blockquote",Object.assign({"data-element-type":e.element.type,className:`yoo-b-mt-2 yoo-b-border-l-2 yoo-b-pl-6 yoo-b-leading-7 ${r}`},n,e.attributes,{children:e.children}))}}},options:{display:{title:"Blockquote",description:"Capture quote"},shortcuts:[">"]},parsers:{html:{deserialize:{nodeNames:["BLOCKQUOTE"]}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-b-mt-2{margin-top:.5rem}.yoo-b-border-l-2{border-left-width:2px}.yoo-b-pl-6{padding-left:1.5rem}.yoo-b-leading-7{line-height:1.75rem}");export{o as default};
1
+ import{YooptaPlugin as e}from"@yoopta/editor";import{jsx as t}from"react/jsx-runtime";"function"==typeof SuppressedError&&SuppressedError;const o={margin:"8px 0 0 0",border:"none",borderLeft:"2px solid #e5e7eb"},r=new e({type:"Blockquote",elements:{blockquote:{render:e=>{const r=e.HTMLAttributes||{},{className:n="",style:s}=r,i=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}(r,["className","style"]);return t("blockquote",Object.assign({"data-element-type":e.element.type,className:`yoo-b-pl-6 yoo-b-leading-7 ${n}`},i,e.attributes,{style:Object.assign(Object.assign({},s),o)},{children:e.children}))}}},options:{display:{title:"Blockquote",description:"Capture quote"},shortcuts:[">"]},parsers:{html:{deserialize:{nodeNames:["BLOCKQUOTE"]}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("#yoopta-editor .yoo-b-pl-6{padding-left:1.5rem}#yoopta-editor .yoo-b-leading-7{line-height:1.75rem}");export{r as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/ui/Blockquote.tsx","../src/plugin/index.tsx","../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["import { PluginElementRenderProps } from '@yoopta/editor';\n\nconst blockquoteStyles = {\n margin: '8px 0 0 0',\n border: 'none',\n borderLeft: '2px solid #e5e7eb',\n};\n\nconst BlockquoteRender = (props: PluginElementRenderProps) => {\n const { className = '', style, ...htmlAttrs } = props.HTMLAttributes || {};\n\n return (\n <blockquote\n data-element-type={props.element.type}\n className={`yoo-b-pl-6 yoo-b-leading-7 ${className}`}\n {...htmlAttrs}\n {...props.attributes}\n style={{ ...style, ...blockquoteStyles }}\n >\n {props.children}\n </blockquote>\n );\n};\n\nexport { BlockquoteRender };\n","import { YooptaPlugin } from '@yoopta/editor';\nimport { BlockquoteRender } from '../ui/Blockquote';\n\nconst Blockquote = new YooptaPlugin({\n type: 'Blockquote',\n elements: {\n blockquote: {\n render: BlockquoteRender,\n },\n },\n options: {\n display: {\n title: 'Blockquote',\n description: 'Capture quote',\n },\n shortcuts: ['>'],\n },\n parsers: {\n html: {\n deserialize: {\n nodeNames: ['BLOCKQUOTE'],\n },\n },\n },\n});\n\nexport { Blockquote };\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,gBAAgB,GAAG;AACvB,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,MAAM,EAAE,MAAM;AACd,IAAA,UAAU,EAAE,mBAAmB;CAChC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,KAA+B,KAAI;AAC3D,IAAA,MAAM,KAA0C,KAAK,CAAC,cAAc,IAAI,EAAE,EAApE,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAA6C,GAAA,EAAA,EAAxC,SAAS,GAArC,MAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,OAAA,CAAuC,CAA6B,CAAC;AAE3E,IAAA,QACEA,GAAA,CAAA,YAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,mBAAA,EACqB,KAAK,CAAC,OAAO,CAAC,IAAI,EACrC,SAAS,EAA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AC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;","x_google_ignoreList":[2]}
@@ -1 +1 @@
1
- {"version":3,"file":"Blockquote.d.ts","sourceRoot":"","sources":["../../src/ui/Blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,QAAA,MAAM,gBAAgB,UAAW,wBAAwB,4CAaxD,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"Blockquote.d.ts","sourceRoot":"","sources":["../../src/ui/Blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAQ1D,QAAA,MAAM,gBAAgB,UAAW,wBAAwB,4CAcxD,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yoopta/blockquote",
3
- "version": "4.0.0-rc.9",
4
- "description": "> TODO: description",
3
+ "version": "4.1.0",
4
+ "description": "Blockquote plugin for Yoopta Editor",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
7
7
  "license": "MIT",
@@ -34,5 +34,5 @@
34
34
  "bugs": {
35
35
  "url": "https://github.com/Darginec05/Editor-Yoopta/issues"
36
36
  },
37
- "gitHead": "92fc1c6c6e38b757ae264ffa34f126cf280d348a"
37
+ "gitHead": "fb3d4ab03c9b43feb2258d8cb1dcd5959bf726ca"
38
38
  }