@textbus/xnote 0.0.1-alpha.2 → 0.0.1-alpha.3
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 +24 -0
- package/bundles/index.esm.css +24 -0
- package/bundles/index.esm.js +43 -148
- package/bundles/index.js +43 -148
- package/package.json +1 -1
package/bundles/index.esm.js
CHANGED
|
@@ -9,36 +9,7 @@ import highlightjs from 'highlight.js';
|
|
|
9
9
|
import { Adapter } from '@textbus/adapter-viewfly';
|
|
10
10
|
import { CollaborateModule } from '@textbus/collaborate';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
if ( ref === void 0 ) ref = {};
|
|
14
|
-
var insertAt = ref.insertAt;
|
|
15
|
-
|
|
16
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
17
|
-
|
|
18
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
19
|
-
var style = document.createElement('style');
|
|
20
|
-
style.type = 'text/css';
|
|
21
|
-
|
|
22
|
-
if (insertAt === 'top') {
|
|
23
|
-
if (head.firstChild) {
|
|
24
|
-
head.insertBefore(style, head.firstChild);
|
|
25
|
-
} else {
|
|
26
|
-
head.appendChild(style);
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
head.appendChild(style);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (style.styleSheet) {
|
|
33
|
-
style.styleSheet.cssText = css;
|
|
34
|
-
} else {
|
|
35
|
-
style.appendChild(document.createTextNode(css));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var css_248z$w = ".btn[vf-69b4db]{align-items:center;background:none;background:#fff;border:none;border-radius:4px;cursor:pointer;display:inline-flex;font-size:inherit;height:28px;outline:none;padding:6px 5px;transition:all .2s}.btn>span[vf-69b4db]{white-space:nowrap}.btn[vf-69b4db]:hover{background:rgba(0,0,0,.1)}.btn-arrow[vf-69b4db]{position:relative;transform:rotate(0);transform-origin:50%;width:1em}.btn.active[vf-69b4db]{background:rgba(0,0,0,.1)}.btn.active .btn-arrow[vf-69b4db]{transform:rotate(180deg)}.btn.highlight[vf-69b4db]{background-color:rgba(41,110,255,.063);color:#296eff}";
|
|
40
|
-
var scopedId$k = "vf-69b4db";
|
|
41
|
-
styleInject(css_248z$w);
|
|
12
|
+
var exportedId$k = "vf-69b4db";
|
|
42
13
|
|
|
43
14
|
/******************************************************************************
|
|
44
15
|
Copyright (c) Microsoft Corporation.
|
|
@@ -226,7 +197,7 @@ function Button(props) {
|
|
|
226
197
|
subscription.unsubscribe();
|
|
227
198
|
});
|
|
228
199
|
}
|
|
229
|
-
return withScopedCSS(
|
|
200
|
+
return withScopedCSS(exportedId$k, () => {
|
|
230
201
|
return (jsxs("button", Object.assign({ type: "button" }, props, { class: [
|
|
231
202
|
'btn',
|
|
232
203
|
{
|
|
@@ -238,12 +209,10 @@ function Button(props) {
|
|
|
238
209
|
});
|
|
239
210
|
}
|
|
240
211
|
|
|
241
|
-
var
|
|
242
|
-
var scopedId$j = "vf-ac7e8d";
|
|
243
|
-
styleInject(css_248z$v);
|
|
212
|
+
var exportedId$j = "vf-ac7e8d";
|
|
244
213
|
|
|
245
214
|
function ComponentToolbar(props) {
|
|
246
|
-
return withScopedCSS(
|
|
215
|
+
return withScopedCSS(exportedId$j, () => {
|
|
247
216
|
return (jsx("div", { class: "component-toolbar", style: props.style, children: jsx("div", { class: [
|
|
248
217
|
'toolbar',
|
|
249
218
|
{
|
|
@@ -253,19 +222,15 @@ function ComponentToolbar(props) {
|
|
|
253
222
|
});
|
|
254
223
|
}
|
|
255
224
|
|
|
256
|
-
var
|
|
257
|
-
var scopedId$i = "vf-ede279";
|
|
258
|
-
styleInject(css_248z$u);
|
|
225
|
+
var exportedId$i = "vf-ede279";
|
|
259
226
|
|
|
260
227
|
function Divider() {
|
|
261
|
-
return withScopedCSS(
|
|
228
|
+
return withScopedCSS(exportedId$i, () => {
|
|
262
229
|
return jsx("div", { class: "divider" });
|
|
263
230
|
});
|
|
264
231
|
}
|
|
265
232
|
|
|
266
|
-
var
|
|
267
|
-
var scopedId$h = "vf-4c1803";
|
|
268
|
-
styleInject(css_248z$t);
|
|
233
|
+
var exportedId$h = "vf-4c1803";
|
|
269
234
|
|
|
270
235
|
function DragResize(props) {
|
|
271
236
|
const isShow = createSignal(false);
|
|
@@ -373,20 +338,16 @@ function DragResize(props) {
|
|
|
373
338
|
unUp.unsubscribe();
|
|
374
339
|
});
|
|
375
340
|
}
|
|
376
|
-
return withScopedCSS(
|
|
341
|
+
return withScopedCSS(exportedId$h, () => {
|
|
377
342
|
return (jsxs("div", { class: "drag-resize", onClick: selectComponent, children: [jsx("div", { class: "container", ref: ref, children: props.children }), jsxs("div", { class: ['resize-tool', {
|
|
378
343
|
active: isShow()
|
|
379
344
|
}], children: [jsxs("div", { class: "mask", ref: mask, children: [component.state.width, "*", component.state.height] }), 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" })] })] })] }));
|
|
380
345
|
});
|
|
381
346
|
}
|
|
382
347
|
|
|
383
|
-
var
|
|
384
|
-
var scopedId$g = "vf-a99c5e";
|
|
385
|
-
styleInject(css_248z$s);
|
|
348
|
+
var exportedId$g = "vf-a99c5e";
|
|
386
349
|
|
|
387
|
-
var
|
|
388
|
-
var scopedId$f = "vf-4f8cfb";
|
|
389
|
-
styleInject(css_248z$r);
|
|
350
|
+
var exportedId$f = "vf-4f8cfb";
|
|
390
351
|
|
|
391
352
|
const DropdownMenuPortal = withAnnotation({
|
|
392
353
|
providers: [
|
|
@@ -469,7 +430,7 @@ const DropdownMenuPortal = withAnnotation({
|
|
|
469
430
|
dropdownContextService.canHide = true;
|
|
470
431
|
dropdownContextService.hide();
|
|
471
432
|
}
|
|
472
|
-
return createPortal(withScopedCSS(
|
|
433
|
+
return createPortal(withScopedCSS(exportedId$f, () => {
|
|
473
434
|
return (jsx("div", { onMouseenter: onEnter, onMouseleave: onLeave, ref: menuRef, style: {
|
|
474
435
|
width: props.width
|
|
475
436
|
}, class: "dropdown-menu", children: jsx("div", { class: "dropdown-menu-content", children: props.children }) }));
|
|
@@ -530,7 +491,7 @@ const Dropdown = withAnnotation({
|
|
|
530
491
|
dropdownContextService.open();
|
|
531
492
|
}
|
|
532
493
|
},
|
|
533
|
-
$render: withScopedCSS(
|
|
494
|
+
$render: withScopedCSS(exportedId$g, () => {
|
|
534
495
|
return (jsxs("div", { class: ['dropdown', props.class], style: props.style, ref: dropdownRef, children: [jsxs("div", { class: "dropdown-btn", ref: triggerRef, children: [jsx("div", { class: "dropdown-btn-inner", children: props.children }), jsx("div", { class: "dropdown-btn-arrow" })] }), isShow() && jsx(DropdownMenuPortal, { width: props.width, abreast: props.abreast, triggerRef: triggerRef, children: Array.isArray(props.menu) ?
|
|
535
496
|
props.menu.map(menu => {
|
|
536
497
|
return (jsx("div", { class: "dropdown-menu-item", onClick: () => {
|
|
@@ -546,9 +507,7 @@ const Dropdown = withAnnotation({
|
|
|
546
507
|
};
|
|
547
508
|
});
|
|
548
509
|
|
|
549
|
-
var
|
|
550
|
-
var scopedId$e = "vf-64f71d";
|
|
551
|
-
styleInject(css_248z$q);
|
|
510
|
+
var exportedId$e = "vf-64f71d";
|
|
552
511
|
|
|
553
512
|
function MenuItem(props) {
|
|
554
513
|
const dropdownContextService = inject(DropdownContextService, InjectFlags.Optional, null);
|
|
@@ -568,7 +527,7 @@ function MenuItem(props) {
|
|
|
568
527
|
}
|
|
569
528
|
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, props.value);
|
|
570
529
|
}
|
|
571
|
-
return withScopedCSS(
|
|
530
|
+
return withScopedCSS(exportedId$e, () => {
|
|
572
531
|
return (jsxs("div", { class: ['menu-item', { disabled: props.disabled, active: props.arrow && isActive() }], onClick: click, children: [jsxs("div", { children: [props.icon && jsx("span", { class: "menu-icon", children: props.icon }), props.children] }), props.arrow ?
|
|
573
532
|
jsx("div", { class: "arrow", children: jsx("span", { class: "xnote-icon-arrow-right" }) }) :
|
|
574
533
|
jsx("div", { class: [
|
|
@@ -578,13 +537,11 @@ function MenuItem(props) {
|
|
|
578
537
|
});
|
|
579
538
|
}
|
|
580
539
|
|
|
581
|
-
var
|
|
582
|
-
var scopedId$d = "vf-a23c47";
|
|
583
|
-
styleInject(css_248z$p);
|
|
540
|
+
var exportedId$d = "vf-a23c47";
|
|
584
541
|
|
|
585
542
|
function Popup(props) {
|
|
586
543
|
const host = inject(VIEW_CONTAINER);
|
|
587
|
-
return createPortal(withScopedCSS(
|
|
544
|
+
return createPortal(withScopedCSS(exportedId$d, () => {
|
|
588
545
|
return (jsx("div", { class: "popup", style: {
|
|
589
546
|
left: props.left + 'px',
|
|
590
547
|
top: props.top + 'px'
|
|
@@ -592,19 +549,15 @@ function Popup(props) {
|
|
|
592
549
|
}), host);
|
|
593
550
|
}
|
|
594
551
|
|
|
595
|
-
var
|
|
596
|
-
var scopedId$c = "vf-216815";
|
|
597
|
-
styleInject(css_248z$o);
|
|
552
|
+
var exportedId$c = "vf-216815";
|
|
598
553
|
|
|
599
554
|
function ToolbarItem(props) {
|
|
600
|
-
return withScopedCSS(
|
|
555
|
+
return withScopedCSS(exportedId$c, () => {
|
|
601
556
|
return (jsx("div", { class: "toolbar-item", children: props.children }));
|
|
602
557
|
});
|
|
603
558
|
}
|
|
604
559
|
|
|
605
|
-
var
|
|
606
|
-
var scopedId$b = "vf-2a8a65";
|
|
607
|
-
styleInject(css_248z$n);
|
|
560
|
+
var exportedId$b = "vf-2a8a65";
|
|
608
561
|
|
|
609
562
|
let RefreshService = class RefreshService {
|
|
610
563
|
constructor() {
|
|
@@ -656,12 +609,6 @@ function registerTextAlignShortcut(textbus) {
|
|
|
656
609
|
});
|
|
657
610
|
}
|
|
658
611
|
|
|
659
|
-
var css_248z$m = ".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{\n /*!\n Theme: GitHub\n Description: Light theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n\n Outdated base version: https://github.com/primer/github-syntax-light\n Current colors taken from GitHub's CSS\n */}.xnote-source-code.github .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.github .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.github pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.github code.hljs{padding:3px 5px}.xnote-source-code.github .hljs{background:#fff;color:#24292e}.xnote-source-code.github .hljs-doctag,.xnote-source-code.github .hljs-keyword,.xnote-source-code.github .hljs-meta .hljs-keyword,.xnote-source-code.github .hljs-template-tag,.xnote-source-code.github .hljs-template-variable,.xnote-source-code.github .hljs-type,.xnote-source-code.github .hljs-variable.language_{color:#d73a49}.xnote-source-code.github .hljs-title,.xnote-source-code.github .hljs-title.class_,.xnote-source-code.github .hljs-title.class_.inherited__,.xnote-source-code.github .hljs-title.function_{color:#6f42c1}.xnote-source-code.github .hljs-attr,.xnote-source-code.github .hljs-attribute,.xnote-source-code.github .hljs-literal,.xnote-source-code.github .hljs-meta,.xnote-source-code.github .hljs-number,.xnote-source-code.github .hljs-operator,.xnote-source-code.github .hljs-selector-attr,.xnote-source-code.github .hljs-selector-class,.xnote-source-code.github .hljs-selector-id,.xnote-source-code.github .hljs-variable{color:#005cc5}.xnote-source-code.github .hljs-meta .hljs-string,.xnote-source-code.github .hljs-regexp,.xnote-source-code.github .hljs-string{color:#032f62}.xnote-source-code.github .hljs-built_in,.xnote-source-code.github .hljs-symbol{color:#e36209}.xnote-source-code.github .hljs-code,.xnote-source-code.github .hljs-comment,.xnote-source-code.github .hljs-formula{color:#6a737d}.xnote-source-code.github .hljs-name,.xnote-source-code.github .hljs-quote,.xnote-source-code.github .hljs-selector-pseudo,.xnote-source-code.github .hljs-selector-tag{color:#22863a}.xnote-source-code.github .hljs-subst{color:#24292e}.xnote-source-code.github .hljs-section{color:#005cc5;font-weight:700}.xnote-source-code.github .hljs-bullet{color:#735c0f}.xnote-source-code.github .hljs-emphasis{color:#24292e;font-style:italic}.xnote-source-code.github .hljs-strong{color:#24292e;font-weight:700}.xnote-source-code.github .hljs-addition{background-color:#f0fff4;color:#22863a}.xnote-source-code.github .hljs-deletion{background-color:#ffeef0;color:#b31d28}.xnote-source-code.idea .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.idea .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.idea pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.idea code.hljs{padding:3px 5px}.xnote-source-code.idea .hljs{background:#fff;color:#000}.xnote-source-code.idea .hljs-subst,.xnote-source-code.idea .hljs-title{color:#000;font-weight:400}.xnote-source-code.idea .hljs-comment,.xnote-source-code.idea .hljs-quote{color:grey;font-style:italic}.xnote-source-code.idea .hljs-meta{color:olive}.xnote-source-code.idea .hljs-tag{background:#efefef}.xnote-source-code.idea .hljs-keyword,.xnote-source-code.idea .hljs-literal,.xnote-source-code.idea .hljs-name,.xnote-source-code.idea .hljs-section,.xnote-source-code.idea .hljs-selector-class,.xnote-source-code.idea .hljs-selector-id,.xnote-source-code.idea .hljs-selector-tag,.xnote-source-code.idea .hljs-type{color:navy;font-weight:700}.xnote-source-code.idea .hljs-attribute,.xnote-source-code.idea .hljs-link,.xnote-source-code.idea .hljs-number,.xnote-source-code.idea .hljs-regexp{color:#00f;font-weight:700}.xnote-source-code.idea .hljs-link,.xnote-source-code.idea .hljs-number,.xnote-source-code.idea .hljs-regexp{font-weight:400}.xnote-source-code.idea .hljs-string{color:green;font-weight:700}.xnote-source-code.idea .hljs-bullet,.xnote-source-code.idea .hljs-formula,.xnote-source-code.idea .hljs-symbol{background:#d0eded;color:#000;font-style:italic}.xnote-source-code.idea .hljs-doctag{text-decoration:underline}.xnote-source-code.idea .hljs-template-variable,.xnote-source-code.idea .hljs-variable{color:#660e7a}.xnote-source-code.idea .hljs-addition{background:#baeeba}.xnote-source-code.idea .hljs-deletion{background:#ffc8bd}.xnote-source-code.idea .hljs-emphasis{font-style:italic}.xnote-source-code.idea .hljs-strong{font-weight:700}.xnote-source-code.intellij-light .xnote-source-code-container{border:1px solid #eee}.xnote-source-code.intellij-light .xnote-source-code-line-number-bg{background-color:#fafafa}.xnote-source-code.intellij-light pre code.hljs{display:block;overflow-x:auto;padding:1em}.xnote-source-code.intellij-light code.hljs{padding:3px 5px}.xnote-source-code.intellij-light .hljs{background:#fff;color:#000}.xnote-source-code.intellij-light .hljs-subst,.xnote-source-code.intellij-light .hljs-title{color:#000;font-weight:400}.xnote-source-code.intellij-light .hljs-title.function_{color:#7a7a43}.xnote-source-code.intellij-light .hljs-code,.xnote-source-code.intellij-light .hljs-comment,.xnote-source-code.intellij-light .hljs-quote{color:#8c8c8c;font-style:italic}.xnote-source-code.intellij-light .hljs-meta{color:#9e880d}.xnote-source-code.intellij-light .hljs-section{color:#871094}.xnote-source-code.intellij-light .hljs-built_in,.xnote-source-code.intellij-light .hljs-keyword,.xnote-source-code.intellij-light .hljs-literal,.xnote-source-code.intellij-light .hljs-meta .hljs-keyword,.xnote-source-code.intellij-light .hljs-name,.xnote-source-code.intellij-light .hljs-selector-attr,.xnote-source-code.intellij-light .hljs-selector-class,.xnote-source-code.intellij-light .hljs-selector-id,.xnote-source-code.intellij-light .hljs-selector-pseudo,.xnote-source-code.intellij-light .hljs-selector-tag,.xnote-source-code.intellij-light .hljs-symbol,.xnote-source-code.intellij-light .hljs-template-tag,.xnote-source-code.intellij-light .hljs-type,.xnote-source-code.intellij-light .hljs-variable.language_{color:#0033b3}.xnote-source-code.intellij-light .hljs-attr,.xnote-source-code.intellij-light .hljs-property{color:#871094}.xnote-source-code.intellij-light .hljs-attribute{color:#174ad4}.xnote-source-code.intellij-light .hljs-number{color:#1750eb}.xnote-source-code.intellij-light .hljs-regexp{color:#264eff}.xnote-source-code.intellij-light .hljs-link{color:#006dcc;text-decoration:underline}.xnote-source-code.intellij-light .hljs-meta .hljs-string,.xnote-source-code.intellij-light .hljs-string{color:#067d17}.xnote-source-code.intellij-light .hljs-char.escape_{color:#0037a6}.xnote-source-code.intellij-light .hljs-doctag{text-decoration:underline}.xnote-source-code.intellij-light .hljs-template-variable{color:#248f8f}.xnote-source-code.intellij-light .hljs-addition{background:#bee6be}.xnote-source-code.intellij-light .hljs-deletion{background:#d6d6d6}.xnote-source-code.intellij-light .hljs-emphasis{font-style:italic}.xnote-source-code.intellij-light .hljs-strong{font-weight:700}.xnote-source-code.intellij-light .hljs-bullet,.xnote-source-code.intellij-light .hljs-formula,.xnote-source-code.intellij-light .hljs-operator,.xnote-source-code.intellij-light .hljs-params,.xnote-source-code.intellij-light .hljs-punctuation,.xnote-source-code.intellij-light .hljs-tag,.xnote-source-code.intellij-light .hljs-title.class_,.xnote-source-code.intellij-light .hljs-title.class_.inherited__,.xnote-source-code.intellij-light .hljs-variable,.xnote-source-code.stackoverflow-light{\n /*!\n Theme: StackOverflow Light\n Description: Light theme as used on stackoverflow.com\n Author: stackoverflow.com\n Maintainer: @Hirse\n Website: https://github.com/StackExchange/Stacks\n License: MIT\n Updated: 2021-05-15\n\n Updated for @stackoverflow/stacks v0.64.0\n Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less\n Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less\n */}.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{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{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;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-left:0}.xnote-source-code-line-content{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}";
|
|
660
|
-
styleInject(css_248z$m);
|
|
661
|
-
|
|
662
|
-
var css_248z$l = ".xnote-paragraph p{margin:8px 0}";
|
|
663
|
-
styleInject(css_248z$l);
|
|
664
|
-
|
|
665
612
|
function useReadonly() {
|
|
666
613
|
const controller = inject(Controller);
|
|
667
614
|
const is = createSignal(controller.readonly);
|
|
@@ -1473,7 +1420,7 @@ function AttrTool(props) {
|
|
|
1473
1420
|
break;
|
|
1474
1421
|
}
|
|
1475
1422
|
}
|
|
1476
|
-
return withScopedCSS(
|
|
1423
|
+
return withScopedCSS(exportedId$b, () => {
|
|
1477
1424
|
const states = checkStates();
|
|
1478
1425
|
return (jsx(Dropdown, { style: props.style, abreast: props.abreast, onCheck: updateAttr, trigger: 'hover', menu: [
|
|
1479
1426
|
{
|
|
@@ -1767,9 +1714,6 @@ Object.defineProperty(TableComponent, "type", {
|
|
|
1767
1714
|
value: ContentType.BlockComponent
|
|
1768
1715
|
});
|
|
1769
1716
|
|
|
1770
|
-
var css_248z$k = ".xnote-todolist{align-items:center;display:flex;margin:8px 0}.xnote-todolist-icon{color:#296eff;cursor:pointer;margin-right:6px}.xnote-todolist-content[style*=text-indent]{text-indent:0!important}.xnote-todolist-content[style*=text-align]{text-align:left!important}";
|
|
1771
|
-
styleInject(css_248z$k);
|
|
1772
|
-
|
|
1773
1717
|
const strikeThroughFormatter = new Formatter('strike', {
|
|
1774
1718
|
columned: true,
|
|
1775
1719
|
render(children) {
|
|
@@ -1957,9 +1901,6 @@ const todolistComponentLoader = {
|
|
|
1957
1901
|
}
|
|
1958
1902
|
};
|
|
1959
1903
|
|
|
1960
|
-
var css_248z$j = ".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}";
|
|
1961
|
-
styleInject(css_248z$j);
|
|
1962
|
-
|
|
1963
1904
|
class BlockquoteComponent extends Component {
|
|
1964
1905
|
static fromJSON(textbus, json) {
|
|
1965
1906
|
const slot = textbus.get(Registry).createSlot(json.slot);
|
|
@@ -2044,9 +1985,6 @@ const blockquoteComponentLoader = {
|
|
|
2044
1985
|
},
|
|
2045
1986
|
};
|
|
2046
1987
|
|
|
2047
|
-
var css_248z$i = ".xnote-list{margin:8px 0;padding:0}.xnote-list>li{display:flex}.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}";
|
|
2048
|
-
styleInject(css_248z$i);
|
|
2049
|
-
|
|
2050
1988
|
class ListComponent extends Component {
|
|
2051
1989
|
static fromJSON(textbus, json) {
|
|
2052
1990
|
return new ListComponent(textbus, {
|
|
@@ -2351,9 +2289,6 @@ function useActiveBlock() {
|
|
|
2351
2289
|
};
|
|
2352
2290
|
}
|
|
2353
2291
|
|
|
2354
|
-
var css_248z$h = ".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}";
|
|
2355
|
-
styleInject(css_248z$h);
|
|
2356
|
-
|
|
2357
2292
|
class HighlightBoxComponent extends Component {
|
|
2358
2293
|
static fromJSON(textbus, json) {
|
|
2359
2294
|
return new HighlightBoxComponent(textbus, {
|
|
@@ -2664,7 +2599,7 @@ function useBlockTransform() {
|
|
|
2664
2599
|
function BlockTool() {
|
|
2665
2600
|
const checkStates = useActiveBlock();
|
|
2666
2601
|
const transform = useBlockTransform();
|
|
2667
|
-
return withScopedCSS(
|
|
2602
|
+
return withScopedCSS(exportedId$b, () => {
|
|
2668
2603
|
const states = checkStates();
|
|
2669
2604
|
const types = [
|
|
2670
2605
|
[states.paragraph, 'xnote-icon-pilcrow'],
|
|
@@ -3095,9 +3030,7 @@ function CodeTool() {
|
|
|
3095
3030
|
};
|
|
3096
3031
|
}
|
|
3097
3032
|
|
|
3098
|
-
var
|
|
3099
|
-
var scopedId$a = "vf-1fbbdf";
|
|
3100
|
-
styleInject(css_248z$g);
|
|
3033
|
+
var exportedId$a = "vf-1fbbdf";
|
|
3101
3034
|
|
|
3102
3035
|
function ColorTool(props) {
|
|
3103
3036
|
const query = inject(Query);
|
|
@@ -3145,7 +3078,7 @@ function ColorTool(props) {
|
|
|
3145
3078
|
'#90a0e5',
|
|
3146
3079
|
'#c596e0',
|
|
3147
3080
|
];
|
|
3148
|
-
return withScopedCSS(
|
|
3081
|
+
return withScopedCSS(exportedId$a, () => {
|
|
3149
3082
|
const vm = viewModel();
|
|
3150
3083
|
return (jsx(Dropdown, { style: props.style, abreast: props.abreast, trigger: 'hover', menu: jsxs("div", { children: [jsx("div", { class: "color-type", children: "\u6587\u5B57\u989C\u8272" }), jsxs("div", { class: "text-colors", children: [jsx("div", { class: {
|
|
3151
3084
|
active: textColor() === ''
|
|
@@ -3353,9 +3286,7 @@ function ItalicTool() {
|
|
|
3353
3286
|
};
|
|
3354
3287
|
}
|
|
3355
3288
|
|
|
3356
|
-
var
|
|
3357
|
-
var scopedId$9 = "vf-269a0b";
|
|
3358
|
-
styleInject(css_248z$f);
|
|
3289
|
+
var exportedId$9 = "vf-269a0b";
|
|
3359
3290
|
|
|
3360
3291
|
function LinkTool(props) {
|
|
3361
3292
|
const selectionBridge = inject(SelectionBridge);
|
|
@@ -3386,7 +3317,7 @@ function LinkTool(props) {
|
|
|
3386
3317
|
onUnmounted(() => {
|
|
3387
3318
|
sub.unsubscribe();
|
|
3388
3319
|
});
|
|
3389
|
-
return withScopedCSS(
|
|
3320
|
+
return withScopedCSS(exportedId$9, () => {
|
|
3390
3321
|
const containerRect = container.getBoundingClientRect();
|
|
3391
3322
|
const rect = isShow() ? selectionBridge.getRect({
|
|
3392
3323
|
slot: selection.focusSlot,
|
|
@@ -3455,9 +3386,7 @@ function UnderlineTool() {
|
|
|
3455
3386
|
};
|
|
3456
3387
|
}
|
|
3457
3388
|
|
|
3458
|
-
var
|
|
3459
|
-
var scopedId$8 = "vf-cf8e1c";
|
|
3460
|
-
styleInject(css_248z$e);
|
|
3389
|
+
var exportedId$8 = "vf-cf8e1c";
|
|
3461
3390
|
|
|
3462
3391
|
function InsertTool(props) {
|
|
3463
3392
|
const commander = inject(Commander);
|
|
@@ -3561,14 +3490,12 @@ function InsertTool(props) {
|
|
|
3561
3490
|
break;
|
|
3562
3491
|
}
|
|
3563
3492
|
}
|
|
3564
|
-
return withScopedCSS(
|
|
3493
|
+
return withScopedCSS(exportedId$8, () => {
|
|
3565
3494
|
return jsxs(Fragment, { children: [jsxs("div", { class: "btn-group", children: [jsx(Button, { ordinary: true, onClick: () => insert('paragraph'), children: jsx("span", { class: "xnote-icon-pilcrow" }) }), jsx(Button, { ordinary: true, onClick: () => insert('h1'), children: jsx("span", { class: "xnote-icon-heading-h1" }) }), jsx(Button, { ordinary: true, onClick: () => insert('h2'), children: jsx("span", { class: "xnote-icon-heading-h2" }) }), jsx(Button, { ordinary: true, onClick: () => insert('h3'), children: jsx("span", { class: "xnote-icon-heading-h3" }) }), jsx(Button, { ordinary: true, onClick: () => insert('h4'), children: jsx("span", { class: "xnote-icon-heading-h4" }) }), jsx(Button, { ordinary: true, onClick: () => insert('h5'), children: jsx("span", { class: "xnote-icon-heading-h5" }) }), jsx(Button, { ordinary: true, onClick: () => insert('h6'), children: jsx("span", { class: "xnote-icon-heading-h6" }) }), jsx(Button, { ordinary: true, onClick: () => insert('ol'), children: jsx("span", { class: "xnote-icon-list-numbered" }) }), jsx(Button, { ordinary: true, onClick: () => insert('ul'), children: jsx("span", { class: "xnote-icon-list" }) }), jsx(Button, { ordinary: true, onClick: () => insert('sourceCode'), children: jsx("span", { class: "xnote-icon-source-code" }) })] }), jsx(Divider, {}), jsx(MenuItem, { onClick: () => insert('table'), icon: jsx("span", { class: "xnote-icon-table" }), children: "\u8868\u683C" }), jsx(MenuItem, { onClick: () => insert('todolist'), icon: jsx("span", { class: "xnote-icon-checkbox-checked" }), children: "\u5F85\u529E\u5217\u8868" }), jsx(MenuItem, { onClick: () => insert('image'), icon: jsx("span", { class: "xnote-icon-image" }), children: "\u56FE\u7247" }), jsx(MenuItem, { onClick: () => insert('video'), icon: jsx("span", { class: "xnote-icon-video" }), children: "\u89C6\u9891" }), jsx(MenuItem, { onClick: () => insert('highlightBox'), icon: jsx("span", { class: "xnote-icon-warning" }), children: "\u9AD8\u4EAE\u5757" })] });
|
|
3566
3495
|
});
|
|
3567
3496
|
}
|
|
3568
3497
|
|
|
3569
|
-
var
|
|
3570
|
-
var scopedId$7 = "vf-b05292";
|
|
3571
|
-
styleInject(css_248z$d);
|
|
3498
|
+
var exportedId$7 = "vf-b05292";
|
|
3572
3499
|
|
|
3573
3500
|
const LeftToolbar = withAnnotation({
|
|
3574
3501
|
providers: [RefreshService]
|
|
@@ -3727,7 +3654,7 @@ const LeftToolbar = withAnnotation({
|
|
|
3727
3654
|
}
|
|
3728
3655
|
}
|
|
3729
3656
|
const isEmptyBlock = createSignal(true);
|
|
3730
|
-
return withScopedCSS(
|
|
3657
|
+
return withScopedCSS(exportedId$7, () => {
|
|
3731
3658
|
const position = positionSignal();
|
|
3732
3659
|
const slot = activeSlot();
|
|
3733
3660
|
let activeNode = jsx("span", { class: "xnote-icon-pilcrow" });
|
|
@@ -3803,9 +3730,7 @@ class LeftToolbarPlugin {
|
|
|
3803
3730
|
}
|
|
3804
3731
|
}
|
|
3805
3732
|
|
|
3806
|
-
var
|
|
3807
|
-
var scopedId$6 = "vf-fee98b";
|
|
3808
|
-
styleInject(css_248z$c);
|
|
3733
|
+
var exportedId$6 = "vf-fee98b";
|
|
3809
3734
|
|
|
3810
3735
|
let EditorService = class EditorService {
|
|
3811
3736
|
constructor() {
|
|
@@ -3920,7 +3845,7 @@ const Toolbar = withAnnotation({
|
|
|
3920
3845
|
mousedownSubscription.unsubscribe();
|
|
3921
3846
|
mouseupSubscription.unsubscribe();
|
|
3922
3847
|
});
|
|
3923
|
-
return withScopedCSS(
|
|
3848
|
+
return withScopedCSS(exportedId$6, () => {
|
|
3924
3849
|
const p = viewPosition();
|
|
3925
3850
|
return (jsxs("div", { class: "toolbar", ref: toolbarRef, style: {
|
|
3926
3851
|
left: p.left + 'px',
|
|
@@ -4080,9 +4005,6 @@ class Matcher {
|
|
|
4080
4005
|
}
|
|
4081
4006
|
}
|
|
4082
4007
|
|
|
4083
|
-
var css_248z$b = ".xnote-image{display:inline-block}.xnote-image,.xnote-image img{max-width:100%}";
|
|
4084
|
-
styleInject(css_248z$b);
|
|
4085
|
-
|
|
4086
4008
|
class ImageComponent extends Component {
|
|
4087
4009
|
static fromJSON(textbus, json) {
|
|
4088
4010
|
return new ImageComponent(textbus, Object.assign({}, json));
|
|
@@ -4130,9 +4052,6 @@ const imageComponentLoader = {
|
|
|
4130
4052
|
}
|
|
4131
4053
|
};
|
|
4132
4054
|
|
|
4133
|
-
var css_248z$a = ".xnote-root{color:#1f2329}.xnote-root * ::selection{background:rgba(20,99,252,.34)}.xnote-title{font-size:30px;font-weight:600;margin:36px 0 22px}.xnote-title:before{content:attr(data-placeholder);opacity:.5;position:absolute}.xnote-content{font-size:16px;line-height:1.65}.xnote-content:before{content:attr(data-placeholder);opacity:.5;position:absolute}";
|
|
4134
|
-
styleInject(css_248z$a);
|
|
4135
|
-
|
|
4136
4055
|
class RootComponent extends Component {
|
|
4137
4056
|
constructor() {
|
|
4138
4057
|
super(...arguments);
|
|
@@ -4253,12 +4172,7 @@ const rootComponentLoader = {
|
|
|
4253
4172
|
}
|
|
4254
4173
|
};
|
|
4255
4174
|
|
|
4256
|
-
var
|
|
4257
|
-
styleInject(css_248z$9);
|
|
4258
|
-
|
|
4259
|
-
var css_248z$8 = ".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}";
|
|
4260
|
-
var scopedId$5 = "vf-681de2";
|
|
4261
|
-
styleInject(css_248z$8);
|
|
4175
|
+
var exportedId$5 = "vf-681de2";
|
|
4262
4176
|
|
|
4263
4177
|
let TableService = class TableService {
|
|
4264
4178
|
constructor() {
|
|
@@ -4370,14 +4284,12 @@ function ResizeColumn(props) {
|
|
|
4370
4284
|
});
|
|
4371
4285
|
return () => sub.unsubscribe();
|
|
4372
4286
|
});
|
|
4373
|
-
return withScopedCSS(
|
|
4287
|
+
return withScopedCSS(exportedId$5, () => {
|
|
4374
4288
|
return jsx("div", { ref: dragLineRef, class: ['drag-line'] });
|
|
4375
4289
|
});
|
|
4376
4290
|
}
|
|
4377
4291
|
|
|
4378
|
-
var
|
|
4379
|
-
var scopedId$4 = "vf-5bce97";
|
|
4380
|
-
styleInject(css_248z$7);
|
|
4292
|
+
var exportedId$4 = "vf-5bce97";
|
|
4381
4293
|
|
|
4382
4294
|
function TopBar(props) {
|
|
4383
4295
|
const editorService = inject(EditorService);
|
|
@@ -4445,7 +4357,7 @@ function TopBar(props) {
|
|
|
4445
4357
|
s.unsubscribe();
|
|
4446
4358
|
});
|
|
4447
4359
|
const deleteIndex = createSignal(null);
|
|
4448
|
-
return withScopedCSS(
|
|
4360
|
+
return withScopedCSS(exportedId$4, () => {
|
|
4449
4361
|
const { state, tableSelection } = props.component;
|
|
4450
4362
|
const position = tableSelection();
|
|
4451
4363
|
return (jsx("div", { class: ['top-bar', {
|
|
@@ -4498,9 +4410,7 @@ function TopBar(props) {
|
|
|
4498
4410
|
});
|
|
4499
4411
|
}
|
|
4500
4412
|
|
|
4501
|
-
var
|
|
4502
|
-
var scopedId$3 = "vf-b1149b";
|
|
4503
|
-
styleInject(css_248z$6);
|
|
4413
|
+
var exportedId$3 = "vf-b1149b";
|
|
4504
4414
|
|
|
4505
4415
|
function Scroll(props) {
|
|
4506
4416
|
const scrollRef = createRef();
|
|
@@ -4532,7 +4442,7 @@ function Scroll(props) {
|
|
|
4532
4442
|
draft.rightEnd = el.scrollLeft === el.scrollWidth - el.offsetWidth;
|
|
4533
4443
|
});
|
|
4534
4444
|
});
|
|
4535
|
-
return withScopedCSS(
|
|
4445
|
+
return withScopedCSS(exportedId$3, () => {
|
|
4536
4446
|
return jsx("div", { ref: [scrollRef, props.scrollRef], class: ['scroll-container', {
|
|
4537
4447
|
'left-end': showShadow().leftEnd,
|
|
4538
4448
|
'right-end': showShadow().rightEnd,
|
|
@@ -4544,9 +4454,7 @@ function Scroll(props) {
|
|
|
4544
4454
|
});
|
|
4545
4455
|
}
|
|
4546
4456
|
|
|
4547
|
-
var
|
|
4548
|
-
var scopedId$2 = "vf-ef93c0";
|
|
4549
|
-
styleInject(css_248z$5);
|
|
4457
|
+
var exportedId$2 = "vf-ef93c0";
|
|
4550
4458
|
|
|
4551
4459
|
function LeftBar(props) {
|
|
4552
4460
|
const editorService = inject(EditorService);
|
|
@@ -4620,7 +4528,7 @@ function LeftBar(props) {
|
|
|
4620
4528
|
textbus.focus();
|
|
4621
4529
|
});
|
|
4622
4530
|
}
|
|
4623
|
-
return withScopedCSS(
|
|
4531
|
+
return withScopedCSS(exportedId$2, () => {
|
|
4624
4532
|
const { state, tableSelection } = props.component;
|
|
4625
4533
|
const position = tableSelection();
|
|
4626
4534
|
return (jsxs("div", { class: ['left-bar', { active: props.isFocus() }], children: [jsx("div", { class: "insert-bar", children: jsx("table", { ref: insertBarRef, children: jsx("tbody", { children: state.rows.map((_, index) => {
|
|
@@ -4668,9 +4576,7 @@ function LeftBar(props) {
|
|
|
4668
4576
|
});
|
|
4669
4577
|
}
|
|
4670
4578
|
|
|
4671
|
-
var
|
|
4672
|
-
var scopedId$1 = "vf-d4c4a9";
|
|
4673
|
-
styleInject(css_248z$4);
|
|
4579
|
+
var exportedId$1 = "vf-d4c4a9";
|
|
4674
4580
|
|
|
4675
4581
|
function sum(numbers) {
|
|
4676
4582
|
return numbers.reduce((a, b) => a + b, 0);
|
|
@@ -4703,7 +4609,7 @@ function ResizeRow(props) {
|
|
|
4703
4609
|
});
|
|
4704
4610
|
return () => sub.unsubscribe();
|
|
4705
4611
|
});
|
|
4706
|
-
return withScopedCSS(
|
|
4612
|
+
return withScopedCSS(exportedId$1, () => {
|
|
4707
4613
|
return jsx("div", { ref: dragLineRef, style: {
|
|
4708
4614
|
display: styles().visible ? 'block' : 'none',
|
|
4709
4615
|
top: styles().top + 'px',
|
|
@@ -4712,9 +4618,7 @@ function ResizeRow(props) {
|
|
|
4712
4618
|
});
|
|
4713
4619
|
}
|
|
4714
4620
|
|
|
4715
|
-
var
|
|
4716
|
-
var scopedId = "vf-e16878";
|
|
4717
|
-
styleInject(css_248z$3);
|
|
4621
|
+
var exportedId = "vf-e16878";
|
|
4718
4622
|
|
|
4719
4623
|
function SelectionMask(props) {
|
|
4720
4624
|
const [styles, updateStyles] = useProduce({
|
|
@@ -4767,7 +4671,7 @@ function SelectionMask(props) {
|
|
|
4767
4671
|
onUnmounted(() => {
|
|
4768
4672
|
s.unsubscribe();
|
|
4769
4673
|
});
|
|
4770
|
-
return withScopedCSS(
|
|
4674
|
+
return withScopedCSS(exportedId, () => {
|
|
4771
4675
|
const style = styles();
|
|
4772
4676
|
return (jsx("div", { class: "mask", style: {
|
|
4773
4677
|
display: style.visible ? 'block' : 'none',
|
|
@@ -5065,9 +4969,6 @@ function autoComplete(table) {
|
|
|
5065
4969
|
});
|
|
5066
4970
|
}
|
|
5067
4971
|
|
|
5068
|
-
var css_248z$2 = ".xnote-video{display:inline-block}.xnote-video,.xnote-video video{max-width:100%}";
|
|
5069
|
-
styleInject(css_248z$2);
|
|
5070
|
-
|
|
5071
4972
|
class VideoComponent extends Component {
|
|
5072
4973
|
static fromJSON(textbus, json) {
|
|
5073
4974
|
return new VideoComponent(textbus, Object.assign({}, json));
|
|
@@ -5118,12 +5019,6 @@ const videoComponentLoader = {
|
|
|
5118
5019
|
}
|
|
5119
5020
|
};
|
|
5120
5021
|
|
|
5121
|
-
var css_248z$1 = "@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\"}";
|
|
5122
|
-
styleInject(css_248z$1);
|
|
5123
|
-
|
|
5124
|
-
var css_248z = ".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}";
|
|
5125
|
-
styleInject(css_248z);
|
|
5126
|
-
|
|
5127
5022
|
function createXNote(host, config = {}) {
|
|
5128
5023
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5129
5024
|
const adapter = new Adapter({
|