@lotte-innovate/ui-component-test 0.2.51 → 0.2.52

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,13 +47,11 @@ export var Editor = forwardRef(function (_a, ref) {
47
47
  var className = _a.className, size = _a.size, scaling = _a.scaling, init = _a.init, props = __rest(_a, ["className", "size", "scaling", "init"]);
48
48
  var _b = useState(false), isClient = _b[0], setIsClient = _b[1];
49
49
  useEffect(function () {
50
- loadTinyMCE()
51
- .then(function () {
52
- setIsClient(true);
53
- })
54
- .catch(function (error) {
55
- console.error('Error loading module:', error);
56
- });
50
+ if (typeof window !== 'undefined') {
51
+ loadTinyMCE().then(function () {
52
+ setIsClient(true);
53
+ });
54
+ }
57
55
  }, []);
58
56
  if (!isClient) {
59
57
  return null;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as o,useEffect as i}from"react";import{Editor as r}from"@tinymce/tinymce-react";import{cva as a}from"class-variance-authority";import{loadTinyMCE as n}from"../../utils/useLoadTinyMCE.mjs";import{scalingVariants as l}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{marked as c}from"marked";var m=function(){return m=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},m.apply(this,arguments)},u=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},d=a("",{variants:{scaling:m({},l),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}}),p=t((function(t,a){var l=t.className,p=t.size,f=t.scaling,g=t.init,v=u(t,["className","size","scaling","init"]),b=o(!1),h=b[0],y=b[1];return i((function(){n().then((function(){y(!0)})).catch((function(e){console.error("Error loading module:",e)}))}),[]),h?e("div",{className:s(d({size:p,scaling:f}),l),ref:a,children:e(r,m({init:m({base_url:"tinymce",width:"100%",height:"100%",promotion:!1,plugins:"preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion",menubar:"file edit view insert format tools table",toolbar:"undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl",autosave_ask_before_unload:!0,autosave_interval:"30s",autosave_restore_when_empty:!1,autosave_retention:"2m",image_advtab:!0,image_caption:!0,quickbars_selection_toolbar:"",toolbar_mode:"sliding",content_style:"body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }",setup:function(e){e.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){e.formatter.toggle("code")}}),e.on("init",(function(){e.formatter.register("code",{inline:"code",remove:"all"})})),e.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=e.getContent({format:"text"}),o=c(t);e.setContent(o)}})}},g)},v))}):null}));p.displayName="Editor";export{p as Editor,p as default};
2
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as o,useEffect as i}from"react";import{Editor as n}from"@tinymce/tinymce-react";import{cva as a}from"class-variance-authority";import{loadTinyMCE as r}from"../../utils/useLoadTinyMCE.mjs";import{scalingVariants as l}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{marked as c}from"marked";var m=function(){return m=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},m.apply(this,arguments)},u=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o},d=a("",{variants:{scaling:m({},l),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}}),p=t((function(t,a){var l=t.className,p=t.size,f=t.scaling,v=t.init,g=u(t,["className","size","scaling","init"]),b=o(!1),y=b[0],h=b[1];return i((function(){"undefined"!=typeof window&&r().then((function(){h(!0)}))}),[]),y?e("div",{className:s(d({size:p,scaling:f}),l),ref:a,children:e(n,m({init:m({base_url:"tinymce",width:"100%",height:"100%",promotion:!1,plugins:"preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion",menubar:"file edit view insert format tools table",toolbar:"undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl",autosave_ask_before_unload:!0,autosave_interval:"30s",autosave_restore_when_empty:!1,autosave_retention:"2m",image_advtab:!0,image_caption:!0,quickbars_selection_toolbar:"",toolbar_mode:"sliding",content_style:"body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }",setup:function(e){e.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){e.formatter.toggle("code")}}),e.on("init",(function(){e.formatter.register("code",{inline:"code",remove:"all"})})),e.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=e.getContent({format:"text"}),o=c(t);e.setContent(o)}})}},v)},g))}):null}));p.displayName="Editor";export{p as Editor,p as default};
3
3
  //# sourceMappingURL=index.mjs.map