@corva/ui 0.55.0-4 → 0.55.0-5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@material-ui/core"),t=require("@material-ui/icons/Language"),a=require("classnames"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@material-ui/core"),t=require("@material-ui/icons/Language"),a=require("classnames"),s=require("./Constants.js"),n=require("./Elements/ImageElement/ImageElement.js"),l=require("./Elements/VideoElement/VideoElement.js"),i=require("./style.css.js"),c=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(e),u=o(t),m=o(a);function h(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?h(Object(t),!0).forEach((function(r){d.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var b=r.withStyles({tooltip:{height:24,maxWidth:168}})(r.Tooltip),p=r.withStyles({root:{color:"#bdbdbd",fontSize:14,marginRight:8}})(u.default);exports.Element=function(e){var r=e.attributes,t=e.children,a=e.element;switch(a.type){case"block-quote":return c.jsx("blockquote",j(j({},r),{},{children:t}));case"bulleted-list":return c.jsx("ul",j(j({},r),{},{className:i.bulletedList,children:t}));case"numbered-list":var o,d,u=i.numberedList;return 1===(null===(o=a.children)||void 0===o?void 0:o.length)&&null!==(d=a.children)&&void 0!==d&&d[0].textPrimary&&(u=m.default(i.listItem,i.listItemPrimary)),c.jsx("ol",j(j({},r),{},{className:u,start:null==a?void 0:a.startPosition,children:t}));case"list-item":var h,x,f=i.listItem;return 1===(null===(h=a.children)||void 0===h?void 0:h.length)&&null!==(x=a.children)&&void 0!==x&&x[0].textPrimary&&(f=m.default(i.listItem,i.listItemPrimary)),c.jsx("li",j(j({},r),{},{className:f,children:t}));case"image":return c.jsx(n,j({},e));case s.TEXT_FORMATS.headerOne:return c.jsx("div",{className:i.headerOne,children:t});case s.TEXT_FORMATS.headerTwo:return c.jsx("div",{className:i.headerTwo,children:t});case s.TEXT_FORMATS.headerThree:return c.jsx("div",{className:i.headerThree,children:t});case s.TEXT_FORMATS.body:return c.jsx("div",{className:i.body,children:t});case s.TEXT_FORMATS.caption:return c.jsx("div",{className:i.caption,children:t});case s.TEXT_FORMATS.code:return c.jsx("pre",{className:m.default("language-js",i.codeBlock),children:t});case"video":return c.jsx(l,j({},e));case"link":return c.jsx(b,{placement:"bottom-start",title:c.jsxs("span",{className:i.richTextEditorPopoverLinkElement,children:[c.jsx(p,{}),c.jsx("a",{href:a.url,children:a.url})]}),children:c.jsx("a",j(j({},r),{},{href:a.url,className:i.richTextEditorLinkElement,children:t}))});default:return c.jsx("div",{className:i.body,children:t})}},exports.Leaf=function(e){var r=e.attributes,t=e.leaf,a=e.children;return t.bold&&(a=c.jsx("strong",{children:a})),t.italic&&(a=c.jsx("em",{children:a})),t.underline&&(a=c.jsx("u",{children:a})),t.contrastText&&(a=c.jsx("span",{className:i.contrastText,children:a})),t.textPrimary&&(a=c.jsx("span",{className:i.textPrimary,children:a})),t.bodyLeaf&&(a=c.jsx("span",{className:i.body,children:a})),t.captionLeaf&&(a=c.jsx("span",{className:i.caption,children:a})),t.codeLeaf&&(a=c.jsx("span",{className:i.code,children:a})),t.headerOneLeaf&&(a=c.jsx("span",{className:i.headerOne,children:a})),t.headerTwoLeaf&&(a=c.jsx("span",{className:i.headerTwo,children:a})),t.headerThreeLeaf&&(a=c.jsx("span",{className:i.headerThree,children:a})),c.jsx("span",j(j({},r),{},{className:m.default("token",d.default({"attr-name":t["attr-name"],"class-name":t["class-name"],boolean:t.boolean,char:t.char,comment:t.comment||t.visiblePragma,constant:t.constant,constants:t.constants,function:t.function,keyword:t.keyword,number:t.number,operator:t.operator,punctuation:t.punctuation,regex:t.regex,selector:t.selector,string:t.string,symbol:t.symbol,tag:t.tag,url:t.url,variable:t.variable},i.invisible,t.invisiblePragma)),children:a}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderElements.d.ts","sourceRoot":"","sources":["../../../src/components/SlateFormattedText/RenderElements.js"],"names":[],"mappings":"AAyBO,+
|
|
1
|
+
{"version":3,"file":"RenderElements.d.ts","sourceRoot":"","sources":["../../../src/components/SlateFormattedText/RenderElements.js"],"names":[],"mappings":"AAyBO,+CA8EN;AAEM,kDA8EN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{withStyles as r,Tooltip as t}from"@material-ui/core";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{withStyles as r,Tooltip as t}from"@material-ui/core";import a from"@material-ui/icons/Language";import n from"classnames";import{TEXT_FORMATS as i}from"./Constants.js";import l from"./Elements/ImageElement/ImageElement.js";import s from"./Elements/VideoElement/VideoElement.js";import c from"./style.css.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function h(r){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?d(Object(a),!0).forEach((function(t){e(r,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}))}return r}var u=r({tooltip:{height:24,maxWidth:168}})(t),p=r({root:{color:"#bdbdbd",fontSize:14,marginRight:8}})(a),b=function(r){var t=r.attributes,a=r.leaf,i=r.children;return a.bold&&(i=o("strong",{children:i})),a.italic&&(i=o("em",{children:i})),a.underline&&(i=o("u",{children:i})),a.contrastText&&(i=o("span",{className:c.contrastText,children:i})),a.textPrimary&&(i=o("span",{className:c.textPrimary,children:i})),a.bodyLeaf&&(i=o("span",{className:c.body,children:i})),a.captionLeaf&&(i=o("span",{className:c.caption,children:i})),a.codeLeaf&&(i=o("span",{className:c.code,children:i})),a.headerOneLeaf&&(i=o("span",{className:c.headerOne,children:i})),a.headerTwoLeaf&&(i=o("span",{className:c.headerTwo,children:i})),a.headerThreeLeaf&&(i=o("span",{className:c.headerThree,children:i})),o("span",h(h({},t),{},{className:n("token",e({"attr-name":a["attr-name"],"class-name":a["class-name"],boolean:a.boolean,char:a.char,comment:a.comment||a.visiblePragma,constant:a.constant,constants:a.constants,function:a.function,keyword:a.keyword,number:a.number,operator:a.operator,punctuation:a.punctuation,regex:a.regex,selector:a.selector,string:a.string,symbol:a.symbol,tag:a.tag,url:a.url,variable:a.variable},c.invisible,a.invisiblePragma)),children:i}))},f=function(e){var r=e.attributes,t=e.children,a=e.element;switch(a.type){case"block-quote":return o("blockquote",h(h({},r),{},{children:t}));case"bulleted-list":return o("ul",h(h({},r),{},{className:c.bulletedList,children:t}));case"numbered-list":var d,b,f=c.numberedList;return 1===(null===(d=a.children)||void 0===d?void 0:d.length)&&null!==(b=a.children)&&void 0!==b&&b[0].textPrimary&&(f=n(c.listItem,c.listItemPrimary)),o("ol",h(h({},r),{},{className:f,start:null==a?void 0:a.startPosition,children:t}));case"list-item":var v,y,g=c.listItem;return 1===(null===(v=a.children)||void 0===v?void 0:v.length)&&null!==(y=a.children)&&void 0!==y&&y[0].textPrimary&&(g=n(c.listItem,c.listItemPrimary)),o("li",h(h({},r),{},{className:g,children:t}));case"image":return o(l,h({},e));case i.headerOne:return o("div",{className:c.headerOne,children:t});case i.headerTwo:return o("div",{className:c.headerTwo,children:t});case i.headerThree:return o("div",{className:c.headerThree,children:t});case i.body:return o("div",{className:c.body,children:t});case i.caption:return o("div",{className:c.caption,children:t});case i.code:return o("pre",{className:n("language-js",c.codeBlock),children:t});case"video":return o(s,h({},e));case"link":return o(u,{placement:"bottom-start",title:m("span",{className:c.richTextEditorPopoverLinkElement,children:[o(p,{}),o("a",{href:a.url,children:a.url})]}),children:o("a",h(h({},r),{},{href:a.url,className:c.richTextEditorLinkElement,children:t}))});default:return o("div",{className:c.body,children:t})}};export{f as Element,b as Leaf};
|