@code0-tech/pictor 0.10.9 → 0.11.1
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/dist/assets/components/context-menu/ContextMenu.style.css +1 -1
- package/dist/assets/components/form/EditorInput.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/scroll-area/ScrollArea.style.css +1 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
- package/dist/components/context-menu/ContextMenu.js +109 -90
- package/dist/components/form/EditorInput.d.ts +19 -8
- package/dist/components/form/EditorInput.js +164 -72
- package/dist/components/form/InputSuggestion.d.ts +1 -1
- package/dist/components/form/useForm.js +61 -46
- package/dist/components/menu/Menu.js +112 -93
- package/dist/components/scroll-area/ScrollArea.d.ts +8 -0
- package/dist/components/scroll-area/ScrollArea.js +70 -39
- package/dist/components/tooltip/Tooltip.js +53 -43
- package/dist/index.js +71 -70
- package/package.json +11 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
.context-menu__content,.context-menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.context-menu__content,.context-menu__sub-content{border-radius:1rem}.context-menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.context-menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.context-menu__item,.context-menu__sub-trigger{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.context-menu__item,.context-menu__sub-trigger{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__item:focus,.context-menu__sub-trigger:focus{outline:none}.context-menu__item,.context-menu__sub-trigger{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.context-menu__item:disabled,.context-menu__item[data-disabled],.context-menu__item[aria-disabled=true],.context-menu__item--disabled,.context-menu__sub-trigger:disabled,.context-menu__sub-trigger[data-disabled],.context-menu__sub-trigger[aria-disabled=true],.context-menu__sub-trigger--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.context-menu__item,.context-menu__sub-trigger{box-shadow:none}.context-menu__item:focus,.context-menu__item[data-focus=true],.context-menu__sub-trigger:focus,.context-menu__sub-trigger[data-focus=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.context-menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.context-menu__content--primary,.context-menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--secondary,.context-menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--tertiary,.context-menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--success,.context-menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--warning,.context-menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--error,.context-menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--info,.context-menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}
|
|
1
|
+
.context-menu__content,.context-menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999;max-height:var(--radix-popper-available-height, 100vh);display:flex;flex-direction:column}.context-menu__content,.context-menu__sub-content{border-radius:1rem}.context-menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.context-menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.context-menu__item,.context-menu__sub-trigger{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.context-menu__item,.context-menu__sub-trigger{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__item:focus,.context-menu__sub-trigger:focus{outline:none}.context-menu__item,.context-menu__sub-trigger{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.context-menu__item:disabled,.context-menu__item[data-disabled],.context-menu__item[aria-disabled=true],.context-menu__item--disabled,.context-menu__sub-trigger:disabled,.context-menu__sub-trigger[data-disabled],.context-menu__sub-trigger[aria-disabled=true],.context-menu__sub-trigger--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.context-menu__item,.context-menu__sub-trigger{box-shadow:none}.context-menu__item:focus,.context-menu__item[data-focus=true],.context-menu__sub-trigger:focus,.context-menu__sub-trigger[data-focus=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.context-menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.context-menu__content--primary,.context-menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--secondary,.context-menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--tertiary,.context-menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--success,.context-menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--warning,.context-menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--error,.context-menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--info,.context-menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.editor-input{width:100%;
|
|
1
|
+
.input-wrapper__control--single-line{white-space:pre!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.input-wrapper__control--single-line::-webkit-scrollbar{display:none}.editor-input__menu-anchor{position:absolute;left:0;top:0;width:0;height:0;opacity:0;pointer-events:none}.editor-input{width:100%;overflow:hidden;position:relative;align-self:stretch;font-family:Inter,sans-serif;font-size:.8rem;letter-spacing:-.5px;font-weight:400;color:#ffffffbf}.editor-input [data-slate-editor]{flex:1 1 auto;padding:.6rem 0;align-self:stretch;outline:none;caret-color:#fff;min-height:1.2em;white-space:pre-wrap;word-break:break-word}.editor-input [data-slate-node=element]{margin:0;padding:0}.editor-input ::selection{background:#70b3ff40}.editor-input [data-slate-placeholder]{color:#ffffff4d;pointer-events:none;-webkit-user-select:none;user-select:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.menu__content--primary,.menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1)
|
|
1
|
+
.menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999;max-height:var(--radix-popper-available-height, 100vh);display:flex;flex-direction:column}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.menu__content--primary,.menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--secondary,.menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--tertiary,.menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--success,.menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--warning,.menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--error,.menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--info,.menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.scroll-area{overflow:hidden}.scroll-area__viewport{width:100%;height:100%;display:block!important}.scroll-area__scrollbar{display:flex;-webkit-user-select:none;user-select:none;touch-action:none}.scroll-area__scrollbar[data-orientation=vertical]{width:.5rem}.scroll-area__scrollbar[data-orientation=horizontal]{flex-direction:column;height:.5rem}.scroll-area__thumb{flex:1;cursor:grabbing}.scroll-area__thumb{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;box-shadow:none}
|
|
1
|
+
.scroll-area{overflow:hidden}.scroll-area--auto{min-height:0}.scroll-area__viewport{width:100%;height:100%;display:block!important}.scroll-area__scrollbar{display:flex;-webkit-user-select:none;user-select:none;touch-action:none}.scroll-area__scrollbar[data-orientation=vertical]{width:.5rem}.scroll-area__scrollbar[data-orientation=horizontal]{flex-direction:column;height:.5rem}.scroll-area__thumb{flex:1;cursor:grabbing}.scroll-area__thumb{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;box-shadow:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip__content{z-index:999;padding:.35rem .7rem}.tooltip__content{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:1rem}.tooltip__arrow{fill:#201e2c}.tooltip__content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--primary{fill:#070514}.tooltip__content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--secondary{fill:#191825}.tooltip__content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--tertiary{fill:#201e2c}.tooltip__content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--success{fill:#0a1814}.tooltip__content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--warning{fill:#201813}.tooltip__content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--error{fill:#1c0516}.tooltip__content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--info{fill:#121e24}
|
|
1
|
+
.tooltip__content{z-index:999;padding:.35rem .7rem;box-sizing:border-box;max-height:var(--radix-popper-available-height, 100vh);display:flex;flex-direction:column}.tooltip__content{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:1rem}.tooltip__arrow{fill:#201e2c}.tooltip__content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--primary{fill:#070514}.tooltip__content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--secondary{fill:#191825}.tooltip__content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--tertiary{fill:#201e2c}.tooltip__content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--success{fill:#0a1814}.tooltip__content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--warning{fill:#201813}.tooltip__content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--error{fill:#1c0516}.tooltip__content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--info{fill:#121e24}
|
|
@@ -1,107 +1,126 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { mergeComponentProps as
|
|
5
|
+
import { mergeComponentProps as s } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
|
-
import * as
|
|
7
|
+
import * as x from "@radix-ui/react-context-menu";
|
|
8
8
|
import '../../assets/components/context-menu/ContextMenu.style.css';/* empty css */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
t[0] !== n ? (o = i("context-menu", n), t[0] = n, t[1] = o) : o = t[1];
|
|
13
|
-
const c = o;
|
|
9
|
+
import { AutoScrollArea as M } from "../scroll-area/ScrollArea.js";
|
|
10
|
+
const A = (l) => {
|
|
11
|
+
const t = i.c(4);
|
|
14
12
|
let e;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
13
|
+
t[0] !== l ? (e = s("context-menu", l), t[0] = l, t[1] = e) : e = t[1];
|
|
14
|
+
const o = e;
|
|
15
|
+
let n;
|
|
16
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenu, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
17
|
+
}, w = (l) => {
|
|
18
|
+
const t = i.c(4);
|
|
21
19
|
let e;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
20
|
+
t[0] !== l ? (e = s("context-menu__trigger", l), t[0] = l, t[1] = e) : e = t[1];
|
|
21
|
+
const o = e;
|
|
22
|
+
let n;
|
|
23
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuTrigger, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
24
|
+
}, P = (l) => {
|
|
25
|
+
const t = i.c(4);
|
|
28
26
|
let e;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
t[0] !== l ? (e = s("context-menu__portal", l), t[0] = l, t[1] = e) : e = t[1];
|
|
28
|
+
const o = e;
|
|
29
|
+
let n;
|
|
30
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuPortal, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
31
|
+
}, y = (l) => {
|
|
32
|
+
const t = i.c(12);
|
|
33
|
+
let e, o, n, u;
|
|
34
|
+
if (t[0] !== l) {
|
|
35
|
+
const {
|
|
36
|
+
children: C,
|
|
37
|
+
..._
|
|
38
|
+
} = l;
|
|
39
|
+
o = C, e = x.ContextMenuContent, u = l.align, n = s(`context-menu__content context-menu__content--${l.color ?? "primary"}`, _), t[0] = l, t[1] = e, t[2] = o, t[3] = n, t[4] = u;
|
|
40
|
+
} else
|
|
41
|
+
e = t[1], o = t[2], n = t[3], u = t[4];
|
|
42
|
+
const f = n;
|
|
43
|
+
let r;
|
|
44
|
+
t[5] !== o ? (r = /* @__PURE__ */ c(M, { children: o }), t[5] = o, t[6] = r) : r = t[6];
|
|
45
|
+
let m;
|
|
46
|
+
return t[7] !== e || t[8] !== u || t[9] !== f || t[10] !== r ? (m = /* @__PURE__ */ c(e, { align: u, ...f, children: r }), t[7] = e, t[8] = u, t[9] = f, t[10] = r, t[11] = m) : m = t[11], m;
|
|
47
|
+
}, G = (l) => {
|
|
48
|
+
const t = i.c(4);
|
|
32
49
|
let e;
|
|
33
|
-
t[0] !==
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
return t[
|
|
37
|
-
},
|
|
38
|
-
const t =
|
|
39
|
-
let o;
|
|
40
|
-
t[0] !== n ? (o = i("context-menu__label", n), t[0] = n, t[1] = o) : o = t[1];
|
|
41
|
-
const c = o;
|
|
50
|
+
t[0] !== l ? (e = s("context-menu__label", l), t[0] = l, t[1] = e) : e = t[1];
|
|
51
|
+
const o = e;
|
|
52
|
+
let n;
|
|
53
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuLabel, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
54
|
+
}, I = (l) => {
|
|
55
|
+
const t = i.c(4);
|
|
42
56
|
let e;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
57
|
+
t[0] !== l ? (e = s("context-menu__item", l), t[0] = l, t[1] = e) : e = t[1];
|
|
58
|
+
const o = e;
|
|
59
|
+
let n;
|
|
60
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuItem, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
61
|
+
}, L = (l) => {
|
|
62
|
+
const t = i.c(4);
|
|
49
63
|
let e;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const
|
|
64
|
+
t[0] !== l ? (e = s("context-menu__group", l), t[0] = l, t[1] = e) : e = t[1];
|
|
65
|
+
const o = e;
|
|
66
|
+
let n;
|
|
67
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuGroup, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
68
|
+
}, R = (l) => {
|
|
69
|
+
const t = i.c(4);
|
|
56
70
|
let e;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
71
|
+
t[0] !== l ? (e = s("context-menu__sub", l), t[0] = l, t[1] = e) : e = t[1];
|
|
72
|
+
const o = e;
|
|
73
|
+
let n;
|
|
74
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuSub, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
75
|
+
}, j = (l) => {
|
|
76
|
+
const t = i.c(4);
|
|
63
77
|
let e;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const
|
|
78
|
+
t[0] !== l ? (e = s("context-menu__sub-trigger", l), t[0] = l, t[1] = e) : e = t[1];
|
|
79
|
+
const o = e;
|
|
80
|
+
let n;
|
|
81
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuSubTrigger, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
82
|
+
}, E = (l) => {
|
|
83
|
+
const t = i.c(12);
|
|
84
|
+
let e, o, n, u;
|
|
85
|
+
if (t[0] !== l) {
|
|
86
|
+
const {
|
|
87
|
+
children: C,
|
|
88
|
+
..._
|
|
89
|
+
} = l;
|
|
90
|
+
o = C, e = x.ContextMenuSubContent, u = l.align, n = s(`context-menu__sub-content context-menu__sub-content--${l.color ?? "primary"}`, _), t[0] = l, t[1] = e, t[2] = o, t[3] = n, t[4] = u;
|
|
91
|
+
} else
|
|
92
|
+
e = t[1], o = t[2], n = t[3], u = t[4];
|
|
93
|
+
const f = n;
|
|
94
|
+
let r;
|
|
95
|
+
t[5] !== o ? (r = /* @__PURE__ */ c(M, { children: o }), t[5] = o, t[6] = r) : r = t[6];
|
|
96
|
+
let m;
|
|
97
|
+
return t[7] !== e || t[8] !== u || t[9] !== f || t[10] !== r ? (m = /* @__PURE__ */ c(e, { align: u, ...f, children: r }), t[7] = e, t[8] = u, t[9] = f, t[10] = r, t[11] = m) : m = t[11], m;
|
|
98
|
+
}, k = (l) => {
|
|
99
|
+
const t = i.c(4);
|
|
70
100
|
let e;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
101
|
+
t[0] !== l ? (e = s("context-menu__separator", l), t[0] = l, t[1] = e) : e = t[1];
|
|
102
|
+
const o = e;
|
|
103
|
+
let n;
|
|
104
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuSeparator, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
105
|
+
}, q = (l) => {
|
|
106
|
+
const t = i.c(4);
|
|
74
107
|
let e;
|
|
75
|
-
t[0] !==
|
|
76
|
-
const
|
|
77
|
-
let
|
|
78
|
-
return t[
|
|
79
|
-
}, L = (n) => {
|
|
80
|
-
const t = u.c(4);
|
|
81
|
-
let o;
|
|
82
|
-
t[0] !== n ? (o = i("context-menu__separator", n), t[0] = n, t[1] = o) : o = t[1];
|
|
83
|
-
const c = o;
|
|
84
|
-
let e;
|
|
85
|
-
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuSeparator, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
86
|
-
}, R = (n) => {
|
|
87
|
-
const t = u.c(4);
|
|
88
|
-
let o;
|
|
89
|
-
t[0] !== n ? (o = i("context-menu__arrow", n), t[0] = n, t[1] = o) : o = t[1];
|
|
90
|
-
const c = o;
|
|
91
|
-
let e;
|
|
92
|
-
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuArrow, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
108
|
+
t[0] !== l ? (e = s("context-menu__arrow", l), t[0] = l, t[1] = e) : e = t[1];
|
|
109
|
+
const o = e;
|
|
110
|
+
let n;
|
|
111
|
+
return t[2] !== o ? (n = /* @__PURE__ */ c(x.ContextMenuArrow, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
93
112
|
};
|
|
94
113
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
A as ContextMenu,
|
|
115
|
+
q as ContextMenuArrow,
|
|
116
|
+
y as ContextMenuContent,
|
|
117
|
+
L as ContextMenuGroup,
|
|
118
|
+
I as ContextMenuItem,
|
|
119
|
+
G as ContextMenuLabel,
|
|
120
|
+
P as ContextMenuPortal,
|
|
121
|
+
k as ContextMenuSeparator,
|
|
122
|
+
R as ContextMenuSub,
|
|
123
|
+
E as ContextMenuSubContent,
|
|
124
|
+
j as ContextMenuSubTrigger,
|
|
125
|
+
w as ContextMenuTrigger
|
|
107
126
|
};
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ValidationProps } from './useForm';
|
|
3
3
|
import { InputWrapperProps } from './InputWrapper';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { InputSuggestion } from './InputSuggestion';
|
|
5
|
+
export interface EditorTokenRule {
|
|
6
|
+
pattern: RegExp;
|
|
7
|
+
/**
|
|
8
|
+
* Wrap a matched token. `children` is Slate's leaf content — include it
|
|
9
|
+
* somewhere so cursor positioning stays accurate.
|
|
10
|
+
*/
|
|
11
|
+
wrap?: (matchedText: string, children: React.ReactNode, match: RegExpExecArray) => React.ReactNode;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface EditorInputProps extends Omit<InputWrapperProps, "onChange">, ValidationProps<any> {
|
|
16
|
+
tokenRules?: EditorTokenRule[];
|
|
17
|
+
suggestions?: InputSuggestion[];
|
|
18
|
+
suggestionsEmptyState?: React.ReactNode;
|
|
19
|
+
onSuggestionSelect?: (suggestion: InputSuggestion) => void;
|
|
11
20
|
disabled?: boolean;
|
|
12
21
|
readonly?: boolean;
|
|
13
|
-
|
|
22
|
+
/** Render as a single-line input: Enter is blocked, newlines in pasted or external values become spaces. */
|
|
23
|
+
singleLine?: boolean;
|
|
14
24
|
onChange?: (value: string) => void;
|
|
25
|
+
placeholder?: string;
|
|
15
26
|
}
|
|
16
27
|
export declare const EditorInput: React.FC<EditorInputProps>;
|
|
@@ -1,78 +1,170 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as i, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import R, { useMemo as O, useRef as w, useCallback as f, useState as le } from "react";
|
|
3
|
+
import { createEditor as se, Editor as k, Transforms as D, Text as ae, Node as ce } from "slate";
|
|
4
|
+
import { withReact as ue, ReactEditor as pe, Editable as fe, Slate as de } from "slate-react";
|
|
5
|
+
import { withHistory as ge } from "slate-history";
|
|
6
|
+
import { InputWrapper as he } from "./InputWrapper.js";
|
|
7
7
|
import "../../utils/contextStore.js";
|
|
8
|
-
import { mergeComponentProps as
|
|
9
|
-
import
|
|
8
|
+
import { mergeComponentProps as me } from "../../utils/component.js";
|
|
9
|
+
import "js-md5";
|
|
10
|
+
import { Menu as xe, MenuTrigger as ye, MenuPortal as we } from "../menu/Menu.js";
|
|
11
|
+
import { InputSuggestionMenuContent as Te, InputSuggestionMenuContentItems as ve } from "./InputSuggestion.js";
|
|
10
12
|
import '../../assets/components/form/EditorInput.style.css';/* empty css */
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
foreground: "rgba(255,255,255, 0.75)",
|
|
20
|
-
caret: "gray",
|
|
21
|
-
selection: "rgba(112,179,255,0.25)",
|
|
22
|
-
selectionMatch: "rgba(112,179,255,0.1)",
|
|
23
|
-
fontSize: "0.8rem",
|
|
24
|
-
fontFamily: '"Inter", sans-serif',
|
|
25
|
-
letterSpacing: "-0.5px",
|
|
26
|
-
fontWeight: "400",
|
|
27
|
-
gutterBackground: "transparent",
|
|
28
|
-
gutterForeground: "rgba(255,255,255, 0.5)",
|
|
29
|
-
gutterBorder: "transparent",
|
|
30
|
-
gutterActiveForeground: "rgba(255,255,255, 1)",
|
|
31
|
-
lineHighlight: "rgba(255,255,255, 0.1)"
|
|
32
|
-
}, h = [{
|
|
33
|
-
tag: t.squareBracket,
|
|
34
|
-
color: r("squareBracket")
|
|
35
|
-
}, {
|
|
36
|
-
tag: t.bracket,
|
|
37
|
-
color: r("bracket")
|
|
38
|
-
}, {
|
|
39
|
-
tag: t.string,
|
|
40
|
-
color: r("Text")
|
|
41
|
-
}, {
|
|
42
|
-
tag: t.bool,
|
|
43
|
-
color: r("Boolean")
|
|
44
|
-
}, {
|
|
45
|
-
tag: t.number,
|
|
46
|
-
color: r("Number")
|
|
47
|
-
}], F = p({
|
|
48
|
-
theme: "light",
|
|
49
|
-
settings: u,
|
|
50
|
-
styles: h
|
|
51
|
-
}), Y = e.memo((f) => {
|
|
13
|
+
const B = (g) => (g || "").split(`
|
|
14
|
+
`).map((h) => ({
|
|
15
|
+
type: "paragraph",
|
|
16
|
+
children: [{
|
|
17
|
+
text: h
|
|
18
|
+
}]
|
|
19
|
+
})), F = (g) => g.map((h) => ce.string(h)).join(`
|
|
20
|
+
`), Oe = R.memo((g) => {
|
|
52
21
|
const {
|
|
53
|
-
title:
|
|
54
|
-
right:
|
|
55
|
-
left:
|
|
56
|
-
rightType:
|
|
57
|
-
leftType:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
22
|
+
title: h,
|
|
23
|
+
right: j,
|
|
24
|
+
left: A,
|
|
25
|
+
rightType: H,
|
|
26
|
+
leftType: K,
|
|
27
|
+
description: $,
|
|
28
|
+
wrapperComponent: v,
|
|
29
|
+
tokenRules: m = [],
|
|
30
|
+
suggestions: s,
|
|
31
|
+
suggestionsEmptyState: L,
|
|
32
|
+
onSuggestionSelect: q,
|
|
33
|
+
formValidation: E,
|
|
34
|
+
onChange: I,
|
|
35
|
+
disabled: z = !1,
|
|
36
|
+
readonly: U = !1,
|
|
37
|
+
singleLine: x = !1,
|
|
38
|
+
placeholder: W,
|
|
39
|
+
value: G,
|
|
40
|
+
initialValue: J,
|
|
41
|
+
defaultValue: Q,
|
|
42
|
+
required: Ce,
|
|
43
|
+
...X
|
|
44
|
+
} = g, S = String(G ?? J ?? Q ?? ""), c = x ? S.replace(/\n/g, " ") : S, r = O(() => ge(ue(se())), []), Y = O(() => B(c), []), T = w(c);
|
|
45
|
+
R.useEffect(() => {
|
|
46
|
+
if (c === T.current || (T.current = c, F(r.children) === c)) return;
|
|
47
|
+
const e = B(c);
|
|
48
|
+
k.withoutNormalizing(r, () => {
|
|
49
|
+
for (D.delete(r, {
|
|
50
|
+
at: {
|
|
51
|
+
anchor: k.start(r, []),
|
|
52
|
+
focus: k.end(r, [])
|
|
53
|
+
}
|
|
54
|
+
}), D.insertNodes(r, e, {
|
|
55
|
+
at: [0]
|
|
56
|
+
}); r.children.length > e.length; ) D.removeNodes(r, {
|
|
57
|
+
at: [r.children.length - 1]
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}, [c, r]);
|
|
61
|
+
const Z = f(([e, t]) => {
|
|
62
|
+
const l = [];
|
|
63
|
+
if (!ae.isText(e) || !m.length) return l;
|
|
64
|
+
const {
|
|
65
|
+
text: n
|
|
66
|
+
} = e;
|
|
67
|
+
return m.forEach((o, oe) => {
|
|
68
|
+
const ie = new RegExp(o.pattern.source, o.pattern.flags.includes("g") ? o.pattern.flags : o.pattern.flags + "g");
|
|
69
|
+
let p;
|
|
70
|
+
for (; (p = ie.exec(n)) !== null && p[0].length; )
|
|
71
|
+
l.push({
|
|
72
|
+
anchor: {
|
|
73
|
+
path: t,
|
|
74
|
+
offset: p.index
|
|
75
|
+
},
|
|
76
|
+
focus: {
|
|
77
|
+
path: t,
|
|
78
|
+
offset: p.index + p[0].length
|
|
79
|
+
},
|
|
80
|
+
tokenRuleIndex: oe,
|
|
81
|
+
tokenText: p[0],
|
|
82
|
+
tokenMatch: p
|
|
83
|
+
});
|
|
84
|
+
}), l;
|
|
85
|
+
}, [m]), ee = f(({
|
|
86
|
+
attributes: e,
|
|
87
|
+
children: t,
|
|
88
|
+
leaf: l
|
|
89
|
+
}) => {
|
|
90
|
+
const n = l;
|
|
91
|
+
if (n.tokenRuleIndex !== void 0) {
|
|
92
|
+
const o = m[n.tokenRuleIndex];
|
|
93
|
+
if (o)
|
|
94
|
+
return o.wrap ? /* @__PURE__ */ i("span", { ...e, children: o.wrap(n.tokenText ?? "", t, n.tokenMatch ?? []) }) : /* @__PURE__ */ i("span", { ...e, children: /* @__PURE__ */ i("span", { style: o.style, className: o.className, children: t }) });
|
|
95
|
+
}
|
|
96
|
+
return /* @__PURE__ */ i("span", { ...e, children: t });
|
|
97
|
+
}, [m]), [a, d] = le(!1), M = w(null), C = w(null), _ = w(null), u = w(void 0), y = f(() => {
|
|
98
|
+
const e = _.current, t = C.current, l = t?.parentElement;
|
|
99
|
+
if (!e || !t || !l) return;
|
|
100
|
+
let n = null;
|
|
101
|
+
try {
|
|
102
|
+
r.selection && (n = pe.toDOMRange(r, r.selection).getBoundingClientRect());
|
|
103
|
+
} catch {
|
|
104
|
+
n = null;
|
|
105
|
+
}
|
|
106
|
+
(!n || !n.width && !n.height && !n.left && !n.top) && (n = t.getBoundingClientRect());
|
|
107
|
+
const o = l.getBoundingClientRect();
|
|
108
|
+
e.style.left = `${n.left - o.left}px`, e.style.top = `${n.top - o.top}px`, e.style.width = "0px", e.style.height = `${n.height || parseFloat(getComputedStyle(t).lineHeight) || 16}px`;
|
|
109
|
+
}, [r]), N = E?.setValue, te = f((e) => {
|
|
110
|
+
a && y();
|
|
111
|
+
const t = F(e);
|
|
112
|
+
t !== T.current && (T.current = t, N?.(t), I?.(t));
|
|
113
|
+
}, [a, y, N, I]), b = f(() => {
|
|
114
|
+
u.current && clearTimeout(u.current), s && (y(), d(!0));
|
|
115
|
+
}, [s, y]);
|
|
116
|
+
R.useEffect(() => {
|
|
117
|
+
a && y();
|
|
118
|
+
}, [a]);
|
|
119
|
+
const ne = f(() => {
|
|
120
|
+
u.current && clearTimeout(u.current), u.current = setTimeout(() => d(!1), 150);
|
|
121
|
+
}, []), re = f((e) => {
|
|
122
|
+
if (x && e.key === "Enter" && e.preventDefault(), !s) return;
|
|
123
|
+
const t = M.current;
|
|
124
|
+
if (e.ctrlKey && e.code === "Space") {
|
|
125
|
+
e.preventDefault(), a ? t?.focusFirstItem() : b();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
!a || !t || (e.key === "ArrowDown" ? (e.preventDefault(), t.highlightNextItem()) : e.key === "ArrowUp" ? (e.preventDefault(), t.highlightPreviousItem()) : e.key === "Enter" ? t.selectActiveItem() && (e.preventDefault(), d(!1)) : e.key === "Escape" && (e.preventDefault(), d(!1)));
|
|
129
|
+
}, [s, a, b, x]), V = /* @__PURE__ */ i("div", { ...me("editor-input", X), ref: C, children: /* @__PURE__ */ i(
|
|
130
|
+
fe,
|
|
131
|
+
{
|
|
132
|
+
className: x ? "input-wrapper__control input-wrapper__control--single-line" : "input-wrapper__control",
|
|
133
|
+
decorate: Z,
|
|
134
|
+
renderLeaf: ee,
|
|
135
|
+
readOnly: z || U,
|
|
136
|
+
spellCheck: !1,
|
|
137
|
+
placeholder: W,
|
|
138
|
+
onBlur: ne,
|
|
139
|
+
onFocus: () => {
|
|
140
|
+
u.current && clearTimeout(u.current);
|
|
141
|
+
},
|
|
142
|
+
onKeyDown: re,
|
|
143
|
+
onPaste: x ? (e) => {
|
|
144
|
+
e.preventDefault(), r.insertText(e.clipboardData.getData("text/plain").replace(/\r?\n/g, " "));
|
|
145
|
+
} : void 0
|
|
146
|
+
}
|
|
147
|
+
) });
|
|
148
|
+
return /* @__PURE__ */ i(de, { editor: r, initialValue: Y, onChange: te, children: /* @__PURE__ */ i(he, { title: h, description: $, right: j, left: A, rightType: H, leftType: K, formValidation: E, wrapperComponent: s ? {
|
|
149
|
+
...v ?? {},
|
|
150
|
+
style: {
|
|
151
|
+
position: "relative",
|
|
152
|
+
...v?.style
|
|
153
|
+
}
|
|
154
|
+
} : v, children: s ? /* @__PURE__ */ P(xe, { open: a, modal: !1, onOpenChange: (e) => !e && d(!1), children: [
|
|
155
|
+
V,
|
|
156
|
+
/* @__PURE__ */ i(ye, { asChild: !0, children: /* @__PURE__ */ i("button", { ref: _, type: "button", tabIndex: -1, "aria-hidden": !0, onMouseDown: (e) => e.preventDefault(), className: "editor-input__menu-anchor" }) }),
|
|
157
|
+
/* @__PURE__ */ i(we, { children: /* @__PURE__ */ P(Te, { color: "primary", onInteractOutside: (e) => {
|
|
158
|
+
const t = e.target;
|
|
159
|
+
t && C.current?.contains(t) && e.preventDefault();
|
|
160
|
+
}, children: [
|
|
161
|
+
s.length === 0 && L,
|
|
162
|
+
/* @__PURE__ */ i(ve, { ref: M, suggestions: s, onSuggestionSelect: (e) => {
|
|
163
|
+
q?.(e), d(!1);
|
|
164
|
+
} })
|
|
165
|
+
] }) })
|
|
166
|
+
] }) : V }) });
|
|
74
167
|
});
|
|
75
|
-
Y.displayName = "EditorInput";
|
|
76
168
|
export {
|
|
77
|
-
|
|
169
|
+
Oe as EditorInput
|
|
78
170
|
};
|
|
@@ -24,4 +24,4 @@ export interface InputSuggestionMenuContentItemsHandle {
|
|
|
24
24
|
clearActiveItem: () => void;
|
|
25
25
|
}
|
|
26
26
|
export declare const InputSuggestionMenuContent: React.NamedExoticComponent<InputSuggestionMenuContentProps>;
|
|
27
|
-
export declare const InputSuggestionMenuContentItems: React.NamedExoticComponent<InputSuggestionMenuContentItemsProps
|
|
27
|
+
export declare const InputSuggestionMenuContentItems: React.NamedExoticComponent<InputSuggestionMenuContentItemsProps & React.RefAttributes<InputSuggestionMenuContentItemsHandle>>;
|