hazo_ui 2.4.1 → 2.4.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/dist/index.cjs +36 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4509,28 +4509,34 @@ var create_suggestion_config = (prefix_config, on_suggestion_change, on_insert_c
|
|
|
4509
4509
|
render: () => {
|
|
4510
4510
|
return {
|
|
4511
4511
|
onStart: (props) => {
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4512
|
+
queueMicrotask(() => {
|
|
4513
|
+
on_suggestion_change({
|
|
4514
|
+
is_active: true,
|
|
4515
|
+
query: props.query,
|
|
4516
|
+
prefix: prefix_config.char,
|
|
4517
|
+
client_rect: props.clientRect,
|
|
4518
|
+
commands: prefix_config.commands,
|
|
4519
|
+
range: props.range
|
|
4520
|
+
});
|
|
4519
4521
|
});
|
|
4520
4522
|
},
|
|
4521
4523
|
onUpdate: (props) => {
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4524
|
+
queueMicrotask(() => {
|
|
4525
|
+
on_suggestion_change({
|
|
4526
|
+
is_active: true,
|
|
4527
|
+
query: props.query,
|
|
4528
|
+
prefix: prefix_config.char,
|
|
4529
|
+
client_rect: props.clientRect,
|
|
4530
|
+
commands: prefix_config.commands,
|
|
4531
|
+
range: props.range
|
|
4532
|
+
});
|
|
4529
4533
|
});
|
|
4530
4534
|
},
|
|
4531
4535
|
onKeyDown: (props) => {
|
|
4532
4536
|
if (props.event.key === "Escape") {
|
|
4533
|
-
|
|
4537
|
+
queueMicrotask(() => {
|
|
4538
|
+
on_suggestion_change(null);
|
|
4539
|
+
});
|
|
4534
4540
|
return true;
|
|
4535
4541
|
}
|
|
4536
4542
|
if (props.event.key === "ArrowUp" || props.event.key === "ArrowDown" || props.event.key === "Enter") {
|
|
@@ -4539,7 +4545,9 @@ var create_suggestion_config = (prefix_config, on_suggestion_change, on_insert_c
|
|
|
4539
4545
|
return false;
|
|
4540
4546
|
},
|
|
4541
4547
|
onExit: () => {
|
|
4542
|
-
|
|
4548
|
+
queueMicrotask(() => {
|
|
4549
|
+
on_suggestion_change(null);
|
|
4550
|
+
});
|
|
4543
4551
|
}
|
|
4544
4552
|
};
|
|
4545
4553
|
},
|
|
@@ -4683,14 +4691,16 @@ var CommandPopover = ({
|
|
|
4683
4691
|
ref: container_ref,
|
|
4684
4692
|
className: cn(
|
|
4685
4693
|
"cls_command_popover",
|
|
4686
|
-
"fixed
|
|
4694
|
+
"fixed",
|
|
4687
4695
|
"w-64 min-w-[200px] max-w-[300px]",
|
|
4688
4696
|
"rounded-md border bg-popover text-popover-foreground shadow-lg",
|
|
4689
4697
|
"animate-in fade-in-0 zoom-in-95"
|
|
4690
4698
|
),
|
|
4691
4699
|
style: {
|
|
4700
|
+
position: "fixed",
|
|
4692
4701
|
top: position.top,
|
|
4693
|
-
left: position.left
|
|
4702
|
+
left: position.left,
|
|
4703
|
+
zIndex: 9999
|
|
4694
4704
|
},
|
|
4695
4705
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { className: "rounded-md", children: [
|
|
4696
4706
|
query && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: [
|
|
@@ -5301,14 +5311,16 @@ var HazoUiTextbox = ({
|
|
|
5301
5311
|
ref: edit_popover_ref,
|
|
5302
5312
|
className: cn(
|
|
5303
5313
|
"cls_edit_popover",
|
|
5304
|
-
"fixed
|
|
5314
|
+
"fixed",
|
|
5305
5315
|
"w-64 min-w-[200px] max-w-[300px]",
|
|
5306
5316
|
"rounded-md border bg-popover text-popover-foreground shadow-lg",
|
|
5307
5317
|
"animate-in fade-in-0 zoom-in-95"
|
|
5308
5318
|
),
|
|
5309
5319
|
style: {
|
|
5320
|
+
position: "fixed",
|
|
5310
5321
|
top: edit_context.rect.y,
|
|
5311
|
-
left: edit_context.rect.x
|
|
5322
|
+
left: edit_context.rect.x,
|
|
5323
|
+
zIndex: 9999
|
|
5312
5324
|
},
|
|
5313
5325
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-1", children: [
|
|
5314
5326
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: "Change command" }),
|
|
@@ -5843,14 +5855,16 @@ var HazoUiTextarea = ({
|
|
|
5843
5855
|
ref: edit_popover_ref,
|
|
5844
5856
|
className: cn(
|
|
5845
5857
|
"cls_edit_popover",
|
|
5846
|
-
"fixed
|
|
5858
|
+
"fixed",
|
|
5847
5859
|
"w-64 min-w-[200px] max-w-[300px]",
|
|
5848
5860
|
"rounded-md border bg-popover text-popover-foreground shadow-lg",
|
|
5849
5861
|
"animate-in fade-in-0 zoom-in-95"
|
|
5850
5862
|
),
|
|
5851
5863
|
style: {
|
|
5864
|
+
position: "fixed",
|
|
5852
5865
|
top: edit_context.rect.y,
|
|
5853
|
-
left: edit_context.rect.x
|
|
5866
|
+
left: edit_context.rect.x,
|
|
5867
|
+
zIndex: 9999
|
|
5854
5868
|
},
|
|
5855
5869
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-1", children: [
|
|
5856
5870
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: "Change command" }),
|