@firecms/core 3.5.1 → 3.5.2-canary.16bf7bb

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.
Files changed (34) hide show
  1. package/dist/components/HomePage/HomePageDnD.d.ts +4 -2
  2. package/dist/{de-CBOjCvsy.js → de-CUF9f7S-.js} +2 -1
  3. package/dist/{de-CBOjCvsy.js.map → de-CUF9f7S-.js.map} +1 -1
  4. package/dist/{editor-BSo_aS1I.js → editor-WZytSO_1.js} +172 -137
  5. package/dist/editor-WZytSO_1.js.map +1 -0
  6. package/dist/{fr-DRfttcG0.js → fr-DmkMX6hp.js} +2 -1
  7. package/dist/{fr-DRfttcG0.js.map → fr-DmkMX6hp.js.map} +1 -1
  8. package/dist/{hi-DwieOZNf.js → hi-BKuaMr7w.js} +2 -1
  9. package/dist/{hi-DwieOZNf.js.map → hi-BKuaMr7w.js.map} +1 -1
  10. package/dist/index.es.js +70 -62
  11. package/dist/index.es.js.map +1 -1
  12. package/dist/index.umd.js +238 -189
  13. package/dist/index.umd.js.map +1 -1
  14. package/dist/{it-l2KXtx9n.js → it-BwQflFGz.js} +2 -1
  15. package/dist/{it-l2KXtx9n.js.map → it-BwQflFGz.js.map} +1 -1
  16. package/dist/{pl-DPZrdKhi.js → pl-BPsAvZvc.js} +2 -1
  17. package/dist/{pl-DPZrdKhi.js.map → pl-BPsAvZvc.js.map} +1 -1
  18. package/dist/{pt-BoHpabw1.js → pt-D5q7OQp1.js} +2 -1
  19. package/dist/{pt-BoHpabw1.js.map → pt-D5q7OQp1.js.map} +1 -1
  20. package/dist/types/translations.d.ts +1 -0
  21. package/package.json +3 -3
  22. package/src/components/HomePage/DefaultHomePage.tsx +2 -0
  23. package/src/components/HomePage/HomePageDnD.tsx +12 -4
  24. package/src/editor/selectors/link-selector.tsx +37 -12
  25. package/src/locales/de.ts +1 -0
  26. package/src/locales/en.ts +1 -0
  27. package/src/locales/es.ts +1 -0
  28. package/src/locales/fr.ts +1 -0
  29. package/src/locales/hi.ts +1 -0
  30. package/src/locales/it.ts +1 -0
  31. package/src/locales/pl.ts +1 -0
  32. package/src/locales/pt.ts +1 -0
  33. package/src/types/translations.ts +1 -0
  34. package/dist/editor-BSo_aS1I.js.map +0 -1
package/dist/index.umd.js CHANGED
@@ -22159,21 +22159,24 @@
22159
22159
  entries: g.entries.map(cloneSerializableNavigationEntry)
22160
22160
  }));
