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.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
- on_suggestion_change({
4454
- is_active: true,
4455
- query: props.query,
4456
- prefix: prefix_config.char,
4457
- client_rect: props.clientRect,
4458
- commands: prefix_config.commands,
4459
- range: props.range
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
- on_suggestion_change({
4464
- is_active: true,
4465
- query: props.query,
4466
- prefix: prefix_config.char,
4467
- client_rect: props.clientRect,
4468
- commands: prefix_config.commands,
4469
- range: props.range
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
- on_suggestion_change(null);
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
- on_suggestion_change(null);
4489
+ queueMicrotask(() => {
4490
+ on_suggestion_change(null);
4491
+ });
4484
4492
  }
4485
4493
  };
4486
4494
  },