@textbus/xnote 0.0.1-alpha.44 → 0.0.1-alpha.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/index.css +1 -1
- package/bundles/index.esm.css +1 -1
- package/bundles/index.esm.js +99 -52
- package/bundles/index.js +97 -50
- package/bundles/textbus/components/at/at.component.d.ts +2 -1
- package/bundles/textbus/components/blockqoute/blockquote.component.d.ts +1 -0
- package/bundles/textbus/components/highlight-box/highlight-box.component.d.ts +1 -0
- package/bundles/textbus/components/image/image.component.d.ts +2 -1
- package/bundles/textbus/components/katex/katex.component.d.ts +2 -1
- package/bundles/textbus/components/list/list.component.d.ts +1 -0
- package/bundles/textbus/components/paragraph/paragraph.component.d.ts +1 -0
- package/bundles/textbus/components/root/root.component.d.ts +1 -0
- package/bundles/textbus/components/source-code/source-code.component.d.ts +1 -0
- package/bundles/textbus/components/table/table.component.d.ts +1 -0
- package/bundles/textbus/components/todolist/todolist.component.d.ts +1 -0
- package/bundles/textbus/components/video/video.component.d.ts +1 -1
- package/package.json +5 -5
- package/bundles/textbus/components/SlotRender.d.ts +0 -14
package/bundles/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.btn[vf-d94b56]{align-items:center;background:none;border:none;border-radius:4px;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:inherit;height:28px;outline:none;padding:6px 5px;transition:all .2s}.btn>span[vf-d94b56]{white-space:nowrap}.btn[vf-d94b56]:hover{background:rgba(0,0,0,.1)}.btn-arrow[vf-d94b56]{position:relative;transform:rotate(0);transform-origin:50%;width:1em}.btn.active[vf-d94b56]{background:rgba(0,0,0,.1)}.btn.active .btn-arrow[vf-d94b56]{transform:rotate(180deg)}.btn.highlight[vf-d94b56]{background-color:rgba(41,110,255,.063);color:#296eff}.component-toolbar[vf-ac7e8d]{position:relative;z-index:3}.toolbar[vf-ac7e8d]{background:#fff;border:1px solid #dee0e3;border-radius:5px;bottom:10px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:14px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateY(10px)}.toolbar.active[vf-ac7e8d]{opacity:1;pointer-events:auto;transform:translateY(0);transition-duration:.2s;transition-property:all;transition-timing-function:ease}.divider[vf-ede279]{border-top:1px solid #eee;margin:6px 0}.drag-resize[vf-
|
|
1
|
+
.btn[vf-d94b56]{align-items:center;background:none;border:none;border-radius:4px;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:inherit;height:28px;outline:none;padding:6px 5px;transition:all .2s}.btn>span[vf-d94b56]{white-space:nowrap}.btn[vf-d94b56]:hover{background:rgba(0,0,0,.1)}.btn-arrow[vf-d94b56]{position:relative;transform:rotate(0);transform-origin:50%;width:1em}.btn.active[vf-d94b56]{background:rgba(0,0,0,.1)}.btn.active .btn-arrow[vf-d94b56]{transform:rotate(180deg)}.btn.highlight[vf-d94b56]{background-color:rgba(41,110,255,.063);color:#296eff}.component-toolbar[vf-ac7e8d]{position:relative;z-index:3}.toolbar[vf-ac7e8d]{background:#fff;border:1px solid #dee0e3;border-radius:5px;bottom:10px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:14px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateY(10px)}.toolbar.active[vf-ac7e8d]{opacity:1;pointer-events:auto;transform:translateY(0);transition-duration:.2s;transition-property:all;transition-timing-function:ease}.divider[vf-ede279]{border-top:1px solid #eee;margin:6px 0}.drag-resize[vf-8abf2c]{position:relative;width:100%}.drag-resize .container[vf-8abf2c]{font-size:0;text-indent:0}.drag-resize .resize-tool[vf-8abf2c]{align-items:center;border:1px dashed #296eff;display:none;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:100%}.drag-resize .resize-tool.active[vf-8abf2c]{display:flex}.drag-resize .mask[vf-8abf2c]{background-color:rgba(0,0,0,.8);border-radius:3px;color:#fff;font-size:14px;padding:3px 8px;pointer-events:none;position:relative;text-shadow:1px 2px 3px rgba(0,0,0,.7);user-select:none;white-space:nowrap;z-index:10}.drag-resize .btn-group[vf-8abf2c]{height:100%;left:0;position:absolute;top:0;width:100%}.drag-resize button[vf-8abf2c]{background:#fff;border:2px solid #296eff;border-radius:50%;box-sizing:border-box;cursor:pointer;font-size:0;height:14px;outline:none;padding:0;pointer-events:auto;position:absolute;width:14px}.drag-resize button[vf-8abf2c]:hover{background-color:#fff;box-shadow:0 0 0 3px rgba(18,150,219,.3)}.drag-resize button[vf-8abf2c]:first-child,.drag-resize button[vf-8abf2c]:nth-child(2),.drag-resize button[vf-8abf2c]:nth-child(3){margin-top:-5px;top:0}.drag-resize button[vf-8abf2c]:nth-child(3),.drag-resize button[vf-8abf2c]:nth-child(4),.drag-resize button[vf-8abf2c]:nth-child(5){margin-right:-5px;right:0}.drag-resize button[vf-8abf2c]:nth-child(5),.drag-resize button[vf-8abf2c]:nth-child(6),.drag-resize button[vf-8abf2c]:nth-child(7){bottom:0;margin-bottom:-5px}.drag-resize button[vf-8abf2c]:first-child,.drag-resize button[vf-8abf2c]:nth-child(7),.drag-resize button[vf-8abf2c]:nth-child(8){left:0;margin-left:-5px}.drag-resize button[vf-8abf2c]:nth-child(2),.drag-resize button[vf-8abf2c]:nth-child(6){left:50%;margin-left:-5px}.drag-resize button[vf-8abf2c]:nth-child(4),.drag-resize button[vf-8abf2c]:nth-child(8){margin-top:-5px;top:50%}.drag-resize button[vf-8abf2c]:first-child{cursor:nw-resize}.drag-resize button[vf-8abf2c]:nth-child(2){cursor:n-resize}.drag-resize button[vf-8abf2c]:nth-child(3){cursor:ne-resize}.drag-resize button[vf-8abf2c]:nth-child(4){cursor:e-resize}.drag-resize button[vf-8abf2c]:nth-child(5){cursor:se-resize}.drag-resize button[vf-8abf2c]:nth-child(6){cursor:s-resize}.drag-resize button[vf-8abf2c]:nth-child(7){cursor:sw-resize}.drag-resize button[vf-8abf2c]:nth-child(8){cursor:w-resize}.dropdown[vf-a99c5e]{display:inline-block;position:relative}.dropdown[vf-a99c5e]:hover{z-index:1}.dropdown-btn[vf-a99c5e]{display:flex;width:100%}.dropdown-btn-inner[vf-a99c5e]{flex:1}.dropdown-menu[vf-8a05e9]{background:#fff;border:1px solid #ddd;border-radius:5px;box-shadow:2px 3px 5px rgba(0,0,0,.1);box-sizing:content-box;height:0;left:-10px;max-height:400px;opacity:0;overflow-y:auto;position:absolute;top:100%;transition-duration:0s;transition:transform .3s,opacity .3s;user-select:none;width:200px;z-index:10}.dropdown-menu[vf-8a05e9]:hover::-webkit-scrollbar-thumb{background-color:#80848f}.dropdown-menu[vf-8a05e9]::-webkit-scrollbar-thumb{border:0;border-radius:4px;height:50px;outline:0;outline-offset:0}.dropdown-menu[vf-8a05e9]::-webkit-scrollbar-thumb:hover{background-color:#495060;height:50px}.dropdown-menu[vf-8a05e9]::-webkit-scrollbar{border-radius:3px;height:6px;width:6px}.dropdown-menu-content[vf-8a05e9]{box-sizing:content-box;padding:6px}.keymap[vf-c32a7b]{align-items:center;display:inline-flex;font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace;font-size:.9em;margin-left:1em;opacity:.6}.keymap[vf-c32a7b] span{margin:0 2px}.menu-heading[vf-acaa5f]{font-size:14px;opacity:.5;padding:10px}.menu-item[vf-c3b9dc]{border-radius:4px;box-sizing:content-box;cursor:pointer;display:flex;font-size:14px;height:26px;justify-content:space-between;line-height:26px;padding:2px 10px;transition:background-color .2s}.menu-item-content[vf-c3b9dc]{display:flex;flex:1;justify-content:space-between}.menu-item.disabled[vf-c3b9dc]{cursor:not-allowed;opacity:.5}.menu-item[vf-c3b9dc]:hover{background:#eee}.menu-item.active[vf-c3b9dc]{background:rgba(0,0,0,.1)}.menu-icon[vf-c3b9dc]{display:inline-block;width:1.8em}.menu-check[vf-c3b9dc]{display:none}.menu-check.checked[vf-c3b9dc]{color:#296eff;display:block}.popup[vf-a23c47]{background:#fff;border:1px solid #ddd;border-radius:5px;box-shadow:2px 3px 5px rgba(0,0,0,.1);overflow:hidden;position:absolute}.toolbar-item[vf-216815]{padding:3px}.heading-icon[vf-2a8a65]{font-size:1.2em;font-weight:700}.heading-icon sub[vf-2a8a65]{font-weight:400}.xnote-source-code.atom-one-dark pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.atom-one-dark code.hljs{padding:3px 5px}.xnote-source-code.atom-one-dark .hljs{background:#282c34;color:#abb2bf}.xnote-source-code.atom-one-dark .hljs-comment,.xnote-source-code.atom-one-dark .hljs-quote{color:#5c6370;font-style:italic}.xnote-source-code.atom-one-dark .hljs-doctag,.xnote-source-code.atom-one-dark .hljs-formula,.xnote-source-code.atom-one-dark .hljs-keyword{color:#c678dd}.xnote-source-code.atom-one-dark .hljs-deletion,.xnote-source-code.atom-one-dark .hljs-name,.xnote-source-code.atom-one-dark .hljs-section,.xnote-source-code.atom-one-dark .hljs-selector-tag,.xnote-source-code.atom-one-dark .hljs-subst{color:#e06c75}.xnote-source-code.atom-one-dark .hljs-literal{color:#56b6c2}.xnote-source-code.atom-one-dark .hljs-addition,.xnote-source-code.atom-one-dark .hljs-attribute,.xnote-source-code.atom-one-dark .hljs-meta .hljs-string,.xnote-source-code.atom-one-dark .hljs-regexp,.xnote-source-code.atom-one-dark .hljs-string{color:#98c379}.xnote-source-code.atom-one-dark .hljs-attr,.xnote-source-code.atom-one-dark .hljs-number,.xnote-source-code.atom-one-dark .hljs-selector-attr,.xnote-source-code.atom-one-dark .hljs-selector-class,.xnote-source-code.atom-one-dark .hljs-selector-pseudo,.xnote-source-code.atom-one-dark .hljs-template-variable,.xnote-source-code.atom-one-dark .hljs-type,.xnote-source-code.atom-one-dark .hljs-variable{color:#d19a66}.xnote-source-code.atom-one-dark .hljs-bullet,.xnote-source-code.atom-one-dark .hljs-link,.xnote-source-code.atom-one-dark .hljs-meta,.xnote-source-code.atom-one-dark .hljs-selector-id,.xnote-source-code.atom-one-dark .hljs-symbol,.xnote-source-code.atom-one-dark .hljs-title{color:#61aeee}.xnote-source-code.atom-one-dark .hljs-built_in,.xnote-source-code.atom-one-dark .hljs-class .hljs-title,.xnote-source-code.atom-one-dark .hljs-title.class_{color:#e6c07b}.xnote-source-code.atom-one-dark .hljs-emphasis{font-style:italic}.xnote-source-code.atom-one-dark .hljs-strong{font-weight:700}.xnote-source-code.atom-one-dark .hljs-link{text-decoration:underline}.xnote-source-code.foundation pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.foundation code.hljs{padding:3px 5px}.xnote-source-code.foundation .hljs{background:#eee;color:#000}.xnote-source-code.foundation .hljs-addition,.xnote-source-code.foundation .hljs-attribute,.xnote-source-code.foundation .hljs-emphasis,.xnote-source-code.foundation .hljs-link{color:#070}.xnote-source-code.foundation .hljs-emphasis{font-style:italic}.xnote-source-code.foundation .hljs-deletion,.xnote-source-code.foundation .hljs-string,.xnote-source-code.foundation .hljs-strong{color:#d14}.xnote-source-code.foundation .hljs-strong{font-weight:700}.xnote-source-code.foundation .hljs-comment,.xnote-source-code.foundation .hljs-quote{color:#998;font-style:italic}.xnote-source-code.foundation .hljs-section,.xnote-source-code.foundation .hljs-title{color:#900}.xnote-source-code.foundation .hljs-class .hljs-title,.xnote-source-code.foundation .hljs-title.class_,.xnote-source-code.foundation .hljs-type{color:#458}.xnote-source-code.foundation .hljs-template-variable,.xnote-source-code.foundation .hljs-variable{color:#369}.xnote-source-code.foundation .hljs-bullet{color:#970}.xnote-source-code.foundation .hljs-meta{color:#34b}.xnote-source-code.foundation .hljs-code,.xnote-source-code.foundation .hljs-keyword,.xnote-source-code.foundation .hljs-literal,.xnote-source-code.foundation .hljs-number,.xnote-source-code.foundation .hljs-selector-tag{color:#099}.xnote-source-code.foundation .hljs-regexp{background-color:#fff0ff;color:#808}.xnote-source-code.foundation .hljs-symbol{color:#990073}.xnote-source-code.foundation .hljs-name,.xnote-source-code.foundation .hljs-selector-class,.xnote-source-code.foundation .hljs-selector-id,.xnote-source-code.foundation .hljs-tag{color:#070}.xnote-source-code.github{
|
|
2
2
|
/*!
|
|
3
3
|
Theme: GitHub
|
|
4
4
|
Description: Light theme as seen on github.com
|
package/bundles/index.esm.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.btn[vf-d94b56]{align-items:center;background:none;border:none;border-radius:4px;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:inherit;height:28px;outline:none;padding:6px 5px;transition:all .2s}.btn>span[vf-d94b56]{white-space:nowrap}.btn[vf-d94b56]:hover{background:rgba(0,0,0,.1)}.btn-arrow[vf-d94b56]{position:relative;transform:rotate(0);transform-origin:50%;width:1em}.btn.active[vf-d94b56]{background:rgba(0,0,0,.1)}.btn.active .btn-arrow[vf-d94b56]{transform:rotate(180deg)}.btn.highlight[vf-d94b56]{background-color:rgba(41,110,255,.063);color:#296eff}.component-toolbar[vf-ac7e8d]{position:relative;z-index:3}.toolbar[vf-ac7e8d]{background:#fff;border:1px solid #dee0e3;border-radius:5px;bottom:10px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:14px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateY(10px)}.toolbar.active[vf-ac7e8d]{opacity:1;pointer-events:auto;transform:translateY(0);transition-duration:.2s;transition-property:all;transition-timing-function:ease}.divider[vf-ede279]{border-top:1px solid #eee;margin:6px 0}.drag-resize[vf-
|
|
1
|
+
.btn[vf-d94b56]{align-items:center;background:none;border:none;border-radius:4px;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:inherit;height:28px;outline:none;padding:6px 5px;transition:all .2s}.btn>span[vf-d94b56]{white-space:nowrap}.btn[vf-d94b56]:hover{background:rgba(0,0,0,.1)}.btn-arrow[vf-d94b56]{position:relative;transform:rotate(0);transform-origin:50%;width:1em}.btn.active[vf-d94b56]{background:rgba(0,0,0,.1)}.btn.active .btn-arrow[vf-d94b56]{transform:rotate(180deg)}.btn.highlight[vf-d94b56]{background-color:rgba(41,110,255,.063);color:#296eff}.component-toolbar[vf-ac7e8d]{position:relative;z-index:3}.toolbar[vf-ac7e8d]{background:#fff;border:1px solid #dee0e3;border-radius:5px;bottom:10px;box-shadow:0 4px 8px rgba(0,0,0,.08);box-sizing:border-box;display:flex;font-size:14px;height:36px;opacity:0;padding:0 6px;pointer-events:none;position:absolute;text-align:left;transform:translateY(10px)}.toolbar.active[vf-ac7e8d]{opacity:1;pointer-events:auto;transform:translateY(0);transition-duration:.2s;transition-property:all;transition-timing-function:ease}.divider[vf-ede279]{border-top:1px solid #eee;margin:6px 0}.drag-resize[vf-8abf2c]{position:relative;width:100%}.drag-resize .container[vf-8abf2c]{font-size:0;text-indent:0}.drag-resize .resize-tool[vf-8abf2c]{align-items:center;border:1px dashed #296eff;display:none;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:100%}.drag-resize .resize-tool.active[vf-8abf2c]{display:flex}.drag-resize .mask[vf-8abf2c]{background-color:rgba(0,0,0,.8);border-radius:3px;color:#fff;font-size:14px;padding:3px 8px;pointer-events:none;position:relative;text-shadow:1px 2px 3px rgba(0,0,0,.7);user-select:none;white-space:nowrap;z-index:10}.drag-resize .btn-group[vf-8abf2c]{height:100%;left:0;position:absolute;top:0;width:100%}.drag-resize button[vf-8abf2c]{background:#fff;border:2px solid #296eff;border-radius:50%;box-sizing:border-box;cursor:pointer;font-size:0;height:14px;outline:none;padding:0;pointer-events:auto;position:absolute;width:14px}.drag-resize button[vf-8abf2c]:hover{background-color:#fff;box-shadow:0 0 0 3px rgba(18,150,219,.3)}.drag-resize button[vf-8abf2c]:first-child,.drag-resize button[vf-8abf2c]:nth-child(2),.drag-resize button[vf-8abf2c]:nth-child(3){margin-top:-5px;top:0}.drag-resize button[vf-8abf2c]:nth-child(3),.drag-resize button[vf-8abf2c]:nth-child(4),.drag-resize button[vf-8abf2c]:nth-child(5){margin-right:-5px;right:0}.drag-resize button[vf-8abf2c]:nth-child(5),.drag-resize button[vf-8abf2c]:nth-child(6),.drag-resize button[vf-8abf2c]:nth-child(7){bottom:0;margin-bottom:-5px}.drag-resize button[vf-8abf2c]:first-child,.drag-resize button[vf-8abf2c]:nth-child(7),.drag-resize button[vf-8abf2c]:nth-child(8){left:0;margin-left:-5px}.drag-resize button[vf-8abf2c]:nth-child(2),.drag-resize button[vf-8abf2c]:nth-child(6){left:50%;margin-left:-5px}.drag-resize button[vf-8abf2c]:nth-child(4),.drag-resize button[vf-8abf2c]:nth-child(8){margin-top:-5px;top:50%}.drag-resize button[vf-8abf2c]:first-child{cursor:nw-resize}.drag-resize button[vf-8abf2c]:nth-child(2){cursor:n-resize}.drag-resize button[vf-8abf2c]:nth-child(3){cursor:ne-resize}.drag-resize button[vf-8abf2c]:nth-child(4){cursor:e-resize}.drag-resize button[vf-8abf2c]:nth-child(5){cursor:se-resize}.drag-resize button[vf-8abf2c]:nth-child(6){cursor:s-resize}.drag-resize button[vf-8abf2c]:nth-child(7){cursor:sw-resize}.drag-resize button[vf-8abf2c]:nth-child(8){cursor:w-resize}.dropdown[vf-a99c5e]{display:inline-block;position:relative}.dropdown[vf-a99c5e]:hover{z-index:1}.dropdown-btn[vf-a99c5e]{display:flex;width:100%}.dropdown-btn-inner[vf-a99c5e]{flex:1}.dropdown-menu[vf-8a05e9]{background:#fff;border:1px solid #ddd;border-radius:5px;box-shadow:2px 3px 5px rgba(0,0,0,.1);box-sizing:content-box;height:0;left:-10px;max-height:400px;opacity:0;overflow-y:auto;position:absolute;top:100%;transition-duration:0s;transition:transform .3s,opacity .3s;user-select:none;width:200px;z-index:10}.dropdown-menu[vf-8a05e9]:hover::-webkit-scrollbar-thumb{background-color:#80848f}.dropdown-menu[vf-8a05e9]::-webkit-scrollbar-thumb{border:0;border-radius:4px;height:50px;outline:0;outline-offset:0}.dropdown-menu[vf-8a05e9]::-webkit-scrollbar-thumb:hover{background-color:#495060;height:50px}.dropdown-menu[vf-8a05e9]::-webkit-scrollbar{border-radius:3px;height:6px;width:6px}.dropdown-menu-content[vf-8a05e9]{box-sizing:content-box;padding:6px}.keymap[vf-c32a7b]{align-items:center;display:inline-flex;font-family:Microsoft YaHei Mono,Menlo,Monaco,Consolas,Courier New,monospace;font-size:.9em;margin-left:1em;opacity:.6}.keymap[vf-c32a7b] span{margin:0 2px}.menu-heading[vf-acaa5f]{font-size:14px;opacity:.5;padding:10px}.menu-item[vf-c3b9dc]{border-radius:4px;box-sizing:content-box;cursor:pointer;display:flex;font-size:14px;height:26px;justify-content:space-between;line-height:26px;padding:2px 10px;transition:background-color .2s}.menu-item-content[vf-c3b9dc]{display:flex;flex:1;justify-content:space-between}.menu-item.disabled[vf-c3b9dc]{cursor:not-allowed;opacity:.5}.menu-item[vf-c3b9dc]:hover{background:#eee}.menu-item.active[vf-c3b9dc]{background:rgba(0,0,0,.1)}.menu-icon[vf-c3b9dc]{display:inline-block;width:1.8em}.menu-check[vf-c3b9dc]{display:none}.menu-check.checked[vf-c3b9dc]{color:#296eff;display:block}.popup[vf-a23c47]{background:#fff;border:1px solid #ddd;border-radius:5px;box-shadow:2px 3px 5px rgba(0,0,0,.1);overflow:hidden;position:absolute}.toolbar-item[vf-216815]{padding:3px}.heading-icon[vf-2a8a65]{font-size:1.2em;font-weight:700}.heading-icon sub[vf-2a8a65]{font-weight:400}.xnote-source-code.atom-one-dark pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.atom-one-dark code.hljs{padding:3px 5px}.xnote-source-code.atom-one-dark .hljs{background:#282c34;color:#abb2bf}.xnote-source-code.atom-one-dark .hljs-comment,.xnote-source-code.atom-one-dark .hljs-quote{color:#5c6370;font-style:italic}.xnote-source-code.atom-one-dark .hljs-doctag,.xnote-source-code.atom-one-dark .hljs-formula,.xnote-source-code.atom-one-dark .hljs-keyword{color:#c678dd}.xnote-source-code.atom-one-dark .hljs-deletion,.xnote-source-code.atom-one-dark .hljs-name,.xnote-source-code.atom-one-dark .hljs-section,.xnote-source-code.atom-one-dark .hljs-selector-tag,.xnote-source-code.atom-one-dark .hljs-subst{color:#e06c75}.xnote-source-code.atom-one-dark .hljs-literal{color:#56b6c2}.xnote-source-code.atom-one-dark .hljs-addition,.xnote-source-code.atom-one-dark .hljs-attribute,.xnote-source-code.atom-one-dark .hljs-meta .hljs-string,.xnote-source-code.atom-one-dark .hljs-regexp,.xnote-source-code.atom-one-dark .hljs-string{color:#98c379}.xnote-source-code.atom-one-dark .hljs-attr,.xnote-source-code.atom-one-dark .hljs-number,.xnote-source-code.atom-one-dark .hljs-selector-attr,.xnote-source-code.atom-one-dark .hljs-selector-class,.xnote-source-code.atom-one-dark .hljs-selector-pseudo,.xnote-source-code.atom-one-dark .hljs-template-variable,.xnote-source-code.atom-one-dark .hljs-type,.xnote-source-code.atom-one-dark .hljs-variable{color:#d19a66}.xnote-source-code.atom-one-dark .hljs-bullet,.xnote-source-code.atom-one-dark .hljs-link,.xnote-source-code.atom-one-dark .hljs-meta,.xnote-source-code.atom-one-dark .hljs-selector-id,.xnote-source-code.atom-one-dark .hljs-symbol,.xnote-source-code.atom-one-dark .hljs-title{color:#61aeee}.xnote-source-code.atom-one-dark .hljs-built_in,.xnote-source-code.atom-one-dark .hljs-class .hljs-title,.xnote-source-code.atom-one-dark .hljs-title.class_{color:#e6c07b}.xnote-source-code.atom-one-dark .hljs-emphasis{font-style:italic}.xnote-source-code.atom-one-dark .hljs-strong{font-weight:700}.xnote-source-code.atom-one-dark .hljs-link{text-decoration:underline}.xnote-source-code.foundation pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.foundation code.hljs{padding:3px 5px}.xnote-source-code.foundation .hljs{background:#eee;color:#000}.xnote-source-code.foundation .hljs-addition,.xnote-source-code.foundation .hljs-attribute,.xnote-source-code.foundation .hljs-emphasis,.xnote-source-code.foundation .hljs-link{color:#070}.xnote-source-code.foundation .hljs-emphasis{font-style:italic}.xnote-source-code.foundation .hljs-deletion,.xnote-source-code.foundation .hljs-string,.xnote-source-code.foundation .hljs-strong{color:#d14}.xnote-source-code.foundation .hljs-strong{font-weight:700}.xnote-source-code.foundation .hljs-comment,.xnote-source-code.foundation .hljs-quote{color:#998;font-style:italic}.xnote-source-code.foundation .hljs-section,.xnote-source-code.foundation .hljs-title{color:#900}.xnote-source-code.foundation .hljs-class .hljs-title,.xnote-source-code.foundation .hljs-title.class_,.xnote-source-code.foundation .hljs-type{color:#458}.xnote-source-code.foundation .hljs-template-variable,.xnote-source-code.foundation .hljs-variable{color:#369}.xnote-source-code.foundation .hljs-bullet{color:#970}.xnote-source-code.foundation .hljs-meta{color:#34b}.xnote-source-code.foundation .hljs-code,.xnote-source-code.foundation .hljs-keyword,.xnote-source-code.foundation .hljs-literal,.xnote-source-code.foundation .hljs-number,.xnote-source-code.foundation .hljs-selector-tag{color:#099}.xnote-source-code.foundation .hljs-regexp{background-color:#fff0ff;color:#808}.xnote-source-code.foundation .hljs-symbol{color:#990073}.xnote-source-code.foundation .hljs-name,.xnote-source-code.foundation .hljs-selector-class,.xnote-source-code.foundation .hljs-selector-id,.xnote-source-code.foundation .hljs-tag{color:#070}.xnote-source-code.github{
|
|
2
2
|
/*!
|
|
3
3
|
Theme: GitHub
|
|
4
4
|
Description: Light theme as seen on github.com
|
package/bundles/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from '@viewfly/core/jsx-runtime';
|
|
2
2
|
import { withScopedCSS } from '@viewfly/scoped-css';
|
|
3
|
-
import { Injectable, InjectFlags, Injector, inject, createSignal, onUnmounted, createRef, withAnnotation, onUpdated, onMounted, InjectionToken,
|
|
4
|
-
import { Subject, Selection, fromEvent, Subscription, Attribute, Keyboard, Commander, Controller, useContext, onBreak, onContentInsert, ContentType,
|
|
3
|
+
import { Injectable, InjectFlags, Injector, inject, createSignal, onUnmounted, createRef, withAnnotation, onUpdated, onMounted, InjectionToken, ReflectiveInjector, createDynamicRef, jsx as jsx$1, viewfly, getCurrentInstance, watch } from '@viewfly/core';
|
|
4
|
+
import { Subject, Selection, fromEvent, Subscription, Attribute, Keyboard, Commander, Controller, useContext, onBreak, onContentInsert, ContentType, Slot, Component, Registry, Query, QueryStateType, createVNode, BehaviorSubject, onSlotApplyFormat, onSlotSetAttribute, onPaste, onFocus, onBlur, useDynamicShortcut, VTextNode, onFocusIn, onFocusOut, onDestroy, onGetRanges, Formatter, onParentSlotUpdated, Textbus, RootComponentRef, filter, map, distinctUntilChanged, sampleTime, merge, debounceTime, throttleTime, delay, onContentInserted, onContentDeleted, switchMap, fromPromise, onCompositionStart } from '@textbus/core';
|
|
5
5
|
import { VIEW_CONTAINER, isMac, DomAdapter, Input, SelectionBridge, BrowserModule, VIEW_DOCUMENT, CollaborateSelectionAwarenessDelegate, isMobileBrowser, Parser } from '@textbus/platform-browser';
|
|
6
6
|
import { createPortal, createApp, DomRenderer, HTMLRenderer, OutputTranslator } from '@viewfly/platform-browser';
|
|
7
7
|
import { useProduce } from '@viewfly/hooks';
|
|
@@ -30,18 +30,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
30
30
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
function __rest(s, e) {
|
|
34
|
-
var t = {};
|
|
35
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
36
|
-
t[p] = s[p];
|
|
37
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
38
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
39
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
40
|
-
t[p[i]] = s[p[i]];
|
|
41
|
-
}
|
|
42
|
-
return t;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
33
|
function __decorate(decorators, target, key, desc) {
|
|
46
34
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
47
35
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -177,7 +165,7 @@ function Divider() {
|
|
|
177
165
|
});
|
|
178
166
|
}
|
|
179
167
|
|
|
180
|
-
var scopedId$k = "vf-
|
|
168
|
+
var scopedId$k = "vf-8abf2c";
|
|
181
169
|
|
|
182
170
|
function DragResize(props) {
|
|
183
171
|
const isShow = createSignal(false);
|
|
@@ -198,7 +186,7 @@ function DragResize(props) {
|
|
|
198
186
|
isShow.set(true);
|
|
199
187
|
const width = ref.current.offsetWidth;
|
|
200
188
|
const height = ref.current.offsetHeight;
|
|
201
|
-
|
|
189
|
+
sizeText.set(`${Math.round(width)}px * ${Math.round(height)}px`);
|
|
202
190
|
});
|
|
203
191
|
function selectComponent() {
|
|
204
192
|
selection.selectComponent(component, true);
|
|
@@ -275,7 +263,7 @@ function DragResize(props) {
|
|
|
275
263
|
}
|
|
276
264
|
ele.style.width = endWidth + 'px';
|
|
277
265
|
ele.style.height = endHeight + 'px';
|
|
278
|
-
|
|
266
|
+
sizeText.set(`${Math.round(endWidth)}px * ${Math.round(endHeight)}px`);
|
|
279
267
|
});
|
|
280
268
|
const unUp = fromEvent(document, 'mouseup').subscribe(() => {
|
|
281
269
|
component.state.width = endWidth + 'px';
|
|
@@ -285,10 +273,11 @@ function DragResize(props) {
|
|
|
285
273
|
unUp.unsubscribe();
|
|
286
274
|
});
|
|
287
275
|
}
|
|
276
|
+
const sizeText = createSignal(`${component.state.width}*${component.state.height}`);
|
|
288
277
|
return withScopedCSS(scopedId$k, () => {
|
|
289
278
|
return (jsxs("div", { class: "drag-resize", onClick: selectComponent, children: [jsx("div", { class: "container", ref: ref, children: props.children }), jsxs("div", { class: ['resize-tool', {
|
|
290
279
|
active: isShow()
|
|
291
|
-
}], children: [
|
|
280
|
+
}], children: [jsx("div", { class: "mask", ref: mask, children: sizeText() }), jsxs("div", { class: "btn-group", ref: btnGroup, onMousedown: drag, children: [jsx("button", { type: "button" }), jsx("button", { type: "button" }), jsx("button", { type: "button" }), jsx("button", { type: "button" }), jsx("button", { type: "button" }), jsx("button", { type: "button" }), jsx("button", { type: "button" }), jsx("button", { type: "button" })] })] })] }));
|
|
292
281
|
});
|
|
293
282
|
}
|
|
294
283
|
|
|
@@ -712,23 +701,6 @@ function useBlockContent(slot) {
|
|
|
712
701
|
});
|
|
713
702
|
}
|
|
714
703
|
|
|
715
|
-
function SlotRender(props) {
|
|
716
|
-
const adaper = inject(DomAdapter);
|
|
717
|
-
const instance = getCurrentInstance();
|
|
718
|
-
const sub = props.slot.__changeMarker__.onChange.subscribe(() => {
|
|
719
|
-
instance.markAsDirtied();
|
|
720
|
-
});
|
|
721
|
-
onUnmounted(() => {
|
|
722
|
-
sub.unsubscribe();
|
|
723
|
-
});
|
|
724
|
-
return () => {
|
|
725
|
-
const { slot, tag = 'div', renderEnv = false, elRef, elKey } = props, rest = __rest(props, ["slot", "tag", "renderEnv", "elRef", "elKey"]);
|
|
726
|
-
return adaper.slotRender(slot, children => {
|
|
727
|
-
return createVNode(tag, Object.assign({ ref: elRef, key: elKey }, rest), children);
|
|
728
|
-
}, renderEnv);
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
|
|
732
704
|
class BlockquoteComponent extends Component {
|
|
733
705
|
static fromJSON(textbus, json) {
|
|
734
706
|
const slot = textbus.get(Registry).createSlot(json.slot);
|
|
@@ -743,6 +715,9 @@ class BlockquoteComponent extends Component {
|
|
|
743
715
|
}) {
|
|
744
716
|
super(textbus, state);
|
|
745
717
|
}
|
|
718
|
+
getSlots() {
|
|
719
|
+
return [this.state.slot];
|
|
720
|
+
}
|
|
746
721
|
setup() {
|
|
747
722
|
useBlockContent(this.state.slot);
|
|
748
723
|
}
|
|
@@ -783,7 +758,7 @@ function toBlockquote(textbus) {
|
|
|
783
758
|
const index = parent.indexOf(current);
|
|
784
759
|
parent.retain(index);
|
|
785
760
|
commander.removeComponent(current);
|
|
786
|
-
current.
|
|
761
|
+
current.slots.at(0).sliceContent().forEach(i => {
|
|
787
762
|
parent.insert(i);
|
|
788
763
|
});
|
|
789
764
|
}
|
|
@@ -822,11 +797,14 @@ function registerBlockquoteShortcut(textbus) {
|
|
|
822
797
|
});
|
|
823
798
|
}
|
|
824
799
|
function BlockquoteView(props) {
|
|
800
|
+
const adapter = inject(DomAdapter);
|
|
825
801
|
const readonly = useReadonly();
|
|
826
802
|
const output = useOutput();
|
|
827
803
|
return () => {
|
|
828
804
|
const slot = props.component.state.slot;
|
|
829
|
-
return (jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children:
|
|
805
|
+
return (jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children: adapter.slotRender(slot, children => {
|
|
806
|
+
return createVNode('div', null, children);
|
|
807
|
+
}, readonly() || output()) }));
|
|
830
808
|
};
|
|
831
809
|
}
|
|
832
810
|
const blockquoteComponentLoader = {
|
|
@@ -866,6 +844,9 @@ class HighlightBoxComponent extends Component {
|
|
|
866
844
|
}) {
|
|
867
845
|
super(textbus, state);
|
|
868
846
|
}
|
|
847
|
+
getSlots() {
|
|
848
|
+
return [this.state.slot];
|
|
849
|
+
}
|
|
869
850
|
setup() {
|
|
870
851
|
useBlockContent(this.state.slot);
|
|
871
852
|
}
|
|
@@ -874,6 +855,7 @@ HighlightBoxComponent.defaultTypes = ['❤️', '💡', '📌', '✅', '❎', '
|
|
|
874
855
|
HighlightBoxComponent.componentName = 'HighlightBoxComponent';
|
|
875
856
|
HighlightBoxComponent.type = ContentType.BlockComponent;
|
|
876
857
|
function HighlightBoxView(props) {
|
|
858
|
+
const adapter = inject(DomAdapter);
|
|
877
859
|
const readonly = useReadonly();
|
|
878
860
|
const output = useOutput();
|
|
879
861
|
const emoji = [];
|
|
@@ -889,14 +871,22 @@ function HighlightBoxView(props) {
|
|
|
889
871
|
return () => {
|
|
890
872
|
const { state, name } = props.component;
|
|
891
873
|
if (readonly() || output()) {
|
|
892
|
-
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("div", { class: "xnote-highlight-box-icon", children: jsx("button", { type: "button", children: state.type || '❤️' }) }) }),
|
|
874
|
+
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("div", { class: "xnote-highlight-box-icon", children: jsx("button", { type: "button", children: state.type || '❤️' }) }) }), adapter.slotRender(state.slot, children => {
|
|
875
|
+
return createVNode('div', {
|
|
876
|
+
class: 'xnote-highlight-box-content'
|
|
877
|
+
}, children);
|
|
878
|
+
}, readonly() || output())] }));
|
|
893
879
|
}
|
|
894
880
|
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: "282px", menu: jsxs("div", { class: "xnote-highlight-box-icons", children: [jsx("div", { class: "xnote-highlight-box-heading", children: "\u5E38\u7528" }), HighlightBoxComponent.defaultTypes.map(icon => {
|
|
895
881
|
return (jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
|
|
896
882
|
}), jsx("div", { class: "xnote-highlight-box-heading", children: "\u66F4\u591A" }), emoji.map(i => {
|
|
897
883
|
const icon = String.fromCodePoint(i);
|
|
898
884
|
return (jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
|
|
899
|
-
})] }), children: jsx("div", { class: "xnote-highlight-box-icon", children: jsx("button", { type: "button", children: state.type || '❤️' }) }) }) }),
|
|
885
|
+
})] }), children: jsx("div", { class: "xnote-highlight-box-icon", children: jsx("button", { type: "button", children: state.type || '❤️' }) }) }) }), adapter.slotRender(state.slot, children => {
|
|
886
|
+
return createVNode('div', {
|
|
887
|
+
class: 'xnote-highlight-box-content'
|
|
888
|
+
}, children);
|
|
889
|
+
}, readonly() || output())] }));
|
|
900
890
|
};
|
|
901
891
|
}
|
|
902
892
|
const highlightBoxComponentLoader = {
|
|
@@ -937,6 +927,9 @@ class ParagraphComponent extends Component {
|
|
|
937
927
|
}) {
|
|
938
928
|
super(textbus, state);
|
|
939
929
|
}
|
|
930
|
+
getSlots() {
|
|
931
|
+
return [this.state.slot];
|
|
932
|
+
}
|
|
940
933
|
setup() {
|
|
941
934
|
const injector = useContext();
|
|
942
935
|
const commander = injector.get(Commander);
|
|
@@ -964,11 +957,14 @@ class ParagraphComponent extends Component {
|
|
|
964
957
|
ParagraphComponent.componentName = 'ParagraphComponent';
|
|
965
958
|
ParagraphComponent.type = ContentType.BlockComponent;
|
|
966
959
|
function ParagraphView(props) {
|
|
960
|
+
const adapter = inject(DomAdapter);
|
|
967
961
|
const readonly = useReadonly();
|
|
968
962
|
const output = useOutput();
|
|
969
963
|
return () => {
|
|
970
964
|
const slot = props.component.state.slot;
|
|
971
|
-
return (jsx("div", { class: "xnote-paragraph", ref: props.rootRef, "data-component": ParagraphComponent.componentName, children:
|
|
965
|
+
return (jsx("div", { class: "xnote-paragraph", ref: props.rootRef, "data-component": ParagraphComponent.componentName, children: adapter.slotRender(slot, children => {
|
|
966
|
+
return (createVNode('div', null, children));
|
|
967
|
+
}, readonly() || output()) }));
|
|
972
968
|
};
|
|
973
969
|
}
|
|
974
970
|
const paragraphComponentLoader = {
|
|
@@ -1182,6 +1178,9 @@ class SourceCodeComponent extends Component {
|
|
|
1182
1178
|
theme: json.theme
|
|
1183
1179
|
});
|
|
1184
1180
|
}
|
|
1181
|
+
getSlots() {
|
|
1182
|
+
return this.state.slots.map(i => i.slot);
|
|
1183
|
+
}
|
|
1185
1184
|
setup() {
|
|
1186
1185
|
const textbus = useContext();
|
|
1187
1186
|
const selection = useContext(Selection);
|
|
@@ -1820,6 +1819,9 @@ class TableComponent extends Component {
|
|
|
1820
1819
|
this.focus = new Subject();
|
|
1821
1820
|
this.tableSelection = createSignal(null);
|
|
1822
1821
|
}
|
|
1822
|
+
getSlots() {
|
|
1823
|
+
return this.state.rows.map(i => i.cells.map(j => j.slot)).flat();
|
|
1824
|
+
}
|
|
1823
1825
|
setup() {
|
|
1824
1826
|
const selection = useContext(Selection);
|
|
1825
1827
|
onFocusIn(() => {
|
|
@@ -2057,6 +2059,9 @@ class TodolistComponent extends Component {
|
|
|
2057
2059
|
checked: json.checked
|
|
2058
2060
|
});
|
|
2059
2061
|
}
|
|
2062
|
+
getSlots() {
|
|
2063
|
+
return [this.state.slot];
|
|
2064
|
+
}
|
|
2060
2065
|
setup() {
|
|
2061
2066
|
const textbus = useContext();
|
|
2062
2067
|
const commander = useContext(Commander);
|
|
@@ -2137,6 +2142,7 @@ TodolistComponent.zenCoding = {
|
|
|
2137
2142
|
}
|
|
2138
2143
|
};
|
|
2139
2144
|
function TodolistView(props) {
|
|
2145
|
+
const adapter = inject(DomAdapter);
|
|
2140
2146
|
const component = props.component;
|
|
2141
2147
|
const state = component.state;
|
|
2142
2148
|
function toggle() {
|
|
@@ -2165,7 +2171,11 @@ function TodolistView(props) {
|
|
|
2165
2171
|
marginLeft: indent * 24 + 'px',
|
|
2166
2172
|
justifyContent: align[component.state.slot.getAttribute(textAlignAttr)],
|
|
2167
2173
|
textAlign: component.state.slot.getAttribute(textAlignAttr) === 'justify' ? 'justify' : void 0
|
|
2168
|
-
}, children: [jsx("div", { class: "xnote-todolist-icon", onClick: toggle, children: jsx("span", { "data-checked": checked, class: [checked ? 'xnote-icon-checkbox-checked' : 'xnote-icon-checkbox-unchecked'] }) }),
|
|
2174
|
+
}, children: [jsx("div", { class: "xnote-todolist-icon", onClick: toggle, children: jsx("span", { "data-checked": checked, class: [checked ? 'xnote-icon-checkbox-checked' : 'xnote-icon-checkbox-unchecked'] }) }), adapter.slotRender(slot, children => {
|
|
2175
|
+
return createVNode('div', {
|
|
2176
|
+
class: 'xnote-todolist-content'
|
|
2177
|
+
}, children);
|
|
2178
|
+
}, readonly() || output())] }));
|
|
2169
2179
|
};
|
|
2170
2180
|
}
|
|
2171
2181
|
const todolistComponentLoader = {
|
|
@@ -2226,6 +2236,9 @@ class ListComponent extends Component {
|
|
|
2226
2236
|
slot: textbus.get(Registry).createSlot(json.slot)
|
|
2227
2237
|
});
|
|
2228
2238
|
}
|
|
2239
|
+
getSlots() {
|
|
2240
|
+
return [this.state.slot];
|
|
2241
|
+
}
|
|
2229
2242
|
setup() {
|
|
2230
2243
|
const textbus = useContext();
|
|
2231
2244
|
const commander = useContext(Commander);
|
|
@@ -2365,6 +2378,7 @@ function numberToLetter(num) {
|
|
|
2365
2378
|
}).join('');
|
|
2366
2379
|
}
|
|
2367
2380
|
function ListComponentView(props) {
|
|
2381
|
+
const adapter = inject(DomAdapter);
|
|
2368
2382
|
const component = props.component;
|
|
2369
2383
|
function reorder(is) {
|
|
2370
2384
|
component.state.reorder = is;
|
|
@@ -2438,7 +2452,11 @@ function ListComponentView(props) {
|
|
|
2438
2452
|
}, children: [jsx("div", { class: "xnote-list-type", children: (component.state.type === 'UnorderedList' || readonly() || output()) ?
|
|
2439
2453
|
jsx("span", { class: "xnote-order-btn", children: icon })
|
|
2440
2454
|
:
|
|
2441
|
-
jsx(Dropdown, { menu: jsxs(Fragment, { children: [jsx(MenuItem, { onClick: () => reorder(false), children: "\u7EE7\u7EED\u7F16\u53F7" }), jsx(MenuItem, { onClick: () => reorder(true), children: "\u91CD\u65B0\u7F16\u53F7" })] }), children: jsx(Button, { style: { color: 'inherit' }, children: icon }) }) }),
|
|
2455
|
+
jsx(Dropdown, { menu: jsxs(Fragment, { children: [jsx(MenuItem, { onClick: () => reorder(false), children: "\u7EE7\u7EED\u7F16\u53F7" }), jsx(MenuItem, { onClick: () => reorder(true), children: "\u91CD\u65B0\u7F16\u53F7" })] }), children: jsx(Button, { style: { color: 'inherit' }, children: icon }) }) }), adapter.slotRender(component.state.slot, children => {
|
|
2456
|
+
return createVNode('div', {
|
|
2457
|
+
class: 'xnote-list-content'
|
|
2458
|
+
}, children);
|
|
2459
|
+
}, readonly() || output())] }) }));
|
|
2442
2460
|
};
|
|
2443
2461
|
}
|
|
2444
2462
|
const listComponentLoader = {
|
|
@@ -2678,7 +2696,7 @@ function useBlockTransform() {
|
|
|
2678
2696
|
const index = parent.indexOf(current);
|
|
2679
2697
|
parent.retain(index);
|
|
2680
2698
|
commander.removeComponent(current);
|
|
2681
|
-
current.
|
|
2699
|
+
current.slots.at(0).sliceContent().forEach(i => {
|
|
2682
2700
|
parent.insert(i);
|
|
2683
2701
|
});
|
|
2684
2702
|
}
|
|
@@ -3578,6 +3596,9 @@ class ImageComponent extends Component {
|
|
|
3578
3596
|
static fromJSON(textbus, json) {
|
|
3579
3597
|
return new ImageComponent(textbus, Object.assign({}, json));
|
|
3580
3598
|
}
|
|
3599
|
+
getSlots() {
|
|
3600
|
+
return [];
|
|
3601
|
+
}
|
|
3581
3602
|
}
|
|
3582
3603
|
ImageComponent.type = ContentType.InlineComponent;
|
|
3583
3604
|
ImageComponent.componentName = 'ImageComponent';
|
|
@@ -3617,8 +3638,8 @@ class VideoComponent extends Component {
|
|
|
3617
3638
|
static fromJSON(textbus, json) {
|
|
3618
3639
|
return new VideoComponent(textbus, Object.assign({}, json));
|
|
3619
3640
|
}
|
|
3620
|
-
|
|
3621
|
-
|
|
3641
|
+
getSlots() {
|
|
3642
|
+
return [];
|
|
3622
3643
|
}
|
|
3623
3644
|
}
|
|
3624
3645
|
VideoComponent.type = ContentType.InlineComponent;
|
|
@@ -3726,6 +3747,9 @@ class KatexComponent extends Component {
|
|
|
3726
3747
|
}) {
|
|
3727
3748
|
super(textbus, state);
|
|
3728
3749
|
}
|
|
3750
|
+
getSlots() {
|
|
3751
|
+
return [];
|
|
3752
|
+
}
|
|
3729
3753
|
}
|
|
3730
3754
|
KatexComponent.componentName = 'KatexComponent';
|
|
3731
3755
|
KatexComponent.type = ContentType.InlineComponent;
|
|
@@ -4105,7 +4129,7 @@ const LeftToolbar = withAnnotation({
|
|
|
4105
4129
|
if (!slot) {
|
|
4106
4130
|
return;
|
|
4107
4131
|
}
|
|
4108
|
-
if (slot.parent.
|
|
4132
|
+
if (slot.parent.slots.length <= 1) {
|
|
4109
4133
|
commander.removeComponent(slot.parent);
|
|
4110
4134
|
}
|
|
4111
4135
|
else {
|
|
@@ -4516,7 +4540,7 @@ class AtComponent extends Component {
|
|
|
4516
4540
|
const registry = textbus.get(Registry);
|
|
4517
4541
|
if (slotState) {
|
|
4518
4542
|
const slot = registry.createSlot(slotState);
|
|
4519
|
-
return new AtComponent({
|
|
4543
|
+
return new AtComponent(textbus, {
|
|
4520
4544
|
slot
|
|
4521
4545
|
});
|
|
4522
4546
|
}
|
|
@@ -4535,6 +4559,12 @@ class AtComponent extends Component {
|
|
|
4535
4559
|
this.members = createSignal([]);
|
|
4536
4560
|
this.selectedIndex = createSignal(0);
|
|
4537
4561
|
}
|
|
4562
|
+
getSlots() {
|
|
4563
|
+
if (this.state.slot) {
|
|
4564
|
+
return [this.state.slot];
|
|
4565
|
+
}
|
|
4566
|
+
return [];
|
|
4567
|
+
}
|
|
4538
4568
|
setup() {
|
|
4539
4569
|
let isFocus = false;
|
|
4540
4570
|
onFocus(() => {
|
|
@@ -4622,6 +4652,7 @@ AtComponent.componentName = 'AtComponent';
|
|
|
4622
4652
|
AtComponent.type = ContentType.InlineComponent;
|
|
4623
4653
|
|
|
4624
4654
|
function AtComponentView(props) {
|
|
4655
|
+
const adapter = inject(DomAdapter);
|
|
4625
4656
|
const selection = inject(Selection);
|
|
4626
4657
|
const dropdownRef = createRef();
|
|
4627
4658
|
const subscription = props.component.focus.subscribe((b) => {
|
|
@@ -4662,7 +4693,11 @@ function AtComponentView(props) {
|
|
|
4662
4693
|
return (jsxs("div", { class: "xnote-at xnote-at-complete", "data-info": encodeURIComponent(JSON.stringify(userInfo)), ref: props.rootRef, "data-component": props.component.name, children: [jsx("span", { children: "@" }), userInfo.name] }));
|
|
4663
4694
|
}
|
|
4664
4695
|
if (readonly() || output()) {
|
|
4665
|
-
return (jsxs("div", { class: "xnote-at", ref: props.rootRef, "data-component": props.component.name, children: [jsx("span", { children: "@" }), slot &&
|
|
4696
|
+
return (jsxs("div", { class: "xnote-at", ref: props.rootRef, "data-component": props.component.name, children: [jsx("span", { children: "@" }), slot && adapter.slotRender(slot, children => {
|
|
4697
|
+
return createVNode('span', {
|
|
4698
|
+
class: 'xnote-at-input'
|
|
4699
|
+
}, children);
|
|
4700
|
+
})] }));
|
|
4666
4701
|
}
|
|
4667
4702
|
const members = props.component.members();
|
|
4668
4703
|
return (jsx("div", { class: "xnote-at", ref: props.rootRef, "data-component": props.component.name, children: jsxs(Dropdown, { trigger: 'none', ref: dropdownRef, menu: jsx("div", { class: "xnote-at-menu", ref: membersRef, children: members.map((member, index) => {
|
|
@@ -4678,7 +4713,11 @@ function AtComponentView(props) {
|
|
|
4678
4713
|
selection.selectComponentEnd(props.component);
|
|
4679
4714
|
}, class: ['xnote-at-member', { selected: index === selectedIndex }], children: [jsx("div", { class: "xnote-at-member-avatar", children: member.avatar ? jsx("img", { src: member.avatar, alt: member.name }) :
|
|
4680
4715
|
jsx("span", { class: "xnote-at-member-avatar-bg", style: { background: member.color, color }, children: member.name }) }), jsxs("div", { class: "xnote-at-member-info", children: [jsx("div", { class: "xnote-at-member-name", children: member.name }), jsx("div", { class: "xnote-at-member-desc", children: member.groupName })] })] }, member.id));
|
|
4681
|
-
}) }), children: [jsx("span", { children: "@" }), slot &&
|
|
4716
|
+
}) }), children: [jsx("span", { children: "@" }), slot && adapter.slotRender(slot, children => {
|
|
4717
|
+
return createVNode('span', {
|
|
4718
|
+
class: 'xnote-at-input'
|
|
4719
|
+
}, children);
|
|
4720
|
+
})] }) }));
|
|
4682
4721
|
};
|
|
4683
4722
|
}
|
|
4684
4723
|
const atComponentLoader = {
|
|
@@ -4710,6 +4749,9 @@ class RootComponent extends Component {
|
|
|
4710
4749
|
content
|
|
4711
4750
|
});
|
|
4712
4751
|
}
|
|
4752
|
+
getSlots() {
|
|
4753
|
+
return [this.state.content];
|
|
4754
|
+
}
|
|
4713
4755
|
setup() {
|
|
4714
4756
|
useBlockContent((slot) => slot === this.state.content);
|
|
4715
4757
|
onCompositionStart(ev => {
|
|
@@ -4737,6 +4779,7 @@ class RootComponent extends Component {
|
|
|
4737
4779
|
RootComponent.componentName = 'RootComponent';
|
|
4738
4780
|
RootComponent.type = ContentType.BlockComponent;
|
|
4739
4781
|
function RootView(props) {
|
|
4782
|
+
const adapter = inject(DomAdapter);
|
|
4740
4783
|
const { content } = props.component.state;
|
|
4741
4784
|
const ref = createDynamicRef(node => {
|
|
4742
4785
|
const sub = props.component.onCompositionStart.subscribe(() => {
|
|
@@ -4753,7 +4796,12 @@ function RootView(props) {
|
|
|
4753
4796
|
const output = useOutput();
|
|
4754
4797
|
return () => {
|
|
4755
4798
|
const { rootRef } = props;
|
|
4756
|
-
return (jsx("div", { class: "xnote-root", dir: "auto", ref: [rootRef, ref], "data-component": props.component.name, children:
|
|
4799
|
+
return (jsx("div", { class: "xnote-root", dir: "auto", ref: [rootRef, ref], "data-component": props.component.name, children: adapter.slotRender(content, children => {
|
|
4800
|
+
return (createVNode('div', {
|
|
4801
|
+
class: 'xnote-content',
|
|
4802
|
+
'data-placeholder': content.isEmpty ? '请输入内容' : ''
|
|
4803
|
+
}, children));
|
|
4804
|
+
}, readonly() || output()) }));
|
|
4757
4805
|
};
|
|
4758
4806
|
}
|
|
4759
4807
|
const rootComponentLoader = {
|
|
@@ -5272,7 +5320,6 @@ function SelectionMask(props) {
|
|
|
5272
5320
|
});
|
|
5273
5321
|
}
|
|
5274
5322
|
|
|
5275
|
-
// import { SlotRender } from '../SlotRender'
|
|
5276
5323
|
const TableComponentView = withAnnotation({
|
|
5277
5324
|
providers: [TableService]
|
|
5278
5325
|
}, function TableComponentView(props) {
|
|
@@ -5494,7 +5541,7 @@ function autoComplete(table) {
|
|
|
5494
5541
|
function findFocusCell(table, slot) {
|
|
5495
5542
|
var _a;
|
|
5496
5543
|
while (slot) {
|
|
5497
|
-
if (table.
|
|
5544
|
+
if (table.slots.includes(slot)) {
|
|
5498
5545
|
return slot;
|
|
5499
5546
|
}
|
|
5500
5547
|
slot = (_a = slot.parent) === null || _a === void 0 ? void 0 : _a.parent;
|
package/bundles/index.js
CHANGED
|
@@ -32,18 +32,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
32
32
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
function __rest(s, e) {
|
|
36
|
-
var t = {};
|
|
37
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
-
t[p] = s[p];
|
|
39
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
-
t[p[i]] = s[p[i]];
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
function __decorate(decorators, target, key, desc) {
|
|
48
36
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
49
37
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -179,7 +167,7 @@ function Divider() {
|
|
|
179
167
|
});
|
|
180
168
|
}
|
|
181
169
|
|
|
182
|
-
var scopedId$k = "vf-
|
|
170
|
+
var scopedId$k = "vf-8abf2c";
|
|
183
171
|
|
|
184
172
|
function DragResize(props) {
|
|
185
173
|
const isShow = core.createSignal(false);
|
|
@@ -200,7 +188,7 @@ function DragResize(props) {
|
|
|
200
188
|
isShow.set(true);
|
|
201
189
|
const width = ref.current.offsetWidth;
|
|
202
190
|
const height = ref.current.offsetHeight;
|
|
203
|
-
|
|
191
|
+
sizeText.set(`${Math.round(width)}px * ${Math.round(height)}px`);
|
|
204
192
|
});
|
|
205
193
|
function selectComponent() {
|
|
206
194
|
selection.selectComponent(component, true);
|
|
@@ -277,7 +265,7 @@ function DragResize(props) {
|
|
|
277
265
|
}
|
|
278
266
|
ele.style.width = endWidth + 'px';
|
|
279
267
|
ele.style.height = endHeight + 'px';
|
|
280
|
-
|
|
268
|
+
sizeText.set(`${Math.round(endWidth)}px * ${Math.round(endHeight)}px`);
|
|
281
269
|
});
|
|
282
270
|
const unUp = core$1.fromEvent(document, 'mouseup').subscribe(() => {
|
|
283
271
|
component.state.width = endWidth + 'px';
|
|
@@ -287,10 +275,11 @@ function DragResize(props) {
|
|
|
287
275
|
unUp.unsubscribe();
|
|
288
276
|
});
|
|
289
277
|
}
|
|
278
|
+
const sizeText = core.createSignal(`${component.state.width}*${component.state.height}`);
|
|
290
279
|
return scopedCss.withScopedCSS(scopedId$k, () => {
|
|
291
280
|
return (jsxRuntime.jsxs("div", { class: "drag-resize", onClick: selectComponent, children: [jsxRuntime.jsx("div", { class: "container", ref: ref, children: props.children }), jsxRuntime.jsxs("div", { class: ['resize-tool', {
|
|
292
281
|
active: isShow()
|
|
293
|
-
}], children: [jsxRuntime.
|
|
282
|
+
}], children: [jsxRuntime.jsx("div", { class: "mask", ref: mask, children: sizeText() }), jsxRuntime.jsxs("div", { class: "btn-group", ref: btnGroup, onMousedown: drag, children: [jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" }), jsxRuntime.jsx("button", { type: "button" })] })] })] }));
|
|
294
283
|
});
|
|
295
284
|
}
|
|
296
285
|
|
|
@@ -714,23 +703,6 @@ function useBlockContent(slot) {
|
|
|
714
703
|
});
|
|
715
704
|
}
|
|
716
705
|
|
|
717
|
-
function SlotRender(props) {
|
|
718
|
-
const adaper = core.inject(platformBrowser.DomAdapter);
|
|
719
|
-
const instance = core.getCurrentInstance();
|
|
720
|
-
const sub = props.slot.__changeMarker__.onChange.subscribe(() => {
|
|
721
|
-
instance.markAsDirtied();
|
|
722
|
-
});
|
|
723
|
-
core.onUnmounted(() => {
|
|
724
|
-
sub.unsubscribe();
|
|
725
|
-
});
|
|
726
|
-
return () => {
|
|
727
|
-
const { slot, tag = 'div', renderEnv = false, elRef, elKey } = props, rest = __rest(props, ["slot", "tag", "renderEnv", "elRef", "elKey"]);
|
|
728
|
-
return adaper.slotRender(slot, children => {
|
|
729
|
-
return core$1.createVNode(tag, Object.assign({ ref: elRef, key: elKey }, rest), children);
|
|
730
|
-
}, renderEnv);
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
|
|
734
706
|
class BlockquoteComponent extends core$1.Component {
|
|
735
707
|
static fromJSON(textbus, json) {
|
|
736
708
|
const slot = textbus.get(core$1.Registry).createSlot(json.slot);
|
|
@@ -745,6 +717,9 @@ class BlockquoteComponent extends core$1.Component {
|
|
|
745
717
|
}) {
|
|
746
718
|
super(textbus, state);
|
|
747
719
|
}
|
|
720
|
+
getSlots() {
|
|
721
|
+
return [this.state.slot];
|
|
722
|
+
}
|
|
748
723
|
setup() {
|
|
749
724
|
useBlockContent(this.state.slot);
|
|
750
725
|
}
|
|
@@ -785,7 +760,7 @@ function toBlockquote(textbus) {
|
|
|
785
760
|
const index = parent.indexOf(current);
|
|
786
761
|
parent.retain(index);
|
|
787
762
|
commander.removeComponent(current);
|
|
788
|
-
current.
|
|
763
|
+
current.slots.at(0).sliceContent().forEach(i => {
|
|
789
764
|
parent.insert(i);
|
|
790
765
|
});
|
|
791
766
|
}
|
|
@@ -824,11 +799,14 @@ function registerBlockquoteShortcut(textbus) {
|
|
|
824
799
|
});
|
|
825
800
|
}
|
|
826
801
|
function BlockquoteView(props) {
|
|
802
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
827
803
|
const readonly = useReadonly();
|
|
828
804
|
const output = useOutput();
|
|
829
805
|
return () => {
|
|
830
806
|
const slot = props.component.state.slot;
|
|
831
|
-
return (jsxRuntime.jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children:
|
|
807
|
+
return (jsxRuntime.jsx("blockquote", { class: "xnote-blockquote", ref: props.rootRef, "data-component": props.component.name, children: adapter.slotRender(slot, children => {
|
|
808
|
+
return core$1.createVNode('div', null, children);
|
|
809
|
+
}, readonly() || output()) }));
|
|
832
810
|
};
|
|
833
811
|
}
|
|
834
812
|
const blockquoteComponentLoader = {
|
|
@@ -868,6 +846,9 @@ class HighlightBoxComponent extends core$1.Component {
|
|
|
868
846
|
}) {
|
|
869
847
|
super(textbus, state);
|
|
870
848
|
}
|
|
849
|
+
getSlots() {
|
|
850
|
+
return [this.state.slot];
|
|
851
|
+
}
|
|
871
852
|
setup() {
|
|
872
853
|
useBlockContent(this.state.slot);
|
|
873
854
|
}
|
|
@@ -876,6 +857,7 @@ HighlightBoxComponent.defaultTypes = ['❤️', '💡', '📌', '✅', '❎', '
|
|
|
876
857
|
HighlightBoxComponent.componentName = 'HighlightBoxComponent';
|
|
877
858
|
HighlightBoxComponent.type = core$1.ContentType.BlockComponent;
|
|
878
859
|
function HighlightBoxView(props) {
|
|
860
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
879
861
|
const readonly = useReadonly();
|
|
880
862
|
const output = useOutput();
|
|
881
863
|
const emoji = [];
|
|
@@ -891,14 +873,22 @@ function HighlightBoxView(props) {
|
|
|
891
873
|
return () => {
|
|
892
874
|
const { state, name } = props.component;
|
|
893
875
|
if (readonly() || output()) {
|
|
894
|
-
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("div", { class: "xnote-highlight-box-icon", children: jsxRuntime.jsx("button", { type: "button", children: state.type || '❤️' }) }) }),
|
|
876
|
+
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("div", { class: "xnote-highlight-box-icon", children: jsxRuntime.jsx("button", { type: "button", children: state.type || '❤️' }) }) }), adapter.slotRender(state.slot, children => {
|
|
877
|
+
return core$1.createVNode('div', {
|
|
878
|
+
class: 'xnote-highlight-box-content'
|
|
879
|
+
}, children);
|
|
880
|
+
}, readonly() || output())] }));
|
|
895
881
|
}
|
|
896
882
|
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: "282px", menu: jsxRuntime.jsxs("div", { class: "xnote-highlight-box-icons", children: [jsxRuntime.jsx("div", { class: "xnote-highlight-box-heading", children: "\u5E38\u7528" }), HighlightBoxComponent.defaultTypes.map(icon => {
|
|
897
883
|
return (jsxRuntime.jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
|
|
898
884
|
}), jsxRuntime.jsx("div", { class: "xnote-highlight-box-heading", children: "\u66F4\u591A" }), emoji.map(i => {
|
|
899
885
|
const icon = String.fromCodePoint(i);
|
|
900
886
|
return (jsxRuntime.jsx("button", { onClick: () => setType(icon), type: "button", children: icon }));
|
|
901
|
-
})] }), children: jsxRuntime.jsx("div", { class: "xnote-highlight-box-icon", children: jsxRuntime.jsx("button", { type: "button", children: state.type || '❤️' }) }) }) }),
|
|
887
|
+
})] }), children: jsxRuntime.jsx("div", { class: "xnote-highlight-box-icon", children: jsxRuntime.jsx("button", { type: "button", children: state.type || '❤️' }) }) }) }), adapter.slotRender(state.slot, children => {
|
|
888
|
+
return core$1.createVNode('div', {
|
|
889
|
+
class: 'xnote-highlight-box-content'
|
|
890
|
+
}, children);
|
|
891
|
+
}, readonly() || output())] }));
|
|
902
892
|
};
|
|
903
893
|
}
|
|
904
894
|
const highlightBoxComponentLoader = {
|
|
@@ -939,6 +929,9 @@ class ParagraphComponent extends core$1.Component {
|
|
|
939
929
|
}) {
|
|
940
930
|
super(textbus, state);
|
|
941
931
|
}
|
|
932
|
+
getSlots() {
|
|
933
|
+
return [this.state.slot];
|
|
934
|
+
}
|
|
942
935
|
setup() {
|
|
943
936
|
const injector = core$1.useContext();
|
|
944
937
|
const commander = injector.get(core$1.Commander);
|
|
@@ -966,11 +959,14 @@ class ParagraphComponent extends core$1.Component {
|
|
|
966
959
|
ParagraphComponent.componentName = 'ParagraphComponent';
|
|
967
960
|
ParagraphComponent.type = core$1.ContentType.BlockComponent;
|
|
968
961
|
function ParagraphView(props) {
|
|
962
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
969
963
|
const readonly = useReadonly();
|
|
970
964
|
const output = useOutput();
|
|
971
965
|
return () => {
|
|
972
966
|
const slot = props.component.state.slot;
|
|
973
|
-
return (jsxRuntime.jsx("div", { class: "xnote-paragraph", ref: props.rootRef, "data-component": ParagraphComponent.componentName, children:
|
|
967
|
+
return (jsxRuntime.jsx("div", { class: "xnote-paragraph", ref: props.rootRef, "data-component": ParagraphComponent.componentName, children: adapter.slotRender(slot, children => {
|
|
968
|
+
return (core$1.createVNode('div', null, children));
|
|
969
|
+
}, readonly() || output()) }));
|
|
974
970
|
};
|
|
975
971
|
}
|
|
976
972
|
const paragraphComponentLoader = {
|
|
@@ -1184,6 +1180,9 @@ class SourceCodeComponent extends core$1.Component {
|
|
|
1184
1180
|
theme: json.theme
|
|
1185
1181
|
});
|
|
1186
1182
|
}
|
|
1183
|
+
getSlots() {
|
|
1184
|
+
return this.state.slots.map(i => i.slot);
|
|
1185
|
+
}
|
|
1187
1186
|
setup() {
|
|
1188
1187
|
const textbus = core$1.useContext();
|
|
1189
1188
|
const selection = core$1.useContext(core$1.Selection);
|
|
@@ -1822,6 +1821,9 @@ class TableComponent extends core$1.Component {
|
|
|
1822
1821
|
this.focus = new core$1.Subject();
|
|
1823
1822
|
this.tableSelection = core.createSignal(null);
|
|
1824
1823
|
}
|
|
1824
|
+
getSlots() {
|
|
1825
|
+
return this.state.rows.map(i => i.cells.map(j => j.slot)).flat();
|
|
1826
|
+
}
|
|
1825
1827
|
setup() {
|
|
1826
1828
|
const selection = core$1.useContext(core$1.Selection);
|
|
1827
1829
|
core$1.onFocusIn(() => {
|
|
@@ -2059,6 +2061,9 @@ class TodolistComponent extends core$1.Component {
|
|
|
2059
2061
|
checked: json.checked
|
|
2060
2062
|
});
|
|
2061
2063
|
}
|
|
2064
|
+
getSlots() {
|
|
2065
|
+
return [this.state.slot];
|
|
2066
|
+
}
|
|
2062
2067
|
setup() {
|
|
2063
2068
|
const textbus = core$1.useContext();
|
|
2064
2069
|
const commander = core$1.useContext(core$1.Commander);
|
|
@@ -2139,6 +2144,7 @@ TodolistComponent.zenCoding = {
|
|
|
2139
2144
|
}
|
|
2140
2145
|
};
|
|
2141
2146
|
function TodolistView(props) {
|
|
2147
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
2142
2148
|
const component = props.component;
|
|
2143
2149
|
const state = component.state;
|
|
2144
2150
|
function toggle() {
|
|
@@ -2167,7 +2173,11 @@ function TodolistView(props) {
|
|
|
2167
2173
|
marginLeft: indent * 24 + 'px',
|
|
2168
2174
|
justifyContent: align[component.state.slot.getAttribute(textAlignAttr)],
|
|
2169
2175
|
textAlign: component.state.slot.getAttribute(textAlignAttr) === 'justify' ? 'justify' : void 0
|
|
2170
|
-
}, children: [jsxRuntime.jsx("div", { class: "xnote-todolist-icon", onClick: toggle, children: jsxRuntime.jsx("span", { "data-checked": checked, class: [checked ? 'xnote-icon-checkbox-checked' : 'xnote-icon-checkbox-unchecked'] }) }),
|
|
2176
|
+
}, children: [jsxRuntime.jsx("div", { class: "xnote-todolist-icon", onClick: toggle, children: jsxRuntime.jsx("span", { "data-checked": checked, class: [checked ? 'xnote-icon-checkbox-checked' : 'xnote-icon-checkbox-unchecked'] }) }), adapter.slotRender(slot, children => {
|
|
2177
|
+
return core$1.createVNode('div', {
|
|
2178
|
+
class: 'xnote-todolist-content'
|
|
2179
|
+
}, children);
|
|
2180
|
+
}, readonly() || output())] }));
|
|
2171
2181
|
};
|
|
2172
2182
|
}
|
|
2173
2183
|
const todolistComponentLoader = {
|
|
@@ -2228,6 +2238,9 @@ class ListComponent extends core$1.Component {
|
|
|
2228
2238
|
slot: textbus.get(core$1.Registry).createSlot(json.slot)
|
|
2229
2239
|
});
|
|
2230
2240
|
}
|
|
2241
|
+
getSlots() {
|
|
2242
|
+
return [this.state.slot];
|
|
2243
|
+
}
|
|
2231
2244
|
setup() {
|
|
2232
2245
|
const textbus = core$1.useContext();
|
|
2233
2246
|
const commander = core$1.useContext(core$1.Commander);
|
|
@@ -2367,6 +2380,7 @@ function numberToLetter(num) {
|
|
|
2367
2380
|
}).join('');
|
|
2368
2381
|
}
|
|
2369
2382
|
function ListComponentView(props) {
|
|
2383
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
2370
2384
|
const component = props.component;
|
|
2371
2385
|
function reorder(is) {
|
|
2372
2386
|
component.state.reorder = is;
|
|
@@ -2440,7 +2454,11 @@ function ListComponentView(props) {
|
|
|
2440
2454
|
}, children: [jsxRuntime.jsx("div", { class: "xnote-list-type", children: (component.state.type === 'UnorderedList' || readonly() || output()) ?
|
|
2441
2455
|
jsxRuntime.jsx("span", { class: "xnote-order-btn", children: icon })
|
|
2442
2456
|
:
|
|
2443
|
-
jsxRuntime.jsx(Dropdown, { menu: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuItem, { onClick: () => reorder(false), children: "\u7EE7\u7EED\u7F16\u53F7" }), jsxRuntime.jsx(MenuItem, { onClick: () => reorder(true), children: "\u91CD\u65B0\u7F16\u53F7" })] }), children: jsxRuntime.jsx(Button, { style: { color: 'inherit' }, children: icon }) }) }),
|
|
2457
|
+
jsxRuntime.jsx(Dropdown, { menu: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuItem, { onClick: () => reorder(false), children: "\u7EE7\u7EED\u7F16\u53F7" }), jsxRuntime.jsx(MenuItem, { onClick: () => reorder(true), children: "\u91CD\u65B0\u7F16\u53F7" })] }), children: jsxRuntime.jsx(Button, { style: { color: 'inherit' }, children: icon }) }) }), adapter.slotRender(component.state.slot, children => {
|
|
2458
|
+
return core$1.createVNode('div', {
|
|
2459
|
+
class: 'xnote-list-content'
|
|
2460
|
+
}, children);
|
|
2461
|
+
}, readonly() || output())] }) }));
|
|
2444
2462
|
};
|
|
2445
2463
|
}
|
|
2446
2464
|
const listComponentLoader = {
|
|
@@ -2680,7 +2698,7 @@ function useBlockTransform() {
|
|
|
2680
2698
|
const index = parent.indexOf(current);
|
|
2681
2699
|
parent.retain(index);
|
|
2682
2700
|
commander.removeComponent(current);
|
|
2683
|
-
current.
|
|
2701
|
+
current.slots.at(0).sliceContent().forEach(i => {
|
|
2684
2702
|
parent.insert(i);
|
|
2685
2703
|
});
|
|
2686
2704
|
}
|
|
@@ -3580,6 +3598,9 @@ class ImageComponent extends core$1.Component {
|
|
|
3580
3598
|
static fromJSON(textbus, json) {
|
|
3581
3599
|
return new ImageComponent(textbus, Object.assign({}, json));
|
|
3582
3600
|
}
|
|
3601
|
+
getSlots() {
|
|
3602
|
+
return [];
|
|
3603
|
+
}
|
|
3583
3604
|
}
|
|
3584
3605
|
ImageComponent.type = core$1.ContentType.InlineComponent;
|
|
3585
3606
|
ImageComponent.componentName = 'ImageComponent';
|
|
@@ -3619,8 +3640,8 @@ class VideoComponent extends core$1.Component {
|
|
|
3619
3640
|
static fromJSON(textbus, json) {
|
|
3620
3641
|
return new VideoComponent(textbus, Object.assign({}, json));
|
|
3621
3642
|
}
|
|
3622
|
-
|
|
3623
|
-
|
|
3643
|
+
getSlots() {
|
|
3644
|
+
return [];
|
|
3624
3645
|
}
|
|
3625
3646
|
}
|
|
3626
3647
|
VideoComponent.type = core$1.ContentType.InlineComponent;
|
|
@@ -3728,6 +3749,9 @@ class KatexComponent extends core$1.Component {
|
|
|
3728
3749
|
}) {
|
|
3729
3750
|
super(textbus, state);
|
|
3730
3751
|
}
|
|
3752
|
+
getSlots() {
|
|
3753
|
+
return [];
|
|
3754
|
+
}
|
|
3731
3755
|
}
|
|
3732
3756
|
KatexComponent.componentName = 'KatexComponent';
|
|
3733
3757
|
KatexComponent.type = core$1.ContentType.InlineComponent;
|
|
@@ -4107,7 +4131,7 @@ const LeftToolbar = core.withAnnotation({
|
|
|
4107
4131
|
if (!slot) {
|
|
4108
4132
|
return;
|
|
4109
4133
|
}
|
|
4110
|
-
if (slot.parent.
|
|
4134
|
+
if (slot.parent.slots.length <= 1) {
|
|
4111
4135
|
commander.removeComponent(slot.parent);
|
|
4112
4136
|
}
|
|
4113
4137
|
else {
|
|
@@ -4518,7 +4542,7 @@ class AtComponent extends core$1.Component {
|
|
|
4518
4542
|
const registry = textbus.get(core$1.Registry);
|
|
4519
4543
|
if (slotState) {
|
|
4520
4544
|
const slot = registry.createSlot(slotState);
|
|
4521
|
-
return new AtComponent({
|
|
4545
|
+
return new AtComponent(textbus, {
|
|
4522
4546
|
slot
|
|
4523
4547
|
});
|
|
4524
4548
|
}
|
|
@@ -4537,6 +4561,12 @@ class AtComponent extends core$1.Component {
|
|
|
4537
4561
|
this.members = core.createSignal([]);
|
|
4538
4562
|
this.selectedIndex = core.createSignal(0);
|
|
4539
4563
|
}
|
|
4564
|
+
getSlots() {
|
|
4565
|
+
if (this.state.slot) {
|
|
4566
|
+
return [this.state.slot];
|
|
4567
|
+
}
|
|
4568
|
+
return [];
|
|
4569
|
+
}
|
|
4540
4570
|
setup() {
|
|
4541
4571
|
let isFocus = false;
|
|
4542
4572
|
core$1.onFocus(() => {
|
|
@@ -4624,6 +4654,7 @@ AtComponent.componentName = 'AtComponent';
|
|
|
4624
4654
|
AtComponent.type = core$1.ContentType.InlineComponent;
|
|
4625
4655
|
|
|
4626
4656
|
function AtComponentView(props) {
|
|
4657
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
4627
4658
|
const selection = core.inject(core$1.Selection);
|
|
4628
4659
|
const dropdownRef = core.createRef();
|
|
4629
4660
|
const subscription = props.component.focus.subscribe((b) => {
|
|
@@ -4664,7 +4695,11 @@ function AtComponentView(props) {
|
|
|
4664
4695
|
return (jsxRuntime.jsxs("div", { class: "xnote-at xnote-at-complete", "data-info": encodeURIComponent(JSON.stringify(userInfo)), ref: props.rootRef, "data-component": props.component.name, children: [jsxRuntime.jsx("span", { children: "@" }), userInfo.name] }));
|
|
4665
4696
|
}
|
|
4666
4697
|
if (readonly() || output()) {
|
|
4667
|
-
return (jsxRuntime.jsxs("div", { class: "xnote-at", ref: props.rootRef, "data-component": props.component.name, children: [jsxRuntime.jsx("span", { children: "@" }), slot &&
|
|
4698
|
+
return (jsxRuntime.jsxs("div", { class: "xnote-at", ref: props.rootRef, "data-component": props.component.name, children: [jsxRuntime.jsx("span", { children: "@" }), slot && adapter.slotRender(slot, children => {
|
|
4699
|
+
return core$1.createVNode('span', {
|
|
4700
|
+
class: 'xnote-at-input'
|
|
4701
|
+
}, children);
|
|
4702
|
+
})] }));
|
|
4668
4703
|
}
|
|
4669
4704
|
const members = props.component.members();
|
|
4670
4705
|
return (jsxRuntime.jsx("div", { class: "xnote-at", ref: props.rootRef, "data-component": props.component.name, children: jsxRuntime.jsxs(Dropdown, { trigger: 'none', ref: dropdownRef, menu: jsxRuntime.jsx("div", { class: "xnote-at-menu", ref: membersRef, children: members.map((member, index) => {
|
|
@@ -4680,7 +4715,11 @@ function AtComponentView(props) {
|
|
|
4680
4715
|
selection.selectComponentEnd(props.component);
|
|
4681
4716
|
}, class: ['xnote-at-member', { selected: index === selectedIndex }], children: [jsxRuntime.jsx("div", { class: "xnote-at-member-avatar", children: member.avatar ? jsxRuntime.jsx("img", { src: member.avatar, alt: member.name }) :
|
|
4682
4717
|
jsxRuntime.jsx("span", { class: "xnote-at-member-avatar-bg", style: { background: member.color, color: color$1 }, children: member.name }) }), jsxRuntime.jsxs("div", { class: "xnote-at-member-info", children: [jsxRuntime.jsx("div", { class: "xnote-at-member-name", children: member.name }), jsxRuntime.jsx("div", { class: "xnote-at-member-desc", children: member.groupName })] })] }, member.id));
|
|
4683
|
-
}) }), children: [jsxRuntime.jsx("span", { children: "@" }), slot &&
|
|
4718
|
+
}) }), children: [jsxRuntime.jsx("span", { children: "@" }), slot && adapter.slotRender(slot, children => {
|
|
4719
|
+
return core$1.createVNode('span', {
|
|
4720
|
+
class: 'xnote-at-input'
|
|
4721
|
+
}, children);
|
|
4722
|
+
})] }) }));
|
|
4684
4723
|
};
|
|
4685
4724
|
}
|
|
4686
4725
|
const atComponentLoader = {
|
|
@@ -4712,6 +4751,9 @@ class RootComponent extends core$1.Component {
|
|
|
4712
4751
|
content
|
|
4713
4752
|
});
|
|
4714
4753
|
}
|
|
4754
|
+
getSlots() {
|
|
4755
|
+
return [this.state.content];
|
|
4756
|
+
}
|
|
4715
4757
|
setup() {
|
|
4716
4758
|
useBlockContent((slot) => slot === this.state.content);
|
|
4717
4759
|
core$1.onCompositionStart(ev => {
|
|
@@ -4739,6 +4781,7 @@ class RootComponent extends core$1.Component {
|
|
|
4739
4781
|
RootComponent.componentName = 'RootComponent';
|
|
4740
4782
|
RootComponent.type = core$1.ContentType.BlockComponent;
|
|
4741
4783
|
function RootView(props) {
|
|
4784
|
+
const adapter = core.inject(platformBrowser.DomAdapter);
|
|
4742
4785
|
const { content } = props.component.state;
|
|
4743
4786
|
const ref = core.createDynamicRef(node => {
|
|
4744
4787
|
const sub = props.component.onCompositionStart.subscribe(() => {
|
|
@@ -4755,7 +4798,12 @@ function RootView(props) {
|
|
|
4755
4798
|
const output = useOutput();
|
|
4756
4799
|
return () => {
|
|
4757
4800
|
const { rootRef } = props;
|
|
4758
|
-
return (jsxRuntime.jsx("div", { class: "xnote-root", dir: "auto", ref: [rootRef, ref], "data-component": props.component.name, children:
|
|
4801
|
+
return (jsxRuntime.jsx("div", { class: "xnote-root", dir: "auto", ref: [rootRef, ref], "data-component": props.component.name, children: adapter.slotRender(content, children => {
|
|
4802
|
+
return (core$1.createVNode('div', {
|
|
4803
|
+
class: 'xnote-content',
|
|
4804
|
+
'data-placeholder': content.isEmpty ? '请输入内容' : ''
|
|
4805
|
+
}, children));
|
|
4806
|
+
}, readonly() || output()) }));
|
|
4759
4807
|
};
|
|
4760
4808
|
}
|
|
4761
4809
|
const rootComponentLoader = {
|
|
@@ -5274,7 +5322,6 @@ function SelectionMask(props) {
|
|
|
5274
5322
|
});
|
|
5275
5323
|
}
|
|
5276
5324
|
|
|
5277
|
-
// import { SlotRender } from '../SlotRender'
|
|
5278
5325
|
const TableComponentView = core.withAnnotation({
|
|
5279
5326
|
providers: [TableService]
|
|
5280
5327
|
}, function TableComponentView(props) {
|
|
@@ -5496,7 +5543,7 @@ function autoComplete(table) {
|
|
|
5496
5543
|
function findFocusCell(table, slot) {
|
|
5497
5544
|
var _a;
|
|
5498
5545
|
while (slot) {
|
|
5499
|
-
if (table.
|
|
5546
|
+
if (table.slots.includes(slot)) {
|
|
5500
5547
|
return slot;
|
|
5501
5548
|
}
|
|
5502
5549
|
slot = (_a = slot.parent) === null || _a === void 0 ? void 0 : _a.parent;
|
|
@@ -29,6 +29,7 @@ export declare class AtComponent extends Component<AtComponentState> {
|
|
|
29
29
|
focus: Subject<boolean>;
|
|
30
30
|
members: import("@viewfly/core").Signal<Member[]>;
|
|
31
31
|
selectedIndex: import("@viewfly/core").Signal<number>;
|
|
32
|
-
constructor(textbus:
|
|
32
|
+
constructor(textbus: Textbus, state?: AtComponentState);
|
|
33
|
+
getSlots(): Slot[];
|
|
33
34
|
setup(): void;
|
|
34
35
|
}
|
|
@@ -11,6 +11,7 @@ export declare class BlockquoteComponent extends Component<BlockquoteComponentSt
|
|
|
11
11
|
static zenCoding: ZenCodingGrammarInterceptor<BlockquoteComponentState>;
|
|
12
12
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<BlockquoteComponentState>): BlockquoteComponent;
|
|
13
13
|
constructor(textbus: Textbus, state?: BlockquoteComponentState);
|
|
14
|
+
getSlots(): Slot[];
|
|
14
15
|
setup(): void;
|
|
15
16
|
}
|
|
16
17
|
export declare function toBlockquote(textbus: Textbus): void;
|
|
@@ -12,6 +12,7 @@ export declare class HighlightBoxComponent extends Component<HighlightBoxCompone
|
|
|
12
12
|
static type: ContentType;
|
|
13
13
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<HighlightBoxComponentState>): HighlightBoxComponent;
|
|
14
14
|
constructor(textbus: Textbus, state?: HighlightBoxComponentState);
|
|
15
|
+
getSlots(): Slot[];
|
|
15
16
|
setup(): void;
|
|
16
17
|
}
|
|
17
18
|
export declare function HighlightBoxView(props: ViewComponentProps<HighlightBoxComponent>): () => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ComponentStateLiteral, ContentType, Textbus } from '@textbus/core';
|
|
1
|
+
import { Component, ComponentStateLiteral, ContentType, Slot, Textbus } from '@textbus/core';
|
|
2
2
|
import { ViewComponentProps } from '@textbus/adapter-viewfly';
|
|
3
3
|
import { ComponentLoader } from '@textbus/platform-browser';
|
|
4
4
|
import './image.component.scss';
|
|
@@ -11,6 +11,7 @@ export declare class ImageComponent extends Component<ImageComponentState> {
|
|
|
11
11
|
static type: ContentType;
|
|
12
12
|
static componentName: string;
|
|
13
13
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<ImageComponentState>): ImageComponent;
|
|
14
|
+
getSlots(): Slot[];
|
|
14
15
|
}
|
|
15
16
|
export declare function ImageView(props: ViewComponentProps<ImageComponent>): () => any;
|
|
16
17
|
export declare const imageComponentLoader: ComponentLoader;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ComponentStateLiteral, ContentType, Textbus } from '@textbus/core';
|
|
1
|
+
import { Component, ComponentStateLiteral, ContentType, Slot, Textbus } from '@textbus/core';
|
|
2
2
|
import { ViewComponentProps } from '@textbus/adapter-viewfly';
|
|
3
3
|
import { ComponentLoader } from '@textbus/platform-browser';
|
|
4
4
|
import './katex.component.scss';
|
|
@@ -10,6 +10,7 @@ export declare class KatexComponent extends Component<KatexComponentState> {
|
|
|
10
10
|
static type: ContentType;
|
|
11
11
|
static fromJSON(textbus: Textbus, state: ComponentStateLiteral<KatexComponentState>): KatexComponent;
|
|
12
12
|
constructor(textbus: Textbus, state?: KatexComponentState);
|
|
13
|
+
getSlots(): Slot[];
|
|
13
14
|
}
|
|
14
15
|
export declare function KatexComponentView(props: ViewComponentProps<KatexComponent>): () => any;
|
|
15
16
|
export declare const katexComponentLoader: ComponentLoader;
|
|
@@ -14,6 +14,7 @@ export declare class ListComponent extends Component<ListComponentState> {
|
|
|
14
14
|
static type: ContentType;
|
|
15
15
|
static zenCoding: ZenCodingGrammarInterceptor<ListComponentState>;
|
|
16
16
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<ListComponentState>): ListComponent;
|
|
17
|
+
getSlots(): Slot[];
|
|
17
18
|
setup(): void;
|
|
18
19
|
}
|
|
19
20
|
export declare function ListComponentView(props: ViewComponentProps<ListComponent>): () => any;
|
|
@@ -10,6 +10,7 @@ export declare class ParagraphComponent extends Component<ParagraphComponentStat
|
|
|
10
10
|
static type: ContentType;
|
|
11
11
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<ParagraphComponentState>): ParagraphComponent;
|
|
12
12
|
constructor(textbus: Textbus, state?: ParagraphComponentState);
|
|
13
|
+
getSlots(): Slot[];
|
|
13
14
|
setup(): void;
|
|
14
15
|
}
|
|
15
16
|
export declare function ParagraphView(props: ViewComponentProps<ParagraphComponent>): () => any;
|
|
@@ -10,6 +10,7 @@ export declare class RootComponent extends Component<RootComponentState> {
|
|
|
10
10
|
static type: ContentType;
|
|
11
11
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<RootComponentState>): RootComponent;
|
|
12
12
|
onCompositionStart: Subject<Event<Slot, CompositionStartEventData>>;
|
|
13
|
+
getSlots(): Slot[];
|
|
13
14
|
setup(): void;
|
|
14
15
|
afterCheck(): void;
|
|
15
16
|
}
|
|
@@ -27,6 +27,7 @@ export declare class SourceCodeComponent extends Component<SourceCodeComponentSt
|
|
|
27
27
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<SourceCodeComponentState>): SourceCodeComponent;
|
|
28
28
|
static zenCoding: ZenCodingGrammarInterceptor<SourceCodeComponentState>;
|
|
29
29
|
focus: BehaviorSubject<boolean>;
|
|
30
|
+
getSlots(): Slot[];
|
|
30
31
|
setup(): void;
|
|
31
32
|
removeSlot(slot: Slot): boolean;
|
|
32
33
|
cancelEmphasize: () => void;
|
|
@@ -21,6 +21,7 @@ export declare class TableComponent extends Component<TableComponentState> {
|
|
|
21
21
|
constructor(textbus: Textbus, state?: TableComponentState);
|
|
22
22
|
focus: Subject<boolean>;
|
|
23
23
|
tableSelection: import("@viewfly/core").Signal<TableSelection | null>;
|
|
24
|
+
getSlots(): Slot[];
|
|
24
25
|
setup(): void;
|
|
25
26
|
deleteColumn(index: number): void;
|
|
26
27
|
deleteRow(index: number): void;
|
|
@@ -11,6 +11,7 @@ export declare class TodolistComponent extends Component<TodolistComponentState>
|
|
|
11
11
|
static componentName: string;
|
|
12
12
|
static zenCoding: ZenCodingGrammarInterceptor<TodolistComponentState>;
|
|
13
13
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<TodolistComponentState>): TodolistComponent;
|
|
14
|
+
getSlots(): Slot[];
|
|
14
15
|
setup(): void;
|
|
15
16
|
}
|
|
16
17
|
export declare function TodolistView(props: ViewComponentProps<TodolistComponent>): () => any;
|
|
@@ -11,7 +11,7 @@ export declare class VideoComponent extends Component<VideoComponentState> {
|
|
|
11
11
|
static type: ContentType;
|
|
12
12
|
static componentName: string;
|
|
13
13
|
static fromJSON(textbus: Textbus, json: ComponentStateLiteral<VideoComponentState>): VideoComponent;
|
|
14
|
-
|
|
14
|
+
getSlots(): never[];
|
|
15
15
|
}
|
|
16
16
|
export declare function VideoView(props: ViewComponentProps<VideoComponent>): () => any;
|
|
17
17
|
export declare const videoComponentLoader: ComponentLoader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textbus/xnote",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.46",
|
|
4
4
|
"description": "A high-performance rich text editor that supports multiplayer online collaboration.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@tanbo/color": "^0.1.1",
|
|
30
|
-
"@textbus/adapter-viewfly": "^4.0.0-alpha.
|
|
31
|
-
"@textbus/collaborate": "^4.0.0-alpha.
|
|
32
|
-
"@textbus/core": "^4.0.0-alpha.
|
|
33
|
-
"@textbus/platform-browser": "^4.0.0-alpha.
|
|
30
|
+
"@textbus/adapter-viewfly": "^4.0.0-alpha.71",
|
|
31
|
+
"@textbus/collaborate": "^4.0.0-alpha.71",
|
|
32
|
+
"@textbus/core": "^4.0.0-alpha.71",
|
|
33
|
+
"@textbus/platform-browser": "^4.0.0-alpha.71",
|
|
34
34
|
"@viewfly/core": "^1.0.0-alpha.17",
|
|
35
35
|
"@viewfly/hooks": "^1.0.0-alpha.17",
|
|
36
36
|
"@viewfly/platform-browser": "^1.0.0-alpha.17",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Slot } from '@textbus/core';
|
|
2
|
-
import { DynamicRef } from '@viewfly/core';
|
|
3
|
-
import { HTMLAttributes } from '@viewfly/platform-browser';
|
|
4
|
-
interface Props extends HTMLAttributes<unknown> {
|
|
5
|
-
slot: Slot;
|
|
6
|
-
/** 默认值为 div */
|
|
7
|
-
tag?: string;
|
|
8
|
-
class?: string;
|
|
9
|
-
renderEnv?: boolean;
|
|
10
|
-
elRef?: DynamicRef<HTMLElement>;
|
|
11
|
-
elKey?: number | string;
|
|
12
|
-
}
|
|
13
|
-
export declare function SlotRender(props: Props): () => any;
|
|
14
|
-
export {};
|