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.js
CHANGED
|
@@ -4450,28 +4450,34 @@ var create_suggestion_config = (prefix_config, on_suggestion_change, on_insert_c
|
|
|
4450
4450
|
render: () => {
|
|
4451
4451
|
return {
|
|
4452
4452
|
onStart: (props) => {
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4453
|
+
queueMicrotask(() => {
|
|
4454
|
+
on_suggestion_change({
|
|
4455
|
+
is_active: true,
|
|
4456
|
+
query: props.query,
|
|
4457
|
+
prefix: prefix_config.char,
|
|
4458
|
+
client_rect: props.clientRect,
|
|
4459
|
+
commands: prefix_config.commands,
|
|
4460
|
+
range: props.range
|
|
4461
|
+
});
|
|
4460
4462
|
});
|
|
4461
4463
|
},
|
|
4462
4464
|
onUpdate: (props) => {
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4465
|
+
queueMicrotask(() => {
|
|
4466
|
+
on_suggestion_change({
|
|
4467
|
+
is_active: true,
|
|
4468
|
+
query: props.query,
|
|
4469
|
+
prefix: prefix_config.char,
|
|
4470
|
+
client_rect: props.clientRect,
|
|
4471
|
+
commands: prefix_config.commands,
|
|
4472
|
+
range: props.range
|
|
4473
|
+
});
|
|
4470
4474
|
});
|
|
4471
4475
|
},
|
|
4472
4476
|
onKeyDown: (props) => {
|
|
4473
4477
|
if (props.event.key === "Escape") {
|
|
4474
|
-
|
|
4478
|
+
queueMicrotask(() => {
|
|
4479
|
+
on_suggestion_change(null);
|
|
4480
|
+
});
|
|
4475
4481
|
return true;
|
|
4476
4482
|
}
|
|
4477
4483
|
if (props.event.key === "ArrowUp" || props.event.key === "ArrowDown" || props.event.key === "Enter") {
|
|
@@ -4480,7 +4486,9 @@ var create_suggestion_config = (prefix_config, on_suggestion_change, on_insert_c
|
|
|
4480
4486
|
return false;
|
|
4481
4487
|
},
|
|
4482
4488
|
onExit: () => {
|
|
4483
|
-
|
|
4489
|
+
queueMicrotask(() => {
|
|
4490
|
+
on_suggestion_change(null);
|
|
4491
|
+
});
|
|
4484
4492
|
}
|
|
4485
4493
|
};
|
|
4486
4494
|
},
|
|
@@ -4624,14 +4632,16 @@ var CommandPopover = ({
|
|
|
4624
4632
|
ref: container_ref,
|
|
4625
4633
|
className: cn(
|
|
4626
4634
|
"cls_command_popover",
|
|
4627
|
-
"fixed
|
|
4635
|
+
"fixed",
|
|
4628
4636
|
"w-64 min-w-[200px] max-w-[300px]",
|
|
4629
4637
|
"rounded-md border bg-popover text-popover-foreground shadow-lg",
|
|
4630
4638
|
"animate-in fade-in-0 zoom-in-95"
|
|
4631
4639
|
),
|
|
4632
4640
|
style: {
|
|
4641
|
+
position: "fixed",
|
|
4633
4642
|
top: position.top,
|
|
4634
|
-
left: position.left
|
|
4643
|
+
left: position.left,
|
|
4644
|
+
zIndex: 9999
|
|
4635
4645
|
},
|
|
4636
4646
|
children: /* @__PURE__ */ jsxs(Command, { className: "rounded-md", children: [
|
|
4637
4647
|
query && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: [
|
|
@@ -5242,14 +5252,16 @@ var HazoUiTextbox = ({
|
|
|
5242
5252
|
ref: edit_popover_ref,
|
|
5243
5253
|
className: cn(
|
|
5244
5254
|
"cls_edit_popover",
|
|
5245
|
-
"fixed
|
|
5255
|
+
"fixed",
|
|
5246
5256
|
"w-64 min-w-[200px] max-w-[300px]",
|
|
5247
5257
|
"rounded-md border bg-popover text-popover-foreground shadow-lg",
|
|
5248
5258
|
"animate-in fade-in-0 zoom-in-95"
|
|
5249
5259
|
),
|
|
5250
5260
|
style: {
|
|
5261
|
+
position: "fixed",
|
|
5251
5262
|
top: edit_context.rect.y,
|
|
5252
|
-
left: edit_context.rect.x
|
|
5263
|
+
left: edit_context.rect.x,
|
|
5264
|
+
zIndex: 9999
|
|
5253
5265
|
},
|
|
5254
5266
|
children: /* @__PURE__ */ jsxs("div", { className: "py-1", children: [
|
|
5255
5267
|
/* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: "Change command" }),
|
|
@@ -5784,14 +5796,16 @@ var HazoUiTextarea = ({
|
|
|
5784
5796
|
ref: edit_popover_ref,
|
|
5785
5797
|
className: cn(
|
|
5786
5798
|
"cls_edit_popover",
|
|
5787
|
-
"fixed
|
|
5799
|
+
"fixed",
|
|
5788
5800
|
"w-64 min-w-[200px] max-w-[300px]",
|
|
5789
5801
|
"rounded-md border bg-popover text-popover-foreground shadow-lg",
|
|
5790
5802
|
"animate-in fade-in-0 zoom-in-95"
|
|
5791
5803
|
),
|
|
5792
5804
|
style: {
|
|
5805
|
+
position: "fixed",
|
|
5793
5806
|
top: edit_context.rect.y,
|
|
5794
|
-
left: edit_context.rect.x
|
|
5807
|
+
left: edit_context.rect.x,
|
|
5808
|
+
zIndex: 9999
|
|
5795
5809
|
},
|
|
5796
5810
|
children: /* @__PURE__ */ jsxs("div", { className: "py-1", children: [
|
|
5797
5811
|
/* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-xs text-muted-foreground border-b", children: "Change command" }),
|