react-semaphor 0.0.43 → 0.0.45
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/react-semaphor.js +182 -174
- package/dist/react-semaphor.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/react-semaphor.js
CHANGED
|
@@ -39212,7 +39212,7 @@ function Nre() {
|
|
|
39212
39212
|
/* @__PURE__ */ w.jsx("div", { children: e }),
|
|
39213
39213
|
/* @__PURE__ */ w.jsxs("div", { className: "flex gap-2", children: [
|
|
39214
39214
|
r && !i && /* @__PURE__ */ w.jsx(Are, {}),
|
|
39215
|
-
/* @__PURE__ */ w.jsx(Ire, {}),
|
|
39215
|
+
!i && /* @__PURE__ */ w.jsx(Ire, {}),
|
|
39216
39216
|
r && !i && /* @__PURE__ */ w.jsxs(
|
|
39217
39217
|
ut,
|
|
39218
39218
|
{
|
|
@@ -49603,190 +49603,198 @@ function Gue() {
|
|
|
49603
49603
|
}
|
|
49604
49604
|
return (
|
|
49605
49605
|
// This is a tricky css, the pt-8 is to make sure the editor doesn't slide under the header
|
|
49606
|
-
/* @__PURE__ */ w.jsxs(
|
|
49607
|
-
|
|
49608
|
-
|
|
49609
|
-
|
|
49610
|
-
|
|
49611
|
-
|
|
49612
|
-
|
|
49613
|
-
my,
|
|
49614
|
-
{
|
|
49615
|
-
theme: "default",
|
|
49616
|
-
onChange: (H) => {
|
|
49617
|
-
_(H), console.log(H);
|
|
49618
|
-
},
|
|
49619
|
-
value: S,
|
|
49620
|
-
options: {
|
|
49621
|
-
minimap: {
|
|
49622
|
-
enabled: !1
|
|
49623
|
-
},
|
|
49624
|
-
wordWrap: "on",
|
|
49625
|
-
scrollbar: {
|
|
49626
|
-
verticalScrollbarSize: 0,
|
|
49627
|
-
horizontalScrollbarSize: 0
|
|
49628
|
-
},
|
|
49629
|
-
fontSize: 14,
|
|
49630
|
-
renderLineHighlight: "none"
|
|
49631
|
-
},
|
|
49632
|
-
defaultLanguage: "sql",
|
|
49633
|
-
defaultValue: "SELECT * FROM table",
|
|
49634
|
-
beforeMount: ee,
|
|
49635
|
-
onMount: ge
|
|
49636
|
-
}
|
|
49637
|
-
)
|
|
49638
|
-
}
|
|
49639
|
-
),
|
|
49640
|
-
r && /* @__PURE__ */ w.jsx("div", { className: " w-1/3 text-xs relative overflow-hidden xbg-yellow-100 p-1 ", children: /* @__PURE__ */ w.jsxs("div", { className: "min-h-0 ", children: [
|
|
49641
|
-
/* @__PURE__ */ w.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
49606
|
+
/* @__PURE__ */ w.jsxs(
|
|
49607
|
+
"section",
|
|
49608
|
+
{
|
|
49609
|
+
role: "editor-section",
|
|
49610
|
+
className: "grow flex flex-col justify-end pt-3 p-1 ",
|
|
49611
|
+
children: [
|
|
49612
|
+
/* @__PURE__ */ w.jsxs("div", { className: " grow flex relative overflow-y-scroll justify-between ", children: [
|
|
49642
49613
|
/* @__PURE__ */ w.jsx(
|
|
49643
|
-
|
|
49614
|
+
"div",
|
|
49644
49615
|
{
|
|
49645
|
-
|
|
49646
|
-
|
|
49647
|
-
|
|
49616
|
+
role: "editor-container",
|
|
49617
|
+
className: `flex ${r ? "w-2/3" : "w-[95%]"} xbg-red-100 p-1`,
|
|
49618
|
+
children: /* @__PURE__ */ w.jsx(
|
|
49619
|
+
my,
|
|
49620
|
+
{
|
|
49621
|
+
theme: "default",
|
|
49622
|
+
onChange: (H) => {
|
|
49623
|
+
_(H), console.log(H);
|
|
49624
|
+
},
|
|
49625
|
+
value: S,
|
|
49626
|
+
options: {
|
|
49627
|
+
minimap: {
|
|
49628
|
+
enabled: !1
|
|
49629
|
+
},
|
|
49630
|
+
wordWrap: "on",
|
|
49631
|
+
scrollbar: {
|
|
49632
|
+
verticalScrollbarSize: 0,
|
|
49633
|
+
horizontalScrollbarSize: 0
|
|
49634
|
+
},
|
|
49635
|
+
fontSize: 14,
|
|
49636
|
+
renderLineHighlight: "none"
|
|
49637
|
+
},
|
|
49638
|
+
defaultLanguage: "sql",
|
|
49639
|
+
defaultValue: "SELECT * FROM table",
|
|
49640
|
+
beforeMount: ee,
|
|
49641
|
+
onMount: ge
|
|
49642
|
+
}
|
|
49643
|
+
)
|
|
49648
49644
|
}
|
|
49649
49645
|
),
|
|
49650
|
-
/* @__PURE__ */ w.jsx(
|
|
49651
|
-
|
|
49652
|
-
|
|
49653
|
-
|
|
49654
|
-
|
|
49655
|
-
|
|
49656
|
-
|
|
49657
|
-
|
|
49658
|
-
try {
|
|
49659
|
-
JSON.parse(H), I(JSON.parse(H));
|
|
49660
|
-
} catch {
|
|
49646
|
+
r && /* @__PURE__ */ w.jsx("div", { className: " w-1/3 text-xs relative overflow-hidden xbg-yellow-100 p-1 ", children: /* @__PURE__ */ w.jsxs("div", { className: "min-h-0 ", children: [
|
|
49647
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
49648
|
+
/* @__PURE__ */ w.jsx(
|
|
49649
|
+
mse,
|
|
49650
|
+
{
|
|
49651
|
+
checked: O,
|
|
49652
|
+
onCheckedChange: () => z(!O),
|
|
49653
|
+
text: "Apply Filters"
|
|
49661
49654
|
}
|
|
49662
|
-
|
|
49663
|
-
|
|
49664
|
-
|
|
49665
|
-
|
|
49666
|
-
|
|
49667
|
-
|
|
49668
|
-
|
|
49669
|
-
|
|
49670
|
-
|
|
49671
|
-
|
|
49672
|
-
|
|
49673
|
-
|
|
49674
|
-
|
|
49675
|
-
|
|
49676
|
-
|
|
49677
|
-
|
|
49678
|
-
|
|
49679
|
-
|
|
49655
|
+
),
|
|
49656
|
+
/* @__PURE__ */ w.jsx(vse, {})
|
|
49657
|
+
] }),
|
|
49658
|
+
/* @__PURE__ */ w.jsx(
|
|
49659
|
+
my,
|
|
49660
|
+
{
|
|
49661
|
+
theme: "default",
|
|
49662
|
+
onChange: (H) => {
|
|
49663
|
+
if (H)
|
|
49664
|
+
try {
|
|
49665
|
+
JSON.parse(H), I(JSON.parse(H));
|
|
49666
|
+
} catch {
|
|
49667
|
+
}
|
|
49668
|
+
},
|
|
49669
|
+
defaultLanguage: "json",
|
|
49670
|
+
className: "min-h-[220px] mt-1",
|
|
49671
|
+
value: JSON.stringify(E, null, 2),
|
|
49672
|
+
options: {
|
|
49673
|
+
readOnly: !0,
|
|
49674
|
+
minimap: {
|
|
49675
|
+
enabled: !1
|
|
49676
|
+
},
|
|
49677
|
+
lineNumbers: "off",
|
|
49678
|
+
glyphMargin: !1,
|
|
49679
|
+
wordWrap: "on",
|
|
49680
|
+
scrollbar: {
|
|
49681
|
+
verticalScrollbarSize: 0,
|
|
49682
|
+
horizontalScrollbarSize: 0
|
|
49683
|
+
},
|
|
49684
|
+
fontSize: 12,
|
|
49685
|
+
renderLineHighlight: "none"
|
|
49686
|
+
}
|
|
49687
|
+
}
|
|
49688
|
+
)
|
|
49689
|
+
] }) }),
|
|
49690
|
+
E && r && /* @__PURE__ */ w.jsx(
|
|
49691
|
+
Wa,
|
|
49692
|
+
{
|
|
49693
|
+
onClick: () => i(!1),
|
|
49694
|
+
className: "absolute right-6 top-1 w-3 h-3 text-foreground/50 hover:text-foreground hover:cursor-pointer"
|
|
49680
49695
|
}
|
|
49681
|
-
|
|
49682
|
-
|
|
49683
|
-
|
|
49684
|
-
E && r && /* @__PURE__ */ w.jsx(
|
|
49685
|
-
Wa,
|
|
49686
|
-
{
|
|
49687
|
-
onClick: () => i(!1),
|
|
49688
|
-
className: "absolute right-6 top-1 w-3 h-3 text-foreground/50 hover:text-foreground hover:cursor-pointer"
|
|
49689
|
-
}
|
|
49690
|
-
),
|
|
49691
|
-
E && !r && /* @__PURE__ */ w.jsx(
|
|
49692
|
-
Dk,
|
|
49693
|
-
{
|
|
49694
|
-
onClick: () => i(!0),
|
|
49695
|
-
className: De(
|
|
49696
|
-
"absolute right-6 top-1 w-3 h-3 text-foreground/50 hover:text-foreground hover:cursor-pointer",
|
|
49696
|
+
),
|
|
49697
|
+
E && !r && /* @__PURE__ */ w.jsx(
|
|
49698
|
+
Dk,
|
|
49697
49699
|
{
|
|
49698
|
-
|
|
49700
|
+
onClick: () => i(!0),
|
|
49701
|
+
className: De(
|
|
49702
|
+
"absolute right-6 top-1 w-3 h-3 text-foreground/50 hover:text-foreground hover:cursor-pointer",
|
|
49703
|
+
{
|
|
49704
|
+
"text-red-800 font-bold": O
|
|
49705
|
+
}
|
|
49706
|
+
)
|
|
49699
49707
|
}
|
|
49700
49708
|
)
|
|
49701
|
-
}
|
|
49702
|
-
|
|
49703
|
-
|
|
49704
|
-
|
|
49705
|
-
|
|
49706
|
-
/* @__PURE__ */ w.jsxs(
|
|
49707
|
-
ut,
|
|
49708
|
-
{
|
|
49709
|
-
disabled: q || se,
|
|
49710
|
-
onClick: () => {
|
|
49711
|
-
ne();
|
|
49712
|
-
},
|
|
49713
|
-
className: " shrink-0",
|
|
49714
|
-
size: "sm",
|
|
49715
|
-
variant: "outline",
|
|
49716
|
-
children: [
|
|
49717
|
-
(q || se) && /* @__PURE__ */ w.jsx(zd, { className: "w-4 h-4 mr-2 animate-spin text-foreground/50" }),
|
|
49718
|
-
"Run"
|
|
49719
|
-
]
|
|
49720
|
-
}
|
|
49721
|
-
),
|
|
49722
|
-
W && // <div className="text-sm flex items-center ">{error.message}</div>
|
|
49723
|
-
/* @__PURE__ */ w.jsx(ase, { error: re.message }),
|
|
49724
|
-
/* @__PURE__ */ w.jsx(
|
|
49725
|
-
ut,
|
|
49726
|
-
{
|
|
49727
|
-
onClick: be,
|
|
49728
|
-
className: "",
|
|
49729
|
-
size: "sm",
|
|
49730
|
-
variant: "outline",
|
|
49731
|
-
children: "Clear"
|
|
49732
|
-
}
|
|
49733
|
-
),
|
|
49734
|
-
/* @__PURE__ */ w.jsx(
|
|
49735
|
-
Xd,
|
|
49736
|
-
{
|
|
49737
|
-
value: a,
|
|
49738
|
-
placeholder: "Type something...",
|
|
49739
|
-
onChange: (H) => {
|
|
49740
|
-
l(H.target.value);
|
|
49741
|
-
},
|
|
49742
|
-
onKeyDown: (H) => {
|
|
49743
|
-
H.key === "Enter" && (H.preventDefault(), console.log("enter pressed"), d(!0), s(!0));
|
|
49744
|
-
},
|
|
49745
|
-
className: " bg-muted border-none h-9 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
49746
|
-
}
|
|
49747
|
-
),
|
|
49748
|
-
/* @__PURE__ */ w.jsx(
|
|
49749
|
-
Uue,
|
|
49750
|
-
{
|
|
49751
|
-
open: o,
|
|
49752
|
-
setOpen: s,
|
|
49753
|
-
userInput: a,
|
|
49754
|
-
triggerAIRun: c,
|
|
49755
|
-
setTriggerAIRun: d,
|
|
49756
|
-
setUserInput: (H) => l(H)
|
|
49757
|
-
}
|
|
49758
|
-
)
|
|
49759
|
-
] }),
|
|
49760
|
-
/* @__PURE__ */ w.jsxs("div", { className: "flex gap-2 items-end ", children: [
|
|
49761
|
-
/* @__PURE__ */ w.jsx(
|
|
49762
|
-
ut,
|
|
49763
|
-
{
|
|
49764
|
-
onClick: fe,
|
|
49765
|
-
size: "sm",
|
|
49766
|
-
variant: "outline",
|
|
49767
|
-
children: /* @__PURE__ */ w.jsx(
|
|
49768
|
-
Rg,
|
|
49709
|
+
] }),
|
|
49710
|
+
/* @__PURE__ */ w.jsxs("div", { className: " flex grow px-6 pt-3 pb-4 gap-2 justify-between item-center", children: [
|
|
49711
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex grow gap-2 items-center", children: [
|
|
49712
|
+
/* @__PURE__ */ w.jsxs(
|
|
49713
|
+
ut,
|
|
49769
49714
|
{
|
|
49770
|
-
|
|
49771
|
-
|
|
49772
|
-
|
|
49715
|
+
disabled: q || se,
|
|
49716
|
+
onClick: () => {
|
|
49717
|
+
ne();
|
|
49718
|
+
},
|
|
49719
|
+
className: " shrink-0",
|
|
49720
|
+
size: "sm",
|
|
49721
|
+
variant: "outline",
|
|
49722
|
+
children: [
|
|
49723
|
+
(q || se) && /* @__PURE__ */ w.jsx(zd, { className: "w-4 h-4 mr-2 animate-spin text-foreground/50" }),
|
|
49724
|
+
"Run"
|
|
49725
|
+
]
|
|
49726
|
+
}
|
|
49727
|
+
),
|
|
49728
|
+
W && // <div className="text-sm flex items-center ">{error.message}</div>
|
|
49729
|
+
/* @__PURE__ */ w.jsx(ase, { error: re.message }),
|
|
49730
|
+
/* @__PURE__ */ w.jsx(
|
|
49731
|
+
ut,
|
|
49732
|
+
{
|
|
49733
|
+
onClick: be,
|
|
49734
|
+
className: "",
|
|
49735
|
+
size: "sm",
|
|
49736
|
+
variant: "outline",
|
|
49737
|
+
children: "Clear"
|
|
49738
|
+
}
|
|
49739
|
+
),
|
|
49740
|
+
/* @__PURE__ */ w.jsx(
|
|
49741
|
+
Xd,
|
|
49742
|
+
{
|
|
49743
|
+
value: a,
|
|
49744
|
+
placeholder: "Type something...",
|
|
49745
|
+
onChange: (H) => {
|
|
49746
|
+
l(H.target.value);
|
|
49747
|
+
},
|
|
49748
|
+
onKeyDown: (H) => {
|
|
49749
|
+
H.key === "Enter" && (H.preventDefault(), console.log("enter pressed"), d(!0), s(!0));
|
|
49750
|
+
},
|
|
49751
|
+
className: " bg-muted border-none h-9 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
49752
|
+
}
|
|
49753
|
+
),
|
|
49754
|
+
/* @__PURE__ */ w.jsx(
|
|
49755
|
+
Uue,
|
|
49756
|
+
{
|
|
49757
|
+
open: o,
|
|
49758
|
+
setOpen: s,
|
|
49759
|
+
userInput: a,
|
|
49760
|
+
triggerAIRun: c,
|
|
49761
|
+
setTriggerAIRun: d,
|
|
49762
|
+
setUserInput: (H) => l(H)
|
|
49773
49763
|
}
|
|
49774
49764
|
)
|
|
49775
|
-
}
|
|
49776
|
-
|
|
49777
|
-
|
|
49778
|
-
|
|
49779
|
-
|
|
49780
|
-
|
|
49781
|
-
|
|
49782
|
-
|
|
49783
|
-
|
|
49784
|
-
|
|
49785
|
-
|
|
49786
|
-
|
|
49787
|
-
|
|
49788
|
-
|
|
49789
|
-
|
|
49765
|
+
] }),
|
|
49766
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex gap-2 items-end ", children: [
|
|
49767
|
+
/* @__PURE__ */ w.jsx(
|
|
49768
|
+
ut,
|
|
49769
|
+
{
|
|
49770
|
+
onClick: fe,
|
|
49771
|
+
size: "sm",
|
|
49772
|
+
variant: "outline",
|
|
49773
|
+
children: /* @__PURE__ */ w.jsx(
|
|
49774
|
+
Rg,
|
|
49775
|
+
{
|
|
49776
|
+
size: 16,
|
|
49777
|
+
strokeWidth: 2,
|
|
49778
|
+
className: "text-green-600 font-bold"
|
|
49779
|
+
}
|
|
49780
|
+
)
|
|
49781
|
+
}
|
|
49782
|
+
),
|
|
49783
|
+
/* @__PURE__ */ w.jsx(
|
|
49784
|
+
ut,
|
|
49785
|
+
{
|
|
49786
|
+
onClick: ie,
|
|
49787
|
+
className: " w-full",
|
|
49788
|
+
size: "sm",
|
|
49789
|
+
variant: "outline",
|
|
49790
|
+
children: /* @__PURE__ */ w.jsx(Wa, { className: " h-3.5 w-3.5" })
|
|
49791
|
+
}
|
|
49792
|
+
)
|
|
49793
|
+
] })
|
|
49794
|
+
] })
|
|
49795
|
+
]
|
|
49796
|
+
}
|
|
49797
|
+
)
|
|
49790
49798
|
);
|
|
49791
49799
|
}
|
|
49792
49800
|
const NA = "Switch", [Yue, Bfe] = jn(NA), [Kue, Xue] = Yue(NA), Que = /* @__PURE__ */ pe((e, t) => {
|
|
@@ -51240,7 +51248,7 @@ function ufe() {
|
|
|
51240
51248
|
direction: "vertical",
|
|
51241
51249
|
className: "min-w-full max-w-lg min-h-[250px]",
|
|
51242
51250
|
children: [
|
|
51243
|
-
/* @__PURE__ */ w.jsx(Ah, { minSize: 40, defaultSize: 40, children: /* @__PURE__ */ w.jsx(Gue, {}) }),
|
|
51251
|
+
/* @__PURE__ */ w.jsx(Ah, { className: "flex", minSize: 40, defaultSize: 40, children: /* @__PURE__ */ w.jsx(Gue, {}) }),
|
|
51244
51252
|
/* @__PURE__ */ w.jsx(sP, { className: "border-[1.5px] border-muted" }),
|
|
51245
51253
|
/* @__PURE__ */ w.jsx(Ah, { minSize: 60, defaultSize: 60, children: e ? /* @__PURE__ */ w.jsxs(oP, { direction: "horizontal", children: [
|
|
51246
51254
|
/* @__PURE__ */ w.jsx(w.Fragment, { children: /* @__PURE__ */ w.jsx(
|