@lotte-innovate/ui-component-test 0.1.102 → 0.1.104

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. package/dist/lib/_virtual/_commonjsHelpers.mjs +2 -0
  2. package/dist/lib/_virtual/_commonjsHelpers.mjs.map +1 -0
  3. package/dist/lib/_virtual/icons.mjs +2 -0
  4. package/dist/lib/_virtual/icons.mjs.map +1 -0
  5. package/dist/lib/_virtual/index.mjs +1 -1
  6. package/dist/lib/_virtual/index10.mjs +2 -0
  7. package/dist/lib/_virtual/index10.mjs.map +1 -0
  8. package/dist/lib/_virtual/index11.mjs +2 -0
  9. package/dist/lib/_virtual/index11.mjs.map +1 -0
  10. package/dist/lib/_virtual/index12.mjs +2 -0
  11. package/dist/lib/_virtual/index12.mjs.map +1 -0
  12. package/dist/lib/_virtual/index13.mjs +2 -0
  13. package/dist/lib/_virtual/index13.mjs.map +1 -0
  14. package/dist/lib/_virtual/index14.mjs +2 -0
  15. package/dist/lib/_virtual/index14.mjs.map +1 -0
  16. package/dist/lib/_virtual/index15.mjs +2 -0
  17. package/dist/lib/_virtual/index15.mjs.map +1 -0
  18. package/dist/lib/_virtual/index16.mjs +2 -0
  19. package/dist/lib/_virtual/index16.mjs.map +1 -0
  20. package/dist/lib/_virtual/index17.mjs +2 -0
  21. package/dist/lib/_virtual/index17.mjs.map +1 -0
  22. package/dist/lib/_virtual/index18.mjs +2 -0
  23. package/dist/lib/_virtual/index18.mjs.map +1 -0
  24. package/dist/lib/_virtual/index2.mjs +1 -1
  25. package/dist/lib/_virtual/index3.mjs +1 -1
  26. package/dist/lib/_virtual/index4.mjs +2 -0
  27. package/dist/lib/_virtual/index4.mjs.map +1 -0
  28. package/dist/lib/_virtual/index5.mjs +2 -0
  29. package/dist/lib/_virtual/index5.mjs.map +1 -0
  30. package/dist/lib/_virtual/index6.mjs +2 -0
  31. package/dist/lib/_virtual/index6.mjs.map +1 -0
  32. package/dist/lib/_virtual/index7.mjs +2 -0
  33. package/dist/lib/_virtual/index7.mjs.map +1 -0
  34. package/dist/lib/_virtual/index8.mjs +2 -0
  35. package/dist/lib/_virtual/index8.mjs.map +1 -0
  36. package/dist/lib/_virtual/index9.mjs +2 -0
  37. package/dist/lib/_virtual/index9.mjs.map +1 -0
  38. package/dist/lib/_virtual/model.mjs +2 -0
  39. package/dist/lib/_virtual/model.mjs.map +1 -0
  40. package/dist/lib/_virtual/plugin.mjs +2 -0
  41. package/dist/lib/_virtual/plugin.mjs.map +1 -0
  42. package/dist/lib/_virtual/plugin2.mjs +2 -0
  43. package/dist/lib/_virtual/plugin2.mjs.map +1 -0
  44. package/dist/lib/_virtual/plugin3.mjs +2 -0
  45. package/dist/lib/_virtual/plugin3.mjs.map +1 -0
  46. package/dist/lib/_virtual/plugin4.mjs +2 -0
  47. package/dist/lib/_virtual/plugin4.mjs.map +1 -0
  48. package/dist/lib/_virtual/plugin5.mjs +2 -0
  49. package/dist/lib/_virtual/plugin5.mjs.map +1 -0
  50. package/dist/lib/_virtual/plugin6.mjs +2 -0
  51. package/dist/lib/_virtual/plugin6.mjs.map +1 -0
  52. package/dist/lib/_virtual/theme.mjs +2 -0
  53. package/dist/lib/_virtual/theme.mjs.map +1 -0
  54. package/dist/lib/_virtual/tinymce.mjs +1 -1
  55. package/dist/lib/components/Editor/index copy.d.ts +12 -0
  56. package/dist/lib/components/Editor/index copy.js +77 -0
  57. package/dist/lib/components/Editor/index.d.ts +14 -1
  58. package/dist/lib/components/Editor/index.js +33 -39
  59. package/dist/lib/dist/lib/components/Editor/index.mjs +1 -1
  60. package/dist/lib/index.css +3749 -0
  61. package/dist/lib/node_modules/tinymce/icons/default/icons.mjs +2 -0
  62. package/dist/lib/node_modules/tinymce/icons/default/icons.mjs.map +1 -0
  63. package/dist/lib/node_modules/tinymce/icons/default/index.mjs +2 -0
  64. package/dist/lib/node_modules/tinymce/icons/default/index.mjs.map +1 -0
  65. package/dist/lib/node_modules/tinymce/models/dom/index.mjs +2 -0
  66. package/dist/lib/node_modules/tinymce/models/dom/index.mjs.map +1 -0
  67. package/dist/lib/node_modules/tinymce/models/dom/model.mjs +2 -0
  68. package/dist/lib/node_modules/tinymce/models/dom/model.mjs.map +1 -0
  69. package/dist/lib/node_modules/tinymce/plugins/advlist/index.mjs +2 -0
  70. package/dist/lib/node_modules/tinymce/plugins/advlist/index.mjs.map +1 -0
  71. package/dist/lib/node_modules/tinymce/plugins/advlist/plugin.mjs +2 -0
  72. package/dist/lib/node_modules/tinymce/plugins/advlist/plugin.mjs.map +1 -0
  73. package/dist/lib/node_modules/tinymce/plugins/code/index.mjs +2 -0
  74. package/dist/lib/node_modules/tinymce/plugins/code/index.mjs.map +1 -0
  75. package/dist/lib/node_modules/tinymce/plugins/code/plugin.mjs +2 -0
  76. package/dist/lib/node_modules/tinymce/plugins/code/plugin.mjs.map +1 -0
  77. package/dist/lib/node_modules/tinymce/plugins/emoticons/index.mjs +2 -0
  78. package/dist/lib/node_modules/tinymce/plugins/emoticons/index.mjs.map +1 -0
  79. package/dist/lib/node_modules/tinymce/plugins/emoticons/js/emojis.mjs +2 -0
  80. package/dist/lib/node_modules/tinymce/plugins/emoticons/js/emojis.mjs.map +1 -0
  81. package/dist/lib/node_modules/tinymce/plugins/emoticons/plugin.mjs +2 -0
  82. package/dist/lib/node_modules/tinymce/plugins/emoticons/plugin.mjs.map +1 -0
  83. package/dist/lib/node_modules/tinymce/plugins/link/index.mjs +2 -0
  84. package/dist/lib/node_modules/tinymce/plugins/link/index.mjs.map +1 -0
  85. package/dist/lib/node_modules/tinymce/plugins/link/plugin.mjs +2 -0
  86. package/dist/lib/node_modules/tinymce/plugins/link/plugin.mjs.map +1 -0
  87. package/dist/lib/node_modules/tinymce/plugins/lists/index.mjs +2 -0
  88. package/dist/lib/node_modules/tinymce/plugins/lists/index.mjs.map +1 -0
  89. package/dist/lib/node_modules/tinymce/plugins/lists/plugin.mjs +2 -0
  90. package/dist/lib/node_modules/tinymce/plugins/lists/plugin.mjs.map +1 -0
  91. package/dist/lib/node_modules/tinymce/plugins/table/index.mjs +2 -0
  92. package/dist/lib/node_modules/tinymce/plugins/table/index.mjs.map +1 -0
  93. package/dist/lib/node_modules/tinymce/plugins/table/plugin.mjs +2 -0
  94. package/dist/lib/node_modules/tinymce/plugins/table/plugin.mjs.map +1 -0
  95. package/dist/lib/node_modules/tinymce/themes/silver/index.mjs +2 -0
  96. package/dist/lib/node_modules/tinymce/themes/silver/index.mjs.map +1 -0
  97. package/dist/lib/node_modules/tinymce/themes/silver/theme.mjs +2 -0
  98. package/dist/lib/node_modules/tinymce/themes/silver/theme.mjs.map +1 -0
  99. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +1 -1
  102. package/dist/lib/_virtual/react-is.development.mjs +0 -2
  103. package/dist/lib/_virtual/react-is.development.mjs.map +0 -1
  104. package/dist/lib/_virtual/react-is.production.min.mjs +0 -2
  105. package/dist/lib/_virtual/react-is.production.min.mjs.map +0 -1
  106. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs +0 -2
  107. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs.map +0 -1
  108. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs +0 -2
  109. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs.map +0 -1
  110. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs +0 -2
  111. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs.map +0 -1
  112. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs +0 -2
  113. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs.map +0 -1
  114. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs +0 -2
  115. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs.map +0 -1
  116. package/dist/lib/node_modules/marked/lib/marked.esm.mjs +0 -2
  117. package/dist/lib/node_modules/marked/lib/marked.esm.mjs.map +0 -1
  118. package/dist/lib/node_modules/object-assign/index.mjs +0 -7
  119. package/dist/lib/node_modules/object-assign/index.mjs.map +0 -1
  120. package/dist/lib/node_modules/prop-types/checkPropTypes.mjs +0 -2
  121. package/dist/lib/node_modules/prop-types/checkPropTypes.mjs.map +0 -1
  122. package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs +0 -2
  123. package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs.map +0 -1
  124. package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs +0 -2
  125. package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs.map +0 -1
  126. package/dist/lib/node_modules/prop-types/index.mjs +0 -2
  127. package/dist/lib/node_modules/prop-types/index.mjs.map +0 -1
  128. package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs +0 -2
  129. package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs.map +0 -1
  130. package/dist/lib/node_modules/prop-types/lib/has.mjs +0 -2
  131. package/dist/lib/node_modules/prop-types/lib/has.mjs.map +0 -1
  132. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs +0 -10
  133. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs.map +0 -1
  134. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs +0 -10
  135. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs.map +0 -1
  136. package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs +0 -2
  137. package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{e as getDefaultExportFromCjs};
