@textbus/xnote 0.0.1-alpha.6 → 0.0.1-alpha.8

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.
@@ -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: 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}
@@ -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}
@@ -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
- ]), /P|H[1-6]/.test(element.tagName) ? element : element.children[0]).toDelta();
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',
@@ -899,7 +901,7 @@ class SourceCodeComponent extends Component {
899
901
  },
900
902
  action() {
901
903
  if (selection.isCollapsed) {
902
- commander.insert(' ');
904
+ commander.insert(' ');
903
905
  return;
904
906
  }
905
907
  const blocks = selection.getBlocks();
@@ -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: !!el.dataset.lineNumber || true,
1170
- autoBreak: !!el.dataset.autoBreak || true,
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.tagName.toLowerCase()
1373
+ value: element.className.substring(6)
1366
1374
  };
1367
1375
  }
1368
1376
  };
@@ -1450,8 +1458,6 @@ class TableComponent extends Component {
1450
1458
  rowspan: 1,
1451
1459
  colspan: 1,
1452
1460
  slot: new Slot([
1453
- ContentType.Text,
1454
- ContentType.InlineComponent,
1455
1461
  ContentType.BlockComponent
1456
1462
  ])
1457
1463
  };
@@ -1533,8 +1539,6 @@ class TableComponent extends Component {
1533
1539
  this.state.rows.forEach(row => {
1534
1540
  const slot = new Slot([
1535
1541
  ContentType.BlockComponent,
1536
- ContentType.InlineComponent,
1537
- ContentType.Text
1538
1542
  ]);
1539
1543
  slot.insert(new ParagraphComponent(this.textbus, {
1540
1544
  slot: new Slot([
@@ -1562,8 +1566,6 @@ class TableComponent extends Component {
1562
1566
  cells: this.state.layoutWidth.map(() => {
1563
1567
  const slot = new Slot([
1564
1568
  ContentType.BlockComponent,
1565
- ContentType.InlineComponent,
1566
- ContentType.Text
1567
1569
  ]);
1568
1570
  slot.insert(new ParagraphComponent(this.textbus, {
1569
1571
  slot: new Slot([
@@ -1625,7 +1627,7 @@ function registerStrikeThroughShortcut(textbus) {
1625
1627
  }
1626
1628
  const strikeThroughFormatLoader = {
1627
1629
  match(element) {
1628
- return /strike|del|s/i.test(element.tagName) || /line-through/.test(element.style.textDecoration);
1630
+ return /^(strike|del|s)$/i.test(element.tagName) || /line-through/.test(element.style.textDecoration);
1629
1631
  },
1630
1632
  read() {
1631
1633
  return {
@@ -1743,7 +1745,7 @@ function TodolistView(props) {
1743
1745
  return createVNode('div', {
1744
1746
  class: 'xnote-todolist-content'
1745
1747
  }, children);
1746
- }, readonly())] }));
1748
+ }, readonly() || output())] }));
1747
1749
  };
1748
1750
  }
1749
1751
  const todolistComponentLoader = {
@@ -1771,8 +1773,6 @@ class BlockquoteComponent extends Component {
1771
1773
  }
1772
1774
  constructor(textbus, state = {
1773
1775
  slot: new Slot([
1774
- ContentType.Text,
1775
- ContentType.InlineComponent,
1776
1776
  ContentType.BlockComponent
1777
1777
  ])
1778
1778
  }) {
@@ -1790,8 +1790,6 @@ BlockquoteComponent.zenCoding = {
1790
1790
  createState() {
1791
1791
  return {
1792
1792
  slot: new Slot([
1793
- ContentType.Text,
1794
- ContentType.InlineComponent,
1795
1793
  ContentType.BlockComponent
1796
1794
  ])
1797
1795
  };
@@ -1800,11 +1798,12 @@ BlockquoteComponent.zenCoding = {
1800
1798
  function BlockquoteView(props) {
1801
1799
  const adapter = inject(DomAdapter);
1802
1800
  const readonly = useReadonly();
1801
+ const output = useOutput();
1803
1802
  return () => {
1804
1803
  const slot = props.component.state.slot;
1805
1804
  return (jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children: adapter.slotRender(slot, children => {
1806
1805
  return createVNode('div', null, children);
1807
- }, readonly()) }));
1806
+ }, readonly() || output()) }));
1808
1807
  };
1809
1808
  }
1810
1809
  const blockquoteComponentLoader = {
@@ -1813,14 +1812,10 @@ const blockquoteComponentLoader = {
1813
1812
  },
1814
1813
  read(element, textbus, slotParser) {
1815
1814
  const delta = slotParser(new Slot([
1816
- ContentType.Text,
1817
1815
  ContentType.BlockComponent,
1818
- ContentType.InlineComponent
1819
1816
  ]), element).toDelta();
1820
1817
  const slot = new Slot([
1821
1818
  ContentType.BlockComponent,
1822
- ContentType.InlineComponent,
1823
- ContentType.Text
1824
1819
  ]);
1825
1820
  deltaToBlock(delta, textbus).forEach(i => {
1826
1821
  slot.insert(i);
@@ -2044,7 +2039,7 @@ function ListComponentView(props) {
2044
2039
  return createVNode('div', {
2045
2040
  class: 'xnote-list-content'
2046
2041
  }, children);
2047
- }, readonly())] }) }));
2042
+ }, readonly() || output())] }) }));
2048
2043
  };
