tinacms 0.0.0-ac2003f-20241101002635 → 0.0.0-ac4804a-20250226013045

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
@@ -862,13 +862,23 @@ var __publicField = (obj, key, value) => {
862
862
  className,
863
863
  ...props
864
864
  }) => {
865
+ if (typeof children === "string") {
866
+ return /* @__PURE__ */ React__namespace.createElement(
867
+ "span",
868
+ {
869
+ className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0 ${className}`,
870
+ ...props,
871
+ dangerouslySetInnerHTML: { __html: children }
872
+ }
873
+ );
874
+ }
865
875
  return /* @__PURE__ */ React__namespace.createElement(
866
876
  "span",
867
877
  {
868
878
  className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0 ${className}`,
869
- ...props,
870
- dangerouslySetInnerHTML: { __html: children }
871
- }
879
+ ...props
880
+ },
881
+ children
872
882
  );
873
883
  };
874
884
  const FieldError = ({
@@ -2933,7 +2943,7 @@ flowchart TD
2933
2943
  ),
2934
2944
  [plate.MARK_CODE]: CodeLeaf,
2935
2945
  [plate.MARK_UNDERLINE]: cn$1.withProps(plateCommon.PlateLeaf, { as: "u" }),
2936
- [plate.MARK_STRIKETHROUGH]: cn$1.withProps(plateCommon.PlateLeaf, { as: "s" }),
2946
+ [plate.MARK_STRIKETHROUGH]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React.createElement("s", { ...props.attributes, ...props }),
2937
2947
  [plate.MARK_ITALIC]: cn$1.withProps(plateCommon.PlateLeaf, { as: "em" }),
2938
2948
  [plate.MARK_BOLD]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React.createElement("strong", { ...props.attributes, ...props }),
2939
2949
  [plate.ELEMENT_HR]: ({
@@ -3820,7 +3830,7 @@ flowchart TD
3820
3830
  function _objectWithoutProperties(source, excluded) {
3821
3831
  if (source == null)
3822
3832
  return {};
3823
- var target = _objectWithoutPropertiesLoose$1(source, excluded);
3833
+ var target = _objectWithoutPropertiesLoose(source, excluded);
3824
3834
  var key, i;
3825
3835
  if (Object.getOwnPropertySymbols) {
3826
3836
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -3835,7 +3845,7 @@ flowchart TD
3835
3845
  }
3836
3846
  return target;
3837
3847
  }
3838
- function _objectWithoutPropertiesLoose$1(source, excluded) {
3848
+ function _objectWithoutPropertiesLoose(source, excluded) {
3839
3849
  if (source == null)
3840
3850
  return {};
3841
3851
  var target = {};
@@ -4925,7 +4935,28 @@ flowchart TD
4925
4935
  onChange,
4926
4936
  value,
4927
4937
  step
4928
- }) => /* @__PURE__ */ React__namespace.createElement(Input, { type: "number", step, value, onChange });
4938
+ }) => /* @__PURE__ */ React__namespace.createElement(
4939
+ Input,
4940
+ {
4941
+ type: "number",
4942
+ step,
4943
+ value,
4944
+ onChange: (event) => {
4945
+ const inputValue = event.target.value;
4946
+ const newValue = inputValue === "" ? void 0 : inputValue;
4947
+ if (onChange) {
4948
+ const syntheticEvent = {
4949
+ ...event,
4950
+ target: {
4951
+ ...event.target,
4952
+ value: newValue
4953
+ }
4954
+ };
4955
+ onChange(syntheticEvent);
4956
+ }
4957
+ }
4958
+ }
4959
+ );
4929
4960
  function useCMS() {
4930
4961
  return useCMS$1();
4931
4962
  }
@@ -5166,7 +5197,7 @@ flowchart TD
5166
5197
  side: "bottom",
5167
5198
  className: cn(
5168
5199
  "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",
5169
- "max-h-[30vh] max-w-[30vh] overflow-y-auto",
5200
+ "max-h-[30vh] max-w-[30vw] overflow-y-auto",
5170
5201
  className
5171
5202
  ),
5172
5203
  ...props
@@ -5258,11 +5289,7 @@ flowchart TD
5258
5289
  const node = nodes.find((node2) => node2.id === value);
5259
5290
  return node ? node._internalSys.filename : null;
5260
5291
  };
5261
- const ComboboxDemo = ({
5262
- cms,
5263
- input,
5264
- field
5265
- }) => {
5292
+ const Combobox = ({ cms, input, field }) => {
5266
5293
  const [open2, setOpen] = React__namespace.useState(false);
5267
5294
  const [value, setValue] = React__namespace.useState(input.value);
5268
5295
  const [displayText, setDisplayText] = React__namespace.useState(null);
@@ -5286,17 +5313,17 @@ flowchart TD
5286
5313
  if (loading === true) {
5287
5314
  return /* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
5288
5315
  }
5289
- return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React__namespace.createElement(
5316
+ return /* @__PURE__ */ React__namespace.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React__namespace.createElement(
5290
5317
  Button,
5291
5318
  {
5292
5319
  variant: "outline",
5293
5320
  role: "combobox",
5294
5321
  "aria-expanded": open2,
5295
- className: "w-52 justify-between"
5322
+ className: "w-full justify-between"
5296
5323
  },
5297
5324
  /* @__PURE__ */ React__namespace.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
5298
5325
  open2 ? /* @__PURE__ */ React__namespace.createElement(IoMdArrowDropup, { size: 20 }) : /* @__PURE__ */ React__namespace.createElement(IoMdArrowDropdown, { size: 20 })
5299
- )), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative" }, /* @__PURE__ */ React__namespace.createElement(
5326
+ )), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React__namespace.createElement(
5300
5327
  Command,
5301
5328
  {
5302
5329
  shouldFilter: !field.experimental___filter,
@@ -5320,32 +5347,25 @@ flowchart TD
5320
5347
  }
5321
5348
  ),
5322
5349
  /* @__PURE__ */ React__namespace.createElement(CommandEmpty, null, "No reference found"),
5323
- /* @__PURE__ */ React__namespace.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React__namespace.createElement(
5324
- CommandGroup,
5325
- {
5326
- key: `${collection}-group`,
5327
- heading: collection
5328
- },
5329
- /* @__PURE__ */ React__namespace.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
5330
- const { id, _values } = node;
5331
- return /* @__PURE__ */ React__namespace.createElement(
5332
- OptionComponent,
5333
- {
5334
- id,
5335
- key: id,
5336
- value,
5337
- field,
5338
- _values,
5339
- node,
5340
- onSelect: (currentValue) => {
5341
- setValue(currentValue);
5342
- setOpen(false);
5343
- }
5350
+ /* @__PURE__ */ React__namespace.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React__namespace.createElement(CommandGroup, { key: `${collection}-group`, heading: collection }, /* @__PURE__ */ React__namespace.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
5351
+ const { id, _values } = node;
5352
+ return /* @__PURE__ */ React__namespace.createElement(
5353
+ OptionComponent,
5354
+ {
5355
+ id,
5356
+ key: id,
5357
+ value,
5358
+ field,
5359
+ _values,
5360
+ node,
5361
+ onSelect: (currentValue) => {
5362
+ setValue(currentValue);
5363
+ setOpen(false);
5344
5364
  }
5345
- );
5346
- }))
5347
- ))))
5348
- ))));
5365
+ }
5366
+ );
5367
+ }))))))
5368
+ )));
5349
5369
  };
5350
5370
  const useGetNode = (cms, id) => {
5351
5371
  const [document2, setDocument] = React__namespace.useState(
@@ -5418,7 +5438,7 @@ flowchart TD
5418
5438
  };
5419
5439
  const Reference = ({ input, field }) => {
5420
5440
  const cms = useCMS();
5421
- return /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group" }, /* @__PURE__ */ React__namespace.createElement(ComboboxDemo, { cms, input, field })), /* @__PURE__ */ React__namespace.createElement(ReferenceLink, { cms, input }));
5441
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("div", { className: "relative group" }, /* @__PURE__ */ React__namespace.createElement(Combobox, { cms, input, field })), /* @__PURE__ */ React__namespace.createElement(ReferenceLink, { cms, input }));
5422
5442
  };