2
+ //# sourceMappingURL=_commonjsHelpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=icons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__require as e}from"../node_modules/prop-types/index.mjs";var r=e();export{r as p};
1
+ import{__require as e}from"../node_modules/tinymce/plugins/advlist/index.mjs";e();
2
2
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index10.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index10.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/plugins/link/index.mjs";e();
2
+ //# sourceMappingURL=index11.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index11.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index12.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index12.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/plugins/lists/index.mjs";e();
2
+ //# sourceMappingURL=index13.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index13.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index14.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index14.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/plugins/table/index.mjs";e();
2
+ //# sourceMappingURL=index15.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index15.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index16.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index16.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/themes/silver/index.mjs";e();
2
+ //# sourceMappingURL=index17.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index17.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index18.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index18.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- var e={exports:{}};export{e as __module};
1
+ var r={};export{r as __exports};
2
2
  //# sourceMappingURL=index2.mjs.map
@@ -1,2 +1,2 @@
1
- var e={exports:{}};export{e as __module};
1
+ import{__require as e}from"../node_modules/tinymce/plugins/emoticons/index.mjs";e();
2
2
  //# sourceMappingURL=index3.mjs.map
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index4.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/models/dom/index.mjs";e();
2
+ //# sourceMappingURL=index5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index5.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index6.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/plugins/code/index.mjs";e();
2
+ //# sourceMappingURL=index7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index7.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=index8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index8.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__require as e}from"../node_modules/tinymce/icons/default/index.mjs";e();
2
+ //# sourceMappingURL=index9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index9.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=model.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=plugin2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=plugin3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=plugin4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin4.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=plugin5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin5.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=plugin6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin6.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var r={};export{r as __exports};
2
+ //# sourceMappingURL=theme.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__require as e}from"../node_modules/tinymce/tinymce.mjs";e();
1
+ import{getDefaultExportFromCjs as m}from"./_commonjsHelpers.mjs";import{__require as e}from"../node_modules/tinymce/tinymce.mjs";var o=m(e());export{o as default};
2
2
  //# sourceMappingURL=tinymce.mjs.map
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { IAllProps } from '@tinymce/tinymce-react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ export interface EditorProps extends VariantProps<typeof editorVariants> {
5
+ tinymceScriptSrc?: string;
6
+ }
7
+ declare const editorVariants: (props?: ({
8
+ scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
9
+ size?: "small" | "medium" | "large" | null | undefined;
10
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
+ export declare const Editor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & EditorProps & IAllProps & React.RefAttributes<HTMLDivElement>>;
12
+ export default Editor;
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { forwardRef } from 'react';
26
+ import { Editor as EditorUI } from '@tinymce/tinymce-react';
27
+ import { cva } from 'class-variance-authority';
28
+ import { scalingVariants } from '../../../lib/constants';
29
+ import { cn } from '../../../lib/utils/utils';
30
+ import { marked } from 'marked';
31
+ var editorVariants = cva('', {
32
+ variants: {
33
+ scaling: __assign({}, scalingVariants),
34
+ size: {
35
+ small: 'w-[500px] h-[350px]',
36
+ medium: 'w-[550px] h-[400px]',
37
+ large: 'w-[600px] h-[450px]',
38
+ },
39
+ },
40
+ defaultVariants: {
41
+ scaling: '100%',
42
+ size: 'medium',
43
+ },
44
+ });
45
+ export var Editor = forwardRef(function (_a, ref) {
46
+ var className = _a.className, size = _a.size, scaling = _a.scaling, tinymceScriptSrc = _a.tinymceScriptSrc, props = __rest(_a, ["className", "size", "scaling", "tinymceScriptSrc"]);
47
+ return (_jsx("div", { ref: ref, className: cn(editorVariants({ size: size, scaling: scaling }), className), children: _jsx(EditorUI, __assign({ tinymceScriptSrc: tinymceScriptSrc !== null && tinymceScriptSrc !== void 0 ? tinymceScriptSrc : "/tinymce/tinymce.min.js", initialValue: "", init: {
48
+ height: '100%',
49
+ menubar: false,
50
+ // plugins: ['image', 'code', 'link', 'table'],
51
+ plugins: ['advlist', 'autolink', 'lists', 'link', 'image', 'code', 'table', 'codesample'],
52
+ toolbar: 'undo redo | blocks | ' +
53
+ 'bold italic forecolor strikethrough | hr blockquote | ' +
54
+ 'bullist numlist outdent indent | ' +
55
+ 'table image link | codeformat codesample | markdown',
56
+ content_style: 'body { font-family:Noto Sans KR,sans-serif,Nunito Sans,Helvetica Neue,Helvetica; font-size:14px }',
57
+ setup: function (editor) {
58
+ editor.ui.registry.addButton('markdown', {
59
+ text: 'Markdown',
60
+ onAction: function () {
61
+ var content = editor.getContent({ format: 'text' });
62
+ var html = marked(content);
63
+ editor.setContent(html);
64
+ },
65
+ });
66
+ editor.ui.registry.addButton('codeformat', {
67
+ icon: 'sourcecode',
68
+ tooltip: 'Inline code',
69
+ onAction: function () {
70
+ editor.formatter.toggle('code');
71
+ },
72
+ });
73
+ },
74
+ } }, props)) }));
75
+ });
76
+ Editor.displayName = 'Editor';
77
+ export default Editor;
@@ -1,6 +1,19 @@
1
1
  import React from 'react';
2
2
  import { IAllProps } from '@tinymce/tinymce-react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
+ import 'tinymce/icons/default';
5
+ import 'tinymce/themes/silver';
6
+ import 'tinymce/models/dom';
7
+ import 'tinymce/skins/ui/oxide/skin.css';
8
+ import 'tinymce/plugins/advlist';
9
+ import 'tinymce/plugins/code';
10
+ import 'tinymce/plugins/emoticons';
11
+ import 'tinymce/plugins/emoticons/js/emojis';
12
+ import 'tinymce/plugins/link';
13
+ import 'tinymce/plugins/lists';
14
+ import 'tinymce/plugins/table';
15
+ import 'tinymce/skins/ui/oxide/content.css';
16
+ import 'tinymce/skins/content/default/content.css';
4
17
  export interface EditorProps extends VariantProps<typeof editorVariants> {
5
18
  tinymceScriptSrc?: string;
6
19
  }
@@ -9,5 +22,5 @@ declare const editorVariants: (props?: ({
9
22
  size?: "small" | "medium" | "large" | null | undefined;
10
23
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
24
  export declare const initTinyMCE: () => void;
12
- export declare const Editor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & EditorProps & IAllProps & React.RefAttributes<HTMLDivElement>>;
25
+ export declare const Editor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & EditorProps & IAllProps & React.RefAttributes<HTMLTextAreaElement>>;
13
26
  export default Editor;
@@ -22,13 +22,27 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  return t;
23
23
  };
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
- import { forwardRef } from 'react';
26
- import { Editor as EditorUI } from '@tinymce/tinymce-react';
25
+ import { forwardRef, useEffect } from 'react';
27
26
  import { cva } from 'class-variance-authority';
28
27
  import { scalingVariants } from '../../../lib/constants';
29
- import { cn } from '../../../lib/utils/utils';
30
- import { marked } from 'marked';
31
- import tinymce from 'tinymce/tinymce';
28
+ import tinymce from 'tinymce';
29
+ /* Default icons are required. After that, import custom icons if applicable */
30
+ import 'tinymce/icons/default';
31
+ /* Required TinyMCE components */
32
+ import 'tinymce/themes/silver';
33
+ import 'tinymce/models/dom';
34
+ /* Import a skin (can be a custom skin instead of the default) */
35
+ import 'tinymce/skins/ui/oxide/skin.css';
36
+ /* Import plugins */
37
+ import 'tinymce/plugins/advlist';
38
+ import 'tinymce/plugins/code';
39
+ import 'tinymce/plugins/emoticons';
40
+ import 'tinymce/plugins/emoticons/js/emojis';
41
+ import 'tinymce/plugins/link';
42
+ import 'tinymce/plugins/lists';
43
+ import 'tinymce/plugins/table';
44
+ import 'tinymce/skins/ui/oxide/content.css';
45
+ import 'tinymce/skins/content/default/content.css';
32
46
  var editorVariants = cva('', {
33
47
  variants: {
34
48
  scaling: __assign({}, scalingVariants),
@@ -44,43 +58,23 @@ var editorVariants = cva('', {
44
58
  },
45
59
  });
46
60
  export var initTinyMCE = function () {
47
- tinymce.init({
48
- selector: '#editor',
49
- plugins: 'link table image code',
50
- toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright | code',
51
- script_url: '/tinymce/tinymce.min.js',
52
- });
61
+ if (typeof window !== 'undefined') {
62
+ tinymce.init({
63
+ selector: '#tinymce',
64
+ plugins: 'link table image code',
65
+ toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright | code',
66
+ skin: false,
67
+ tinymceScriptSrc: '',
68
+ src: '',
69
+ });
70
+ }
53
71
  };
54
72
  export var Editor = forwardRef(function (_a, ref) {
55
73
  var className = _a.className, size = _a.size, scaling = _a.scaling, tinymceScriptSrc = _a.tinymceScriptSrc, props = __rest(_a, ["className", "size", "scaling", "tinymceScriptSrc"]);
56
- return (_jsx("div", { ref: ref, className: cn(editorVariants({ size: size, scaling: scaling }), className), children: _jsx(EditorUI, __assign({ tinymceScriptSrc: tinymceScriptSrc !== null && tinymceScriptSrc !== void 0 ? tinymceScriptSrc : "/tinymce/tinymce.min.js", initialValue: "", init: {
57
- height: '100%',
58
- menubar: false,
59
- // plugins: ['image', 'code', 'link', 'table'],
60
- plugins: ['advlist', 'autolink', 'lists', 'link', 'image', 'code', 'table', 'codesample'],
61
- toolbar: 'undo redo | blocks | ' +
62
- 'bold italic forecolor strikethrough | hr blockquote | ' +
63
- 'bullist numlist outdent indent | ' +
64
- 'table image link | codeformat codesample | markdown',
65
- content_style: 'body { font-family:Noto Sans KR,sans-serif,Nunito Sans,Helvetica Neue,Helvetica; font-size:14px }',
66
- setup: function (editor) {
67
- editor.ui.registry.addButton('markdown', {
68
- text: 'Markdown',
69
- onAction: function () {
70
- var content = editor.getContent({ format: 'text' });
71
- var html = marked(content);
72
- editor.setContent(html);
73
- },
74
- });
75
- editor.ui.registry.addButton('codeformat', {
76
- icon: 'sourcecode',
77
- tooltip: 'Inline code',
78
- onAction: function () {
79
- editor.formatter.toggle('code');
80
- },
81
- });
82
- },
83
- } }, props)) }));
74
+ useEffect(function () {
75
+ initTinyMCE();
76
+ }, []);
77
+ return _jsx("textarea", { id: "tinymce", ref: ref });
84
78
  });
85
79
  Editor.displayName = 'Editor';
86
80
  export default Editor;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Editor as o}from"../../../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs";import{cva as i}from"class-variance-authority";import{scalingVariants as n}from"../../constants.mjs";import{cn as r}from"../../utils/utils.mjs";import{marked as a}from"../../../../node_modules/marked/lib/marked.esm.mjs";import"../../../../_virtual/tinymce.mjs";var s=function(){return s=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},s.apply(this,arguments)},l=function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(o[i[n]]=t[i[n]])}return o},c=i("",{variants:{scaling:s({},n),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}}),m=e((function(e,i){var n=e.className,m=e.size,u=e.scaling,p=e.tinymceScriptSrc,d=l(e,["className","size","scaling","tinymceScriptSrc"]);return t("div",{ref:i,className:r(c({size:m,scaling:u}),n),children:t(o,s({tinymceScriptSrc:null!=p?p:"/tinymce/tinymce.min.js",initialValue:"",init:{height:"100%",menubar:!1,plugins:["advlist","autolink","lists","link","image","code","table","codesample"],toolbar:"undo redo | blocks | bold italic forecolor strikethrough | hr blockquote | bullist numlist outdent indent | table image link | codeformat codesample | markdown",content_style:"body { font-family:Noto Sans KR,sans-serif,Nunito Sans,Helvetica Neue,Helvetica; font-size:14px }",setup:function(t){t.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var e=t.getContent({format:"text"}),o=a(e);t.setContent(o)}}),t.ui.registry.addButton("codeformat",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){t.formatter.toggle("code")}})}}},d))})}));m.displayName="Editor";export{m as Editor,m as default};
