@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.js
CHANGED
|
@@ -11,36 +11,7 @@ var highlightjs = require('highlight.js');
|
|
|
11
11
|
var adapterViewfly = require('@textbus/adapter-viewfly');
|
|
12
12
|
var collaborate = require('@textbus/collaborate');
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
if ( ref === void 0 ) ref = {};
|
|
16
|
-
var insertAt = ref.insertAt;
|
|
17
|
-
|
|
18
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
19
|
-
|
|
20
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
21
|
-
var style = document.createElement('style');
|
|
22
|
-
style.type = 'text/css';
|
|
23
|
-
|
|
24
|
-
if (insertAt === 'top') {
|
|
25
|
-
if (head.firstChild) {
|
|
26
|
-
head.insertBefore(style, head.firstChild);
|
|
27
|
-
} else {
|
|
28
|
-
head.appendChild(style);
|
|
29
|
-
}
|
|
30
|
-
} else {
|
|
31
|
-
head.appendChild(style);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (style.styleSheet) {
|
|
35
|
-
style.styleSheet.cssText = css;
|
|
36
|
-
} else {
|
|
37
|
-
style.appendChild(document.createTextNode(css));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
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}";
|
|
42
|
-
var scopedId$k = "vf-69b4db";
|
|
43
|
-
styleInject(css_248z$w);
|
|
14
|
+
var exportedId$k = "vf-69b4db";
|
|
44
15
|
|
|
45
16
|
/******************************************************************************
|
|
46
17
|
Copyright (c) Microsoft Corporation.
|
|
@@ -228,7 +199,7 @@ function Button(props) {
|
|
|
228
199
|
subscription.unsubscribe();
|
|
229
200
|
});
|
|
230
201
|
}
|
|
231
|
-
return scopedCss.withScopedCSS(
|
|
202
|
+
return scopedCss.withScopedCSS(exportedId$k, () => {
|
|
232
203
|
return (jsxRuntime.jsxs("button", Object.assign({ type: "button" }, props, { class: [
|
|
233
204
|
'btn',
|
|
234
205
|
{
|
|
@@ -240,12 +211,10 @@ function Button(props) {
|
|
|
240
211
|
});
|
|
241
212
|
}
|
|
242
213
|
|
|
243
|
-
var
|
|
244
|
-
var scopedId$j = "vf-ac7e8d";
|
|
245
|
-
styleInject(css_248z$v);
|
|
214
|
+
var exportedId$j = "vf-ac7e8d";
|
|
246
215
|
|
|
247
216
|
function ComponentToolbar(props) {
|
|
248
|
-
return scopedCss.withScopedCSS(
|
|
217
|
+
return scopedCss.withScopedCSS(exportedId$j, () => {
|
|
249
218
|
return (jsxRuntime.jsx("div", { class: "component-toolbar", style: props.style, children: jsxRuntime.jsx("div", { class: [
|
|
250
219
|
'toolbar',
|
|
251
220
|
{
|
|
@@ -255,19 +224,15 @@ function ComponentToolbar(props) {
|
|
|
255
224
|
});
|
|
256
225
|
}
|
|
257
226
|
|
|
258
|
-
var
|
|
259
|
-
var scopedId$i = "vf-ede279";
|
|
260
|
-
styleInject(css_248z$u);
|
|
227
|
+
var exportedId$i = "vf-ede279";
|
|
261
228
|
|
|
262
229
|
function Divider() {
|
|
263
|
-
return scopedCss.withScopedCSS(
|
|
230
|
+
return scopedCss.withScopedCSS(exportedId$i, () => {
|
|
264
231
|
return jsxRuntime.jsx("div", { class: "divider" });
|
|
265
232
|
});
|
|
266
233
|
}
|
|
267
234
|
|
|
268
|
-
var
|
|
269
|
-
var scopedId$h = "vf-4c1803";
|
|
270
|
-
styleInject(css_248z$t);
|
|
235
|
+
var exportedId$h = "vf-4c1803";
|
|
271
236
|
|
|
272
237
|
function DragResize(props) {
|
|
273
238
|
const isShow = core.createSignal(false);
|
|
@@ -375,20 +340,16 @@ function DragResize(props) {
|
|
|
375
340
|
unUp.unsubscribe();
|
|
376
341
|
});
|
|
377
342
|
}
|
|
378
|
-
return scopedCss.withScopedCSS(
|
|
343
|
+
return scopedCss.withScopedCSS(exportedId$h, () => {
|
|
379
344
|
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', {
|
|
380
345
|
active: isShow()
|
|
381
346
|
}], children: [jsxRuntime.jsxs("div", { class: "mask", ref: mask, children: [component.state.width, "*", component.state.height] }), 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" })] })] })] }));
|
|
382
347
|
});
|
|
383
348
|
}
|
|
384
349
|
|
|
385
|
-
var
|
|
386
|
-
var scopedId$g = "vf-a99c5e";
|
|
387
|
-
styleInject(css_248z$s);
|
|
350
|
+
var exportedId$g = "vf-a99c5e";
|
|
388
351
|
|
|
389
|
-
var
|
|
390
|
-
var scopedId$f = "vf-4f8cfb";
|
|
391
|
-
styleInject(css_248z$r);
|
|
352
|
+
var exportedId$f = "vf-4f8cfb";
|
|
392
353
|
|
|
393
354
|
const DropdownMenuPortal = core.withAnnotation({
|
|
394
355
|
providers: [
|
|
@@ -471,7 +432,7 @@ const DropdownMenuPortal = core.withAnnotation({
|
|
|
471
432
|
dropdownContextService.canHide = true;
|
|
472
433
|
dropdownContextService.hide();
|
|
473
434
|
}
|
|
474
|
-
return platformBrowser$1.createPortal(scopedCss.withScopedCSS(
|
|
435
|
+
return platformBrowser$1.createPortal(scopedCss.withScopedCSS(exportedId$f, () => {
|
|
475
436
|
return (jsxRuntime.jsx("div", { onMouseenter: onEnter, onMouseleave: onLeave, ref: menuRef, style: {
|
|
476
437
|
width: props.width
|
|
477
438
|
}, class: "dropdown-menu", children: jsxRuntime.jsx("div", { class: "dropdown-menu-content", children: props.children }) }));
|
|
@@ -532,7 +493,7 @@ const Dropdown = core.withAnnotation({
|
|
|
532
493
|
dropdownContextService.open();
|
|
533
494
|
}
|
|
534
495
|
},
|
|
535
|
-
$render: scopedCss.withScopedCSS(
|
|
496
|
+
$render: scopedCss.withScopedCSS(exportedId$g, () => {
|
|
536
497
|
return (jsxRuntime.jsxs("div", { class: ['dropdown', props.class], style: props.style, ref: dropdownRef, children: [jsxRuntime.jsxs("div", { class: "dropdown-btn", ref: triggerRef, children: [jsxRuntime.jsx("div", { class: "dropdown-btn-inner", children: props.children }), jsxRuntime.jsx("div", { class: "dropdown-btn-arrow" })] }), isShow() && jsxRuntime.jsx(DropdownMenuPortal, { width: props.width, abreast: props.abreast, triggerRef: triggerRef, children: Array.isArray(props.menu) ?
|
|
537
498
|
props.menu.map(menu => {
|
|
538
499
|
return (jsxRuntime.jsx("div", { class: "dropdown-menu-item", onClick: () => {
|
|
@@ -548,9 +509,7 @@ const Dropdown = core.withAnnotation({
|
|
|
548
509
|
};
|
|
549
510
|
});
|
|
550
511
|
|
|
551
|
-
var
|
|
552
|
-
var scopedId$e = "vf-64f71d";
|
|
553
|
-
styleInject(css_248z$q);
|
|
512
|
+
var exportedId$e = "vf-64f71d";
|
|
554
513
|
|
|
555
514
|
function MenuItem(props) {
|
|
556
515
|
const dropdownContextService = core.inject(exports.DropdownContextService, core.InjectFlags.Optional, null);
|
|
@@ -570,7 +529,7 @@ function MenuItem(props) {
|
|
|
570
529
|
}
|
|
571
530
|
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, props.value);
|
|
572
531
|
}
|
|
573
|
-
return scopedCss.withScopedCSS(
|
|
532
|
+
return scopedCss.withScopedCSS(exportedId$e, () => {
|
|
574
533
|
return (jsxRuntime.jsxs("div", { class: ['menu-item', { disabled: props.disabled, active: props.arrow && isActive() }], onClick: click, children: [jsxRuntime.jsxs("div", { children: [props.icon && jsxRuntime.jsx("span", { class: "menu-icon", children: props.icon }), props.children] }), props.arrow ?
|
|
575
534
|
jsxRuntime.jsx("div", { class: "arrow", children: jsxRuntime.jsx("span", { class: "xnote-icon-arrow-right" }) }) :
|
|
576
535
|
jsxRuntime.jsx("div", { class: [
|
|
@@ -580,13 +539,11 @@ function MenuItem(props) {
|
|
|
580
539
|
});
|
|
581
540
|
}
|
|
582
541
|
|
|
583
|
-
var
|
|
584
|
-
var scopedId$d = "vf-a23c47";
|
|
585
|
-
styleInject(css_248z$p);
|
|
542
|
+
var exportedId$d = "vf-a23c47";
|
|
586
543
|
|
|
587
544
|
function Popup(props) {
|
|
588
545
|
const host = core.inject(platformBrowser.VIEW_CONTAINER);
|
|
589
|
-
return platformBrowser$1.createPortal(scopedCss.withScopedCSS(
|
|
546
|
+
return platformBrowser$1.createPortal(scopedCss.withScopedCSS(exportedId$d, () => {
|
|
590
547
|
return (jsxRuntime.jsx("div", { class: "popup", style: {
|
|
591
548
|
left: props.left + 'px',
|
|
592
549
|
top: props.top + 'px'
|
|
@@ -594,19 +551,15 @@ function Popup(props) {
|
|
|
594
551
|
}), host);
|
|
595
552
|
}
|
|
596
553
|
|
|
597
|
-
var
|
|
598
|
-
var scopedId$c = "vf-216815";
|
|
599
|
-
styleInject(css_248z$o);
|
|
554
|
+
var exportedId$c = "vf-216815";
|
|
600
555
|
|
|
601
556
|
function ToolbarItem(props) {
|
|
602
|
-
return scopedCss.withScopedCSS(
|
|
557
|
+
return scopedCss.withScopedCSS(exportedId$c, () => {
|
|
603
558
|
return (jsxRuntime.jsx("div", { class: "toolbar-item", children: props.children }));
|
|
604
559
|
});
|
|
605
560
|
}
|
|
606
561
|
|
|
607
|
-
var
|
|
608
|
-
var scopedId$b = "vf-2a8a65";
|
|
609
|
-
styleInject(css_248z$n);
|
|
562
|
+
var exportedId$b = "vf-2a8a65";
|
|
610
563
|
|
|
611
564
|
exports.RefreshService = class RefreshService {
|
|
612
565
|
constructor() {
|
|
@@ -658,12 +611,6 @@ function registerTextAlignShortcut(textbus) {
|
|
|
658
611
|
});
|
|
659
612
|
}
|
|
660
613
|
|
|
661
|
-
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}";
|
|
662
|
-
styleInject(css_248z$m);
|
|
663
|
-
|
|
664
|
-
var css_248z$l = ".xnote-paragraph p{margin:8px 0}";
|
|
665
|
-
styleInject(css_248z$l);
|
|
666
|
-
|
|
667
614
|
function useReadonly() {
|
|
668
615
|
const controller = core.inject(core$1.Controller);
|
|
669
616
|
const is = core.createSignal(controller.readonly);
|
|
@@ -1475,7 +1422,7 @@ function AttrTool(props) {
|
|
|
1475
1422
|
break;
|
|
1476
1423
|
}
|
|
1477
1424
|
}
|
|
1478
|
-
return scopedCss.withScopedCSS(
|
|
1425
|
+
return scopedCss.withScopedCSS(exportedId$b, () => {
|
|
1479
1426
|
const states = checkStates();
|
|
1480
1427
|
return (jsxRuntime.jsx(Dropdown, { style: props.style, abreast: props.abreast, onCheck: updateAttr, trigger: 'hover', menu: [
|
|
1481
1428
|
{
|
|
@@ -1769,9 +1716,6 @@ Object.defineProperty(TableComponent, "type", {
|
|
|
1769
1716
|
value: core$1.ContentType.BlockComponent
|
|
1770
1717
|
});
|
|
1771
1718
|
|
|
1772
|
-
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}";
|
|
1773
|
-
styleInject(css_248z$k);
|
|
1774
|
-
|
|
1775
1719
|
const strikeThroughFormatter = new core$1.Formatter('strike', {
|
|
1776
1720
|
columned: true,
|
|
1777
1721
|
render(children) {
|
|
@@ -1959,9 +1903,6 @@ const todolistComponentLoader = {
|
|
|
1959
1903
|
}
|
|
1960
1904
|
};
|
|
1961
1905
|
|
|
1962
|
-
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}";
|
|
1963
|
-
styleInject(css_248z$j);
|
|
1964
|
-
|
|
1965
1906
|
class BlockquoteComponent extends core$1.Component {
|
|
1966
1907
|
static fromJSON(textbus, json) {
|
|
1967
1908
|
const slot = textbus.get(core$1.Registry).createSlot(json.slot);
|
|
@@ -2046,9 +1987,6 @@ const blockquoteComponentLoader = {
|
|
|
2046
1987
|
},
|
|
2047
1988
|
};
|
|
2048
1989
|
|
|
2049
|
-
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}";
|
|
2050
|
-
styleInject(css_248z$i);
|
|
2051
|
-
|
|
2052
1990
|
class ListComponent extends core$1.Component {
|
|
2053
1991
|
static fromJSON(textbus, json) {
|
|
2054
1992
|
return new ListComponent(textbus, {
|
|
@@ -2353,9 +2291,6 @@ function useActiveBlock() {
|
|
|
2353
2291
|
};
|
|
2354
2292
|
}
|
|
2355
2293
|
|
|
2356
|
-
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}";
|
|
2357
|
-
styleInject(css_248z$h);
|
|
2358
|
-
|
|
2359
2294
|
class HighlightBoxComponent extends core$1.Component {
|
|
2360
2295
|
static fromJSON(textbus, json) {
|
|
2361
2296
|
return new HighlightBoxComponent(textbus, {
|
|
@@ -2666,7 +2601,7 @@ function useBlockTransform() {
|
|
|
2666
2601
|
function BlockTool() {
|
|
2667
2602
|
const checkStates = useActiveBlock();
|
|
2668
2603
|
const transform = useBlockTransform();
|
|
2669
|
-
return scopedCss.withScopedCSS(
|
|
2604
|
+
return scopedCss.withScopedCSS(exportedId$b, () => {
|
|
2670
2605
|
const states = checkStates();
|
|
2671
2606
|
const types = [
|
|
2672
2607
|
[states.paragraph, 'xnote-icon-pilcrow'],
|
|
@@ -3097,9 +3032,7 @@ function CodeTool() {
|
|
|
3097
3032
|
};
|
|
3098
3033
|
}
|
|
3099
3034
|
|
|
3100
|
-
var
|
|
3101
|
-
var scopedId$a = "vf-1fbbdf";
|
|
3102
|
-
styleInject(css_248z$g);
|
|
3035
|
+
var exportedId$a = "vf-1fbbdf";
|
|
3103
3036
|
|
|
3104
3037
|
function ColorTool(props) {
|
|
3105
3038
|
const query = core.inject(core$1.Query);
|
|
@@ -3147,7 +3080,7 @@ function ColorTool(props) {
|
|
|
3147
3080
|
'#90a0e5',
|
|
3148
3081
|
'#c596e0',
|
|
3149
3082
|
];
|
|
3150
|
-
return scopedCss.withScopedCSS(
|
|
3083
|
+
return scopedCss.withScopedCSS(exportedId$a, () => {
|
|
3151
3084
|
const vm = viewModel();
|
|
3152
3085
|
return (jsxRuntime.jsx(Dropdown, { style: props.style, abreast: props.abreast, trigger: 'hover', menu: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { class: "color-type", children: "\u6587\u5B57\u989C\u8272" }), jsxRuntime.jsxs("div", { class: "text-colors", children: [jsxRuntime.jsx("div", { class: {
|
|
3153
3086
|
active: textColor() === ''
|
|
@@ -3355,9 +3288,7 @@ function ItalicTool() {
|
|
|
3355
3288
|
};
|
|
3356
3289
|
}
|
|
3357
3290
|
|
|
3358
|
-
var
|
|
3359
|
-
var scopedId$9 = "vf-269a0b";
|
|
3360
|
-
styleInject(css_248z$f);
|
|
3291
|
+
var exportedId$9 = "vf-269a0b";
|
|
3361
3292
|
|
|
3362
3293
|
function LinkTool(props) {
|
|
3363
3294
|
const selectionBridge = core.inject(platformBrowser.SelectionBridge);
|
|
@@ -3388,7 +3319,7 @@ function LinkTool(props) {
|
|
|
3388
3319
|
core.onUnmounted(() => {
|
|
3389
3320
|
sub.unsubscribe();
|
|
3390
3321
|
});
|
|
3391
|
-
return scopedCss.withScopedCSS(
|
|
3322
|
+
return scopedCss.withScopedCSS(exportedId$9, () => {
|
|
3392
3323
|
const containerRect = container.getBoundingClientRect();
|
|
3393
3324
|
const rect = isShow() ? selectionBridge.getRect({
|
|
3394
3325
|
slot: selection.focusSlot,
|
|
@@ -3457,9 +3388,7 @@ function UnderlineTool() {
|
|
|
3457
3388
|
};
|
|
3458
3389
|
}
|
|
3459
3390
|
|
|
3460
|
-
var
|
|
3461
|
-
var scopedId$8 = "vf-cf8e1c";
|
|
3462
|
-
styleInject(css_248z$e);
|
|
3391
|
+
var exportedId$8 = "vf-cf8e1c";
|
|
3463
3392
|
|
|
3464
3393
|
function InsertTool(props) {
|
|
3465
3394
|
const commander = core.inject(core$1.Commander);
|
|
@@ -3563,14 +3492,12 @@ function InsertTool(props) {
|
|
|
3563
3492
|
break;
|
|
3564
3493
|
}
|
|
3565
3494
|
}
|
|
3566
|
-
return scopedCss.withScopedCSS(
|
|
3495
|
+
return scopedCss.withScopedCSS(exportedId$8, () => {
|
|
3567
3496
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { class: "btn-group", children: [jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('paragraph'), children: jsxRuntime.jsx("span", { class: "xnote-icon-pilcrow" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('h1'), children: jsxRuntime.jsx("span", { class: "xnote-icon-heading-h1" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('h2'), children: jsxRuntime.jsx("span", { class: "xnote-icon-heading-h2" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('h3'), children: jsxRuntime.jsx("span", { class: "xnote-icon-heading-h3" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('h4'), children: jsxRuntime.jsx("span", { class: "xnote-icon-heading-h4" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('h5'), children: jsxRuntime.jsx("span", { class: "xnote-icon-heading-h5" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('h6'), children: jsxRuntime.jsx("span", { class: "xnote-icon-heading-h6" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('ol'), children: jsxRuntime.jsx("span", { class: "xnote-icon-list-numbered" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('ul'), children: jsxRuntime.jsx("span", { class: "xnote-icon-list" }) }), jsxRuntime.jsx(Button, { ordinary: true, onClick: () => insert('sourceCode'), children: jsxRuntime.jsx("span", { class: "xnote-icon-source-code" }) })] }), jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(MenuItem, { onClick: () => insert('table'), icon: jsxRuntime.jsx("span", { class: "xnote-icon-table" }), children: "\u8868\u683C" }), jsxRuntime.jsx(MenuItem, { onClick: () => insert('todolist'), icon: jsxRuntime.jsx("span", { class: "xnote-icon-checkbox-checked" }), children: "\u5F85\u529E\u5217\u8868" }), jsxRuntime.jsx(MenuItem, { onClick: () => insert('image'), icon: jsxRuntime.jsx("span", { class: "xnote-icon-image" }), children: "\u56FE\u7247" }), jsxRuntime.jsx(MenuItem, { onClick: () => insert('video'), icon: jsxRuntime.jsx("span", { class: "xnote-icon-video" }), children: "\u89C6\u9891" }), jsxRuntime.jsx(MenuItem, { onClick: () => insert('highlightBox'), icon: jsxRuntime.jsx("span", { class: "xnote-icon-warning" }), children: "\u9AD8\u4EAE\u5757" })] });
|
|
3568
3497
|
});
|
|
3569
3498
|
}
|
|
3570
3499
|
|
|
3571
|
-
var
|
|
3572
|
-
var scopedId$7 = "vf-b05292";
|
|
3573
|
-
styleInject(css_248z$d);
|
|
3500
|
+
var exportedId$7 = "vf-b05292";
|
|
3574
3501
|
|
|
3575
3502
|
const LeftToolbar = core.withAnnotation({
|
|
3576
3503
|
providers: [exports.RefreshService]
|
|
@@ -3729,7 +3656,7 @@ const LeftToolbar = core.withAnnotation({
|
|
|
3729
3656
|
}
|
|
3730
3657
|
}
|
|
3731
3658
|
const isEmptyBlock = core.createSignal(true);
|
|
3732
|
-
return scopedCss.withScopedCSS(
|
|
3659
|
+
return scopedCss.withScopedCSS(exportedId$7, () => {
|
|
3733
3660
|
const position = positionSignal();
|
|
3734
3661
|
const slot = activeSlot();
|
|
3735
3662
|
let activeNode = jsxRuntime.jsx("span", { class: "xnote-icon-pilcrow" });
|
|
@@ -3805,9 +3732,7 @@ class LeftToolbarPlugin {
|
|
|
3805
3732
|
}
|
|
3806
3733
|
}
|
|
3807
3734
|
|
|
3808
|
-
var
|
|
3809
|
-
var scopedId$6 = "vf-fee98b";
|
|
3810
|
-
styleInject(css_248z$c);
|
|
3735
|
+
var exportedId$6 = "vf-fee98b";
|
|
3811
3736
|
|
|
3812
3737
|
exports.EditorService = class EditorService {
|
|
3813
3738
|
constructor() {
|
|
@@ -3922,7 +3847,7 @@ const Toolbar = core.withAnnotation({
|
|
|
3922
3847
|
mousedownSubscription.unsubscribe();
|
|
3923
3848
|
mouseupSubscription.unsubscribe();
|
|
3924
3849
|
});
|
|
3925
|
-
return scopedCss.withScopedCSS(
|
|
3850
|
+
return scopedCss.withScopedCSS(exportedId$6, () => {
|
|
3926
3851
|
const p = viewPosition();
|
|
3927
3852
|
return (jsxRuntime.jsxs("div", { class: "toolbar", ref: toolbarRef, style: {
|
|
3928
3853
|
left: p.left + 'px',
|
|
@@ -4082,9 +4007,6 @@ class Matcher {
|
|
|
4082
4007
|
}
|
|
4083
4008
|
}
|
|
4084
4009
|
|
|
4085
|
-
var css_248z$b = ".xnote-image{display:inline-block}.xnote-image,.xnote-image img{max-width:100%}";
|
|
4086
|
-
styleInject(css_248z$b);
|
|
4087
|
-
|
|
4088
4010
|
class ImageComponent extends core$1.Component {
|
|
4089
4011
|
static fromJSON(textbus, json) {
|
|
4090
4012
|
return new ImageComponent(textbus, Object.assign({}, json));
|
|
@@ -4132,9 +4054,6 @@ const imageComponentLoader = {
|
|
|
4132
4054
|
}
|
|
4133
4055
|
};
|
|
4134
4056
|
|
|
4135
|
-
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}";
|
|
4136
|
-
styleInject(css_248z$a);
|
|
4137
|
-
|
|
4138
4057
|
class RootComponent extends core$1.Component {
|
|
4139
4058
|
constructor() {
|
|
4140
4059
|
super(...arguments);
|
|
@@ -4255,12 +4174,7 @@ const rootComponentLoader = {
|
|
|
4255
4174
|
}
|
|
4256
4175
|
};
|
|
4257
4176
|
|
|
4258
|
-
var
|
|
4259
|
-
styleInject(css_248z$9);
|
|
4260
|
-
|
|
4261
|
-
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}";
|
|
4262
|
-
var scopedId$5 = "vf-681de2";
|
|
4263
|
-
styleInject(css_248z$8);
|
|
4177
|
+
var exportedId$5 = "vf-681de2";
|
|
4264
4178
|
|
|
4265
4179
|
let TableService = class TableService {
|
|
4266
4180
|
constructor() {
|
|
@@ -4372,14 +4286,12 @@ function ResizeColumn(props) {
|
|
|
4372
4286
|
});
|
|
4373
4287
|
return () => sub.unsubscribe();
|
|
4374
4288
|
});
|
|
4375
|
-
return scopedCss.withScopedCSS(
|
|
4289
|
+
return scopedCss.withScopedCSS(exportedId$5, () => {
|
|
4376
4290
|
return jsxRuntime.jsx("div", { ref: dragLineRef, class: ['drag-line'] });
|
|
4377
4291
|
});
|
|
4378
4292
|
}
|
|
4379
4293
|
|
|
4380
|
-
var
|
|
4381
|
-
var scopedId$4 = "vf-5bce97";
|
|
4382
|
-
styleInject(css_248z$7);
|
|
4294
|
+
var exportedId$4 = "vf-5bce97";
|
|
4383
4295
|
|
|
4384
4296
|
function TopBar(props) {
|
|
4385
4297
|
const editorService = core.inject(exports.EditorService);
|
|
@@ -4447,7 +4359,7 @@ function TopBar(props) {
|
|
|
4447
4359
|
s.unsubscribe();
|
|
4448
4360
|
});
|
|
4449
4361
|
const deleteIndex = core.createSignal(null);
|
|
4450
|
-
return scopedCss.withScopedCSS(
|
|
4362
|
+
return scopedCss.withScopedCSS(exportedId$4, () => {
|
|
4451
4363
|
const { state, tableSelection } = props.component;
|
|
4452
4364
|
const position = tableSelection();
|
|
4453
4365
|
return (jsxRuntime.jsx("div", { class: ['top-bar', {
|
|
@@ -4500,9 +4412,7 @@ function TopBar(props) {
|
|
|
4500
4412
|
});
|
|
4501
4413
|
}
|
|
4502
4414
|
|
|
4503
|
-
var
|
|
4504
|
-
var scopedId$3 = "vf-b1149b";
|
|
4505
|
-
styleInject(css_248z$6);
|
|
4415
|
+
var exportedId$3 = "vf-b1149b";
|
|
4506
4416
|
|
|
4507
4417
|
function Scroll(props) {
|
|
4508
4418
|
const scrollRef = core.createRef();
|
|
@@ -4534,7 +4444,7 @@ function Scroll(props) {
|
|
|
4534
4444
|
draft.rightEnd = el.scrollLeft === el.scrollWidth - el.offsetWidth;
|
|
4535
4445
|
});
|
|
4536
4446
|
});
|
|
4537
|
-
return scopedCss.withScopedCSS(
|
|
4447
|
+
return scopedCss.withScopedCSS(exportedId$3, () => {
|
|
4538
4448
|
return jsxRuntime.jsx("div", { ref: [scrollRef, props.scrollRef], class: ['scroll-container', {
|
|
4539
4449
|
'left-end': showShadow().leftEnd,
|
|
4540
4450
|
'right-end': showShadow().rightEnd,
|
|
@@ -4546,9 +4456,7 @@ function Scroll(props) {
|
|
|
4546
4456
|
});
|
|
4547
4457
|
}
|
|
4548
4458
|
|
|
4549
|
-
var
|
|
4550
|
-
var scopedId$2 = "vf-ef93c0";
|
|
4551
|
-
styleInject(css_248z$5);
|
|
4459
|
+
var exportedId$2 = "vf-ef93c0";
|
|
4552
4460
|
|
|
4553
4461
|
function LeftBar(props) {
|
|
4554
4462
|
const editorService = core.inject(exports.EditorService);
|
|
@@ -4622,7 +4530,7 @@ function LeftBar(props) {
|
|
|
4622
4530
|
textbus.focus();
|
|
4623
4531
|
});
|
|
4624
4532
|
}
|
|
4625
|
-
return scopedCss.withScopedCSS(
|
|
4533
|
+
return scopedCss.withScopedCSS(exportedId$2, () => {
|
|
4626
4534
|
const { state, tableSelection } = props.component;
|
|
4627
4535
|
const position = tableSelection();
|
|
4628
4536
|
return (jsxRuntime.jsxs("div", { class: ['left-bar', { active: props.isFocus() }], children: [jsxRuntime.jsx("div", { class: "insert-bar", children: jsxRuntime.jsx("table", { ref: insertBarRef, children: jsxRuntime.jsx("tbody", { children: state.rows.map((_, index) => {
|
|
@@ -4670,9 +4578,7 @@ function LeftBar(props) {
|
|
|
4670
4578
|
});
|
|
4671
4579
|
}
|
|
4672
4580
|
|
|
4673
|
-
var
|
|
4674
|
-
var scopedId$1 = "vf-d4c4a9";
|
|
4675
|
-
styleInject(css_248z$4);
|
|
4581
|
+
var exportedId$1 = "vf-d4c4a9";
|
|
4676
4582
|
|
|
4677
4583
|
function sum(numbers) {
|
|
4678
4584
|
return numbers.reduce((a, b) => a + b, 0);
|
|
@@ -4705,7 +4611,7 @@ function ResizeRow(props) {
|
|
|
4705
4611
|
});
|
|
4706
4612
|
return () => sub.unsubscribe();
|
|
4707
4613
|
});
|
|
4708
|
-
return scopedCss.withScopedCSS(
|
|
4614
|
+
return scopedCss.withScopedCSS(exportedId$1, () => {
|
|
4709
4615
|
return jsxRuntime.jsx("div", { ref: dragLineRef, style: {
|
|
4710
4616
|
display: styles().visible ? 'block' : 'none',
|
|
4711
4617
|
top: styles().top + 'px',
|
|
@@ -4714,9 +4620,7 @@ function ResizeRow(props) {
|
|
|
4714
4620
|
});
|
|
4715
4621
|
}
|
|
4716
4622
|
|
|
4717
|
-
var
|
|
4718
|
-
var scopedId = "vf-e16878";
|
|
4719
|
-
styleInject(css_248z$3);
|
|
4623
|
+
var exportedId = "vf-e16878";
|
|
4720
4624
|
|
|
4721
4625
|
function SelectionMask(props) {
|
|
4722
4626
|
const [styles, updateStyles] = hooks.useProduce({
|
|
@@ -4769,7 +4673,7 @@ function SelectionMask(props) {
|
|
|
4769
4673
|
core.onUnmounted(() => {
|
|
4770
4674
|
s.unsubscribe();
|
|
4771
4675
|
});
|
|
4772
|
-
return scopedCss.withScopedCSS(
|
|
4676
|
+
return scopedCss.withScopedCSS(exportedId, () => {
|
|
4773
4677
|
const style = styles();
|
|
4774
4678
|
return (jsxRuntime.jsx("div", { class: "mask", style: {
|
|
4775
4679
|
display: style.visible ? 'block' : 'none',
|
|
@@ -5067,9 +4971,6 @@ function autoComplete(table) {
|
|
|
5067
4971
|
});
|
|
5068
4972
|
}
|
|
5069
4973
|
|
|
5070
|
-
var css_248z$2 = ".xnote-video{display:inline-block}.xnote-video,.xnote-video video{max-width:100%}";
|
|
5071
|
-
styleInject(css_248z$2);
|
|
5072
|
-
|
|
5073
4974
|
class VideoComponent extends core$1.Component {
|
|
5074
4975
|
static fromJSON(textbus, json) {
|
|
5075
4976
|
return new VideoComponent(textbus, Object.assign({}, json));
|
|
@@ -5120,12 +5021,6 @@ const videoComponentLoader = {
|
|
|
5120
5021
|
}
|
|
5121
5022
|
};
|
|
5122
5023
|
|
|
5123
|
-
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\"}";
|
|
5124
|
-
styleInject(css_248z$1);
|
|
5125
|
-
|
|
5126
|
-
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}";
|
|
5127
|
-
styleInject(css_248z);
|
|
5128
|
-
|
|
5129
5024
|
function createXNote(host, config = {}) {
|
|
5130
5025
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5131
5026
|
const adapter = new adapterViewfly.Adapter({
|