5423
5443
  const ButtonToggle = ({
5424
5444
  input,
@@ -5726,10 +5746,11 @@ flowchart TD
5726
5746
  return /* @__PURE__ */ React.createElement(
5727
5747
  "button",
5728
5748
  {
5729
- className: `w-8 px-1 py-2.5 flex items-center justify-center hover:bg-gray-50 text-gray-200 hover:text-red-500 ${disabled && "pointer-events-none opacity-30 cursor-not-allowed"}`,
5749
+ type: "button",
5750
+ className: `w-8 px-1 py-2.5 flex items-center justify-center text-gray-200 hover:opacity-100 opacity-30 hover:bg-gray-50 ${disabled && "pointer-events-none opacity-30 cursor-not-allowed"}`,
5730
5751
  onClick
5731
5752
  },
5732
- /* @__PURE__ */ React.createElement(TrashIcon, { className: "fill-current transition-colors ease-out duration-100" })
5753
+ /* @__PURE__ */ React.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
5733
5754
  );
5734
5755
  };
5735
5756
  const DragHandle = ({ isDragging }) => {
@@ -7177,244 +7198,65 @@ flowchart TD
7177
7198
  str = "0" + str;
7178
7199
  return str;
7179
7200
  }
7180
- function _inheritsLoose(subClass, superClass) {
7181
- subClass.prototype = Object.create(superClass.prototype);
7182
- subClass.prototype.constructor = subClass;
7183
- _setPrototypeOf(subClass, superClass);
7184
- }
7185
- function _setPrototypeOf(o, p) {
7186
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
7187
- o2.__proto__ = p2;
7188
- return o2;
7189
- };
7190
- return _setPrototypeOf(o, p);
7191
- }
7192
- function _objectWithoutPropertiesLoose(source, excluded) {
7193
- if (source == null)
7194
- return {};
7195
- var target = {};
7196
- var sourceKeys = Object.keys(source);
7197
- var key, i;
7198
- for (i = 0; i < sourceKeys.length; i++) {
7199
- key = sourceKeys[i];
7200
- if (excluded.indexOf(key) >= 0)
7201
- continue;
7202
- target[key] = source[key];
7203
- }
7204
- return target;
7205
- }
7206
- function _assertThisInitialized(self2) {
7207
- if (self2 === void 0) {
7208
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7209
- }
7210
- return self2;
7211
- }
7212
- function isNodeFound(current, componentNode, ignoreClass) {
7213
- if (current === componentNode) {
7214
- return true;
7201
+ var useClickAway$1 = {};
7202
+ var util = {};
7203
+ Object.defineProperty(util, "__esModule", { value: true });
7204
+ util.isNavigator = util.isBrowser = util.off = util.on = util.noop = void 0;
7205
+ var noop = function() {
7206
+ };
7207
+ util.noop = noop;
7208
+ function on(obj) {
7209
+ var args = [];
7210
+ for (var _i = 1; _i < arguments.length; _i++) {
7211
+ args[_i - 1] = arguments[_i];
7215
7212
  }
7216
- if (current.correspondingElement) {
7217
- return current.correspondingElement.classList.contains(ignoreClass);
7213
+ if (obj && obj.addEventListener) {
7214
+ obj.addEventListener.apply(obj, args);
7218
7215
  }
7219
- return current.classList.contains(ignoreClass);
7220
7216
  }
7221
- function findHighest(current, componentNode, ignoreClass) {
7222
- if (current === componentNode) {
7223
- return true;
7217
+ util.on = on;
7218
+ function off(obj) {
7219
+ var args = [];
7220
+ for (var _i = 1; _i < arguments.length; _i++) {
7221
+ args[_i - 1] = arguments[_i];
7224
7222
  }
7225
- while (current.parentNode || current.host) {
7226
- if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) {
7227
- return true;
7228
- }
7229
- current = current.parentNode || current.host;
7223
+ if (obj && obj.removeEventListener) {
7224
+ obj.removeEventListener.apply(obj, args);
7230
7225
  }
7231
- return current;
7232
- }
7233
- function clickedScrollbar(evt) {
7234
- return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;
7235
7226
  }
7236
- var testPassiveEventSupport = function testPassiveEventSupport2() {
7237
- if (typeof window === "undefined" || typeof window.addEventListener !== "function") {
7238
- return;
7239
- }
7240
- var passive = false;
7241
- var options = Object.defineProperty({}, "passive", {
7242
- get: function get2() {
7243
- passive = true;
7244
- }
7245
- });
7246
- var noop = function noop2() {
7247
- };
7248
- window.addEventListener("testPassiveEventSupport", noop, options);
7249
- window.removeEventListener("testPassiveEventSupport", noop, options);
7250
- return passive;
7251
- };
7252
- function autoInc(seed) {
7253
- if (seed === void 0) {
7254
- seed = 0;
7255
- }
7256
- return function() {
7257
- return ++seed;
7258
- };
7259
- }
7260
- var uid = autoInc();
7261
- var passiveEventSupport;
7262
- var handlersMap = {};
7263
- var enabledInstances = {};
7264
- var touchEvents = ["touchstart", "touchmove"];
7265
- var IGNORE_CLASS_NAME = "ignore-react-onclickoutside";
7266
- function getEventHandlerOptions(instance, eventName) {
7267
- var handlerOptions = {};
7268
- var isTouchEvent = touchEvents.indexOf(eventName) !== -1;
7269
- if (isTouchEvent && passiveEventSupport) {
7270
- handlerOptions.passive = !instance.props.preventDefault;
7271
- }
7272
- return handlerOptions;
7273
- }
7274
- function onClickOutsideHOC(WrappedComponent, config) {
7275
- var _class, _temp;
7276
- var componentName = WrappedComponent.displayName || WrappedComponent.name || "Component";
7277
- return _temp = _class = /* @__PURE__ */ function(_Component) {
7278
- _inheritsLoose(onClickOutside, _Component);
7279
- function onClickOutside(props) {
7280
- var _this;
7281
- _this = _Component.call(this, props) || this;
7282
- _this.__outsideClickHandler = function(event) {
7283
- if (typeof _this.__clickOutsideHandlerProp === "function") {
7284
- _this.__clickOutsideHandlerProp(event);
7285
- return;
7286
- }
7287
- var instance = _this.getInstance();
7288
- if (typeof instance.props.handleClickOutside === "function") {
7289
- instance.props.handleClickOutside(event);
7290
- return;
7291
- }
7292
- if (typeof instance.handleClickOutside === "function") {
7293
- instance.handleClickOutside(event);
7294
- return;
7295
- }
7296
- throw new Error("WrappedComponent: " + componentName + " lacks a handleClickOutside(event) function for processing outside click events.");
7297
- };
7298
- _this.__getComponentNode = function() {
7299
- var instance = _this.getInstance();
7300
- if (config && typeof config.setClickOutsideRef === "function") {
7301
- return config.setClickOutsideRef()(instance);
7302
- }
7303
- if (typeof instance.setClickOutsideRef === "function") {
7304
- return instance.setClickOutsideRef();
7305
- }
7306
- return reactDom.findDOMNode(instance);
7307
- };
7308
- _this.enableOnClickOutside = function() {
7309
- if (typeof document === "undefined" || enabledInstances[_this._uid]) {
7310
- return;
7311
- }
7312
- if (typeof passiveEventSupport === "undefined") {
7313
- passiveEventSupport = testPassiveEventSupport();
7314
- }
7315
- enabledInstances[_this._uid] = true;
7316
- var events = _this.props.eventTypes;
7317
- if (!events.forEach) {
7318
- events = [events];
7319
- }
7320
- handlersMap[_this._uid] = function(event) {
7321
- if (_this.componentNode === null)
7322
- return;
7323
- if (_this.initTimeStamp > event.timeStamp)
7324
- return;
7325
- if (_this.props.preventDefault) {
7326
- event.preventDefault();
7327
- }
7328
- if (_this.props.stopPropagation) {
7329
- event.stopPropagation();
7330
- }
7331
- if (_this.props.excludeScrollbar && clickedScrollbar(event))
7332
- return;
7333
- var current = event.composed && event.composedPath && event.composedPath().shift() || event.target;
7334
- if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {
7335
- return;
7336
- }
7337
- _this.__outsideClickHandler(event);
7338
- };
7339
- events.forEach(function(eventName) {
7340
- document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_assertThisInitialized(_this), eventName));
7341
- });
7342
- };
7343
- _this.disableOnClickOutside = function() {
7344
- delete enabledInstances[_this._uid];
7345
- var fn = handlersMap[_this._uid];
7346
- if (fn && typeof document !== "undefined") {
7347
- var events = _this.props.eventTypes;
7348
- if (!events.forEach) {
7349
- events = [events];
7350
- }
7351
- events.forEach(function(eventName) {
7352
- return document.removeEventListener(eventName, fn, getEventHandlerOptions(_assertThisInitialized(_this), eventName));
7353
- });
7354
- delete handlersMap[_this._uid];
7355
- }
7356
- };
7357
- _this.getRef = function(ref) {
7358
- return _this.instanceRef = ref;
7359
- };
7360
- _this._uid = uid();
7361
- _this.initTimeStamp = performance.now();
7362
- return _this;
7363
- }
7364
- var _proto = onClickOutside.prototype;
7365
- _proto.getInstance = function getInstance() {
7366
- if (WrappedComponent.prototype && !WrappedComponent.prototype.isReactComponent) {
7367
- return this;
7368
- }
7369
- var ref = this.instanceRef;
7370
- return ref.getInstance ? ref.getInstance() : ref;
7371
- };
7372
- _proto.componentDidMount = function componentDidMount() {
7373
- if (typeof document === "undefined" || !document.createElement) {
7374
- return;
7375
- }
7376
- var instance = this.getInstance();
7377
- if (config && typeof config.handleClickOutside === "function") {
7378
- this.__clickOutsideHandlerProp = config.handleClickOutside(instance);
7379
- if (typeof this.__clickOutsideHandlerProp !== "function") {
7380
- throw new Error("WrappedComponent: " + componentName + " lacks a function for processing outside click events specified by the handleClickOutside config option.");
7381
- }
7382
- }
7383
- this.componentNode = this.__getComponentNode();
7384
- if (this.props.disableOnClickOutside)
7385
- return;
7386
- this.enableOnClickOutside();
7387
- };
7388
- _proto.componentDidUpdate = function componentDidUpdate() {
7389
- this.componentNode = this.__getComponentNode();
7390
- };
7391
- _proto.componentWillUnmount = function componentWillUnmount() {
7392
- this.disableOnClickOutside();
7227
+ util.off = off;
7228
+ util.isBrowser = typeof window !== "undefined";
7229
+ util.isNavigator = typeof navigator !== "undefined";
7230
+ Object.defineProperty(useClickAway$1, "__esModule", { value: true });
7231
+ var react_1 = React;
7232
+ var util_1 = util;
7233
+ var defaultEvents = ["mousedown", "touchstart"];
7234
+ var useClickAway = function(ref, onClickAway, events) {
7235
+ if (events === void 0) {
7236
+ events = defaultEvents;
7237
+ }
7238
+ var savedCallback = react_1.useRef(onClickAway);
7239
+ react_1.useEffect(function() {
7240
+ savedCallback.current = onClickAway;
7241
+ }, [onClickAway]);
7242
+ react_1.useEffect(function() {
7243
+ var handler = function(event) {
7244
+ var el = ref.current;
7245
+ el && !el.contains(event.target) && savedCallback.current(event);
7393
7246
  };
7394
- _proto.render = function render() {
7395
- var _this$props = this.props;
7396
- _this$props.excludeScrollbar;
7397
- var props = _objectWithoutPropertiesLoose(_this$props, ["excludeScrollbar"]);
7398
- if (WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) {
7399
- props.ref = this.getRef;
7400
- } else {
7401
- props.wrappedRef = this.getRef;
7247
+ for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
7248
+ var eventName = events_1[_i];
7249
+ util_1.on(document, eventName, handler);
7250
+ }
7251
+ return function() {
7252
+ for (var _i2 = 0, events_2 = events; _i2 < events_2.length; _i2++) {
7253
+ var eventName2 = events_2[_i2];
7254
+ util_1.off(document, eventName2, handler);
7402
7255
  }
7403
- props.disableOnClickOutside = this.disableOnClickOutside;
7404
- props.enableOnClickOutside = this.enableOnClickOutside;
7405
- return React.createElement(WrappedComponent, props);
7406
7256
  };
7407
- return onClickOutside;
7408
- }(React.Component), _class.displayName = "OnClickOutside(" + componentName + ")", _class.defaultProps = {
7409
- eventTypes: ["mousedown", "touchstart"],
7410
- excludeScrollbar: config && config.excludeScrollbar || false,
7411
- outsideClickIgnoreClass: IGNORE_CLASS_NAME,
7412
- preventDefault: false,
7413
- stopPropagation: false
7414
- }, _class.getClass = function() {
7415
- return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;
7416
- }, _temp;
7417
- }
7257
+ }, [events, ref]);
7258
+ };
7259
+ var _default = useClickAway$1.default = useClickAway;
7418
7260
  const viewModes = {
7419
7261
  YEARS: "years",
7420
7262
  MONTHS: "months",
@@ -7943,22 +7785,13 @@ flowchart TD
7943
7785
  }
7944
7786
  con[method]("***react-datetime:" + message);
7945
7787
  }
7946
- class ClickOutBase extends React.Component {
7947
- constructor() {
7948
- super(...arguments);
7949
- __publicField(this, "container", React.createRef());
7950
- }
7951
- render() {
7952
- return /* @__PURE__ */ React.createElement("div", { className: this.props.className, ref: this.container }, this.props.children);
7953
- }
7954
- handleClickOutside(e) {
7955
- this.props.onClickOut(e);
7956
- }
7957
- setClickOutsideRef() {
7958
- return this.container.current;
7959
- }
7788
+ function ClickableWrapper({ className, onClickOut, children }) {
7789
+ const containerRef = React.useRef(null);
7790
+ _default(containerRef, (event) => {
7791
+ onClickOut(event);
7792
+ });
7793
+ return /* @__PURE__ */ React.createElement("div", { className, ref: containerRef }, children);
7960
7794
  }
7961
- const ClickableWrapper = onClickOutsideHOC(ClickOutBase);
7962
7795
  const DEFAULT_DATE_DISPLAY_FORMAT = "MMM DD, YYYY";
7963
7796
  const DEFAULT_TIME_DISPLAY_FORMAT = "h:mm A";
7964
7797
  const format$1 = (val, _name, field) => {
@@ -8001,7 +7834,10 @@ flowchart TD
8001
7834
  ReactDateTimeWithStyles,
8002
7835
  {
8003
7836
  value: input.value,
8004
- onChange: input.onChange,
7837
+ onChange: (value) => {
7838
+ const newValue = value === "" ? void 0 : value;
7839
+ input.onChange(newValue);
7840
+ },
8005
7841
  dateFormat: dateFormat || DEFAULT_DATE_DISPLAY_FORMAT,
8006
7842
  timeFormat: timeFormat || false,
8007
7843
  inputProps: { className: textFieldClasses },
@@ -9453,6 +9289,17 @@ flowchart TD
9453
9289
  }
9454
9290
  }
9455
9291
  }
9292
+ const encodeUrlIfNeeded = (url) => {
9293
+ if (url) {
9294
+ try {
9295
+ return new URL(url).toString();
9296
+ } catch (e) {
9297
+ return url;
9298
+ }
9299
+ } else {
9300
+ return url;
9301
+ }
9302
+ };
9456
9303
  let MediaManager$1 = class MediaManager {
9457
9304
  constructor(store, events) {
9458
9305
  this.store = store;
@@ -9525,6 +9372,20 @@ flowchart TD
9525
9372
  try {
9526
9373
  this.events.dispatch({ type: "media:list:start", ...options });
9527
9374
  const media = await this.store.list(options);
9375
+ media.items = media.items.map((item) => {
9376
+ if (item.type === "dir") {
9377
+ return item;
9378
+ }
9379
+ if (item.thumbnails) {
9380
+ for (const [size, src] of Object.entries(item.thumbnails)) {
9381
+ item.thumbnails[size] = encodeUrlIfNeeded(src);
9382
+ }
9383
+ }
9384
+ return {
9385
+ ...item,
9386
+ src: encodeUrlIfNeeded(item.src)
9387
+ };
9388
+ });
9528
9389
  this.events.dispatch({ type: "media:list:success", ...options, media });
9529
9390
  return media;
9530
9391
  } catch (error) {
@@ -10332,7 +10193,7 @@ flowchart TD
10332
10193
  "Event Log"
10333
10194
  ));
10334
10195
  };
10335
- const version = "2.4.0";
10196
+ const version = "2.7.0";
10336
10197
  const Nav = ({
10337
10198
  isLocalMode,
10338
10199
  className = "",
@@ -13685,6 +13546,11 @@ flowchart TD
13685
13546
  mode: "mark",
13686
13547
  type: plate.MARK_CODE,
13687
13548
  match: "`"
13549
+ },
13550
+ {
13551
+ mode: "mark",
13552
+ type: plate.MARK_STRIKETHROUGH,
13553
+ match: ["~~", "~"]
13688
13554
  }
13689
13555
  ];
13690
13556
  const autoformatRules = [
@@ -13826,16 +13692,14 @@ flowchart TD
13826
13692
  })
13827
13693
  ];
13828
13694
  const plugins = [
13695
+ plate.createBasicMarksPlugin(),
13829
13696
  plate.createHeadingPlugin(),
13830
13697
  plate.createParagraphPlugin(),
13831
13698
  createCodeBlockPlugin(),
13832
13699
  createHTMLBlockPlugin(),
13833
13700
  createHTMLInlinePlugin(),
13834
13701
  plate.createBlockquotePlugin(),
13835
- plate.createBoldPlugin(),
13836
- plate.createItalicPlugin(),
13837
13702
  plate.createUnderlinePlugin(),
13838
- plate.createCodePlugin(),
13839
13703
  plate.createListPlugin(),
13840
13704
  plate.createIndentListPlugin(),
13841
13705
  plate.createHorizontalRulePlugin(),
@@ -14652,7 +14516,7 @@ flowchart TD
14652
14516
  key: template.name,
14653
14517
  onMouseDown: (e) => {
14654
14518
  e.preventDefault();
14655
- close();
14519
+ setOpen(false);
14656
14520
  insertMDX(editor, template);
14657
14521
  },
14658
14522
  className: ""
@@ -14697,6 +14561,11 @@ flowchart TD
14697
14561
  width: () => STANDARD_ICON_WIDTH,
14698
14562
  Component: /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: plate.MARK_BOLD }, /* @__PURE__ */ React.createElement(Icons.bold, null))
14699
14563
  },
