tinacms 0.0.0-d80714b-20241205222511 → 0.0.0-db8aa8e-20250228034006

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.mjs CHANGED
@@ -6,21 +6,21 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  import { z } from "zod";
8
8
  import * as React from "react";
9
- import React__default, { useState, useCallback, useEffect, useRef, createContext, forwardRef, useContext, useMemo, startTransition, createElement, Component } from "react";
10
- import { createPortal, findDOMNode } from "react-dom";
9
+ import React__default, { useState, useCallback, useEffect, useRef, createContext, forwardRef, useContext, useMemo, startTransition } from "react";
10
+ import { createPortal } from "react-dom";
11
11
  import { withRef, cn as cn$1, withVariants, withProps, withCn, createPrimitiveElement } from "@udecode/cn";
12
- import { toggleList, ELEMENT_UL, ELEMENT_OL, ELEMENT_H1 as ELEMENT_H1$1, ELEMENT_H2 as ELEMENT_H2$1, ELEMENT_H3 as ELEMENT_H3$1, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_PARAGRAPH, ELEMENT_BLOCKQUOTE, ELEMENT_CODE_BLOCK, ELEMENT_CODE_LINE, ELEMENT_CODE_SYNTAX, ELEMENT_LI, ELEMENT_LINK, MARK_CODE, MARK_UNDERLINE, MARK_STRIKETHROUGH, MARK_ITALIC, MARK_BOLD, ELEMENT_HR, ELEMENT_TABLE, ELEMENT_TR, ELEMENT_TD, ELEMENT_TH, unwrapList, ELEMENT_TODO_LI, createTrailingBlockPlugin, createAutoformatPlugin, createExitBreakPlugin, KEYS_HEADING, createResetNodePlugin, createHeadingPlugin, createParagraphPlugin, createBlockquotePlugin, createBoldPlugin, createItalicPlugin, createUnderlinePlugin, createCodePlugin, createListPlugin, createIndentListPlugin, createHorizontalRulePlugin, createNodeIdPlugin, createTablePlugin, getListItemEntry, useListToolbarButtonState, useListToolbarButton } from "@udecode/plate";
13
- import { PlateElement, isCollapsed, findNodePath, getPointAfter, insertNodes, ELEMENT_DEFAULT, focusEditor, getPointBefore, setNodes, isElement, PlateLeaf, createPluginFactory, useComposedRef, useEditorRef, createPointRef, insertText, moveSelection, toggleNodeType, useElement, useRemoveNodeButton, useEditorSelector, isSelectionExpanded, withHOC, normalizeEditor, getBlockAbove, queryNode, getParentNode, isType, someNode, isSelectionAtBlockStart, setElements, insertNode, getPluginType, isBlock, isBlockAboveEmpty, findNode, PlateContent, getNodeEntries, useEditorState, collapseSelection, useMarkToolbarButtonState, useMarkToolbarButton, insertEmptyElement, usePlateSelectors, useEventEditorSelectors, PortalBody, useFormInputProps, createPlugins, Plate } from "@udecode/plate-common";
12
+ import { toggleList, ELEMENT_UL, ELEMENT_OL, ELEMENT_H1 as ELEMENT_H1$1, ELEMENT_H2 as ELEMENT_H2$1, ELEMENT_H3 as ELEMENT_H3$1, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_PARAGRAPH, ELEMENT_BLOCKQUOTE, ELEMENT_CODE_BLOCK, ELEMENT_CODE_LINE, ELEMENT_CODE_SYNTAX, ELEMENT_LI, ELEMENT_LINK, MARK_CODE, MARK_UNDERLINE, MARK_STRIKETHROUGH, MARK_ITALIC, MARK_BOLD, ELEMENT_HR, ELEMENT_TABLE, ELEMENT_TR, ELEMENT_TD, ELEMENT_TH, unwrapList, ELEMENT_TODO_LI, createTrailingBlockPlugin, createAutoformatPlugin, createExitBreakPlugin, KEYS_HEADING, createResetNodePlugin, createBasicMarksPlugin, createHeadingPlugin, createParagraphPlugin, createBlockquotePlugin, createUnderlinePlugin, createListPlugin, createIndentListPlugin, createHorizontalRulePlugin, createNodeIdPlugin, createTablePlugin, getListItemEntry, useListToolbarButtonState, useListToolbarButton } from "@udecode/plate";
13
+ import { PlateElement, isCollapsed, findNodePath, getPointAfter, insertNodes, ELEMENT_DEFAULT, focusEditor, getPointBefore, setNodes, isElement, PlateLeaf, createPluginFactory, useComposedRef, useEditorRef, createPointRef, insertText, moveSelection, toggleNodeType, useElement, useRemoveNodeButton, useEditorSelector, isSelectionExpanded, withHOC, normalizeEditor, getBlockAbove, queryNode, getParentNode, isType, someNode, isSelectionAtBlockStart, setElements, insertNode, getPluginType, isBlock, isBlockAboveEmpty, findNode, PlateContent, getNodeEntries, useEditorState, collapseSelection, insertEmptyElement, useMarkToolbarButtonState, useMarkToolbarButton, usePlateSelectors, useEventEditorSelectors, PortalBody, useFormInputProps, createPlugins, Plate } from "@udecode/plate-common";
14
14
  import { ELEMENT_SLASH_INPUT, createSlashPlugin } from "@udecode/plate-slash-command";
15
15
  import { useSelected, useReadOnly, ReactEditor } from "slate-react";
16
16
  import { useCodeBlockElementState, useCodeSyntaxLeaf, ELEMENT_CODE_BLOCK as ELEMENT_CODE_BLOCK$1 } from "@udecode/plate-code-block";
17
17
  import MonacoEditor, { loader, useMonaco } from "@monaco-editor/react";
18
- import { Combobox, ComboboxInput, ComboboxButton, Transition, ComboboxOptions, ComboboxOption, Popover as Popover$3, PopoverButton, PopoverPanel, TransitionChild, Disclosure, DisclosureButton, DisclosurePanel, Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/react";
18
+ import { Combobox as Combobox$1, ComboboxInput, ComboboxButton, Transition, ComboboxOptions, ComboboxOption, Popover as Popover$3, PopoverButton, PopoverPanel, TransitionChild, Disclosure, DisclosureButton, DisclosurePanel, Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/react";
19
19
  import { cva } from "class-variance-authority";
20
20
  import { Eye, SquarePen, Plus, AlignCenter as AlignCenter$1, AlignJustify, AlignLeft as AlignLeft$1, AlignRight as AlignRight$1, ChevronDown, PaintBucket, Quote, Check, ChevronRight, ChevronsUpDown, X, FileCode, Baseline, RectangleVertical, Combine, Ungroup, MessageSquare, MessageSquarePlus, Trash, GripVertical, Edit2, Smile, ExternalLink, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Indent, Keyboard, WrapText, Minus, MoreHorizontal, Outdent, Pilcrow, RotateCcw, RectangleHorizontal, Search, Settings, Strikethrough, Subscript, Superscript, Table, Text, Underline, Link2Off, Moon, SunMedium, Twitter } from "lucide-react";
21
21
  import mermaid from "mermaid";
22
22
  import { ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4 as ELEMENT_H4$1, ELEMENT_H5 as ELEMENT_H5$1, ELEMENT_H6 as ELEMENT_H6$1 } from "@udecode/plate-heading";
23
- import { useComboboxContext, Combobox as Combobox$1, useComboboxStore, ComboboxProvider, Portal, ComboboxPopover, ComboboxItem } from "@ariakit/react";
23
+ import { useComboboxContext, Combobox as Combobox$2, useComboboxStore, ComboboxProvider, Portal, ComboboxPopover, ComboboxItem } from "@ariakit/react";
24
24
  import { useHTMLInputCursorState, useComboboxInput, filterWords } from "@udecode/plate-combobox";
25
25
  import { useTableCellElementState, useTableCellElement, useTableCellElementResizableState, useTableCellElementResizable, useTableBordersDropdownMenuContentState, useTableMergeState, TableProvider, useTableElementState, useTableElement, mergeTableCells, unmergeTableCells, ELEMENT_TABLE as ELEMENT_TABLE$1, getTableColumnCount, insertTable, deleteTable, insertTableColumn, deleteColumn, insertTableRow, deleteRow } from "@udecode/plate-table";
26
26
  import { ResizeHandle as ResizeHandle$1 } from "@udecode/plate-resizable";
@@ -992,7 +992,7 @@ const Autocomplete = ({
992
992
  }
993
993
  }, [items2, query]);
994
994
  return /* @__PURE__ */ React__default.createElement(
995
- Combobox,
995
+ Combobox$1,
996
996
  {
997
997
  value,
998
998
  onChange,
@@ -1358,8 +1358,8 @@ const ListElementVariants = withVariants(PlateElement, listVariants, [
1358
1358
  ]);
1359
1359
  const ListElement = withRef(
1360
1360
  ({ children, variant = "ul", ...props }, ref) => {
1361
- const Component2 = variant;
1362
- return /* @__PURE__ */ React__default.createElement(ListElementVariants, { asChild: true, ref, variant, ...props }, /* @__PURE__ */ React__default.createElement(Component2, null, children));
1361
+ const Component = variant;
1362
+ return /* @__PURE__ */ React__default.createElement(ListElementVariants, { asChild: true, ref, variant, ...props }, /* @__PURE__ */ React__default.createElement(Component, null, children));
1363
1363
  }
1364
1364
  );
1365
1365
  const ELEMENT_MERMAID = "mermaid";
@@ -2173,7 +2173,7 @@ const InlineComboboxInput = forwardRef(({ className, ...props }, propRef) => {
2173
2173
  },
2174
2174
  value || "​"
2175
2175
  ), /* @__PURE__ */ React__default.createElement(
2176
- Combobox$1,
2176
+ Combobox$2,
2177
2177
  {
2178
2178
  autoSelect: true,
2179
2179
  className: cn$1(
@@ -2970,7 +2970,7 @@ const Components = () => {
2970
2970
  ),
2971
2971
  [MARK_CODE]: CodeLeaf,
2972
2972
  [MARK_UNDERLINE]: withProps(PlateLeaf, { as: "u" }),
2973
- [MARK_STRIKETHROUGH]: withProps(PlateLeaf, { as: "s" }),
2973
+ [MARK_STRIKETHROUGH]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React__default.createElement("s", { ...props.attributes, ...props }),
2974
2974
  [MARK_ITALIC]: withProps(PlateLeaf, { as: "em" }),
2975
2975
  [MARK_BOLD]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React__default.createElement("strong", { ...props.attributes, ...props }),
2976
2976
  [ELEMENT_HR]: ({
@@ -3679,7 +3679,7 @@ function TinaForm({ form, children }) {
3679
3679
  }));
3680
3680
  }
3681
3681
  function TinaField({
3682
- Component: Component2,
3682
+ Component,
3683
3683
  children,
3684
3684
  ...fieldProps
3685
3685
  }) {
@@ -3687,7 +3687,7 @@ function TinaField({
3687
3687
  if (!isEditing)
3688
3688
  return children || null;
3689
3689
  return /* @__PURE__ */ React.createElement(Field, { ...fieldProps }, ({ input, meta }) => {
3690
- return /* @__PURE__ */ React.createElement(Component2, { input, meta, ...fieldProps });
3690
+ return /* @__PURE__ */ React.createElement(Component, { input, meta, ...fieldProps });
3691
3691
  });
3692
3692
  }
3693
3693
  TinaField.propTypes = {
@@ -3857,7 +3857,7 @@ var _excluded = ["attr", "size", "title"];
3857
3857
  function _objectWithoutProperties(source, excluded) {
3858
3858
  if (source == null)
3859
3859
  return {};
3860
- var target = _objectWithoutPropertiesLoose$1(source, excluded);
3860
+ var target = _objectWithoutPropertiesLoose(source, excluded);
3861
3861
  var key, i;
3862
3862
  if (Object.getOwnPropertySymbols) {
3863
3863
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -3872,7 +3872,7 @@ function _objectWithoutProperties(source, excluded) {
3872
3872
  }
3873
3873
  return target;
3874
3874
  }
3875
- function _objectWithoutPropertiesLoose$1(source, excluded) {
3875
+ function _objectWithoutPropertiesLoose(source, excluded) {
3876
3876
  if (source == null)
3877
3877
  return {};
3878
3878
  var target = {};
@@ -4962,7 +4962,28 @@ const NumberInput = ({
4962
4962
  onChange,
4963
4963
  value,
4964
4964
  step
4965
- }) => /* @__PURE__ */ React.createElement(Input, { type: "number", step, value, onChange });
4965
+ }) => /* @__PURE__ */ React.createElement(
4966
+ Input,
4967
+ {
4968
+ type: "number",
4969
+ step,
4970
+ value,
4971
+ onChange: (event) => {
4972
+ const inputValue = event.target.value;
4973
+ const newValue = inputValue === "" ? void 0 : inputValue;
4974
+ if (onChange) {
4975
+ const syntheticEvent = {
4976
+ ...event,
4977
+ target: {
4978
+ ...event.target,
4979
+ value: newValue
4980
+ }
4981
+ };
4982
+ onChange(syntheticEvent);
4983
+ }
4984
+ }
4985
+ }
4986
+ );
4966
4987
  function useCMS() {
4967
4988
  return useCMS$1();
4968
4989
  }
@@ -5203,7 +5224,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
5203
5224
  side: "bottom",
5204
5225
  className: cn(
5205
5226
  "rounded-md border bg-white p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
5206
- "max-h-[30vh] max-w-[30vh] overflow-y-auto",
5227
+ "max-h-[30vh] max-w-[30vw] overflow-y-auto",
5207
5228
  className
5208
5229
  ),
5209
5230
  ...props
@@ -5295,11 +5316,7 @@ const getFilename = (optionSets, value) => {
5295
5316
  const node = nodes.find((node2) => node2.id === value);
5296
5317
  return node ? node._internalSys.filename : null;
5297
5318
  };
5298
- const ComboboxDemo = ({
5299
- cms,
5300
- input,
5301
- field
5302
- }) => {
5319
+ const Combobox = ({ cms, input, field }) => {
5303
5320
  const [open2, setOpen] = React.useState(false);
5304
5321
  const [value, setValue] = React.useState(input.value);
5305
5322
  const [displayText, setDisplayText] = React.useState(null);
@@ -5323,17 +5340,17 @@ const ComboboxDemo = ({
5323
5340
  if (loading === true) {
5324
5341
  return /* @__PURE__ */ React.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
5325
5342
  }
5326
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
5343
+ return /* @__PURE__ */ React.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
5327
5344
  Button,
5328
5345
  {
5329
5346
  variant: "outline",
5330
5347
  role: "combobox",
5331
5348
  "aria-expanded": open2,
5332
- className: "w-52 justify-between"
5349
+ className: "w-full justify-between"
5333
5350
  },
5334
5351
  /* @__PURE__ */ React.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
5335
5352
  open2 ? /* @__PURE__ */ React.createElement(IoMdArrowDropup, { size: 20 }) : /* @__PURE__ */ React.createElement(IoMdArrowDropdown, { size: 20 })
5336
- )), /* @__PURE__ */ React.createElement(PopoverContent, { className: "p-0 relative" }, /* @__PURE__ */ React.createElement(
5353
+ )), /* @__PURE__ */ React.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React.createElement(
5337
5354
  Command,
5338
5355
  {
5339
5356
  shouldFilter: !field.experimental___filter,
@@ -5357,32 +5374,25 @@ const ComboboxDemo = ({
5357
5374
  }
5358
5375
  ),
5359
5376
  /* @__PURE__ */ React.createElement(CommandEmpty, null, "No reference found"),
5360
- /* @__PURE__ */ React.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React.createElement(
5361
- CommandGroup,
5362
- {
5363
- key: `${collection}-group`,
5364
- heading: collection
5365
- },
5366
- /* @__PURE__ */ React.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
5367
- const { id, _values } = node;
5368
- return /* @__PURE__ */ React.createElement(
5369
- OptionComponent,
5370
- {
5371
- id,
5372
- key: id,
5373
- value,
5374
- field,
5375
- _values,
5376
- node,
5377
- onSelect: (currentValue) => {
5378
- setValue(currentValue);
5379
- setOpen(false);
5380
- }
5377
+ /* @__PURE__ */ React.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React.createElement(CommandGroup, { key: `${collection}-group`, heading: collection }, /* @__PURE__ */ React.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
5378
+ const { id, _values } = node;
5379
+ return /* @__PURE__ */ React.createElement(
5380
+ OptionComponent,
5381
+ {
5382
+ id,
5383
+ key: id,
5384
+ value,
5385
+ field,
5386
+ _values,
5387
+ node,
5388
+ onSelect: (currentValue) => {
5389
+ setValue(currentValue);
5390
+ setOpen(false);
5381
5391
  }
5382
- );
5383
- }))
5384
- ))))
5385
- ))));
5392
+ }
5393
+ );
5394
+ }))))))
5395
+ )));
5386
5396
  };
