@8wave/ai-elements 0.98.0-beta.3 → 0.98.0-beta.4

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-vue/index.js CHANGED
@@ -13879,23 +13879,24 @@ var Lv = { class: "pk-editor-markdown" }, Rv = {
13879
13879
  o.value = [e];
13880
13880
  return;
13881
13881
  }
13882
- o.value.push(e), i.force && (o.value = JSON.parse(JSON.stringify(o.value)));
13882
+ let t = i.force ? JSON.parse(JSON.stringify([...o.value, e])) : [...o.value, e];
13883
+ o.value = t;
13883
13884
  };
13884
13885
  K(o, (e) => {
13885
13886
  (e == null || e.length === 0) && !i.allowEmpty && s();
13886
13887
  }, { immediate: !0 });
13887
13888
  let { openDialogConfirm: c } = ge(), l = async (e) => {
13888
- i.confirm && !await c() || o.value.splice(e, 1);
13889
+ i.confirm && !await c() || (o.value = o.value.filter((t, n) => n !== e));
13889
13890
  }, u = async () => {
13890
13891
  i.confirm && !await c() || a("update:modelValue", []);
13891
13892
  }, d = (e) => {
13892
13893
  if (e === 0) return;
13893
- let t = o.value[e];
13894
- o.value.splice(e, 1), o.value.splice(e - 1, 0, t);
13894
+ let t = [...o.value], [n] = t.splice(e, 1);
13895
+ t.splice(e - 1, 0, n), o.value = t;
13895
13896
  }, f = (e) => {
13896
13897
  if (e === o.value.length - 1) return;
13897
- let t = o.value[e];
13898
- o.value.splice(e, 1), o.value.splice(e + 1, 0, t);
13898
+ let t = [...o.value], [n] = t.splice(e, 1);
13899
+ t.splice(e + 1, 0, n), o.value = t;
13899
13900
  };
13900
13901
  return t({
13901
13902
  addItem: s,