14564
+ strikethrough: {
14565
+ label: "Strikethrough",
14566
+ width: () => STANDARD_ICON_WIDTH,
14567
+ Component: /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Strikethrough ", nodeType: plate.MARK_STRIKETHROUGH }, /* @__PURE__ */ React.createElement(Icons.strikethrough, null))
14568
+ },
14700
14569
  italic: {
14701
14570
  label: "Italic",
14702
14571
  width: () => STANDARD_ICON_WIDTH,
@@ -14738,7 +14607,12 @@ flowchart TD
14738
14607
  const [itemsShown, setItemsShown] = React.useState(11);
14739
14608
  const { overrides, templates } = useToolbarContext();
14740
14609
  const showEmbedButton = templates.length > 0;
14741
- let items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14610
+ let items2 = [];
14611
+ if (Array.isArray(overrides)) {
14612
+ items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14613
+ } else {
14614
+ items2 = (overrides == null ? void 0 : overrides.toolbar) === void 0 ? Object.values(toolbarItems) : overrides.toolbar.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14615
+ }
14742
14616
  if (!showEmbedButton) {
14743
14617
  items2 = items2.filter((item) => item.label !== toolbarItems.embed.label);
14744
14618
  }
@@ -15066,6 +14940,9 @@ flowchart TD
15066
14940
  if (typeof string !== "string") {
15067
14941
  return false;
15068
14942
  }
14943
+ if (string.startsWith("#")) {
14944
+ return true;
14945
+ }
15069
14946
  const generalMatch = string.match(protocolAndDomainRE);
15070
14947
  const emailLinkMatch = string.match(emailLintRE);
15071
14948
  const localUrlMatch = string.match(localUrlRE);
@@ -15087,12 +14964,12 @@ flowchart TD
15087
14964
  }
15088
14965
  return localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol);
15089
14966
  };
15090
- const RichEditor = (props) => {
14967
+ const RichEditor = ({ input, tinaForm, field }) => {
15091
14968
  var _a;
15092
14969
  const initialValue = React.useMemo(
15093
14970
  () => {
15094
14971
  var _a2, _b;
15095
- 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: "" }] }];
14972
+ 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: "" }] }];
15096
14973
  },
15097
14974
  []
15098
14975
  );
@@ -15120,7 +14997,7 @@ flowchart TD
15120
14997
  ),
15121
14998
  []
15122
14999
  );
15123
- const tempId = [props.tinaForm.id, props.input.name].join(".");
15000
+ const tempId = [tinaForm.id, input.name].join(".");
15124
15001
  const id = React.useMemo(() => uuid() + tempId, [tempId]);
15125
15002
  const ref = React.useRef(null);
15126
15003
  React.useEffect(() => {
@@ -15130,13 +15007,13 @@ flowchart TD
15130
15007
  const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
15131
15008
  '[role="textbox"]'
15132
15009
  );
15133
- if (props.field.experimental_focusIntent && plateElement) {
15010
+ if (field.experimental_focusIntent && plateElement) {
15134
15011
  if (plateElement)
15135
15012
  plateElement.focus();
15136
15013
  }
15137
15014
  }, 100);
15138
15015
  }