5387
5397
  const useGetNode = (cms, id) => {
5388
5398
  const [document2, setDocument] = React.useState(
@@ -5455,7 +5465,7 @@ const ReferenceLink = ({ cms, input }) => {
5455
5465
  };
5456
5466
  const Reference = ({ input, field }) => {
5457
5467
  const cms = useCMS();
5458
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "relative group" }, /* @__PURE__ */ React.createElement(ComboboxDemo, { cms, input, field })), /* @__PURE__ */ React.createElement(ReferenceLink, { cms, input }));
5468
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "relative group" }, /* @__PURE__ */ React.createElement(Combobox, { cms, input, field })), /* @__PURE__ */ React.createElement(ReferenceLink, { cms, input }));
5459
5469
  };
5460
5470
  const ButtonToggle = ({
5461
5471
  input,
@@ -7215,244 +7225,65 @@ function pad(type, value) {
7215
7225
  str = "0" + str;
7216
7226
  return str;
7217
7227
  }
7218
- function _inheritsLoose(subClass, superClass) {
7219
- subClass.prototype = Object.create(superClass.prototype);
7220
- subClass.prototype.constructor = subClass;
7221
- _setPrototypeOf(subClass, superClass);
7222
- }
7223
- function _setPrototypeOf(o, p) {
7224
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
7225
- o2.__proto__ = p2;
7226
- return o2;
7227
- };
7228
- return _setPrototypeOf(o, p);
7229
- }
7230
- function _objectWithoutPropertiesLoose(source, excluded) {
7231
- if (source == null)
7232
- return {};
7233
- var target = {};
7234
- var sourceKeys = Object.keys(source);
7235
- var key, i;
7236
- for (i = 0; i < sourceKeys.length; i++) {
7237
- key = sourceKeys[i];
7238
- if (excluded.indexOf(key) >= 0)
7239
- continue;
7240
- target[key] = source[key];
7241
- }
7242
- return target;
7243
- }
7244
- function _assertThisInitialized(self) {
7245
- if (self === void 0) {
7246
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7247
- }
7248
- return self;
7249
- }
7250
- function isNodeFound(current, componentNode, ignoreClass) {
7251
- if (current === componentNode) {
7252
- return true;
7253
- }
7254
- if (current.correspondingElement) {
7255
- return current.correspondingElement.classList.contains(ignoreClass);
7256
- }
7257
- return current.classList.contains(ignoreClass);
7258
- }
7259
- function findHighest(current, componentNode, ignoreClass) {
7260
- if (current === componentNode) {
7261
- return true;
7228
+ var useClickAway$1 = {};
7229
+ var util = {};
7230
+ Object.defineProperty(util, "__esModule", { value: true });
7231
+ util.isNavigator = util.isBrowser = util.off = util.on = util.noop = void 0;
7232
+ var noop = function() {
7233
+ };
7234
+ util.noop = noop;
7235
+ function on(obj) {
7236
+ var args = [];
7237
+ for (var _i = 1; _i < arguments.length; _i++) {
7238
+ args[_i - 1] = arguments[_i];
7262
7239
  }
7263
- while (current.parentNode || current.host) {
7264
- if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) {
7265
- return true;
7266
- }
7267
- current = current.parentNode || current.host;
7240
+ if (obj && obj.addEventListener) {
7241
+ obj.addEventListener.apply(obj, args);
7268
7242
  }
7269
- return current;
7270
7243
  }
7271
- function clickedScrollbar(evt) {
7272
- return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;
7273
- }
7274
- var testPassiveEventSupport = function testPassiveEventSupport2() {
7275
- if (typeof window === "undefined" || typeof window.addEventListener !== "function") {
7276
- return;
7244
+ util.on = on;
7245
+ function off(obj) {
7246
+ var args = [];
7247
+ for (var _i = 1; _i < arguments.length; _i++) {
7248
+ args[_i - 1] = arguments[_i];
7277
7249
  }
7278
- var passive = false;
7279
- var options = Object.defineProperty({}, "passive", {
7280
- get: function get2() {
7281
- passive = true;
7282
- }
7283
- });
7284
- var noop = function noop2() {
7285
- };
7286
- window.addEventListener("testPassiveEventSupport", noop, options);
7287
- window.removeEventListener("testPassiveEventSupport", noop, options);
7288
- return passive;
7289
- };
7290
- function autoInc(seed) {
7291
- if (seed === void 0) {
7292
- seed = 0;
7250
+ if (obj && obj.removeEventListener) {
7251
+ obj.removeEventListener.apply(obj, args);
7293
7252
  }
7294
- return function() {
7295
- return ++seed;
7296
- };
7297
7253
  }
7298
- var uid = autoInc();
7299
- var passiveEventSupport;
7300
- var handlersMap = {};
7301
- var enabledInstances = {};
7302
- var touchEvents = ["touchstart", "touchmove"];
7303
- var IGNORE_CLASS_NAME = "ignore-react-onclickoutside";
7304
- function getEventHandlerOptions(instance, eventName) {
7305
- var handlerOptions = {};
7306
- var isTouchEvent = touchEvents.indexOf(eventName) !== -1;
7307
- if (isTouchEvent && passiveEventSupport) {
7308
- handlerOptions.passive = !instance.props.preventDefault;
7309
- }
7310
- return handlerOptions;
7311
- }
7312
- function onClickOutsideHOC(WrappedComponent, config) {
7313
- var _class, _temp;
7314
- var componentName = WrappedComponent.displayName || WrappedComponent.name || "Component";
7315
- return _temp = _class = /* @__PURE__ */ function(_Component) {
7316
- _inheritsLoose(onClickOutside, _Component);
7317
- function onClickOutside(props) {
7318
- var _this;
7319
- _this = _Component.call(this, props) || this;
7320
- _this.__outsideClickHandler = function(event) {
7321
- if (typeof _this.__clickOutsideHandlerProp === "function") {
7322
- _this.__clickOutsideHandlerProp(event);
7323
- return;
7324
- }
7325
- var instance = _this.getInstance();
7326
- if (typeof instance.props.handleClickOutside === "function") {
7327
- instance.props.handleClickOutside(event);
7328
- return;
7329
- }
7330
- if (typeof instance.handleClickOutside === "function") {
7331
- instance.handleClickOutside(event);
7332
- return;
7333
- }
7334
- throw new Error("WrappedComponent: " + componentName + " lacks a handleClickOutside(event) function for processing outside click events.");
7335
- };
7336
- _this.__getComponentNode = function() {
7337
- var instance = _this.getInstance();
7338
- if (config && typeof config.setClickOutsideRef === "function") {
7339
- return config.setClickOutsideRef()(instance);
7340
- }
7341
- if (typeof instance.setClickOutsideRef === "function") {
7342
- return instance.setClickOutsideRef();
7343
- }
7344
- return findDOMNode(instance);
7345
- };
7346
- _this.enableOnClickOutside = function() {
7347
- if (typeof document === "undefined" || enabledInstances[_this._uid]) {
7348
- return;
7349
- }
7350
- if (typeof passiveEventSupport === "undefined") {
7351
- passiveEventSupport = testPassiveEventSupport();
7352
- }
7353
- enabledInstances[_this._uid] = true;
7354
- var events = _this.props.eventTypes;
7355
- if (!events.forEach) {
7356
- events = [events];
7357
- }
7358
- handlersMap[_this._uid] = function(event) {
7359
- if (_this.componentNode === null)
7360
- return;
7361
- if (_this.initTimeStamp > event.timeStamp)
7362
- return;
7363
- if (_this.props.preventDefault) {
7364
- event.preventDefault();
7365
- }
7366
- if (_this.props.stopPropagation) {
7367
- event.stopPropagation();
7368
- }
7369
- if (_this.props.excludeScrollbar && clickedScrollbar(event))
7370
- return;
7371
- var current = event.composed && event.composedPath && event.composedPath().shift() || event.target;
7372
- if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {
7373
- return;
7374
- }
7375
- _this.__outsideClickHandler(event);
7376
- };
7377
- events.forEach(function(eventName) {
7378
- document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_assertThisInitialized(_this), eventName));
7379
- });
7380
- };
7381
- _this.disableOnClickOutside = function() {
7382
- delete enabledInstances[_this._uid];
7383
- var fn = handlersMap[_this._uid];
7384
- if (fn && typeof document !== "undefined") {
7385
- var events = _this.props.eventTypes;
7386
- if (!events.forEach) {
7387
- events = [events];
7388
- }
7389
- events.forEach(function(eventName) {
7390
- return document.removeEventListener(eventName, fn, getEventHandlerOptions(_assertThisInitialized(_this), eventName));
7391
- });
7392
- delete handlersMap[_this._uid];
7393
- }
7394
- };
7395
- _this.getRef = function(ref) {
7396
- return _this.instanceRef = ref;
7397
- };
7398
- _this._uid = uid();
7399
- _this.initTimeStamp = performance.now();
7400
- return _this;
7401
- }
7402
- var _proto = onClickOutside.prototype;
7403
- _proto.getInstance = function getInstance() {
7404
- if (WrappedComponent.prototype && !WrappedComponent.prototype.isReactComponent) {
7405
- return this;
7406
- }
7407
- var ref = this.instanceRef;
7408
- return ref.getInstance ? ref.getInstance() : ref;
7409
- };
7410
- _proto.componentDidMount = function componentDidMount() {
7411
- if (typeof document === "undefined" || !document.createElement) {
7412
- return;
7413
- }
7414
- var instance = this.getInstance();
7415
- if (config && typeof config.handleClickOutside === "function") {
7416
- this.__clickOutsideHandlerProp = config.handleClickOutside(instance);
7417
- if (typeof this.__clickOutsideHandlerProp !== "function") {
7418
- throw new Error("WrappedComponent: " + componentName + " lacks a function for processing outside click events specified by the handleClickOutside config option.");
7419
- }
7420
- }
7421
- this.componentNode = this.__getComponentNode();
7422
- if (this.props.disableOnClickOutside)
7423
- return;
7424
- this.enableOnClickOutside();
7425
- };
7426
- _proto.componentDidUpdate = function componentDidUpdate() {
7427
- this.componentNode = this.__getComponentNode();
7428
- };
7429
- _proto.componentWillUnmount = function componentWillUnmount() {
7430
- this.disableOnClickOutside();
7254
+ util.off = off;
7255
+ util.isBrowser = typeof window !== "undefined";
7256
+ util.isNavigator = typeof navigator !== "undefined";
7257
+ Object.defineProperty(useClickAway$1, "__esModule", { value: true });
7258
+ var react_1 = React__default;
7259
+ var util_1 = util;
7260
+ var defaultEvents = ["mousedown", "touchstart"];
7261
+ var useClickAway = function(ref, onClickAway, events) {
7262
+ if (events === void 0) {
7263
+ events = defaultEvents;
7264
+ }
7265
+ var savedCallback = react_1.useRef(onClickAway);
7266
+ react_1.useEffect(function() {
7267
+ savedCallback.current = onClickAway;
7268
+ }, [onClickAway]);
7269
+ react_1.useEffect(function() {
7270
+ var handler = function(event) {
7271
+ var el = ref.current;
7272
+ el && !el.contains(event.target) && savedCallback.current(event);
7431
7273
  };
7432
- _proto.render = function render() {
7433
- var _this$props = this.props;
7434
- _this$props.excludeScrollbar;
7435
- var props = _objectWithoutPropertiesLoose(_this$props, ["excludeScrollbar"]);
7436
- if (WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) {
7437
- props.ref = this.getRef;
7438
- } else {
7439
- props.wrappedRef = this.getRef;
7274
+ for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
7275
+ var eventName = events_1[_i];
7276
+ util_1.on(document, eventName, handler);
7277
+ }
7278
+ return function() {
7279
+ for (var _i2 = 0, events_2 = events; _i2 < events_2.length; _i2++) {
7280
+ var eventName2 = events_2[_i2];
7281
+ util_1.off(document, eventName2, handler);
7440
7282
  }
7441
- props.disableOnClickOutside = this.disableOnClickOutside;
7442
- props.enableOnClickOutside = this.enableOnClickOutside;
7443
- return createElement(WrappedComponent, props);
7444
7283
  };
7445
- return onClickOutside;
7446
- }(Component), _class.displayName = "OnClickOutside(" + componentName + ")", _class.defaultProps = {
7447
- eventTypes: ["mousedown", "touchstart"],
7448
- excludeScrollbar: config && config.excludeScrollbar || false,
7449
- outsideClickIgnoreClass: IGNORE_CLASS_NAME,
7450
- preventDefault: false,
7451
- stopPropagation: false
7452
- }, _class.getClass = function() {
7453
- return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;
7454
- }, _temp;
7455
- }
7284
+ }, [events, ref]);
7285
+ };
7286
+ var _default = useClickAway$1.default = useClickAway;
7456
7287
  const viewModes = {
7457
7288
  YEARS: "years",
7458
7289
  MONTHS: "months",
@@ -7981,22 +7812,13 @@ function log(message, method) {
7981
7812
  }
7982
7813
  con[method]("***react-datetime:" + message);
7983
7814
  }
7984
- class ClickOutBase extends React__default.Component {
7985
- constructor() {
7986
- super(...arguments);
7987
- __publicField(this, "container", React__default.createRef());
7988
- }
7989
- render() {
7990
- return /* @__PURE__ */ React__default.createElement("div", { className: this.props.className, ref: this.container }, this.props.children);
7991
- }
7992
- handleClickOutside(e) {
7993
- this.props.onClickOut(e);
7994
- }
7995
- setClickOutsideRef() {
7996
- return this.container.current;
7997
- }
7815
+ function ClickableWrapper({ className, onClickOut, children }) {
7816
+ const containerRef = useRef(null);
7817
+ _default(containerRef, (event) => {
7818
+ onClickOut(event);
7819
+ });
7820
+ return /* @__PURE__ */ React__default.createElement("div", { className, ref: containerRef }, children);
7998
7821
  }
7999
- const ClickableWrapper = onClickOutsideHOC(ClickOutBase);
8000
7822
  const DEFAULT_DATE_DISPLAY_FORMAT = "MMM DD, YYYY";
8001
7823
  const DEFAULT_TIME_DISPLAY_FORMAT = "h:mm A";
8002
7824
  const format$1 = (val, _name, field) => {
@@ -8039,7 +7861,10 @@ const DateField = wrapFieldsWithMeta(
8039
7861
  ReactDateTimeWithStyles,
8040
7862
  {
8041
7863
  value: input.value,
8042
- onChange: input.onChange,
7864
+ onChange: (value) => {
7865
+ const newValue = value === "" ? void 0 : value;
7866
+ input.onChange(newValue);
7867
+ },
8043
7868
  dateFormat: dateFormat || DEFAULT_DATE_DISPLAY_FORMAT,
8044
7869
  timeFormat: timeFormat || false,
8045
7870
  inputProps: { className: textFieldClasses },
@@ -9491,6 +9316,17 @@ class TinaMediaStore {
9491
9316
  }
9492
9317
  }
9493
9318
  }
9319
+ const encodeUrlIfNeeded = (url) => {
9320
+ if (url) {
9321
+ try {
9322
+ return new URL(url).toString();
9323
+ } catch (e) {
9324
+ return url;
9325
+ }
9326
+ } else {
9327
+ return url;
9328
+ }
9329
+ };
9494
9330
  let MediaManager$1 = class MediaManager {
9495
9331
  constructor(store, events) {
9496
9332
  this.store = store;
@@ -9563,6 +9399,20 @@ let MediaManager$1 = class MediaManager {
9563
9399
  try {
9564
9400
  this.events.dispatch({ type: "media:list:start", ...options });
9565
9401
  const media = await this.store.list(options);
9402
+ media.items = media.items.map((item) => {
9403
+ if (item.type === "dir") {
9404
+ return item;
9405
+ }
9406
+ if (item.thumbnails) {
9407
+ for (const [size, src] of Object.entries(item.thumbnails)) {
9408
+ item.thumbnails[size] = encodeUrlIfNeeded(src);
9409
+ }
9410
+ }
9411
+ return {
9412
+ ...item,
9413
+ src: encodeUrlIfNeeded(item.src)
9414
+ };
9415
+ });
9566
9416
  this.events.dispatch({ type: "media:list:success", ...options, media });
9567
9417
  return media;
9568
9418
  } catch (error) {
@@ -9850,7 +9700,7 @@ class SidebarState {
9850
9700
  }
9851
9701
  }
9852
9702
  function createScreen({
9853
- Component: Component2,
9703
+ Component,
9854
9704
  props,
9855
9705
  ...options
9856
9706
  }) {
@@ -9859,7 +9709,7 @@ function createScreen({
9859
9709
  layout: "popup",
9860
9710
  ...options,
9861
9711
  Component(screenProps) {
9862
- return /* @__PURE__ */ React__default.createElement(Component2, { ...screenProps, ...props });
9712
+ return /* @__PURE__ */ React__default.createElement(Component, { ...screenProps, ...props });
9863
9713
  }
9864
9714
  };
9865
9715
  }
@@ -10370,7 +10220,7 @@ const SyncStatus = ({ cms, setEventsOpen }) => {
10370
10220
  "Event Log"
10371
10221
  ));
10372
10222
  };
10373
- const version = "2.5.0";
10223
+ const version = "2.7.1";
10374
10224
  const Nav = ({
10375
10225
  isLocalMode,
10376
10226
  className = "",
@@ -11006,7 +10856,7 @@ const SidebarHeader = ({
11006
10856
  className: "h-5 w-auto -mx-1 text-blue-500",
11007
10857
  stroke: "currentColor",
11008
10858
  fill: "currentColor",
11009
- "stroke-width": "0",
10859
+ strokeWidth: "0",
11010
10860
  viewBox: "0 0 24 24",
11011
10861
  xmlns: "http://www.w3.org/2000/svg"
11012
10862
  },
@@ -13299,9 +13149,9 @@ const EllipsisIcon = ({ title }) => {
13299
13149
  ));
13300
13150
  };
13301
13151
  const Wrapper$1 = ({ inline, children }) => {
13302
- const Component2 = inline ? "span" : "div";
13152
+ const Component = inline ? "span" : "div";
13303
13153
  return /* @__PURE__ */ React__default.createElement(
13304
- Component2,
13154
+ Component,
13305
13155
  {
13306
13156
  contentEditable: false,
13307
13157
  style: { userSelect: "none" },
@@ -13723,6 +13573,11 @@ const autoformatMarks = [
13723
13573
  mode: "mark",
13724
13574
  type: MARK_CODE,
13725
13575
  match: "`"
13576
+ },
13577
+ {
13578
+ mode: "mark",
13579
+ type: MARK_STRIKETHROUGH,
13580
+ match: ["~~", "~"]
13726
13581
  }
13727
13582
  ];
13728
13583
  const autoformatRules = [
@@ -13864,16 +13719,14 @@ const plugins$1 = [
13864
13719
  })
13865
13720
  ];
13866
13721
  const plugins = [
13722
+ createBasicMarksPlugin(),
13867
13723
  createHeadingPlugin(),
13868
13724
  createParagraphPlugin(),
13869
13725
  createCodeBlockPlugin(),
13870
13726
  createHTMLBlockPlugin(),
13871
13727
  createHTMLInlinePlugin(),
13872
13728
  createBlockquotePlugin(),
13873
- createBoldPlugin(),
13874
- createItalicPlugin(),
13875
13729
  createUnderlinePlugin(),
13876
- createCodePlugin(),
13877
13730
  createListPlugin(),
13878
13731
  createIndentListPlugin(),
13879
13732
  createHorizontalRulePlugin(),
@@ -14089,13 +13942,13 @@ const TooltipContent = withCn(
14089
13942
  }),
14090
13943
  "z-[9999] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md"
14091
13944
  );
14092
- function withTooltip(Component2) {
13945
+ function withTooltip(Component) {
14093
13946
  return React__default.forwardRef(function ExtendComponent({ tooltip, tooltipContentProps, tooltipProps, ...props }, ref) {
14094
13947
  const [mounted, setMounted] = React__default.useState(false);
14095
13948
  React__default.useEffect(() => {
14096
13949
  setMounted(true);
14097
13950
  }, []);
14098
- const component = /* @__PURE__ */ React__default.createElement(Component2, { ref, ...props });
13951
+ const component = /* @__PURE__ */ React__default.createElement(Component, { ref, ...props });
14099
13952
  if (tooltip && mounted) {
14100
13953
  return /* @__PURE__ */ React__default.createElement(Tooltip, { ...tooltipProps }, /* @__PURE__ */ React__default.createElement(TooltipTrigger, { asChild: true }, component), /* @__PURE__ */ React__default.createElement(TooltipPortal, null, /* @__PURE__ */ React__default.createElement(TooltipContent, { ...tooltipContentProps }, tooltip)));
14101
13954
  }
@@ -14383,7 +14236,7 @@ const useCodeBlockToolbarButton = (state) => {
14383
14236
  const CodeBlockToolbarButton = withRef(({ clear, ...rest }, ref) => {
14384
14237
  const state = useCodeBlockToolbarButtonState();
14385
14238
  const { props } = useCodeBlockToolbarButton(state);
14386
- return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.codeBlock, null));
14239
+ return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Code Block", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.codeBlock, null));
14387
14240
  });
14388
14241
  const useImageToolbarButtonState = () => {
14389
14242
  const editor = useEditorState();
@@ -14415,36 +14268,54 @@ const useImageToolbarButton = (state) => {
14415
14268
  const ImageToolbarButton = withRef(({ clear, ...rest }, ref) => {
14416
14269
  const state = useImageToolbarButtonState();
14417
14270
  const { props } = useImageToolbarButton(state);
14418
- return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.image, null));
14419
- });
14420
- const IndentListToolbarButton = withRef(({ nodeType = ELEMENT_UL }, ref) => {
14421
- const editor = useEditorState();
14422
- const state = useListToolbarButtonState({ nodeType });
14423
- const { props } = useListToolbarButton(state);
14424
- return /* @__PURE__ */ React__default.createElement(
14425
- ToolbarButton,
14426
- {
14427
- ref,
14428
- tooltip: nodeType === ELEMENT_UL ? "Bulleted List" : "Numbered List",
14429
- ...props,
14430
- onClick: (e) => {
14431
- e.preventDefault();
14432
- e.stopPropagation();
14433
- toggleList(editor, { type: nodeType });
14434
- }
14435
- },
14436
- nodeType === ELEMENT_UL ? /* @__PURE__ */ React__default.createElement(Icons.ul, null) : /* @__PURE__ */ React__default.createElement(Icons.ol, null)
14437
- );
14271
+ return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Image", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.image, null));
14438
14272
  });
14273
+ const UnorderedListToolbarButton = withRef(
14274
+ (props, ref) => {
14275
+ const editor = useEditorState();
14276
+ const state = useListToolbarButtonState({ nodeType: ELEMENT_UL });
14277
+ const { props: buttonProps } = useListToolbarButton(state);
14278
+ return /* @__PURE__ */ React__default.createElement(
14279
+ ToolbarButton,
14280
+ {
14281
+ ref,
14282
+ tooltip: "Bulleted List",
14283
+ ...buttonProps,
14284
+ onClick: (e) => {
14285
+ e.preventDefault();
14286
+ e.stopPropagation();
14287
+ toggleList(editor, { type: ELEMENT_UL });
14288
+ }
14289
+ },
14290
+ /* @__PURE__ */ React__default.createElement(Icons.ul, null)
14291
+ );
14292
+ }
14293
+ );
14294
+ const OrderedListToolbarButton = withRef(
14295
+ (props, ref) => {
14296
+ const editor = useEditorState();
14297
+ const state = useListToolbarButtonState({ nodeType: ELEMENT_OL });
14298
+ const { props: buttonProps } = useListToolbarButton(state);
14299
+ return /* @__PURE__ */ React__default.createElement(
14300
+ ToolbarButton,
14301
+ {
14302
+ ref,
14303
+ tooltip: "Numbered List",
14304
+ ...buttonProps,
14305
+ onClick: (e) => {
14306
+ e.preventDefault();
14307
+ e.stopPropagation();
14308
+ toggleList(editor, { type: ELEMENT_OL });
14309
+ }
14310
+ },
14311
+ /* @__PURE__ */ React__default.createElement(Icons.ol, null)
14312
+ );
14313
+ }
14314
+ );
14439
14315
  const LinkToolbarButton = withRef((rest, ref) => {
14440
14316
  const state = useLinkToolbarButtonState();
14441
14317
  const { props } = useLinkToolbarButton(state);
14442
- return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link", ...props, ...rest }, /* @__PURE__ */ React__default.createElement(Icons.link, null));
14443
- });
14444
- const MarkToolbarButton = withRef(({ clear, nodeType, ...rest }, ref) => {
14445
- const state = useMarkToolbarButtonState({ clear, nodeType });
14446
- const { props } = useMarkToolbarButton(state);
14447
- return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest });
14318
+ return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest, tooltip: "Link" }, /* @__PURE__ */ React__default.createElement(Icons.link, null));
14448
14319
  });
14449
14320
  const useMermaidToolbarButtonState = () => {
14450
14321
  const editor = useEditorState();
@@ -14525,7 +14396,7 @@ const useBlockQuoteToolbarButton = (state) => {
14525
14396
  const QuoteToolbarButton = withRef(({ clear, ...rest }, ref) => {
14526
14397
  const state = useBlockQuoteToolbarButtonState();
14527
14398
  const { props } = useBlockQuoteToolbarButton(state);
14528
- return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.quote, null));
14399
+ return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Quote (⌘+⇧+.)", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.quote, null));
14529
14400
  });
14530
14401
  const useRawMarkdownToolbarButton = () => {
14531
14402
  const { setRawMode } = useEditorContext();
@@ -14545,7 +14416,7 @@ const RawMarkdownToolbarButton = withRef(({ clear, ...rest }, ref) => {
14545
14416
  ToolbarButton,
14546
14417
  {
14547
14418
  ref,
14548
- tooltip: "Link",
14419
+ tooltip: "Raw Markdown",
14549
14420
  ...rest,
14550
14421
  ...props,
14551
14422
  "data-testid": "markdown-button"
@@ -14690,7 +14561,7 @@ const EmbedButton = ({ editor, templates }) => {
14690
14561
  key: template.name,
14691
14562
  onMouseDown: (e) => {
14692
14563
  e.preventDefault();
14693
- close();
14564
+ setOpen(false);
14694
14565
  insertMDX(editor, template);
14695
14566
  },
14696
14567
  className: ""
@@ -14698,6 +14569,15 @@ const EmbedButton = ({ editor, templates }) => {
14698
14569
  template.label || template.name
14699
14570
  ))));
14700
14571
  };
14572
+ const MarkToolbarButton = withRef(({ clear, nodeType, ...rest }, ref) => {
14573
+ const state = useMarkToolbarButtonState({ clear, nodeType });
14574
+ const { props } = useMarkToolbarButton(state);
14575
+ return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, ...props, ...rest });
14576
+ });
14577
+ const BoldToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: MARK_BOLD }, /* @__PURE__ */ React__default.createElement(Icons.bold, null));
14578
+ const StrikethroughToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Strikethrough", nodeType: MARK_STRIKETHROUGH }, /* @__PURE__ */ React__default.createElement(Icons.strikethrough, null));
14579
+ const ItalicToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: MARK_ITALIC }, /* @__PURE__ */ React__default.createElement(Icons.italic, null));
14580
+ const CodeToolbarButton = () => /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: MARK_CODE }, /* @__PURE__ */ React__default.createElement(Icons.code, null));
14701
14581
  const toolbarItems = {
14702
14582
  heading: {
14703
14583
  label: HEADING_LABEL,
@@ -14718,32 +14598,37 @@ const toolbarItems = {
14718
14598
  quote: {
14719
14599
  label: "Quote",
14720
14600
  width: () => STANDARD_ICON_WIDTH,
14721
- Component: /* @__PURE__ */ React__default.createElement(QuoteToolbarButton, { tooltip: "Quote Quote (⌘+⇧+.)" })
14601
+ Component: /* @__PURE__ */ React__default.createElement(QuoteToolbarButton, null)
14722
14602
  },
14723
14603
  ul: {
14724
14604
  label: "Unordered List",
14725
14605
  width: () => STANDARD_ICON_WIDTH,
14726
- Component: /* @__PURE__ */ React__default.createElement(IndentListToolbarButton, { nodeType: ELEMENT_UL })
14606
+ Component: /* @__PURE__ */ React__default.createElement(UnorderedListToolbarButton, null)
14727
14607
  },
14728
14608
  ol: {
14729
14609
  label: "Ordered List",
14730
14610
  width: () => STANDARD_ICON_WIDTH,
14731
- Component: /* @__PURE__ */ React__default.createElement(IndentListToolbarButton, { nodeType: ELEMENT_OL })
14611
+ Component: /* @__PURE__ */ React__default.createElement(OrderedListToolbarButton, null)
14732
14612
  },
14733
14613
  bold: {
14734
14614
  label: "Bold",
14735
14615
  width: () => STANDARD_ICON_WIDTH,
14736
- Component: /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: MARK_BOLD }, /* @__PURE__ */ React__default.createElement(Icons.bold, null))
14616
+ Component: /* @__PURE__ */ React__default.createElement(BoldToolbarButton, null)
14617
+ },
14618
+ strikethrough: {
14619
+ label: "Strikethrough",
14620
+ width: () => STANDARD_ICON_WIDTH,
14621
+ Component: /* @__PURE__ */ React__default.createElement(StrikethroughToolbarButton, null)
14737
14622
  },
14738
14623
  italic: {
14739
14624
  label: "Italic",
14740
14625
  width: () => STANDARD_ICON_WIDTH,
14741
- Component: /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: MARK_ITALIC }, /* @__PURE__ */ React__default.createElement(Icons.italic, null))
14626
+ Component: /* @__PURE__ */ React__default.createElement(ItalicToolbarButton, null)
14742
14627
  },
14743
14628
  code: {
14744
14629
  label: "Code",
14745
14630
  width: () => STANDARD_ICON_WIDTH,
14746
- Component: /* @__PURE__ */ React__default.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: MARK_CODE }, /* @__PURE__ */ React__default.createElement(Icons.code, null))
14631
+ Component: /* @__PURE__ */ React__default.createElement(CodeToolbarButton, null)
14747
14632
  },