2049
2044
  }
2050
2045
  const listComponentLoader = {
@@ -2150,8 +2145,6 @@ class HighlightBoxComponent extends Component {
2150
2145
  type: '',
2151
2146
  slot: new Slot([
2152
2147
  ContentType.BlockComponent,
2153
- ContentType.InlineComponent,
2154
- ContentType.Text
2155
2148
  ])
2156
2149
  }) {
2157
2150
  super(textbus, state);
@@ -2184,7 +2177,7 @@ function HighlightBoxView(props) {
2184
2177
  return createVNode('div', {
2185
2178
  class: 'xnote-highlight-box-content'
2186
2179
  }, children);
2187
- }, readonly())] }));
2180
+ }, readonly() || output())] }));
2188
2181
  }
2189
2182
  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
2183
  return (jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
@@ -2195,7 +2188,7 @@ function HighlightBoxView(props) {
2195
2188
  return createVNode('div', {
2196
2189
  class: 'xnote-highlight-box-content'
2197
2190
  }, children);
2198
- }, readonly())] }));
2191
+ }, readonly() || output())] }));
2199
2192
  };
2200
2193
  }
2201
2194
  const highlightBoxComponentLoader = {
@@ -2205,13 +2198,9 @@ const highlightBoxComponentLoader = {
2205
2198
  read(element, textbus, slotParser) {
2206
2199
  const delta = slotParser(new Slot([
2207
2200
  ContentType.BlockComponent,
2208
- ContentType.InlineComponent,
2209
- ContentType.Text
2210
2201
  ]), element.querySelector('.xnote-highlight-box-content')).toDelta();
2211
2202
  const slot = new Slot([
2212
2203
  ContentType.BlockComponent,
2213
- ContentType.InlineComponent,
2214
- ContentType.Text
2215
2204
  ]);
2216
2205
  deltaToBlock(delta, textbus).forEach(i => {
2217
2206
  slot.insert(i);
@@ -2901,6 +2890,7 @@ function ColorTool(props) {
2901
2890
  '#ffdf14',
2902
2891
  '#5eec75',
2903
2892
  '#5dfaff',
2893
+ '#1296db',
2904
2894
  '#617fff',
2905
2895
  '#c459ff',
2906
2896
  ];
@@ -3924,45 +3914,17 @@ class RootComponent extends Component {
3924
3914
  this.onCompositionStart = new Subject();
3925
3915
  }
3926
3916
  static fromJSON(textbus, json) {
3927
- // const heading = textbus.get(Registry).createSlot(json.heading)
3928
3917
  const content = textbus.get(Registry).createSlot(json.content);
3929
3918
  return new RootComponent(textbus, {
3930
- // heading,
3931
3919
  content
3932
3920
  });
3933
3921
  }
3934
3922
  setup() {
3935
- // const textbus = useContext()
3936
- // const selection = textbus.get(Selection)
3937
- // onBreak(ev => {
3938
- // if (ev.target === this.state.heading) {
3939
- // const afterContent = ev.target.cut(ev.data.index)
3940
- // const p = new ParagraphComponent(textbus, {
3941
- // slot: afterContent
3942
- // })
3943
- // const body = this.state.content
3944
- // body.retain(0)
3945
- // body.insert(p)
3946
- // selection.setPosition(afterContent, 0)
3947
- // ev.preventDefault()
3948
- // }
3949
- // })
3950
3923
  useBlockContent(this.state.content);
3951
3924
  onCompositionStart(ev => {
3952
3925
  this.onCompositionStart.next(ev);
3953
3926
  });
3954
3927
  }
3955
- afterCheck() {
3956
- const content = this.state.content;
3957
- const lastContent = content.getContentAtIndex(content.length - 1);
3958
- if (lastContent instanceof ParagraphComponent ||
3959
- lastContent instanceof ListComponent ||
3960
- lastContent instanceof TodolistComponent) {
3961
- return;
3962
- }
3963
- content.retain(content.length);
3964
- content.insert(new ParagraphComponent(this.textbus));
3965
- }
3966
3928
  }
3967
3929
  RootComponent.componentName = 'RootComponent';
3968
3930
  RootComponent.type = ContentType.BlockComponent;
@@ -3977,10 +3939,8 @@ function RootView(props) {
3977
3939
  sub.unsubscribe();
3978
3940
  };
3979
3941
  });
3980
- // onUpdated(() => {
3981
- // props.component.afterCheck()
3982
- // })
3983
3942
  const readonly = useReadonly();
3943
+ const output = useOutput();
3984
3944
  return () => {
3985
3945
  const { rootRef } = props;
3986
3946
  return (jsx("div", { class: "xnote-root", ref: [rootRef, ref], children: adapter.slotRender(content, children => {
@@ -3988,7 +3948,7 @@ function RootView(props) {
3988
3948
  class: 'xnote-content',
3989
3949
  'data-placeholder': content.isEmpty ? '请输入内容' : ''
3990
3950
  }, children));
3991
- }, readonly()) }));
3951
+ }, readonly() || output()) }));
3992
3952
  };