22161
22161
  function SortableNavigationCard(t0) {
22162
- const $ = reactCompilerRuntime.c(17);
22162
+ const $ = reactCompilerRuntime.c(18);
22163
22163
  const {
22164
22164
  entry,
22165
- onClick
22165
+ onClick,
22166
+ disabled
22166
22167
  } = t0;
22167
22168
  let t1;
22168
- if ($[0] !== entry.url) {
22169
+ if ($[0] !== disabled || $[1] !== entry.url) {
22169
22170
  t1 = {
22170
22171
  id: entry.url,
22171
- animateLayoutChanges
22172
+ animateLayoutChanges,
22173
+ disabled
22172
22174
  };
22173
- $[0] = entry.url;
22174
- $[1] = t1;
22175
+ $[0] = disabled;
22176
+ $[1] = entry.url;
22177
+ $[2] = t1;
22175
22178
  } else {
22176
- t1 = $[1];
22179
+ t1 = $[2];
22177
22180
  }
22178
22181
  const {
22179
22182
  setNodeRef,
@@ -22184,101 +22187,104 @@
22184
22187
  isDragging
22185
22188
  } = sortable.useSortable(t1);
22186
22189
  let t2;
22187
- if ($[2] !== transform) {
22190
+ if ($[3] !== transform) {
22188
22191
  t2 = transform ? utilities.CSS.Transform.toString(transform) : void 0;
22189
- $[2] = transform;
22190
- $[3] = t2;
22192
+ $[3] = transform;
22193
+ $[4] = t2;
22191
22194
  } else {
22192
- t2 = $[3];
22195
+ t2 = $[4];
22193
22196
  }
22194
22197
  const t3 = isDragging ? 0 : 1;
22195
22198
  let t4;
22196
- if ($[4] !== t2 || $[5] !== t3 || $[6] !== transition) {
22199
+ if ($[5] !== t2 || $[6] !== t3 || $[7] !== transition) {
22197
22200
  t4 = {
22198
22201
  transform: t2,
22199
22202
  transition,
22200
22203
  opacity: t3
22201
22204
  };
22202
- $[4] = t2;
22203
- $[5] = t3;
22204
- $[6] = transition;
22205
- $[7] = t4;
22205
+ $[5] = t2;
22206
+ $[6] = t3;
22207
+ $[7] = transition;
22208
+ $[8] = t4;
22206
22209
  } else {
22207
- t4 = $[7];
22210
+ t4 = $[8];
22208
22211
  }
22209
22212
  const style = t4;
22210
22213
  let t5;
22211
- if ($[8] !== entry || $[9] !== onClick) {
22214
+ if ($[9] !== entry || $[10] !== onClick) {
22212
22215
  t5 = /* @__PURE__ */ jsxRuntime.jsx(NavigationCardBinding, { ...entry, onClick });
22213
- $[8] = entry;
22214
- $[9] = onClick;
22215
- $[10] = t5;
22216
+ $[9] = entry;
22217
+ $[10] = onClick;
22218
+ $[11] = t5;
22216
22219
  } else {
22217
- t5 = $[10];
22220
+ t5 = $[11];
22218
22221
  }
22219
22222
  let t6;
22220
- if ($[11] !== attributes || $[12] !== listeners2 || $[13] !== setNodeRef || $[14] !== style || $[15] !== t5) {
22223
+ if ($[12] !== attributes || $[13] !== listeners2 || $[14] !== setNodeRef || $[15] !== style || $[16] !== t5) {
22221
22224
  t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: setNodeRef, style, ...attributes, ...listeners2, children: t5 });
22222
- $[11] = attributes;
22223
- $[12] = listeners2;
22224
- $[13] = setNodeRef;
22225
- $[14] = style;
22226
- $[15] = t5;
22227
- $[16] = t6;
22225
+ $[12] = attributes;
22226
+ $[13] = listeners2;
22227
+ $[14] = setNodeRef;
22228
+ $[15] = style;
22229
+ $[16] = t5;
22230
+ $[17] = t6;
22228
22231
  } else {
22229
- t6 = $[16];
22232
+ t6 = $[17];
22230
22233
  }
22231
22234
  return t6;
22232
22235
  }
22233
22236
  function NavigationGroupDroppable(t0) {
22234
- const $ = reactCompilerRuntime.c(11);
22237
+ const $ = reactCompilerRuntime.c(12);
22235
22238
  const {
22236
22239
  id,
22237
22240
  itemIds,
22238
22241
  children,
22239
- isPotentialCardDropTarget: t1
22242
+ isPotentialCardDropTarget: t1,
22243
+ disabled
22240
22244
  } = t0;
22241
22245
  const isPotentialCardDropTarget = t1 === void 0 ? false : t1;
22242
22246
  let t2;
22243
- if ($[0] !== id) {
22247
+ if ($[0] !== disabled || $[1] !== id) {
22244
22248
  t2 = {
22245
- id
22249
+ id,
22250
+ disabled
22246
22251
  };
22247
- $[0] = id;
22248
- $[1] = t2;
22252
+ $[0] = disabled;
22253
+ $[1] = id;
22254
+ $[2] = t2;
22249
22255
  } else {
22250
- t2 = $[1];
22256
+ t2 = $[2];
22251
22257
  }
22252
22258
  const {
22253
22259
  setNodeRef
22254
22260
  } = core.useDroppable(t2);
22255
22261
  const t3 = isPotentialCardDropTarget ? "p-2 bg-surface-accent-200 dark:bg-surface-accent-800 rounded-lg" : void 0;
22256
22262
  let t4;
22257
- if ($[2] !== t3) {
22263
+ if ($[3] !== t3) {
22258
22264
  t4 = ui.cls(t3, "transition-all duration-200 ease-in-out");
22259
- $[2] = t3;
22260
- $[3] = t4;
22265
+ $[3] = t3;
22266
+ $[4] = t4;
22261
22267
  } else {
22262
- t4 = $[3];
22268
+ t4 = $[4];
22263
22269
  }
22264
22270
  let t5;
22265
- if ($[4] !== children || $[5] !== itemIds) {
22271
+ if ($[5] !== children || $[6] !== itemIds) {
22266
22272
  t5 = /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: itemIds, strategy: sortable.rectSortingStrategy, children });
22267
- $[4] = children;
22268
- $[5] = itemIds;
22269
- $[6] = t5;
22273
+ $[5] = children;
22274
+ $[6] = itemIds;
22275
+ $[7] = t5;
22270
22276
  } else {
22271
- t5 = $[6];
22277
+ t5 = $[7];
22272
22278
  }
22273
22279
  let t6;
22274
- if ($[7] !== setNodeRef || $[8] !== t4 || $[9] !== t5) {
22280
+ if ($[8] !== setNodeRef || $[9] !== t4 || $[10] !== t5) {
22275
22281
  t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: setNodeRef, className: t4, children: t5 });
22276
- $[7] = setNodeRef;
22277
- $[8] = t4;
22278
- $[9] = t5;
22279
- $[10] = t6;
22282
+ $[8] = setNodeRef;
22283
+ $[9] = t4;
22284
+ $[10] = t5;
22285
+ $[11] = t6;
22280
22286
  } else {
22281
- t6 = $[10];
22287
+ t6 = $[11];
22282
22288
  }
22283
22289
  return t6;
22284
22290
  }
@@ -23263,8 +23269,8 @@
23263
23269
  return /* @__PURE__ */ jsxRuntime.jsx(SortableNavigationGroup, { groupName: groupKey, disabled: dndDisabled, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationGroup, { group: groupKey === DEFAULT_GROUP_KEY ? void 0 : groupKey, minimised: draggingGroupId === groupKey && !isDraggingCardOnly, isPotentialCardDropTarget: isDraggingCardOnly, dndDisabled, onEditGroup: () => {
23264
23270
  if (dndDisabled) return;
23265
23271
  setDialogOpenForGroup(groupKey);
23266
- }, collapsed: isGroupCollapsed(groupKey), onToggleCollapsed: () => toggleGroupCollapsed(groupKey), children: /* @__PURE__ */ jsxRuntime.jsx(NavigationGroupDroppable, { id: groupKey, itemIds: entriesInGroup.map((e_4) => e_4.url), isPotentialCardDropTarget: isDraggingCardOnly, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: [
23267
- entriesInGroup.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(SortableNavigationCard, { entry, onClick: () => {
23272
+ }, collapsed: isGroupCollapsed(groupKey), onToggleCollapsed: () => toggleGroupCollapsed(groupKey), children: /* @__PURE__ */ jsxRuntime.jsx(NavigationGroupDroppable, { id: groupKey, itemIds: entriesInGroup.map((e_4) => e_4.url), isPotentialCardDropTarget: isDraggingCardOnly, disabled: dndDisabled, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: [
23273
+ entriesInGroup.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(SortableNavigationCard, { entry, disabled: dndDisabled, onClick: () => {
23268
23274
  let event = "unmapped_event";
23269
23275
  if (entry.type === "collection") event = "home_navigate_to_collection";
23270
23276
  else if (entry.type === "view") event = "home_navigate_to_view";
@@ -35009,6 +35015,7 @@
35009
35015
  editor_cancel: "Cancel",
35010
35016
  editor_remove_link: "Remove link",
35011
35017
  editor_paste_or_type_link: "Paste or type link",
35018
+ editor_invalid_url: "Invalid URL",
35012
35019
  editor_open_in_new_window: "Open in new window",
35013
35020
  editor_bold: "Bold",
35014
35021
  editor_italic: "Italic",
@@ -35714,6 +35721,7 @@
35714
35721
  editor_cancel: "Cancelar",
35715
35722
  editor_remove_link: "Eliminar enlace",
35716
35723
  editor_paste_or_type_link: "Pega o escribe el enlace",
35724
+ editor_invalid_url: "URL no válida",
35717
35725
  editor_open_in_new_window: "Abrir en una ventana nueva",
35718
35726
  editor_bold: "Negrita",
35719
35727
  editor_italic: "Cursiva",
@@ -38654,7 +38662,7 @@
38654
38662
  }
38655
38663
  }
38656
38664
  const LinkSelector = (t0) => {
38657
- const $ = reactCompilerRuntime.c(58);
38665
+ const $ = reactCompilerRuntime.c(66);
38658
38666
  const {
38659
38667
  open,
38660
38668
  onOpenChange
@@ -38667,20 +38675,23 @@
38667
38675
  const {
38668
38676
  t
38669
38677
  } = useTranslation();
38678
+ const [error, setError] = React.useState(null);
38679
+ const isInputInvalid = !!error;
38670
38680
  let t1;
38671
- let t2;
38672
- if ($[0] !== open) {
38681
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
38673
38682
  t1 = () => {
38674
- if (open && inputRef.current) {
38675
- inputRef.current.focus();
38676
- }
38683
+ setError(null);
38677
38684
  };
38685
+ $[0] = t1;
38686
+ } else {
38687
+ t1 = $[0];
38688
+ }
38689
+ let t2;
38690
+ if ($[1] !== open) {
38678
38691
  t2 = [open];
38679
- $[0] = open;
38680
- $[1] = t1;
38692
+ $[1] = open;
38681
38693
  $[2] = t2;
38682
38694
  } else {
38683
- t1 = $[1];
38684
38695
  t2 = $[2];
38685
38696
  }
38686
38697
  React.useEffect(t1, t2);
@@ -38688,195 +38699,227 @@
38688
38699
  return null;
38689
38700
  }
38690
38701
  let t3;
38691
- if ($[3] !== onOpenChange || $[4] !== view) {
38702
+ if ($[3] !== isInputInvalid) {
38692
38703
  t3 = (e) => {
38693
- e.preventDefault();
38704
+ if (isInputInvalid) {
38705
+ setError(null);
38706
+ }
38707
+ };
38708
+ $[3] = isInputInvalid;
38709
+ $[4] = t3;
38710
+ } else {
38711
+ t3 = $[4];
38712
+ }
38713
+ const handleChange = t3;
38714
+ let t4;
38715
+ if ($[5] !== onOpenChange || $[6] !== t || $[7] !== view) {
38716
+ t4 = (e_0) => {
38717
+ e_0.preventDefault();
38718
+ e_0.stopPropagation();
38719
+ setError(null);
38694
38720
  const value = inputRef.current?.value;
38695
38721
  if (!value) {
38696
38722
  return;
38697
38723
  }
38698
38724
  const url = getUrlFromString(value);
38699
- if (url) {
38700
- setMark(schema.marks.link, {
38701
- href: url
38702
- })(view.state, view.dispatch);
38703
- view.focus();
38704
- onOpenChange(false);
38725
+ if (!url) {
38726
+ setError(t("editor_invalid_url"));
38727
+ return;
38705
38728
  }
38729
+ setMark(schema.marks.link, {
38730
+ href: url
38731
+ })(view.state, view.dispatch);
38732
+ view.focus();
38733
+ onOpenChange(false);
38706
38734
  };
38707
- $[3] = onOpenChange;
38708
- $[4] = view;
38709
- $[5] = t3;
38735
+ $[5] = onOpenChange;
38736
+ $[6] = t;
38737
+ $[7] = view;
38738
+ $[8] = t4;
38710
38739
  } else {
38711
- t3 = $[5];
38740
+ t4 = $[8];
38712
38741
  }
38713
- const handleSubmit = t3;
38714
- let t4;
38715
- if ($[6] !== onOpenChange || $[7] !== view) {
38716
- t4 = () => {
38742
+ const handleSubmit = t4;
38743
+ let t5;
38744
+ if ($[9] !== onOpenChange || $[10] !== view) {
38745
+ t5 = () => {
38717
38746
  unsetMark(schema.marks.link)(view.state, view.dispatch);
38718
38747
  view.focus();
38719
38748
  onOpenChange(false);
38720
38749
  };
38721
- $[6] = onOpenChange;
38722
- $[7] = view;
38723
- $[8] = t4;
38750
+ $[9] = onOpenChange;
38751
+ $[10] = view;
38752
+ $[11] = t5;
38724
38753
  } else {
38725
- t4 = $[8];
38754
+ t5 = $[11];
38726
38755
  }
38727
- const handleRemoveLink = t4;
38756
+ const handleRemoveLink = t5;
38728
38757
  let T0;
38729
38758
  let T1;
38730
38759
  let href;
38731
38760
  let t10;
38732
38761
  let t11;
38733
38762
  let t12;
38734
- let t5;
38763
+ let t13;
38735
38764
  let t6;
38736
38765
  let t7;
38737
38766
  let t8;
38738
38767
  let t9;
38739
- if ($[9] !== onOpenChange || $[10] !== open || $[11] !== state) {
38768
+ if ($[12] !== onOpenChange || $[13] !== open || $[14] !== state) {
38740
38769
  const isActive = isMarkActive(state, schema.marks.link);
38741
- let t132;
38742
- if ($[23] !== state) {
38743
- t132 = getMarkAttributes(state, schema.marks.link).href || "";
38744
- $[23] = state;
38745
- $[24] = t132;
38770
+ let t142;
38771
+ if ($[26] !== state) {
38772
+ t142 = getMarkAttributes(state, schema.marks.link).href || "";
38773
+ $[26] = state;
38774
+ $[27] = t142;
38746
38775
  } else {
38747
- t132 = $[24];
38776
+ t142 = $[27];
38748
38777
  }
38749
- href = t132;
38778
+ href = t142;
38750
38779
  T1 = ui.Popover;
38751
- t10 = true;
38752
- t11 = open;
38753
- t12 = onOpenChange;
38780
+ t11 = true;
38781
+ t12 = open;
38782
+ t13 = onOpenChange;
38754
38783
  T0 = ui.Button;
38755
- t6 = "text";
38756
- t7 = "button";
38757
- t8 = "gap-2 rounded-none";
38758
- t9 = "text";
38759
- t5 = ui.cls("underline decoration-stone-400 underline-offset-4", {
38784
+ t7 = "text";
38785
+ t8 = "button";
38786
+ t9 = "gap-2 rounded-none";
38787
+ t10 = "text";
38788
+ t6 = ui.cls("underline decoration-stone-400 underline-offset-4", {
38760
38789
  "text-blue-500": isActive
38761
38790
  });
38762
- $[9] = onOpenChange;
38763
- $[10] = open;
38764
- $[11] = state;
38765
- $[12] = T0;
38766
- $[13] = T1;
38767
- $[14] = href;
38768
- $[15] = t10;
38769
- $[16] = t11;
38770
- $[17] = t12;
38771
- $[18] = t5;
38772
- $[19] = t6;
38773
- $[20] = t7;
38774
- $[21] = t8;
38775
- $[22] = t9;
38776
- } else {
38777
- T0 = $[12];
38778
- T1 = $[13];
38779
- href = $[14];
38780
- t10 = $[15];
38781
- t11 = $[16];
38782
- t12 = $[17];
38783
- t5 = $[18];
38784
- t6 = $[19];
38785
- t7 = $[20];
38786
- t8 = $[21];
38787
- t9 = $[22];
38788
- }
38789
- let t13;
38790
- if ($[25] !== t) {
38791
- t13 = t("editor_link");
38792
- $[25] = t;
38793
- $[26] = t13;
38791
+ $[12] = onOpenChange;
38792
+ $[13] = open;
38793
+ $[14] = state;
38794
+ $[15] = T0;
38795
+ $[16] = T1;
38796
+ $[17] = href;
38797
+ $[18] = t10;
38798
+ $[19] = t11;
38799
+ $[20] = t12;
38800
+ $[21] = t13;
38801
+ $[22] = t6;
38802
+ $[23] = t7;
38803
+ $[24] = t8;
38804
+ $[25] = t9;
38794
38805
  } else {
38795
- t13 = $[26];
38806
+ T0 = $[15];
38807
+ T1 = $[16];
38808
+ href = $[17];
38809
+ t10 = $[18];
38810
+ t11 = $[19];
38811
+ t12 = $[20];
38812
+ t13 = $[21];
38813
+ t6 = $[22];
38814
+ t7 = $[23];
38815
+ t8 = $[24];
38816
+ t9 = $[25];
38796
38817
  }
38797
38818
  let t14;
38798
- if ($[27] !== t13 || $[28] !== t5) {
38799
- t14 = /* @__PURE__ */ jsxRuntime.jsx("p", { className: t5, children: t13 });
38800
- $[27] = t13;
38801
- $[28] = t5;
38819
+ if ($[28] !== t) {
38820
+ t14 = t("editor_link");
38821
+ $[28] = t;
38802
38822
  $[29] = t14;
38803
38823
  } else {
38804
38824
  t14 = $[29];
38805
38825
  }
38806
38826
  let t15;
38807
- if ($[30] !== T0 || $[31] !== t14 || $[32] !== t6 || $[33] !== t7 || $[34] !== t8 || $[35] !== t9) {
38808
- t15 = /* @__PURE__ */ jsxRuntime.jsx(T0, { variant: t6, type: t7, className: t8, color: t9, children: t14 });
38809
- $[30] = T0;
38810
- $[31] = t14;
38811
- $[32] = t6;
38812
- $[33] = t7;
38813
- $[34] = t8;
38814
- $[35] = t9;
38815
- $[36] = t15;
38827
+ if ($[30] !== t14 || $[31] !== t6) {
38828
+ t15 = /* @__PURE__ */ jsxRuntime.jsx("p", { className: t6, children: t14 });
38829
+ $[30] = t14;
38830
+ $[31] = t6;
38831
+ $[32] = t15;
38816
38832
  } else {
38817
- t15 = $[36];
38833
+ t15 = $[32];
38818
38834
  }
38819
38835
  let t16;
38820
- if ($[37] !== t) {
38821
- t16 = t("editor_paste_or_type_link");
38822
- $[37] = t;
38823
- $[38] = t16;
38836
+ if ($[33] !== T0 || $[34] !== t10 || $[35] !== t15 || $[36] !== t7 || $[37] !== t8 || $[38] !== t9) {
38837
+ t16 = /* @__PURE__ */ jsxRuntime.jsx(T0, { variant: t7, type: t8, className: t9, color: t10, children: t15 });
38838
+ $[33] = T0;
38839
+ $[34] = t10;
38840
+ $[35] = t15;
38841
+ $[36] = t7;
38842
+ $[37] = t8;
38843
+ $[38] = t9;
38844
+ $[39] = t16;
38824
38845
  } else {
38825
- t16 = $[38];
38846
+ t16 = $[39];
38826
38847
  }
38827
38848
  let t17;
38828
- if ($[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
38829
- t17 = ui.cls("text-surface-900 dark:text-white flex-grow bg-transparent p-1 text-sm outline-none", ui.focusedDisabled);
38830
- $[39] = t17;
38849
+ if ($[40] !== t) {
38850
+ t17 = t("editor_paste_or_type_link");
38851
+ $[40] = t;
38852
+ $[41] = t17;
38831
38853
  } else {
38832
- t17 = $[39];
38854
+ t17 = $[41];
38833
38855
  }
38834
38856
  let t18;
38835
- if ($[40] !== href || $[41] !== open || $[42] !== t16) {
38836
- t18 = /* @__PURE__ */ jsxRuntime.jsx("input", { ref: inputRef, autoFocus: open, placeholder: t16, defaultValue: href, className: t17 });
38837
- $[40] = href;
38838
- $[41] = open;
38839
- $[42] = t16;
38840
- $[43] = t18;
38857
+ if ($[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
38858
+ t18 = ui.cls("text-surface-900 dark:text-white flex-grow bg-transparent p-1 text-sm outline-none", ui.focusedDisabled);
38859
+ $[42] = t18;
38841
38860
  } else {
38842
- t18 = $[43];
38861
+ t18 = $[42];
38843
38862
  }
38844
38863
  let t19;
38845
- if ($[44] !== handleRemoveLink || $[45] !== href) {
38846
- t19 = href ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "text", type: "button", color: "text", className: "flex items-center", onClick: handleRemoveLink, children: /* @__PURE__ */ jsxRuntime.jsx(ui.DeleteIcon, { size: "small" }) }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CheckIcon, { size: "small" }) });
38847
- $[44] = handleRemoveLink;
38848
- $[45] = href;
38849
- $[46] = t19;
38864
+ if ($[43] !== href || $[44] !== isInputInvalid || $[45] !== open || $[46] !== t17) {
38865
+ t19 = /* @__PURE__ */ jsxRuntime.jsx("input", { ref: inputRef, autoFocus: open, placeholder: t17, defaultValue: href, className: t18, "aria-invalid": isInputInvalid });
38866
+ $[43] = href;
38867
+ $[44] = isInputInvalid;
38868
+ $[45] = open;
38869
+ $[46] = t17;
38870
+ $[47] = t19;
38850
38871
  } else {
38851
- t19 = $[46];
38872
+ t19 = $[47];
38852
38873
  }
38853
38874
  let t20;
38854
- if ($[47] !== handleSubmit || $[48] !== t18 || $[49] !== t19) {
38855
- t20 = /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "flex p-1 gap-1", children: [
38856
- t18,
38857
- t19
38858
- ] });
38859
- $[47] = handleSubmit;
38860
- $[48] = t18;
38861
- $[49] = t19;
38875
+ if ($[48] !== handleRemoveLink || $[49] !== href) {
38876
+ t20 = href ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "text", type: "button", color: "text", className: "flex items-center", onClick: handleRemoveLink, children: /* @__PURE__ */ jsxRuntime.jsx(ui.DeleteIcon, { size: "small" }) }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CheckIcon, { size: "small" }) });
38877
+ $[48] = handleRemoveLink;
38878
+ $[49] = href;
38862
38879
  $[50] = t20;
38863
38880
  } else {
38864
38881
  t20 = $[50];
38865
38882
  }
38866
38883
  let t21;
38867
- if ($[51] !== T1 || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t15 || $[56] !== t20) {
38868
- t21 = /* @__PURE__ */ jsxRuntime.jsx(T1, { modal: t10, open: t11, onOpenChange: t12, trigger: t15, children: t20 });
38869
- $[51] = T1;
38870
- $[52] = t10;
38871
- $[53] = t11;
38872
- $[54] = t12;
38873
- $[55] = t15;
38874
- $[56] = t20;
38875
- $[57] = t21;
38884
+ if ($[51] !== handleChange || $[52] !== handleSubmit || $[53] !== t19 || $[54] !== t20) {
38885
+ t21 = /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "flex p-1 gap-1", onChange: handleChange, children: [
38886
+ t19,
38887
+ t20
38888
+ ] });
38889
+ $[51] = handleChange;
38890
+ $[52] = handleSubmit;
38891
+ $[53] = t19;
38892
+ $[54] = t20;
38893
+ $[55] = t21;
38876
38894
  } else {
38877
- t21 = $[57];
38895
+ t21 = $[55];
38878
38896
  }
38879
- return t21;
38897
+ let t22;
38898
+ if ($[56] !== error) {
38899
+ t22 = error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "error", role: "alert", "aria-live": "polite", children: error }) });
38900
+ $[56] = error;
38901
+ $[57] = t22;
38902
+ } else {
38903
+ t22 = $[57];
38904
+ }
38905
+ let t23;
38906
+ if ($[58] !== T1 || $[59] !== t11 || $[60] !== t12 || $[61] !== t13 || $[62] !== t16 || $[63] !== t21 || $[64] !== t22) {
38907
+ t23 = /* @__PURE__ */ jsxRuntime.jsxs(T1, { modal: t11, open: t12, onOpenChange: t13, trigger: t16, children: [
38908
+ t21,
38909
+ t22
38910
+ ] });
38911
+ $[58] = T1;
38912
+ $[59] = t11;
38913
+ $[60] = t12;
38914
+ $[61] = t13;
38915
+ $[62] = t16;
38916
+ $[63] = t21;
38917
+ $[64] = t22;
38918
+ $[65] = t23;
38919
+ } else {
38920
+ t23 = $[65];
38921
+ }
38922
+ return t23;
38880
38923
  };
38881
38924
  const TextButtons = () => {
38882
38925
  const $ = reactCompilerRuntime.c(3);
@@ -41155,6 +41198,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
41155
41198
  editor_cancel: "Abbrechen",
41156
41199
  editor_remove_link: "Link entfernen",
41157
41200
  editor_paste_or_type_link: "Link einfügen oder eintippen",
41201
+ editor_invalid_url: "Ungültige URL",
41158
41202
  editor_open_in_new_window: "In neuem Fenster öffnen",
41159
41203
  editor_bold: "Fett",
41160
41204
  editor_italic: "Kursiv",
@@ -41862,6 +41906,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
41862
41906
  editor_cancel: "Annuler",
41863
41907
  editor_remove_link: "Supprimer le lien",
41864
41908
  editor_paste_or_type_link: "Coller ou taper le lien",
41909
+ editor_invalid_url: "URL invalide",
41865
41910
  editor_open_in_new_window: "Ouvrir dans une nouvelle fenêtre",
41866
41911
  editor_bold: "Gras",
41867
41912
  editor_italic: "Italique",
@@ -42569,6 +42614,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42569
42614
  editor_cancel: "Annulla",
42570
42615
  editor_remove_link: "Rimuovi link",
42571
42616
  editor_paste_or_type_link: "Incolla o digita il link",
42617
+ editor_invalid_url: "URL non valido",
42572
42618
  editor_open_in_new_window: "Apri in una nuova finestra",
42573
42619
  editor_bold: "Grassetto",
42574
42620
  editor_italic: "Corsivo",
@@ -43276,6 +43322,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
43276
43322
  editor_cancel: "रद्द करें",
43277
43323
  editor_remove_link: "लिंक हटाएं",
43278
43324
  editor_paste_or_type_link: "लिंक पेस्ट करें या टाइप करें",
43325
+ editor_invalid_url: "अमान्य URL",
43279
43326
  editor_open_in_new_window: "नई विंडो में खोलें",
43280
43327
  editor_bold: "बोल्ड",
43281
43328
  editor_italic: "इटैलिक",
@@ -43985,6 +44032,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
43985
44032
  editor_cancel: "Cancelar",
43986
44033
  editor_remove_link: "Remover ligação",
43987
44034
  editor_paste_or_type_link: "Cole ou escreva a ligação",
44035
+ editor_invalid_url: "URL inválido",
43988
44036
  editor_open_in_new_window: "Abrir numa nova janela",
43989
44037
  editor_bold: "Negrito",
43990
44038
  editor_italic: "Itálico",
@@ -44694,6 +44742,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
44694
44742
  editor_cancel: "Anuluj",
44695
44743
  editor_remove_link: "Usuń link",
44696
44744
  editor_paste_or_type_link: "Wklej lub wpisz link",
44745
+ editor_invalid_url: "Nieprawidłowy URL",
44697
44746
  editor_open_in_new_window: "Otwórz w nowym oknie",
44698
44747
  editor_bold: "Pogrubienie",
44699
44748
  editor_italic: "Kursywa",