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

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.
@@ -44,7 +44,7 @@ var editorVariants = cva('', {
44
44
  },
45
45
  });
46
46
  export var Editor = forwardRef(function (_a, ref) {
47
- var className = _a.className, size = _a.size, scaling = _a.scaling, props = __rest(_a, ["className", "size", "scaling"]);
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
50
  if (typeof window !== 'undefined') {
@@ -56,24 +56,7 @@ export var Editor = forwardRef(function (_a, ref) {
56
56
  if (!isClient) {
57
57
  return null;
58
58
  }
59
- return (_jsx("div", { className: cn(editorVariants({ size: size, scaling: scaling }), className), ref: ref, children: _jsx(EditorUI, __assign({ init: {
60
- base_url: 'tinymce',
61
- width: '100%',
62
- height: '100%',
63
- promotion: false,
64
- 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 quickbars accordion',
65
- menubar: 'file edit view insert format tools table',
66
- 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',
67
- autosave_ask_before_unload: true,
68
- autosave_interval: '30s',
69
- autosave_restore_when_empty: false,
70
- autosave_retention: '2m',
71
- image_advtab: true,
72
- image_caption: true,
73
- quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
74
- toolbar_mode: 'sliding',
75
- content_style: 'body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }',
76
- setup: function (editor) {
59
+ return (_jsx("div", { className: cn(editorVariants({ size: size, scaling: scaling }), className), ref: ref, children: _jsx(EditorUI, __assign({ init: __assign({ base_url: 'tinymce', width: '100%', height: '100%', promotion: false, 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: true, autosave_interval: '30s', autosave_restore_when_empty: false, autosave_retention: '2m', image_advtab: true, image_caption: true, quickbars_selection_toolbar: '', toolbar_mode: 'sliding', content_style: 'body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }', setup: function (editor) {
77
60
  editor.ui.registry.addButton('inlinecode', {
78
61
  icon: 'sourcecode',
79
62
  tooltip: 'Inline code',
@@ -95,8 +78,7 @@ export var Editor = forwardRef(function (_a, ref) {
95
78
  editor.setContent(html);
96
79
  },
97
80
  });
98
- },
99
- } }, props)) }));
81
+ } }, init) }, props)) }));
100
82
  });
101
83
  Editor.displayName = 'Editor';
102
84
  export default Editor;
@@ -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 a}from"@tinymce/tinymce-react";import{cva as r}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 a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);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 a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(o[i[a]]=e[i[a]])}return o},d=r("",{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,r){var l=t.className,p=t.size,f=t.scaling,b=u(t,["className","size","scaling"]),g=o(!1),v=g[0],h=g[1];return i((function(){"undefined"!=typeof window&&n().then((function(){h(!0)}))}),[]),v?e("div",{className:s(d({size:p,scaling:f}),l),ref:r,children:e(a,m({init:{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 quickbars 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:"bold italic | quicklink h2 h3 blockquote quickimage quicktable",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)}})}}},b))}):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