3993
3953
  }
3994
3954
  const rootComponentLoader = {
@@ -4605,7 +4565,7 @@ const TableComponentView = withAnnotation({
4605
4565
  return createVNode('td', {
4606
4566
  key: cell.slot.id
4607
4567
  }, children);
4608
- }, readonly());
4568
+ }, readonly() || output());
4609
4569
  }) }, rowMapping.get(row)));
4610
4570
  }) })] }) }) }));
4611
4571
  }
@@ -4622,7 +4582,7 @@ const TableComponentView = withAnnotation({
4622
4582
  return createVNode('td', {
4623
4583
  key: cell.slot.id
4624
4584
  }, children);
4625
- }, readonly());
4585
+ }, readonly() || output());
4626
4586
  }) }, rowMapping.get(row)));
4627
4587
  }) })] }), jsx(ResizeColumn, { tableRef: tableRef, component: props.component, onActiveStateChange: isActive => {
4628
4588
  isResizeColumn.set(isActive);
@@ -4647,8 +4607,6 @@ const tableComponentLoader = {
4647
4607
  Array.from(row.cells).forEach(cell => {
4648
4608
  const slot = new Slot([
4649
4609
  ContentType.BlockComponent,
4650
- ContentType.InlineComponent,
4651
- ContentType.Text
4652
4610
  ]);
4653
4611
  arr.push({
4654
4612
  slot,
@@ -4657,8 +4615,6 @@ const tableComponentLoader = {
4657
4615
  });
4658
4616
  const delta = slotParser(new Slot([
4659
4617
  ContentType.BlockComponent,
4660
- ContentType.InlineComponent,
4661
- ContentType.Text
4662
4618
  ]), cell).toDelta();
4663
4619
  const results = deltaToBlock(delta, textbus);
4664
4620
  results.forEach(i => {
@@ -4676,8 +4632,6 @@ const tableComponentLoader = {
4676
4632
  Array.from(row.cells).forEach(cell => {
4677
4633
  const slot = new Slot([
4678
4634
  ContentType.BlockComponent,
4679
- ContentType.InlineComponent,
4680
- ContentType.Text
4681
4635
  ]);
4682
4636
  arr.push({
4683
4637
  slot,
@@ -4686,8 +4640,6 @@ const tableComponentLoader = {
4686
4640
  });
4687
4641
  const delta = slotParser(new Slot([
4688
4642
  ContentType.BlockComponent,
4689
- ContentType.InlineComponent,
4690
- ContentType.Text
4691
4643
  ]), cell).toDelta();
4692
4644
  const results = deltaToBlock(delta, textbus);
4693
4645
  results.forEach(i => {
@@ -4764,8 +4716,6 @@ function autoComplete(table) {
4764
4716
  rowspan: 1,
4765
4717
  colspan: 1,
4766
4718
  slot: new Slot([
4767
- ContentType.Text,
4768
- ContentType.InlineComponent,
4769
4719
  ContentType.BlockComponent
4770
4720
  ])
4771
4721
  };
@@ -4786,7 +4736,7 @@ function autoComplete(table) {
4786
4736
  }
4787
4737
 
4788
4738
  class Editor extends Textbus {
4789
- constructor(editorConfig) {
4739
+ constructor(editorConfig = {}) {
4790
4740
  const adapter = new ViewflyAdapter({
4791
4741
  [ParagraphComponent.componentName]: ParagraphView,
4792
4742
  [RootComponent.componentName]: RootView,
@@ -4810,23 +4760,19 @@ class Editor extends Textbus {
4810
4760
  app.destroy();
4811
4761
  };
4812
4762
  });
4813
- const browserModule = new BrowserModule({
4814
- renderTo: () => {
4763
+ const browserModule = new BrowserModule(Object.assign({ renderTo: () => {
4815
4764
  return this.host;
4816
- },
4817
- adapter,
4818
- componentLoaders: [
4765
+ }, adapter, componentLoaders: [
4766
+ sourceCodeComponentLoader,
4767
+ tableComponentLoader,
4768
+ imageComponentLoader,
4769
+ videoComponentLoader,
4819
4770
  highlightBoxComponentLoader,
4820
4771
  blockquoteComponentLoader,
4821
4772
  paragraphComponentLoader,
4822
- sourceCodeComponentLoader,
4823
4773
  todolistComponentLoader,
4824
- tableComponentLoader,
4825
4774
  listComponentLoader,
4826
- imageComponentLoader,
4827
- videoComponentLoader
4828
- ],
4829
- formatLoaders: [
4775
+ ], formatLoaders: [
4830
4776
  backgroundColorFormatLoader,
4831
4777
  boldFormatLoader,
4832
4778
  codeFormatLoader,
@@ -4837,13 +4783,11 @@ class Editor extends Textbus {
4837
4783
  linkFormatLoader,
4838
4784
  strikeThroughFormatLoader,
4839
4785
  underlineFormatLoader
4840
- ],
4841
- attributeLoaders: [
4786
+ ], attributeLoaders: [
4842
4787
  headingAttrLoader,
4843
4788
  textAlignAttrLoader,
4844
4789
  textIndentAttrLoader
4845
- ]
4846
- });
4790
+ ] }, editorConfig.viewOptions));
4847
4791
  const modules = [browserModule];
4848
4792
  if (editorConfig.collaborateConfig) {
4849
4793
  modules.push(new CollaborateModule(editorConfig.collaborateConfig));
@@ -4877,7 +4821,7 @@ class Editor extends Textbus {
4877
4821
  app.destroy();
4878
4822
  };
4879
4823
  });
4880
- super(Object.assign({ additionalAdapters: [vDomAdapter], imports: modules, components: [
4824
+ super(Object.assign({ zenCoding: true, additionalAdapters: [vDomAdapter], imports: modules, components: [
4881
4825
  ImageComponent,
4882
4826
  ParagraphComponent,
4883
4827
  RootComponent,
@@ -4928,14 +4872,12 @@ class Editor extends Textbus {
4928
4872
  const parser = this.get(Parser);
4929
4873
  const doc = parser.parseDoc(config.content, rootComponentLoader);
4930
4874
  rootComp = doc instanceof Component ? doc : new RootComponent(this, {
4931
- // heading: new Slot([ContentType.Text]),
4932
4875
  content: doc
4933
4876
  });
4934
4877
  }
4935
4878
  else {
4936
4879
  rootComp = new RootComponent(this, {
4937
- // heading: new Slot([ContentType.Text]),
4938
- content: new Slot([ContentType.Text, ContentType.InlineComponent, ContentType.BlockComponent])
4880
+ content: new Slot([ContentType.BlockComponent])
4939
4881
  });
4940
4882
  }
4941
4883
  return this.render(rootComp);
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
- ]), /P|H[1-6]/.test(element.tagName) ? element : element.children[0]).toDelta();
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',
@@ -901,7 +903,7 @@ class SourceCodeComponent extends core$1.Component {
901
903
  },
902
904
  action() {
903
905
  if (selection.isCollapsed) {
904
- commander.insert(' ');
906
+ commander.insert(' ');
905
907
  return;
906
908
  }
907
909
  const blocks = selection.getBlocks();
@@ -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: !!el.dataset.lineNumber || true,
1172
- autoBreak: !!el.dataset.autoBreak || true,
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.tagName.toLowerCase()
1375
+ value: element.className.substring(6)
1368
1376
  };
1369
1377
  }
1370
1378
  };
@@ -1452,8 +1460,6 @@ class TableComponent extends core$1.Component {
1452
1460
  rowspan: 1,
1453
1461
  colspan: 1,
1454
1462
  slot: new core$1.Slot([
1455
- core$1.ContentType.Text,
1456
- core$1.ContentType.InlineComponent,
1457
1463
  core$1.ContentType.BlockComponent
1458
1464
  ])
1459
1465
  };
@@ -1535,8 +1541,6 @@ class TableComponent extends core$1.Component {
1535
1541
  this.state.rows.forEach(row => {
1536
1542
  const slot = new core$1.Slot([
1537
1543
  core$1.ContentType.BlockComponent,
1538
- core$1.ContentType.InlineComponent,
1539
- core$1.ContentType.Text
1540
1544
  ]);
1541
1545
  slot.insert(new ParagraphComponent(this.textbus, {
1542
1546
  slot: new core$1.Slot([
@@ -1564,8 +1568,6 @@ class TableComponent extends core$1.Component {
1564
1568
  cells: this.state.layoutWidth.map(() => {
1565
1569
  const slot = new core$1.Slot([
1566
1570
  core$1.ContentType.BlockComponent,
1567
- core$1.ContentType.InlineComponent,
1568
- core$1.ContentType.Text
1569
1571
  ]);
1570
1572
  slot.insert(new ParagraphComponent(this.textbus, {
1571
1573
  slot: new core$1.Slot([
@@ -1627,7 +1629,7 @@ function registerStrikeThroughShortcut(textbus) {
1627
1629
  }
1628
1630
  const strikeThroughFormatLoader = {
1629
1631
  match(element) {
1630
- return /strike|del|s/i.test(element.tagName) || /line-through/.test(element.style.textDecoration);
1632
+ return /^(strike|del|s)$/i.test(element.tagName) || /line-through/.test(element.style.textDecoration);
1631
1633
  },
1632
1634
  read() {
1633
1635
  return {
@@ -1745,7 +1747,7 @@ function TodolistView(props) {
1745
1747
  return core$1.createVNode('div', {
1746
1748
  class: 'xnote-todolist-content'
1747
1749
  }, children);
1748
- }, readonly())] }));
1750
+ }, readonly() || output())] }));
1749
1751
  };
1750
1752
  }
1751
1753
  const todolistComponentLoader = {
@@ -1773,8 +1775,6 @@ class BlockquoteComponent extends core$1.Component {
1773
1775
  }
1774
1776
  constructor(textbus, state = {
1775
1777
  slot: new core$1.Slot([
1776
- core$1.ContentType.Text,
1777
- core$1.ContentType.InlineComponent,
1778
1778
  core$1.ContentType.BlockComponent
1779
1779
  ])
1780
1780
  }) {
@@ -1792,8 +1792,6 @@ BlockquoteComponent.zenCoding = {
1792
1792
  createState() {
1793
1793
  return {
1794
1794
  slot: new core$1.Slot([
1795
- core$1.ContentType.Text,
1796
- core$1.ContentType.InlineComponent,
1797
1795
  core$1.ContentType.BlockComponent
1798
1796
  ])
1799
1797
  };
@@ -1802,11 +1800,12 @@ BlockquoteComponent.zenCoding = {
1802
1800
  function BlockquoteView(props) {
1803
1801
  const adapter = core.inject(platformBrowser.DomAdapter);
1804
1802
  const readonly = useReadonly();
1803
+ const output = useOutput();
1805
1804
  return () => {
1806
1805
  const slot = props.component.state.slot;
1807
1806
  return (jsxRuntime.jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children: adapter.slotRender(slot, children => {
1808
1807
  return core$1.createVNode('div', null, children);
1809
- }, readonly()) }));
1808
+ }, readonly() || output()) }));
1810
1809
  };
1811
1810
  }
1812
1811
  const blockquoteComponentLoader = {
@@ -1815,14 +1814,10 @@ const blockquoteComponentLoader = {
1815
1814
  },
1816
1815
  read(element, textbus, slotParser) {
1817
1816
  const delta = slotParser(new core$1.Slot([
1818
- core$1.ContentType.Text,
1819
1817
  core$1.ContentType.BlockComponent,
1820
- core$1.ContentType.InlineComponent
1821
1818
  ]), element).toDelta();
1822
1819
  const slot = new core$1.Slot([
1823
1820
  core$1.ContentType.BlockComponent,
1824
- core$1.ContentType.InlineComponent,
1825
- core$1.ContentType.Text
1826
1821
  ]);
1827
1822
  deltaToBlock(delta, textbus).forEach(i => {
1828
1823
  slot.insert(i);
@@ -2046,7 +2041,7 @@ function ListComponentView(props) {
2046
2041
  return core$1.createVNode('div', {
2047
2042
  class: 'xnote-list-content'
2048
2043
  }, children);
2049
- }, readonly())] }) }));
2044
+ }, readonly() || output())] }) }));
2050
2045
  };
2051
2046
  }
2052
2047
  const listComponentLoader = {
@@ -2152,8 +2147,6 @@ class HighlightBoxComponent extends core$1.Component {
2152
2147
  type: '',
2153
2148
  slot: new core$1.Slot([
2154
2149
  core$1.ContentType.BlockComponent,
2155
- core$1.ContentType.InlineComponent,
2156
- core$1.ContentType.Text
2157
2150
  ])
2158
2151
  }) {
2159
2152
  super(textbus, state);
@@ -2186,7 +2179,7 @@ function HighlightBoxView(props) {
2186
2179
  return core$1.createVNode('div', {
2187
2180
  class: 'xnote-highlight-box-content'
2188
2181
  }, children);
2189
- }, readonly())] }));
2182
+ }, readonly() || output())] }));
2190
2183
  }
2191
2184
  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
2185
  return (jsxRuntime.jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
@@ -2197,7 +2190,7 @@ function HighlightBoxView(props) {
2197
2190
  return core$1.createVNode('div', {
2198
2191
  class: 'xnote-highlight-box-content'
2199
2192
  }, children);
2200
- }, readonly())] }));
2193
+ }, readonly() || output())] }));
2201
2194
  };