2
+ import{jsx as t}from"react/jsx-runtime";import{forwardRef as i,useEffect as r}from"react";import{cva as e}from"class-variance-authority";import{scalingVariants as n}from"../../constants.mjs";import o from"../../../../_virtual/tinymce.mjs";import"../../../../_virtual/index9.mjs";import"../../../../_virtual/index17.mjs";import"../../../../_virtual/index5.mjs";import"../../../../_virtual/index.mjs";import"../../../../_virtual/index7.mjs";import"../../../../_virtual/index3.mjs";import"../../../../node_modules/tinymce/plugins/emoticons/js/emojis.mjs";import"../../../../_virtual/index11.mjs";import"../../../../_virtual/index13.mjs";import"../../../../_virtual/index15.mjs";var a=function(){return a=Object.assign||function(t){for(var i,r=1,e=arguments.length;r<e;r++)for(var n in i=arguments[r])Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);return t},a.apply(this,arguments)},m=function(t,i){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(e=Object.getOwnPropertySymbols(t);n<e.length;n++)i.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(r[e[n]]=t[e[n]])}return r};e("",{variants:{scaling:a({},n),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}});var s=function(){"undefined"!=typeof window&&o.init({selector:"#tinymce",plugins:"link table image code",toolbar:"undo redo | formatselect | bold italic | alignleft aligncenter alignright | code",skin:!1,tinymceScriptSrc:"",src:""})},l=i((function(i,e){return i.className,i.size,i.scaling,i.tinymceScriptSrc,m(i,["className","size","scaling","tinymceScriptSrc"]),r((function(){s()}),[]),t("textarea",{id:"tinymce",ref:e})}));l.displayName="Editor";export{l as Editor,l as default,s as initTinyMCE};
3
3
  //# sourceMappingURL=index.mjs.map