14748
14633
  codeBlock: {
14749
14634
  label: "Code Block",
@@ -14776,7 +14661,12 @@ function FixedToolbarButtons() {
14776
14661
  const [itemsShown, setItemsShown] = React__default.useState(11);
14777
14662
  const { overrides, templates } = useToolbarContext();
14778
14663
  const showEmbedButton = templates.length > 0;
14779
- let items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14664
+ let items2 = [];
14665
+ if (Array.isArray(overrides)) {
14666
+ items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14667
+ } else {
14668
+ items2 = (overrides == null ? void 0 : overrides.toolbar) === void 0 ? Object.values(toolbarItems) : overrides.toolbar.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14669
+ }
14780
14670
  if (!showEmbedButton) {
14781
14671
  items2 = items2.filter((item) => item.label !== toolbarItems.embed.label);
14782
14672
  }
@@ -15104,6 +14994,9 @@ const isUrl = (string) => {
15104
14994
  if (typeof string !== "string") {
15105
14995
  return false;
15106
14996
  }
14997
+ if (string.startsWith("#")) {
14998
+ return true;
14999
+ }
15107
15000
  const generalMatch = string.match(protocolAndDomainRE);
15108
15001
  const emailLinkMatch = string.match(emailLintRE);
15109
15002
  const localUrlMatch = string.match(localUrlRE);
@@ -15125,12 +15018,12 @@ const isUrl = (string) => {
15125
15018
  }
15126
15019
  return localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol);
15127
15020
  };
15128
- const RichEditor = (props) => {
15021
+ const RichEditor = ({ input, tinaForm, field }) => {
15129
15022
  var _a;
15130
15023
  const initialValue = React__default.useMemo(
15131
15024
  () => {
15132
15025
  var _a2, _b;
15133
- return ((_b = (_a2 = props.input.value) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) ? props.input.value.children.map(helpers.normalize) : [{ type: "p", children: [{ type: "text", text: "" }] }];
15026
+ return ((_b = (_a2 = input.value) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) ? input.value.children.map(helpers.normalize) : [{ type: "p", children: [{ type: "text", text: "" }] }];
15134
15027
  },
15135
15028
  []
15136
15029
  );
@@ -15158,7 +15051,7 @@ const RichEditor = (props) => {
15158
15051
  ),
15159
15052
  []
15160
15053
  );
15161
- const tempId = [props.tinaForm.id, props.input.name].join(".");
15054
+ const tempId = [tinaForm.id, input.name].join(".");
15162
15055
  const id = React__default.useMemo(() => uuid() + tempId, [tempId]);
15163
15056
  const ref = React__default.useRef(null);
15164
15057
  React__default.useEffect(() => {
@@ -15168,13 +15061,13 @@ const RichEditor = (props) => {
15168
15061
  const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
15169
15062
  '[role="textbox"]'
15170
15063
  );
15171
- if (props.field.experimental_focusIntent && plateElement) {
15064
+ if (field.experimental_focusIntent && plateElement) {
15172
15065
  if (plateElement)
15173
15066
  plateElement.focus();
15174
15067
  }
15175
15068
  }, 100);
15176
15069
  }
15177
- }, [props.field.experimental_focusIntent, ref]);
15070
+ }, [field.experimental_focusIntent, ref]);
15178
15071
  return /* @__PURE__ */ React__default.createElement("div", { ref }, /* @__PURE__ */ React__default.createElement(
15179
15072
  Plate,
15180
15073
  {
@@ -15182,7 +15075,7 @@ const RichEditor = (props) => {
15182
15075
  initialValue,
15183
15076
  plugins: plugins$2,
15184
15077
  onChange: (value) => {
15185
- props.input.onChange({
15078
+ input.onChange({
15186
15079
  type: "root",
15187
15080
  children: value
15188
15081
  });
@@ -15191,12 +15084,12 @@ const RichEditor = (props) => {
15191
15084
  /* @__PURE__ */ React__default.createElement(TooltipProvider, null, /* @__PURE__ */ React__default.createElement(
15192
15085
  ToolbarProvider,
15193
15086
  {
15194
- tinaForm: props.tinaForm,
15195
- templates: props.field.templates,
15196
- overrides: (_a = props.field) == null ? void 0 : _a.toolbarOverride
15087
+ tinaForm,
15088
+ templates: field.templates,
15089
+ overrides: (field == null ? void 0 : field.toolbarOverride) ? field.toolbarOverride : field.overrides
15197
15090
  },
15198
15091
  /* @__PURE__ */ React__default.createElement(FixedToolbar, null, /* @__PURE__ */ React__default.createElement(FixedToolbarButtons, null)),
15199
- /* @__PURE__ */ React__default.createElement(FloatingToolbar, null, /* @__PURE__ */ React__default.createElement(FloatingToolbarButtons, null))
15092
+ ((_a = field == null ? void 0 : field.overrides) == null ? void 0 : _a.showFloatingToolbar) !== false ? /* @__PURE__ */ React__default.createElement(FloatingToolbar, null, /* @__PURE__ */ React__default.createElement(FloatingToolbarButtons, null)) : null
15200
15093
  ), /* @__PURE__ */ React__default.createElement(Editor, null))
15201
15094
  ));
15202
15095
  };
@@ -16384,132 +16277,1209 @@ const ben = [
16384
16277
  "হয়"
16385
16278
  ];
16386
16279
  const bre = [
16280
+ "'blam",
16281
+ "'d",
16282
+ "'m",
16283
+ "'r",
16284
+ "'ta",
16285
+ "'vat",
16286
+ "'z",
16287
+ "'zo",
16387
16288
  "a",
16388
- "ainda",
16389
- "alem",
16390
- "ambas",
16391
- "ambos",
16392
- "antes",
16393
- "ao",
16394
- "aonde",
16395
- "aos",
16396
- "apos",
16397
- "aquele",
16398
- "aqueles",
16399
- "as",
16400
- "assim",
16401
- "com",
16402
- "como",
16403
- "contra",
16404
- "contudo",
16405
- "cuja",
16406
- "cujas",
16407
- "cujo",
16408
- "cujos",
16289
+ "a:",
16290
+ "aba",
16291
+ "abalamour",
16292
+ "abaoe",
16293
+ "ac'hane",
16294
+ "ac'hanoc'h",
16295
+ "ac'hanomp",
16296
+ "ac'hanon",
16297
+ "ac'hanout",
16298
+ "adal",
16299
+ "adalek",
16300
+ "adarre",
16301
+ "ae",
16302
+ "aec'h",
16303
+ "aed",
16304
+ "aemp",
16305
+ "aen",
16306
+ "aent",
16307
+ "aes",
16308
+ "afe",
16309
+ "afec'h",
16310
+ "afed",
16311
+ "afemp",
16312
+ "afen",
16313
+ "afent",
16314
+ "afes",
16315
+ "ag",
16316
+ "ah",
16317
+ "aimp",
16318
+ "aint",
16319
+ "aio",
16320
+ "aiou",
16321
+ "aje",
16322
+ "ajec'h",
16323
+ "ajed",
16324
+ "ajemp",
16325
+ "ajen",
16326
+ "ajent",
16327
+ "ajes",
16328
+ "al",
16329
+ "alato",
16330
+ "alies",
16331
+ "aliesañ",
16332
+ "alkent",
16333
+ "all",
16334
+ "allas",
16335
+ "allo",
16336
+ "allô",
16337
+ "am",
16338
+ "amañ",
16339
+ "amzer",
16340
+ "an",
16341
+ "anezhañ",
16342
+ "anezhe",
16343
+ "anezhi",
16344
+ "anezho",
16345
+ "anvet",
16346
+ "aon",
16347
+ "aotren",
16348
+ "ar",
16349
+ "arall",
16350
+ "araok",
16351
+ "araoki",
16352
+ "araozañ",
16353
+ "araozo",
16354
+ "araozoc'h",
16355
+ "araozomp",
16356
+ "araozon",
16357
+ "araozor",
16358
+ "araozout",
16359
+ "arbenn",
16360
+ "arre",
16361
+ "atalek",
16362
+ "atav",
16363
+ "az",
16364
+ "azalek",
16365
+ "azirazañ",
16366
+ "azirazi",
16367
+ "azirazo",
16368
+ "azirazoc'h",
16369
+ "azirazomp",
16370
+ "azirazon",
16371
+ "azirazor",
16372
+ "azirazout",
16373
+ "b:",
16374
+ "ba",
16375
+ "ba'l",
16376
+ "ba'n",
16377
+ "ba'r",
16378
+ "bad",
16379
+ "bah",
16380
+ "bal",
16381
+ "ban",
16382
+ "bar",
16383
+ "bastañ",
16384
+ "befe",
16385
+ "bell",
16386
+ "benaos",
16387
+ "benn",
16388
+ "bennag",
16389
+ "bennak",
16390
+ "bennozh",
16391
+ "bep",
16392
+ "bepred",
16393
+ "berr",
16394
+ "berzh",
16395
+ "bet",
16396
+ "betek",
16397
+ "betra",
16398
+ "bev",
16399
+ "bevet",
16400
+ "bez",
16401
+ "bezañ",
16402
+ "beze",
16403
+ "bezent",
16404
+ "bezet",
16405
+ "bezh",
16406
+ "bezit",
16407
+ "bezomp",
16408
+ "bihan",
16409
+ "bije",
16410
+ "biou",
16411
+ "biskoazh",
16412
+ "blam",
16413
+ "bo",
16414
+ "boa",
16415
+ "bominapl",
16416
+ "boudoudom",
16417
+ "bouez",
16418
+ "boull",
16419
+ "boum",
16420
+ "bout",
16421
+ "bras",
16422
+ "brasañ",
16423
+ "brav",
16424
+ "bravo",
16425
+ "bremañ",
16426
+ "bres",
16427
+ "brokenn",
16428
+ "bronn",
16429
+ "brrr",
16430
+ "brutal",
16431
+ "buhezek",
16432
+ "c'h:",
16433
+ "c'haout",
16434
+ "c'he",
16435
+ "c'hem",
16436
+ "c'herz",
16437
+ "c'heñver",
16438
+ "c'hichen",
16439
+ "c'hiz",
16440
+ "c'hoazh",
16441
+ "c'horre",
16442
+ "c'houde",
16443
+ "c'houst",
16444
+ "c'hreiz",
16445
+ "c'hwec'h",
16446
+ "c'hwec'hvet",
16447
+ "c'hwezek",
16448
+ "c'hwi",
16449
+ "ch:",
16450
+ "chaous",
16451
+ "chik",
16452
+ "chit",
16453
+ "chom",
16454
+ "chut",
16455
+ "d'",
16456
+ "d'al",
16457
+ "d'an",
16458
+ "d'ar",
16459
+ "d'az",
16460
+ "d'e",
16461
+ "d'he",
16462
+ "d'ho",
16463
+ "d'hol",
16464
+ "d'hon",
16465
+ "d'hor",
16466
+ "d'o",
16467
+ "d'ober",
16468
+ "d'ul",
16469
+ "d'un",
16470
+ "d'ur",
16471
+ "d:",
16409
16472
  "da",
16410
- "das",
16411
- "de",
16412
- "dela",
16413
- "dele",
16414
- "deles",
16415
- "demais",
16416
- "depois",
16417
- "desde",
16418
- "desta",
16419
- "deste",
16420
- "dispoe",
16421
- "dispoem",
16422
- "diversa",
16423
- "diversas",
16424
- "diversos",
16473
+ "dak",
16474
+ "daka",
16475
+ "dal",
16476
+ "dalbezh",
16477
+ "dalc'hmat",
16478
+ "dalit",
16479
+ "damdost",
16480
+ "damheñvel",
16481
+ "damm",
16482
+ "dan",
16483
+ "danvez",
16484
+ "dao",
16485
+ "daol",
16486
+ "daonet",
16487
+ "daou",
16488
+ "daoust",
16489
+ "daouzek",
16490
+ "daouzekvet",
16491
+ "darn",
16492
+ "dastrewiñ",
16493
+ "dav",
16494
+ "davedoc'h",
16495
+ "davedomp",
16496
+ "davedon",
16497
+ "davedor",
16498
+ "davedout",
16499
+ "davet",
16500
+ "davetañ",
16501
+ "davete",
16502
+ "daveti",
16503
+ "daveto",
16504
+ "defe",
16505
+ "dehou",
16506
+ "dek",
16507
+ "dekvet",
16508
+ "den",
16509
+ "deoc'h",
16510
+ "deomp",
16511
+ "deor",
16512
+ "derc'hel",
16513
+ "deus",
16514
+ "dez",
16515
+ "deze",
16516
+ "dezhañ",
16517
+ "dezhe",
16518
+ "dezhi",
16519
+ "dezho",
16520
+ "di",
16521
+ "diabarzh",
16522
+ "diagent",
16523
+ "diar",
16524
+ "diaraok",
16525
+ "diavaez",
16526
+ "dibaoe",
16527
+ "dibaot",
16528
+ "dibar",
16529
+ "dic'halañ",
16530
+ "didiac'h",
16531
+ "dienn",
16532
+ "difer",
16533
+ "diganeoc'h",
16534
+ "diganeomp",
16535
+ "diganeor",
16536
+ "diganimp",
16537
+ "diganin",
16538
+ "diganit",
16539
+ "digant",
16540
+ "digantañ",
16541
+ "digante",
16542
+ "diganti",
16543
+ "diganto",
16544
+ "digemmesk",
16545
+ "diget",
16546
+ "digor",
16547
+ "digoret",
16548
+ "dija",
16549
+ "dije",
16550
+ "dimp",
16551
+ "din",
16552
+ "dinaou",
16553
+ "dindan",
16554
+ "dindanañ",
16555
+ "dindani",
16556
+ "dindano",
16557
+ "dindanoc'h",
16558
+ "dindanomp",
16559
+ "dindanon",
16560
+ "dindanor",
16561
+ "dindanout",
16562
+ "dioutañ",
16563
+ "dioute",
16564
+ "diouti",
16565
+ "diouto",
16566
+ "diouzh",
16567
+ "diouzhin",
16568
+ "diouzhit",
16569
+ "diouzhoc'h",
16570
+ "diouzhomp",
16571
+ "diouzhor",
16572
+ "dirak",
16573
+ "dirazañ",
16574
+ "dirazi",
16575
+ "dirazo",
16576
+ "dirazoc'h",
16577
+ "dirazomp",
16578
+ "dirazon",
16579
+ "dirazor",
16580
+ "dirazout",
16581
+ "disheñvel",
16582
+ "dispar",
16583
+ "distank",
16584
+ "dister",
16585
+ "disterañ",
16586
+ "disterig",
16587
+ "distro",
16588
+ "dit",
16589
+ "divaez",
16590
+ "diwar",
16591
+ "diwezhat",
16592
+ "diwezhañ",
16425
16593
  "do",
16426
- "dos",
16427
- "durante",
16594
+ "doa",
16595
+ "doare",
16596
+ "dont",
16597
+ "dost",
16598
+ "doue",
16599
+ "douetus",
16600
+ "douez",
16601
+ "doug",
16602
+ "draou",
16603
+ "draoñ",
16604
+ "dre",
16605
+ "drede",
16606
+ "dreist",
16607
+ "dreistañ",
16608
+ "dreisti",
16609
+ "dreisto",
16610
+ "dreistoc'h",
16611
+ "dreistomp",
16612
+ "dreiston",
16613
+ "dreistor",
16614
+ "dreistout",
16615
+ "drek",
16616
+ "dreñv",
16617
+ "dring",
16618
+ "dro",
16619
+ "du",
16428
16620
  "e",
16429
- "ela",
16430
- "elas",
16431
- "ele",
16432
- "eles",
16621
+ "e:",
16622
+ "eas",
16623
+ "ebet",
16624
+ "ec'h",
16625
+ "edo",
16626
+ "edoc'h",
16627
+ "edod",
16628
+ "edomp",
16629
+ "edon",
16630
+ "edont",
16631
+ "edos",
16632
+ "eer",
16633
+ "eeun",
16634
+ "efed",
16635
+ "egedoc'h",
16636
+ "egedomp",
16637
+ "egedon",
16638
+ "egedor",
16639
+ "egedout",
16640
+ "eget",
16641
+ "egetañ",
16642
+ "egete",
16643
+ "egeti",
16644
+ "egeto",
16645
+ "eh",
16646
+ "eil",
16647
+ "eilvet",
16648
+ "eizh",
16649
+ "eizhvet",
16650
+ "ejoc'h",
16651
+ "ejod",
16652
+ "ejomp",
16653
+ "ejont",
16654
+ "ejout",
16655
+ "el",
16433
16656
  "em",
16434
- "entao",
16435
- "entre",
16436
- "essa",
16437
- "essas",
16438
- "esse",
16439
- "esses",
16440
- "esta",
16441
- "estas",
16442
- "este",
16443
- "estes",
16657
+ "emaint",
16658
+ "emaoc'h",
16659
+ "emaomp",
16660
+ "emaon",
16661
+ "emaout",
16662
+ "emañ",
16663
+ "eme",
16664
+ "emeur",
16665
+ "emezañ",
16666
+ "emezi",
16667
+ "emezo",
16668
+ "emezoc'h",
16669
+ "emezomp",
16670
+ "emezon",
16671
+ "emezout",
16672
+ "emporzhiañ",
16673
+ "en",
16674
+ "end",
16675
+ "endan",
16676
+ "endra",
16677
+ "enep",
16678
+ "ennañ",
16679
+ "enni",
16680
+ "enno",
16681
+ "ennoc'h",
16682
+ "ennomp",
16683
+ "ennon",
16684
+ "ennor",
16685
+ "ennout",
16686
+ "enta",
16687
+ "eo",
16688
+ "eomp",
16689
+ "eont",
16690
+ "eor",
16691
+ "eot",
16692
+ "er",
16693
+ "erbet",
16694
+ "erfin",
16695
+ "esa",
16696
+ "esae",
16697
+ "espar",
16698
+ "estlamm",
16699
+ "estrañj",
16700
+ "eta",
16701
+ "etre",
16702
+ "etreoc'h",
16703
+ "etrezo",
16704
+ "etrezoc'h",
16705
+ "etrezomp",
16706
+ "etrezor",
16707
+ "euh",
16708
+ "eur",
16709
+ "eus",
16710
+ "evel",
16711
+ "evelato",
16712
+ "eveldoc'h",
16713
+ "eveldomp",
16714
+ "eveldon",
16715
+ "eveldor",
16716
+ "eveldout",
16717
+ "evelkent",
16718
+ "eveltañ",
16719
+ "evelte",
16720
+ "evelti",
16721
+ "evelto",
16722
+ "evidoc'h",
16723
+ "evidomp",
16724
+ "evidon",
16725
+ "evidor",
16726
+ "evidout",
16727
+ "evit",
16728
+ "evitañ",
16729
+ "evite",
16730
+ "eviti",
16731
+ "evito",
16732
+ "ez",
16733
+ "eñ",
16734
+ "f:",
16735
+ "fac'h",
16736
+ "fall",
16737
+ "fed",
16738
+ "feiz",
16739
+ "fenn",
16740
+ "fezh",
16741
+ "fin",
16742
+ "finsalvet",
16743
+ "foei",
16744
+ "fouilhezañ",
16745
+ "g:",
16746
+ "gallout",
16747
+ "ganeoc'h",
16748
+ "ganeomp",
16749
+ "ganin",
16750
+ "ganit",
16751
+ "gant",
16752
+ "gantañ",
16753
+ "ganti",
16754
+ "ganto",
16755
+ "gaout",
16756
+ "gast",
16757
+ "gein",
16758
+ "gellout",
16759
+ "genndost",
16760
+ "gentañ",
16761
+ "ger",
16762
+ "gerz",
16763
+ "get",
16764
+ "geñver",
16765
+ "gichen",
16766
+ "gin",
16767
+ "giz",
16768
+ "glan",
16769
+ "gloev",
16770
+ "goll",
16771
+ "gorre",
16772
+ "goude",
16773
+ "gouez",
16774
+ "gouezit",
16775
+ "gouezomp",
16776
+ "goulz",
16777
+ "gounnar",
16778
+ "gour",
16779
+ "goust",
16780
+ "gouze",
16781
+ "gouzout",
16782
+ "gra",
16783
+ "grak",
16784
+ "grec'h",
16785
+ "greiz",
16786
+ "grenn",
16787
+ "greomp",
16788
+ "grit",
16789
+ "groñs",
16790
+ "gutez",
16791
+ "gwall",
16792
+ "gwashoc'h",
16793
+ "gwazh",
16794
+ "gwech",
16795
+ "gwechall",
16796
+ "gwechoù",
16797
+ "gwell",
16798
+ "gwezh",
16799
+ "gwezhall",
16800
+ "gwezharall",
16801
+ "gwezhoù",
16802
+ "gwig",
16803
+ "gwirionez",
16804
+ "gwitibunan",
16805
+ "gêr",
16806
+ "h:",
16444
16807
  "ha",
16445
- "isso",
16446
- "isto",
16447
- "logo",
16448
- "mais",
16449
- "mas",
16450
- "mediante",
16451
- "menos",
16452
- "mesma",
16453
- "mesmas",
16454
- "mesmo",
16455
- "mesmos",
16808
+ "hag",
16809
+ "han",
16810
+ "hanter",
16811
+ "hanterc'hantad",
16812
+ "hanterkantved",
16813
+ "harz",
16814
+ "hañ",
16815
+ "hañval",
16816
+ "he",
16817
+ "hebioù",
16818
+ "hec'h",
16819
+ "hei",
16820
+ "hein",
16821
+ "hem",
16822
+ "hemañ",
16823
+ "hen",
16824
+ "hend",
16825
+ "henhont",
16826
+ "henn",
16827
+ "hennezh",
16828
+ "hent",
16829
+ "hep",
16830
+ "hervez",
16831
+ "hervezañ",
16832
+ "hervezi",
16833
+ "hervezo",
16834
+ "hervezoc'h",
16835
+ "hervezomp",
16836
+ "hervezon",
16837
+ "hervezor",
16838
+ "hervezout",
16839
+ "heul",
16840
+ "heuliañ",
16841
+ "hevelep",
16842
+ "heverk",
16843
+ "heñvel",
16844
+ "heñvelat",
16845
+ "heñvelañ",
16846
+ "heñveliñ",
16847
+ "heñveloc'h",
16848
+ "heñvelout",
16849
+ "hi",
16850
+ "hilh",
16851
+ "hini",
16852
+ "hirie",
16853
+ "hirio",
16854
+ "hiziv",
16855
+ "hiziviken",
16856
+ "ho",
16857
+ "hoaliñ",
16858
+ "hoc'h",
16859
+ "hogen",
16860
+ "hogos",
16861
+ "hogozik",
16862
+ "hol",
16863
+ "holl",
16864
+ "holà",
16865
+ "homañ",
16866
+ "hon",
16867
+ "honhont",
16868
+ "honnezh",
16869
+ "hont",
16870
+ "hop",
16871
+ "hopala",
16872
+ "hor",
16873
+ "hou",
16874
+ "houp",
16875
+ "hudu",
16876
+ "hue",
16877
+ "hui",
16878
+ "hum",
16879
+ "hurrah",
16880
+ "i",
16881
+ "i:",
16882
+ "in",
16883
+ "int",
16884
+ "is",
16885
+ "ispisial",
16886
+ "isurzhiet",
16887
+ "it",
16888
+ "ivez",
16889
+ "izelañ",
16890
+ "j:",
16891
+ "just",
16892
+ "k:",
16893
+ "kae",
16894
+ "kaer",
16895
+ "kalon",
16896
+ "kalz",
16897
+ "kant",
16898
+ "kaout",
16899
+ "kar",
16900
+ "kazi",
16901
+ "keid",
16902
+ "kein",
16903
+ "keit",
16904
+ "kel",
16905
+ "kellies",
16906
+ "keloù",
16907
+ "kement",
16908
+ "ken",
16909
+ "kenkent",
16910
+ "kenkoulz",
16911
+ "kenment",
16912
+ "kent",
16913
+ "kentañ",
16914
+ "kentizh",
16915
+ "kentoc'h",
16916
+ "kentre",
16917
+ "ker",
16918
+ "kerkent",
16919
+ "kerz",
16920
+ "kerzh",
16921
+ "ket",
16922
+ "keta",
16923
+ "keñver",
16924
+ "keñverel",
16925
+ "keñverius",
16926
+ "kichen",
16927
+ "kichenik",
16928
+ "kit",
16929
+ "kiz",
16930
+ "klak",
16931
+ "klek",
16932
+ "klik",
16933
+ "komprenet",
16934
+ "komz",
16935
+ "kont",
16936
+ "korf",
16937
+ "korre",
16938
+ "koulskoude",
16939
+ "koulz",
16940
+ "koust",
16941
+ "krak",
16942
+ "krampouezh",
16943
+ "krec'h",
16944
+ "kreiz",
16945
+ "kuit",
16946
+ "kwir",
16947
+ "l:",
16948
+ "la",
16949
+ "laez",
16950
+ "laoskel",
16951
+ "laouen",
16952
+ "lavar",
16953
+ "lavaret",
16954
+ "lavarout",
16955
+ "lec'h",
16956
+ "lein",
16957
+ "leizh",
16958
+ "lerc'h",
16959
+ "leun",
16960
+ "leuskel",
16961
+ "lew",
16962
+ "lies",
16963
+ "liesañ",
16964
+ "lod",
16965
+ "lusk",
16966
+ "lâr",
16967
+ "lârout",
16968
+ "m:",
16969
+ "ma",
16970
+ "ma'z",
16971
+ "mac'h",
16972
+ "mac'hat",
16973
+ "mac'hañ",
16974
+ "mac'hoc'h",
16975
+ "mad",
16976
+ "maez",
16977
+ "maksimal",
16978
+ "mann",
16979
+ "mar",
16980
+ "mard",
16981
+ "marg",
16982
+ "marzh",
16983
+ "mat",
16984
+ "mañ",
16985
+ "me",
16986
+ "memes",
16987
+ "memestra",
16988
+ "merkapl",
16989
+ "mersi",
16990
+ "mes",
16991
+ "mesk",
16992
+ "met",
16993
+ "meur",
16994
+ "mil",
16995
+ "minimal",
16996
+ "moan",
16997
+ "moaniaat",
16998
+ "mod",
16999
+ "mont",
17000
+ "mout",
17001
+ "mui",
17002
+ "muiañ",
17003
+ "muioc'h",
17004
+ "n",
17005
+ "n'",
17006
+ "n:",
16456
17007
  "na",
16457
- "nao",
16458
- "nas",
16459
- "nem",
16460
- "nesse",
16461
- "neste",
16462
- "nos",
17008
+ "nag",
17009
+ "naontek",
17010
+ "naturel",
17011
+ "nav",
17012
+ "navet",
17013
+ "ne",
17014
+ "nebeudig",
17015
+ "nebeut",
17016
+ "nebeutañ",
17017
+ "nebeutoc'h",
17018
+ "neketa",
17019
+ "nemedoc'h",
17020
+ "nemedomp",
17021
+ "nemedon",
17022
+ "nemedor",
17023
+ "nemedout",
17024
+ "nemet",
17025
+ "nemetañ",
17026
+ "nemete",
17027
+ "nemeti",
17028
+ "nemeto",
17029
+ "nemeur",
17030
+ "neoac'h",
17031
+ "nepell",
17032
+ "nerzh",
17033
+ "nes",
17034
+ "neseser",
17035
+ "netra",
17036
+ "neubeudoù",
17037
+ "neuhe",
17038
+ "neuze",
17039
+ "nevez",
17040
+ "newazh",
17041
+ "nez",
17042
+ "ni",
17043
+ "nikun",
17044
+ "niverus",
17045
+ "nul",
16463
17046
  "o",
16464
- "os",
16465
- "ou",
16466
- "outra",
16467
- "outras",
16468
- "outro",
16469
- "outros",
16470
- "pelas",
16471
- "pelo",
16472
- "pelos",
16473
- "perante",
16474
- "pois",
16475
- "por",
16476
- "porque",
16477
- "portanto",
16478
- "propios",
16479
- "proprio",
16480
- "quais",
16481
- "qual",
16482
- "qualquer",
16483
- "quando",
16484
- "quanto",
16485
- "que",
16486
- "quem",
16487
- "quer",
17047
+ "o:",
17048
+ "oa",
17049
+ "oac'h",
17050
+ "oad",
17051
+ "oamp",
17052
+ "oan",
17053
+ "oant",
17054
+ "oar",
17055
+ "oas",
17056
+ "ober",
17057
+ "oc'h",
17058
+ "oc'ho",
17059
+ "oc'hola",
17060
+ "oc'hpenn",
17061
+ "oh",
17062
+ "ohe",
17063
+ "ollé",
17064
+ "olole",
17065
+ "olé",
17066
+ "omp",
17067
+ "on",
17068
+ "ordin",
17069
+ "ordinal",
17070
+ "ouejoc'h",
17071
+ "ouejod",
17072
+ "ouejomp",
17073
+ "ouejont",
17074
+ "ouejout",
17075
+ "ouek",
17076
+ "ouezas",
17077
+ "ouezi",
17078
+ "ouezimp",
17079
+ "ouezin",
17080
+ "ouezint",
17081
+ "ouezis",
17082
+ "ouezo",
17083
+ "ouezoc'h",
17084
+ "ouezor",
17085
+ "ouf",
17086
+ "oufe",
17087
+ "oufec'h",
17088
+ "oufed",
17089
+ "oufemp",
17090
+ "oufen",
17091
+ "oufent",
17092
+ "oufes",
17093
+ "ouie",
17094
+ "ouiec'h",
17095
+ "ouied",
17096
+ "ouiemp",
17097
+ "ouien",
17098
+ "ouient",
17099
+ "ouies",
17100
+ "ouije",
17101
+ "ouijec'h",
17102
+ "ouijed",
17103
+ "ouijemp",
17104
+ "ouijen",
17105
+ "ouijent",
17106
+ "ouijes",
17107
+ "out",
17108
+ "outañ",
17109
+ "outi",
17110
+ "outo",
17111
+ "ouzer",
17112
+ "ouzh",
17113
+ "ouzhin",
17114
+ "ouzhit",
17115
+ "ouzhoc'h",
17116
+ "ouzhomp",
17117
+ "ouzhor",
17118
+ "ouzhpenn",
17119
+ "ouzhpennik",
17120
+ "ouzoc'h",
17121
+ "ouzomp",
17122
+ "ouzon",
17123
+ "ouzont",
17124
+ "ouzout",
17125
+ "p'",
17126
+ "p:",
17127
+ "pa",
17128
+ "pad",
17129
+ "padal",
17130
+ "paf",
17131
+ "pan",
17132
+ "panevedeoc'h",
17133
+ "panevedo",
17134
+ "panevedomp",
17135
+ "panevedon",
17136
+ "panevedout",
17137
+ "panevet",
17138
+ "panevetañ",
17139
+ "paneveti",
17140
+ "pas",
17141
+ "paseet",
17142
+ "pe",
17143
+ "peadra",
17144
+ "peder",
17145
+ "pedervet",
17146
+ "pedervetvet",
17147
+ "pefe",
17148
+ "pegeit",
17149
+ "pegement",
17150
+ "pegen",
17151
+ "pegiz",
17152
+ "pegoulz",
17153
+ "pehini",
17154
+ "pelec'h",
17155
+ "pell",
17156
+ "pemod",
17157
+ "pemp",
17158
+ "pempved",
17159
+ "pemzek",
17160
+ "penaos",
17161
+ "penn",
17162
+ "peogwir",
17163
+ "peotramant",
17164
+ "pep",
17165
+ "perak",
17166
+ "perc'hennañ",
17167
+ "pergen",
17168
+ "permetiñ",
17169
+ "peseurt",
17170
+ "pet",
17171
+ "petiaoul",
17172
+ "petoare",
17173
+ "petra",
17174
+ "peur",
17175
+ "peurgetket",
17176
+ "peurheñvel",
17177
+ "peurliesañ",
17178
+ "peurvuiañ",
17179
+ "peus",
17180
+ "peustost",
17181
+ "peuz",
17182
+ "pevar",
17183
+ "pevare",
17184
+ "pevarevet",
17185
+ "pevarzek",
17186
+ "pez",
17187
+ "peze",
17188
+ "pezh",
17189
+ "pff",
17190
+ "pfft",
17191
+ "pfut",
17192
+ "picher",
17193
+ "pif",
17194
+ "pife",
17195
+ "pign",
17196
+ "pije",
17197
+ "pikol",
17198
+ "pitiaoul",
17199
+ "piv",
17200
+ "plaouf",
17201
+ "plok",
17202
+ "plouf",
17203
+ "po",
17204
+ "poa",
17205
+ "poelladus",
17206
+ "pof",
17207
+ "pok",
17208
+ "posupl",
17209
+ "pouah",
17210
+ "pourc'henn",
17211
+ "prest",
17212
+ "prestik",
17213
+ "prim",
17214
+ "prin",
17215
+ "provostapl",
17216
+ "pst",
17217
+ "pu",
17218
+ "pur",
17219
+ "r:",
17220
+ "ra",
17221
+ "rae",
17222
+ "raec'h",
17223
+ "raed",
17224
+ "raemp",
17225
+ "raen",
17226
+ "raent",
17227
+ "raes",
17228
+ "rafe",
17229
+ "rafec'h",
17230
+ "rafed",
17231
+ "rafemp",
17232
+ "rafen",
17233
+ "rafent",
17234
+ "rafes",
17235
+ "rag",
17236
+ "raimp",
17237
+ "raint",
17238
+ "raio",
17239
+ "raje",
17240
+ "rajec'h",
17241
+ "rajed",
17242
+ "rajemp",
17243
+ "rajen",
17244
+ "rajent",
17245
+ "rajes",
17246
+ "rak",
17247
+ "ral",
17248
+ "ran",
17249
+ "rankout",
17250
+ "raok",
17251
+ "razh",
17252
+ "re",
17253
+ "reas",
17254
+ "reer",
17255
+ "regennoù",
17256
+ "reiñ",
17257
+ "rejoc'h",
17258
+ "rejod",
17259
+ "rejomp",
17260
+ "rejont",
17261
+ "rejout",
17262
+ "rener",
17263
+ "rentañ",
17264
+ "reoc'h",
17265
+ "reomp",
17266
+ "reont",
17267
+ "reor",
17268
+ "reot",
17269
+ "resis",
17270
+ "ret",
17271
+ "reve",
17272
+ "rez",
17273
+ "ri",
17274
+ "rik",
17275
+ "rin",
17276
+ "ris",
17277
+ "rit",
17278
+ "rouez",
17279
+ "s:",
17280
+ "sac'h",
17281
+ "sant",
17282
+ "sav",
17283
+ "sañset",
16488
17284
  "se",
16489
- "seja",
16490
- "sem",
16491
- "sendo",
16492
- "seu",
16493
- "seus",
16494
- "sob",
16495
- "sobre",
16496
- "sua",
16497
- "suas",
17285
+ "sed",
17286
+ "seitek",
17287
+ "seizh",
17288
+ "seizhvet",
17289
+ "sell",
17290
+ "sellit",
17291
+ "ser",
17292
+ "setu",
17293
+ "seul",
17294
+ "seurt",
17295
+ "siwazh",
17296
+ "skignañ",
17297
+ "skoaz",
17298
+ "skouer",
17299
+ "sort",
17300
+ "souden",
17301
+ "souvitañ",
17302
+ "soñj",
17303
+ "speriañ",
17304
+ "spririñ",
17305
+ "stad",
17306
+ "stlabezañ",
17307
+ "stop",
17308
+ "stranañ",
17309
+ "strewiñ",
17310
+ "strishaat",
17311
+ "stumm",
17312
+ "sujed",
17313
+ "surtoud",
17314
+ "t:",
17315
+ "ta",
17316
+ "taer",
17317
+ "tailh",
17318
+ "tak",
16498
17319
  "tal",
16499
- "tambem",
16500
- "teu",
17320
+ "talvoudegezh",
17321
+ "tamm",
17322
+ "tanav",
17323
+ "taol",
17324
+ "te",
17325
+ "techet",
17326
+ "teir",
17327
+ "teirvet",
17328
+ "telt",
17329
+ "teltenn",
16501
17330
  "teus",
16502
- "toda",
16503
- "todas",
16504
- "todo",
16505
- "todos",
16506
- "tua",
16507
- "tuas",
16508
- "tudo",
16509
- "um",
16510
- "uma",
16511
- "umas",
16512
- "uns"
17331
+ "teut",
17332
+ "teuteu",
17333
+ "ti",
17334
+ "tik",
17335
+ "toa",
17336
+ "tok",
17337
+ "tost",
17338
+ "tostig",
17339
+ "toud",
17340
+ "touesk",
17341
+ "touez",
17342
+ "toull",
17343
+ "tra",
17344
+ "trantenn",
17345
+ "traoñ",
17346
+ "trawalc'h",
17347
+ "tre",
17348
+ "trede",
17349
+ "tregont",
17350
+ "tremenet",
17351
+ "tri",
17352
+ "trivet",
17353
+ "triwec'h",
17354
+ "trizek",
17355
+ "tro",
17356
+ "trugarez",
17357
+ "trumm",
17358
+ "tsoin",
17359
+ "tsouin",
17360
+ "tu",
17361
+ "tud",
17362
+ "u:",
17363
+ "ugent",
17364
+ "uhel",
17365
+ "uhelañ",
17366
+ "ul",
17367
+ "un",
17368
+ "unan",
17369
+ "unanez",
17370
+ "unanig",
17371
+ "unnek",
17372
+ "unnekvet",
17373
+ "ur",
17374
+ "urzh",
17375
+ "us",
17376
+ "v:",
17377
+ "va",
17378
+ "vale",
17379
+ "van",
17380
+ "vare",
17381
+ "vat",
17382
+ "vefe",
17383
+ "vefec'h",
17384
+ "vefed",
17385
+ "vefemp",
17386
+ "vefen",
17387
+ "vefent",
17388
+ "vefes",
17389
+ "vesk",
17390
+ "vete",
17391
+ "vez",
17392
+ "vezan",
17393
+ "vezañ",
17394
+ "veze",
17395
+ "vezec'h",
17396
+ "vezed",
17397
+ "vezemp",
17398
+ "vezen",
17399
+ "vezent",
17400
+ "vezer",
17401
+ "vezes",
17402
+ "vezez",
17403
+ "vezit",
17404
+ "vezomp",
17405
+ "vezont",
17406
+ "vi",
17407
+ "vihan",
17408
+ "vihanañ",
17409
+ "vije",
17410
+ "vijec'h",
17411
+ "vijed",
17412
+ "vijemp",
17413
+ "vijen",
17414
+ "vijent",
17415
+ "vijes",
17416
+ "viken",
17417
+ "vimp",
17418
+ "vin",
17419
+ "vint",
17420
+ "vior",
17421
+ "viot",
17422
+ "virviken",
17423
+ "viskoazh",
17424
+ "vlan",
17425
+ "vlaou",
17426
+ "vo",
17427
+ "vod",
17428
+ "voe",
17429
+ "voec'h",
17430
+ "voed",
17431
+ "voemp",
17432
+ "voen",
17433
+ "voent",
17434
+ "voes",
17435
+ "vont",
17436
+ "vostapl",
17437
+ "vrac'h",
17438
+ "vrasañ",
17439
+ "vremañ",
17440
+ "w:",
17441
+ "walc'h",
17442
+ "war",
17443
+ "warnañ",
17444
+ "warni",
17445
+ "warno",
17446
+ "warnoc'h",
17447
+ "warnomp",
17448
+ "warnon",
17449
+ "warnor",
17450
+ "warnout",
17451
+ "wazh",
17452
+ "wech",
17453
+ "wechoù",
17454
+ "well",
17455
+ "y:",
17456
+ "you",
17457
+ "youadenn",
17458
+ "youc'hadenn",
17459
+ "youc'hou",
17460
+ "z:",
17461
+ "za",
17462
+ "zan",
17463
+ "zaw",
17464
+ "zeu",
17465
+ "zi",
17466
+ "ziar",
17467
+ "zigarez",
17468
+ "ziget",
17469
+ "zindan",
17470
+ "zioc'h",
17471
+ "ziouzh",
17472
+ "zirak",
17473
+ "zivout",
17474
+ "ziwar",
17475
+ "ziwezhañ",
17476
+ "zo",
17477
+ "zoken",
17478
+ "zokenoc'h",
17479
+ "zouesk",
17480
+ "zouez",
17481
+ "zro",
17482
+ "zu"
16513
17483
  ];
16514
17484
  const bul = [
16515
17485
  "а",
@@ -28165,22 +29135,32 @@ const tur = [
28165
29135
  "şöyle"
28166
29136
  ];
28167
29137
  const ukr = [
29138
+ "а",
29139
+ "або",
28168
29140
  "авжеж",
28169
29141
  "адже",
29142
+ "аж",
28170
29143
  "але",
29144
+ "ані",
28171
29145
  "б",
28172
29146
  "без",
29147
+ "би",
29148
+ "бо",
28173
29149
  "був",
28174
29150
  "була",
28175
29151
  "були",
28176
29152
  "було",
28177
29153
  "бути",
28178
29154
  "більш",
29155
+ "в",
28179
29156
  "вам",
29157
+ "вами",
28180
29158
  "вас",
28181
29159
  "весь",
29160
+ "вже",
28182
29161
  "вздовж",
28183
29162
  "ви",
29163
+ "від",
28184
29164
  "вниз",
28185
29165
  "внизу",
28186
29166
  "вона",
@@ -28189,55 +29169,138 @@ const ukr = [
28189
29169
  "все",
28190
29170
  "всередині",
28191
29171
  "всіх",
29172
+ "вся",
28192
29173
  "від",
28193
29174
  "він",
28194
29175
  "да",
28195
29176
  "давай",
28196
29177
  "давати",
28197
29178
  "де",
29179
+ "десь",
28198
29180
  "дещо",
28199
29181
  "для",
28200
29182
  "до",
29183
+ "є",
29184
+ "ж",
29185
+ "же",
28201
29186
  "з",
29187
+ "за",
28202
29188
  "завжди",
28203
29189
  "замість",
29190
+ "зі",
29191
+ "і",
29192
+ "із",
29193
+ "інших",
29194
+ "її",
29195
+ "їй",
29196
+ "їм",
29197
+ "їх",
28204
29198
  "й",
29199
+ "його",
29200
+ "йому",
28205
29201
  "коли",
28206
29202
  "ледве",
29203
+ "лиш",
28207
29204
  "майже",
29205
+ "мене",
29206
+ "мені",
28208
29207
  "ми",
29208
+ "між",
29209
+ "мій",
29210
+ "мною",
29211
+ "мов",
29212
+ "мого",
29213
+ "моєї",
29214
+ "моє",
29215
+ "може",
29216
+ "мої",
29217
+ "моїх",
29218
+ "моя",
29219
+ "на",
29220
+ "над",
28209
29221
  "навколо",
28210
29222
  "навіть",
28211
29223
  "нам",
29224
+ "нами",
29225
+ "нас",
29226
+ "наче",
29227
+ "наш",
29228
+ "не",
29229
+ "нє",
29230
+ "неї",
29231
+ "нема",
29232
+ "немов",
29233
+ "неначе",
29234
+ "нею",
29235
+ "ним",
29236
+ "ними",
29237
+ "них",
29238
+ "ні",
29239
+ "ніби",
29240
+ "ніщо",
29241
+ "нього",
29242
+ "о",
29243
+ "ось",
28212
29244
  "от",
28213
29245
  "отже",
28214
29246
  "отож",
29247
+ "під",
29248
+ "по",
28215
29249
  "поза",
28216
29250
  "про",
28217
29251
  "під",
29252
+ "сам",
29253
+ "сама",
29254
+ "свій",
29255
+ "свої",
29256
+ "своя",
29257
+ "свою",
29258
+ "себе",
29259
+ "собі",
28218
29260
  "та",
29261
+ "там",
28219
29262
  "так",
29263
+ "така",
28220
29264
  "такий",
28221
29265
  "також",
29266
+ "твій",
29267
+ "твого",
29268
+ "твоєї",
29269
+ "твої",
29270
+ "твоя",
28222
29271
  "те",
29272
+ "тебе",
28223
29273
  "ти",
29274
+ "ті",
29275
+ "тільки",
29276
+ "то",
29277
+ "тобі",
29278
+ "тобою",
28224
29279
  "тобто",
29280
+ "тоді",
28225
29281
  "тож",
29282
+ "той",
28226
29283
  "тощо",
29284
+ "тут",
29285
+ "у",
29286
+ "хіба",
29287
+ "хоч",
28227
29288
  "хоча",
28228
29289
  "це",
28229
29290
  "цей",
29291
+ "ці",
29292
+ "ця",
28230
29293
  "чи",
28231
29294
  "чого",
29295
+ "ще",
28232
29296
  "що",
29297
+ "щоб",
29298
+ "щось",
29299
+ "я",
28233
29300
  "як",
29301
+ "яка",
28234
29302
  "який",
28235
- "якої",
28236
- "є",
28237
- "із",
28238
- "інших",
28239
- "їх",
28240
- "її"
29303
+ "якої"
28241
29304
  ];
28242
29305
  const urd = [
28243
29306
  "آئی",
@@ -31868,6 +32931,7 @@ const CollectionListPage = () => {
31868
32931
  const [vars, setVars] = React__default.useState({
31869
32932
  collection: collectionName,
31870
32933
  relativePath: "",
32934
+ relativePathWithoutExtension: "",
31871
32935
  newRelativePath: "",
31872
32936
  filterField: "",
31873
32937
  folderName: "",
@@ -31909,6 +32973,7 @@ const CollectionListPage = () => {
31909
32973
  ...old,
31910
32974
  collection: collectionName,
31911
32975
  relativePath: "",
32976
+ relativePathWithoutExtension: "",
31912
32977
  newRelativePath: "",
31913
32978
  filterField: "",
31914
32979
  startsWith: "",
@@ -31934,6 +32999,7 @@ const CollectionListPage = () => {
31934
32999
  collectionName === vars.collection ? vars : {
31935
33000
  collection: collectionName,
31936
33001
  relativePath: "",
33002
+ relativePathWithoutExtension: "",
31937
33003
  newRelativePath: "",
31938
33004
  filterField: "",
31939
33005
  startsWith: "",
@@ -32035,7 +33101,7 @@ const CollectionListPage = () => {
32035
33101
  ), renameModalOpen && /* @__PURE__ */ React__default.createElement(
32036
33102
  RenameModal,
32037
33103
  {
32038
- filename: vars.relativePath,
33104
+ filename: vars.relativePathWithoutExtension,
32039
33105
  newRelativePath: vars.newRelativePath,
32040
33106
  setNewRelativePath: (newRelativePath) => {
32041
33107
  setVars((vars2) => {
@@ -32356,6 +33422,9 @@ const CollectionListPage = () => {
32356
33422
  setVars((old) => ({
32357
33423
  ...old,
32358
33424
  collection: collectionName,
33425
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
33426
+ "/"
33427
+ ),
32359
33428
  relativePath: document2.node._sys.breadcrumbs.join(
32360
33429
  "/"
32361
33430
  ) + document2.node._sys.extension,
@@ -32378,6 +33447,9 @@ const CollectionListPage = () => {
32378
33447
  setVars((old) => ({
32379
33448
  ...old,
32380
33449
  collection: collectionName,
33450
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
33451
+ "/"
33452
+ ),
32381
33453
  relativePath: document2.node._sys.breadcrumbs.join(
32382
33454
  "/"
32383
33455
  ) + document2.node._sys.extension,
@@ -32590,7 +33662,7 @@ const RenameModal = ({
32590
33662
  newRelativePath,
32591
33663
  setNewRelativePath
32592
33664
  }) => {
32593
- return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React__default.createElement("strong", null, filename), "? TinaCMS uses the filename as the ID; renaming this file could result in unresolved references."), /* @__PURE__ */ React__default.createElement(
33665
+ return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React__default.createElement("strong", null, filename), "?"), /* @__PURE__ */ React__default.createElement(
32594
33666
  BaseTextField,
32595
33667
  {
32596
33668
  placeholder: "Enter a new name for the document's file",
@@ -32605,7 +33677,8 @@ const RenameModal = ({
32605
33677
  onClick: async () => {
32606
33678
  await renameFunc();
32607
33679
  close2();
32608
- }
33680
+ },
33681
+ disabled: !newRelativePath || newRelativePath === filename
32609
33682
  },
32610
33683
  "Rename"
32611
33684
  ))));
@@ -33276,15 +34349,24 @@ const IndexingPage = () => {
33276
34349
  }
33277
34350
  }
33278
34351
  if (state === "creatingPR") {
33279
- const foo = await tinaApi.createPullRequest({
33280
- baseBranch,
33281
- branch,
33282
- title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
33283
- });
33284
- console.log("PR created", foo);
33285
- cms.alerts.success("Pull request created.");
33286
- localStorage.setItem("tina.createBranchState", "done");
33287
- setState("done");
34352
+ try {
34353
+ const foo = await tinaApi.createPullRequest({
34354
+ baseBranch,
34355
+ branch,
34356
+ title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
34357
+ });
34358
+ console.log("PR created", foo);
34359
+ cms.alerts.success("Pull request created.");
34360
+ localStorage.setItem("tina.createBranchState", "done");
34361
+ setState("done");
34362
+ } catch (e) {
34363
+ console.error(e);
34364
+ cms.alerts.error("Failed to create PR");
34365
+ setErrorMessage(
34366
+ "Failed to create PR, please try again. If the problem persists please contact support."
34367
+ );
34368
+ setState("error");
34369
+ }
33288
34370
  }
33289
34371
  if (state === "done") {
33290
34372
  window.location.href = back;