tinacms 2.2.4 → 2.2.6

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
@@ -1842,14 +1842,14 @@ var __publicField = (obj, key, value) => {
1842
1842
  className: "relative inline-block text-left z-20"
1843
1843
  },
1844
1844
  /* @__PURE__ */ React.createElement("div", { className: "mt-1" }, /* @__PURE__ */ React.createElement("div", { className: "relative w-full cursor-default overflow-hidden rounded-lg bg-white text-left shadow-md sm:text-sm" }, /* @__PURE__ */ React.createElement(
1845
- react$1.Combobox.Input,
1845
+ react$1.ComboboxInput,
1846
1846
  {
1847
1847
  className: "w-full border-none py-2 pl-3 pr-10 text-sm leading-5 text-gray-900 focus:ring-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300",
1848
1848
  displayValue: (item) => (item == null ? void 0 : item.label) ?? "Plain Text",
1849
1849
  onChange: (event) => setQuery(event.target.value),
1850
1850
  onClick: (ev) => ev.stopPropagation()
1851
1851
  }
1852
- ), /* @__PURE__ */ React.createElement(react$1.Combobox.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2" }, /* @__PURE__ */ React.createElement(
1852
+ ), /* @__PURE__ */ React.createElement(react$1.ComboboxButton, { className: "absolute inset-y-0 right-0 flex items-center pr-2" }, /* @__PURE__ */ React.createElement(
1853
1853
  ChevronDownIcon$1,
1854
1854
  {
1855
1855
  className: "h-5 w-5 text-gray-400",
@@ -1859,7 +1859,6 @@ var __publicField = (obj, key, value) => {
1859
1859
  /* @__PURE__ */ React.createElement(
1860
1860
  react$1.Transition,
1861
1861
  {
1862
- as: React.Fragment,
1863
1862
  enter: "transition ease-out duration-100",
1864
1863
  enterFrom: "transform opacity-0 scale-95",
1865
1864
  enterTo: "transform opacity-100 scale-100",
@@ -1867,11 +1866,11 @@ var __publicField = (obj, key, value) => {
1867
1866
  leaveFrom: "transform opacity-100 scale-100",
1868
1867
  leaveTo: "transform opacity-0 scale-95"
1869
1868
  },
1870
- /* @__PURE__ */ React.createElement(react$1.Combobox.Options, { className: "origin-top-right absolute right-0 mt-1 w-full max-h-[300px] overflow-y-auto rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, filteredItems.map((item) => /* @__PURE__ */ React.createElement(react$1.Combobox.Option, { key: item.key, value: item }, ({ active }) => /* @__PURE__ */ React.createElement(
1869
+ /* @__PURE__ */ React.createElement(react$1.ComboboxOptions, { className: "origin-top-right absolute right-0 mt-1 w-full max-h-[300px] overflow-y-auto rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, filteredItems.map((item) => /* @__PURE__ */ React.createElement(react$1.ComboboxOption, { key: item.key, value: item }, ({ focus }) => /* @__PURE__ */ React.createElement(
1871
1870
  "button",
1872
1871
  {
1873
1872
  className: classNames$1(
1874
- active ? "bg-gray-100 text-gray-900" : "text-gray-700",
1873
+ focus ? "bg-gray-100 text-gray-900" : "text-gray-700",
1875
1874
  "block px-4 py-2 text-xs w-full text-right"
1876
1875
  )
1877
1876
  },
@@ -3348,6 +3347,9 @@ var __publicField = (obj, key, value) => {
3348
3347
  function BiCopy(props) {
3349
3348
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M20 2H10c-1.103 0-2 .897-2 2v4H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h10c1.103 0 2-.897 2-2v-4h4c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zM4 20V10h10l.002 10H4zm16-6h-4v-4c0-1.103-.897-2-2-2h-4V4h10v10z" }, "child": [] }] })(props);
3350
3349
  }
3350
+ function BiDotsVertical(props) {
3351
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M10 10h4v4h-4zm0-6h4v4h-4zm0 12h4v4h-4z" }, "child": [] }] })(props);
3352
+ }
3351
3353
  function BiEdit(props) {
3352
3354
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" }, "child": [] }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" }, "child": [] }] })(props);
3353
3355
  }
@@ -5107,7 +5109,7 @@ var __publicField = (obj, key, value) => {
5107
5109
  return template.label ? template.label.toLowerCase().includes(filter.toLowerCase()) || name.toLowerCase().includes(filter.toLowerCase()) : name.toLowerCase().includes(filter.toLowerCase());
5108
5110
  });
5109
5111
  }, [filter]);
5110
- return /* @__PURE__ */ React__namespace.createElement(react$1.Popover, null, ({ open: open2 }) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(react$1.Popover.Button, { as: "span" }, /* @__PURE__ */ React__namespace.createElement(
5112
+ return /* @__PURE__ */ React__namespace.createElement(react$1.Popover, null, ({ open: open2 }) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(react$1.PopoverButton, { as: "span" }, /* @__PURE__ */ React__namespace.createElement(
5111
5113
  IconButton,
5112
5114
  {
5113
5115
  variant: open2 ? "secondary" : "primary",
@@ -5125,7 +5127,7 @@ var __publicField = (obj, key, value) => {
5125
5127
  leaveFrom: "transform opacity-100 translate-y-0",
5126
5128
  leaveTo: "transform opacity-0 -translate-y-2"
5127
5129
  },
5128
- /* @__PURE__ */ React__namespace.createElement(react$1.Popover.Panel, { className: "relative overflow-hidden rounded-lg shadow-lg bg-white border border-gray-100" }, ({ close: close2 }) => /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-[192px] max-h-[24rem] overflow-y-auto flex flex-col w-full h-full" }, showFilter && /* @__PURE__ */ React__namespace.createElement("div", { className: "sticky top-0 bg-gray-50 p-2 border-b border-gray-100 z-10" }, /* @__PURE__ */ React__namespace.createElement(
5130
+ /* @__PURE__ */ React__namespace.createElement(react$1.PopoverPanel, { className: "relative overflow-hidden rounded-lg shadow-lg bg-white border border-gray-100" }, ({ close: close2 }) => /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-[192px] max-h-[24rem] overflow-y-auto flex flex-col w-full h-full" }, showFilter && /* @__PURE__ */ React__namespace.createElement("div", { className: "sticky top-0 bg-gray-50 p-2 border-b border-gray-100 z-10" }, /* @__PURE__ */ React__namespace.createElement(
5129
5131
  "input",
5130
5132
  {
5131
5133
  type: "text",
@@ -5298,14 +5300,13 @@ var __publicField = (obj, key, value) => {
5298
5300
  {
5299
5301
  variant: pickerIsOpen ? "secondary" : "primary",
5300
5302
  size: "small",
5301
- className: `${pickerIsOpen ? `rotate-45 pointer-events-none` : ``}`,
5303
+ className: `${pickerIsOpen ? "rotate-45 pointer-events-none" : ""}`,
5302
5304
  onClick: () => setPickerIsOpen(!pickerIsOpen)
5303
5305
  },
5304
5306
  /* @__PURE__ */ React__namespace.createElement(AddIcon, { className: "w-5/6 h-auto" })
5305
5307
  ), /* @__PURE__ */ React__namespace.createElement(FormPortal, null, ({ zIndexShift }) => /* @__PURE__ */ React__namespace.createElement(react$1.Transition, { show: pickerIsOpen }, /* @__PURE__ */ React__namespace.createElement(
5306
- react$1.Transition.Child,
5308
+ react$1.TransitionChild,
5307
5309
  {
5308
- as: React__namespace.Fragment,
5309
5310
  enter: "transform transition-all ease-out duration-200",
5310
5311
  enterFrom: "opacity-0 -translate-x-1/2",
5311
5312
  enterTo: "opacity-100 translate-x-0",
@@ -5398,7 +5399,7 @@ var __publicField = (obj, key, value) => {
5398
5399
  className: `left-0 right-0 relative`
5399
5400
  },
5400
5401
  ({ open: open2 }) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
5401
- react$1.Disclosure.Button,
5402
+ react$1.DisclosureButton,
5402
5403
  {
5403
5404
  className: `relative block group text-left w-full text-base font-bold tracking-wide py-2 truncate ${templates.length === 0 ? `pointer-events-none` : ``} ${!isLast && (!open2 || templates.length === 0) && `border-b border-gray-100`}`
5404
5405
  },
@@ -5425,7 +5426,15 @@ var __publicField = (obj, key, value) => {
5425
5426
  leaveFrom: "transform scale-100 opacity-100",
5426
5427
  leaveTo: "transform scale-95 opacity-0"
5427
5428
  },
5428
- /* @__PURE__ */ React__namespace.createElement(react$1.Disclosure.Panel, null, templates.length > 0 && /* @__PURE__ */ React__namespace.createElement(CardColumns, null, templates.map(([name, template]) => /* @__PURE__ */ React__namespace.createElement(BlockCard, { close: close2, name, template }))))
5429
+ /* @__PURE__ */ React__namespace.createElement(react$1.DisclosurePanel, null, templates.length > 0 && /* @__PURE__ */ React__namespace.createElement(CardColumns, null, templates.map(([name, template], index) => /* @__PURE__ */ React__namespace.createElement(
5430
+ BlockCard,
5431
+ {
5432
+ key: index,
5433
+ close: close2,
5434
+ name,
5435
+ template
5436
+ }
5437
+ ))))
5429
5438
  ))
5430
5439
  );
5431
5440
  };
@@ -9235,11 +9244,12 @@ var __publicField = (obj, key, value) => {
9235
9244
  };
9236
9245
  const FormLists = (props) => {
9237
9246
  const cms = useCMS();
9238
- return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
9247
+ return /* @__PURE__ */ React__namespace.createElement(
9239
9248
  react$1.Transition,
9240
9249
  {
9241
9250
  appear: true,
9242
9251
  show: true,
9252
+ as: "div",
9243
9253
  enter: "transition-all ease-out duration-150",
9244
9254
  enterFrom: "opacity-0 -translate-x-1/2",
9245
9255
  enterTo: "opacity-100",
@@ -9257,7 +9267,7 @@ var __publicField = (obj, key, value) => {
9257
9267
  formList
9258
9268
  }
9259
9269
  )))
9260
- ));
9270
+ );
9261
9271
  };
9262
9272
  const FormList = (props) => {
9263
9273
  const cms = useCMS();
@@ -9289,7 +9299,7 @@ var __publicField = (obj, key, value) => {
9289
9299
  }
9290
9300
  return [...topItems, ...orderedListItems, ...extra];
9291
9301
  }, [JSON.stringify(props.formList.items)]);
9292
- return /* @__PURE__ */ React__namespace.createElement("ul", null, /* @__PURE__ */ React__namespace.createElement("li", { className: `divide-y divide-gray-200` }, listItems.map((item, index) => {
9302
+ return /* @__PURE__ */ React__namespace.createElement("ul", null, /* @__PURE__ */ React__namespace.createElement("li", { className: "divide-y divide-gray-200" }, listItems.map((item, index) => {
9293
9303
  if (item.type === "list") {
9294
9304
  return /* @__PURE__ */ React__namespace.createElement(
9295
9305
  "div",
@@ -9380,19 +9390,46 @@ var __publicField = (obj, key, value) => {
9380
9390
  }
9381
9391
  }
9382
9392
  },
9393
+ /* @__PURE__ */ React__namespace.createElement(BiDotsVertical, { className: "h-auto w-5 inline-block opacity-70" })
9394
+ ), /* @__PURE__ */ React__namespace.createElement(
9395
+ "button",
9396
+ {
9397
+ type: "button",
9398
+ className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
9399
+ onClick: () => {
9400
+ const collectionName = cms.api.tina.schema.getCollectionByFullPath(
9401
+ cms.state.activeFormId
9402
+ ).name;
9403
+ window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
9404
+ }
9405
+ },
9383
9406
  /* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
9384
9407
  ), /* @__PURE__ */ React__namespace.createElement("span", { className: "opacity-30 text-sm leading-tight whitespace-nowrap flex-0" }, "/"), /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, activeForm.tinaForm.label || activeForm.tinaForm.id), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
9385
9408
  );
9386
9409
  };
9387
9410
  const FormHeader = ({ activeForm }) => {
9388
9411
  const { formIsPristine } = React__namespace.useContext(SidebarContext);
9412
+ const cms = useCMS$1();
9389
9413
  const shortFormLabel = activeForm.tinaForm.label ? activeForm.tinaForm.label.replace(/^.*[\\\/]/, "") : false;
9390
9414
  return /* @__PURE__ */ React__namespace.createElement(
9391
9415
  "div",
9392
9416
  {
9393
9417
  className: "pt-18 pb-4 px-6 border-b border-gray-200 bg-gradient-to-t from-white to-gray-50"
9394
9418
  },
9395
- /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, shortFormLabel && /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
9419
+ /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-form mx-auto flex gap-2 justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement(
9420
+ "button",
9421
+ {
9422
+ type: "button",
9423
+ className: "pointer-events-auto text-xs text-blue-400 hover:text-blue-500 hover:underline transition-all ease-out duration-150",
9424
+ onClick: () => {
9425
+ const collectionName = cms.api.tina.schema.getCollectionByFullPath(
9426
+ cms.state.activeFormId
9427
+ ).name;
9428
+ window.location.href = `${new URL(window.location.href).pathname}#/collections/${collectionName}/~`;
9429
+ }
9430
+ },
9431
+ /* @__PURE__ */ React__namespace.createElement(BiHomeAlt, { className: "h-auto w-5 inline-block opacity-70" })
9432
+ ), shortFormLabel && /* @__PURE__ */ React__namespace.createElement("span", { className: "block w-full text-sm leading-tight whitespace-nowrap truncate" }, shortFormLabel), /* @__PURE__ */ React__namespace.createElement(FormStatus, { pristine: formIsPristine }))
9396
9433
  );
9397
9434
  };
9398
9435
  function ImFilesEmpty(props) {
@@ -9637,6 +9674,7 @@ var __publicField = (obj, key, value) => {
9637
9674
  "Event Log"
9638
9675
  ));
9639
9676
  };
9677
+ const version = "2.2.6";
9640
9678
  const Nav = ({
9641
9679
  isLocalMode,
9642
9680
  className = "",
@@ -9687,13 +9725,13 @@ var __publicField = (obj, key, value) => {
9687
9725
  "div",
9688
9726
  {
9689
9727
  className: `relative z-30 flex flex-col bg-white border-r border-gray-200 w-96 h-full ${className}`,
9690
- style: { maxWidth: sidebarWidth + "px" },
9728
+ style: { maxWidth: `${sidebarWidth}px` },
9691
9729
  ...props
9692
9730
  },
9693
9731
  /* @__PURE__ */ React__namespace.createElement("div", { className: "border-b border-gray-200" }, /* @__PURE__ */ React__namespace.createElement(react$1.Menu, { as: "div", className: "relative block" }, ({ open: open2 }) => /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(
9694
- react$1.Menu.Button,
9732
+ react$1.MenuButton,
9695
9733
  {
9696
- className: `group w-full px-6 py-3 gap-2 flex justify-between items-center transition-colors duration-150 ease-out ${open2 ? `bg-gray-50` : `bg-transparent`}`
9734
+ className: `group w-full px-6 py-3 gap-2 flex justify-between items-center transition-colors duration-150 ease-out ${open2 ? "bg-gray-50" : "bg-transparent"}`
9697
9735
  },
9698
9736
  /* @__PURE__ */ React__namespace.createElement("span", { className: "text-left inline-flex items-center text-xl tracking-wide text-gray-800 flex-1 gap-1 opacity-80 group-hover:opacity-100 transition-opacity duration-150 ease-out" }, /* @__PURE__ */ React__namespace.createElement(
9699
9737
  "svg",
@@ -9710,7 +9748,7 @@ var __publicField = (obj, key, value) => {
9710
9748
  /* @__PURE__ */ React__namespace.createElement(
9711
9749
  FiMoreVertical,
9712
9750
  {
9713
- className: `flex-0 w-6 h-full inline-block group-hover:opacity-80 transition-all duration-300 ease-in-out transform ${open2 ? `opacity-100 text-blue-400` : `text-gray-400 opacity-50 hover:opacity-70`}`
9751
+ className: `flex-0 w-6 h-full inline-block group-hover:opacity-80 transition-all duration-300 ease-in-out transform ${open2 ? "opacity-100 text-blue-400" : "text-gray-400 opacity-50 hover:opacity-70"}`
9714
9752
  }
9715
9753
  )
9716
9754
  ), /* @__PURE__ */ React__namespace.createElement("div", { className: "transform translate-y-full absolute bottom-3 right-5 z-50" }, /* @__PURE__ */ React__namespace.createElement(
@@ -9723,7 +9761,7 @@ var __publicField = (obj, key, value) => {
9723
9761
  leaveFrom: "transform opacity-100 translate-y-0",
9724
9762
  leaveTo: "transform opacity-0 -translate-y-2"
9725
9763
  },
9726
- /* @__PURE__ */ React__namespace.createElement(react$1.Menu.Items, { className: "bg-white border border-gray-150 rounded-lg shadow-lg flex flex-col items-stretch overflow-hidden" }, /* @__PURE__ */ React__namespace.createElement(react$1.Menu.Item, null, /* @__PURE__ */ React__namespace.createElement(
9764
+ /* @__PURE__ */ React__namespace.createElement(react$1.MenuItems, { className: "bg-white border border-gray-150 rounded-lg shadow-lg flex flex-col items-stretch overflow-hidden" }, /* @__PURE__ */ React__namespace.createElement(react$1.MenuItem, null, /* @__PURE__ */ React__namespace.createElement(
9727
9765
  "button",
9728
9766
  {
9729
9767
  className: `text-lg px-4 py-2 first:pt-3 last:pb-3 tracking-wide whitespace-nowrap flex items-center opacity-80 text-gray-600 hover:text-blue-400 hover:bg-gray-50 hover:opacity-100`,
@@ -9756,7 +9794,7 @@ var __publicField = (obj, key, value) => {
9756
9794
  },
9757
9795
  /* @__PURE__ */ React__namespace.createElement(BiExit, { className: "w-6 h-auto mr-2 text-blue-400" }),
9758
9796
  " Log Out"
9759
- )), /* @__PURE__ */ React__namespace.createElement(react$1.Menu.Item, null, /* @__PURE__ */ React__namespace.createElement(
9797
+ )), /* @__PURE__ */ React__namespace.createElement(react$1.MenuItem, null, /* @__PURE__ */ React__namespace.createElement(
9760
9798
  WrappedSyncStatus,
9761
9799
  {
9762
9800
  cms,
@@ -9766,7 +9804,7 @@ var __publicField = (obj, key, value) => {
9766
9804
  ))))),
9767
9805
  eventsOpen && /* @__PURE__ */ React__namespace.createElement(SyncStatusModal, { cms, closeEventsModal }),
9768
9806
  children,
9769
- /* @__PURE__ */ React__namespace.createElement("div", { className: "px-6 flex-1 overflow-auto" }, showCollections && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("h4", { className: "flex space-x-1 justify-items-start uppercase font-sans font-bold text-sm mb-3 mt-8 text-gray-700" }, /* @__PURE__ */ React__namespace.createElement("span", null, "Collections"), isLocalMode && /* @__PURE__ */ React__namespace.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React__namespace.createElement(
9807
+ /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col px-6 flex-1 overflow-auto" }, showCollections && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("h4", { className: "flex space-x-1 justify-items-start uppercase font-sans font-bold text-sm mb-3 mt-8 text-gray-700" }, /* @__PURE__ */ React__namespace.createElement("span", null, "Collections"), isLocalMode && /* @__PURE__ */ React__namespace.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React__namespace.createElement(
9770
9808
  "a",
9771
9809
  {
9772
9810
  href: "https://tina.io/docs/schema/#defining-collections",
@@ -9797,7 +9835,7 @@ var __publicField = (obj, key, value) => {
9797
9835
  }
9798
9836
  }), !!(cloudConfigs == null ? void 0 : cloudConfigs.length) && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("h4", { className: "uppercase font-sans font-bold text-sm mb-3 mt-8 text-gray-700" }, "Cloud"), /* @__PURE__ */ React__namespace.createElement("ul", { className: "flex flex-col gap-4" }, cloudConfigs.map((config) => {
9799
9837
  return /* @__PURE__ */ React__namespace.createElement("li", { key: `nav-site-${config.name}` }, /* @__PURE__ */ React__namespace.createElement(RenderNavCloud, { config }));
9800
- }))))
9838
+ }))), /* @__PURE__ */ React__namespace.createElement("div", { className: "grow" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "font-sans font-light text-xs mb-3 mt-8 text-gray-500" }, "v", version))
9801
9839
  );
9802
9840
  };
9803
9841
  const CollectionsList = ({
@@ -10102,10 +10140,9 @@ var __publicField = (obj, key, value) => {
10102
10140
  screen: activeScreen,
10103
10141
  close: () => setActiveView(null)
10104
10142
  }
10105
- )), /* @__PURE__ */ React__namespace.createElement(ResizeHandle, null)), renderMobileNav && /* @__PURE__ */ React__namespace.createElement(react$1.Transition, { show: menuIsOpen }, /* @__PURE__ */ React__namespace.createElement(
10106
- react$1.Transition.Child,
10143
+ )), /* @__PURE__ */ React__namespace.createElement(ResizeHandle, null)), renderMobileNav && /* @__PURE__ */ React__namespace.createElement(react$1.Transition, { show: menuIsOpen, as: "div" }, /* @__PURE__ */ React__namespace.createElement(
10144
+ react$1.TransitionChild,
10107
10145
  {
10108
- as: React__namespace.Fragment,
10109
10146
  enter: "transform transition-all ease-out duration-300",
10110
10147
  enterFrom: "opacity-0 -translate-x-full",
10111
10148
  enterTo: "opacity-100 translate-x-0",
@@ -10163,15 +10200,14 @@ var __publicField = (obj, key, value) => {
10163
10200
  onClick: () => {
10164
10201
  setMenuIsOpen(false);
10165
10202
  },
10166
- className: `transition-opacity duration-150 ease-out`
10203
+ className: "transition-opacity duration-150 ease-out"
10167
10204
  },
10168
10205
  /* @__PURE__ */ React__namespace.createElement(IoMdClose, { className: "h-5 w-auto text-blue-500" })
10169
10206
  ))
10170
10207
  ))
10171
10208
  ), /* @__PURE__ */ React__namespace.createElement(
10172
- react$1.Transition.Child,
10209
+ react$1.TransitionChild,
10173
10210
  {
10174
- as: React__namespace.Fragment,
10175
10211
  enter: "ease-out duration-300",
10176
10212
  enterFrom: "opacity-0",
10177
10213
  enterTo: "opacity-80",
@@ -10207,7 +10243,7 @@ var __publicField = (obj, key, value) => {
10207
10243
  sidebarWidth,
10208
10244
  windowWidth - minPreviewWidth
10209
10245
  );
10210
- body.style.paddingLeft = bodyDisplacement + "px";
10246
+ body.style.paddingLeft = `${bodyDisplacement}px`;
10211
10247
  } else {
10212
10248
  body.style.paddingLeft = "0";
10213
10249
  }
@@ -10253,7 +10289,7 @@ var __publicField = (obj, key, value) => {
10253
10289
  )), /* @__PURE__ */ React__namespace.createElement(
10254
10290
  "div",
10255
10291
  {
10256
- className: `flex items-center pointer-events-auto transition-opacity duration-150 ease-in-out -mr-px`
10292
+ className: "flex items-center pointer-events-auto transition-opacity duration-150 ease-in-out -mr-px"
10257
10293
  },
10258
10294
  /* @__PURE__ */ React__namespace.createElement(
10259
10295
  Button$1,
@@ -10352,14 +10388,14 @@ var __publicField = (obj, key, value) => {
10352
10388
  return /* @__PURE__ */ React__namespace.createElement(
10353
10389
  "div",
10354
10390
  {
10355
- className: `fixed top-0 left-0 h-dvh z-base ${displayState === "closed" ? `pointer-events-none` : ``}`
10391
+ className: `fixed top-0 left-0 h-dvh z-base ${displayState === "closed" ? "pointer-events-none" : ""}`
10356
10392
  },
10357
10393
  /* @__PURE__ */ React__namespace.createElement(
10358
10394
  "div",
10359
10395
  {
10360
- className: `relative h-dvh transform flex ${displayState !== "closed" ? `` : `-translate-x-full`} ${resizingSidebar ? `transition-none` : displayState === "closed" ? `transition-all duration-300 ease-in` : displayState === "fullscreen" ? `transition-all duration-150 ease-out` : `transition-all duration-300 ease-out`}`,
10396
+ className: `relative h-dvh transform flex ${displayState !== "closed" ? "" : "-translate-x-full"} ${resizingSidebar ? "transition-none" : displayState === "closed" ? "transition-all duration-300 ease-in" : displayState === "fullscreen" ? "transition-all duration-150 ease-out" : "transition-all duration-300 ease-out"}`,
10361
10397
  style: {
10362
- width: displayState === "fullscreen" ? "100vw" : sidebarWidth + "px",
10398
+ width: displayState === "fullscreen" ? "100vw" : `${sidebarWidth}px`,
10363
10399
  maxWidth: displayState === "fullscreen" ? "100vw" : "calc(100vw - 8px)",
10364
10400
  minWidth: "360px"
10365
10401
  }
@@ -10372,7 +10408,7 @@ var __publicField = (obj, key, value) => {
10372
10408
  return /* @__PURE__ */ React__namespace.createElement(
10373
10409
  "div",
10374
10410
  {
10375
- className: `relative left-0 w-full h-full flex flex-col items-stretch bg-white border-r border-gray-200 overflow-hidden`
10411
+ className: "relative left-0 w-full h-full flex flex-col items-stretch bg-white border-r border-gray-200 overflow-hidden"
10376
10412
  },
10377
10413
  children
10378
10414
  );
@@ -12706,7 +12742,7 @@ var __publicField = (obj, key, value) => {
12706
12742
  };
12707
12743
  const DotMenu = ({ onOpen, onRemove }) => {
12708
12744
  return /* @__PURE__ */ React.createElement(react$1.Popover, { as: "span", className: "-ml-px relative block" }, /* @__PURE__ */ React.createElement(
12709
- react$1.Popover.Button,
12745
+ react$1.PopoverButton,
12710
12746
  {
12711
12747
  as: "span",
12712
12748
  className: "cursor-pointer h-full relative inline-flex items-center px-1 py-0.5 rounded-r-md border border-gray-200 bg-white text-gray-500 hover:bg-gray-50 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"
@@ -12715,7 +12751,6 @@ var __publicField = (obj, key, value) => {
12715
12751
  ), /* @__PURE__ */ React.createElement(
12716
12752
  react$1.Transition,
12717
12753
  {
12718
- as: React.Fragment,
12719
12754
  enter: "transition ease-out duration-100",
12720
12755
  enterFrom: "transform opacity-0 scale-95",
12721
12756
  enterTo: "transform opacity-100 scale-100",
@@ -12723,7 +12758,7 @@ var __publicField = (obj, key, value) => {
12723
12758
  leaveFrom: "transform opacity-100 scale-100",
12724
12759
  leaveTo: "transform opacity-0 scale-95"
12725
12760
  },
12726
- /* @__PURE__ */ React.createElement(react$1.Popover.Panel, { className: "z-30 absolute origin-top-right right-0" }, /* @__PURE__ */ React.createElement("div", { className: "mt-2 -mr-1 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, /* @__PURE__ */ React.createElement("div", { className: "py-1" }, /* @__PURE__ */ React.createElement(
12761
+ /* @__PURE__ */ React.createElement(react$1.PopoverPanel, { className: "z-30 absolute origin-top-right right-0" }, /* @__PURE__ */ React.createElement("div", { className: "mt-2 -mr-1 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, /* @__PURE__ */ React.createElement("div", { className: "py-1" }, /* @__PURE__ */ React.createElement(
12727
12762
  "span",
12728
12763
  {
12729
12764
  onClick: onOpen,
@@ -13660,6 +13695,12 @@ var __publicField = (obj, key, value) => {
13660
13695
  icon: Icons.h5,
13661
13696
  label: "Heading 5",
13662
13697
  value: plateHeading.ELEMENT_H5
13698
+ },
13699
+ {
13700
+ description: "Heading 6",
13701
+ icon: Icons.h6,
13702
+ label: "Heading 6",
13703
+ value: plateHeading.ELEMENT_H6
13663
13704
  }
13664
13705
  ];
13665
13706
  const defaultItem$1 = items$1.find((item) => item.value === plateParagraph.ELEMENT_PARAGRAPH) || items$1[0];
@@ -13858,12 +13899,29 @@ var __publicField = (obj, key, value) => {
13858
13899
  }
13859
13900
  const EmbedButton = ({ editor, templates }) => {
13860
13901
  const [open2, setOpen] = React.useState(false);
13902
+ const [filteredTemplates, setFilteredTemplates] = React.useState(templates);
13903
+ const filterChange = (e) => {
13904
+ const filterText = e.target.value.toLowerCase();
13905
+ setFilteredTemplates(
13906
+ templates.filter(
13907
+ (template) => template.name.toLowerCase().includes(filterText)
13908
+ )
13909
+ );
13910
+ };
13861
13911
  return /* @__PURE__ */ React.createElement(DropdownMenu, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, { className: "inline-flex items-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg:not([data-icon])]:size-5 h-9 px-2 bg-transparent hover:bg-muted hover:text-muted-foreground aria-checked:bg-accent aria-checked:text-accent-foreground my-1 justify-between pr-1" }, /* @__PURE__ */ React.createElement("span", { className: "flex" }, "Embed"), /* @__PURE__ */ React.createElement(
13862
13912
  PlusIcon,
13863
13913
  {
13864
13914
  className: `origin-center transition-all ease-out duration-150 ${open2 ? "rotate-45" : ""}`
13865
13915
  }
13866
- )), /* @__PURE__ */ React.createElement(DropdownMenuContent, null, /* @__PURE__ */ React.createElement(DropdownMenuLabel, null, "Templates"), /* @__PURE__ */ React.createElement(DropdownMenuSeparator, null), templates.map((template) => /* @__PURE__ */ React.createElement(
13916
+ )), /* @__PURE__ */ React.createElement(DropdownMenuContent, { className: "max-h-48 overflow-y-auto" }, templates.length > 10 && /* @__PURE__ */ React.createElement(
13917
+ "input",
13918
+ {
13919
+ type: "text",
13920
+ placeholder: "Filter templates...",
13921
+ className: "w-full p-2 border border-gray-300 rounded-md",
13922
+ onChange: filterChange
13923
+ }
13924
+ ), /* @__PURE__ */ React.createElement(DropdownMenuSeparator, null), filteredTemplates.map((template) => /* @__PURE__ */ React.createElement(
13867
13925
  DropdownMenuItem,
13868
13926
  {
13869
13927
  key: template.name,
@@ -14061,6 +14119,12 @@ var __publicField = (obj, key, value) => {
14061
14119
  icon: Icons.h5,
14062
14120
  label: "Heading 5",
14063
14121
  value: plateHeading.ELEMENT_H5
14122
+ },
14123
+ {
14124
+ description: "Heading 6",
14125
+ icon: Icons.h6,
14126
+ label: "Heading 6",
14127
+ value: plateHeading.ELEMENT_H6
14064
14128
  }
14065
14129
  ];
14066
14130
  const defaultItem = items.find((item) => item.value === plateParagraph.ELEMENT_PARAGRAPH);
@@ -16815,120 +16879,176 @@ var __publicField = (obj, key, value) => {
16815
16879
  "že"
16816
16880
  ];
16817
16881
  const dan = [
16818
- "er",
16819
- "jeg",
16882
+ "ad",
16883
+ "af",
16884
+ "aldrig",
16885
+ "alle",
16886
+ "alt",
16887
+ "anden",
16888
+ "andet",
16889
+ "andre",
16890
+ "at",
16891
+ "bare",
16892
+ "begge",
16893
+ "blev",
16894
+ "blive",
16895
+ "bliver",
16896
+ "da",
16897
+ "de",
16898
+ "dem",
16899
+ "den",
16900
+ "denne",
16901
+ "der",
16902
+ "deres",
16820
16903
  "det",
16904
+ "dette",
16905
+ "dig",
16906
+ "din",
16907
+ "dine",
16908
+ "disse",
16909
+ "dit",
16910
+ "dog",
16821
16911
  "du",
16822
- "ikke",
16823
- "i",
16824
- "at",
16912
+ "efter",
16913
+ "ej",
16914
+ "eller",
16825
16915
  "en",
16826
- "og",
16827
- "har",
16828
- "vi",
16829
- "til",
16830
- "",
16831
- "hvad",
16832
- "med",
16833
- "mig",
16834
- "",
16916
+ "end",
16917
+ "ene",
16918
+ "eneste",
16919
+ "enhver",
16920
+ "er",
16921
+ "et",
16922
+ "far",
16923
+ "fem",
16924
+ "fik",
16925
+ "fire",
16926
+ "flere",
16927
+ "fleste",
16835
16928
  "for",
16836
- "de",
16837
- "dig",
16838
- "der",
16839
- "den",
16929
+ "fordi",
16930
+ "forrige",
16931
+ "fra",
16932
+ "",
16933
+ "får",
16934
+ "før",
16935
+ "god",
16936
+ "godt",
16937
+ "ham",
16840
16938
  "han",
16841
- "kan",
16842
- "af",
16843
- "vil",
16844
- "var",
16939
+ "hans",
16940
+ "har",
16941
+ "havde",
16942
+ "have",
16943
+ "hej",
16944
+ "helt",
16945
+ "hende",
16946
+ "hendes",
16845
16947
  "her",
16846
- "et",
16847
- "skal",
16848
- "ved",
16849
- "nu",
16850
- "men",
16851
- "om",
16852
- "ja",
16853
- "som",
16854
- "nej",
16855
- "min",
16856
- "noget",
16857
- "ham",
16948
+ "hos",
16858
16949
  "hun",
16859
- "bare",
16860
- "kom",
16861
- "være",
16862
- "din",
16863
- "hvor",
16864
- "dem",
16865
- "ud",
16866
- "os",
16950
+ "hvad",
16951
+ "hvem",
16952
+ "hver",
16953
+ "hvilken",
16867
16954
  "hvis",
16868
- "",
16869
- "se",
16870
- "godt",
16871
- "have",
16872
- "fra",
16873
- "ville",
16874
- "okay",
16875
- "lige",
16876
- "op",
16877
- "alle",
16878
- "lad",
16879
- "hvorfor",
16880
- "sig",
16955
+ "hvor",
16881
16956
  "hvordan",
16882
- "",
16883
- "kunne",
16884
- "eller",
16885
- "hvem",
16886
- "man",
16887
- "bliver",
16888
- "havde",
16889
- "da",
16957
+ "hvorfor",
16958
+ "hvornår",
16959
+ "i",
16960
+ "ikke",
16961
+ "ind",
16890
16962
  "ingen",
16891
- "efter",
16892
- "når",
16893
- "alt",
16963
+ "intet",
16964
+ "ja",
16965
+ "jeg",
16966
+ "jer",
16967
+ "jeres",
16894
16968
  "jo",
16895
- "to",
16896
- "mit",
16897
- "ind",
16898
- "hej",
16899
- "aldrig",
16969
+ "kan",
16970
+ "kom",
16971
+ "komme",
16972
+ "kommer",
16973
+ "kun",
16974
+ "kunne",
16975
+ "lad",
16976
+ "lav",
16900
16977
  "lidt",
16978
+ "lige",
16979
+ "lille",
16980
+ "man",
16981
+ "mand",
16982
+ "mange",
16983
+ "med",
16984
+ "meget",
16985
+ "men",
16986
+ "mens",
16987
+ "mere",
16988
+ "mig",
16989
+ "min",
16990
+ "mine",
16991
+ "mit",
16992
+ "mod",
16993
+ "må",
16994
+ "ned",
16995
+ "nej",
16996
+ "ni",
16901
16997
  "nogen",
16902
- "over",
16998
+ "noget",
16999
+ "nogle",
17000
+ "nu",
17001
+ "ny",
17002
+ "nyt",
17003
+ "når",
17004
+ "nær",
17005
+ "næste",
17006
+ "næsten",
17007
+ "og",
16903
17008
  "også",
16904
- "mand",
16905
- "far",
16906
- "skulle",
17009
+ "okay",
17010
+ "om",
17011
+ "op",
17012
+ "os",
17013
+ "otte",
17014
+ "over",
17015
+ "på",
17016
+ "se",
17017
+ "seks",
16907
17018
  "selv",
16908
- "får",
16909
- "hans",
16910
17019
  "ser",
16911
- "vores",
16912
- "jer",
16913
- "sådan",
16914
- "dit",
16915
- "kun",
16916
- "deres",
16917
- "ned",
16918
- "mine",
16919
- "komme",
16920
- "tage",
16921
- "denne",
17020
+ "ses",
17021
+ "sig",
16922
17022
  "sige",
16923
- "dette",
16924
- "blive",
16925
- "helt",
16926
- "fordi",
16927
- "end",
17023
+ "sin",
17024
+ "sine",
17025
+ "sit",
17026
+ "skal",
17027
+ "skulle",
17028
+ "som",
17029
+ "stor",
17030
+ "store",
17031
+ "syv",
17032
+ "så",
17033
+ "sådan",
16928
17034
  "tag",
16929
- "før",
16930
- "fik",
16931
- "dine"
17035
+ "tage",
17036
+ "thi",
17037
+ "ti",
17038
+ "til",
17039
+ "to",
17040
+ "tre",
17041
+ "ud",
17042
+ "under",
17043
+ "var",
17044
+ "ved",
17045
+ "vi",
17046
+ "vil",
17047
+ "ville",
17048
+ "vor",
17049
+ "vores",
17050
+ "være",
17051
+ "været"
16932
17052
  ];
16933
17053
  const nld = [
16934
17054
  "aan",
@@ -19312,7 +19432,7 @@ var __publicField = (obj, key, value) => {
19312
19432
  "alóluk",
19313
19433
  "alólunk",
19314
19434
  "amely",
19315
- "amelybol",
19435
+ "amelyből",
19316
19436
  "amelyek",
19317
19437
  "amelyekben",
19318
19438
  "amelyeket",
@@ -26355,125 +26475,424 @@ var __publicField = (obj, key, value) => {
26355
26475
  "upande"
26356
26476
  ];
26357
26477
  const swe = [
26358
- "jag",
26478
+ "aderton",
26479
+ "adertonde",
26480
+ "adjö",
26481
+ "aldrig",
26482
+ "alla",
26483
+ "allas",
26484
+ "allt",
26485
+ "alltid",
26486
+ "alltså",
26487
+ "andra",
26488
+ "andras",
26489
+ "annan",
26490
+ "annat",
26491
+ "artonde",
26492
+ "artonn",
26493
+ "att",
26494
+ "av",
26495
+ "bakom",
26496
+ "bara",
26497
+ "behöva",
26498
+ "behövas",
26499
+ "behövde",
26500
+ "behövt",
26501
+ "beslut",
26502
+ "beslutat",
26503
+ "beslutit",
26504
+ "bland",
26505
+ "blev",
26506
+ "bli",
26507
+ "blir",
26508
+ "blivit",
26509
+ "bort",
26510
+ "borta",
26511
+ "bra",
26512
+ "bäst",
26513
+ "bättre",
26514
+ "båda",
26515
+ "bådas",
26516
+ "dag",
26517
+ "dagar",
26518
+ "dagarna",
26519
+ "dagen",
26520
+ "de",
26521
+ "del",
26522
+ "delen",
26523
+ "dem",
26524
+ "den",
26525
+ "denna",
26526
+ "deras",
26527
+ "dess",
26528
+ "dessa",
26359
26529
  "det",
26360
- "är",
26530
+ "detta",
26531
+ "dig",
26532
+ "din",
26533
+ "dina",
26534
+ "dit",
26535
+ "ditt",
26536
+ "dock",
26537
+ "dom",
26361
26538
  "du",
26362
- "inte",
26363
- "att",
26539
+ "där",
26540
+ "därför",
26541
+ "då",
26542
+ "e",
26543
+ "efter",
26544
+ "eftersom",
26545
+ "ej",
26546
+ "elfte",
26547
+ "eller",
26548
+ "elva",
26549
+ "emot",
26364
26550
  "en",
26365
- "och",
26366
- "har",
26367
- "vi",
26368
- "",
26369
- "i",
26551
+ "enkel",
26552
+ "enkelt",
26553
+ "enkla",
26554
+ "enligt",
26555
+ "ens",
26556
+ "er",
26557
+ "era",
26558
+ "ers",
26559
+ "ert",
26560
+ "ett",
26561
+ "ettusen",
26562
+ "fanns",
26563
+ "fem",
26564
+ "femte",
26565
+ "femtio",
26566
+ "femtionde",
26567
+ "femton",
26568
+ "femtonde",
26569
+ "fick",
26570
+ "fin",
26571
+ "finnas",
26572
+ "finns",
26573
+ "fjorton",
26574
+ "fjortonde",
26575
+ "fjärde",
26576
+ "fler",
26577
+ "flera",
26578
+ "flesta",
26579
+ "fram",
26580
+ "framför",
26581
+ "från",
26582
+ "fyra",
26583
+ "fyrtio",
26584
+ "fyrtionde",
26585
+ "få",
26586
+ "får",
26587
+ "fått",
26588
+ "följande",
26370
26589
  "för",
26590
+ "före",
26591
+ "förlåt",
26592
+ "förra",
26593
+ "första",
26594
+ "genast",
26595
+ "genom",
26596
+ "gick",
26597
+ "gjorde",
26598
+ "gjort",
26599
+ "god",
26600
+ "goda",
26601
+ "godare",
26602
+ "godast",
26603
+ "gott",
26604
+ "gälla",
26605
+ "gäller",
26606
+ "gällt",
26607
+ "gärna",
26608
+ "gå",
26609
+ "går",
26610
+ "gått",
26611
+ "gör",
26612
+ "göra",
26613
+ "ha",
26614
+ "hade",
26615
+ "haft",
26371
26616
  "han",
26372
- "vad",
26373
- "med",
26374
- "mig",
26375
- "som",
26617
+ "hans",
26618
+ "har",
26619
+ "heller",
26620
+ "hellre",
26621
+ "helst",
26622
+ "helt",
26623
+ "henne",
26624
+ "hennes",
26625
+ "hit",
26626
+ "hon",
26627
+ "honom",
26628
+ "hundra",
26629
+ "hundraen",
26630
+ "hundraett",
26631
+ "hur",
26376
26632
  "här",
26377
- "om",
26378
- "dig",
26379
- "var",
26380
- "den",
26381
- "",
26382
- "till",
26633
+ "hög",
26634
+ "höger",
26635
+ "högre",
26636
+ "högst",
26637
+ "i",
26638
+ "ibland",
26639
+ "icke",
26640
+ "idag",
26641
+ "igen",
26642
+ "igår",
26643
+ "imorgon",
26644
+ "in",
26645
+ "inför",
26646
+ "inga",
26647
+ "ingen",
26648
+ "ingenting",
26649
+ "inget",
26650
+ "innan",
26651
+ "inne",
26652
+ "inom",
26653
+ "inte",
26654
+ "inuti",
26655
+ "ja",
26656
+ "jag",
26657
+ "jo",
26658
+ "ju",
26659
+ "just",
26660
+ "jämfört",
26383
26661
  "kan",
26384
- "de",
26385
- "ni",
26386
- "ska",
26387
- "ett",
26662
+ "kanske",
26663
+ "knappast",
26664
+ "kom",
26665
+ "komma",
26666
+ "kommer",
26667
+ "kommit",
26668
+ "kr",
26669
+ "kunde",
26670
+ "kunna",
26671
+ "kunnat",
26672
+ "kvar",
26673
+ "legat",
26674
+ "ligga",
26675
+ "ligger",
26676
+ "lika",
26677
+ "likställd",
26678
+ "likställda",
26679
+ "lilla",
26680
+ "lite",
26681
+ "liten",
26682
+ "litet",
26683
+ "länge",
26684
+ "längre",
26685
+ "längst",
26686
+ "lätt",
26687
+ "lättare",
26688
+ "lättast",
26689
+ "långsam",
26690
+ "långsammare",
26691
+ "långsammast",
26692
+ "långsamt",
26693
+ "långt",
26694
+ "låt",
26695
+ "man",
26696
+ "med",
26697
+ "mej",
26698
+ "mellan",
26388
26699
  "men",
26389
- "av",
26390
- "vill",
26391
- "nu",
26392
- "ja",
26393
- "nej",
26394
- "bara",
26395
- "hon",
26396
- "hur",
26700
+ "mer",
26701
+ "mera",
26702
+ "mest",
26703
+ "mig",
26397
26704
  "min",
26398
- "där",
26399
- "honom",
26400
- "kom",
26401
- "din",
26402
- "",
26705
+ "mina",
26706
+ "mindre",
26707
+ "minst",
26708
+ "mitt",
26709
+ "mittemot",
26710
+ "mot",
26711
+ "mycket",
26712
+ "många",
26713
+ "måste",
26714
+ "möjlig",
26715
+ "möjligen",
26716
+ "möjligt",
26717
+ "möjligtvis",
26718
+ "ned",
26719
+ "nederst",
26720
+ "nedersta",
26721
+ "nedre",
26722
+ "nej",
26723
+ "ner",
26724
+ "ni",
26725
+ "nio",
26726
+ "nionde",
26727
+ "nittio",
26728
+ "nittionde",
26729
+ "nitton",
26730
+ "nittonde",
26731
+ "nog",
26732
+ "noll",
26733
+ "nr",
26734
+ "nu",
26735
+ "nummer",
26403
26736
  "när",
26404
- "ha",
26405
- "er",
26406
- "ta",
26407
- "ut",
26408
- "får",
26409
- "man",
26410
- "vara",
26737
+ "nästa",
26738
+ "någon",
26739
+ "någonting",
26740
+ "något",
26741
+ "några",
26742
+ "nån",
26743
+ "nånting",
26744
+ "nåt",
26745
+ "nödvändig",
26746
+ "nödvändiga",
26747
+ "nödvändigt",
26748
+ "nödvändigtvis",
26749
+ "och",
26750
+ "också",
26751
+ "ofta",
26752
+ "oftast",
26753
+ "olika",
26754
+ "olikt",
26755
+ "om",
26411
26756
  "oss",
26412
- "dem",
26413
- "eller",
26414
- "varför",
26415
- "alla",
26416
- "från",
26417
- "upp",
26418
- "igen",
26757
+ "",
26758
+ "rakt",
26759
+ "redan",
26760
+ "rätt",
26419
26761
  "sa",
26420
- "hade",
26421
- "allt",
26422
- "in",
26762
+ "sade",
26763
+ "sagt",
26764
+ "samma",
26765
+ "sedan",
26766
+ "senare",
26767
+ "senast",
26768
+ "sent",
26769
+ "sex",
26770
+ "sextio",
26771
+ "sextionde",
26772
+ "sexton",
26773
+ "sextonde",
26423
26774
  "sig",
26424
- "ingen",
26425
- "henne",
26426
- "vem",
26427
- "mitt",
26428
- "nåt",
26429
- "blir",
26430
- "än",
26431
- "bli",
26432
- "ju",
26433
- "två",
26775
+ "sin",
26776
+ "sina",
26777
+ "sist",
26778
+ "sista",
26779
+ "siste",
26780
+ "sitt",
26781
+ "sitta",
26782
+ "sju",
26783
+ "sjunde",
26784
+ "sjuttio",
26785
+ "sjuttionde",
26786
+ "sjutton",
26787
+ "sjuttonde",
26788
+ "själv",
26789
+ "sjätte",
26790
+ "ska",
26791
+ "skall",
26792
+ "skulle",
26793
+ "slutligen",
26794
+ "små",
26795
+ "smått",
26796
+ "snart",
26797
+ "som",
26798
+ "stor",
26799
+ "stora",
26800
+ "stort",
26801
+ "större",
26802
+ "störst",
26803
+ "säga",
26804
+ "säger",
26805
+ "sämre",
26806
+ "sämst",
26807
+ "så",
26808
+ "sådan",
26809
+ "sådana",
26810
+ "sådant",
26811
+ "ta",
26812
+ "tack",
26434
26813
  "tar",
26435
- "hans",
26436
- "ditt",
26437
- "mina",
26438
- "åt",
26439
- "väl",
26440
- "också",
26441
- "nån",
26442
- "låt",
26443
- "detta",
26814
+ "tidig",
26815
+ "tidigare",
26816
+ "tidigast",
26817
+ "tidigt",
26818
+ "till",
26819
+ "tills",
26820
+ "tillsammans",
26821
+ "tio",
26822
+ "tionde",
26823
+ "tjugo",
26824
+ "tjugoen",
26825
+ "tjugoett",
26826
+ "tjugonde",
26827
+ "tjugotre",
26828
+ "tjugotvå",
26829
+ "tjungo",
26830
+ "tolfte",
26831
+ "tolv",
26832
+ "tre",
26833
+ "tredje",
26834
+ "trettio",
26835
+ "trettionde",
26836
+ "tretton",
26837
+ "trettonde",
26838
+ "två",
26839
+ "tvåhundra",
26840
+ "under",
26841
+ "upp",
26842
+ "ur",
26843
+ "ursäkt",
26844
+ "ut",
26845
+ "utan",
26846
+ "utanför",
26847
+ "ute",
26444
26848
  "va",
26445
- "dina",
26446
- "dom",
26447
- "blev",
26448
- "inga",
26449
- "sin",
26450
- "just",
26451
- "många",
26849
+ "vad",
26850
+ "var",
26851
+ "vara",
26852
+ "varför",
26853
+ "varifrån",
26854
+ "varit",
26855
+ "varje",
26856
+ "varken",
26857
+ "vars",
26858
+ "varsågod",
26452
26859
  "vart",
26860
+ "vem",
26861
+ "vems",
26862
+ "verkligen",
26863
+ "vi",
26864
+ "vid",
26865
+ "vidare",
26866
+ "viktig",
26867
+ "viktigare",
26868
+ "viktigast",
26869
+ "viktigt",
26870
+ "vilka",
26871
+ "vilkas",
26453
26872
  "vilken",
26454
- "ur",
26455
- "ens",
26456
- "sitt",
26457
- "e",
26458
- "jo",
26459
- "era",
26460
- "deras",
26461
- "fem",
26462
- "sex",
26463
- "denna",
26464
26873
  "vilket",
26465
- "fyra",
26874
+ "vill",
26875
+ "väl",
26876
+ "vänster",
26877
+ "vänstra",
26878
+ "värre",
26879
+ "vår",
26880
+ "våra",
26466
26881
  "vårt",
26467
- "emot",
26468
- "tio",
26469
- "ert",
26470
- "sju",
26882
+ "än",
26883
+ "ännu",
26884
+ "är",
26885
+ "även",
26886
+ "åt",
26887
+ "åtminstone",
26471
26888
  "åtta",
26472
- "nånting",
26473
- "ned",
26474
- "ers",
26475
- "nio",
26476
- "mej"
26889
+ "åttio",
26890
+ "åttionde",
26891
+ "åttonde",
26892
+ "över",
26893
+ "övermorgon",
26894
+ "överst",
26895
+ "övre"
26477
26896
  ];
26478
26897
  const tha = [
26479
26898
  "กล่าว",
@@ -27794,15 +28213,11 @@ var __publicField = (obj, key, value) => {
27794
28213
  "kwakukhona",
27795
28214
  "ngelinye"
27796
28215
  ];
27797
- const defaultStopwords = eng;
27798
- const removeStopwords = function(tokens, stopwords) {
27799
- stopwords = stopwords || defaultStopwords;
27800
- if (typeof tokens !== "object" || typeof stopwords !== "object") {
28216
+ const removeStopwords = (tokens, stopwords = eng) => {
28217
+ if (!Array.isArray(tokens) || !Array.isArray(stopwords)) {
27801
28218
  throw new Error("expected Arrays try: removeStopwords(Array[, Array])");
27802
28219
  }
27803
- return tokens.filter(function(value) {
27804
- return stopwords.indexOf(value.toLowerCase()) === -1;
27805
- });
28220
+ return tokens.filter((x) => !stopwords.includes(x.toLowerCase()));
27806
28221
  };
27807
28222
  const sw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
27808
28223
  __proto__: null,
@@ -30128,9 +30543,8 @@ This will work when developing locally but NOT when deployed to production.
30128
30543
  )
30129
30544
  }
30130
30545
  ), !renderDesktopNav && /* @__PURE__ */ React.createElement(react$1.Transition, { show: menuIsOpen }, /* @__PURE__ */ React.createElement(
30131
- react$1.Transition.Child,
30546
+ react$1.TransitionChild,
30132
30547
  {
30133
- as: React.Fragment,
30134
30548
  enter: "transform transition-all ease-out duration-300",
30135
30549
  enterFrom: "opacity-0 -translate-x-full",
30136
30550
  enterTo: "opacity-100 translate-x-0",
@@ -30198,9 +30612,8 @@ This will work when developing locally but NOT when deployed to production.
30198
30612
  ))
30199
30613
  ))
30200
30614
  ), /* @__PURE__ */ React.createElement(
30201
- react$1.Transition.Child,
30615
+ react$1.TransitionChild,
30202
30616
  {
30203
- as: React.Fragment,
30204
30617
  enter: "ease-out duration-300",
30205
30618
  enterFrom: "opacity-0",
30206
30619
  enterTo: "opacity-80",
@@ -30226,7 +30639,7 @@ This will work when developing locally but NOT when deployed to production.
30226
30639
  onClick: () => {
30227
30640
  setMenuIsOpen(true);
30228
30641
  },
30229
- className: `pointer-events-auto -ml-px absolute left-0 z-50 ${isLocalMode ? `top-10` : `top-4`}`
30642
+ className: `pointer-events-auto -ml-px absolute left-0 z-50 ${isLocalMode ? "top-10" : "top-4"}`
30230
30643
  },
30231
30644
  /* @__PURE__ */ React.createElement(BiMenu, { className: "h-7 w-auto" })
30232
30645
  ));
@@ -30653,10 +31066,9 @@ This will work when developing locally but NOT when deployed to production.
30653
31066
  folder,
30654
31067
  collectionName
30655
31068
  }) => {
30656
- return /* @__PURE__ */ React.createElement(react$1.Menu, { as: "div", className: "relative inline-block text-left" }, () => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(react$1.Menu.Button, { className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out shadow text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 text-sm h-10 px-6" }, "Create New ", /* @__PURE__ */ React.createElement(BiPlus, { className: "w-5 h-full ml-1 opacity-70" }))), /* @__PURE__ */ React.createElement(
31069
+ return /* @__PURE__ */ React.createElement(react$1.Menu, { as: "div", className: "relative inline-block text-left" }, () => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(react$1.MenuButton, { className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out shadow text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 text-sm h-10 px-6" }, "Create New ", /* @__PURE__ */ React.createElement(BiPlus, { className: "w-5 h-full ml-1 opacity-70" }))), /* @__PURE__ */ React.createElement(
30657
31070
  react$1.Transition,
30658
31071
  {
30659
- as: React.Fragment,
30660
31072
  enter: "transition ease-out duration-100",
30661
31073
  enterFrom: "transform opacity-0 scale-95",
30662
31074
  enterTo: "transform opacity-100 scale-100",
@@ -30664,7 +31076,7 @@ This will work when developing locally but NOT when deployed to production.
30664
31076
  leaveFrom: "transform opacity-100 scale-100",
30665
31077
  leaveTo: "transform opacity-0 scale-95"
30666
31078
  },
30667
- /* @__PURE__ */ React.createElement(react$1.Menu.Items, { className: "origin-top-right absolute right-0 mt-2 z-menu w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, /* @__PURE__ */ React.createElement("div", { className: "py-1" }, templates.map((template) => /* @__PURE__ */ React.createElement(react$1.Menu.Item, { key: `${template.label}-${template.name}` }, ({ active }) => /* @__PURE__ */ React.createElement(
31079
+ /* @__PURE__ */ React.createElement(react$1.MenuItems, { className: "origin-top-right absolute right-0 mt-2 z-menu w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, /* @__PURE__ */ React.createElement("div", { className: "py-1" }, templates.map((template) => /* @__PURE__ */ React.createElement(react$1.MenuItem, { key: `${template.label}-${template.name}` }, ({ focus }) => /* @__PURE__ */ React.createElement(
30668
31080
  reactRouterDom.Link,
30669
31081
  {
30670
31082
  to: `/${folder.fullyQualifiedName ? [
@@ -30680,7 +31092,7 @@ This will work when developing locally but NOT when deployed to production.
30680
31092
  collectionName,
30681
31093
  template.name
30682
31094
  ].join("/")}`,
30683
- className: `w-full text-md px-4 py-2 tracking-wide flex items-center transition ease-out duration-100 ${active ? "text-blue-600 opacity-100 bg-gray-50" : "opacity-80 text-gray-600"}`
31095
+ className: `w-full text-md px-4 py-2 tracking-wide flex items-center transition ease-out duration-100 ${focus ? "text-blue-600 opacity-100 bg-gray-50" : "opacity-80 text-gray-600"}`
30684
31096
  },
30685
31097
  template.label
30686
31098
  )))))
@@ -30853,7 +31265,7 @@ This will work when developing locally but NOT when deployed to production.
30853
31265
  CreateBranchModel,
30854
31266
  {
30855
31267
  crudType: "delete",
30856
- relativePath: collectionExtra.path + "/" + vars.relativePath,
31268
+ relativePath: `${collectionExtra.path}/${vars.relativePath}`,
30857
31269
  values: vars,
30858
31270
  close: () => setDeleteModalOpen(false),
30859
31271
  safeSubmit: async () => {
@@ -30960,7 +31372,7 @@ This will work when developing locally but NOT when deployed to production.
30960
31372
  name: ""
30961
31373
  })
30962
31374
  },
30963
- ...fields.map((x) => [
31375
+ ...fields.flatMap((x) => [
30964
31376
  {
30965
31377
  label: (x.label || x.name) + (x.type === "datetime" ? " (Oldest First)" : " (Ascending)"),
30966
31378
  value: JSON.stringify({
@@ -30975,7 +31387,7 @@ This will work when developing locally but NOT when deployed to production.
30975
31387
  order: "desc"
30976
31388
  })
30977
31389
  }
30978
- ]).flat()
31390
+ ])
30979
31391
  ],
30980
31392
  input: {
30981
31393
  id: "sort",
@@ -31571,7 +31983,7 @@ This will work when developing locally but NOT when deployed to production.
31571
31983
  mutationInfo,
31572
31984
  customDefaults
31573
31985
  }) => {
31574
- var _a, _b, _c, _d, _e, _f;
31986
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
31575
31987
  const navigate = reactRouterDom.useNavigate();
31576
31988
  const [formIsPristine, setFormIsPristine] = React.useState(true);
31577
31989
  const schema = cms.api.tina.schema;
@@ -31601,8 +32013,53 @@ This will work when developing locally but NOT when deployed to production.
31601
32013
  const defaultItem2 = customDefaults || // @ts-ignore internal types aren't up to date
31602
32014
  ((_d = template.ui) == null ? void 0 : _d.defaultItem) || // @ts-ignore
31603
32015
  (template == null ? void 0 : template.defaultItem) || {};
32016
+ const filenameField = {
32017
+ name: "filename",
32018
+ label: "Filename",
32019
+ component: slugFunction ? wrapFieldsWithMeta(({ field, input, meta }) => {
32020
+ var _a2, _b2;
32021
+ return /* @__PURE__ */ React.createElement(
32022
+ FilenameInput,
32023
+ {
32024
+ readOnly: (_b2 = (_a2 = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b2.readonly,
32025
+ ...input
32026
+ }
32027
+ );
32028
+ }) : "text",
32029
+ disabled: (_f = (_e = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _e.filename) == null ? void 0 : _f.readonly,
32030
+ description: ((_h = (_g = collection.ui) == null ? void 0 : _g.filename) == null ? void 0 : _h.description) ? /* @__PURE__ */ React.createElement(
32031
+ "span",
32032
+ {
32033
+ dangerouslySetInnerHTML: { __html: collection.ui.filename.description }
32034
+ }
32035
+ ) : /* @__PURE__ */ React.createElement("span", null, "A unique filename for the content.", /* @__PURE__ */ React.createElement("br", null), "Examples: ", /* @__PURE__ */ React.createElement("code", null, "My_Document"), ", ", /* @__PURE__ */ React.createElement("code", null, "My_Document.en"), ",", " ", /* @__PURE__ */ React.createElement("code", null, "sub-folder/My_Document")),
32036
+ placeholder: "My_Document",
32037
+ validate: (value, allValues, meta) => {
32038
+ var _a2, _b2;
32039
+ if (!value) {
32040
+ if (meta.dirty) {
32041
+ return "Required";
32042
+ }
32043
+ return true;
32044
+ }
32045
+ const isValid = /[\.\-_\/a-zA-Z0-9]*$/.test(value);
32046
+ if (value && !isValid) {
32047
+ return "Must contain only a-z, A-Z, 0-9, -, _, ., or /.";
32048
+ }
32049
+ if (((_a2 = schemaCollection.match) == null ? void 0 : _a2.exclude) || ((_b2 = schemaCollection.match) == null ? void 0 : _b2.include)) {
32050
+ const filePath = `${schemaTools.normalizePath(schemaCollection.path)}/${value}.${schemaCollection.format || "md"}`;
32051
+ const match = schema == null ? void 0 : schema.matchFiles({
32052
+ files: [filePath],
32053
+ collection: schemaCollection
32054
+ });
32055
+ if ((match == null ? void 0 : match.length) === 0) {
32056
+ return `The filename "${value}" is not allowed for this collection.`;
32057
+ }
32058
+ }
32059
+ }
32060
+ };
31604
32061
  const form = React.useMemo(() => {
31605
- var _a2, _b2;
32062
+ var _a2, _b2, _c2, _d2;
31606
32063
  const folderName = folder.fullyQualifiedName ? folder.name : "";
31607
32064
  return new Form({
31608
32065
  crudType: "create",
@@ -31626,50 +32083,10 @@ This will work when developing locally but NOT when deployed to production.
31626
32083
  id: schemaCollection.path + folderName + `/new-post.${schemaCollection.format || "md"}`,
31627
32084
  label: "form",
31628
32085
  fields: [
32086
+ ((_b2 = (_a2 = collection.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b2.showFirst) && filenameField,
31629
32087
  ...formInfo.fields,
31630
- {
31631
- name: "filename",
31632
- label: "Filename",
31633
- component: slugFunction ? wrapFieldsWithMeta(({ field, input, meta }) => {
31634
- var _a3, _b3;
31635
- return /* @__PURE__ */ React.createElement(
31636
- FilenameInput,
31637
- {
31638
- readOnly: (_b3 = (_a3 = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _a3.filename) == null ? void 0 : _b3.readonly,
31639
- ...input
31640
- }
31641
- );
31642
- }) : "text",
31643
- disabled: (_b2 = (_a2 = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b2.readonly,
31644
- description: /* @__PURE__ */ React.createElement("span", null, "A unique filename for the content.", /* @__PURE__ */ React.createElement("br", null), "Examples: ", /* @__PURE__ */ React.createElement("code", null, "My_Document"), ", ", /* @__PURE__ */ React.createElement("code", null, "My_Document.en"), ",", " ", /* @__PURE__ */ React.createElement("code", null, "sub-folder/My_Document")),
31645
- placeholder: "My_Document",
31646
- validate: (value, allValues, meta) => {
31647
- var _a3, _b3;
31648
- if (!value) {
31649
- if (meta.dirty) {
31650
- return "Required";
31651
- }
31652
- return true;
31653
- }
31654
- const isValid = /[\.\-_\/a-zA-Z0-9]*$/.test(value);
31655
- if (value && !isValid) {
31656
- return "Must contain only a-z, A-Z, 0-9, -, _, ., or /.";
31657
- }
31658
- if (((_a3 = schemaCollection.match) == null ? void 0 : _a3.exclude) || ((_b3 = schemaCollection.match) == null ? void 0 : _b3.include)) {
31659
- const filePath = `${schemaTools.normalizePath(
31660
- schemaCollection.path
31661
- )}/${value}.${schemaCollection.format || "md"}`;
31662
- const match = schema == null ? void 0 : schema.matchFiles({
31663
- files: [filePath],
31664
- collection: schemaCollection
31665
- });
31666
- if ((match == null ? void 0 : match.length) === 0) {
31667
- return `The filename "${value}" is not allowed for this collection.`;
31668
- }
31669
- }
31670
- }
31671
- }
31672
- ],
32088
+ !((_d2 = (_c2 = collection.ui) == null ? void 0 : _c2.filename) == null ? void 0 : _d2.showFirst) && filenameField
32089
+ ].filter((x) => !!x),
31673
32090
  onSubmit: async (values) => {
31674
32091
  try {
31675
32092
  const folderName2 = folder.fullyQualifiedName ? folder.name : "";
@@ -31724,7 +32141,7 @@ This will work when developing locally but NOT when deployed to production.
31724
32141
  const activeForm = cms.state.forms.find(
31725
32142
  ({ tinaForm }) => tinaForm.id === form.id
31726
32143
  );
31727
- return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, ((_f = (_e = cms == null ? void 0 : cms.api) == null ? void 0 : _e.tina) == null ? void 0 : _f.isLocalMode) ? /* @__PURE__ */ React.createElement(LocalWarning, null) : /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement(
32144
+ return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, ((_j = (_i = cms == null ? void 0 : cms.api) == null ? void 0 : _i.tina) == null ? void 0 : _j.isLocalMode) ? /* @__PURE__ */ React.createElement(LocalWarning, null) : /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement(
31728
32145
  "div",
31729
32146
  {
31730
32147
  className: `pt-10 xl:pt-3 pb-10 xl:pb-4 px-20 xl:px-12 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center`