2202
2195
  }
2203
2196
  const highlightBoxComponentLoader = {
@@ -2207,13 +2200,9 @@ const highlightBoxComponentLoader = {
2207
2200
  read(element, textbus, slotParser) {
2208
2201
  const delta = slotParser(new core$1.Slot([
2209
2202
  core$1.ContentType.BlockComponent,
2210
- core$1.ContentType.InlineComponent,
2211
- core$1.ContentType.Text
2212
2203
  ]), element.querySelector('.xnote-highlight-box-content')).toDelta();
2213
2204
  const slot = new core$1.Slot([
2214
2205
  core$1.ContentType.BlockComponent,
2215
- core$1.ContentType.InlineComponent,
2216
- core$1.ContentType.Text
2217
2206
  ]);
2218
2207
  deltaToBlock(delta, textbus).forEach(i => {
2219
2208
  slot.insert(i);
@@ -2903,6 +2892,7 @@ function ColorTool(props) {
2903
2892
  '#ffdf14',
2904
2893
  '#5eec75',
2905
2894
  '#5dfaff',
2895
+ '#1296db',
2906
2896
  '#617fff',
2907
2897
  '#c459ff',
2908
2898
  ];
@@ -3926,45 +3916,17 @@ class RootComponent extends core$1.Component {
3926
3916
  this.onCompositionStart = new core$1.Subject();
3927
3917
  }
3928
3918
  static fromJSON(textbus, json) {
3929
- // const heading = textbus.get(Registry).createSlot(json.heading)
3930
3919
  const content = textbus.get(core$1.Registry).createSlot(json.content);
3931
3920
  return new RootComponent(textbus, {
3932
- // heading,
3933
3921
  content
3934
3922
  });
3935
3923
  }
3936
3924
  setup() {
3937
- // const textbus = useContext()
3938
- // const selection = textbus.get(Selection)
3939
- // onBreak(ev => {
3940
- // if (ev.target === this.state.heading) {
3941
- // const afterContent = ev.target.cut(ev.data.index)
3942
- // const p = new ParagraphComponent(textbus, {
3943
- // slot: afterContent
3944
- // })
3945
- // const body = this.state.content
3946
- // body.retain(0)
3947
- // body.insert(p)
3948
- // selection.setPosition(afterContent, 0)
3949
- // ev.preventDefault()
3950
- // }
3951
- // })
3952
3925
  useBlockContent(this.state.content);
3953
3926
  core$1.onCompositionStart(ev => {
3954
3927
  this.onCompositionStart.next(ev);
3955
3928
  });
3956
3929
  }
3957
- afterCheck() {
3958
- const content = this.state.content;
3959
- const lastContent = content.getContentAtIndex(content.length - 1);
3960
- if (lastContent instanceof ParagraphComponent ||
3961
- lastContent instanceof ListComponent ||
3962
- lastContent instanceof TodolistComponent) {
3963
- return;
3964
- }
3965
- content.retain(content.length);
3966
- content.insert(new ParagraphComponent(this.textbus));
3967
- }
3968
3930
  }
3969
3931
  RootComponent.componentName = 'RootComponent';
3970
3932
  RootComponent.type = core$1.ContentType.BlockComponent;
@@ -3979,10 +3941,8 @@ function RootView(props) {
3979
3941
  sub.unsubscribe();
3980
3942
  };
3981
3943
  });
3982
- // onUpdated(() => {
3983
- // props.component.afterCheck()
3984
- // })
3985
3944
  const readonly = useReadonly();
3945
+ const output = useOutput();
3986
3946
  return () => {
3987
3947
  const { rootRef } = props;
3988
3948
  return (jsxRuntime.jsx("div", { class: "xnote-root", ref: [rootRef, ref], children: adapter.slotRender(content, children => {
@@ -3990,7 +3950,7 @@ function RootView(props) {
3990
3950
  class: 'xnote-content',
3991
3951
  'data-placeholder': content.isEmpty ? '请输入内容' : ''
3992
3952
  }, children));
3993
- }, readonly()) }));
3953
+ }, readonly() || output()) }));
3994
3954
  };
