@textbus/xnote 0.0.1-alpha.6 → 0.0.1-alpha.7
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/bundles/editor.d.ts +3 -1
- package/bundles/index.css +1 -1
- package/bundles/index.esm.css +1 -1
- package/bundles/index.esm.js +45 -40
- package/bundles/index.js +45 -40
- package/package.json +9 -9
package/bundles/editor.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OutputTranslator } from '@viewfly/platform-browser';
|
|
2
|
+
import { ViewOptions } from '@textbus/platform-browser';
|
|
2
3
|
import { CollaborateConfig } from '@textbus/collaborate';
|
|
3
4
|
import { Textbus, TextbusConfig } from '@textbus/core';
|
|
4
5
|
import './assets/icons/style.css';
|
|
@@ -6,13 +7,14 @@ import './textbus/doc.scss';
|
|
|
6
7
|
export interface EditorConfig extends TextbusConfig {
|
|
7
8
|
content?: string;
|
|
8
9
|
collaborateConfig?: CollaborateConfig;
|
|
10
|
+
viewOptions?: Partial<ViewOptions>;
|
|
9
11
|
}
|
|
10
12
|
export declare class Editor extends Textbus {
|
|
11
13
|
private editorConfig;
|
|
12
14
|
translator: OutputTranslator;
|
|
13
15
|
private host;
|
|
14
16
|
private vDomAdapter;
|
|
15
|
-
constructor(editorConfig
|
|
17
|
+
constructor(editorConfig?: EditorConfig);
|
|
16
18
|
mount(host: HTMLElement): Promise<this>;
|
|
17
19
|
getHTML(): string;
|
|
18
20
|
}
|
package/bundles/index.css
CHANGED
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
Updated for @stackoverflow/stacks v0.64.0
|
|
22
22
|
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
|
|
23
23
|
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
|
|
24
|
-
*/}.xnote-source-code.stackoverflow-light pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.stackoverflow-light code.hljs{padding:3px 5px}.xnote-source-code.stackoverflow-light .hljs{background:#f6f6f6;color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-subst{color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-comment{color:#656e77}.xnote-source-code.stackoverflow-light .hljs-attr,.xnote-source-code.stackoverflow-light .hljs-doctag,.xnote-source-code.stackoverflow-light .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-meta .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-section,.xnote-source-code.stackoverflow-light .hljs-selector-tag{color:#015692}.xnote-source-code.stackoverflow-light .hljs-attribute{color:#803378}.xnote-source-code.stackoverflow-light .hljs-name,.xnote-source-code.stackoverflow-light .hljs-number,.xnote-source-code.stackoverflow-light .hljs-quote,.xnote-source-code.stackoverflow-light .hljs-selector-id,.xnote-source-code.stackoverflow-light .hljs-template-tag,.xnote-source-code.stackoverflow-light .hljs-type{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-selector-class{color:#015692}.xnote-source-code.stackoverflow-light .hljs-link,.xnote-source-code.stackoverflow-light .hljs-regexp,.xnote-source-code.stackoverflow-light .hljs-selector-attr,.xnote-source-code.stackoverflow-light .hljs-string,.xnote-source-code.stackoverflow-light .hljs-symbol,.xnote-source-code.stackoverflow-light .hljs-template-variable,.xnote-source-code.stackoverflow-light .hljs-variable{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-meta,.xnote-source-code.stackoverflow-light .hljs-selector-pseudo{color:#015692}.xnote-source-code.stackoverflow-light .hljs-built_in,.xnote-source-code.stackoverflow-light .hljs-literal,.xnote-source-code.stackoverflow-light .hljs-title{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-bullet,.xnote-source-code.stackoverflow-light .hljs-code{color:#535a60}.xnote-source-code.stackoverflow-light .hljs-meta .hljs-string{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-deletion{color:#c02d2e}.xnote-source-code.stackoverflow-light .hljs-addition{color:#2f6f44}.xnote-source-code.stackoverflow-light .hljs-emphasis{font-style:italic}.xnote-source-code.stackoverflow-light .hljs-strong{font-weight:700}.xnote-source-code.vs2015 pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.vs2015 code.hljs{padding:3px 5px}.xnote-source-code.vs2015 .hljs{background:#1e1e1e;color:#dcdcdc}.xnote-source-code.vs2015 .hljs-keyword,.xnote-source-code.vs2015 .hljs-literal,.xnote-source-code.vs2015 .hljs-name,.xnote-source-code.vs2015 .hljs-symbol{color:#569cd6}.xnote-source-code.vs2015 .hljs-link{color:#569cd6;text-decoration:underline}.xnote-source-code.vs2015 .hljs-built_in,.xnote-source-code.vs2015 .hljs-type{color:#4ec9b0}.xnote-source-code.vs2015 .hljs-class,.xnote-source-code.vs2015 .hljs-number{color:#b8d7a3}.xnote-source-code.vs2015 .hljs-meta .hljs-string,.xnote-source-code.vs2015 .hljs-string{color:#d69d85}.xnote-source-code.vs2015 .hljs-regexp,.xnote-source-code.vs2015 .hljs-template-tag{color:#9a5334}.xnote-source-code.vs2015 .hljs-formula,.xnote-source-code.vs2015 .hljs-function,.xnote-source-code.vs2015 .hljs-params,.xnote-source-code.vs2015 .hljs-subst,.xnote-source-code.vs2015 .hljs-title{color:#dcdcdc}.xnote-source-code.vs2015 .hljs-comment,.xnote-source-code.vs2015 .hljs-quote{color:#57a64a;font-style:italic}.xnote-source-code.vs2015 .hljs-doctag{color:#608b4e}.xnote-source-code.vs2015 .hljs-meta,.xnote-source-code.vs2015 .hljs-meta .hljs-keyword,.xnote-source-code.vs2015 .hljs-tag{color:#9b9b9b}.xnote-source-code.vs2015 .hljs-template-variable,.xnote-source-code.vs2015 .hljs-variable{color:#bd63c5}.xnote-source-code.vs2015 .hljs-attr,.xnote-source-code.vs2015 .hljs-attribute{color:#9cdcfe}.xnote-source-code.vs2015 .hljs-section{color:gold}.xnote-source-code.vs2015 .hljs-emphasis{font-style:italic}.xnote-source-code.vs2015 .hljs-strong{font-weight:700}.xnote-source-code.vs2015 .hljs-bullet,.xnote-source-code.vs2015 .hljs-selector-attr,.xnote-source-code.vs2015 .hljs-selector-class,.xnote-source-code.vs2015 .hljs-selector-id,.xnote-source-code.vs2015 .hljs-selector-pseudo,.xnote-source-code.vs2015 .hljs-selector-tag{color:#d7ba7d}.xnote-source-code.vs2015 .hljs-addition{background-color:#144212;display:inline-block;width:100%}.xnote-source-code.vs2015 .hljs-deletion{background-color:#600;display:inline-block;width:100%}.xnote-source-code.xcode .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.xcode .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.xcode pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.xcode code.hljs{padding:3px 5px}.xnote-source-code.xcode .hljs{background:#fff;color:#000}.xnote-source-code.xcode .xml .hljs-meta{color:silver}.xnote-source-code.xcode .hljs-comment,.xnote-source-code.xcode .hljs-quote{color:#007400}.xnote-source-code.xcode .hljs-attribute,.xnote-source-code.xcode .hljs-keyword,.xnote-source-code.xcode .hljs-literal,.xnote-source-code.xcode .hljs-name,.xnote-source-code.xcode .hljs-selector-tag,.xnote-source-code.xcode .hljs-tag{color:#aa0d91}.xnote-source-code.xcode .hljs-template-variable,.xnote-source-code.xcode .hljs-variable{color:#3f6e74}.xnote-source-code.xcode .hljs-code,.xnote-source-code.xcode .hljs-meta .hljs-string,.xnote-source-code.xcode .hljs-string{color:#c41a16}.xnote-source-code.xcode .hljs-link,.xnote-source-code.xcode .hljs-regexp{color:#0e0eff}.xnote-source-code.xcode .hljs-bullet,.xnote-source-code.xcode .hljs-number,.xnote-source-code.xcode .hljs-symbol,.xnote-source-code.xcode .hljs-title{color:#1c00cf}.xnote-source-code.xcode .hljs-meta,.xnote-source-code.xcode .hljs-section{color:#643820}.xnote-source-code.xcode .hljs-built_in,.xnote-source-code.xcode .hljs-class .hljs-title,.xnote-source-code.xcode .hljs-params,.xnote-source-code.xcode .hljs-title.class_,.xnote-source-code.xcode .hljs-type{color:#5c2699}.xnote-source-code.xcode .hljs-attr{color:#836c28}.xnote-source-code.xcode .hljs-subst{color:#000}.xnote-source-code.xcode .hljs-formula{background-color:#eee;font-style:italic}.xnote-source-code.xcode .hljs-addition{background-color:#baeeba}.xnote-source-code.xcode .hljs-deletion{background-color:#ffc8bd}.xnote-source-code.xcode .hljs-selector-class,.xnote-source-code.xcode .hljs-selector-id{color:#9b703f}.xnote-source-code.xcode .hljs-doctag,.xnote-source-code.xcode .hljs-strong{font-weight:700}.xnote-source-code.xcode .hljs-emphasis{font-style:italic}.xnote-source-code code{background:none;border:none;border-radius:0;padding:0;vertical-align:inherit}.xnote-source-code{margin-bottom:16px;margin-top:16px;position:relative}.xnote-source-code-container{border-radius:5px;display:flex;line-height:1.418em;overflow:hidden;position:relative}.xnote-source-code-container.xnote-source-code-auto-break .xnote-source-code-line{word-wrap:break-word;white-space:pre-wrap;word-break:break-all}code,kbd,pre,samp{font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace}.xnote-source-code-line-number-bg{background-color:inherit;display:none;position:relative;width:3em;z-index:2}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line-number-bg{display:block}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line{margin-left:-4em}.xnote-source-code-content{counter-reset:codeNum;flex:1;font-size:15px;max-height:450px;overflow:auto;padding:15px 0;position:relative}.xnote-source-code-content-highlight .xnote-source-code-line{opacity:.36}.xnote-source-code-line{display:flex;margin:1px 0}.xnote-source-code-line-content{display:block;padding:0 20px}.xnote-source-code-line-number .xnote-source-code-line-content{padding:0 20px 0 10px}.xnote-source-code-line-number .xnote-source-code-line:before{box-sizing:border-box;content:counter(codeNum);counter-increment:codeNum;left:0;min-width:4em;opacity:.5;overflow:hidden;padding-right:10px;position:sticky;text-align:right;transform:translateX(-4em);white-space:nowrap;z-index:2}.xnote-source-code-content-highlight .xnote-source-code-line-emphasize{opacity:1}.xnote-source-code-lang{font-size:13px;opacity:.5;padding:4px 10px;pointer-events:none;position:absolute;right:0;top:0}.xnote-paragraph p{margin:8px 0}.xnote-todolist{align-items:center;display:flex;margin:8px 0}.xnote-todolist-icon{color:#296eff;cursor:pointer;margin-right:6px}.xnote-todolist-content{min-width:2em}.xnote-todolist-content[style*=text-indent]{text-indent:0!important}.xnote-todolist-content[style*=text-align]{text-align:left!important}.xnote-blockquote{border-left:2px solid #296eff;margin:1em 0;padding:0 15px}.xnote-blockquote>:first-child{margin-top:0}.xnote-blockquote>:last-child{margin-bottom:0}.xnote-list{margin:8px 0;padding:0}.xnote-list>li{display:flex}.xnote-list-content{min-width:2em}.xnote-list-type{box-sizing:border-box;color:#296eff;text-align:left;text-indent:0;white-space:nowrap;width:24px}.xnote-order-btn{padding-left:5px}.xnote-list-content[style*=text-indent]{text-indent:0!important}.xnote-list-content[style*=text-align]{text-align:left!important}.xnote-highlight-box{background:#fcf5ce;border:1px solid #f5c774;border-radius:4px;display:flex;margin:16px 0}.xnote-highlight-box-left{padding-top:.65em;text-align:center;width:40px}.xnote-highlight-box-content{flex:1}.xnote-highlight-box-icon button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:1.4em;height:30px;padding:0;width:30px}.xnote-highlight-box-icon button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-icons{text-align:left}.xnote-highlight-box-icons button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:24px;height:30px;padding:0;width:30px}.xnote-highlight-box-icons button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-content{padding:5px}.color-type[vf-1fbbdf]{font-size:13px;padding:5px 0}.text-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.text-colors div[vf-1fbbdf]{border:1px solid #eee;border-radius:4px;box-sizing:border-box;cursor:pointer;float:left;height:22px;line-height:20px;margin:4px 3px;text-align:center;width:22px}.text-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.text-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.background-colors div[vf-1fbbdf]{border-radius:4px;color:#fff;cursor:pointer;float:left;height:22px;line-height:22px;margin:4px 3px;text-align:center;width:22px}.background-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.background-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors .no-background[vf-1fbbdf]{border:1px solid #eee;box-sizing:border-box;overflow:hidden;position:relative}.background-colors .no-background[vf-1fbbdf]:before{background:#aaa;content:"";height:1px;left:-28px;position:absolute;top:0;transform:rotate(-45deg);width:100px}.background[vf-1fbbdf]{display:inline-block;height:1em;margin-right:6px;position:relative;text-align:center;width:1em}.background>span[vf-1fbbdf]{border-radius:4px;height:20px;left:-2px;line-height:20px;position:absolute;top:-2px;width:20px}.input-group[vf-269a0b]{display:flex;padding:5px 10px}.input-group input[vf-269a0b]{border:1px solid #ddd;border-radius:4px;margin-right:5px;padding:2px 6px}.input-group input[vf-269a0b]:focus{border-color:#296eff}.input-group button[vf-269a0b]{border:1px solid #ddd;border-radius:4px;font-size:14px}.btn-group[vf-cf8e1c]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-cf8e1c]{margin:2px 5px}.xnote-image{display:inline-block}.xnote-image,.xnote-image img,.xnote-video{max-width:100%}.xnote-video{display:inline-block}.xnote-video video{max-width:100%}.left-toolbar[vf-b05292]{font-size:15px;left:-10px;position:absolute;top:0;z-index:10}.left-toolbar-btn-wrap[vf-b05292]{position:absolute;transition:all .2s}.left-toolbar-btn[vf-b05292]{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;height:26px}.left-toolbar-btn span[vf-b05292]{align-items:center;display:inline-flex}.btn-group[vf-b05292]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-b05292]{margin:2px 5px}.toolbar[vf-fee98b]{background:#fff;border:1px solid #dee0e3;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:13px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateX(-50%);transition-duration:.4s;transition-property:all;transition-timing-function:ease;z-index:3}.xnote-root{color:#1f2329}.xnote-root * ::selection{background:rgba(20,99,252,.34)}.xnote-content{font-size:16px;line-height:1.65}.xnote-content:before{content:attr(data-placeholder);opacity:.5;position:absolute}.xnote-table{margin-bottom:16px;margin-top:16px;position:relative}.xnote-table-content{border-collapse:collapse;border-spacing:0}.xnote-table-content.hide-selection * ::selection{background:none}.xnote-table-content td{border:1px solid #ddd;box-sizing:content-box;padding:0 10px}.xnote-table-container,.xnote-table-wrapper{position:relative}.xnote-table-delete-btn{background:#eee;border:none;border-radius:4px;color:#5c6370;cursor:pointer;height:30px;line-height:30px;width:24px}.xnote-table-delete-btn:hover{color:#333}.drag-line[vf-681de2]{border-color:transparent;border-style:solid;border-width:0 5px;bottom:0;box-sizing:content-box;cursor:col-resize;display:none;margin-left:-5px;position:absolute;top:0;width:2px}.drag-line[vf-681de2]:before{background:#296eff;content:"";inset:0;position:absolute}.top-bar[vf-d64cf9]{display:none;left:0;position:absolute;right:0;top:0}.top-bar.active[vf-d64cf9]{display:block}.top-delete-toolbar[vf-d64cf9]{height:0;position:relative;top:-10px}.toolbar-wrapper[vf-d64cf9]{height:60px;left:0;pointer-events:none;position:absolute;right:0;top:-60px}.insert-bar[vf-d64cf9]{box-sizing:content-box;height:30px;margin-left:-10px;margin-right:-10px;overflow:hidden;padding-left:10px;padding-right:10px;padding-top:30px}.insert-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;position:relative;table-layout:fixed;z-index:1}.insert-bar table td[vf-d64cf9]{border:1px solid transparent;box-sizing:border-box;height:18px;position:relative}.insert-bar table .tool-container[vf-d64cf9]{height:18px}.insert-bar table .tool-container>div[vf-d64cf9],.insert-bar table .tool-container>span[vf-d64cf9]{pointer-events:auto}.insert-bar table .insert-btn-wrap[vf-d64cf9]{cursor:pointer;height:21px;position:absolute;right:-11px;top:-2px;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]:after{background:inherit;content:"";height:10px;left:5.5px;position:absolute;top:12px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-d64cf9]{background:#296eff;transform:scale(1)}.action-bar[vf-d64cf9]{margin-top:-12px;overflow:hidden;pointer-events:auto;position:relative;z-index:0}.action-bar.active[vf-d64cf9]{display:block}.action-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;overflow:hidden;table-layout:fixed}.action-bar table td[vf-d64cf9]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-d64cf9]:hover{background:#dedede}.action-bar table td.active[vf-d64cf9]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-d64cf9]:before{border-color:inherit;border-style:solid;border-width:0 0 0 1px;bottom:0;content:"";left:-1px;position:absolute;top:-1px}.scroll-container[vf-b1149b]{overflow-y:auto}.scroll-container[vf-b1149b]:before{background-image:linear-gradient(90deg,rgba(0,0,0,.1),transparent);border-left:1px solid #ddd;left:0}.scroll-container[vf-b1149b]:after,.scroll-container[vf-b1149b]:before{bottom:0;content:"";pointer-events:none;position:absolute;top:0;width:12px}.scroll-container[vf-b1149b]:after{background:linear-gradient(90deg,transparent,rgba(0,0,0,.1));border-right:1px solid #ddd;right:0}.scroll-container.left-end[vf-b1149b]:before,.scroll-container.right-end[vf-b1149b]:after{display:none}.left-bar[vf-ef93c0]{display:none;left:0;margin-left:-30px;position:absolute;top:0;width:30px}.left-bar.active[vf-ef93c0]{display:flex}.toolbar-item[vf-ef93c0]{align-items:center;display:flex;inset:0;position:absolute}.insert-bar[vf-ef93c0]{width:18px}.insert-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed}.insert-bar table td[vf-ef93c0]{border:1px solid transparent;position:relative}.insert-bar table .insert-btn-wrap[vf-ef93c0]{bottom:-8px;cursor:pointer;height:21px;left:0;position:absolute;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]:after{background:inherit;content:"";height:10px;left:11px;position:absolute;top:5.5px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-ef93c0]{background:#296eff;transform:scale(1)}.action-bar[vf-ef93c0]{width:12px}.action-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed;width:13px}.action-bar table td[vf-ef93c0]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-ef93c0]:hover{background:#dedede}.action-bar table td.active[vf-ef93c0]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-ef93c0]:before{border-color:inherit;border-style:solid;border-width:1px 0 0;content:"";left:-1px;position:absolute;right:-1px;top:-1px}.drag-line[vf-d4c4a9]{background:#296eff;contain:layout size style;height:2px;left:0;max-width:100%;position:absolute;right:0;z-index:1}.mask[vf-4a5ad1]{background:rgba(41,110,255,.063);border:1px solid #296eff;box-sizing:content-box;display:none;pointer-events:none;position:absolute}.mask.active[vf-4a5ad1]{display:block}@font-face{font-display:block;font-family:textbus;font-style:normal;font-weight:400;src:url(fonts/textbus.ttf?fw0xu0) format("truetype"),url(fonts/textbus.woff?fw0xu0) format("woff"),url(fonts/textbus.svg?fw0xu0#textbus) format("svg")}[class*=" xnote-icon-"],[class^=xnote-icon-]{speak:never;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:textbus!important;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.xnote-icon-heading-h1:before{content:"\e925"}.xnote-icon-heading-h2:before{content:"\e926"}.xnote-icon-heading-h3:before{content:"\e927"}.xnote-icon-heading-h4:before{content:"\e928"}.xnote-icon-heading-h5:before{content:"\e929"}.xnote-icon-heading-h6:before{content:"\e92a"}.xnote-icon-heading:before{content:"\e92b"}.xnote-icon-more:before{content:"\e921"}.xnote-icon-text-wrap:before{content:"\e924"}.xnote-icon-checkmark:before{content:"\e922"}.xnote-icon-arrow-left:before{content:"\e900"}.xnote-icon-arrow-right:before{content:"\e901"}.xnote-icon-arrow-top:before{content:"\e902"}.xnote-icon-arrow-bottom:before{content:"\e903"}.xnote-icon-source-code:before{content:"\e904"}.xnote-icon-insert-paragraph-after:before{content:"\e905"}.xnote-icon-insert-paragraph-before:before{content:"\e906"}.xnote-icon-components:before{content:"\e907"}.xnote-icon-table-border:before{content:"\e908"}.xnote-icon-table-remove:before{content:"\e909"}.xnote-icon-device:before{content:"\e90a"}.xnote-icon-paint-bucket:before{content:"\e90b"}.xnote-icon-background-color:before{content:"\e90c"}.xnote-icon-color:before{content:"\e90d"}.xnote-icon-brush:before{content:"\e90e"}.xnote-icon-table-edit:before{content:"\e90f"}.xnote-icon-table-split-columns:before{content:"\e910"}.xnote-icon-table-delete-row-top:before{content:"\e911"}.xnote-icon-table-delete-row-bottom:before{content:"\e912"}.xnote-icon-table-delete-column-right:before{content:"\e913"}.xnote-icon-table-delete-column-left:before{content:"\e914"}.xnote-icon-table-add-row-top:before{content:"\e915"}.xnote-icon-table-add-row-bottom:before{content:"\e916"}.xnote-icon-table-add-column-right:before{content:"\e917"}.xnote-icon-table-add-column-left:before{content:"\e918"}.xnote-icon-image:before{content:"\e919"}.xnote-icon-text-indent:before{content:"\e91a"}.xnote-icon-music:before{content:"\e91b"}.xnote-icon-video:before{content:"\e91c"}.xnote-icon-unlink:before{content:"\e91d"}.xnote-icon-select:before{content:"\e91e"}.xnote-icon-tree:before{content:"\e91f"}.xnote-icon-setting:before{content:"\e920"}.xnote-icon-copy:before{content:"\e92c"}.xnote-icon-paste:before{content:"\e92d"}.xnote-icon-pushpin:before{content:"\e946"}.xnote-icon-upload:before{content:"\e961"}.xnote-icon-history-back:before{content:"\e967"}.xnote-icon-history-forward:before{content:"\e968"}.xnote-icon-quotes-right:before{content:"\e978"}.xnote-icon-loading:before{content:"\e97f"}.xnote-icon-search:before{content:"\e986"}.xnote-icon-enlarge:before{content:"\e989"}.xnote-icon-shrink:before{content:"\e98a"}.xnote-icon-bin:before{content:"\e9ac"}.xnote-icon-list-numbered:before{content:"\e9b9"}.xnote-icon-list:before{content:"\e9bb"}.xnote-icon-link:before{content:"\e9cb"}.xnote-icon-emoji:before{content:"\e9e2"}.xnote-icon-plus:before{content:"\ea0a"}.xnote-icon-command:before{content:"\ea4e"}.xnote-icon-shift:before{content:"\ea4f"}.xnote-icon-ctrl:before{content:"\ea50"}.xnote-icon-opt:before{content:"\ea51"}.xnote-icon-cut:before{content:"\ea5a"}.xnote-icon-line-height:before{content:"\ea5f"}.xnote-icon-letter-spacing:before{content:"\ea60"}.xnote-icon-font-size:before{content:"\ea61"}.xnote-icon-bold:before{content:"\ea62"}.xnote-icon-underline:before{content:"\ea63"}.xnote-icon-italic:before{content:"\ea64"}.xnote-icon-strikethrough:before{content:"\ea65"}.xnote-icon-superscript:before{content:"\ea69"}.xnote-icon-subscript:before{content:"\ea6a"}.xnote-icon-clear-formatting:before{content:"\ea6f"}.xnote-icon-table:before{content:"\ea71"}.xnote-icon-ltr:before{content:"\ea74"}.xnote-icon-rtl:before{content:"\ea75"}.xnote-icon-code:before{content:"\ea80"}.xnote-icon-terminal:before{content:"\ea81"}.xnote-icon-bullhorn:before{content:"\e923"}.xnote-icon-price-tag:before{content:"\e935"}.xnote-icon-pushpin1:before{content:"\e947"}.xnote-icon-warning:before{content:"\ea07"}.xnote-icon-notification:before{content:"\ea08"}.xnote-icon-question:before{content:"\ea09"}.xnote-icon-info:before{content:"\ea0c"}.xnote-icon-cancel-circle:before{content:"\ea0d"}.xnote-icon-blocked:before{content:"\ea0e"}.xnote-icon-checkbox-checked:before{content:"\ea52"}.xnote-icon-checkbox-unchecked:before{content:"\ea53"}.xnote-icon-pilcrow:before{content:"\ea73"}.xnote-icon-paragraph-left:before{content:"\ea77"}.xnote-icon-paragraph-center:before{content:"\ea78"}.xnote-icon-paragraph-right:before{content:"\ea79"}.xnote-icon-paragraph-justify:before{content:"\ea7a"}.xnote-icon-indent-increase:before{content:"\ea7b"}.xnote-icon-indent-decrease:before{content:"\ea7c"}.xnote-h1{font-size:2.2em;font-weight:600}.xnote-h2{font-size:1.8em;font-weight:600}.xnote-h3{font-size:1.4em;font-weight:600}.xnote-h4{font-size:1em;font-weight:600}.xnote-h5{font-size:.9em;font-weight:600}.xnote-h6{font-size:.8em;font-weight:600}.xnote-code{border:1px solid rgba(0,0,0,.2);border-radius:4px;font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace;margin:0 3px;padding:2px 3px}
|
|
24
|
+
*/}.xnote-source-code.stackoverflow-light pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.stackoverflow-light code.hljs{padding:3px 5px}.xnote-source-code.stackoverflow-light .hljs{background:#f6f6f6;color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-subst{color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-comment{color:#656e77}.xnote-source-code.stackoverflow-light .hljs-attr,.xnote-source-code.stackoverflow-light .hljs-doctag,.xnote-source-code.stackoverflow-light .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-meta .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-section,.xnote-source-code.stackoverflow-light .hljs-selector-tag{color:#015692}.xnote-source-code.stackoverflow-light .hljs-attribute{color:#803378}.xnote-source-code.stackoverflow-light .hljs-name,.xnote-source-code.stackoverflow-light .hljs-number,.xnote-source-code.stackoverflow-light .hljs-quote,.xnote-source-code.stackoverflow-light .hljs-selector-id,.xnote-source-code.stackoverflow-light .hljs-template-tag,.xnote-source-code.stackoverflow-light .hljs-type{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-selector-class{color:#015692}.xnote-source-code.stackoverflow-light .hljs-link,.xnote-source-code.stackoverflow-light .hljs-regexp,.xnote-source-code.stackoverflow-light .hljs-selector-attr,.xnote-source-code.stackoverflow-light .hljs-string,.xnote-source-code.stackoverflow-light .hljs-symbol,.xnote-source-code.stackoverflow-light .hljs-template-variable,.xnote-source-code.stackoverflow-light .hljs-variable{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-meta,.xnote-source-code.stackoverflow-light .hljs-selector-pseudo{color:#015692}.xnote-source-code.stackoverflow-light .hljs-built_in,.xnote-source-code.stackoverflow-light .hljs-literal,.xnote-source-code.stackoverflow-light .hljs-title{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-bullet,.xnote-source-code.stackoverflow-light .hljs-code{color:#535a60}.xnote-source-code.stackoverflow-light .hljs-meta .hljs-string{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-deletion{color:#c02d2e}.xnote-source-code.stackoverflow-light .hljs-addition{color:#2f6f44}.xnote-source-code.stackoverflow-light .hljs-emphasis{font-style:italic}.xnote-source-code.stackoverflow-light .hljs-strong{font-weight:700}.xnote-source-code.vs2015 pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.vs2015 code.hljs{padding:3px 5px}.xnote-source-code.vs2015 .hljs{background:#1e1e1e;color:#dcdcdc}.xnote-source-code.vs2015 .hljs-keyword,.xnote-source-code.vs2015 .hljs-literal,.xnote-source-code.vs2015 .hljs-name,.xnote-source-code.vs2015 .hljs-symbol{color:#569cd6}.xnote-source-code.vs2015 .hljs-link{color:#569cd6;text-decoration:underline}.xnote-source-code.vs2015 .hljs-built_in,.xnote-source-code.vs2015 .hljs-type{color:#4ec9b0}.xnote-source-code.vs2015 .hljs-class,.xnote-source-code.vs2015 .hljs-number{color:#b8d7a3}.xnote-source-code.vs2015 .hljs-meta .hljs-string,.xnote-source-code.vs2015 .hljs-string{color:#d69d85}.xnote-source-code.vs2015 .hljs-regexp,.xnote-source-code.vs2015 .hljs-template-tag{color:#9a5334}.xnote-source-code.vs2015 .hljs-formula,.xnote-source-code.vs2015 .hljs-function,.xnote-source-code.vs2015 .hljs-params,.xnote-source-code.vs2015 .hljs-subst,.xnote-source-code.vs2015 .hljs-title{color:#dcdcdc}.xnote-source-code.vs2015 .hljs-comment,.xnote-source-code.vs2015 .hljs-quote{color:#57a64a;font-style:italic}.xnote-source-code.vs2015 .hljs-doctag{color:#608b4e}.xnote-source-code.vs2015 .hljs-meta,.xnote-source-code.vs2015 .hljs-meta .hljs-keyword,.xnote-source-code.vs2015 .hljs-tag{color:#9b9b9b}.xnote-source-code.vs2015 .hljs-template-variable,.xnote-source-code.vs2015 .hljs-variable{color:#bd63c5}.xnote-source-code.vs2015 .hljs-attr,.xnote-source-code.vs2015 .hljs-attribute{color:#9cdcfe}.xnote-source-code.vs2015 .hljs-section{color:gold}.xnote-source-code.vs2015 .hljs-emphasis{font-style:italic}.xnote-source-code.vs2015 .hljs-strong{font-weight:700}.xnote-source-code.vs2015 .hljs-bullet,.xnote-source-code.vs2015 .hljs-selector-attr,.xnote-source-code.vs2015 .hljs-selector-class,.xnote-source-code.vs2015 .hljs-selector-id,.xnote-source-code.vs2015 .hljs-selector-pseudo,.xnote-source-code.vs2015 .hljs-selector-tag{color:#d7ba7d}.xnote-source-code.vs2015 .hljs-addition{background-color:#144212;display:inline-block;width:100%}.xnote-source-code.vs2015 .hljs-deletion{background-color:#600;display:inline-block;width:100%}.xnote-source-code.xcode .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.xcode .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.xcode pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.xcode code.hljs{padding:3px 5px}.xnote-source-code.xcode .hljs{background:#fff;color:#000}.xnote-source-code.xcode .xml .hljs-meta{color:silver}.xnote-source-code.xcode .hljs-comment,.xnote-source-code.xcode .hljs-quote{color:#007400}.xnote-source-code.xcode .hljs-attribute,.xnote-source-code.xcode .hljs-keyword,.xnote-source-code.xcode .hljs-literal,.xnote-source-code.xcode .hljs-name,.xnote-source-code.xcode .hljs-selector-tag,.xnote-source-code.xcode .hljs-tag{color:#aa0d91}.xnote-source-code.xcode .hljs-template-variable,.xnote-source-code.xcode .hljs-variable{color:#3f6e74}.xnote-source-code.xcode .hljs-code,.xnote-source-code.xcode .hljs-meta .hljs-string,.xnote-source-code.xcode .hljs-string{color:#c41a16}.xnote-source-code.xcode .hljs-link,.xnote-source-code.xcode .hljs-regexp{color:#0e0eff}.xnote-source-code.xcode .hljs-bullet,.xnote-source-code.xcode .hljs-number,.xnote-source-code.xcode .hljs-symbol,.xnote-source-code.xcode .hljs-title{color:#1c00cf}.xnote-source-code.xcode .hljs-meta,.xnote-source-code.xcode .hljs-section{color:#643820}.xnote-source-code.xcode .hljs-built_in,.xnote-source-code.xcode .hljs-class .hljs-title,.xnote-source-code.xcode .hljs-params,.xnote-source-code.xcode .hljs-title.class_,.xnote-source-code.xcode .hljs-type{color:#5c2699}.xnote-source-code.xcode .hljs-attr{color:#836c28}.xnote-source-code.xcode .hljs-subst{color:#000}.xnote-source-code.xcode .hljs-formula{background-color:#eee;font-style:italic}.xnote-source-code.xcode .hljs-addition{background-color:#baeeba}.xnote-source-code.xcode .hljs-deletion{background-color:#ffc8bd}.xnote-source-code.xcode .hljs-selector-class,.xnote-source-code.xcode .hljs-selector-id{color:#9b703f}.xnote-source-code.xcode .hljs-doctag,.xnote-source-code.xcode .hljs-strong{font-weight:700}.xnote-source-code.xcode .hljs-emphasis{font-style:italic}.xnote-source-code code{background:none;border:none;border-radius:0;padding:0;vertical-align:inherit}.xnote-source-code{margin-bottom:16px;margin-top:16px;position:relative}.xnote-source-code-container{border-radius:5px;display:flex;line-height:1.418em;overflow:hidden;position:relative}.xnote-source-code-container.xnote-source-code-auto-break .xnote-source-code-line{word-wrap:break-word;white-space:pre-wrap;word-break:break-all}code,kbd,pre,samp{font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace}.xnote-source-code-line-number-bg{background-color:inherit;display:none;position:relative;width:3em;z-index:2}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line-number-bg{display:block}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line{margin-left:-4em}.xnote-source-code-content{counter-reset:codeNum;flex:1;font-size:15px;max-height:450px;overflow:auto;padding:15px 0;position:relative}.xnote-source-code-content-highlight .xnote-source-code-line{opacity:.36}.xnote-source-code-line{display:flex;margin:1px 0}.xnote-source-code-line-content{display:block;padding:0 20px}.xnote-source-code-line-number .xnote-source-code-line-content{padding:0 20px 0 10px}.xnote-source-code-line-number .xnote-source-code-line:before{box-sizing:border-box;content:counter(codeNum);counter-increment:codeNum;left:0;min-width:4em;opacity:.5;overflow:hidden;padding-right:10px;position:sticky;text-align:right;transform:translateX(-4em);white-space:nowrap;z-index:2}.xnote-source-code-content-highlight .xnote-source-code-line-emphasize{opacity:1}.xnote-source-code-lang{font-size:13px;opacity:.5;padding:4px 10px;pointer-events:none;position:absolute;right:0;top:0}.xnote-paragraph p{margin:8px 0}.xnote-todolist{align-items:center;display:flex;margin:8px 0}.xnote-todolist-icon{color:#296eff;cursor:pointer;margin-right:6px}.xnote-todolist-content{min-width:2em}.xnote-todolist-content[style*=text-indent]{text-indent:0!important}.xnote-todolist-content[style*=text-align]{text-align:left!important}.xnote-blockquote{border-left:2px solid #296eff;margin:1em 0;padding:0 15px}.xnote-blockquote>:first-child{margin-top:0}.xnote-blockquote>:last-child{margin-bottom:0}.xnote-list{margin:8px 0;padding:0}.xnote-list>li{display:flex}.xnote-list-content{min-width:2em}ul.xnote-list .xnote-list-type{font-family:initial;font-size:16px}.xnote-list-type{box-sizing:border-box;color:#296eff;text-align:left;text-indent:0;white-space:nowrap;width:24px}.xnote-order-btn{padding-left:5px}.xnote-list-content[style*=text-indent]{text-indent:0!important}.xnote-list-content[style*=text-align]{text-align:left!important}.xnote-highlight-box{background:#fcf5ce;border:1px solid #f5c774;border-radius:4px;display:flex;margin:16px 0}.xnote-highlight-box-left{padding-top:.65em;text-align:center;width:40px}.xnote-highlight-box-content{flex:1}.xnote-highlight-box-icon button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:1.4em;height:30px;padding:0;width:30px}.xnote-highlight-box-icon button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-icons{text-align:left}.xnote-highlight-box-icons button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:24px;height:30px;padding:0;width:30px}.xnote-highlight-box-icons button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-content{padding:5px}.color-type[vf-1fbbdf]{font-size:13px;padding:5px 0}.text-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.text-colors div[vf-1fbbdf]{border:1px solid #eee;border-radius:4px;box-sizing:border-box;cursor:pointer;float:left;height:22px;line-height:20px;margin:4px 3px;text-align:center;width:22px}.text-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.text-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.background-colors div[vf-1fbbdf]{border-radius:4px;color:#fff;cursor:pointer;float:left;height:22px;line-height:22px;margin:4px 3px;text-align:center;width:22px}.background-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.background-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors .no-background[vf-1fbbdf]{border:1px solid #eee;box-sizing:border-box;overflow:hidden;position:relative}.background-colors .no-background[vf-1fbbdf]:before{background:#aaa;content:"";height:1px;left:-28px;position:absolute;top:0;transform:rotate(-45deg);width:100px}.background[vf-1fbbdf]{display:inline-block;height:1em;margin-right:6px;position:relative;text-align:center;width:1em}.background>span[vf-1fbbdf]{border-radius:4px;height:20px;left:-2px;line-height:20px;position:absolute;top:-2px;width:20px}.input-group[vf-269a0b]{display:flex;padding:5px 10px}.input-group input[vf-269a0b]{border:1px solid #ddd;border-radius:4px;margin-right:5px;padding:2px 6px}.input-group input[vf-269a0b]:focus{border-color:#296eff}.input-group button[vf-269a0b]{border:1px solid #ddd;border-radius:4px;font-size:14px}.btn-group[vf-cf8e1c]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-cf8e1c]{margin:2px 5px}.xnote-image{display:inline-block}.xnote-image,.xnote-image img,.xnote-video{max-width:100%}.xnote-video{display:inline-block}.xnote-video video{max-width:100%}.left-toolbar[vf-b05292]{font-size:15px;left:-10px;position:absolute;top:0;z-index:10}.left-toolbar-btn-wrap[vf-b05292]{position:absolute;transition:all .2s}.left-toolbar-btn[vf-b05292]{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;height:26px}.left-toolbar-btn span[vf-b05292]{align-items:center;display:inline-flex}.btn-group[vf-b05292]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-b05292]{margin:2px 5px}.toolbar[vf-fee98b]{background:#fff;border:1px solid #dee0e3;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:13px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateX(-50%);transition-duration:.4s;transition-property:all;transition-timing-function:ease;z-index:3}.xnote-root{color:#1f2329}.xnote-root * ::selection{background:rgba(20,99,252,.34)}.xnote-content{font-size:16px;line-height:1.65}.xnote-content:before{content:attr(data-placeholder);opacity:.5;position:absolute}.xnote-table{margin-bottom:16px;margin-top:16px;position:relative}.xnote-table-content{border-collapse:collapse;border-spacing:0}.xnote-table-content.hide-selection * ::selection{background:none}.xnote-table-content td{border:1px solid #ddd;box-sizing:content-box;padding:0 10px}.xnote-table-container,.xnote-table-wrapper{position:relative}.xnote-table-delete-btn{background:#eee;border:none;border-radius:4px;color:#5c6370;cursor:pointer;height:30px;line-height:30px;width:24px}.xnote-table-delete-btn:hover{color:#333}.drag-line[vf-681de2]{border-color:transparent;border-style:solid;border-width:0 5px;bottom:0;box-sizing:content-box;cursor:col-resize;display:none;margin-left:-5px;position:absolute;top:0;width:2px}.drag-line[vf-681de2]:before{background:#296eff;content:"";inset:0;position:absolute}.top-bar[vf-d64cf9]{display:none;left:0;position:absolute;right:0;top:0}.top-bar.active[vf-d64cf9]{display:block}.top-delete-toolbar[vf-d64cf9]{height:0;position:relative;top:-10px}.toolbar-wrapper[vf-d64cf9]{height:60px;left:0;pointer-events:none;position:absolute;right:0;top:-60px}.insert-bar[vf-d64cf9]{box-sizing:content-box;height:30px;margin-left:-10px;margin-right:-10px;overflow:hidden;padding-left:10px;padding-right:10px;padding-top:30px}.insert-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;position:relative;table-layout:fixed;z-index:1}.insert-bar table td[vf-d64cf9]{border:1px solid transparent;box-sizing:border-box;height:18px;position:relative}.insert-bar table .tool-container[vf-d64cf9]{height:18px}.insert-bar table .tool-container>div[vf-d64cf9],.insert-bar table .tool-container>span[vf-d64cf9]{pointer-events:auto}.insert-bar table .insert-btn-wrap[vf-d64cf9]{cursor:pointer;height:21px;position:absolute;right:-11px;top:-2px;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]:after{background:inherit;content:"";height:10px;left:5.5px;position:absolute;top:12px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-d64cf9]{background:#296eff;transform:scale(1)}.action-bar[vf-d64cf9]{margin-top:-12px;overflow:hidden;pointer-events:auto;position:relative;z-index:0}.action-bar.active[vf-d64cf9]{display:block}.action-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;overflow:hidden;table-layout:fixed}.action-bar table td[vf-d64cf9]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-d64cf9]:hover{background:#dedede}.action-bar table td.active[vf-d64cf9]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-d64cf9]:before{border-color:inherit;border-style:solid;border-width:0 0 0 1px;bottom:0;content:"";left:-1px;position:absolute;top:-1px}.scroll-container[vf-b1149b]{overflow-y:auto}.scroll-container[vf-b1149b]:before{background-image:linear-gradient(90deg,rgba(0,0,0,.1),transparent);border-left:1px solid #ddd;left:0}.scroll-container[vf-b1149b]:after,.scroll-container[vf-b1149b]:before{bottom:0;content:"";pointer-events:none;position:absolute;top:0;width:12px}.scroll-container[vf-b1149b]:after{background:linear-gradient(90deg,transparent,rgba(0,0,0,.1));border-right:1px solid #ddd;right:0}.scroll-container.left-end[vf-b1149b]:before,.scroll-container.right-end[vf-b1149b]:after{display:none}.left-bar[vf-ef93c0]{display:none;left:0;margin-left:-30px;position:absolute;top:0;width:30px}.left-bar.active[vf-ef93c0]{display:flex}.toolbar-item[vf-ef93c0]{align-items:center;display:flex;inset:0;position:absolute}.insert-bar[vf-ef93c0]{width:18px}.insert-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed}.insert-bar table td[vf-ef93c0]{border:1px solid transparent;position:relative}.insert-bar table .insert-btn-wrap[vf-ef93c0]{bottom:-8px;cursor:pointer;height:21px;left:0;position:absolute;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]:after{background:inherit;content:"";height:10px;left:11px;position:absolute;top:5.5px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-ef93c0]{background:#296eff;transform:scale(1)}.action-bar[vf-ef93c0]{width:12px}.action-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed;width:13px}.action-bar table td[vf-ef93c0]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-ef93c0]:hover{background:#dedede}.action-bar table td.active[vf-ef93c0]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-ef93c0]:before{border-color:inherit;border-style:solid;border-width:1px 0 0;content:"";left:-1px;position:absolute;right:-1px;top:-1px}.drag-line[vf-d4c4a9]{background:#296eff;contain:layout size style;height:2px;left:0;max-width:100%;position:absolute;right:0;z-index:1}.mask[vf-4a5ad1]{background:rgba(41,110,255,.063);border:1px solid #296eff;box-sizing:content-box;display:none;pointer-events:none;position:absolute}.mask.active[vf-4a5ad1]{display:block}@font-face{font-display:block;font-family:textbus;font-style:normal;font-weight:400;src:url(fonts/textbus.ttf?fw0xu0) format("truetype"),url(fonts/textbus.woff?fw0xu0) format("woff"),url(fonts/textbus.svg?fw0xu0#textbus) format("svg")}[class*=" xnote-icon-"],[class^=xnote-icon-]{speak:never;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:textbus!important;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.xnote-icon-heading-h1:before{content:"\e925"}.xnote-icon-heading-h2:before{content:"\e926"}.xnote-icon-heading-h3:before{content:"\e927"}.xnote-icon-heading-h4:before{content:"\e928"}.xnote-icon-heading-h5:before{content:"\e929"}.xnote-icon-heading-h6:before{content:"\e92a"}.xnote-icon-heading:before{content:"\e92b"}.xnote-icon-more:before{content:"\e921"}.xnote-icon-text-wrap:before{content:"\e924"}.xnote-icon-checkmark:before{content:"\e922"}.xnote-icon-arrow-left:before{content:"\e900"}.xnote-icon-arrow-right:before{content:"\e901"}.xnote-icon-arrow-top:before{content:"\e902"}.xnote-icon-arrow-bottom:before{content:"\e903"}.xnote-icon-source-code:before{content:"\e904"}.xnote-icon-insert-paragraph-after:before{content:"\e905"}.xnote-icon-insert-paragraph-before:before{content:"\e906"}.xnote-icon-components:before{content:"\e907"}.xnote-icon-table-border:before{content:"\e908"}.xnote-icon-table-remove:before{content:"\e909"}.xnote-icon-device:before{content:"\e90a"}.xnote-icon-paint-bucket:before{content:"\e90b"}.xnote-icon-background-color:before{content:"\e90c"}.xnote-icon-color:before{content:"\e90d"}.xnote-icon-brush:before{content:"\e90e"}.xnote-icon-table-edit:before{content:"\e90f"}.xnote-icon-table-split-columns:before{content:"\e910"}.xnote-icon-table-delete-row-top:before{content:"\e911"}.xnote-icon-table-delete-row-bottom:before{content:"\e912"}.xnote-icon-table-delete-column-right:before{content:"\e913"}.xnote-icon-table-delete-column-left:before{content:"\e914"}.xnote-icon-table-add-row-top:before{content:"\e915"}.xnote-icon-table-add-row-bottom:before{content:"\e916"}.xnote-icon-table-add-column-right:before{content:"\e917"}.xnote-icon-table-add-column-left:before{content:"\e918"}.xnote-icon-image:before{content:"\e919"}.xnote-icon-text-indent:before{content:"\e91a"}.xnote-icon-music:before{content:"\e91b"}.xnote-icon-video:before{content:"\e91c"}.xnote-icon-unlink:before{content:"\e91d"}.xnote-icon-select:before{content:"\e91e"}.xnote-icon-tree:before{content:"\e91f"}.xnote-icon-setting:before{content:"\e920"}.xnote-icon-copy:before{content:"\e92c"}.xnote-icon-paste:before{content:"\e92d"}.xnote-icon-pushpin:before{content:"\e946"}.xnote-icon-upload:before{content:"\e961"}.xnote-icon-history-back:before{content:"\e967"}.xnote-icon-history-forward:before{content:"\e968"}.xnote-icon-quotes-right:before{content:"\e978"}.xnote-icon-loading:before{content:"\e97f"}.xnote-icon-search:before{content:"\e986"}.xnote-icon-enlarge:before{content:"\e989"}.xnote-icon-shrink:before{content:"\e98a"}.xnote-icon-bin:before{content:"\e9ac"}.xnote-icon-list-numbered:before{content:"\e9b9"}.xnote-icon-list:before{content:"\e9bb"}.xnote-icon-link:before{content:"\e9cb"}.xnote-icon-emoji:before{content:"\e9e2"}.xnote-icon-plus:before{content:"\ea0a"}.xnote-icon-command:before{content:"\ea4e"}.xnote-icon-shift:before{content:"\ea4f"}.xnote-icon-ctrl:before{content:"\ea50"}.xnote-icon-opt:before{content:"\ea51"}.xnote-icon-cut:before{content:"\ea5a"}.xnote-icon-line-height:before{content:"\ea5f"}.xnote-icon-letter-spacing:before{content:"\ea60"}.xnote-icon-font-size:before{content:"\ea61"}.xnote-icon-bold:before{content:"\ea62"}.xnote-icon-underline:before{content:"\ea63"}.xnote-icon-italic:before{content:"\ea64"}.xnote-icon-strikethrough:before{content:"\ea65"}.xnote-icon-superscript:before{content:"\ea69"}.xnote-icon-subscript:before{content:"\ea6a"}.xnote-icon-clear-formatting:before{content:"\ea6f"}.xnote-icon-table:before{content:"\ea71"}.xnote-icon-ltr:before{content:"\ea74"}.xnote-icon-rtl:before{content:"\ea75"}.xnote-icon-code:before{content:"\ea80"}.xnote-icon-terminal:before{content:"\ea81"}.xnote-icon-bullhorn:before{content:"\e923"}.xnote-icon-price-tag:before{content:"\e935"}.xnote-icon-pushpin1:before{content:"\e947"}.xnote-icon-warning:before{content:"\ea07"}.xnote-icon-notification:before{content:"\ea08"}.xnote-icon-question:before{content:"\ea09"}.xnote-icon-info:before{content:"\ea0c"}.xnote-icon-cancel-circle:before{content:"\ea0d"}.xnote-icon-blocked:before{content:"\ea0e"}.xnote-icon-checkbox-checked:before{content:"\ea52"}.xnote-icon-checkbox-unchecked:before{content:"\ea53"}.xnote-icon-pilcrow:before{content:"\ea73"}.xnote-icon-paragraph-left:before{content:"\ea77"}.xnote-icon-paragraph-center:before{content:"\ea78"}.xnote-icon-paragraph-right:before{content:"\ea79"}.xnote-icon-paragraph-justify:before{content:"\ea7a"}.xnote-icon-indent-increase:before{content:"\ea7b"}.xnote-icon-indent-decrease:before{content:"\ea7c"}.xnote-h1{font-size:2.2em;font-weight:600}.xnote-h2{font-size:1.8em;font-weight:600}.xnote-h3{font-size:1.4em;font-weight:600}.xnote-h4{font-size:1em;font-weight:600}.xnote-h5{font-size:.9em;font-weight:600}.xnote-h6{font-size:.8em;font-weight:600}.xnote-code{border:1px solid rgba(0,0,0,.2);border-radius:4px;font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace;margin:0 3px;padding:2px 3px}
|
package/bundles/index.esm.css
CHANGED
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
Updated for @stackoverflow/stacks v0.64.0
|
|
22
22
|
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
|
|
23
23
|
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
|
|
24
|
-
*/}.xnote-source-code.stackoverflow-light pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.stackoverflow-light code.hljs{padding:3px 5px}.xnote-source-code.stackoverflow-light .hljs{background:#f6f6f6;color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-subst{color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-comment{color:#656e77}.xnote-source-code.stackoverflow-light .hljs-attr,.xnote-source-code.stackoverflow-light .hljs-doctag,.xnote-source-code.stackoverflow-light .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-meta .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-section,.xnote-source-code.stackoverflow-light .hljs-selector-tag{color:#015692}.xnote-source-code.stackoverflow-light .hljs-attribute{color:#803378}.xnote-source-code.stackoverflow-light .hljs-name,.xnote-source-code.stackoverflow-light .hljs-number,.xnote-source-code.stackoverflow-light .hljs-quote,.xnote-source-code.stackoverflow-light .hljs-selector-id,.xnote-source-code.stackoverflow-light .hljs-template-tag,.xnote-source-code.stackoverflow-light .hljs-type{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-selector-class{color:#015692}.xnote-source-code.stackoverflow-light .hljs-link,.xnote-source-code.stackoverflow-light .hljs-regexp,.xnote-source-code.stackoverflow-light .hljs-selector-attr,.xnote-source-code.stackoverflow-light .hljs-string,.xnote-source-code.stackoverflow-light .hljs-symbol,.xnote-source-code.stackoverflow-light .hljs-template-variable,.xnote-source-code.stackoverflow-light .hljs-variable{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-meta,.xnote-source-code.stackoverflow-light .hljs-selector-pseudo{color:#015692}.xnote-source-code.stackoverflow-light .hljs-built_in,.xnote-source-code.stackoverflow-light .hljs-literal,.xnote-source-code.stackoverflow-light .hljs-title{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-bullet,.xnote-source-code.stackoverflow-light .hljs-code{color:#535a60}.xnote-source-code.stackoverflow-light .hljs-meta .hljs-string{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-deletion{color:#c02d2e}.xnote-source-code.stackoverflow-light .hljs-addition{color:#2f6f44}.xnote-source-code.stackoverflow-light .hljs-emphasis{font-style:italic}.xnote-source-code.stackoverflow-light .hljs-strong{font-weight:700}.xnote-source-code.vs2015 pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.vs2015 code.hljs{padding:3px 5px}.xnote-source-code.vs2015 .hljs{background:#1e1e1e;color:#dcdcdc}.xnote-source-code.vs2015 .hljs-keyword,.xnote-source-code.vs2015 .hljs-literal,.xnote-source-code.vs2015 .hljs-name,.xnote-source-code.vs2015 .hljs-symbol{color:#569cd6}.xnote-source-code.vs2015 .hljs-link{color:#569cd6;text-decoration:underline}.xnote-source-code.vs2015 .hljs-built_in,.xnote-source-code.vs2015 .hljs-type{color:#4ec9b0}.xnote-source-code.vs2015 .hljs-class,.xnote-source-code.vs2015 .hljs-number{color:#b8d7a3}.xnote-source-code.vs2015 .hljs-meta .hljs-string,.xnote-source-code.vs2015 .hljs-string{color:#d69d85}.xnote-source-code.vs2015 .hljs-regexp,.xnote-source-code.vs2015 .hljs-template-tag{color:#9a5334}.xnote-source-code.vs2015 .hljs-formula,.xnote-source-code.vs2015 .hljs-function,.xnote-source-code.vs2015 .hljs-params,.xnote-source-code.vs2015 .hljs-subst,.xnote-source-code.vs2015 .hljs-title{color:#dcdcdc}.xnote-source-code.vs2015 .hljs-comment,.xnote-source-code.vs2015 .hljs-quote{color:#57a64a;font-style:italic}.xnote-source-code.vs2015 .hljs-doctag{color:#608b4e}.xnote-source-code.vs2015 .hljs-meta,.xnote-source-code.vs2015 .hljs-meta .hljs-keyword,.xnote-source-code.vs2015 .hljs-tag{color:#9b9b9b}.xnote-source-code.vs2015 .hljs-template-variable,.xnote-source-code.vs2015 .hljs-variable{color:#bd63c5}.xnote-source-code.vs2015 .hljs-attr,.xnote-source-code.vs2015 .hljs-attribute{color:#9cdcfe}.xnote-source-code.vs2015 .hljs-section{color:gold}.xnote-source-code.vs2015 .hljs-emphasis{font-style:italic}.xnote-source-code.vs2015 .hljs-strong{font-weight:700}.xnote-source-code.vs2015 .hljs-bullet,.xnote-source-code.vs2015 .hljs-selector-attr,.xnote-source-code.vs2015 .hljs-selector-class,.xnote-source-code.vs2015 .hljs-selector-id,.xnote-source-code.vs2015 .hljs-selector-pseudo,.xnote-source-code.vs2015 .hljs-selector-tag{color:#d7ba7d}.xnote-source-code.vs2015 .hljs-addition{background-color:#144212;display:inline-block;width:100%}.xnote-source-code.vs2015 .hljs-deletion{background-color:#600;display:inline-block;width:100%}.xnote-source-code.xcode .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.xcode .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.xcode pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.xcode code.hljs{padding:3px 5px}.xnote-source-code.xcode .hljs{background:#fff;color:#000}.xnote-source-code.xcode .xml .hljs-meta{color:silver}.xnote-source-code.xcode .hljs-comment,.xnote-source-code.xcode .hljs-quote{color:#007400}.xnote-source-code.xcode .hljs-attribute,.xnote-source-code.xcode .hljs-keyword,.xnote-source-code.xcode .hljs-literal,.xnote-source-code.xcode .hljs-name,.xnote-source-code.xcode .hljs-selector-tag,.xnote-source-code.xcode .hljs-tag{color:#aa0d91}.xnote-source-code.xcode .hljs-template-variable,.xnote-source-code.xcode .hljs-variable{color:#3f6e74}.xnote-source-code.xcode .hljs-code,.xnote-source-code.xcode .hljs-meta .hljs-string,.xnote-source-code.xcode .hljs-string{color:#c41a16}.xnote-source-code.xcode .hljs-link,.xnote-source-code.xcode .hljs-regexp{color:#0e0eff}.xnote-source-code.xcode .hljs-bullet,.xnote-source-code.xcode .hljs-number,.xnote-source-code.xcode .hljs-symbol,.xnote-source-code.xcode .hljs-title{color:#1c00cf}.xnote-source-code.xcode .hljs-meta,.xnote-source-code.xcode .hljs-section{color:#643820}.xnote-source-code.xcode .hljs-built_in,.xnote-source-code.xcode .hljs-class .hljs-title,.xnote-source-code.xcode .hljs-params,.xnote-source-code.xcode .hljs-title.class_,.xnote-source-code.xcode .hljs-type{color:#5c2699}.xnote-source-code.xcode .hljs-attr{color:#836c28}.xnote-source-code.xcode .hljs-subst{color:#000}.xnote-source-code.xcode .hljs-formula{background-color:#eee;font-style:italic}.xnote-source-code.xcode .hljs-addition{background-color:#baeeba}.xnote-source-code.xcode .hljs-deletion{background-color:#ffc8bd}.xnote-source-code.xcode .hljs-selector-class,.xnote-source-code.xcode .hljs-selector-id{color:#9b703f}.xnote-source-code.xcode .hljs-doctag,.xnote-source-code.xcode .hljs-strong{font-weight:700}.xnote-source-code.xcode .hljs-emphasis{font-style:italic}.xnote-source-code code{background:none;border:none;border-radius:0;padding:0;vertical-align:inherit}.xnote-source-code{margin-bottom:16px;margin-top:16px;position:relative}.xnote-source-code-container{border-radius:5px;display:flex;line-height:1.418em;overflow:hidden;position:relative}.xnote-source-code-container.xnote-source-code-auto-break .xnote-source-code-line{word-wrap:break-word;white-space:pre-wrap;word-break:break-all}code,kbd,pre,samp{font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace}.xnote-source-code-line-number-bg{background-color:inherit;display:none;position:relative;width:3em;z-index:2}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line-number-bg{display:block}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line{margin-left:-4em}.xnote-source-code-content{counter-reset:codeNum;flex:1;font-size:15px;max-height:450px;overflow:auto;padding:15px 0;position:relative}.xnote-source-code-content-highlight .xnote-source-code-line{opacity:.36}.xnote-source-code-line{display:flex;margin:1px 0}.xnote-source-code-line-content{display:block;padding:0 20px}.xnote-source-code-line-number .xnote-source-code-line-content{padding:0 20px 0 10px}.xnote-source-code-line-number .xnote-source-code-line:before{box-sizing:border-box;content:counter(codeNum);counter-increment:codeNum;left:0;min-width:4em;opacity:.5;overflow:hidden;padding-right:10px;position:sticky;text-align:right;transform:translateX(-4em);white-space:nowrap;z-index:2}.xnote-source-code-content-highlight .xnote-source-code-line-emphasize{opacity:1}.xnote-source-code-lang{font-size:13px;opacity:.5;padding:4px 10px;pointer-events:none;position:absolute;right:0;top:0}.xnote-paragraph p{margin:8px 0}.xnote-todolist{align-items:center;display:flex;margin:8px 0}.xnote-todolist-icon{color:#296eff;cursor:pointer;margin-right:6px}.xnote-todolist-content{min-width:2em}.xnote-todolist-content[style*=text-indent]{text-indent:0!important}.xnote-todolist-content[style*=text-align]{text-align:left!important}.xnote-blockquote{border-left:2px solid #296eff;margin:1em 0;padding:0 15px}.xnote-blockquote>:first-child{margin-top:0}.xnote-blockquote>:last-child{margin-bottom:0}.xnote-list{margin:8px 0;padding:0}.xnote-list>li{display:flex}.xnote-list-content{min-width:2em}.xnote-list-type{box-sizing:border-box;color:#296eff;text-align:left;text-indent:0;white-space:nowrap;width:24px}.xnote-order-btn{padding-left:5px}.xnote-list-content[style*=text-indent]{text-indent:0!important}.xnote-list-content[style*=text-align]{text-align:left!important}.xnote-highlight-box{background:#fcf5ce;border:1px solid #f5c774;border-radius:4px;display:flex;margin:16px 0}.xnote-highlight-box-left{padding-top:.65em;text-align:center;width:40px}.xnote-highlight-box-content{flex:1}.xnote-highlight-box-icon button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:1.4em;height:30px;padding:0;width:30px}.xnote-highlight-box-icon button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-icons{text-align:left}.xnote-highlight-box-icons button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:24px;height:30px;padding:0;width:30px}.xnote-highlight-box-icons button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-content{padding:5px}.color-type[vf-1fbbdf]{font-size:13px;padding:5px 0}.text-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.text-colors div[vf-1fbbdf]{border:1px solid #eee;border-radius:4px;box-sizing:border-box;cursor:pointer;float:left;height:22px;line-height:20px;margin:4px 3px;text-align:center;width:22px}.text-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.text-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.background-colors div[vf-1fbbdf]{border-radius:4px;color:#fff;cursor:pointer;float:left;height:22px;line-height:22px;margin:4px 3px;text-align:center;width:22px}.background-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.background-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors .no-background[vf-1fbbdf]{border:1px solid #eee;box-sizing:border-box;overflow:hidden;position:relative}.background-colors .no-background[vf-1fbbdf]:before{background:#aaa;content:"";height:1px;left:-28px;position:absolute;top:0;transform:rotate(-45deg);width:100px}.background[vf-1fbbdf]{display:inline-block;height:1em;margin-right:6px;position:relative;text-align:center;width:1em}.background>span[vf-1fbbdf]{border-radius:4px;height:20px;left:-2px;line-height:20px;position:absolute;top:-2px;width:20px}.input-group[vf-269a0b]{display:flex;padding:5px 10px}.input-group input[vf-269a0b]{border:1px solid #ddd;border-radius:4px;margin-right:5px;padding:2px 6px}.input-group input[vf-269a0b]:focus{border-color:#296eff}.input-group button[vf-269a0b]{border:1px solid #ddd;border-radius:4px;font-size:14px}.btn-group[vf-cf8e1c]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-cf8e1c]{margin:2px 5px}.xnote-image{display:inline-block}.xnote-image,.xnote-image img,.xnote-video{max-width:100%}.xnote-video{display:inline-block}.xnote-video video{max-width:100%}.left-toolbar[vf-b05292]{font-size:15px;left:-10px;position:absolute;top:0;z-index:10}.left-toolbar-btn-wrap[vf-b05292]{position:absolute;transition:all .2s}.left-toolbar-btn[vf-b05292]{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;height:26px}.left-toolbar-btn span[vf-b05292]{align-items:center;display:inline-flex}.btn-group[vf-b05292]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-b05292]{margin:2px 5px}.toolbar[vf-fee98b]{background:#fff;border:1px solid #dee0e3;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:13px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateX(-50%);transition-duration:.4s;transition-property:all;transition-timing-function:ease;z-index:3}.xnote-root{color:#1f2329}.xnote-root * ::selection{background:rgba(20,99,252,.34)}.xnote-content{font-size:16px;line-height:1.65}.xnote-content:before{content:attr(data-placeholder);opacity:.5;position:absolute}.xnote-table{margin-bottom:16px;margin-top:16px;position:relative}.xnote-table-content{border-collapse:collapse;border-spacing:0}.xnote-table-content.hide-selection * ::selection{background:none}.xnote-table-content td{border:1px solid #ddd;box-sizing:content-box;padding:0 10px}.xnote-table-container,.xnote-table-wrapper{position:relative}.xnote-table-delete-btn{background:#eee;border:none;border-radius:4px;color:#5c6370;cursor:pointer;height:30px;line-height:30px;width:24px}.xnote-table-delete-btn:hover{color:#333}.drag-line[vf-681de2]{border-color:transparent;border-style:solid;border-width:0 5px;bottom:0;box-sizing:content-box;cursor:col-resize;display:none;margin-left:-5px;position:absolute;top:0;width:2px}.drag-line[vf-681de2]:before{background:#296eff;content:"";inset:0;position:absolute}.top-bar[vf-d64cf9]{display:none;left:0;position:absolute;right:0;top:0}.top-bar.active[vf-d64cf9]{display:block}.top-delete-toolbar[vf-d64cf9]{height:0;position:relative;top:-10px}.toolbar-wrapper[vf-d64cf9]{height:60px;left:0;pointer-events:none;position:absolute;right:0;top:-60px}.insert-bar[vf-d64cf9]{box-sizing:content-box;height:30px;margin-left:-10px;margin-right:-10px;overflow:hidden;padding-left:10px;padding-right:10px;padding-top:30px}.insert-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;position:relative;table-layout:fixed;z-index:1}.insert-bar table td[vf-d64cf9]{border:1px solid transparent;box-sizing:border-box;height:18px;position:relative}.insert-bar table .tool-container[vf-d64cf9]{height:18px}.insert-bar table .tool-container>div[vf-d64cf9],.insert-bar table .tool-container>span[vf-d64cf9]{pointer-events:auto}.insert-bar table .insert-btn-wrap[vf-d64cf9]{cursor:pointer;height:21px;position:absolute;right:-11px;top:-2px;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]:after{background:inherit;content:"";height:10px;left:5.5px;position:absolute;top:12px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-d64cf9]{background:#296eff;transform:scale(1)}.action-bar[vf-d64cf9]{margin-top:-12px;overflow:hidden;pointer-events:auto;position:relative;z-index:0}.action-bar.active[vf-d64cf9]{display:block}.action-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;overflow:hidden;table-layout:fixed}.action-bar table td[vf-d64cf9]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-d64cf9]:hover{background:#dedede}.action-bar table td.active[vf-d64cf9]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-d64cf9]:before{border-color:inherit;border-style:solid;border-width:0 0 0 1px;bottom:0;content:"";left:-1px;position:absolute;top:-1px}.scroll-container[vf-b1149b]{overflow-y:auto}.scroll-container[vf-b1149b]:before{background-image:linear-gradient(90deg,rgba(0,0,0,.1),transparent);border-left:1px solid #ddd;left:0}.scroll-container[vf-b1149b]:after,.scroll-container[vf-b1149b]:before{bottom:0;content:"";pointer-events:none;position:absolute;top:0;width:12px}.scroll-container[vf-b1149b]:after{background:linear-gradient(90deg,transparent,rgba(0,0,0,.1));border-right:1px solid #ddd;right:0}.scroll-container.left-end[vf-b1149b]:before,.scroll-container.right-end[vf-b1149b]:after{display:none}.left-bar[vf-ef93c0]{display:none;left:0;margin-left:-30px;position:absolute;top:0;width:30px}.left-bar.active[vf-ef93c0]{display:flex}.toolbar-item[vf-ef93c0]{align-items:center;display:flex;inset:0;position:absolute}.insert-bar[vf-ef93c0]{width:18px}.insert-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed}.insert-bar table td[vf-ef93c0]{border:1px solid transparent;position:relative}.insert-bar table .insert-btn-wrap[vf-ef93c0]{bottom:-8px;cursor:pointer;height:21px;left:0;position:absolute;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]:after{background:inherit;content:"";height:10px;left:11px;position:absolute;top:5.5px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-ef93c0]{background:#296eff;transform:scale(1)}.action-bar[vf-ef93c0]{width:12px}.action-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed;width:13px}.action-bar table td[vf-ef93c0]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-ef93c0]:hover{background:#dedede}.action-bar table td.active[vf-ef93c0]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-ef93c0]:before{border-color:inherit;border-style:solid;border-width:1px 0 0;content:"";left:-1px;position:absolute;right:-1px;top:-1px}.drag-line[vf-d4c4a9]{background:#296eff;contain:layout size style;height:2px;left:0;max-width:100%;position:absolute;right:0;z-index:1}.mask[vf-4a5ad1]{background:rgba(41,110,255,.063);border:1px solid #296eff;box-sizing:content-box;display:none;pointer-events:none;position:absolute}.mask.active[vf-4a5ad1]{display:block}@font-face{font-display:block;font-family:textbus;font-style:normal;font-weight:400;src:url(fonts/textbus.ttf?fw0xu0) format("truetype"),url(fonts/textbus.woff?fw0xu0) format("woff"),url(fonts/textbus.svg?fw0xu0#textbus) format("svg")}[class*=" xnote-icon-"],[class^=xnote-icon-]{speak:never;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:textbus!important;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.xnote-icon-heading-h1:before{content:"\e925"}.xnote-icon-heading-h2:before{content:"\e926"}.xnote-icon-heading-h3:before{content:"\e927"}.xnote-icon-heading-h4:before{content:"\e928"}.xnote-icon-heading-h5:before{content:"\e929"}.xnote-icon-heading-h6:before{content:"\e92a"}.xnote-icon-heading:before{content:"\e92b"}.xnote-icon-more:before{content:"\e921"}.xnote-icon-text-wrap:before{content:"\e924"}.xnote-icon-checkmark:before{content:"\e922"}.xnote-icon-arrow-left:before{content:"\e900"}.xnote-icon-arrow-right:before{content:"\e901"}.xnote-icon-arrow-top:before{content:"\e902"}.xnote-icon-arrow-bottom:before{content:"\e903"}.xnote-icon-source-code:before{content:"\e904"}.xnote-icon-insert-paragraph-after:before{content:"\e905"}.xnote-icon-insert-paragraph-before:before{content:"\e906"}.xnote-icon-components:before{content:"\e907"}.xnote-icon-table-border:before{content:"\e908"}.xnote-icon-table-remove:before{content:"\e909"}.xnote-icon-device:before{content:"\e90a"}.xnote-icon-paint-bucket:before{content:"\e90b"}.xnote-icon-background-color:before{content:"\e90c"}.xnote-icon-color:before{content:"\e90d"}.xnote-icon-brush:before{content:"\e90e"}.xnote-icon-table-edit:before{content:"\e90f"}.xnote-icon-table-split-columns:before{content:"\e910"}.xnote-icon-table-delete-row-top:before{content:"\e911"}.xnote-icon-table-delete-row-bottom:before{content:"\e912"}.xnote-icon-table-delete-column-right:before{content:"\e913"}.xnote-icon-table-delete-column-left:before{content:"\e914"}.xnote-icon-table-add-row-top:before{content:"\e915"}.xnote-icon-table-add-row-bottom:before{content:"\e916"}.xnote-icon-table-add-column-right:before{content:"\e917"}.xnote-icon-table-add-column-left:before{content:"\e918"}.xnote-icon-image:before{content:"\e919"}.xnote-icon-text-indent:before{content:"\e91a"}.xnote-icon-music:before{content:"\e91b"}.xnote-icon-video:before{content:"\e91c"}.xnote-icon-unlink:before{content:"\e91d"}.xnote-icon-select:before{content:"\e91e"}.xnote-icon-tree:before{content:"\e91f"}.xnote-icon-setting:before{content:"\e920"}.xnote-icon-copy:before{content:"\e92c"}.xnote-icon-paste:before{content:"\e92d"}.xnote-icon-pushpin:before{content:"\e946"}.xnote-icon-upload:before{content:"\e961"}.xnote-icon-history-back:before{content:"\e967"}.xnote-icon-history-forward:before{content:"\e968"}.xnote-icon-quotes-right:before{content:"\e978"}.xnote-icon-loading:before{content:"\e97f"}.xnote-icon-search:before{content:"\e986"}.xnote-icon-enlarge:before{content:"\e989"}.xnote-icon-shrink:before{content:"\e98a"}.xnote-icon-bin:before{content:"\e9ac"}.xnote-icon-list-numbered:before{content:"\e9b9"}.xnote-icon-list:before{content:"\e9bb"}.xnote-icon-link:before{content:"\e9cb"}.xnote-icon-emoji:before{content:"\e9e2"}.xnote-icon-plus:before{content:"\ea0a"}.xnote-icon-command:before{content:"\ea4e"}.xnote-icon-shift:before{content:"\ea4f"}.xnote-icon-ctrl:before{content:"\ea50"}.xnote-icon-opt:before{content:"\ea51"}.xnote-icon-cut:before{content:"\ea5a"}.xnote-icon-line-height:before{content:"\ea5f"}.xnote-icon-letter-spacing:before{content:"\ea60"}.xnote-icon-font-size:before{content:"\ea61"}.xnote-icon-bold:before{content:"\ea62"}.xnote-icon-underline:before{content:"\ea63"}.xnote-icon-italic:before{content:"\ea64"}.xnote-icon-strikethrough:before{content:"\ea65"}.xnote-icon-superscript:before{content:"\ea69"}.xnote-icon-subscript:before{content:"\ea6a"}.xnote-icon-clear-formatting:before{content:"\ea6f"}.xnote-icon-table:before{content:"\ea71"}.xnote-icon-ltr:before{content:"\ea74"}.xnote-icon-rtl:before{content:"\ea75"}.xnote-icon-code:before{content:"\ea80"}.xnote-icon-terminal:before{content:"\ea81"}.xnote-icon-bullhorn:before{content:"\e923"}.xnote-icon-price-tag:before{content:"\e935"}.xnote-icon-pushpin1:before{content:"\e947"}.xnote-icon-warning:before{content:"\ea07"}.xnote-icon-notification:before{content:"\ea08"}.xnote-icon-question:before{content:"\ea09"}.xnote-icon-info:before{content:"\ea0c"}.xnote-icon-cancel-circle:before{content:"\ea0d"}.xnote-icon-blocked:before{content:"\ea0e"}.xnote-icon-checkbox-checked:before{content:"\ea52"}.xnote-icon-checkbox-unchecked:before{content:"\ea53"}.xnote-icon-pilcrow:before{content:"\ea73"}.xnote-icon-paragraph-left:before{content:"\ea77"}.xnote-icon-paragraph-center:before{content:"\ea78"}.xnote-icon-paragraph-right:before{content:"\ea79"}.xnote-icon-paragraph-justify:before{content:"\ea7a"}.xnote-icon-indent-increase:before{content:"\ea7b"}.xnote-icon-indent-decrease:before{content:"\ea7c"}.xnote-h1{font-size:2.2em;font-weight:600}.xnote-h2{font-size:1.8em;font-weight:600}.xnote-h3{font-size:1.4em;font-weight:600}.xnote-h4{font-size:1em;font-weight:600}.xnote-h5{font-size:.9em;font-weight:600}.xnote-h6{font-size:.8em;font-weight:600}.xnote-code{border:1px solid rgba(0,0,0,.2);border-radius:4px;font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace;margin:0 3px;padding:2px 3px}
|
|
24
|
+
*/}.xnote-source-code.stackoverflow-light pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.stackoverflow-light code.hljs{padding:3px 5px}.xnote-source-code.stackoverflow-light .hljs{background:#f6f6f6;color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-subst{color:#2f3337}.xnote-source-code.stackoverflow-light .hljs-comment{color:#656e77}.xnote-source-code.stackoverflow-light .hljs-attr,.xnote-source-code.stackoverflow-light .hljs-doctag,.xnote-source-code.stackoverflow-light .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-meta .hljs-keyword,.xnote-source-code.stackoverflow-light .hljs-section,.xnote-source-code.stackoverflow-light .hljs-selector-tag{color:#015692}.xnote-source-code.stackoverflow-light .hljs-attribute{color:#803378}.xnote-source-code.stackoverflow-light .hljs-name,.xnote-source-code.stackoverflow-light .hljs-number,.xnote-source-code.stackoverflow-light .hljs-quote,.xnote-source-code.stackoverflow-light .hljs-selector-id,.xnote-source-code.stackoverflow-light .hljs-template-tag,.xnote-source-code.stackoverflow-light .hljs-type{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-selector-class{color:#015692}.xnote-source-code.stackoverflow-light .hljs-link,.xnote-source-code.stackoverflow-light .hljs-regexp,.xnote-source-code.stackoverflow-light .hljs-selector-attr,.xnote-source-code.stackoverflow-light .hljs-string,.xnote-source-code.stackoverflow-light .hljs-symbol,.xnote-source-code.stackoverflow-light .hljs-template-variable,.xnote-source-code.stackoverflow-light .hljs-variable{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-meta,.xnote-source-code.stackoverflow-light .hljs-selector-pseudo{color:#015692}.xnote-source-code.stackoverflow-light .hljs-built_in,.xnote-source-code.stackoverflow-light .hljs-literal,.xnote-source-code.stackoverflow-light .hljs-title{color:#b75501}.xnote-source-code.stackoverflow-light .hljs-bullet,.xnote-source-code.stackoverflow-light .hljs-code{color:#535a60}.xnote-source-code.stackoverflow-light .hljs-meta .hljs-string{color:#54790d}.xnote-source-code.stackoverflow-light .hljs-deletion{color:#c02d2e}.xnote-source-code.stackoverflow-light .hljs-addition{color:#2f6f44}.xnote-source-code.stackoverflow-light .hljs-emphasis{font-style:italic}.xnote-source-code.stackoverflow-light .hljs-strong{font-weight:700}.xnote-source-code.vs2015 pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.vs2015 code.hljs{padding:3px 5px}.xnote-source-code.vs2015 .hljs{background:#1e1e1e;color:#dcdcdc}.xnote-source-code.vs2015 .hljs-keyword,.xnote-source-code.vs2015 .hljs-literal,.xnote-source-code.vs2015 .hljs-name,.xnote-source-code.vs2015 .hljs-symbol{color:#569cd6}.xnote-source-code.vs2015 .hljs-link{color:#569cd6;text-decoration:underline}.xnote-source-code.vs2015 .hljs-built_in,.xnote-source-code.vs2015 .hljs-type{color:#4ec9b0}.xnote-source-code.vs2015 .hljs-class,.xnote-source-code.vs2015 .hljs-number{color:#b8d7a3}.xnote-source-code.vs2015 .hljs-meta .hljs-string,.xnote-source-code.vs2015 .hljs-string{color:#d69d85}.xnote-source-code.vs2015 .hljs-regexp,.xnote-source-code.vs2015 .hljs-template-tag{color:#9a5334}.xnote-source-code.vs2015 .hljs-formula,.xnote-source-code.vs2015 .hljs-function,.xnote-source-code.vs2015 .hljs-params,.xnote-source-code.vs2015 .hljs-subst,.xnote-source-code.vs2015 .hljs-title{color:#dcdcdc}.xnote-source-code.vs2015 .hljs-comment,.xnote-source-code.vs2015 .hljs-quote{color:#57a64a;font-style:italic}.xnote-source-code.vs2015 .hljs-doctag{color:#608b4e}.xnote-source-code.vs2015 .hljs-meta,.xnote-source-code.vs2015 .hljs-meta .hljs-keyword,.xnote-source-code.vs2015 .hljs-tag{color:#9b9b9b}.xnote-source-code.vs2015 .hljs-template-variable,.xnote-source-code.vs2015 .hljs-variable{color:#bd63c5}.xnote-source-code.vs2015 .hljs-attr,.xnote-source-code.vs2015 .hljs-attribute{color:#9cdcfe}.xnote-source-code.vs2015 .hljs-section{color:gold}.xnote-source-code.vs2015 .hljs-emphasis{font-style:italic}.xnote-source-code.vs2015 .hljs-strong{font-weight:700}.xnote-source-code.vs2015 .hljs-bullet,.xnote-source-code.vs2015 .hljs-selector-attr,.xnote-source-code.vs2015 .hljs-selector-class,.xnote-source-code.vs2015 .hljs-selector-id,.xnote-source-code.vs2015 .hljs-selector-pseudo,.xnote-source-code.vs2015 .hljs-selector-tag{color:#d7ba7d}.xnote-source-code.vs2015 .hljs-addition{background-color:#144212;display:inline-block;width:100%}.xnote-source-code.vs2015 .hljs-deletion{background-color:#600;display:inline-block;width:100%}.xnote-source-code.xcode .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.xcode .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.xcode pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.xcode code.hljs{padding:3px 5px}.xnote-source-code.xcode .hljs{background:#fff;color:#000}.xnote-source-code.xcode .xml .hljs-meta{color:silver}.xnote-source-code.xcode .hljs-comment,.xnote-source-code.xcode .hljs-quote{color:#007400}.xnote-source-code.xcode .hljs-attribute,.xnote-source-code.xcode .hljs-keyword,.xnote-source-code.xcode .hljs-literal,.xnote-source-code.xcode .hljs-name,.xnote-source-code.xcode .hljs-selector-tag,.xnote-source-code.xcode .hljs-tag{color:#aa0d91}.xnote-source-code.xcode .hljs-template-variable,.xnote-source-code.xcode .hljs-variable{color:#3f6e74}.xnote-source-code.xcode .hljs-code,.xnote-source-code.xcode .hljs-meta .hljs-string,.xnote-source-code.xcode .hljs-string{color:#c41a16}.xnote-source-code.xcode .hljs-link,.xnote-source-code.xcode .hljs-regexp{color:#0e0eff}.xnote-source-code.xcode .hljs-bullet,.xnote-source-code.xcode .hljs-number,.xnote-source-code.xcode .hljs-symbol,.xnote-source-code.xcode .hljs-title{color:#1c00cf}.xnote-source-code.xcode .hljs-meta,.xnote-source-code.xcode .hljs-section{color:#643820}.xnote-source-code.xcode .hljs-built_in,.xnote-source-code.xcode .hljs-class .hljs-title,.xnote-source-code.xcode .hljs-params,.xnote-source-code.xcode .hljs-title.class_,.xnote-source-code.xcode .hljs-type{color:#5c2699}.xnote-source-code.xcode .hljs-attr{color:#836c28}.xnote-source-code.xcode .hljs-subst{color:#000}.xnote-source-code.xcode .hljs-formula{background-color:#eee;font-style:italic}.xnote-source-code.xcode .hljs-addition{background-color:#baeeba}.xnote-source-code.xcode .hljs-deletion{background-color:#ffc8bd}.xnote-source-code.xcode .hljs-selector-class,.xnote-source-code.xcode .hljs-selector-id{color:#9b703f}.xnote-source-code.xcode .hljs-doctag,.xnote-source-code.xcode .hljs-strong{font-weight:700}.xnote-source-code.xcode .hljs-emphasis{font-style:italic}.xnote-source-code code{background:none;border:none;border-radius:0;padding:0;vertical-align:inherit}.xnote-source-code{margin-bottom:16px;margin-top:16px;position:relative}.xnote-source-code-container{border-radius:5px;display:flex;line-height:1.418em;overflow:hidden;position:relative}.xnote-source-code-container.xnote-source-code-auto-break .xnote-source-code-line{word-wrap:break-word;white-space:pre-wrap;word-break:break-all}code,kbd,pre,samp{font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace}.xnote-source-code-line-number-bg{background-color:inherit;display:none;position:relative;width:3em;z-index:2}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line-number-bg{display:block}.xnote-source-code.xnote-source-code-line-number .xnote-source-code-line{margin-left:-4em}.xnote-source-code-content{counter-reset:codeNum;flex:1;font-size:15px;max-height:450px;overflow:auto;padding:15px 0;position:relative}.xnote-source-code-content-highlight .xnote-source-code-line{opacity:.36}.xnote-source-code-line{display:flex;margin:1px 0}.xnote-source-code-line-content{display:block;padding:0 20px}.xnote-source-code-line-number .xnote-source-code-line-content{padding:0 20px 0 10px}.xnote-source-code-line-number .xnote-source-code-line:before{box-sizing:border-box;content:counter(codeNum);counter-increment:codeNum;left:0;min-width:4em;opacity:.5;overflow:hidden;padding-right:10px;position:sticky;text-align:right;transform:translateX(-4em);white-space:nowrap;z-index:2}.xnote-source-code-content-highlight .xnote-source-code-line-emphasize{opacity:1}.xnote-source-code-lang{font-size:13px;opacity:.5;padding:4px 10px;pointer-events:none;position:absolute;right:0;top:0}.xnote-paragraph p{margin:8px 0}.xnote-todolist{align-items:center;display:flex;margin:8px 0}.xnote-todolist-icon{color:#296eff;cursor:pointer;margin-right:6px}.xnote-todolist-content{min-width:2em}.xnote-todolist-content[style*=text-indent]{text-indent:0!important}.xnote-todolist-content[style*=text-align]{text-align:left!important}.xnote-blockquote{border-left:2px solid #296eff;margin:1em 0;padding:0 15px}.xnote-blockquote>:first-child{margin-top:0}.xnote-blockquote>:last-child{margin-bottom:0}.xnote-list{margin:8px 0;padding:0}.xnote-list>li{display:flex}.xnote-list-content{min-width:2em}ul.xnote-list .xnote-list-type{font-family:initial;font-size:16px}.xnote-list-type{box-sizing:border-box;color:#296eff;text-align:left;text-indent:0;white-space:nowrap;width:24px}.xnote-order-btn{padding-left:5px}.xnote-list-content[style*=text-indent]{text-indent:0!important}.xnote-list-content[style*=text-align]{text-align:left!important}.xnote-highlight-box{background:#fcf5ce;border:1px solid #f5c774;border-radius:4px;display:flex;margin:16px 0}.xnote-highlight-box-left{padding-top:.65em;text-align:center;width:40px}.xnote-highlight-box-content{flex:1}.xnote-highlight-box-icon button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:1.4em;height:30px;padding:0;width:30px}.xnote-highlight-box-icon button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-icons{text-align:left}.xnote-highlight-box-icons button{background:none;border:none;border-radius:4px;cursor:pointer;font-size:24px;height:30px;padding:0;width:30px}.xnote-highlight-box-icons button:hover{background:rgba(0,0,0,.1)}.xnote-highlight-box-content{padding:5px}.color-type[vf-1fbbdf]{font-size:13px;padding:5px 0}.text-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.text-colors div[vf-1fbbdf]{border:1px solid #eee;border-radius:4px;box-sizing:border-box;cursor:pointer;float:left;height:22px;line-height:20px;margin:4px 3px;text-align:center;width:22px}.text-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.text-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors[vf-1fbbdf]{font-size:14px;overflow:hidden}.background-colors div[vf-1fbbdf]{border-radius:4px;color:#fff;cursor:pointer;float:left;height:22px;line-height:22px;margin:4px 3px;text-align:center;width:22px}.background-colors div.active[vf-1fbbdf]{box-shadow:0 0 0 2px #296eff}.background-colors div[vf-1fbbdf]:hover{box-shadow:0 0 0 2px rgba(41,110,255,.188)}.background-colors .no-background[vf-1fbbdf]{border:1px solid #eee;box-sizing:border-box;overflow:hidden;position:relative}.background-colors .no-background[vf-1fbbdf]:before{background:#aaa;content:"";height:1px;left:-28px;position:absolute;top:0;transform:rotate(-45deg);width:100px}.background[vf-1fbbdf]{display:inline-block;height:1em;margin-right:6px;position:relative;text-align:center;width:1em}.background>span[vf-1fbbdf]{border-radius:4px;height:20px;left:-2px;line-height:20px;position:absolute;top:-2px;width:20px}.input-group[vf-269a0b]{display:flex;padding:5px 10px}.input-group input[vf-269a0b]{border:1px solid #ddd;border-radius:4px;margin-right:5px;padding:2px 6px}.input-group input[vf-269a0b]:focus{border-color:#296eff}.input-group button[vf-269a0b]{border:1px solid #ddd;border-radius:4px;font-size:14px}.btn-group[vf-cf8e1c]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-cf8e1c]{margin:2px 5px}.xnote-image{display:inline-block}.xnote-image,.xnote-image img,.xnote-video{max-width:100%}.xnote-video{display:inline-block}.xnote-video video{max-width:100%}.left-toolbar[vf-b05292]{font-size:15px;left:-10px;position:absolute;top:0;z-index:10}.left-toolbar-btn-wrap[vf-b05292]{position:absolute;transition:all .2s}.left-toolbar-btn[vf-b05292]{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;height:26px}.left-toolbar-btn span[vf-b05292]{align-items:center;display:inline-flex}.btn-group[vf-b05292]{font-size:15px;padding:5px 0;text-align:center}.btn-group button[vf-b05292]{margin:2px 5px}.toolbar[vf-fee98b]{background:#fff;border:1px solid #dee0e3;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:13px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateX(-50%);transition-duration:.4s;transition-property:all;transition-timing-function:ease;z-index:3}.xnote-root{color:#1f2329}.xnote-root * ::selection{background:rgba(20,99,252,.34)}.xnote-content{font-size:16px;line-height:1.65}.xnote-content:before{content:attr(data-placeholder);opacity:.5;position:absolute}.xnote-table{margin-bottom:16px;margin-top:16px;position:relative}.xnote-table-content{border-collapse:collapse;border-spacing:0}.xnote-table-content.hide-selection * ::selection{background:none}.xnote-table-content td{border:1px solid #ddd;box-sizing:content-box;padding:0 10px}.xnote-table-container,.xnote-table-wrapper{position:relative}.xnote-table-delete-btn{background:#eee;border:none;border-radius:4px;color:#5c6370;cursor:pointer;height:30px;line-height:30px;width:24px}.xnote-table-delete-btn:hover{color:#333}.drag-line[vf-681de2]{border-color:transparent;border-style:solid;border-width:0 5px;bottom:0;box-sizing:content-box;cursor:col-resize;display:none;margin-left:-5px;position:absolute;top:0;width:2px}.drag-line[vf-681de2]:before{background:#296eff;content:"";inset:0;position:absolute}.top-bar[vf-d64cf9]{display:none;left:0;position:absolute;right:0;top:0}.top-bar.active[vf-d64cf9]{display:block}.top-delete-toolbar[vf-d64cf9]{height:0;position:relative;top:-10px}.toolbar-wrapper[vf-d64cf9]{height:60px;left:0;pointer-events:none;position:absolute;right:0;top:-60px}.insert-bar[vf-d64cf9]{box-sizing:content-box;height:30px;margin-left:-10px;margin-right:-10px;overflow:hidden;padding-left:10px;padding-right:10px;padding-top:30px}.insert-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;position:relative;table-layout:fixed;z-index:1}.insert-bar table td[vf-d64cf9]{border:1px solid transparent;box-sizing:border-box;height:18px;position:relative}.insert-bar table .tool-container[vf-d64cf9]{height:18px}.insert-bar table .tool-container>div[vf-d64cf9],.insert-bar table .tool-container>span[vf-d64cf9]{pointer-events:auto}.insert-bar table .insert-btn-wrap[vf-d64cf9]{cursor:pointer;height:21px;position:absolute;right:-11px;top:-2px;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-d64cf9]:after{background:inherit;content:"";height:10px;left:5.5px;position:absolute;top:12px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-d64cf9]{background:#296eff;transform:scale(1)}.action-bar[vf-d64cf9]{margin-top:-12px;overflow:hidden;pointer-events:auto;position:relative;z-index:0}.action-bar.active[vf-d64cf9]{display:block}.action-bar table[vf-d64cf9]{border-collapse:collapse;border-spacing:0;overflow:hidden;table-layout:fixed}.action-bar table td[vf-d64cf9]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-d64cf9]:hover{background:#dedede}.action-bar table td.active[vf-d64cf9]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-d64cf9]:before{border-color:inherit;border-style:solid;border-width:0 0 0 1px;bottom:0;content:"";left:-1px;position:absolute;top:-1px}.scroll-container[vf-b1149b]{overflow-y:auto}.scroll-container[vf-b1149b]:before{background-image:linear-gradient(90deg,rgba(0,0,0,.1),transparent);border-left:1px solid #ddd;left:0}.scroll-container[vf-b1149b]:after,.scroll-container[vf-b1149b]:before{bottom:0;content:"";pointer-events:none;position:absolute;top:0;width:12px}.scroll-container[vf-b1149b]:after{background:linear-gradient(90deg,transparent,rgba(0,0,0,.1));border-right:1px solid #ddd;right:0}.scroll-container.left-end[vf-b1149b]:before,.scroll-container.right-end[vf-b1149b]:after{display:none}.left-bar[vf-ef93c0]{display:none;left:0;margin-left:-30px;position:absolute;top:0;width:30px}.left-bar.active[vf-ef93c0]{display:flex}.toolbar-item[vf-ef93c0]{align-items:center;display:flex;inset:0;position:absolute}.insert-bar[vf-ef93c0]{width:18px}.insert-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed}.insert-bar table td[vf-ef93c0]{border:1px solid transparent;position:relative}.insert-bar table .insert-btn-wrap[vf-ef93c0]{bottom:-8px;cursor:pointer;height:21px;left:0;position:absolute;width:21px;z-index:1}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]{background:#ccc;border:none;border-radius:50%;box-shadow:none;color:#fff;cursor:inherit;font-size:16px;height:100%;line-height:20px;padding:0;position:relative;text-align:center;transform:scale(.2);transition:transform .15s;width:100%}.insert-bar table .insert-btn-wrap .insert-btn[vf-ef93c0]:after{background:inherit;content:"";height:10px;left:11px;position:absolute;top:5.5px;transform:rotate(45deg);width:10px;z-index:-1}.insert-bar table .insert-btn-wrap:hover .insert-btn[vf-ef93c0]{background:#296eff;transform:scale(1)}.action-bar[vf-ef93c0]{width:12px}.action-bar table[vf-ef93c0]{border-collapse:collapse;border-spacing:0;table-layout:fixed;width:13px}.action-bar table td[vf-ef93c0]{background:#eee;border:1px solid #ddd;box-sizing:border-box;cursor:pointer;height:12px;position:relative}.action-bar table td[vf-ef93c0]:hover{background:#dedede}.action-bar table td.active[vf-ef93c0]{background:#296eff;border-color:#2358c9}.action-bar table td.active[vf-ef93c0]:before{border-color:inherit;border-style:solid;border-width:1px 0 0;content:"";left:-1px;position:absolute;right:-1px;top:-1px}.drag-line[vf-d4c4a9]{background:#296eff;contain:layout size style;height:2px;left:0;max-width:100%;position:absolute;right:0;z-index:1}.mask[vf-4a5ad1]{background:rgba(41,110,255,.063);border:1px solid #296eff;box-sizing:content-box;display:none;pointer-events:none;position:absolute}.mask.active[vf-4a5ad1]{display:block}@font-face{font-display:block;font-family:textbus;font-style:normal;font-weight:400;src:url(fonts/textbus.ttf?fw0xu0) format("truetype"),url(fonts/textbus.woff?fw0xu0) format("woff"),url(fonts/textbus.svg?fw0xu0#textbus) format("svg")}[class*=" xnote-icon-"],[class^=xnote-icon-]{speak:never;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:textbus!important;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.xnote-icon-heading-h1:before{content:"\e925"}.xnote-icon-heading-h2:before{content:"\e926"}.xnote-icon-heading-h3:before{content:"\e927"}.xnote-icon-heading-h4:before{content:"\e928"}.xnote-icon-heading-h5:before{content:"\e929"}.xnote-icon-heading-h6:before{content:"\e92a"}.xnote-icon-heading:before{content:"\e92b"}.xnote-icon-more:before{content:"\e921"}.xnote-icon-text-wrap:before{content:"\e924"}.xnote-icon-checkmark:before{content:"\e922"}.xnote-icon-arrow-left:before{content:"\e900"}.xnote-icon-arrow-right:before{content:"\e901"}.xnote-icon-arrow-top:before{content:"\e902"}.xnote-icon-arrow-bottom:before{content:"\e903"}.xnote-icon-source-code:before{content:"\e904"}.xnote-icon-insert-paragraph-after:before{content:"\e905"}.xnote-icon-insert-paragraph-before:before{content:"\e906"}.xnote-icon-components:before{content:"\e907"}.xnote-icon-table-border:before{content:"\e908"}.xnote-icon-table-remove:before{content:"\e909"}.xnote-icon-device:before{content:"\e90a"}.xnote-icon-paint-bucket:before{content:"\e90b"}.xnote-icon-background-color:before{content:"\e90c"}.xnote-icon-color:before{content:"\e90d"}.xnote-icon-brush:before{content:"\e90e"}.xnote-icon-table-edit:before{content:"\e90f"}.xnote-icon-table-split-columns:before{content:"\e910"}.xnote-icon-table-delete-row-top:before{content:"\e911"}.xnote-icon-table-delete-row-bottom:before{content:"\e912"}.xnote-icon-table-delete-column-right:before{content:"\e913"}.xnote-icon-table-delete-column-left:before{content:"\e914"}.xnote-icon-table-add-row-top:before{content:"\e915"}.xnote-icon-table-add-row-bottom:before{content:"\e916"}.xnote-icon-table-add-column-right:before{content:"\e917"}.xnote-icon-table-add-column-left:before{content:"\e918"}.xnote-icon-image:before{content:"\e919"}.xnote-icon-text-indent:before{content:"\e91a"}.xnote-icon-music:before{content:"\e91b"}.xnote-icon-video:before{content:"\e91c"}.xnote-icon-unlink:before{content:"\e91d"}.xnote-icon-select:before{content:"\e91e"}.xnote-icon-tree:before{content:"\e91f"}.xnote-icon-setting:before{content:"\e920"}.xnote-icon-copy:before{content:"\e92c"}.xnote-icon-paste:before{content:"\e92d"}.xnote-icon-pushpin:before{content:"\e946"}.xnote-icon-upload:before{content:"\e961"}.xnote-icon-history-back:before{content:"\e967"}.xnote-icon-history-forward:before{content:"\e968"}.xnote-icon-quotes-right:before{content:"\e978"}.xnote-icon-loading:before{content:"\e97f"}.xnote-icon-search:before{content:"\e986"}.xnote-icon-enlarge:before{content:"\e989"}.xnote-icon-shrink:before{content:"\e98a"}.xnote-icon-bin:before{content:"\e9ac"}.xnote-icon-list-numbered:before{content:"\e9b9"}.xnote-icon-list:before{content:"\e9bb"}.xnote-icon-link:before{content:"\e9cb"}.xnote-icon-emoji:before{content:"\e9e2"}.xnote-icon-plus:before{content:"\ea0a"}.xnote-icon-command:before{content:"\ea4e"}.xnote-icon-shift:before{content:"\ea4f"}.xnote-icon-ctrl:before{content:"\ea50"}.xnote-icon-opt:before{content:"\ea51"}.xnote-icon-cut:before{content:"\ea5a"}.xnote-icon-line-height:before{content:"\ea5f"}.xnote-icon-letter-spacing:before{content:"\ea60"}.xnote-icon-font-size:before{content:"\ea61"}.xnote-icon-bold:before{content:"\ea62"}.xnote-icon-underline:before{content:"\ea63"}.xnote-icon-italic:before{content:"\ea64"}.xnote-icon-strikethrough:before{content:"\ea65"}.xnote-icon-superscript:before{content:"\ea69"}.xnote-icon-subscript:before{content:"\ea6a"}.xnote-icon-clear-formatting:before{content:"\ea6f"}.xnote-icon-table:before{content:"\ea71"}.xnote-icon-ltr:before{content:"\ea74"}.xnote-icon-rtl:before{content:"\ea75"}.xnote-icon-code:before{content:"\ea80"}.xnote-icon-terminal:before{content:"\ea81"}.xnote-icon-bullhorn:before{content:"\e923"}.xnote-icon-price-tag:before{content:"\e935"}.xnote-icon-pushpin1:before{content:"\e947"}.xnote-icon-warning:before{content:"\ea07"}.xnote-icon-notification:before{content:"\ea08"}.xnote-icon-question:before{content:"\ea09"}.xnote-icon-info:before{content:"\ea0c"}.xnote-icon-cancel-circle:before{content:"\ea0d"}.xnote-icon-blocked:before{content:"\ea0e"}.xnote-icon-checkbox-checked:before{content:"\ea52"}.xnote-icon-checkbox-unchecked:before{content:"\ea53"}.xnote-icon-pilcrow:before{content:"\ea73"}.xnote-icon-paragraph-left:before{content:"\ea77"}.xnote-icon-paragraph-center:before{content:"\ea78"}.xnote-icon-paragraph-right:before{content:"\ea79"}.xnote-icon-paragraph-justify:before{content:"\ea7a"}.xnote-icon-indent-increase:before{content:"\ea7b"}.xnote-icon-indent-decrease:before{content:"\ea7c"}.xnote-h1{font-size:2.2em;font-weight:600}.xnote-h2{font-size:1.8em;font-weight:600}.xnote-h3{font-size:1.4em;font-weight:600}.xnote-h4{font-size:1em;font-weight:600}.xnote-h5{font-size:.9em;font-weight:600}.xnote-h6{font-size:.8em;font-weight:600}.xnote-code{border:1px solid rgba(0,0,0,.2);border-radius:4px;font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace;margin:0 3px;padding:2px 3px}
|
package/bundles/index.esm.js
CHANGED
|
@@ -548,6 +548,12 @@ function useReadonly() {
|
|
|
548
548
|
return is;
|
|
549
549
|
}
|
|
550
550
|
|
|
551
|
+
const OutputInjectionToken = new InjectionToken('OutputInjectionToken');
|
|
552
|
+
|
|
553
|
+
function useOutput() {
|
|
554
|
+
return createSignal(inject(OutputInjectionToken));
|
|
555
|
+
}
|
|
556
|
+
|
|
551
557
|
class ParagraphComponent extends Component {
|
|
552
558
|
static fromJSON(textbus, json) {
|
|
553
559
|
const slot = textbus.get(Registry).createSlot(json.slot);
|
|
@@ -583,11 +589,12 @@ ParagraphComponent.type = ContentType.BlockComponent;
|
|
|
583
589
|
function ParagraphView(props) {
|
|
584
590
|
const adapter = inject(DomAdapter);
|
|
585
591
|
const readonly = useReadonly();
|
|
592
|
+
const output = useOutput();
|
|
586
593
|
return () => {
|
|
587
594
|
const slot = props.component.state.slot;
|
|
588
595
|
return (jsx("div", { class: "xnote-paragraph", ref: props.rootRef, "data-component": ParagraphComponent.name, children: adapter.slotRender(slot, children => {
|
|
589
596
|
return (createVNode('p', null, children));
|
|
590
|
-
}, readonly()) }));
|
|
597
|
+
}, readonly() || output()) }));
|
|
591
598
|
};
|
|
592
599
|
}
|
|
593
600
|
const paragraphComponentLoader = {
|
|
@@ -595,11 +602,12 @@ const paragraphComponentLoader = {
|
|
|
595
602
|
return element.dataset.compoment === ParagraphComponent.name || /P|H[1-6]/.test(element.tagName);
|
|
596
603
|
},
|
|
597
604
|
read(element, textbus, slotParser) {
|
|
605
|
+
const content = /P|H[1-6]/.test(element.tagName) ? element : element.children[0];
|
|
598
606
|
const delta = slotParser(new Slot([
|
|
599
607
|
ContentType.Text,
|
|
600
608
|
ContentType.InlineComponent,
|
|
601
609
|
ContentType.BlockComponent
|
|
602
|
-
]),
|
|
610
|
+
]), content).toDelta();
|
|
603
611
|
const results = deltaToBlock(delta, textbus);
|
|
604
612
|
if (results.length === 1) {
|
|
605
613
|
return results[0];
|
|
@@ -640,12 +648,6 @@ function deltaToBlock(delta, textbus) {
|
|
|
640
648
|
return results;
|
|
641
649
|
}
|
|
642
650
|
|
|
643
|
-
const OutputInjectionToken = new InjectionToken('OutputInjectionToken');
|
|
644
|
-
|
|
645
|
-
function useOutput() {
|
|
646
|
-
return createSignal(inject(OutputInjectionToken));
|
|
647
|
-
}
|
|
648
|
-
|
|
649
651
|
const languageList = [{
|
|
650
652
|
label: 'JavaScript',
|
|
651
653
|
value: 'JavaScript',
|
|
@@ -1079,7 +1081,7 @@ function SourceCodeView(props) {
|
|
|
1079
1081
|
'xnote-source-code': true,
|
|
1080
1082
|
'xnote-source-code-line-number': state.lineNumber,
|
|
1081
1083
|
[state.theme || 'github']: true
|
|
1082
|
-
}, "data-lang": state.lang, "data-component": props.component.name, "data-auto-break": state.autoBreak, "data-theme": state.theme || null, "data-line-number": state.lineNumber, children: [(!readonly() && !output()) && jsxs(ComponentToolbar, { visible: isFocus(), children: [jsx(ToolbarItem, { children: jsx(Dropdown, { onCheck: changeLang, trigger: 'hover', menu: languageList.map(item => {
|
|
1084
|
+
}, "data-lang": state.lang, "data-component": props.component.name, "data-auto-break": state.autoBreak + '', "data-theme": state.theme || null, "data-line-number": state.lineNumber + '', children: [(!readonly() && !output()) && jsxs(ComponentToolbar, { visible: isFocus(), children: [jsx(ToolbarItem, { children: jsx(Dropdown, { onCheck: changeLang, trigger: 'hover', menu: languageList.map(item => {
|
|
1083
1085
|
return {
|
|
1084
1086
|
label: jsx(MenuItem, { checked: state.lang === item.value, children: item.label || 'Plain Text' }),
|
|
1085
1087
|
value: item.value
|
|
@@ -1137,7 +1139,7 @@ function SourceCodeView(props) {
|
|
|
1137
1139
|
}
|
|
1138
1140
|
const sourceCodeComponentLoader = {
|
|
1139
1141
|
match(element) {
|
|
1140
|
-
return element.tagName === 'DIV' && element.dataset.component === SourceCodeComponent.componentName ||
|
|
1142
|
+
return (element.tagName === 'DIV' && element.dataset.component === SourceCodeComponent.componentName) ||
|
|
1141
1143
|
element.tagName === 'PRE';
|
|
1142
1144
|
},
|
|
1143
1145
|
read(el, textbus) {
|
|
@@ -1166,8 +1168,8 @@ const sourceCodeComponentLoader = {
|
|
|
1166
1168
|
return new SourceCodeComponent(textbus, {
|
|
1167
1169
|
lang: el.dataset.lang || '',
|
|
1168
1170
|
theme: el.dataset.theme || '',
|
|
1169
|
-
lineNumber:
|
|
1170
|
-
autoBreak:
|
|
1171
|
+
lineNumber: el.dataset.lineNumber === 'true',
|
|
1172
|
+
autoBreak: el.dataset.autoBreak === 'true',
|
|
1171
1173
|
slots
|
|
1172
1174
|
});
|
|
1173
1175
|
},
|
|
@@ -1357,12 +1359,18 @@ const headingAttr = new Attribute('Heading', {
|
|
|
1357
1359
|
});
|
|
1358
1360
|
const headingAttrLoader = {
|
|
1359
1361
|
match(element) {
|
|
1360
|
-
return /H[1-6]/.test(element.tagName);
|
|
1362
|
+
return /H[1-6]/.test(element.tagName) || /(^|\s)xnote-h[1-6](\s|$)/.test(element.className);
|
|
1361
1363
|
},
|
|
1362
1364
|
read(element) {
|
|
1365
|
+
if (/H[1-6]/.test(element.tagName)) {
|
|
1366
|
+
return {
|
|
1367
|
+
attribute: headingAttr,
|
|
1368
|
+
value: element.tagName.toLowerCase()
|
|
1369
|
+
};
|
|
1370
|
+
}
|
|
1363
1371
|
return {
|
|
1364
1372
|
attribute: headingAttr,
|
|
1365
|
-
value: element.
|
|
1373
|
+
value: element.className.substring(6)
|
|
1366
1374
|
};
|
|
1367
1375
|
}
|
|
1368
1376
|
};
|
|
@@ -1625,7 +1633,7 @@ function registerStrikeThroughShortcut(textbus) {
|
|
|
1625
1633
|
}
|
|
1626
1634
|
const strikeThroughFormatLoader = {
|
|
1627
1635
|
match(element) {
|
|
1628
|
-
return
|
|
1636
|
+
return /^(strike|del|s)$/i.test(element.tagName) || /line-through/.test(element.style.textDecoration);
|
|
1629
1637
|
},
|
|
1630
1638
|
read() {
|
|
1631
1639
|
return {
|
|
@@ -1743,7 +1751,7 @@ function TodolistView(props) {
|
|
|
1743
1751
|
return createVNode('div', {
|
|
1744
1752
|
class: 'xnote-todolist-content'
|
|
1745
1753
|
}, children);
|
|
1746
|
-
}, readonly())] }));
|
|
1754
|
+
}, readonly() || output())] }));
|
|
1747
1755
|
};
|
|
1748
1756
|
}
|
|
1749
1757
|
const todolistComponentLoader = {
|
|
@@ -1800,11 +1808,12 @@ BlockquoteComponent.zenCoding = {
|
|
|
1800
1808
|
function BlockquoteView(props) {
|
|
1801
1809
|
const adapter = inject(DomAdapter);
|
|
1802
1810
|
const readonly = useReadonly();
|
|
1811
|
+
const output = useOutput();
|
|
1803
1812
|
return () => {
|
|
1804
1813
|
const slot = props.component.state.slot;
|
|
1805
1814
|
return (jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children: adapter.slotRender(slot, children => {
|
|
1806
1815
|
return createVNode('div', null, children);
|
|
1807
|
-
}, readonly()) }));
|
|
1816
|
+
}, readonly() || output()) }));
|
|
1808
1817
|
};
|
|
1809
1818
|
}
|
|
1810
1819
|
const blockquoteComponentLoader = {
|
|
@@ -2044,7 +2053,7 @@ function ListComponentView(props) {
|
|
|
2044
2053
|
return createVNode('div', {
|
|
2045
2054
|
class: 'xnote-list-content'
|
|
2046
2055
|
}, children);
|
|
2047
|
-
}, readonly())] }) }));
|
|
2056
|
+
}, readonly() || output())] }) }));
|
|
2048
2057
|
};
|
|
2049
2058
|
}
|
|
2050
2059
|
const listComponentLoader = {
|
|
@@ -2184,7 +2193,7 @@ function HighlightBoxView(props) {
|
|
|
2184
2193
|
return createVNode('div', {
|
|
2185
2194
|
class: 'xnote-highlight-box-content'
|
|
2186
2195
|
}, children);
|
|
2187
|
-
}, readonly())] }));
|
|
2196
|
+
}, readonly() || output())] }));
|
|
2188
2197
|
}
|
|
2189
2198
|
return (jsxs("div", { "data-component": name, ref: props.rootRef, "data-icon": state.type, class: "xnote-highlight-box", children: [jsx("div", { class: "xnote-highlight-box-left", children: jsx(Dropdown, { trigger: "click", ref: dropdownRef, width: "260px", menu: jsxs("div", { class: "xnote-highlight-box-icons", children: [HighlightBoxComponent.defaultTypes.map(icon => {
|
|
2190
2199
|
return (jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
|
|
@@ -2195,7 +2204,7 @@ function HighlightBoxView(props) {
|
|
|
2195
2204
|
return createVNode('div', {
|
|
2196
2205
|
class: 'xnote-highlight-box-content'
|
|
2197
2206
|
}, children);
|
|
2198
|
-
}, readonly())] }));
|
|
2207
|
+
}, readonly() || output())] }));
|
|
2199
2208
|
};
|
|
2200
2209
|
}
|
|
2201
2210
|
const highlightBoxComponentLoader = {
|
|
@@ -2901,6 +2910,7 @@ function ColorTool(props) {
|
|
|
2901
2910
|
'#ffdf14',
|
|
2902
2911
|
'#5eec75',
|
|
2903
2912
|
'#5dfaff',
|
|
2913
|
+
'#1296db',
|
|
2904
2914
|
'#617fff',
|
|
2905
2915
|
'#c459ff',
|
|
2906
2916
|
];
|
|
@@ -3981,6 +3991,7 @@ function RootView(props) {
|
|
|
3981
3991
|
// props.component.afterCheck()
|
|
3982
3992
|
// })
|
|
3983
3993
|
const readonly = useReadonly();
|
|
3994
|
+
const output = useOutput();
|
|
3984
3995
|
return () => {
|
|
3985
3996
|
const { rootRef } = props;
|
|
3986
3997
|
return (jsx("div", { class: "xnote-root", ref: [rootRef, ref], children: adapter.slotRender(content, children => {
|
|
@@ -3988,7 +3999,7 @@ function RootView(props) {
|
|
|
3988
3999
|
class: 'xnote-content',
|
|
3989
4000
|
'data-placeholder': content.isEmpty ? '请输入内容' : ''
|
|
3990
4001
|
}, children));
|
|
3991
|
-
}, readonly()) }));
|
|
4002
|
+
}, readonly() || output()) }));
|
|
3992
4003
|
};
|
|
3993
4004
|
}
|
|
3994
4005
|
const rootComponentLoader = {
|
|
@@ -4605,7 +4616,7 @@ const TableComponentView = withAnnotation({
|
|
|
4605
4616
|
return createVNode('td', {
|
|
4606
4617
|
key: cell.slot.id
|
|
4607
4618
|
}, children);
|
|
4608
|
-
}, readonly());
|
|
4619
|
+
}, readonly() || output());
|
|
4609
4620
|
}) }, rowMapping.get(row)));
|
|
4610
4621
|
}) })] }) }) }));
|
|
4611
4622
|
}
|
|
@@ -4622,7 +4633,7 @@ const TableComponentView = withAnnotation({
|
|
|
4622
4633
|
return createVNode('td', {
|
|
4623
4634
|
key: cell.slot.id
|
|
4624
4635
|
}, children);
|
|
4625
|
-
}, readonly());
|
|
4636
|
+
}, readonly() || output());
|
|
4626
4637
|
}) }, rowMapping.get(row)));
|
|
4627
4638
|
}) })] }), jsx(ResizeColumn, { tableRef: tableRef, component: props.component, onActiveStateChange: isActive => {
|
|
4628
4639
|
isResizeColumn.set(isActive);
|
|
@@ -4786,7 +4797,7 @@ function autoComplete(table) {
|
|
|
4786
4797
|
}
|
|
4787
4798
|
|
|
4788
4799
|
class Editor extends Textbus {
|
|
4789
|
-
constructor(editorConfig) {
|
|
4800
|
+
constructor(editorConfig = {}) {
|
|
4790
4801
|
const adapter = new ViewflyAdapter({
|
|
4791
4802
|
[ParagraphComponent.componentName]: ParagraphView,
|
|
4792
4803
|
[RootComponent.componentName]: RootView,
|
|
@@ -4810,23 +4821,19 @@ class Editor extends Textbus {
|
|
|
4810
4821
|
app.destroy();
|
|
4811
4822
|
};
|
|
4812
4823
|
});
|
|
4813
|
-
const browserModule = new BrowserModule({
|
|
4814
|
-
renderTo: () => {
|
|
4824
|
+
const browserModule = new BrowserModule(Object.assign({ renderTo: () => {
|
|
4815
4825
|
return this.host;
|
|
4816
|
-
},
|
|
4817
|
-
|
|
4818
|
-
|
|
4826
|
+
}, adapter, componentLoaders: [
|
|
4827
|
+
sourceCodeComponentLoader,
|
|
4828
|
+
tableComponentLoader,
|
|
4829
|
+
imageComponentLoader,
|
|
4830
|
+
videoComponentLoader,
|
|
4819
4831
|
highlightBoxComponentLoader,
|
|
4820
4832
|
blockquoteComponentLoader,
|
|
4821
4833
|
paragraphComponentLoader,
|
|
4822
|
-
sourceCodeComponentLoader,
|
|
4823
4834
|
todolistComponentLoader,
|
|
4824
|
-
tableComponentLoader,
|
|
4825
4835
|
listComponentLoader,
|
|
4826
|
-
|
|
4827
|
-
videoComponentLoader
|
|
4828
|
-
],
|
|
4829
|
-
formatLoaders: [
|
|
4836
|
+
], formatLoaders: [
|
|
4830
4837
|
backgroundColorFormatLoader,
|
|
4831
4838
|
boldFormatLoader,
|
|
4832
4839
|
codeFormatLoader,
|
|
@@ -4837,13 +4844,11 @@ class Editor extends Textbus {
|
|
|
4837
4844
|
linkFormatLoader,
|
|
4838
4845
|
strikeThroughFormatLoader,
|
|
4839
4846
|
underlineFormatLoader
|
|
4840
|
-
],
|
|
4841
|
-
attributeLoaders: [
|
|
4847
|
+
], attributeLoaders: [
|
|
4842
4848
|
headingAttrLoader,
|
|
4843
4849
|
textAlignAttrLoader,
|
|
4844
4850
|
textIndentAttrLoader
|
|
4845
|
-
]
|
|
4846
|
-
});
|
|
4851
|
+
] }, editorConfig.viewOptions));
|
|
4847
4852
|
const modules = [browserModule];
|
|
4848
4853
|
if (editorConfig.collaborateConfig) {
|
|
4849
4854
|
modules.push(new CollaborateModule(editorConfig.collaborateConfig));
|
|
@@ -4877,7 +4882,7 @@ class Editor extends Textbus {
|
|
|
4877
4882
|
app.destroy();
|
|
4878
4883
|
};
|
|
4879
4884
|
});
|
|
4880
|
-
super(Object.assign({ additionalAdapters: [vDomAdapter], imports: modules, components: [
|
|
4885
|
+
super(Object.assign({ zenCoding: true, additionalAdapters: [vDomAdapter], imports: modules, components: [
|
|
4881
4886
|
ImageComponent,
|
|
4882
4887
|
ParagraphComponent,
|
|
4883
4888
|
RootComponent,
|
package/bundles/index.js
CHANGED
|
@@ -550,6 +550,12 @@ function useReadonly() {
|
|
|
550
550
|
return is;
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
const OutputInjectionToken = new core.InjectionToken('OutputInjectionToken');
|
|
554
|
+
|
|
555
|
+
function useOutput() {
|
|
556
|
+
return core.createSignal(core.inject(OutputInjectionToken));
|
|
557
|
+
}
|
|
558
|
+
|
|
553
559
|
class ParagraphComponent extends core$1.Component {
|
|
554
560
|
static fromJSON(textbus, json) {
|
|
555
561
|
const slot = textbus.get(core$1.Registry).createSlot(json.slot);
|
|
@@ -585,11 +591,12 @@ ParagraphComponent.type = core$1.ContentType.BlockComponent;
|
|
|
585
591
|
function ParagraphView(props) {
|
|
586
592
|
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
587
593
|
const readonly = useReadonly();
|
|
594
|
+
const output = useOutput();
|
|
588
595
|
return () => {
|
|
589
596
|
const slot = props.component.state.slot;
|
|
590
597
|
return (jsxRuntime.jsx("div", { class: "xnote-paragraph", ref: props.rootRef, "data-component": ParagraphComponent.name, children: adapter.slotRender(slot, children => {
|
|
591
598
|
return (core$1.createVNode('p', null, children));
|
|
592
|
-
}, readonly()) }));
|
|
599
|
+
}, readonly() || output()) }));
|
|
593
600
|
};
|
|
594
601
|
}
|
|
595
602
|
const paragraphComponentLoader = {
|
|
@@ -597,11 +604,12 @@ const paragraphComponentLoader = {
|
|
|
597
604
|
return element.dataset.compoment === ParagraphComponent.name || /P|H[1-6]/.test(element.tagName);
|
|
598
605
|
},
|
|
599
606
|
read(element, textbus, slotParser) {
|
|
607
|
+
const content = /P|H[1-6]/.test(element.tagName) ? element : element.children[0];
|
|
600
608
|
const delta = slotParser(new core$1.Slot([
|
|
601
609
|
core$1.ContentType.Text,
|
|
602
610
|
core$1.ContentType.InlineComponent,
|
|
603
611
|
core$1.ContentType.BlockComponent
|
|
604
|
-
]),
|
|
612
|
+
]), content).toDelta();
|
|
605
613
|
const results = deltaToBlock(delta, textbus);
|
|
606
614
|
if (results.length === 1) {
|
|
607
615
|
return results[0];
|
|
@@ -642,12 +650,6 @@ function deltaToBlock(delta, textbus) {
|
|
|
642
650
|
return results;
|
|
643
651
|
}
|
|
644
652
|
|
|
645
|
-
const OutputInjectionToken = new core.InjectionToken('OutputInjectionToken');
|
|
646
|
-
|
|
647
|
-
function useOutput() {
|
|
648
|
-
return core.createSignal(core.inject(OutputInjectionToken));
|
|
649
|
-
}
|
|
650
|
-
|
|
651
653
|
const languageList = [{
|
|
652
654
|
label: 'JavaScript',
|
|
653
655
|
value: 'JavaScript',
|
|
@@ -1081,7 +1083,7 @@ function SourceCodeView(props) {
|
|
|
1081
1083
|
'xnote-source-code': true,
|
|
1082
1084
|
'xnote-source-code-line-number': state.lineNumber,
|
|
1083
1085
|
[state.theme || 'github']: true
|
|
1084
|
-
}, "data-lang": state.lang, "data-component": props.component.name, "data-auto-break": state.autoBreak, "data-theme": state.theme || null, "data-line-number": state.lineNumber, children: [(!readonly() && !output()) && jsxRuntime.jsxs(ComponentToolbar, { visible: isFocus(), children: [jsxRuntime.jsx(ToolbarItem, { children: jsxRuntime.jsx(Dropdown, { onCheck: changeLang, trigger: 'hover', menu: languageList.map(item => {
|
|
1086
|
+
}, "data-lang": state.lang, "data-component": props.component.name, "data-auto-break": state.autoBreak + '', "data-theme": state.theme || null, "data-line-number": state.lineNumber + '', children: [(!readonly() && !output()) && jsxRuntime.jsxs(ComponentToolbar, { visible: isFocus(), children: [jsxRuntime.jsx(ToolbarItem, { children: jsxRuntime.jsx(Dropdown, { onCheck: changeLang, trigger: 'hover', menu: languageList.map(item => {
|
|
1085
1087
|
return {
|
|
1086
1088
|
label: jsxRuntime.jsx(MenuItem, { checked: state.lang === item.value, children: item.label || 'Plain Text' }),
|
|
1087
1089
|
value: item.value
|
|
@@ -1139,7 +1141,7 @@ function SourceCodeView(props) {
|
|
|
1139
1141
|
}
|
|
1140
1142
|
const sourceCodeComponentLoader = {
|
|
1141
1143
|
match(element) {
|
|
1142
|
-
return element.tagName === 'DIV' && element.dataset.component === SourceCodeComponent.componentName ||
|
|
1144
|
+
return (element.tagName === 'DIV' && element.dataset.component === SourceCodeComponent.componentName) ||
|
|
1143
1145
|
element.tagName === 'PRE';
|
|
1144
1146
|
},
|
|
1145
1147
|
read(el, textbus) {
|
|
@@ -1168,8 +1170,8 @@ const sourceCodeComponentLoader = {
|
|
|
1168
1170
|
return new SourceCodeComponent(textbus, {
|
|
1169
1171
|
lang: el.dataset.lang || '',
|
|
1170
1172
|
theme: el.dataset.theme || '',
|
|
1171
|
-
lineNumber:
|
|
1172
|
-
autoBreak:
|
|
1173
|
+
lineNumber: el.dataset.lineNumber === 'true',
|
|
1174
|
+
autoBreak: el.dataset.autoBreak === 'true',
|
|
1173
1175
|
slots
|
|
1174
1176
|
});
|
|
1175
1177
|
},
|
|
@@ -1359,12 +1361,18 @@ const headingAttr = new core$1.Attribute('Heading', {
|
|
|
1359
1361
|
});
|
|
1360
1362
|
const headingAttrLoader = {
|
|
1361
1363
|
match(element) {
|
|
1362
|
-
return /H[1-6]/.test(element.tagName);
|
|
1364
|
+
return /H[1-6]/.test(element.tagName) || /(^|\s)xnote-h[1-6](\s|$)/.test(element.className);
|
|
1363
1365
|
},
|
|
1364
1366
|
read(element) {
|
|
1367
|
+
if (/H[1-6]/.test(element.tagName)) {
|
|
1368
|
+
return {
|
|
1369
|
+
attribute: headingAttr,
|
|
1370
|
+
value: element.tagName.toLowerCase()
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1365
1373
|
return {
|
|
1366
1374
|
attribute: headingAttr,
|
|
1367
|
-
value: element.
|
|
1375
|
+
value: element.className.substring(6)
|
|
1368
1376
|
};
|
|
1369
1377
|
}
|
|
1370
1378
|
};
|
|
@@ -1627,7 +1635,7 @@ function registerStrikeThroughShortcut(textbus) {
|
|
|
1627
1635
|
}
|
|
1628
1636
|
const strikeThroughFormatLoader = {
|
|
1629
1637
|
match(element) {
|
|
1630
|
-
return
|
|
1638
|
+
return /^(strike|del|s)$/i.test(element.tagName) || /line-through/.test(element.style.textDecoration);
|
|
1631
1639
|
},
|
|
1632
1640
|
read() {
|
|
1633
1641
|
return {
|
|
@@ -1745,7 +1753,7 @@ function TodolistView(props) {
|
|
|
1745
1753
|
return core$1.createVNode('div', {
|
|
1746
1754
|
class: 'xnote-todolist-content'
|
|
1747
1755
|
}, children);
|
|
1748
|
-
}, readonly())] }));
|
|
1756
|
+
}, readonly() || output())] }));
|
|
1749
1757
|
};
|
|
1750
1758
|
}
|
|
1751
1759
|
const todolistComponentLoader = {
|
|
@@ -1802,11 +1810,12 @@ BlockquoteComponent.zenCoding = {
|
|
|
1802
1810
|
function BlockquoteView(props) {
|
|
1803
1811
|
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
1804
1812
|
const readonly = useReadonly();
|
|
1813
|
+
const output = useOutput();
|
|
1805
1814
|
return () => {
|
|
1806
1815
|
const slot = props.component.state.slot;
|
|
1807
1816
|
return (jsxRuntime.jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children: adapter.slotRender(slot, children => {
|
|
1808
1817
|
return core$1.createVNode('div', null, children);
|
|
1809
|
-
}, readonly()) }));
|
|
1818
|
+
}, readonly() || output()) }));
|
|
1810
1819
|
};
|
|
1811
1820
|
}
|
|
1812
1821
|
const blockquoteComponentLoader = {
|
|
@@ -2046,7 +2055,7 @@ function ListComponentView(props) {
|
|
|
2046
2055
|
return core$1.createVNode('div', {
|
|
2047
2056
|
class: 'xnote-list-content'
|
|
2048
2057
|
}, children);
|
|
2049
|
-
}, readonly())] }) }));
|
|
2058
|
+
}, readonly() || output())] }) }));
|
|
2050
2059
|
};
|
|
2051
2060
|
}
|
|
2052
2061
|
const listComponentLoader = {
|
|
@@ -2186,7 +2195,7 @@ function HighlightBoxView(props) {
|
|
|
2186
2195
|
return core$1.createVNode('div', {
|
|
2187
2196
|
class: 'xnote-highlight-box-content'
|
|
2188
2197
|
}, children);
|
|
2189
|
-
}, readonly())] }));
|
|
2198
|
+
}, readonly() || output())] }));
|
|
2190
2199
|
}
|
|
2191
2200
|
return (jsxRuntime.jsxs("div", { "data-component": name, ref: props.rootRef, "data-icon": state.type, class: "xnote-highlight-box", children: [jsxRuntime.jsx("div", { class: "xnote-highlight-box-left", children: jsxRuntime.jsx(Dropdown, { trigger: "click", ref: dropdownRef, width: "260px", menu: jsxRuntime.jsxs("div", { class: "xnote-highlight-box-icons", children: [HighlightBoxComponent.defaultTypes.map(icon => {
|
|
2192
2201
|
return (jsxRuntime.jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
|
|
@@ -2197,7 +2206,7 @@ function HighlightBoxView(props) {
|
|
|
2197
2206
|
return core$1.createVNode('div', {
|
|
2198
2207
|
class: 'xnote-highlight-box-content'
|
|
2199
2208
|
}, children);
|
|
2200
|
-
}, readonly())] }));
|
|
2209
|
+
}, readonly() || output())] }));
|
|
2201
2210
|
};
|
|
2202
2211
|
}
|
|
2203
2212
|
const highlightBoxComponentLoader = {
|
|
@@ -2903,6 +2912,7 @@ function ColorTool(props) {
|
|
|
2903
2912
|
'#ffdf14',
|
|
2904
2913
|
'#5eec75',
|
|
2905
2914
|
'#5dfaff',
|
|
2915
|
+
'#1296db',
|
|
2906
2916
|
'#617fff',
|
|
2907
2917
|
'#c459ff',
|
|
2908
2918
|
];
|
|
@@ -3983,6 +3993,7 @@ function RootView(props) {
|
|
|
3983
3993
|
// props.component.afterCheck()
|
|
3984
3994
|
// })
|
|
3985
3995
|
const readonly = useReadonly();
|
|
3996
|
+
const output = useOutput();
|
|
3986
3997
|
return () => {
|
|
3987
3998
|
const { rootRef } = props;
|
|
3988
3999
|
return (jsxRuntime.jsx("div", { class: "xnote-root", ref: [rootRef, ref], children: adapter.slotRender(content, children => {
|
|
@@ -3990,7 +4001,7 @@ function RootView(props) {
|
|
|
3990
4001
|
class: 'xnote-content',
|
|
3991
4002
|
'data-placeholder': content.isEmpty ? '请输入内容' : ''
|
|
3992
4003
|
}, children));
|
|
3993
|
-
}, readonly()) }));
|
|
4004
|
+
}, readonly() || output()) }));
|
|
3994
4005
|
};
|
|
3995
4006
|
}
|
|
3996
4007
|
const rootComponentLoader = {
|
|
@@ -4607,7 +4618,7 @@ const TableComponentView = core.withAnnotation({
|
|
|
4607
4618
|
return core$1.createVNode('td', {
|
|
4608
4619
|
key: cell.slot.id
|
|
4609
4620
|
}, children);
|
|
4610
|
-
}, readonly());
|
|
4621
|
+
}, readonly() || output());
|
|
4611
4622
|
}) }, rowMapping.get(row)));
|
|
4612
4623
|
}) })] }) }) }));
|
|
4613
4624
|
}
|
|
@@ -4624,7 +4635,7 @@ const TableComponentView = core.withAnnotation({
|
|
|
4624
4635
|
return core$1.createVNode('td', {
|
|
4625
4636
|
key: cell.slot.id
|
|
4626
4637
|
}, children);
|
|
4627
|
-
}, readonly());
|
|
4638
|
+
}, readonly() || output());
|
|
4628
4639
|
}) }, rowMapping.get(row)));
|
|
4629
4640
|
}) })] }), jsxRuntime.jsx(ResizeColumn, { tableRef: tableRef, component: props.component, onActiveStateChange: isActive => {
|
|
4630
4641
|
isResizeColumn.set(isActive);
|
|
@@ -4788,7 +4799,7 @@ function autoComplete(table) {
|
|
|
4788
4799
|
}
|
|
4789
4800
|
|
|
4790
4801
|
class Editor extends core$1.Textbus {
|
|
4791
|
-
constructor(editorConfig) {
|
|
4802
|
+
constructor(editorConfig = {}) {
|
|
4792
4803
|
const adapter = new adapterViewfly.ViewflyAdapter({
|
|
4793
4804
|
[ParagraphComponent.componentName]: ParagraphView,
|
|
4794
4805
|
[RootComponent.componentName]: RootView,
|
|
@@ -4812,23 +4823,19 @@ class Editor extends core$1.Textbus {
|
|
|
4812
4823
|
app.destroy();
|
|
4813
4824
|
};
|
|
4814
4825
|
});
|
|
4815
|
-
const browserModule = new platformBrowser.BrowserModule({
|
|
4816
|
-
renderTo: () => {
|
|
4826
|
+
const browserModule = new platformBrowser.BrowserModule(Object.assign({ renderTo: () => {
|
|
4817
4827
|
return this.host;
|
|
4818
|
-
},
|
|
4819
|
-
|
|
4820
|
-
|
|
4828
|
+
}, adapter, componentLoaders: [
|
|
4829
|
+
sourceCodeComponentLoader,
|
|
4830
|
+
tableComponentLoader,
|
|
4831
|
+
imageComponentLoader,
|
|
4832
|
+
videoComponentLoader,
|
|
4821
4833
|
highlightBoxComponentLoader,
|
|
4822
4834
|
blockquoteComponentLoader,
|
|
4823
4835
|
paragraphComponentLoader,
|
|
4824
|
-
sourceCodeComponentLoader,
|
|
4825
4836
|
todolistComponentLoader,
|
|
4826
|
-
tableComponentLoader,
|
|
4827
4837
|
listComponentLoader,
|
|
4828
|
-
|
|
4829
|
-
videoComponentLoader
|
|
4830
|
-
],
|
|
4831
|
-
formatLoaders: [
|
|
4838
|
+
], formatLoaders: [
|
|
4832
4839
|
backgroundColorFormatLoader,
|
|
4833
4840
|
boldFormatLoader,
|
|
4834
4841
|
codeFormatLoader,
|
|
@@ -4839,13 +4846,11 @@ class Editor extends core$1.Textbus {
|
|
|
4839
4846
|
linkFormatLoader,
|
|
4840
4847
|
strikeThroughFormatLoader,
|
|
4841
4848
|
underlineFormatLoader
|
|
4842
|
-
],
|
|
4843
|
-
attributeLoaders: [
|
|
4849
|
+
], attributeLoaders: [
|
|
4844
4850
|
headingAttrLoader,
|
|
4845
4851
|
textAlignAttrLoader,
|
|
4846
4852
|
textIndentAttrLoader
|
|
4847
|
-
]
|
|
4848
|
-
});
|
|
4853
|
+
] }, editorConfig.viewOptions));
|
|
4849
4854
|
const modules = [browserModule];
|
|
4850
4855
|
if (editorConfig.collaborateConfig) {
|
|
4851
4856
|
modules.push(new collaborate.CollaborateModule(editorConfig.collaborateConfig));
|
|
@@ -4879,7 +4884,7 @@ class Editor extends core$1.Textbus {
|
|
|
4879
4884
|
app.destroy();
|
|
4880
4885
|
};
|
|
4881
4886
|
});
|
|
4882
|
-
super(Object.assign({ additionalAdapters: [vDomAdapter], imports: modules, components: [
|
|
4887
|
+
super(Object.assign({ zenCoding: true, additionalAdapters: [vDomAdapter], imports: modules, components: [
|
|
4883
4888
|
ImageComponent,
|
|
4884
4889
|
ParagraphComponent,
|
|
4885
4890
|
RootComponent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textbus/xnote",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.7",
|
|
4
4
|
"description": "Viewfly project.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@textbus/adapter-viewfly": "^4.0.0-alpha.
|
|
18
|
-
"@textbus/collaborate": "^4.0.0-alpha.
|
|
19
|
-
"@textbus/core": "^4.0.0-alpha.
|
|
20
|
-
"@textbus/platform-browser": "^4.0.0-alpha.
|
|
21
|
-
"@viewfly/core": "^1.0.0-alpha.
|
|
22
|
-
"@viewfly/hooks": "^1.0.0-alpha.
|
|
23
|
-
"@viewfly/platform-browser": "^1.0.0-alpha.
|
|
24
|
-
"@viewfly/scoped-css": "^1.0.0-alpha.
|
|
17
|
+
"@textbus/adapter-viewfly": "^4.0.0-alpha.44",
|
|
18
|
+
"@textbus/collaborate": "^4.0.0-alpha.44",
|
|
19
|
+
"@textbus/core": "^4.0.0-alpha.44",
|
|
20
|
+
"@textbus/platform-browser": "^4.0.0-alpha.44",
|
|
21
|
+
"@viewfly/core": "^1.0.0-alpha.2",
|
|
22
|
+
"@viewfly/hooks": "^1.0.0-alpha.2",
|
|
23
|
+
"@viewfly/platform-browser": "^1.0.0-alpha.2",
|
|
24
|
+
"@viewfly/scoped-css": "^1.0.0-alpha.2",
|
|
25
25
|
"highlight.js": "^11.9.0",
|
|
26
26
|
"reflect-metadata": "^0.1.13"
|
|
27
27
|
},
|