hazo_ui 2.4.2 → 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 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
- on_suggestion_change({
4513
- is_active: true,
4514
- query: props.query,
4515
- prefix: prefix_config.char,
4516
- client_rect: props.clientRect,
4517
- commands: prefix_config.commands,
4518
- range: props.range
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
- on_suggestion_change({
4523
- is_active: true,
4524
- query: props.query,
4525
- prefix: prefix_config.char,
4526
- client_rect: props.clientRect,
4527
- commands: prefix_config.commands,
4528
- range: props.range
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
- on_suggestion_change(null);
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
- on_suggestion_change(null);
4548
+ queueMicrotask(() => {
4549
+ on_suggestion_change(null);
4550
+ });
4543
4551
  }
4544
4552
  };
4545
4553
  },