15139
- }, [props.field.experimental_focusIntent, ref]);
15016
+ }, [field.experimental_focusIntent, ref]);
15140
15017
  return /* @__PURE__ */ React.createElement("div", { ref }, /* @__PURE__ */ React.createElement(
15141
15018
  plateCommon.Plate,
15142
15019
  {
@@ -15144,7 +15021,7 @@ flowchart TD
15144
15021
  initialValue,
15145
15022
  plugins: plugins$2,
15146
15023
  onChange: (value) => {
15147
- props.input.onChange({
15024
+ input.onChange({
15148
15025
  type: "root",
15149
15026
  children: value
15150
15027
  });
@@ -15153,12 +15030,12 @@ flowchart TD
15153
15030
  /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(
15154
15031
  ToolbarProvider,
15155
15032
  {
15156
- tinaForm: props.tinaForm,
15157
- templates: props.field.templates,
15158
- overrides: (_a = props.field) == null ? void 0 : _a.toolbarOverride
15033
+ tinaForm,
15034
+ templates: field.templates,
15035
+ overrides: (field == null ? void 0 : field.toolbarOverride) ? field.toolbarOverride : field.overrides
15159
15036
  },
15160
15037
  /* @__PURE__ */ React.createElement(FixedToolbar, null, /* @__PURE__ */ React.createElement(FixedToolbarButtons, null)),
15161
- /* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null))
15038
+ ((_a = field == null ? void 0 : field.overrides) == null ? void 0 : _a.showFloatingToolbar) !== false ? /* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null)) : null
15162
15039
  ), /* @__PURE__ */ React.createElement(Editor, null))
15163
15040
  ));
15164
15041
  };
@@ -16346,132 +16223,1209 @@ flowchart TD
16346
16223
  "হয়"
16347
16224
  ];
16348
16225
  const bre = [
16226
+ "'blam",
16227
+ "'d",
16228
+ "'m",
16229
+ "'r",
16230
+ "'ta",
16231
+ "'vat",
16232
+ "'z",
16233
+ "'zo",
16349
16234
  "a",
16350
- "ainda",
16351
- "alem",
16352
- "ambas",
16353
- "ambos",
16354
- "antes",
16355
- "ao",
16356
- "aonde",
16357
- "aos",
16358
- "apos",
16359
- "aquele",
16360
- "aqueles",
16361
- "as",
16362
- "assim",
16363
- "com",
16364
- "como",
16365
- "contra",
16366
- "contudo",
16367
- "cuja",
16368
- "cujas",
16369
- "cujo",
16370
- "cujos",
16235
+ "a:",
16236
+ "aba",
16237
+ "abalamour",
16238
+ "abaoe",
16239
+ "ac'hane",
16240
+ "ac'hanoc'h",
16241
+ "ac'hanomp",
16242
+ "ac'hanon",
16243
+ "ac'hanout",
16244
+ "adal",
16245
+ "adalek",
16246
+ "adarre",
16247
+ "ae",
16248
+ "aec'h",
16249
+ "aed",
16250
+ "aemp",
16251
+ "aen",
16252
+ "aent",
16253
+ "aes",
16254
+ "afe",
16255
+ "afec'h",
16256
+ "afed",
16257
+ "afemp",
16258
+ "afen",
16259
+ "afent",
16260
+ "afes",
16261
+ "ag",
16262
+ "ah",
16263
+ "aimp",
16264
+ "aint",
16265
+ "aio",
16266
+ "aiou",
16267
+ "aje",
16268
+ "ajec'h",
16269
+ "ajed",
16270
+ "ajemp",
16271
+ "ajen",
16272
+ "ajent",
16273
+ "ajes",
16274
+ "al",
16275
+ "alato",
16276
+ "alies",
16277
+ "aliesañ",
16278
+ "alkent",
16279
+ "all",
16280
+ "allas",
16281
+ "allo",
16282
+ "allô",
16283
+ "am",
16284
+ "amañ",
16285
+ "amzer",
16286
+ "an",
16287
+ "anezhañ",
16288
+ "anezhe",
16289
+ "anezhi",
16290
+ "anezho",
16291
+ "anvet",
16292
+ "aon",
16293
+ "aotren",
16294
+ "ar",
16295
+ "arall",
16296
+ "araok",
16297
+ "araoki",
16298
+ "araozañ",
16299
+ "araozo",
16300
+ "araozoc'h",
16301
+ "araozomp",
16302
+ "araozon",
16303
+ "araozor",
16304
+ "araozout",
16305
+ "arbenn",
16306
+ "arre",
16307
+ "atalek",
16308
+ "atav",
16309
+ "az",
16310
+ "azalek",
16311
+ "azirazañ",
16312
+ "azirazi",
16313
+ "azirazo",
16314
+ "azirazoc'h",
16315
+ "azirazomp",
16316
+ "azirazon",
16317
+ "azirazor",
16318
+ "azirazout",
16319
+ "b:",
16320
+ "ba",
16321
+ "ba'l",
16322
+ "ba'n",
16323
+ "ba'r",
16324
+ "bad",
16325
+ "bah",
16326
+ "bal",
16327
+ "ban",
16328
+ "bar",
16329
+ "bastañ",
16330
+ "befe",
16331
+ "bell",
16332
+ "benaos",
16333
+ "benn",
16334
+ "bennag",
16335
+ "bennak",
16336
+ "bennozh",
16337
+ "bep",
16338
+ "bepred",
16339
+ "berr",
16340
+ "berzh",
16341
+ "bet",
16342
+ "betek",
16343
+ "betra",
16344
+ "bev",
16345
+ "bevet",
16346
+ "bez",
16347
+ "bezañ",
16348
+ "beze",
16349
+ "bezent",
16350
+ "bezet",
16351
+ "bezh",
16352
+ "bezit",
16353
+ "bezomp",
16354
+ "bihan",
16355
+ "bije",
16356
+ "biou",
16357
+ "biskoazh",
16358
+ "blam",
16359
+ "bo",
16360
+ "boa",
16361
+ "bominapl",
16362
+ "boudoudom",
16363
+ "bouez",
16364
+ "boull",
16365
+ "boum",
16366
+ "bout",
16367
+ "bras",
16368
+ "brasañ",
16369
+ "brav",
16370
+ "bravo",
16371
+ "bremañ",
16372
+ "bres",
16373
+ "brokenn",
16374
+ "bronn",
16375
+ "brrr",
16376
+ "brutal",
16377
+ "buhezek",
16378
+ "c'h:",
16379
+ "c'haout",
16380
+ "c'he",
16381
+ "c'hem",
16382
+ "c'herz",
16383
+ "c'heñver",
16384
+ "c'hichen",
16385
+ "c'hiz",
16386
+ "c'hoazh",
16387
+ "c'horre",
16388
+ "c'houde",
16389
+ "c'houst",
16390
+ "c'hreiz",
16391
+ "c'hwec'h",
16392
+ "c'hwec'hvet",
16393
+ "c'hwezek",
16394
+ "c'hwi",
16395
+ "ch:",
16396
+ "chaous",
16397
+ "chik",
16398
+ "chit",
16399
+ "chom",
16400
+ "chut",
16401
+ "d'",
16402
+ "d'al",
16403
+ "d'an",
16404
+ "d'ar",
16405
+ "d'az",
16406
+ "d'e",
16407
+ "d'he",
16408
+ "d'ho",
16409
+ "d'hol",
16410
+ "d'hon",
16411
+ "d'hor",
16412
+ "d'o",
16413
+ "d'ober",
16414
+ "d'ul",
16415
+ "d'un",
16416
+ "d'ur",
16417
+ "d:",
16371
16418
  "da",
16372
- "das",
16373
- "de",
16374
- "dela",
16375
- "dele",
16376
- "deles",
16377
- "demais",
16378
- "depois",
16379
- "desde",
16380
- "desta",
16381
- "deste",
16382
- "dispoe",
16383
- "dispoem",
16384
- "diversa",
16385
- "diversas",
16386
- "diversos",
16419
+ "dak",
16420
+ "daka",
16421
+ "dal",
16422
+ "dalbezh",
16423
+ "dalc'hmat",
16424
+ "dalit",
16425
+ "damdost",
16426
+ "damheñvel",
16427
+ "damm",
16428
+ "dan",
16429
+ "danvez",
16430
+ "dao",
16431
+ "daol",
16432
+ "daonet",
16433
+ "daou",
16434
+ "daoust",
16435
+ "daouzek",
16436
+ "daouzekvet",
16437
+ "darn",
16438
+ "dastrewiñ",
16439
+ "dav",
16440
+ "davedoc'h",
16441
+ "davedomp",
16442
+ "davedon",
16443
+ "davedor",
16444
+ "davedout",
16445
+ "davet",
16446
+ "davetañ",
16447
+ "davete",
16448
+ "daveti",
16449
+ "daveto",
16450
+ "defe",
16451
+ "dehou",
16452
+ "dek",
16453
+ "dekvet",
16454
+ "den",
16455
+ "deoc'h",
16456
+ "deomp",
16457
+ "deor",
16458
+ "derc'hel",
16459
+ "deus",
16460
+ "dez",
16461
+ "deze",
16462
+ "dezhañ",
16463
+ "dezhe",
16464
+ "dezhi",
16465
+ "dezho",
16466
+ "di",
16467
+ "diabarzh",
16468
+ "diagent",
16469
+ "diar",
16470
+ "diaraok",
16471
+ "diavaez",
16472
+ "dibaoe",
16473
+ "dibaot",
16474
+ "dibar",
16475
+ "dic'halañ",
16476
+ "didiac'h",
16477
+ "dienn",
16478
+ "difer",
16479
+ "diganeoc'h",
16480
+ "diganeomp",
16481
+ "diganeor",
16482
+ "diganimp",
16483
+ "diganin",
16484
+ "diganit",
16485
+ "digant",
16486
+ "digantañ",
16487
+ "digante",
16488
+ "diganti",
16489
+ "diganto",
16490
+ "digemmesk",
16491
+ "diget",
16492
+ "digor",
16493
+ "digoret",
16494
+ "dija",
16495
+ "dije",
16496
+ "dimp",
16497
+ "din",
16498
+ "dinaou",
16499
+ "dindan",
16500
+ "dindanañ",
16501
+ "dindani",
16502
+ "dindano",
16503
+ "dindanoc'h",
16504
+ "dindanomp",
16505
+ "dindanon",
16506
+ "dindanor",
16507
+ "dindanout",
16508
+ "dioutañ",
16509
+ "dioute",
16510
+ "diouti",
16511
+ "diouto",
16512
+ "diouzh",
16513
+ "diouzhin",
16514
+ "diouzhit",
16515
+ "diouzhoc'h",
16516
+ "diouzhomp",
16517
+ "diouzhor",
16518
+ "dirak",
16519
+ "dirazañ",
16520
+ "dirazi",
16521
+ "dirazo",
16522
+ "dirazoc'h",
16523
+ "dirazomp",
16524
+ "dirazon",
16525
+ "dirazor",
16526
+ "dirazout",
16527
+ "disheñvel",
16528
+ "dispar",
16529
+ "distank",
16530
+ "dister",
16531
+ "disterañ",
16532
+ "disterig",
16533
+ "distro",
16534
+ "dit",
16535
+ "divaez",
16536
+ "diwar",
16537
+ "diwezhat",
16538
+ "diwezhañ",
16387
16539
  "do",
16388
- "dos",
16389
- "durante",
16540
+ "doa",
16541
+ "doare",
16542
+ "dont",
16543
+ "dost",
16544
+ "doue",
16545
+ "douetus",
16546
+ "douez",
16547
+ "doug",
16548
+ "draou",
16549
+ "draoñ",
16550
+ "dre",
16551
+ "drede",
16552
+ "dreist",
16553
+ "dreistañ",
16554
+ "dreisti",
16555
+ "dreisto",
16556
+ "dreistoc'h",
16557
+ "dreistomp",
16558
+ "dreiston",
16559
+ "dreistor",
16560
+ "dreistout",
16561
+ "drek",
16562
+ "dreñv",
16563
+ "dring",
16564
+ "dro",
16565
+ "du",
16390
16566
  "e",
16391
- "ela",
16392
- "elas",
16393
- "ele",
16394
- "eles",
16567
+ "e:",
16568
+ "eas",
16569
+ "ebet",
16570
+ "ec'h",
16571
+ "edo",
16572
+ "edoc'h",
16573
+ "edod",
16574
+ "edomp",
16575
+ "edon",
16576
+ "edont",
16577
+ "edos",
16578
+ "eer",
16579
+ "eeun",
16580
+ "efed",
16581
+ "egedoc'h",
16582
+ "egedomp",
16583
+ "egedon",
16584
+ "egedor",
16585
+ "egedout",
16586
+ "eget",
16587
+ "egetañ",
16588
+ "egete",
16589
+ "egeti",
16590
+ "egeto",
16591
+ "eh",
16592
+ "eil",
16593
+ "eilvet",
16594
+ "eizh",
16595
+ "eizhvet",
16596
+ "ejoc'h",
16597
+ "ejod",
16598
+ "ejomp",
16599
+ "ejont",
16600
+ "ejout",
16601
+ "el",
16395
16602
  "em",
16396
- "entao",
16397
- "entre",
16398
- "essa",
16399
- "essas",
16400
- "esse",
16401
- "esses",
16402
- "esta",
16403
- "estas",
16404
- "este",
16405
- "estes",
16603
+ "emaint",
16604
+ "emaoc'h",
16605
+ "emaomp",
16606
+ "emaon",
16607
+ "emaout",
16608
+ "emañ",
16609
+ "eme",
16610
+ "emeur",
16611
+ "emezañ",
16612
+ "emezi",
16613
+ "emezo",
16614
+ "emezoc'h",
16615
+ "emezomp",
16616
+ "emezon",
16617
+ "emezout",
16618
+ "emporzhiañ",
16619
+ "en",
16620
+ "end",
16621
+ "endan",
16622
+ "endra",
16623
+ "enep",
16624
+ "ennañ",
16625
+ "enni",
16626
+ "enno",
16627
+ "ennoc'h",
16628
+ "ennomp",
16629
+ "ennon",
16630
+ "ennor",
16631
+ "ennout",
16632
+ "enta",
16633
+ "eo",
16634
+ "eomp",
16635
+ "eont",
16636
+ "eor",
16637
+ "eot",
16638
+ "er",
16639
+ "erbet",
16640
+ "erfin",
16641
+ "esa",
16642
+ "esae",
16643
+ "espar",
16644
+ "estlamm",
16645
+ "estrañj",
16646
+ "eta",
16647
+ "etre",
16648
+ "etreoc'h",
16649
+ "etrezo",
16650
+ "etrezoc'h",
16651
+ "etrezomp",
16652
+ "etrezor",
16653
+ "euh",
16654
+ "eur",
16655
+ "eus",
16656
+ "evel",
16657
+ "evelato",
16658
+ "eveldoc'h",
16659
+ "eveldomp",
16660
+ "eveldon",
16661
+ "eveldor",
16662
+ "eveldout",
16663
+ "evelkent",
16664
+ "eveltañ",
16665
+ "evelte",
16666
+ "evelti",
16667
+ "evelto",
16668
+ "evidoc'h",
16669
+ "evidomp",
16670
+ "evidon",
16671
+ "evidor",
16672
+ "evidout",
16673
+ "evit",
16674
+ "evitañ",
16675
+ "evite",
16676
+ "eviti",
16677
+ "evito",
16678
+ "ez",
16679
+ "eñ",
16680
+ "f:",
16681
+ "fac'h",
16682
+ "fall",
16683
+ "fed",
16684
+ "feiz",
16685
+ "fenn",
16686
+ "fezh",
16687
+ "fin",
16688
+ "finsalvet",
16689
+ "foei",
16690
+ "fouilhezañ",
16691
+ "g:",
16692
+ "gallout",
16693
+ "ganeoc'h",
16694
+ "ganeomp",
16695
+ "ganin",
16696
+ "ganit",
16697
+ "gant",
16698
+ "gantañ",
16699
+ "ganti",
16700
+ "ganto",
16701
+ "gaout",
16702
+ "gast",
16703
+ "gein",
16704
+ "gellout",
16705
+ "genndost",
16706
+ "gentañ",
16707
+ "ger",
16708
+ "gerz",
16709
+ "get",
16710
+ "geñver",
16711
+ "gichen",
16712
+ "gin",
16713
+ "giz",
16714
+ "glan",
16715
+ "gloev",
16716
+ "goll",
16717
+ "gorre",
16718
+ "goude",
16719
+ "gouez",
16720
+ "gouezit",
16721
+ "gouezomp",
16722
+ "goulz",
16723
+ "gounnar",
16724
+ "gour",
16725
+ "goust",
16726
+ "gouze",
16727
+ "gouzout",
16728
+ "gra",
16729
+ "grak",
16730
+ "grec'h",
16731
+ "greiz",
16732
+ "grenn",
16733
+ "greomp",
16734
+ "grit",
16735
+ "groñs",
16736
+ "gutez",
16737
+ "gwall",
16738
+ "gwashoc'h",
16739
+ "gwazh",
16740
+ "gwech",
16741
+ "gwechall",
16742
+ "gwechoù",
16743
+ "gwell",
16744
+ "gwezh",
16745
+ "gwezhall",
16746
+ "gwezharall",
16747
+ "gwezhoù",
16748
+ "gwig",
16749
+ "gwirionez",
16750
+ "gwitibunan",
16751
+ "gêr",
16752
+ "h:",
16406
16753
  "ha",
16407
- "isso",
16408
- "isto",
16409
- "logo",
16410
- "mais",
16411
- "mas",
16412
- "mediante",
16413
- "menos",
16414
- "mesma",
16415
- "mesmas",
16416
- "mesmo",
16417
- "mesmos",
16754
+ "hag",
16755
+ "han",
16756
+ "hanter",
16757
+ "hanterc'hantad",
16758
+ "hanterkantved",
16759
+ "harz",
16760
+ "hañ",
16761
+ "hañval",
16762
+ "he",
16763
+ "hebioù",
16764
+ "hec'h",
16765
+ "hei",
16766
+ "hein",
16767
+ "hem",
16768
+ "hemañ",
16769
+ "hen",
16770
+ "hend",
16771
+ "henhont",
16772
+ "henn",
16773
+ "hennezh",
16774
+ "hent",
16775
+ "hep",
16776
+ "hervez",
16777
+ "hervezañ",
16778
+ "hervezi",
16779
+ "hervezo",
16780
+ "hervezoc'h",
16781
+ "hervezomp",
16782
+ "hervezon",
16783
+ "hervezor",
16784
+ "hervezout",
16785
+ "heul",
16786
+ "heuliañ",
16787
+ "hevelep",
16788
+ "heverk",
16789
+ "heñvel",
16790
+ "heñvelat",
16791
+ "heñvelañ",
16792
+ "heñveliñ",
16793
+ "heñveloc'h",
16794
+ "heñvelout",
16795
+ "hi",
16796
+ "hilh",
16797
+ "hini",
16798
+ "hirie",
16799
+ "hirio",
16800
+ "hiziv",
16801
+ "hiziviken",
16802
+ "ho",
16803
+ "hoaliñ",
16804
+ "hoc'h",
16805
+ "hogen",
16806
+ "hogos",
16807
+ "hogozik",
16808
+ "hol",
16809
+ "holl",
16810
+ "holà",
16811
+ "homañ",
16812
+ "hon",
16813
+ "honhont",
16814
+ "honnezh",
16815
+ "hont",
16816
+ "hop",
16817
+ "hopala",
16818
+ "hor",
16819
+ "hou",
16820
+ "houp",
16821
+ "hudu",
16822
+ "hue",
16823
+ "hui",
16824
+ "hum",
16825
+ "hurrah",
16826
+ "i",
16827
+ "i:",
16828
+ "in",
16829
+ "int",
16830
+ "is",
16831
+ "ispisial",
16832
+ "isurzhiet",
16833
+ "it",
16834
+ "ivez",
16835
+ "izelañ",
16836
+ "j:",
16837
+ "just",
16838
+ "k:",
16839
+ "kae",
16840
+ "kaer",
16841
+ "kalon",
16842
+ "kalz",
16843
+ "kant",
16844
+ "kaout",
16845
+ "kar",
16846
+ "kazi",
16847
+ "keid",
16848
+ "kein",
16849
+ "keit",
16850
+ "kel",
16851
+ "kellies",
16852
+ "keloù",
16853
+ "kement",
16854
+ "ken",
16855
+ "kenkent",
16856
+ "kenkoulz",
16857
+ "kenment",
16858
+ "kent",
16859
+ "kentañ",
16860
+ "kentizh",
16861
+ "kentoc'h",
16862
+ "kentre",
16863
+ "ker",
16864
+ "kerkent",
16865
+ "kerz",
16866
+ "kerzh",
16867
+ "ket",
16868
+ "keta",
16869
+ "keñver",
16870
+ "keñverel",
16871
+ "keñverius",
16872
+ "kichen",
16873
+ "kichenik",
16874
+ "kit",
16875
+ "kiz",
16876
+ "klak",
16877
+ "klek",
16878
+ "klik",
16879
+ "komprenet",
16880
+ "komz",
16881
+ "kont",
16882
+ "korf",
16883
+ "korre",
16884
+ "koulskoude",
16885
+ "koulz",
16886
+ "koust",
16887
+ "krak",
16888
+ "krampouezh",
16889
+ "krec'h",
16890
+ "kreiz",
16891
+ "kuit",
16892
+ "kwir",
16893
+ "l:",
16894
+ "la",
16895
+ "laez",
16896
+ "laoskel",
16897
+ "laouen",
16898
+ "lavar",
16899
+ "lavaret",
16900
+ "lavarout",
16901
+ "lec'h",
16902
+ "lein",
16903
+ "leizh",
16904
+ "lerc'h",
16905
+ "leun",
16906
+ "leuskel",
16907
+ "lew",
16908
+ "lies",
16909
+ "liesañ",
16910
+ "lod",
16911
+ "lusk",
16912
+ "lâr",
16913
+ "lârout",
16914
+ "m:",
16915
+ "ma",
16916
+ "ma'z",
16917
+ "mac'h",
16918
+ "mac'hat",
16919
+ "mac'hañ",
16920
+ "mac'hoc'h",
16921
+ "mad",
16922
+ "maez",
16923
+ "maksimal",
16924
+ "mann",
16925
+ "mar",
16926
+ "mard",
16927
+ "marg",
16928
+ "marzh",
16929
+ "mat",
16930
+ "mañ",
16931
+ "me",
16932
+ "memes",
16933
+ "memestra",
16934
+ "merkapl",
16935
+ "mersi",
16936
+ "mes",
16937
+ "mesk",
16938
+ "met",
16939
+ "meur",
16940
+ "mil",
16941
+ "minimal",
16942
+ "moan",
16943
+ "moaniaat",
16944
+ "mod",
16945
+ "mont",
16946
+ "mout",
16947
+ "mui",
16948
+ "muiañ",
16949
+ "muioc'h",
16950
+ "n",
16951
+ "n'",
16952
+ "n:",
16418
16953
  "na",
16419
- "nao",
16420
- "nas",
16421
- "nem",
16422
- "nesse",
16423
- "neste",
16424
- "nos",
16954
+ "nag",
16955
+ "naontek",
16956
+ "naturel",
16957
+ "nav",
16958
+ "navet",
16959
+ "ne",
16960
+ "nebeudig",
16961
+ "nebeut",
16962
+ "nebeutañ",
16963
+ "nebeutoc'h",
16964
+ "neketa",
16965
+ "nemedoc'h",
16966
+ "nemedomp",
16967
+ "nemedon",
16968
+ "nemedor",
16969
+ "nemedout",
16970
+ "nemet",
16971
+ "nemetañ",
16972
+ "nemete",
16973
+ "nemeti",
16974
+ "nemeto",
16975
+ "nemeur",
16976
+ "neoac'h",
16977
+ "nepell",
16978
+ "nerzh",
16979
+ "nes",
16980
+ "neseser",
16981
+ "netra",
16982
+ "neubeudoù",
16983
+ "neuhe",
16984
+ "neuze",
16985
+ "nevez",
16986
+ "newazh",
16987
+ "nez",
16988
+ "ni",
16989
+ "nikun",
16990
+ "niverus",
16991
+ "nul",
16425
16992
  "o",
16426
- "os",
16427
- "ou",
16428
- "outra",
16429
- "outras",
16430
- "outro",
16431
- "outros",
16432
- "pelas",
16433
- "pelo",
16434
- "pelos",
16435
- "perante",
16436
- "pois",
16437
- "por",
16438
- "porque",
16439
- "portanto",
16440
- "propios",
16441
- "proprio",
16442
- "quais",
16443
- "qual",
16444
- "qualquer",
16445
- "quando",
16446
- "quanto",
16447
- "que",
16448
- "quem",
16449
- "quer",
16993
+ "o:",
16994
+ "oa",
16995
+ "oac'h",
16996
+ "oad",
16997
+ "oamp",
16998
+ "oan",
16999
+ "oant",
17000
+ "oar",
17001
+ "oas",
17002
+ "ober",
17003
+ "oc'h",
17004
+ "oc'ho",
17005
+ "oc'hola",
17006
+ "oc'hpenn",
17007
+ "oh",
17008
+ "ohe",
17009
+ "ollé",
17010
+ "olole",
17011
+ "olé",
17012
+ "omp",
17013
+ "on",
17014
+ "ordin",
17015
+ "ordinal",
17016
+ "ouejoc'h",
17017
+ "ouejod",
17018
+ "ouejomp",
17019
+ "ouejont",
17020
+ "ouejout",
17021
+ "ouek",
17022
+ "ouezas",
17023
+ "ouezi",
17024
+ "ouezimp",
17025
+ "ouezin",
17026
+ "ouezint",
17027
+ "ouezis",
17028
+ "ouezo",
17029
+ "ouezoc'h",
17030
+ "ouezor",
17031
+ "ouf",
17032
+ "oufe",
17033
+ "oufec'h",
17034
+ "oufed",
17035
+ "oufemp",
17036
+ "oufen",
17037
+ "oufent",
17038
+ "oufes",
17039
+ "ouie",
17040
+ "ouiec'h",
17041
+ "ouied",
17042
+ "ouiemp",
17043
+ "ouien",
17044
+ "ouient",
17045
+ "ouies",
17046
+ "ouije",
17047
+ "ouijec'h",
17048
+ "ouijed",
17049
+ "ouijemp",
17050
+ "ouijen",
17051
+ "ouijent",
17052
+ "ouijes",
17053
+ "out",
17054
+ "outañ",
17055
+ "outi",
17056
+ "outo",
17057
+ "ouzer",
17058
+ "ouzh",
17059
+ "ouzhin",
17060
+ "ouzhit",
17061
+ "ouzhoc'h",
17062
+ "ouzhomp",
17063
+ "ouzhor",
17064
+ "ouzhpenn",
17065
+ "ouzhpennik",
17066
+ "ouzoc'h",
17067
+ "ouzomp",
17068
+ "ouzon",
17069
+ "ouzont",
17070
+ "ouzout",
17071
+ "p'",
17072
+ "p:",
17073
+ "pa",
17074
+ "pad",
17075
+ "padal",
17076
+ "paf",
17077
+ "pan",
17078
+ "panevedeoc'h",
17079
+ "panevedo",
17080
+ "panevedomp",
17081
+ "panevedon",
17082
+ "panevedout",
17083
+ "panevet",
17084
+ "panevetañ",
17085
+ "paneveti",
17086
+ "pas",
17087
+ "paseet",
17088
+ "pe",
17089
+ "peadra",
17090
+ "peder",
17091
+ "pedervet",
17092
+ "pedervetvet",
17093
+ "pefe",
17094
+ "pegeit",
17095
+ "pegement",
17096
+ "pegen",
17097
+ "pegiz",
17098
+ "pegoulz",
17099
+ "pehini",
17100
+ "pelec'h",
17101
+ "pell",
17102
+ "pemod",
17103
+ "pemp",
17104
+ "pempved",
17105
+ "pemzek",
17106
+ "penaos",
17107
+ "penn",
17108
+ "peogwir",
17109
+ "peotramant",
17110
+ "pep",
17111
+ "perak",
17112
+ "perc'hennañ",
17113
+ "pergen",
17114
+ "permetiñ",
17115
+ "peseurt",
17116
+ "pet",
17117
+ "petiaoul",
17118
+ "petoare",
17119
+ "petra",
17120
+ "peur",
17121
+ "peurgetket",
17122
+ "peurheñvel",
17123
+ "peurliesañ",
17124
+ "peurvuiañ",
17125
+ "peus",
17126
+ "peustost",
17127
+ "peuz",
17128
+ "pevar",
17129
+ "pevare",
17130
+ "pevarevet",
17131
+ "pevarzek",
17132
+ "pez",
17133
+ "peze",
17134
+ "pezh",
17135
+ "pff",
17136
+ "pfft",
17137
+ "pfut",
17138
+ "picher",
17139
+ "pif",
17140
+ "pife",
17141
+ "pign",
17142
+ "pije",
17143
+ "pikol",
17144
+ "pitiaoul",
17145
+ "piv",
17146
+ "plaouf",
17147
+ "plok",
17148
+ "plouf",
17149
+ "po",
17150
+ "poa",
17151
+ "poelladus",
17152
+ "pof",
17153
+ "pok",
17154
+ "posupl",
17155
+ "pouah",
17156
+ "pourc'henn",
17157
+ "prest",
17158
+ "prestik",
17159
+ "prim",
17160
+ "prin",
17161
+ "provostapl",
17162
+ "pst",
17163
+ "pu",
17164
+ "pur",
17165
+ "r:",
17166
+ "ra",
17167
+ "rae",
17168
+ "raec'h",
17169
+ "raed",
17170
+ "raemp",
17171
+ "raen",
17172
+ "raent",
17173
+ "raes",
17174
+ "rafe",
17175
+ "rafec'h",
17176
+ "rafed",
17177
+ "rafemp",
17178
+ "rafen",
17179
+ "rafent",
17180
+ "rafes",
17181
+ "rag",
17182
+ "raimp",
17183
+ "raint",
17184
+ "raio",
17185
+ "raje",
17186
+ "rajec'h",
17187
+ "rajed",
17188
+ "rajemp",
17189
+ "rajen",
17190
+ "rajent",
17191
+ "rajes",
17192
+ "rak",
17193
+ "ral",
17194
+ "ran",
17195
+ "rankout",
17196
+ "raok",
17197
+ "razh",
17198
+ "re",
17199
+ "reas",
17200
+ "reer",
17201
+ "regennoù",
17202
+ "reiñ",
17203
+ "rejoc'h",
17204
+ "rejod",
17205
+ "rejomp",
17206
+ "rejont",
17207
+ "rejout",
17208
+ "rener",
17209
+ "rentañ",
17210
+ "reoc'h",
17211
+ "reomp",
17212
+ "reont",
17213
+ "reor",
17214
+ "reot",
17215
+ "resis",
17216
+ "ret",
17217
+ "reve",
17218
+ "rez",
17219
+ "ri",
17220
+ "rik",
17221
+ "rin",
17222
+ "ris",
17223
+ "rit",
17224
+ "rouez",
17225
+ "s:",
17226
+ "sac'h",
17227
+ "sant",
17228
+ "sav",
17229
+ "sañset",
16450
17230
  "se",
16451
- "seja",
16452
- "sem",
16453
- "sendo",
16454
- "seu",
16455
- "seus",
16456
- "sob",
16457
- "sobre",
16458
- "sua",
16459
- "suas",
17231
+ "sed",
17232
+ "seitek",
17233
+ "seizh",
17234
+ "seizhvet",
17235
+ "sell",
17236
+ "sellit",
17237
+ "ser",
17238
+ "setu",
17239
+ "seul",
17240
+ "seurt",
17241
+ "siwazh",
17242
+ "skignañ",
17243
+ "skoaz",
17244
+ "skouer",
17245
+ "sort",
17246
+ "souden",
17247
+ "souvitañ",
17248
+ "soñj",
17249
+ "speriañ",
17250
+ "spririñ",
17251
+ "stad",
17252
+ "stlabezañ",
17253
+ "stop",
17254
+ "stranañ",
17255
+ "strewiñ",
17256
+ "strishaat",
17257
+ "stumm",
17258
+ "sujed",
17259
+ "surtoud",
17260
+ "t:",
17261
+ "ta",
17262
+ "taer",
17263
+ "tailh",
17264
+ "tak",
16460
17265
  "tal",
16461
- "tambem",
16462
- "teu",
17266
+ "talvoudegezh",
17267
+ "tamm",
17268
+ "tanav",
17269
+ "taol",
17270
+ "te",
17271
+ "techet",
17272
+ "teir",
17273
+ "teirvet",
17274
+ "telt",
17275
+ "teltenn",
16463
17276
  "teus",
16464
- "toda",
16465
- "todas",
16466
- "todo",
16467
- "todos",
16468
- "tua",
16469
- "tuas",
16470
- "tudo",
16471
- "um",
16472
- "uma",
16473
- "umas",
16474
- "uns"
17277
+ "teut",
17278
+ "teuteu",
17279
+ "ti",
17280
+ "tik",
17281
+ "toa",
17282
+ "tok",
17283
+ "tost",
17284
+ "tostig",
17285
+ "toud",
17286
+ "touesk",
17287
+ "touez",
17288
+ "toull",
17289
+ "tra",
17290
+ "trantenn",
17291
+ "traoñ",
17292
+ "trawalc'h",
17293
+ "tre",
17294
+ "trede",
17295
+ "tregont",
17296
+ "tremenet",
17297
+ "tri",
17298
+ "trivet",
17299
+ "triwec'h",
17300
+ "trizek",
17301
+ "tro",
17302
+ "trugarez",
17303
+ "trumm",
17304
+ "tsoin",
17305
+ "tsouin",
17306
+ "tu",
17307
+ "tud",
17308
+ "u:",
17309
+ "ugent",
17310
+ "uhel",
17311
+ "uhelañ",
17312
+ "ul",
17313
+ "un",
17314
+ "unan",
17315
+ "unanez",
17316
+ "unanig",
17317
+ "unnek",
17318
+ "unnekvet",
17319
+ "ur",
17320
+ "urzh",
17321
+ "us",
17322
+ "v:",
17323
+ "va",
17324
+ "vale",
17325
+ "van",
17326
+ "vare",
17327
+ "vat",
17328
+ "vefe",
17329
+ "vefec'h",
17330
+ "vefed",
17331
+ "vefemp",
17332
+ "vefen",
17333
+ "vefent",
17334
+ "vefes",
17335
+ "vesk",
17336
+ "vete",
17337
+ "vez",
17338
+ "vezan",
17339
+ "vezañ",
17340
+ "veze",
17341
+ "vezec'h",
17342
+ "vezed",
17343
+ "vezemp",
17344
+ "vezen",
17345
+ "vezent",
17346
+ "vezer",
17347
+ "vezes",
17348
+ "vezez",
17349
+ "vezit",
17350
+ "vezomp",
17351
+ "vezont",
17352
+ "vi",
17353
+ "vihan",
17354
+ "vihanañ",
17355
+ "vije",
17356
+ "vijec'h",
17357
+ "vijed",
17358
+ "vijemp",
17359
+ "vijen",
17360
+ "vijent",
17361
+ "vijes",
17362
+ "viken",
17363
+ "vimp",
17364
+ "vin",
17365
+ "vint",
17366
+ "vior",
17367
+ "viot",
17368
+ "virviken",
17369
+ "viskoazh",
17370
+ "vlan",
17371
+ "vlaou",
17372
+ "vo",
17373
+ "vod",
17374
+ "voe",
17375
+ "voec'h",
17376
+ "voed",
17377
+ "voemp",
17378
+ "voen",
17379
+ "voent",
17380
+ "voes",
17381
+ "vont",
17382
+ "vostapl",
17383
+ "vrac'h",
17384
+ "vrasañ",
17385
+ "vremañ",
17386
+ "w:",
17387
+ "walc'h",
17388
+ "war",
17389
+ "warnañ",
17390
+ "warni",
17391
+ "warno",
17392
+ "warnoc'h",
17393
+ "warnomp",
17394
+ "warnon",
17395
+ "warnor",
17396
+ "warnout",
17397
+ "wazh",
17398
+ "wech",
17399
+ "wechoù",
17400
+ "well",
17401
+ "y:",
17402
+ "you",
17403
+ "youadenn",
17404
+ "youc'hadenn",
17405
+ "youc'hou",
17406
+ "z:",
17407
+ "za",
17408
+ "zan",
17409
+ "zaw",
17410
+ "zeu",
17411
+ "zi",
17412
+ "ziar",
17413
+ "zigarez",
17414
+ "ziget",
17415
+ "zindan",
17416
+ "zioc'h",
17417
+ "ziouzh",
17418
+ "zirak",
17419
+ "zivout",
17420
+ "ziwar",
17421
+ "ziwezhañ",
17422
+ "zo",
17423
+ "zoken",
17424
+ "zokenoc'h",
17425
+ "zouesk",
17426
+ "zouez",
17427
+ "zro",
17428
+ "zu"
16475
17429
  ];
16476
17430
  const bul = [
16477
17431
  "а",
@@ -28127,22 +29081,32 @@ flowchart TD
28127
29081
  "şöyle"
28128
29082
  ];
28129
29083
  const ukr = [
29084
+ "а",
29085
+ "або",
28130
29086
  "авжеж",
28131
29087
  "адже",
29088
+ "аж",
28132
29089
  "але",
29090
+ "ані",
28133
29091
  "б",
28134
29092
  "без",
29093
+ "би",
29094
+ "бо",
28135
29095
  "був",
28136
29096
  "була",
28137
29097
  "були",
28138
29098
  "було",
28139
29099
  "бути",
28140
29100
  "більш",
29101
+ "в",
28141
29102
  "вам",
29103
+ "вами",
28142
29104
  "вас",
28143
29105
  "весь",
29106
+ "вже",
28144
29107
  "вздовж",
28145
29108
  "ви",
29109
+ "від",
28146
29110
  "вниз",
28147
29111
  "внизу",
28148
29112
  "вона",
@@ -28151,55 +29115,138 @@ flowchart TD
28151
29115
  "все",
28152
29116
  "всередині",
28153
29117
  "всіх",
29118
+ "вся",
28154
29119
  "від",
28155
29120
  "він",
28156
29121
  "да",
28157
29122
  "давай",
28158
29123
  "давати",
28159
29124
  "де",
29125
+ "десь",
28160
29126
  "дещо",
28161
29127
  "для",
28162
29128
  "до",
29129
+ "є",
29130
+ "ж",
29131
+ "же",
28163
29132
  "з",
29133
+ "за",
28164
29134
  "завжди",
28165
29135
  "замість",
29136
+ "зі",
29137
+ "і",
29138
+ "із",
29139
+ "інших",
29140
+ "її",
29141
+ "їй",
29142
+ "їм",
29143
+ "їх",
28166
29144
  "й",
29145
+ "його",
29146
+ "йому",
28167
29147
  "коли",
28168
29148
  "ледве",
29149
+ "лиш",
28169
29150
  "майже",
29151
+ "мене",
29152
+ "мені",
28170
29153
  "ми",
29154
+ "між",
29155
+ "мій",
29156
+ "мною",
29157
+ "мов",
29158
+ "мого",
29159
+ "моєї",
29160
+ "моє",
29161
+ "може",
29162
+ "мої",
29163
+ "моїх",
29164
+ "моя",
29165
+ "на",
29166
+ "над",
28171
29167
  "навколо",
28172
29168
  "навіть",
28173
29169
  "нам",
29170
+ "нами",
29171
+ "нас",
29172
+ "наче",
29173
+ "наш",
29174
+ "не",
29175
+ "нє",
29176
+ "неї",
29177
+ "нема",
29178
+ "немов",
29179
+ "неначе",
29180
+ "нею",
29181
+ "ним",
29182
+ "ними",
29183
+ "них",
29184
+ "ні",
29185
+ "ніби",
29186
+ "ніщо",
29187
+ "нього",
29188
+ "о",
29189
+ "ось",
28174
29190
  "от",
28175
29191
  "отже",
28176
29192
  "отож",
29193
+ "під",
29194
+ "по",
28177
29195
  "поза",
28178
29196
  "про",
28179
29197
  "під",
29198
+ "сам",
29199
+ "сама",
29200
+ "свій",
29201
+ "свої",
29202
+ "своя",
29203
+ "свою",
29204
+ "себе",
29205
+ "собі",
28180
29206
  "та",
29207
+ "там",
28181
29208
  "так",
29209
+ "така",
28182
29210
  "такий",
28183
29211
  "також",
29212
+ "твій",
29213
+ "твого",
29214
+ "твоєї",
29215
+ "твої",
29216
+ "твоя",
28184
29217
  "те",
29218
+ "тебе",
28185
29219
  "ти",
29220
+ "ті",
29221
+ "тільки",
29222
+ "то",
29223
+ "тобі",
29224
+ "тобою",
28186
29225
  "тобто",
29226
+ "тоді",
28187
29227
  "тож",
29228
+ "той",
28188
29229
  "тощо",
29230
+ "тут",
29231
+ "у",
29232
+ "хіба",
29233
+ "хоч",
28189
29234
  "хоча",
28190
29235
  "це",
28191
29236
  "цей",
29237
+ "ці",
29238
+ "ця",
28192
29239
  "чи",
28193
29240
  "чого",
29241
+ "ще",
28194
29242
  "що",
29243
+ "щоб",
29244
+ "щось",
29245
+ "я",
28195
29246
  "як",
29247
+ "яка",
28196
29248
  "який",
28197
- "якої",
28198
- "є",
28199
- "із",
28200
- "інших",
28201
- "їх",
28202
- "її"
29249
+ "якої"
28203
29250
  ];
28204
29251
  const urd = [
28205
29252
  "آئی",
@@ -30112,6 +31159,7 @@ mutation addPendingDocumentMutation(
30112
31159
  relativePath
30113
31160
  filename
30114
31161
  extension
31162
+ hasReferences
30115
31163
  }
30116
31164
  }
30117
31165
  }
@@ -30203,6 +31251,9 @@ mutation addPendingDocumentMutation(
30203
31251
  document(collection:$collection, relativePath:$relativePath) {
30204
31252
  ... on Document {
30205
31253
  _values
31254
+ _sys {
31255
+ hasReferences
31256
+ }
30206
31257
  }
30207
31258
  }
30208
31259
  }`;
@@ -31826,6 +32877,7 @@ This will work when developing locally but NOT when deployed to production.
31826
32877
  const [vars, setVars] = React.useState({
31827
32878
  collection: collectionName,
31828
32879
  relativePath: "",
32880
+ relativePathWithoutExtension: "",
31829
32881
  newRelativePath: "",
31830
32882
  filterField: "",
31831
32883
  folderName: "",
@@ -31867,6 +32919,7 @@ This will work when developing locally but NOT when deployed to production.
31867
32919
  ...old,
31868
32920
  collection: collectionName,
31869
32921
  relativePath: "",
32922
+ relativePathWithoutExtension: "",
31870
32923
  newRelativePath: "",
31871
32924
  filterField: "",
31872
32925
  startsWith: "",
@@ -31892,6 +32945,7 @@ This will work when developing locally but NOT when deployed to production.
31892
32945
  collectionName === vars.collection ? vars : {
31893
32946
  collection: collectionName,
31894
32947
  relativePath: "",
32948
+ relativePathWithoutExtension: "",
31895
32949
  newRelativePath: "",
31896
32950
  filterField: "",
31897
32951
  startsWith: "",
@@ -31929,6 +32983,23 @@ This will work when developing locally but NOT when deployed to production.
31929
32983
  DeleteModal,
31930
32984
  {
31931
32985
  filename: vars.relativePath,
32986
+ checkRefsFunc: async () => {
32987
+ var _a2, _b2;
32988
+ try {
32989
+ const doc = await admin.fetchDocument(
32990
+ collection.name,
32991
+ vars.relativePath,
32992
+ true
32993
+ );
32994
+ return (_b2 = (_a2 = doc == null ? void 0 : doc.document) == null ? void 0 : _a2._sys) == null ? void 0 : _b2.hasReferences;
32995
+ } catch (error) {
32996
+ cms.alerts.error(
32997
+ "Document was not found, ask a developer for help or check the console for an error message"
32998
+ );
32999
+ console.error(error);
33000
+ throw error;
33001
+ }
33002
+ },
31932
33003
  deleteFunc: async () => {
31933
33004
  try {
31934
33005
  await admin.deleteDocument(vars);
@@ -31937,6 +33008,12 @@ This will work when developing locally but NOT when deployed to production.
31937
33008
  );
31938
33009
  reFetchCollection();
31939
33010
  } catch (error) {
33011
+ if (error.message.indexOf("has references")) {
33012
+ cms.alerts.error(
33013
+ error.message.split("\n ").filter(Boolean)[1]
33014
+ );
33015
+ return;
33016
+ }
31940
33017
  cms.alerts.warn(
31941
33018
  "Document was not deleted, ask a developer for help or check the console for an error message"
31942
33019
  );
@@ -31970,7 +33047,7 @@ This will work when developing locally but NOT when deployed to production.
31970
33047
  ), renameModalOpen && /* @__PURE__ */ React.createElement(
31971
33048
  RenameModal,
31972
33049
  {
31973
- filename: vars.relativePath,
33050
+ filename: vars.relativePathWithoutExtension,
31974
33051
  newRelativePath: vars.newRelativePath,
31975
33052
  setNewRelativePath: (newRelativePath) => {
31976
33053
  setVars((vars2) => {
@@ -31988,6 +33065,12 @@ This will work when developing locally but NOT when deployed to production.
31988
33065
  cms.alerts.info("Document was successfully renamed");
31989
33066
  reFetchCollection();
31990
33067
  } catch (error) {
33068
+ if (error.message.indexOf("has references")) {
33069
+ cms.alerts.error(
33070
+ error.message.split("\n ").filter(Boolean)[1]
33071
+ );
33072
+ return;
33073
+ }
31991
33074
  cms.alerts.warn(
31992
33075
  "Document was not renamed, ask a developer for help or check the console for an error message"
31993
33076
  );
@@ -32285,6 +33368,9 @@ This will work when developing locally but NOT when deployed to production.
32285
33368
  setVars((old) => ({
32286
33369
  ...old,
32287
33370
  collection: collectionName,
33371
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
33372
+ "/"
33373
+ ),
32288
33374
  relativePath: document2.node._sys.breadcrumbs.join(
32289
33375
  "/"
32290
33376
  ) + document2.node._sys.extension,
@@ -32307,6 +33393,9 @@ This will work when developing locally but NOT when deployed to production.
32307
33393
  setVars((old) => ({
32308
33394
  ...old,
32309
33395
  collection: collectionName,
33396
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
33397
+ "/"
33398
+ ),
32310
33399
  relativePath: document2.node._sys.breadcrumbs.join(
32311
33400
  "/"
32312
33401
  ) + document2.node._sys.extension,
@@ -32461,8 +33550,19 @@ This will work when developing locally but NOT when deployed to production.
32461
33550
  const NoDocumentsPlaceholder = () => {
32462
33551
  return /* @__PURE__ */ React.createElement("div", { className: "text-center px-5 py-3 flex flex-col items-center justify-center shadow border border-gray-100 bg-gray-50 border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React.createElement("p", { className: "text-base italic font-medium text-gray-300" }, "No documents found."));
32463
33552
  };
32464
- const DeleteModal = ({ close: close2, deleteFunc, filename }) => {
32465
- return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", null, `Are you sure you want to delete ${filename}?`)), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
33553
+ const DeleteModal = ({
33554
+ close: close2,
33555
+ deleteFunc,
33556
+ checkRefsFunc,
33557
+ filename
33558
+ }) => {
33559
+ const [hasRefs, setHasRefs] = React.useState();
33560
+ React.useEffect(() => {
33561
+ checkRefsFunc().then((result) => {
33562
+ setHasRefs(result);
33563
+ });
33564
+ }, [filename, checkRefsFunc]);
33565
+ return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", null, `Are you sure you want to delete ${filename}?${hasRefs ? " References to this document will also be deleted." : ""}`)), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
32466
33566
  Button$1,
32467
33567
  {
32468
33568
  style: { flexGrow: 3 },
@@ -32508,7 +33608,7 @@ This will work when developing locally but NOT when deployed to production.
32508
33608
  newRelativePath,
32509
33609
  setNewRelativePath
32510
33610
  }) => {
32511
- return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React.createElement("strong", null, filename), "? TinaCMS uses the filename as the ID; renaming this file could result in unresolved references."), /* @__PURE__ */ React.createElement(
33611
+ return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(PopupModal, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Rename ", filename), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "mb-4" }, "Are you sure you want to rename ", /* @__PURE__ */ React.createElement("strong", null, filename), "?"), /* @__PURE__ */ React.createElement(
32512
33612
  BaseTextField,
32513
33613
  {
32514
33614
  placeholder: "Enter a new name for the document's file",
@@ -32523,7 +33623,8 @@ This will work when developing locally but NOT when deployed to production.
32523
33623
  onClick: async () => {
32524
33624
  await renameFunc();
32525
33625
  close2();
32526
- }
33626
+ },
33627
+ disabled: !newRelativePath || newRelativePath === filename
32527
33628
  },
32528
33629
  "Rename"
32529
33630
  ))));
@@ -33194,15 +34295,24 @@ This will work when developing locally but NOT when deployed to production.
33194
34295
  }
33195
34296
  }
33196
34297
  if (state === "creatingPR") {
33197
- const foo = await tinaApi.createPullRequest({
33198
- baseBranch,
33199
- branch,
33200
- title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
33201
- });
33202
- console.log("PR created", foo);
33203
- cms.alerts.success("Pull request created.");
33204
- localStorage.setItem("tina.createBranchState", "done");
33205
- setState("done");
34298
+ try {
34299
+ const foo = await tinaApi.createPullRequest({
34300
+ baseBranch,
34301
+ branch,
34302
+ title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
34303
+ });
34304
+ console.log("PR created", foo);
34305
+ cms.alerts.success("Pull request created.");
34306
+ localStorage.setItem("tina.createBranchState", "done");
34307
+ setState("done");
34308
+ } catch (e) {
34309
+ console.error(e);
34310
+ cms.alerts.error("Failed to create PR");
34311
+ setErrorMessage(
34312
+ "Failed to create PR, please try again. If the problem persists please contact support."
34313
+ );
34314
+ setState("error");
34315
+ }
33206
34316
  }
33207
34317
  if (state === "done") {
33208
34318
  window.location.href = back;