3995
3955
  }
3996
3956
  const rootComponentLoader = {
@@ -4607,7 +4567,7 @@ const TableComponentView = core.withAnnotation({
4607
4567
  return core$1.createVNode('td', {
4608
4568
  key: cell.slot.id
4609
4569
  }, children);
4610
- }, readonly());
4570
+ }, readonly() || output());
4611
4571
  }) }, rowMapping.get(row)));
4612
4572
  }) })] }) }) }));
4613
4573
  }
@@ -4624,7 +4584,7 @@ const TableComponentView = core.withAnnotation({
4624
4584
  return core$1.createVNode('td', {
4625
4585
  key: cell.slot.id
4626
4586
  }, children);
4627
- }, readonly());
4587
+ }, readonly() || output());
4628
4588
  }) }, rowMapping.get(row)));
4629
4589
  }) })] }), jsxRuntime.jsx(ResizeColumn, { tableRef: tableRef, component: props.component, onActiveStateChange: isActive => {
4630
4590
  isResizeColumn.set(isActive);
@@ -4649,8 +4609,6 @@ const tableComponentLoader = {
4649
4609
  Array.from(row.cells).forEach(cell => {
4650
4610
  const slot = new core$1.Slot([
4651
4611
  core$1.ContentType.BlockComponent,
4652
- core$1.ContentType.InlineComponent,
4653
- core$1.ContentType.Text
4654
4612
  ]);
4655
4613
  arr.push({
4656
4614
  slot,
@@ -4659,8 +4617,6 @@ const tableComponentLoader = {
4659
4617
  });
4660
4618
  const delta = slotParser(new core$1.Slot([
4661
4619
  core$1.ContentType.BlockComponent,
4662
- core$1.ContentType.InlineComponent,
4663
- core$1.ContentType.Text
4664
4620
  ]), cell).toDelta();
4665
4621
  const results = deltaToBlock(delta, textbus);
4666
4622
  results.forEach(i => {
@@ -4678,8 +4634,6 @@ const tableComponentLoader = {
4678
4634
  Array.from(row.cells).forEach(cell => {
4679
4635
  const slot = new core$1.Slot([
4680
4636
  core$1.ContentType.BlockComponent,
4681
- core$1.ContentType.InlineComponent,
4682
- core$1.ContentType.Text
4683
4637
  ]);
4684
4638
  arr.push({
4685
4639
  slot,
@@ -4688,8 +4642,6 @@ const tableComponentLoader = {
4688
4642
  });
4689
4643
  const delta = slotParser(new core$1.Slot([
4690
4644
  core$1.ContentType.BlockComponent,
4691
- core$1.ContentType.InlineComponent,
4692
- core$1.ContentType.Text
4693
4645
  ]), cell).toDelta();
4694
4646
  const results = deltaToBlock(delta, textbus);
4695
4647
  results.forEach(i => {
@@ -4766,8 +4718,6 @@ function autoComplete(table) {
4766
4718
  rowspan: 1,
4767
4719
  colspan: 1,
4768
4720
  slot: new core$1.Slot([
4769
- core$1.ContentType.Text,
4770
- core$1.ContentType.InlineComponent,
4771
4721
  core$1.ContentType.BlockComponent
4772
4722
  ])
4773
4723
  };
@@ -4788,7 +4738,7 @@ function autoComplete(table) {
4788
4738
  }
4789
4739
 
4790
4740
  class Editor extends core$1.Textbus {
4791
- constructor(editorConfig) {
4741
+ constructor(editorConfig = {}) {
4792
4742
  const adapter = new adapterViewfly.ViewflyAdapter({
4793
4743
  [ParagraphComponent.componentName]: ParagraphView,
4794
4744
  [RootComponent.componentName]: RootView,
@@ -4812,23 +4762,19 @@ class Editor extends core$1.Textbus {
4812
4762
  app.destroy();
4813
4763
  };
4814
4764
  });
4815
- const browserModule = new platformBrowser.BrowserModule({
4816
- renderTo: () => {
4765
+ const browserModule = new platformBrowser.BrowserModule(Object.assign({ renderTo: () => {
4817
4766
  return this.host;
4818
- },
4819
- adapter,
4820
- componentLoaders: [
4767
+ }, adapter, componentLoaders: [
4768
+ sourceCodeComponentLoader,
4769
+ tableComponentLoader,
4770
+ imageComponentLoader,
4771
+ videoComponentLoader,
4821
4772
  highlightBoxComponentLoader,
4822
4773
  blockquoteComponentLoader,
4823
4774
  paragraphComponentLoader,
4824
- sourceCodeComponentLoader,
4825
4775
  todolistComponentLoader,
4826
- tableComponentLoader,
4827
4776
  listComponentLoader,
4828
- imageComponentLoader,
4829
- videoComponentLoader
4830
- ],
4831
- formatLoaders: [
4777
+ ], formatLoaders: [
4832
4778
  backgroundColorFormatLoader,
4833
4779
  boldFormatLoader,
4834
4780
  codeFormatLoader,
@@ -4839,13 +4785,11 @@ class Editor extends core$1.Textbus {
4839
4785
  linkFormatLoader,
4840
4786
  strikeThroughFormatLoader,
4841
4787
  underlineFormatLoader
4842
- ],
4843
- attributeLoaders: [
4788
+ ], attributeLoaders: [
4844
4789
  headingAttrLoader,
4845
4790
  textAlignAttrLoader,
4846
4791
  textIndentAttrLoader
4847
- ]
4848
- });
4792
+ ] }, editorConfig.viewOptions));
4849
4793
  const modules = [browserModule];
4850
4794
  if (editorConfig.collaborateConfig) {
4851
4795
  modules.push(new collaborate.CollaborateModule(editorConfig.collaborateConfig));
@@ -4879,7 +4823,7 @@ class Editor extends core$1.Textbus {
4879
4823
  app.destroy();
4880
4824
  };
4881
4825
  });
4882
- super(Object.assign({ additionalAdapters: [vDomAdapter], imports: modules, components: [
4826
+ super(Object.assign({ zenCoding: true, additionalAdapters: [vDomAdapter], imports: modules, components: [
4883
4827
  ImageComponent,
4884
4828
  ParagraphComponent,
4885
4829
  RootComponent,
@@ -4930,14 +4874,12 @@ class Editor extends core$1.Textbus {
4930
4874
  const parser = this.get(platformBrowser.Parser);
4931
4875
  const doc = parser.parseDoc(config.content, rootComponentLoader);
4932
4876
  rootComp = doc instanceof core$1.Component ? doc : new RootComponent(this, {
4933
- // heading: new Slot([ContentType.Text]),
4934
4877
  content: doc
4935
4878
  });
4936
4879
  }
4937
4880
  else {
4938
4881
  rootComp = new RootComponent(this, {
4939
- // heading: new Slot([ContentType.Text]),
4940
- content: new core$1.Slot([core$1.ContentType.Text, core$1.ContentType.InlineComponent, core$1.ContentType.BlockComponent])
4882
+ content: new core$1.Slot([core$1.ContentType.BlockComponent])
4941
4883
  });
4942
4884
  }
4943
4885
  return this.render(rootComp);
@@ -11,7 +11,6 @@ export declare class RootComponent extends Component<RootComponentState> {
11
11
  static fromJSON(textbus: Textbus, json: ComponentStateLiteral<RootComponentState>): RootComponent;
12
12
  onCompositionStart: Subject<Event<Slot, CompositionStartEventData>>;
13
13
  setup(): void;
14
- afterCheck(): void;
15
14
  }
16
15
  export declare function RootView(props: ViewComponentProps<RootComponent>): () => any;
17
16
  export declare const rootComponentLoader: ComponentLoader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/xnote",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.8",
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.43",
18
- "@textbus/collaborate": "^4.0.0-alpha.43",
19
- "@textbus/core": "^4.0.0-alpha.43",
20
- "@textbus/platform-browser": "^4.0.0-alpha.43",
21
- "@viewfly/core": "^1.0.0-alpha.1",
22
- "@viewfly/hooks": "^1.0.0-alpha.1",
23
- "@viewfly/platform-browser": "^1.0.0-alpha.1",
24
- "@viewfly/scoped-css": "^1.0.0-alpha.1",
17
+ "@textbus/adapter-viewfly": "^4.0.0-alpha.45",
18
+ "@textbus/collaborate": "^4.0.0-alpha.45",
19
+ "@textbus/core": "^4.0.0-alpha.45",
20
+ "@textbus/platform-browser": "^4.0.0-alpha.45",
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
  },