@npm-questionpro/wick-ui-editor 0.13.0 → 0.14.1
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.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare interface IWuContentEditorProps extends default_2.HTMLAttributes<
|
|
|
13
13
|
hideToolbar?: boolean;
|
|
14
14
|
readonly?: boolean;
|
|
15
15
|
isHtml?: boolean;
|
|
16
|
+
setIsHtml?: (isHtml: boolean) => void;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
declare const TOOLBAR_EXTENSIONS: {
|
|
@@ -36,8 +37,9 @@ declare const TOOLBAR_EXTENSIONS: {
|
|
|
36
37
|
codeline: JSX.Element;
|
|
37
38
|
clear: JSX.Element;
|
|
38
39
|
'|': JSX.Element;
|
|
40
|
+
html: JSX.Element;
|
|
39
41
|
};
|
|
40
42
|
|
|
41
|
-
export declare function WuContentEditor({ defaultValue, onUpdate, className, toolbarPosition, customToolbarChildren, toolbarItems, hideToolbar, readonly, customFonts, isHtml, ...props }: IWuContentEditorProps): default_2.JSX.Element;
|
|
43
|
+
export declare function WuContentEditor({ defaultValue, onUpdate, className, toolbarPosition, customToolbarChildren, toolbarItems, hideToolbar, readonly, customFonts, isHtml: isHtmlProp, setIsHtml: setIsHtmlProp, ...props }: IWuContentEditorProps): default_2.JSX.Element;
|
|
42
44
|
|
|
43
45
|
export { }
|
|
@@ -2343,7 +2343,7 @@ async function pa(e, t) {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
var Mu = {};
|
|
2345
2345
|
Ze(Mu, { builders: () => ha, printer: () => Ca, utils: () => ga });
|
|
2346
|
-
var ha = { join: uu, line: ru, softline: Ur, hardline: K, literalline: Du, group: tu, conditionalGroup: Wr, fill: Vr, lineSuffix: Ue, lineSuffixBoundary: qr, cursor: ae, breakParent: Pe, ifBreak: Kr, trim: Hr, indent: Ne, indentIfBreak: zr, align: he, addAlignmentToDoc: eu, markAsRoot: Zt, dedentToRoot: Rr, dedent: Mr, hardlineWithoutBreakParent: nt, literallineWithoutBreakParent: nu, label: Xr, concat: (e) => e }, Ca = { printDocToString: je }, ga = { willBreak: Ir, traverseDoc: ut, findInDoc: rt, mapDoc: Te, removeLines: _r, stripTrailingHardline: Qt, replaceEndOfLine: jr, canBreak: $r }, Ea = "3.8.
|
|
2346
|
+
var ha = { join: uu, line: ru, softline: Ur, hardline: K, literalline: Du, group: tu, conditionalGroup: Wr, fill: Vr, lineSuffix: Ue, lineSuffixBoundary: qr, cursor: ae, breakParent: Pe, ifBreak: Kr, trim: Hr, indent: Ne, indentIfBreak: zr, align: he, addAlignmentToDoc: eu, markAsRoot: Zt, dedentToRoot: Rr, dedent: Mr, hardlineWithoutBreakParent: nt, literallineWithoutBreakParent: nu, label: Xr, concat: (e) => e }, Ca = { printDocToString: je }, ga = { willBreak: Ir, traverseDoc: ut, findInDoc: rt, mapDoc: Te, removeLines: _r, stripTrailingHardline: Qt, replaceEndOfLine: jr, canBreak: $r }, Ea = "3.8.3", Vu = {};
|
|
2347
2347
|
Ze(Vu, { addDanglingComment: () => ne, addLeadingComment: () => me, addTrailingComment: () => ye, getAlignmentSize: () => at, getIndentSize: () => Aa, getMaxContinuousCount: () => xa, getNextNonSpaceNonCommentCharacter: () => Ia, getNextNonSpaceNonCommentCharacterIndex: () => Ra, getPreferredQuote: () => Ta, getStringWidth: () => Dt, hasNewline: () => Z, hasNewlineInRange: () => ja, hasSpaces: () => $a, isNextLineEmpty: () => za, isNextLineEmptyAfterIndex: () => Ct, isPreviousLineEmpty: () => Va, makeString: () => Ka, skip: () => Be, skipEverythingButNewLine: () => lu, skipInlineComment: () => dt, skipNewline: () => oe, skipSpaces: () => ee, skipToLineEnd: () => su, skipTrailingComment: () => pt, skipWhitespace: () => dn });
|
|
2348
2348
|
function ma(e, t) {
|
|
2349
2349
|
if (t === !1) return !1;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";.
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";._wuContentEditor_1kzbo_8 img{display:inline-block;margin:0}._wuContentEditor_1kzbo_8 [data-resize-handle]{background:#00000080;border:1px solid hsla(0,0%,100%,.8);border-radius:2px;position:absolute;z-index:9}._wuContentEditor_1kzbo_8 [data-resize-handle]:hover{background:#000c}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=bottom-left],._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=bottom-right],._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=top-left],._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=top-right]{height:8px;width:8px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=top-left]{cursor:nwse-resize;left:-4px;top:0}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=top-right]{cursor:nesw-resize;right:-4px;top:-4px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=bottom-left]{bottom:-4px;cursor:nesw-resize;left:-4px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=bottom-right]{bottom:-4px;cursor:nwse-resize;right:-4px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=bottom],._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=top]{height:6px;left:8px;right:8px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=top]{cursor:ns-resize;top:-3px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=bottom]{bottom:-3px;cursor:ns-resize}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=left],._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=right]{bottom:8px;top:8px;width:6px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=left]{cursor:ew-resize;left:-3px}._wuContentEditor_1kzbo_8 [data-resize-handle][data-resize-handle=right]{cursor:ew-resize;right:-3px}[data-resize-state=true] [data-resize-wrapper]{border-radius:.125rem;outline:1px solid rgba(0,0,0,.25)}[data-resize-wrapper]{display:inline-block!important}._wuContentEditorTable_1kzbo_1{display:grid;gap:24px 12px;grid-template-columns:repeat(2,minmax(0,1fr))}._wuContentEditorTable_1kzbo_1 button{align-items:center;display:flex;font-size:12px;justify-content:flex-start}._wuContentEditor_1kzbo_8 table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}._wuContentEditor_1kzbo_8 table td,._wuContentEditor_1kzbo_8 table th{border:1px solid #e6e6e6;box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}._wuContentEditor_1kzbo_8 table td>*,._wuContentEditor_1kzbo_8 table th>*{margin-bottom:0}._wuContentEditor_1kzbo_8 table th{background-color:#f5f5f5;font-weight:700;text-align:left}._wuContentEditor_1kzbo_8 table ._selectedCell_1kzbo_1:after{background:green;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:2}._wuContentEditor_1kzbo_8 table ._column-resize-handle_1kzbo_1{background-color:#00f;bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}._wuContentEditor_1kzbo_8 ._tableWrapper_1kzbo_1{margin:1.5rem 0;overflow-x:auto;scrollbar-color:rgb(var(--wu-gray-20)) transparent;scrollbar-width:thin}._wuContentEditor_1kzbo_8 ._tableWrapper_1kzbo_1::-webkit-scrollbar{height:6px;width:6px}._wuContentEditor_1kzbo_8 ._tableWrapper_1kzbo_1::-webkit-scrollbar-track{background:transparent}._wuContentEditor_1kzbo_8 ._tableWrapper_1kzbo_1::-webkit-scrollbar-thumb{background-color:rgb(var(--wu-gray-20));border-radius:4px}._wuContentEditor_1kzbo_8 ._tableWrapper_1kzbo_1::-webkit-scrollbar-corner{background:transparent}._wuContentEditor_1kzbo_8 ._resize-cursor_1kzbo_1{cursor:ew-resize;cursor:col-resize}._wuContentEditor_1kzbo_8 ol,._wuContentEditor_1kzbo_8 ul{all:unset;box-sizing:border-box;display:revert}._wuContentEditor_1kzbo_8 ul{list-style-type:disc}._wuContentEditor_1kzbo_8 ol,._wuContentEditor_1kzbo_8 ul{padding-left:2rem}._wuContentEditor_1kzbo_8 ol{list-style-type:decimal}._wuContentEditor_1kzbo_8 ul[data-type=taskList]{list-style-type:none;padding-left:1rem}._wuContentEditor_1kzbo_8 ul[data-type=taskList] li{align-items:center;display:flex;gap:8px;justify-content:flex-start}._wuContentEditor_1kzbo_8 ul[data-type=taskList] li label{position:relative;top:2px}._wuContentEditor_1kzbo_8 h1{font-size:2rem;line-height:40px}._wuContentEditor_1kzbo_8 h1,._wuContentEditor_1kzbo_8 h2{font-weight:400}._wuContentEditor_1kzbo_8 h2{font-size:1.5rem}._wuContentEditor_1kzbo_8 h2,._wuContentEditor_1kzbo_8 h3{line-height:32px}._wuContentEditor_1kzbo_8 h3{font-size:1.25rem}._wuContentEditor_1kzbo_8 h3,._wuContentEditor_1kzbo_8 h4{font-weight:500}._wuContentEditor_1kzbo_8 h4{font-size:1.125rem;line-height:24px}._wuContentEditorContainer_1kzbo_8{--blue-p:rgb(var(--wu-blue-p));--blue-q:rgb(var(--wu-blue-q));--gray-20:rgb(var(--wu-gray-20));--gray-10:#ddd;background-color:#fff;border:1px solid var(--gray-10);border-radius:8px;display:flex;flex-direction:column;line-height:1.5;min-height:160px;overflow:auto;position:relative;scrollbar-color:var(--gray-20) transparent;scrollbar-width:thin}._wuContentEditorContainer_1kzbo_8[data-position=bottom]{flex-direction:column-reverse}._wuContentEditorContainer_1kzbo_8::-webkit-scrollbar{height:6px;width:6px}._wuContentEditorContainer_1kzbo_8::-webkit-scrollbar-track{background:transparent}._wuContentEditorContainer_1kzbo_8::-webkit-scrollbar-thumb{background-color:var(--gray-20);border-radius:4px}._wuContentEditorContainer_1kzbo_8::-webkit-scrollbar-corner{background:transparent}._wuContentEditorContainer_1kzbo_8 :focus{outline:none}._wuContentEditorContainer_1kzbo_8 a{color:var(--blue-p);font-weight:400;text-decoration:underline}._wuContentEditorContainer_1kzbo_8 blockquote{background-color:rgb(var(--wu-blue-p)/.1);border-left:4px solid rgb(var(--wu-blue-p)/.5);border-radius:0 8px 8px 0;font-style:italic;margin:1.5rem 0;padding:1rem}._wuContentEditorContainer_1kzbo_8 code{background-color:var(--gray-20);border-radius:2px;color:var(--blue-q);font-family:JetBrains Mono,monospace;font-size:.75em;padding:4px}._wuContentEditorContainer_1kzbo_8 code:after,._wuContentEditorContainer_1kzbo_8 code:before{content:""}._wuContentEditorToolbar_1kzbo_80{align-items:center;background-color:#fff;border-color:var(--gray-10);display:flex;gap:.25rem;justify-content:start;padding:.5rem;position:sticky;z-index:10}._wuContentEditorToolbar_1kzbo_80[data-position=top]{border-width:0 0 1px;top:0}._wuContentEditorToolbar_1kzbo_80[data-position=bottom]{border-width:1px 0 0;bottom:0}._wuContentEditor_1kzbo_8{flex-grow:1;overflow:auto;padding:1rem}._wuContentEditorAction_1kzbo_107{align-items:center;border-radius:.25rem;cursor:pointer;display:flex;font-size:1.125rem;height:1.5rem;justify-content:center;line-height:1.75rem;width:1.5rem}._wuContentEditorAction_1kzbo_107:hover{background-color:rgb(var(--wu-blue-p)/.15)}._wuContentEditorAction_1kzbo_107[data-active=true]{background-color:rgb(var(--wu-blue-p)/.05);color:rgb(var(--wu-blue-p))}._wuContentEditorAction_1kzbo_107 input{height:0;width:0}._wuContentEditorDropdown_1kzbo_133{background-color:#fff;border:1px solid rgb(var(--wu-blue-p));border-radius:.25rem;display:flex}._wuContentEditorDropdown_1kzbo_133[data-inline]{gap:.25rem;padding:.25rem}._wuContentEditorDropdown_1kzbo_133[data-block]{flex-direction:column}._wuContentEditorDropdown_1kzbo_133[data-block] ._wuContentEditorDropdownItem_1kzbo_146{cursor:pointer;font-size:12px;padding:.25rem .5rem}._wuContentEditorDropdown_1kzbo_133[data-block] ._wuContentEditorDropdownItem_1kzbo_146:hover{background-color:rgb(var(--wu-blue-p)/.05)}._wuContentEditorFontSize_1kzbo_157{display:flex;gap:.25rem}._wuContentEditorFontSize_1kzbo_157 input{border-radius:.25rem;border-style:solid;border-width:1px;height:1.5rem;text-align:center;width:2.5rem}._wuContentEditorModal_1kzbo_171{border-radius:12px 12px 0 0}._wuCodeEditor_1kzbo_175{--font-size:12px;--line-height:24px;--font-family:"JetBrains Mono",monospace;min-width:-moz-fit-content;min-width:fit-content;overflow:auto;position:relative;width:100%}._wuCodeEditor_1kzbo_175 ._wuFormatCode_1kzbo_185{font-size:1rem;opacity:.5;padding:0;position:absolute;right:0;top:0;z-index:10}._wuCodeEditor_1kzbo_175 ._wuFormatCode_1kzbo_185:hover{opacity:1}._wuCodeEditorPreview_1kzbo_198{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._wuCodeEditorPreview_1kzbo_198 pre code{background:transparent;font-size:var(--font-size);line-height:var(--line-height);padding:0}._wuCodeEditorPreview_1kzbo_198 pre code span{font-family:var(--font-family)!important}._wuCodeEditorInput_1kzbo_213{background:transparent;border:none;caret-color:#000;color:transparent;font-family:var(--font-family);font-size:var(--font-size);top:0;right:0;bottom:0;left:0;line-height:var(--line-height);outline:none;overflow:hidden;position:absolute;resize:none;white-space:pre}
|