tinacms 0.0.0-cff6c6a-20241023044614 → 0.0.0-d240606-20250315175410

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/admin/api.d.ts +1 -0
  2. package/dist/admin/types.d.ts +3 -0
  3. package/dist/auth/TinaCloudProvider.d.ts +1 -1
  4. package/dist/cache/node-cache.d.ts +1 -0
  5. package/dist/client.js +85 -65
  6. package/dist/client.mjs +49 -35
  7. package/dist/hooks/create-page-plugin.d.ts +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +1843 -635
  10. package/dist/index.mjs +1860 -652
  11. package/dist/node-cache-5e8db9f0.mjs +63 -0
  12. package/dist/react.d.ts +1 -0
  13. package/dist/react.js +10 -1
  14. package/dist/react.mjs +10 -1
  15. package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
  16. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
  17. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
  18. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
  19. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
  20. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
  21. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
  22. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
  23. package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
  24. package/dist/unifiedClient/index.d.ts +8 -1
  25. package/package.json +40 -40
  26. package/dist/__vite-browser-external-d06ac358.mjs +0 -4
  27. package/dist/node-cache-6a1378f7.mjs +0 -52
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/cn"), require("@udecode/plate"), require("@udecode/plate-common"), require("@udecode/plate-slash-command"), require("slate-react"), require("@udecode/plate-code-block"), require("@monaco-editor/react"), require("@headlessui/react"), require("class-variance-authority"), require("lucide-react"), require("mermaid"), require("@udecode/plate-heading"), require("@ariakit/react"), require("@udecode/plate-combobox"), require("@udecode/plate-table"), require("@udecode/plate-resizable"), require("@radix-ui/react-popover"), require("@radix-ui/react-slot"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-separator"), require("final-form-arrays"), require("final-form-set-field-data"), require("final-form"), require("react-final-form"), require("prop-types"), require("react-beautiful-dnd"), require("react-color"), require("color-string"), require("react-dropzone"), require("clsx"), require("tailwind-merge"), require("cmdk"), require("is-hotkey"), require("slate"), require("lodash.get"), require("moment"), require("date-fns"), require("@udecode/plate-link"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-tooltip"), require("@udecode/plate-paragraph"), require("@udecode/plate-block-quote"), require("@udecode/plate-floating"), require("@react-hook/window-size"), require("graphql"), require("graphql-tag"), require("@tinacms/schema-tools"), require("yup"), require("@graphql-inspector/core"), require("react-router-dom"), require("@tinacms/mdx")) : typeof define === "function" && define.amd ? define(["exports", "zod", "react", "react-dom", "@udecode/cn", "@udecode/plate", "@udecode/plate-common", "@udecode/plate-slash-command", "slate-react", "@udecode/plate-code-block", "@monaco-editor/react", "@headlessui/react", "class-variance-authority", "lucide-react", "mermaid", "@udecode/plate-heading", "@ariakit/react", "@udecode/plate-combobox", "@udecode/plate-table", "@udecode/plate-resizable", "@radix-ui/react-popover", "@radix-ui/react-slot", "@radix-ui/react-dropdown-menu", "@radix-ui/react-separator", "final-form-arrays", "final-form-set-field-data", "final-form", "react-final-form", "prop-types", "react-beautiful-dnd", "react-color", "color-string", "react-dropzone", "clsx", "tailwind-merge", "cmdk", "is-hotkey", "slate", "lodash.get", "moment", "date-fns", "@udecode/plate-link", "@radix-ui/react-toolbar", "@radix-ui/react-tooltip", "@udecode/plate-paragraph", "@udecode/plate-block-quote", "@udecode/plate-floating", "@react-hook/window-size", "graphql", "graphql-tag", "@tinacms/schema-tools", "yup", "@graphql-inspector/core", "react-router-dom", "@tinacms/mdx"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP));
3
- })(this, function(exports2, zod, React, reactDom, cn$1, plate, plateCommon, plateSlashCommand, slateReact, plateCodeBlock, MonacoEditor, react, classVarianceAuthority, lucideReact, mermaid, plateHeading, react$1, plateCombobox, plateTable, plateResizable, PopoverPrimitive, reactSlot, DropdownMenuPrimitive, SeparatorPrimitive, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, pkg$1, pkg, dropzone, clsx, tailwindMerge, cmdk, isHotkey, slate, get, moment, dateFns, plateLink, ToolbarPrimitive, TooltipPrimitive, plateParagraph, plateBlockQuote, plateFloating, windowSize, graphql, gql, schemaTools, yup, core, reactRouterDom, mdx) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("zod"), require("react"), require("react-dom"), require("@udecode/cn"), require("@udecode/plate"), require("@udecode/plate-common"), require("@udecode/plate-slash-command"), require("slate-react"), require("@udecode/plate-code-block"), require("@monaco-editor/react"), require("@headlessui/react"), require("class-variance-authority"), require("lucide-react"), require("mermaid"), require("@udecode/plate-heading"), require("@ariakit/react"), require("@udecode/plate-combobox"), require("@udecode/plate-table"), require("@udecode/plate-resizable"), require("@radix-ui/react-popover"), require("@radix-ui/react-slot"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-separator"), require("final-form-arrays"), require("final-form-set-field-data"), require("final-form"), require("react-final-form"), require("prop-types"), require("react-beautiful-dnd"), require("react-color"), require("color-string"), require("react-dropzone"), require("clsx"), require("tailwind-merge"), require("cmdk"), require("is-hotkey"), require("slate"), require("lodash.get"), require("moment"), require("date-fns"), require("@udecode/plate-link"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-tooltip"), require("@udecode/plate-paragraph"), require("@udecode/plate-block-quote"), require("@udecode/plate-floating"), require("@react-hook/window-size"), require("graphql"), require("graphql-tag"), require("@tinacms/schema-tools"), require("@graphql-inspector/core"), require("yup"), require("react-router-dom"), require("@tinacms/mdx")) : typeof define === "function" && define.amd ? define(["exports", "zod", "react", "react-dom", "@udecode/cn", "@udecode/plate", "@udecode/plate-common", "@udecode/plate-slash-command", "slate-react", "@udecode/plate-code-block", "@monaco-editor/react", "@headlessui/react", "class-variance-authority", "lucide-react", "mermaid", "@udecode/plate-heading", "@ariakit/react", "@udecode/plate-combobox", "@udecode/plate-table", "@udecode/plate-resizable", "@radix-ui/react-popover", "@radix-ui/react-slot", "@radix-ui/react-dropdown-menu", "@radix-ui/react-separator", "final-form-arrays", "final-form-set-field-data", "final-form", "react-final-form", "prop-types", "react-beautiful-dnd", "react-color", "color-string", "react-dropzone", "clsx", "tailwind-merge", "cmdk", "is-hotkey", "slate", "lodash.get", "moment", "date-fns", "@udecode/plate-link", "@radix-ui/react-toolbar", "@radix-ui/react-tooltip", "@udecode/plate-paragraph", "@udecode/plate-block-quote", "@udecode/plate-floating", "@react-hook/window-size", "graphql", "graphql-tag", "@tinacms/schema-tools", "@graphql-inspector/core", "yup", "react-router-dom", "@tinacms/mdx"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP));
3
+ })(this, function(exports2, zod, React, reactDom, cn$1, plate, plateCommon, plateSlashCommand, slateReact, plateCodeBlock, MonacoEditor, react, classVarianceAuthority, lucideReact, mermaid, plateHeading, react$1, plateCombobox, plateTable, plateResizable, PopoverPrimitive, reactSlot, DropdownMenuPrimitive, SeparatorPrimitive, arrayMutators, setFieldData, finalForm, reactFinalForm, PropTypes, reactBeautifulDnd, pkg$1, pkg, dropzone, clsx, tailwindMerge, cmdk, isHotkey, slate, get, moment, dateFns, plateLink, ToolbarPrimitive, TooltipPrimitive, plateParagraph, plateBlockQuote, plateFloating, windowSize, graphql, gql, schemaTools, core, yup, reactRouterDom, mdx) {
4
4
  "use strict";var __defProp = Object.defineProperty;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
6
  var __publicField = (obj, key, value) => {
@@ -774,6 +774,22 @@ var __publicField = (obj, key, value) => {
774
774
  );
775
775
  };
776
776
  }
777
+ function wrapFieldWithNoHeader(Field) {
778
+ return (props) => {
779
+ return /* @__PURE__ */ React__namespace.createElement(
780
+ FieldMeta,
781
+ {
782
+ name: props.input.name,
783
+ label: false,
784
+ description: "",
785
+ error: props.meta.error,
786
+ index: props.index,
787
+ tinaForm: props.tinaForm
788
+ },
789
+ /* @__PURE__ */ React__namespace.createElement(Field, { ...props })
790
+ );
791
+ };
792
+ }
777
793
  function wrapFieldWithError(Field) {
778
794
  return (props) => {
779
795
  return /* @__PURE__ */ React__namespace.createElement(
@@ -846,6 +862,16 @@ var __publicField = (obj, key, value) => {
846
862
  className,
847
863
  ...props
848
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
+ }
849
875
  return /* @__PURE__ */ React__namespace.createElement(
850
876
  "span",
851
877
  {
@@ -2917,7 +2943,7 @@ flowchart TD
2917
2943
  ),
2918
2944
  [plate.MARK_CODE]: CodeLeaf,
2919
2945
  [plate.MARK_UNDERLINE]: cn$1.withProps(plateCommon.PlateLeaf, { as: "u" }),
2920
- [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 }),
2921
2947
  [plate.MARK_ITALIC]: cn$1.withProps(plateCommon.PlateLeaf, { as: "em" }),
2922
2948
  [plate.MARK_BOLD]: ({ editor, leaf, text, ...props }) => /* @__PURE__ */ React.createElement("strong", { ...props.attributes, ...props }),
2923
2949
  [plate.ELEMENT_HR]: ({
@@ -3676,7 +3702,7 @@ flowchart TD
3676
3702
  };
3677
3703
  const sizeClasses = {
3678
3704
  small: `text-xs h-8 px-3`,
3679
- medium: `text-sm h-10 px-4`,
3705
+ medium: `text-sm h-10 px-8`,
3680
3706
  custom: ``
3681
3707
  };
3682
3708
  return /* @__PURE__ */ React__namespace.createElement(
@@ -3804,7 +3830,7 @@ flowchart TD
3804
3830
  function _objectWithoutProperties(source, excluded) {
3805
3831
  if (source == null)
3806
3832
  return {};
3807
- var target = _objectWithoutPropertiesLoose$1(source, excluded);
3833
+ var target = _objectWithoutPropertiesLoose(source, excluded);
3808
3834
  var key, i;
3809
3835
  if (Object.getOwnPropertySymbols) {
3810
3836
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -3819,7 +3845,7 @@ flowchart TD
3819
3845
  }
3820
3846
  return target;
3821
3847
  }
3822
- function _objectWithoutPropertiesLoose$1(source, excluded) {
3848
+ function _objectWithoutPropertiesLoose(source, excluded) {
3823
3849
  if (source == null)
3824
3850
  return {};
3825
3851
  var target = {};
@@ -4909,7 +4935,28 @@ flowchart TD
4909
4935
  onChange,
4910
4936
  value,
4911
4937
  step
4912
- }) => /* @__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
+ );
4913
4960
  function useCMS() {
4914
4961
  return useCMS$1();
4915
4962
  }
@@ -5150,7 +5197,7 @@ flowchart TD
5150
5197
  side: "bottom",
5151
5198
  className: cn(
5152
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",
5153
- "max-h-[30vh] max-w-[30vh] overflow-y-auto",
5200
+ "max-h-[30vh] max-w-[30vw] overflow-y-auto",
5154
5201
  className
5155
5202
  ),
5156
5203
  ...props
@@ -5242,11 +5289,7 @@ flowchart TD
5242
5289
  const node = nodes.find((node2) => node2.id === value);
5243
5290
  return node ? node._internalSys.filename : null;
5244
5291
  };
5245
- const ComboboxDemo = ({
5246
- cms,
5247
- input,
5248
- field
5249
- }) => {
5292
+ const Combobox = ({ cms, input, field }) => {
5250
5293
  const [open2, setOpen] = React__namespace.useState(false);
5251
5294
  const [value, setValue] = React__namespace.useState(input.value);
5252
5295
  const [displayText, setDisplayText] = React__namespace.useState(null);
@@ -5262,7 +5305,9 @@ flowchart TD
5262
5305
  }, [value, input, optionSets]);
5263
5306
  React__namespace.useEffect(() => {
5264
5307
  if (field.experimental___filter && optionSets.length > 0) {
5265
- setFilteredOptionsList(field.experimental___filter(optionSets, void 0));
5308
+ setFilteredOptionsList(
5309
+ field.experimental___filter(optionSets, void 0)
5310
+ );
5266
5311
  } else {
5267
5312
  setFilteredOptionsList(optionSets);
5268
5313
  }
@@ -5270,17 +5315,17 @@ flowchart TD
5270
5315
  if (loading === true) {
5271
5316
  return /* @__PURE__ */ React__namespace.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
5272
5317
  }
5273
- 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(
5318
+ return /* @__PURE__ */ React__namespace.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React__namespace.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React__namespace.createElement(
5274
5319
  Button,
5275
5320
  {
5276
5321
  variant: "outline",
5277
5322
  role: "combobox",
5278
5323
  "aria-expanded": open2,
5279
- className: "w-52 justify-between"
5324
+ className: "w-full justify-between"
5280
5325
  },
5281
5326
  /* @__PURE__ */ React__namespace.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
5282
5327
  open2 ? /* @__PURE__ */ React__namespace.createElement(IoMdArrowDropup, { size: 20 }) : /* @__PURE__ */ React__namespace.createElement(IoMdArrowDropdown, { size: 20 })
5283
- )), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative" }, /* @__PURE__ */ React__namespace.createElement(
5328
+ )), /* @__PURE__ */ React__namespace.createElement(PopoverContent, { className: "p-0 relative min-w-[var(--radix-popover-trigger-width)]" }, /* @__PURE__ */ React__namespace.createElement(
5284
5329
  Command,
5285
5330
  {
5286
5331
  shouldFilter: !field.experimental___filter,
@@ -5304,32 +5349,25 @@ flowchart TD
5304
5349
  }
5305
5350
  ),
5306
5351
  /* @__PURE__ */ React__namespace.createElement(CommandEmpty, null, "No reference found"),
5307
- /* @__PURE__ */ React__namespace.createElement(CommandList, null, filteredOptionsList.length > 0 && (filteredOptionsList == null ? void 0 : filteredOptionsList.map(({ collection, edges }) => /* @__PURE__ */ React__namespace.createElement(
5308
- CommandGroup,
5309
- {
5310
- key: `${collection}-group`,
5311
- heading: collection
5312
- },
5313
- /* @__PURE__ */ React__namespace.createElement(CommandList, null, edges == null ? void 0 : edges.map(({ node }) => {
5314
- const { id, _values } = node;
5315
- return /* @__PURE__ */ React__namespace.createElement(
5316
- OptionComponent,
5317
- {
5318
- id,
5319
- key: id,
5320
- value,
5321
- field,
5322
- _values,
5323
- node,
5324
- onSelect: (currentValue) => {
5325
- setValue(currentValue);
5326
- setOpen(false);
5327
- }
5352
+ /* @__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 }) => {
5353
+ const { id, _values } = node;
5354
+ return /* @__PURE__ */ React__namespace.createElement(
5355
+ OptionComponent,
5356
+ {
5357
+ id,
5358
+ key: id,
5359
+ value,
5360
+ field,
5361
+ _values,
5362
+ node,
5363
+ onSelect: (currentValue) => {
5364
+ setValue(currentValue);
5365
+ setOpen(false);
5328
5366
  }
5329
- );
5330
- }))
5331
- ))))
5332
- ))));
5367
+ }
5368
+ );
5369
+ }))))))
5370
+ )));
5333
5371
  };
5334
5372
  const useGetNode = (cms, id) => {
5335
5373
  const [document2, setDocument] = React__namespace.useState(
@@ -5402,7 +5440,7 @@ flowchart TD
5402
5440
  };
5403
5441
  const Reference = ({ input, field }) => {
5404
5442
  const cms = useCMS();
5405
- 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 }));
5443
+ 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 }));
5406
5444
  };
5407
5445
  const ButtonToggle = ({
5408
5446
  input,
@@ -5639,7 +5677,9 @@ flowchart TD
5639
5677
  onClick: () => {
5640
5678
  const state = tinaForm.finalForm.getState();
5641
5679
  if (state.invalid === true) {
5642
- cms.alerts.error("Cannot navigate away from an invalid form.");
5680
+ cms.alerts.error(
5681
+ "Cannot navigate away from an invalid form."
5682
+ );
5643
5683
  return;
5644
5684
  }
5645
5685
  cms.dispatch({
@@ -5710,10 +5750,11 @@ flowchart TD
5710
5750
  return /* @__PURE__ */ React.createElement(
5711
5751
  "button",
5712
5752
  {
5713
- 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"}`,
5753
+ type: "button",
5754
+ 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"}`,
5714
5755
  onClick
5715
5756
  },
5716
- /* @__PURE__ */ React.createElement(TrashIcon, { className: "fill-current transition-colors ease-out duration-100" })
5757
+ /* @__PURE__ */ React.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
5717
5758
  );
5718
5759
  };
5719
5760
  const DragHandle = ({ isDragging }) => {
@@ -5791,27 +5832,35 @@ flowchart TD
5791
5832
  ))))
5792
5833
  ))));
5793
5834
  };
5794
- const Group = wrapFieldWithError(({ tinaForm, field }) => {
5795
- const cms = useCMS$1();
5796
- React__namespace.useState(false);
5797
- return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
5798
- Header,
5799
- {
5800
- onClick: () => {
5801
- const state = tinaForm.finalForm.getState();
5802
- if (state.invalid === true) {
5803
- cms.alerts.error("Cannot navigate away from an invalid form.");
5804
- return;
5835
+ const Group = wrapFieldWithNoHeader(
5836
+ ({ tinaForm, field }) => {
5837
+ const cms = useCMS$1();
5838
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
5839
+ Header,
5840
+ {
5841
+ onClick: () => {
5842
+ const state = tinaForm.finalForm.getState();
5843
+ if (state.invalid === true) {
5844
+ cms.alerts.error("Cannot navigate away from an invalid form.");
5845
+ return;
5846
+ }
5847
+ cms.dispatch({
5848
+ type: "forms:set-active-field-name",
5849
+ value: { formId: tinaForm.id, fieldName: field.name }
5850
+ });
5805
5851
  }
5806
- cms.dispatch({
5807
- type: "forms:set-active-field-name",
5808
- value: { formId: tinaForm.id, fieldName: field.name }
5809
- });
5810
- }
5811
- },
5812
- field.label || field.name
5813
- ));
5814
- });
5852
+ },
5853
+ field.label || field.name,
5854
+ field.description && /* @__PURE__ */ React__namespace.createElement(
5855
+ "span",
5856
+ {
5857
+ className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0`,
5858
+ dangerouslySetInnerHTML: { __html: field.description }
5859
+ }
5860
+ )
5861
+ ));
5862
+ }
5863
+ );
5815
5864
  const Header = ({ onClick, children }) => {
5816
5865
  return /* @__PURE__ */ React__namespace.createElement("div", { className: "pt-1 mb-5" }, /* @__PURE__ */ React__namespace.createElement(
5817
5866
  "button",
@@ -6214,7 +6263,9 @@ flowchart TD
6214
6263
  onClick: () => {
6215
6264
  const state = tinaForm.finalForm.getState();
6216
6265
  if (state.invalid === true) {
6217
- cms.alerts.error("Cannot navigate away from an invalid form.");
6266
+ cms.alerts.error(
6267
+ "Cannot navigate away from an invalid form."
6268
+ );
6218
6269
  return;
6219
6270
  }
6220
6271
  cms.dispatch({
@@ -6696,28 +6747,28 @@ flowchart TD
6696
6747
  }
6697
6748
  renderDayHeaders() {
6698
6749
  const locale = this.props.viewDate.localeData();
6699
- let dayItems = getDaysOfWeek(locale).map((day, index) => /* @__PURE__ */ React.createElement("th", { key: day + index, className: "dow" }, day));
6750
+ const dayItems = getDaysOfWeek(locale).map((day, index) => /* @__PURE__ */ React.createElement("th", { key: day + index, className: "dow" }, day));
6700
6751
  return /* @__PURE__ */ React.createElement("tr", null, dayItems);
6701
6752
  }
6702
6753
  renderDays() {
6703
6754
  const date = this.props.viewDate;
6704
6755
  const startOfMonth = date.clone().startOf("month");
6705
6756
  const endOfMonth = date.clone().endOf("month");
6706
- let rows = [[], [], [], [], [], []];
6707
- let startDate = date.clone().subtract(1, "months");
6757
+ const rows = [[], [], [], [], [], []];
6758
+ const startDate = date.clone().subtract(1, "months");
6708
6759
  startDate.date(startDate.daysInMonth()).startOf("week");
6709
- let endDate = startDate.clone().add(42, "d");
6760
+ const endDate = startDate.clone().add(42, "d");
6710
6761
  let i = 0;
6711
6762
  while (startDate.isBefore(endDate)) {
6712
- let row = getRow$2(rows, i++);
6763
+ const row = getRow$2(rows, i++);
6713
6764
  row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
6714
6765
  startDate.add(1, "d");
6715
6766
  }
6716
6767
  return rows.map((r, i2) => /* @__PURE__ */ React.createElement("tr", { key: `${endDate.month()}_${i2}` }, r));
6717
6768
  }
6718
6769
  renderDay(date, startOfMonth, endOfMonth) {
6719
- let selectedDate = this.props.selectedDate;
6720
- let dayProps = {
6770
+ const selectedDate = this.props.selectedDate;
6771
+ const dayProps = {
6721
6772
  key: date.format("M_D"),
6722
6773
  "data-value": date.date(),
6723
6774
  "data-month": date.month(),
@@ -6771,7 +6822,7 @@ flowchart TD
6771
6822
  }
6772
6823
  function getDaysOfWeek(locale) {
6773
6824
  const first = locale.firstDayOfWeek();
6774
- let dow = [];
6825
+ const dow = [];
6775
6826
  let i = 0;
6776
6827
  locale._weekdaysMin.forEach(function(day) {
6777
6828
  dow[(7 + i++ - first) % 7] = day;
@@ -6789,7 +6840,7 @@ flowchart TD
6789
6840
  return /* @__PURE__ */ React.createElement("div", { className: "rdtMonths" }, /* @__PURE__ */ React.createElement("table", null, /* @__PURE__ */ React.createElement("thead", null, this.renderNavigation())), /* @__PURE__ */ React.createElement("table", null, /* @__PURE__ */ React.createElement("tbody", null, this.renderMonths())));
6790
6841
  }
6791
6842
  renderNavigation() {
6792
- let year = this.props.viewDate.year();
6843
+ const year = this.props.viewDate.year();
6793
6844
  return /* @__PURE__ */ React.createElement(
6794
6845
  ViewNavigation,
6795
6846
  {
@@ -6802,9 +6853,9 @@ flowchart TD
6802
6853
  );
6803
6854
  }
6804
6855
  renderMonths() {
6805
- let rows = [[], [], []];
6856
+ const rows = [[], [], []];
6806
6857
  for (let month = 0; month < 12; month++) {
6807
- let row = getRow$1(rows, month);
6858
+ const row = getRow$1(rows, month);
6808
6859
  row.push(this.renderMonth(month));
6809
6860
  }
6810
6861
  return rows.map((months, i) => /* @__PURE__ */ React.createElement("tr", { key: i }, months));
@@ -6821,7 +6872,7 @@ flowchart TD
6821
6872
  if (selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month) {
6822
6873
  className += " rdtActive";
6823
6874
  }
6824
- let props = { key: month, className, "data-value": month, onClick };
6875
+ const props = { key: month, className, "data-value": month, onClick };
6825
6876
  if (this.props.renderMonth) {
6826
6877
  return this.props.renderMonth(
6827
6878
  props,
@@ -6833,11 +6884,11 @@ flowchart TD
6833
6884
  return /* @__PURE__ */ React.createElement("td", { ...props }, this.getMonthText(month));
6834
6885
  }
6835
6886
  isDisabledMonth(month) {
6836
- let isValidDate = this.props.isValidDate;
6887
+ const isValidDate = this.props.isValidDate;
6837
6888
  if (!isValidDate) {
6838
6889
  return false;
6839
6890
  }
6840
- let date = this.props.viewDate.clone().set({ month });
6891
+ const date = this.props.viewDate.clone().set({ month });
6841
6892
  let day = date.endOf("month").date() + 1;
6842
6893
  while (day-- > 1) {
6843
6894
  if (isValidDate(date.date(day))) {
@@ -6889,9 +6940,9 @@ flowchart TD
6889
6940
  }
6890
6941
  renderYears() {
6891
6942
  const viewYear = this.getViewYear();
6892
- let rows = [[], [], []];
6943
+ const rows = [[], [], []];
6893
6944
  for (let year = viewYear - 1; year < viewYear + 11; year++) {
6894
- let row = getRow(rows, year - viewYear);
6945
+ const row = getRow(rows, year - viewYear);
6895
6946
  row.push(this.renderYear(year));
6896
6947
  }
6897
6948
  return rows.map((years, i) => /* @__PURE__ */ React.createElement("tr", { key: i }, years));
@@ -6908,7 +6959,7 @@ flowchart TD
6908
6959
  if (selectedYear === year) {
6909
6960
  className += " rdtActive";
6910
6961
  }
6911
- let props = { key: year, className, "data-value": year, onClick };
6962
+ const props = { key: year, className, "data-value": year, onClick };
6912
6963
  return this.props.renderYear(
6913
6964
  props,
6914
6965
  year,
@@ -6922,15 +6973,15 @@ flowchart TD
6922
6973
  return this.props.selectedDate && this.props.selectedDate.year();
6923
6974
  }
6924
6975
  isDisabledYear(year) {
6925
- let cache = this.disabledYearsCache;
6976
+ const cache = this.disabledYearsCache;
6926
6977
  if (cache[year] !== void 0) {
6927
6978
  return cache[year];
6928
6979
  }
6929
- let isValidDate = this.props.isValidDate;
6980
+ const isValidDate = this.props.isValidDate;
6930
6981
  if (!isValidDate) {
6931
6982
  return false;
6932
6983
  }
6933
- let date = this.props.viewDate.clone().set({ year });
6984
+ const date = this.props.viewDate.clone().set({ year });
6934
6985
  let day = date.endOf("year").dayOfYear() + 1;
6935
6986
  while (day-- > 1) {
6936
6987
  if (isValidDate(date.dayOfYear(day))) {
@@ -6977,7 +7028,7 @@ flowchart TD
6977
7028
  }
6978
7029
  };
6979
7030
  function createConstraints(overrideTimeConstraints) {
6980
- let constraints = {};
7031
+ const constraints = {};
6981
7032
  Object.keys(timeConstraints).forEach((type) => {
6982
7033
  constraints[type] = {
6983
7034
  ...timeConstraints[type],
@@ -6993,7 +7044,7 @@ flowchart TD
6993
7044
  this.state = this.getTimeParts(props.selectedDate || props.viewDate);
6994
7045
  }
6995
7046
  render() {
6996
- let items2 = [];
7047
+ const items2 = [];
6997
7048
  const timeParts = this.state;
6998
7049
  this.getCounters().forEach((c, i) => {
6999
7050
  if (i && c !== "ampm") {
@@ -7055,8 +7106,8 @@ flowchart TD
7055
7106
  }
7056
7107
  if (type === "ampm")
7057
7108
  return this.toggleDayPart();
7058
- let update = {};
7059
- let body = document.body;
7109
+ const update = {};
7110
+ const body = document.body;
7060
7111
  update[type] = this[action](type);
7061
7112
  this.setState(update);
7062
7113
  this.timer = setTimeout(() => {
@@ -7099,8 +7150,8 @@ flowchart TD
7099
7150
  return pad(type, value);
7100
7151
  }
7101
7152
  getCounters() {
7102
- let counters = [];
7103
- let format2 = this.props.timeFormat;
7153
+ const counters = [];
7154
+ const format2 = this.props.timeFormat;
7104
7155
  if (format2.toLowerCase().indexOf("h") !== -1) {
7105
7156
  counters.push("hours");
7106
7157
  if (format2.indexOf("m") !== -1) {
@@ -7153,244 +7204,65 @@ flowchart TD
7153
7204
  str = "0" + str;
7154
7205
  return str;
7155
7206
  }
7156
- function _inheritsLoose(subClass, superClass) {
7157
- subClass.prototype = Object.create(superClass.prototype);
7158
- subClass.prototype.constructor = subClass;
7159
- _setPrototypeOf(subClass, superClass);
7160
- }
7161
- function _setPrototypeOf(o, p) {
7162
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
7163
- o2.__proto__ = p2;
7164
- return o2;
7165
- };
7166
- return _setPrototypeOf(o, p);
7167
- }
7168
- function _objectWithoutPropertiesLoose(source, excluded) {
7169
- if (source == null)
7170
- return {};
7171
- var target = {};
7172
- var sourceKeys = Object.keys(source);
7173
- var key, i;
7174
- for (i = 0; i < sourceKeys.length; i++) {
7175
- key = sourceKeys[i];
7176
- if (excluded.indexOf(key) >= 0)
7177
- continue;
7178
- target[key] = source[key];
7179
- }
7180
- return target;
7181
- }
7182
- function _assertThisInitialized(self2) {
7183
- if (self2 === void 0) {
7184
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7185
- }
7186
- return self2;
7187
- }
7188
- function isNodeFound(current, componentNode, ignoreClass) {
7189
- if (current === componentNode) {
7190
- return true;
7191
- }
7192
- if (current.correspondingElement) {
7193
- return current.correspondingElement.classList.contains(ignoreClass);
7194
- }
7195
- return current.classList.contains(ignoreClass);
7196
- }
7197
- function findHighest(current, componentNode, ignoreClass) {
7198
- if (current === componentNode) {
7199
- return true;
7207
+ var useClickAway$1 = {};
7208
+ var util = {};
7209
+ Object.defineProperty(util, "__esModule", { value: true });
7210
+ util.isNavigator = util.isBrowser = util.off = util.on = util.noop = void 0;
7211
+ var noop = function() {
7212
+ };
7213
+ util.noop = noop;
7214
+ function on(obj) {
7215
+ var args = [];
7216
+ for (var _i = 1; _i < arguments.length; _i++) {
7217
+ args[_i - 1] = arguments[_i];
7200
7218
  }
7201
- while (current.parentNode || current.host) {
7202
- if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) {
7203
- return true;
7204
- }
7205
- current = current.parentNode || current.host;
7219
+ if (obj && obj.addEventListener) {
7220
+ obj.addEventListener.apply(obj, args);
7206
7221
  }
7207
- return current;
7208
7222
  }
7209
- function clickedScrollbar(evt) {
7210
- return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;
7211
- }
7212
- var testPassiveEventSupport = function testPassiveEventSupport2() {
7213
- if (typeof window === "undefined" || typeof window.addEventListener !== "function") {
7214
- return;
7223
+ util.on = on;
7224
+ function off(obj) {
7225
+ var args = [];
7226
+ for (var _i = 1; _i < arguments.length; _i++) {
7227
+ args[_i - 1] = arguments[_i];
7215
7228
  }
7216
- var passive = false;
7217
- var options = Object.defineProperty({}, "passive", {
7218
- get: function get2() {
7219
- passive = true;
7220
- }
7221
- });
7222
- var noop = function noop2() {
7223
- };
7224
- window.addEventListener("testPassiveEventSupport", noop, options);
7225
- window.removeEventListener("testPassiveEventSupport", noop, options);
7226
- return passive;
7227
- };
7228
- function autoInc(seed) {
7229
- if (seed === void 0) {
7230
- seed = 0;
7229
+ if (obj && obj.removeEventListener) {
7230
+ obj.removeEventListener.apply(obj, args);
7231
7231
  }
7232
- return function() {
7233
- return ++seed;
7234
- };
7235
- }
7236
- var uid = autoInc();
7237
- var passiveEventSupport;
7238
- var handlersMap = {};
7239
- var enabledInstances = {};
7240
- var touchEvents = ["touchstart", "touchmove"];
7241
- var IGNORE_CLASS_NAME = "ignore-react-onclickoutside";
7242
- function getEventHandlerOptions(instance, eventName) {
7243
- var handlerOptions = {};
7244
- var isTouchEvent = touchEvents.indexOf(eventName) !== -1;
7245
- if (isTouchEvent && passiveEventSupport) {
7246
- handlerOptions.passive = !instance.props.preventDefault;
7247
- }
7248
- return handlerOptions;
7249
7232
  }
7250
- function onClickOutsideHOC(WrappedComponent, config) {
7251
- var _class, _temp;
7252
- var componentName = WrappedComponent.displayName || WrappedComponent.name || "Component";
7253
- return _temp = _class = /* @__PURE__ */ function(_Component) {
7254
- _inheritsLoose(onClickOutside, _Component);
7255
- function onClickOutside(props) {
7256
- var _this;
7257
- _this = _Component.call(this, props) || this;
7258
- _this.__outsideClickHandler = function(event) {
7259
- if (typeof _this.__clickOutsideHandlerProp === "function") {
7260
- _this.__clickOutsideHandlerProp(event);
7261
- return;
7262
- }
7263
- var instance = _this.getInstance();
7264
- if (typeof instance.props.handleClickOutside === "function") {
7265
- instance.props.handleClickOutside(event);
7266
- return;
7267
- }
7268
- if (typeof instance.handleClickOutside === "function") {
7269
- instance.handleClickOutside(event);
7270
- return;
7271
- }
7272
- throw new Error("WrappedComponent: " + componentName + " lacks a handleClickOutside(event) function for processing outside click events.");
7273
- };
7274
- _this.__getComponentNode = function() {
7275
- var instance = _this.getInstance();
7276
- if (config && typeof config.setClickOutsideRef === "function") {
7277
- return config.setClickOutsideRef()(instance);
7278
- }
7279
- if (typeof instance.setClickOutsideRef === "function") {
7280
- return instance.setClickOutsideRef();
7281
- }
7282
- return reactDom.findDOMNode(instance);
7283
- };
7284
- _this.enableOnClickOutside = function() {
7285
- if (typeof document === "undefined" || enabledInstances[_this._uid]) {
7286
- return;
7287
- }
7288
- if (typeof passiveEventSupport === "undefined") {
7289
- passiveEventSupport = testPassiveEventSupport();
7290
- }
7291
- enabledInstances[_this._uid] = true;
7292
- var events = _this.props.eventTypes;
7293
- if (!events.forEach) {
7294
- events = [events];
7295
- }
7296
- handlersMap[_this._uid] = function(event) {
7297
- if (_this.componentNode === null)
7298
- return;
7299
- if (_this.initTimeStamp > event.timeStamp)
7300
- return;
7301
- if (_this.props.preventDefault) {
7302
- event.preventDefault();
7303
- }
7304
- if (_this.props.stopPropagation) {
7305
- event.stopPropagation();
7306
- }
7307
- if (_this.props.excludeScrollbar && clickedScrollbar(event))
7308
- return;
7309
- var current = event.composed && event.composedPath && event.composedPath().shift() || event.target;
7310
- if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {
7311
- return;
7312
- }
7313
- _this.__outsideClickHandler(event);
7314
- };
7315
- events.forEach(function(eventName) {
7316
- document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_assertThisInitialized(_this), eventName));
7317
- });
7318
- };
7319
- _this.disableOnClickOutside = function() {
7320
- delete enabledInstances[_this._uid];
7321
- var fn = handlersMap[_this._uid];
7322
- if (fn && typeof document !== "undefined") {
7323
- var events = _this.props.eventTypes;
7324
- if (!events.forEach) {
7325
- events = [events];
7326
- }
7327
- events.forEach(function(eventName) {
7328
- return document.removeEventListener(eventName, fn, getEventHandlerOptions(_assertThisInitialized(_this), eventName));
7329
- });
7330
- delete handlersMap[_this._uid];
7331
- }
7332
- };
7333
- _this.getRef = function(ref) {
7334
- return _this.instanceRef = ref;
7335
- };
7336
- _this._uid = uid();
7337
- _this.initTimeStamp = performance.now();
7338
- return _this;
7339
- }
7340
- var _proto = onClickOutside.prototype;
7341
- _proto.getInstance = function getInstance() {
7342
- if (WrappedComponent.prototype && !WrappedComponent.prototype.isReactComponent) {
7343
- return this;
7344
- }
7345
- var ref = this.instanceRef;
7346
- return ref.getInstance ? ref.getInstance() : ref;
7347
- };
7348
- _proto.componentDidMount = function componentDidMount() {
7349
- if (typeof document === "undefined" || !document.createElement) {
7350
- return;
7351
- }
7352
- var instance = this.getInstance();
7353
- if (config && typeof config.handleClickOutside === "function") {
7354
- this.__clickOutsideHandlerProp = config.handleClickOutside(instance);
7355
- if (typeof this.__clickOutsideHandlerProp !== "function") {
7356
- throw new Error("WrappedComponent: " + componentName + " lacks a function for processing outside click events specified by the handleClickOutside config option.");
7357
- }
7358
- }
7359
- this.componentNode = this.__getComponentNode();
7360
- if (this.props.disableOnClickOutside)
7361
- return;
7362
- this.enableOnClickOutside();
7363
- };
7364
- _proto.componentDidUpdate = function componentDidUpdate() {
7365
- this.componentNode = this.__getComponentNode();
7233
+ util.off = off;
7234
+ util.isBrowser = typeof window !== "undefined";
7235
+ util.isNavigator = typeof navigator !== "undefined";
7236
+ Object.defineProperty(useClickAway$1, "__esModule", { value: true });
7237
+ var react_1 = React;
7238
+ var util_1 = util;
7239
+ var defaultEvents = ["mousedown", "touchstart"];
7240
+ var useClickAway = function(ref, onClickAway, events) {
7241
+ if (events === void 0) {
7242
+ events = defaultEvents;
7243
+ }
7244
+ var savedCallback = react_1.useRef(onClickAway);
7245
+ react_1.useEffect(function() {
7246
+ savedCallback.current = onClickAway;
7247
+ }, [onClickAway]);
7248
+ react_1.useEffect(function() {
7249
+ var handler = function(event) {
7250
+ var el = ref.current;
7251
+ el && !el.contains(event.target) && savedCallback.current(event);
7366
7252
  };
7367
- _proto.componentWillUnmount = function componentWillUnmount() {
7368
- this.disableOnClickOutside();
7369
- };
7370
- _proto.render = function render() {
7371
- var _this$props = this.props;
7372
- _this$props.excludeScrollbar;
7373
- var props = _objectWithoutPropertiesLoose(_this$props, ["excludeScrollbar"]);
7374
- if (WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) {
7375
- props.ref = this.getRef;
7376
- } else {
7377
- props.wrappedRef = this.getRef;
7253
+ for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
7254
+ var eventName = events_1[_i];
7255
+ util_1.on(document, eventName, handler);
7256
+ }
7257
+ return function() {
7258
+ for (var _i2 = 0, events_2 = events; _i2 < events_2.length; _i2++) {
7259
+ var eventName2 = events_2[_i2];
7260
+ util_1.off(document, eventName2, handler);
7378
7261
  }
7379
- props.disableOnClickOutside = this.disableOnClickOutside;
7380
- props.enableOnClickOutside = this.enableOnClickOutside;
7381
- return React.createElement(WrappedComponent, props);
7382
7262
  };
7383
- return onClickOutside;
7384
- }(React.Component), _class.displayName = "OnClickOutside(" + componentName + ")", _class.defaultProps = {
7385
- eventTypes: ["mousedown", "touchstart"],
7386
- excludeScrollbar: config && config.excludeScrollbar || false,
7387
- outsideClickIgnoreClass: IGNORE_CLASS_NAME,
7388
- preventDefault: false,
7389
- stopPropagation: false
7390
- }, _class.getClass = function() {
7391
- return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;
7392
- }, _temp;
7393
- }
7263
+ }, [events, ref]);
7264
+ };
7265
+ var _default = useClickAway$1.default = useClickAway;
7394
7266
  const viewModes = {
7395
7267
  YEARS: "years",
7396
7268
  MONTHS: "months",
@@ -7411,7 +7283,7 @@ flowchart TD
7411
7283
  __publicField(this, "_renderCalendar", () => {
7412
7284
  const props = this.props;
7413
7285
  const state = this.state;
7414
- let viewProps = {
7286
+ const viewProps = {
7415
7287
  viewDate: state.viewDate.clone(),
7416
7288
  selectedDate: this.getSelectedDate(),
7417
7289
  isValidDate: props.isValidDate,
@@ -7454,10 +7326,10 @@ flowchart TD
7454
7326
  __publicField(this, "viewToMethod", { days: "date", months: "month", years: "year" });
7455
7327
  __publicField(this, "nextView", { days: "time", months: "days", years: "months" });
7456
7328
  __publicField(this, "_updateDate", (e) => {
7457
- let state = this.state;
7458
- let currentView = state.currentView;
7459
- let updateOnView = this.getUpdateOn(this.getFormat("date"));
7460
- let viewDate = this.state.viewDate.clone();
7329
+ const state = this.state;
7330
+ const currentView = state.currentView;
7331
+ const updateOnView = this.getUpdateOn(this.getFormat("date"));
7332
+ const viewDate = this.state.viewDate.clone();
7461
7333
  viewDate[this.viewToMethod[currentView]](
7462
7334
  parseInt(e.target.getAttribute("data-value"), 10)
7463
7335
  );
@@ -7465,7 +7337,7 @@ flowchart TD
7465
7337
  viewDate.month(parseInt(e.target.getAttribute("data-month"), 10));
7466
7338
  viewDate.year(parseInt(e.target.getAttribute("data-year"), 10));
7467
7339
  }
7468
- let update = { viewDate };
7340
+ const update = { viewDate };
7469
7341
  if (currentView === updateOnView) {
7470
7342
  update.selectedDate = viewDate.clone();
7471
7343
  update.inputValue = viewDate.format(this.getFormat("datetime"));
@@ -7479,7 +7351,7 @@ flowchart TD
7479
7351
  this.setState(update);
7480
7352
  });
7481
7353
  __publicField(this, "_viewNavigate", (modifier, unit) => {
7482
- let viewDate = this.state.viewDate.clone();
7354
+ const viewDate = this.state.viewDate.clone();
7483
7355
  viewDate.add(modifier, unit);
7484
7356
  if (modifier > 0) {
7485
7357
  this.props.onNavigateForward(modifier, unit);
@@ -7489,7 +7361,7 @@ flowchart TD
7489
7361
  this.setState({ viewDate });
7490
7362
  });
7491
7363
  __publicField(this, "_setTime", (type, value) => {
7492
- let date = (this.getSelectedDate() || this.state.viewDate).clone();
7364
+ const date = (this.getSelectedDate() || this.state.viewDate).clone();
7493
7365
  date[type](value);
7494
7366
  if (!this.props.value) {
7495
7367
  this.setState({
@@ -7513,7 +7385,7 @@ flowchart TD
7513
7385
  });
7514
7386
  });
7515
7387
  __publicField(this, "_handleClickOutside", () => {
7516
- let props = this.props;
7388
+ const props = this.props;
7517
7389
  if (props.input && this.state.open && props.open === void 0 && props.closeOnClickOutside) {
7518
7390
  this._closeCalendar();
7519
7391
  }
@@ -7528,7 +7400,7 @@ flowchart TD
7528
7400
  return;
7529
7401
  const value = e.target ? e.target.value : e;
7530
7402
  const localMoment = this.localMoment(value, this.getFormat("datetime"));
7531
- let update = { inputValue: value };
7403
+ const update = { inputValue: value };
7532
7404
  if (localMoment.isValid()) {
7533
7405
  update.selectedDate = localMoment;
7534
7406
  update.viewDate = localMoment.clone().startOf("month");
@@ -7592,9 +7464,9 @@ flowchart TD
7592
7464
  return this.props.renderView(this.state.currentView, this._renderCalendar);
7593
7465
  }
7594
7466
  getInitialState() {
7595
- let props = this.props;
7596
- let inputFormat = this.getFormat("datetime");
7597
- let selectedDate = this.parseDate(
7467
+ const props = this.props;
7468
+ const inputFormat = this.getFormat("datetime");
7469
+ const selectedDate = this.parseDate(
7598
7470
  props.value || props.initialValue,
7599
7471
  inputFormat
7600
7472
  );
@@ -7625,7 +7497,7 @@ flowchart TD
7625
7497
  return this.getInitialDate();
7626
7498
  }
7627
7499
  getInitialDate() {
7628
- let m = this.localMoment();
7500
+ const m = this.localMoment();
7629
7501
  m.hour(0).minute(0).second(0).millisecond(0);
7630
7502
  return m;
7631
7503
  }
@@ -7645,8 +7517,8 @@ flowchart TD
7645
7517
  }
7646
7518
  getClassName() {
7647
7519
  let cn2 = "rdt";
7648
- let props = this.props;
7649
- let propCn = props.className;
7520
+ const props = this.props;
7521
+ const propCn = props.className;
7650
7522
  if (Array.isArray(propCn)) {
7651
7523
  cn2 += " " + propCn.join(" ");
7652
7524
  } else if (propCn) {
@@ -7679,14 +7551,14 @@ flowchart TD
7679
7551
  return viewModes.DAYS;
7680
7552
  }
7681
7553
  getLocaleData() {
7682
- let p = this.props;
7554
+ const p = this.props;
7683
7555
  return this.localMoment(
7684
7556
  p.value || p.defaultValue || /* @__PURE__ */ new Date()
7685
7557
  ).localeData();
7686
7558
  }
7687
7559
  getDateFormat() {
7688
7560
  const locale = this.getLocaleData();
7689
- let format2 = this.props.dateFormat;
7561
+ const format2 = this.props.dateFormat;
7690
7562
  if (format2 === true)
7691
7563
  return locale.longDateFormat("L");
7692
7564
  if (format2)
@@ -7695,7 +7567,7 @@ flowchart TD
7695
7567
  }
7696
7568
  getTimeFormat() {
7697
7569
  const locale = this.getLocaleData();
7698
- let format2 = this.props.timeFormat;
7570
+ const format2 = this.props.timeFormat;
7699
7571
  if (format2 === true) {
7700
7572
  return locale.longDateFormat("LT");
7701
7573
  }
@@ -7707,12 +7579,12 @@ flowchart TD
7707
7579
  } else if (type === "time") {
7708
7580
  return this.getTimeFormat();
7709
7581
  }
7710
- let dateFormat = this.getDateFormat();
7711
- let timeFormat = this.getTimeFormat();
7582
+ const dateFormat = this.getDateFormat();
7583
+ const timeFormat = this.getTimeFormat();
7712
7584
  return dateFormat && timeFormat ? dateFormat + " " + timeFormat : dateFormat || timeFormat;
7713
7585
  }
7714
7586
  updateTime(op, amount, type, toSelected) {
7715
- let update = {};
7587
+ const update = {};
7716
7588
  const date = toSelected ? "selectedDate" : "viewDate";
7717
7589
  update[date] = this.state[date].clone()[op](amount, type);
7718
7590
  this.setState(update);
@@ -7745,7 +7617,7 @@ flowchart TD
7745
7617
  if (prevProps === this.props)
7746
7618
  return;
7747
7619
  let needsUpdate = false;
7748
- let thisProps = this.props;
7620
+ const thisProps = this.props;
7749
7621
  ["locale", "utc", "displayZone", "dateFormat", "timeFormat"].forEach(
7750
7622
  function(p) {
7751
7623
  prevProps[p] !== thisProps[p] && (needsUpdate = true);
@@ -7761,8 +7633,8 @@ flowchart TD
7761
7633
  }
7762
7634
  regenerateDates() {
7763
7635
  const props = this.props;
7764
- let viewDate = this.state.viewDate.clone();
7765
- let selectedDate = this.state.selectedDate && this.state.selectedDate.clone();
7636
+ const viewDate = this.state.viewDate.clone();
7637
+ const selectedDate = this.state.selectedDate && this.state.selectedDate.clone();
7766
7638
  if (props.locale) {
7767
7639
  viewDate.locale(props.locale);
7768
7640
  selectedDate && selectedDate.locale(props.locale);
@@ -7777,7 +7649,7 @@ flowchart TD
7777
7649
  viewDate.locale();
7778
7650
  selectedDate && selectedDate.locale();
7779
7651
  }
7780
- let update = { viewDate, selectedDate };
7652
+ const update = { viewDate, selectedDate };
7781
7653
  if (selectedDate && selectedDate.isValid()) {
7782
7654
  update.inputValue = selectedDate.format(this.getFormat("datetime"));
7783
7655
  }
@@ -7786,7 +7658,7 @@ flowchart TD
7786
7658
  getSelectedDate() {
7787
7659
  if (this.props.value === void 0)
7788
7660
  return this.state.selectedDate;
7789
- let selectedDate = this.parseDate(
7661
+ const selectedDate = this.parseDate(
7790
7662
  this.props.value,
7791
7663
  this.getFormat("datetime")
7792
7664
  );
@@ -7805,7 +7677,7 @@ flowchart TD
7805
7677
  return "";
7806
7678
  }
7807
7679
  getInputValue() {
7808
- let selectedDate = this.getSelectedDate();
7680
+ const selectedDate = this.getSelectedDate();
7809
7681
  return selectedDate ? selectedDate.format(this.getFormat("datetime")) : this.state.inputValue;
7810
7682
  }
7811
7683
  /**
@@ -7815,7 +7687,7 @@ flowchart TD
7815
7687
  * @public
7816
7688
  */
7817
7689
  setViewDate(date) {
7818
- let logError = function() {
7690
+ const logError = function() {
7819
7691
  return log("Invalid date passed to the `setViewDate` method: " + date);
7820
7692
  };
7821
7693
  if (!date)
@@ -7911,7 +7783,7 @@ flowchart TD
7911
7783
  // Make moment accessible through the Datetime class
7912
7784
  __publicField(Datetime, "moment", moment);
7913
7785
  function log(message, method) {
7914
- let con = typeof window !== "undefined" && window.console;
7786
+ const con = typeof window !== "undefined" && window.console;
7915
7787
  if (!con)
7916
7788
  return;
7917
7789
  if (!method) {
@@ -7919,22 +7791,13 @@ flowchart TD
7919
7791
  }
7920
7792
  con[method]("***react-datetime:" + message);
7921
7793
  }
7922
- class ClickOutBase extends React.Component {
7923
- constructor() {
7924
- super(...arguments);
7925
- __publicField(this, "container", React.createRef());
7926
- }
7927
- render() {
7928
- return /* @__PURE__ */ React.createElement("div", { className: this.props.className, ref: this.container }, this.props.children);
7929
- }
7930
- handleClickOutside(e) {
7931
- this.props.onClickOut(e);
7932
- }
7933
- setClickOutsideRef() {
7934
- return this.container.current;
7935
- }
7794
+ function ClickableWrapper({ className, onClickOut, children }) {
7795
+ const containerRef = React.useRef(null);
7796
+ _default(containerRef, (event) => {
7797
+ onClickOut(event);
7798
+ });
7799
+ return /* @__PURE__ */ React.createElement("div", { className, ref: containerRef }, children);
7936
7800
  }
7937
- const ClickableWrapper = onClickOutsideHOC(ClickOutBase);
7938
7801
  const DEFAULT_DATE_DISPLAY_FORMAT = "MMM DD, YYYY";
7939
7802
  const DEFAULT_TIME_DISPLAY_FORMAT = "h:mm A";
7940
7803
  const format$1 = (val, _name, field) => {
@@ -7977,7 +7840,10 @@ flowchart TD
7977
7840
  ReactDateTimeWithStyles,
7978
7841
  {
7979
7842
  value: input.value,
7980
- onChange: input.onChange,
7843
+ onChange: (value) => {
7844
+ const newValue = value === "" ? void 0 : value;
7845
+ input.onChange(newValue);
7846
+ },
7981
7847
  dateFormat: dateFormat || DEFAULT_DATE_DISPLAY_FORMAT,
7982
7848
  timeFormat: timeFormat || false,
7983
7849
  inputProps: { className: textFieldClasses },
@@ -8740,7 +8606,10 @@ flowchart TD
8740
8606
  label: "View in GitHub",
8741
8607
  Icon: /* @__PURE__ */ React__namespace.createElement(BiLinkExternal, { className: "w-5 h-auto text-blue-500 opacity-70" }),
8742
8608
  onMouseDown: () => {
8743
- window.open(branch.githubPullRequestUrl, "_blank");
8609
+ window.open(
8610
+ branch.githubPullRequestUrl,
8611
+ "_blank"
8612
+ );
8744
8613
  }
8745
8614
  },
8746
8615
  typeof previewFunction === "function" && ((_b2 = previewFunction({ branch: branch.name })) == null ? void 0 : _b2.url) && {
@@ -9046,7 +8915,9 @@ flowchart TD
9046
8915
  } else {
9047
8916
  events = event;
9048
8917
  }
9049
- const newListeners = events.map((event2) => new Listener(event2, callback));
8918
+ const newListeners = events.map(
8919
+ (event2) => new Listener(event2, callback)
8920
+ );
9050
8921
  newListeners.forEach((newListener) => this.listeners.add(newListener));
9051
8922
  return () => {
9052
8923
  newListeners.forEach((listener) => this.listeners.delete(listener));
@@ -9402,9 +9273,7 @@ flowchart TD
9402
9273
  const deleteStartTime = Date.now();
9403
9274
  while (true) {
9404
9275
  await new Promise((resolve) => setTimeout(resolve, 1e3));
9405
- const { error, message } = await this.api.getRequestStatus(
9406
- requestId
9407
- );
9276
+ const { error, message } = await this.api.getRequestStatus(requestId);
9408
9277
  if (error !== void 0) {
9409
9278
  if (error) {
9410
9279
  throw new Error(message);
@@ -9429,6 +9298,17 @@ flowchart TD
9429
9298
  }
9430
9299
  }
9431
9300
  }
9301
+ const encodeUrlIfNeeded = (url) => {
9302
+ if (url) {
9303
+ try {
9304
+ return new URL(url).toString();
9305
+ } catch (e) {
9306
+ return url;
9307
+ }
9308
+ } else {
9309
+ return url;
9310
+ }
9311
+ };
9432
9312
  let MediaManager$1 = class MediaManager {
9433
9313
  constructor(store, events) {
9434
9314
  this.store = store;
@@ -9501,6 +9381,20 @@ flowchart TD
9501
9381
  try {
9502
9382
  this.events.dispatch({ type: "media:list:start", ...options });
9503
9383
  const media = await this.store.list(options);
9384
+ media.items = media.items.map((item) => {
9385
+ if (item.type === "dir") {
9386
+ return item;
9387
+ }
9388
+ if (item.thumbnails) {
9389
+ for (const [size, src] of Object.entries(item.thumbnails)) {
9390
+ item.thumbnails[size] = encodeUrlIfNeeded(src);
9391
+ }
9392
+ }
9393
+ return {
9394
+ ...item,
9395
+ src: encodeUrlIfNeeded(item.src)
9396
+ };
9397
+ });
9504
9398
  this.events.dispatch({ type: "media:list:success", ...options, media });
9505
9399
  return media;
9506
9400
  } catch (error) {
@@ -10308,7 +10202,7 @@ flowchart TD
10308
10202
  "Event Log"
10309
10203
  ));
10310
10204
  };
10311
- const version = "2.3.0";
10205
+ const version = "2.7.2";
10312
10206
  const Nav = ({
10313
10207
  isLocalMode,
10314
10208
  className = "",
@@ -10944,7 +10838,7 @@ flowchart TD
10944
10838
  className: "h-5 w-auto -mx-1 text-blue-500",
10945
10839
  stroke: "currentColor",
10946
10840
  fill: "currentColor",
10947
- "stroke-width": "0",
10841
+ strokeWidth: "0",
10948
10842
  viewBox: "0 0 24 24",
10949
10843
  xmlns: "http://www.w3.org/2000/svg"
10950
10844
  },
@@ -11534,7 +11428,10 @@ flowchart TD
11534
11428
  const observer = new IntersectionObserver((entries) => {
11535
11429
  const target = entries[0];
11536
11430
  if (target.isIntersecting && list.nextOffset) {
11537
- setOffsetHistory((offsetHistory2) => [...offsetHistory2, list.nextOffset]);
11431
+ setOffsetHistory((offsetHistory2) => [
11432
+ ...offsetHistory2,
11433
+ list.nextOffset
11434
+ ]);
11538
11435
  }
11539
11436
  });
11540
11437
  if (loaderRef.current) {
@@ -12498,7 +12395,9 @@ flowchart TD
12498
12395
  if (activeEle) {
12499
12396
  setDisplay(true);
12500
12397
  setPosition(activeEle.getBoundingClientRect());
12501
- const iframe = document.getElementById("tina-iframe");
12398
+ const iframe = document.getElementById(
12399
+ "tina-iframe"
12400
+ );
12502
12401
  if (iframe) {
12503
12402
  setIframePosition(iframe.getBoundingClientRect());
12504
12403
  }
@@ -12839,15 +12738,14 @@ flowchart TD
12839
12738
  fields: fieldGroup.fields
12840
12739
  }
12841
12740
  ) : /* @__PURE__ */ React__namespace.createElement(NoFieldsPlaceholder, null)
12842
- )), !hideFooter && /* @__PURE__ */ React__namespace.createElement("div", { className: "relative flex-none w-full h-16 px-6 bg-white border-t border-gray-100 flex items-center justify-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1 w-full flex justify-between gap-4 items-center max-w-form" }, tinaForm.reset && /* @__PURE__ */ React__namespace.createElement(
12741
+ )), !hideFooter && /* @__PURE__ */ React__namespace.createElement("div", { className: "relative flex-none w-full h-16 px-12 bg-white border-t border-gray-100 flex items-center justify-end" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1 w-full justify-end gap-2 flex items-center max-w-form" }, tinaForm.reset && /* @__PURE__ */ React__namespace.createElement(
12843
12742
  ResetForm,
12844
12743
  {
12845
12744
  pristine,
12846
12745
  reset: async () => {
12847
12746
  finalForm2.reset();
12848
12747
  await tinaForm.reset();
12849
- },
12850
- style: { flexGrow: 1 }
12748
+ }
12851
12749
  },
12852
12750
  tinaForm.buttons.reset
12853
12751
  ), /* @__PURE__ */ React__namespace.createElement(
@@ -12856,8 +12754,7 @@ flowchart TD
12856
12754
  onClick: safeHandleSubmit,
12857
12755
  disabled: !canSubmit,
12858
12756
  busy: submitting,
12859
- variant: "primary",
12860
- style: { flexGrow: 3 }
12757
+ variant: "primary"
12861
12758
  },
12862
12759
  submitting && /* @__PURE__ */ React__namespace.createElement(LoadingDots, null),
12863
12760
  !submitting && tinaForm.buttons.save
@@ -13118,7 +13015,9 @@ flowchart TD
13118
13015
  const { fieldName } = useTemplates();
13119
13016
  const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
13120
13017
  useHotkey("enter", () => {
13121
- plateCommon.insertNodes(editor, [{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }]);
13018
+ plateCommon.insertNodes(editor, [
13019
+ { type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
13020
+ ]);
13122
13021
  });
13123
13022
  return /* @__PURE__ */ React.createElement("span", { ...attributes, className: "" }, children, element.url ? /* @__PURE__ */ React.createElement(
13124
13023
  "div",
@@ -13261,7 +13160,9 @@ flowchart TD
13261
13160
  const { templates, fieldName } = useTemplates();
13262
13161
  const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
13263
13162
  useHotkey("enter", () => {
13264
- plateCommon.insertNodes(editor, [{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }]);
13163
+ plateCommon.insertNodes(editor, [
13164
+ { type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
13165
+ ]);
13265
13166
  });
13266
13167
  useHotkey("space", () => {
13267
13168
  plateCommon.insertNodes(editor, [{ text: " " }], {
@@ -13317,7 +13218,9 @@ flowchart TD
13317
13218
  const { templates, fieldName } = useTemplates();
13318
13219
  const { handleClose, handleRemove, handleSelect, isExpanded } = useEmbedHandles(editor, element, fieldName);
13319
13220
  useHotkey("enter", () => {
13320
- plateCommon.insertNodes(editor, [{ type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }]);
13221
+ plateCommon.insertNodes(editor, [
13222
+ { type: plate.ELEMENT_PARAGRAPH, children: [{ text: "" }] }
13223
+ ]);
13321
13224
  });
13322
13225
  const activeTemplate = templates.find(
13323
13226
  (template) => template.name === element.name
@@ -13663,6 +13566,11 @@ flowchart TD
13663
13566
  mode: "mark",
13664
13567
  type: plate.MARK_CODE,
13665
13568
  match: "`"
13569
+ },
13570
+ {
13571
+ mode: "mark",
13572
+ type: plate.MARK_STRIKETHROUGH,
13573
+ match: ["~~", "~"]
13666
13574
  }
13667
13575
  ];
13668
13576
  const autoformatRules = [
@@ -13804,16 +13712,14 @@ flowchart TD
13804
13712
  })
13805
13713
  ];
13806
13714
  const plugins = [
13715
+ plate.createBasicMarksPlugin(),
13807
13716
  plate.createHeadingPlugin(),
13808
13717
  plate.createParagraphPlugin(),
13809
13718
  createCodeBlockPlugin(),
13810
13719
  createHTMLBlockPlugin(),
13811
13720
  createHTMLInlinePlugin(),
13812
13721
  plate.createBlockquotePlugin(),
13813
- plate.createBoldPlugin(),
13814
- plate.createItalicPlugin(),
13815
13722
  plate.createUnderlinePlugin(),
13816
- plate.createCodePlugin(),
13817
13723
  plate.createListPlugin(),
13818
13724
  plate.createIndentListPlugin(),
13819
13725
  plate.createHorizontalRulePlugin(),
@@ -14173,7 +14079,9 @@ flowchart TD
14173
14079
  const CONTAINER_MD_BREAKPOINT = 448;
14174
14080
  const FLOAT_BUTTON_WIDTH = 25;
14175
14081
  const HEADING_LABEL = "Headings";
14176
- const ToolbarContext = React.createContext(void 0);
14082
+ const ToolbarContext = React.createContext(
14083
+ void 0
14084
+ );
14177
14085
  const ToolbarProvider = ({
14178
14086
  tinaForm,
14179
14087
  templates,
@@ -14323,7 +14231,7 @@ flowchart TD
14323
14231
  const CodeBlockToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
14324
14232
  const state = useCodeBlockToolbarButtonState();
14325
14233
  const { props } = useCodeBlockToolbarButton(state);
14326
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.codeBlock, null));
14234
+ return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Code Block", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.codeBlock, null));
14327
14235
  });
14328
14236
  const useImageToolbarButtonState = () => {
14329
14237
  const editor = plateCommon.useEditorState();
@@ -14355,36 +14263,54 @@ flowchart TD
14355
14263
  const ImageToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
14356
14264
  const state = useImageToolbarButtonState();
14357
14265
  const { props } = useImageToolbarButton(state);
14358
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.image, null));
14359
- });
14360
- const IndentListToolbarButton = cn$1.withRef(({ nodeType = plate.ELEMENT_UL }, ref) => {
14361
- const editor = plateCommon.useEditorState();
14362
- const state = plate.useListToolbarButtonState({ nodeType });
14363
- const { props } = plate.useListToolbarButton(state);
14364
- return /* @__PURE__ */ React.createElement(
14365
- ToolbarButton,
14366
- {
14367
- ref,
14368
- tooltip: nodeType === plate.ELEMENT_UL ? "Bulleted List" : "Numbered List",
14369
- ...props,
14370
- onClick: (e) => {
14371
- e.preventDefault();
14372
- e.stopPropagation();
14373
- plate.toggleList(editor, { type: nodeType });
14374
- }
14375
- },
14376
- nodeType === plate.ELEMENT_UL ? /* @__PURE__ */ React.createElement(Icons.ul, null) : /* @__PURE__ */ React.createElement(Icons.ol, null)
14377
- );
14266
+ return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Image", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.image, null));
14378
14267
  });
14268
+ const UnorderedListToolbarButton = cn$1.withRef(
14269
+ (props, ref) => {
14270
+ const editor = plateCommon.useEditorState();
14271
+ const state = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_UL });
14272
+ const { props: buttonProps } = plate.useListToolbarButton(state);
14273
+ return /* @__PURE__ */ React.createElement(
14274
+ ToolbarButton,
14275
+ {
14276
+ ref,
14277
+ tooltip: "Bulleted List",
14278
+ ...buttonProps,
14279
+ onClick: (e) => {
14280
+ e.preventDefault();
14281
+ e.stopPropagation();
14282
+ plate.toggleList(editor, { type: plate.ELEMENT_UL });
14283
+ }
14284
+ },
14285
+ /* @__PURE__ */ React.createElement(Icons.ul, null)
14286
+ );
14287
+ }
14288
+ );
14289
+ const OrderedListToolbarButton = cn$1.withRef(
14290
+ (props, ref) => {
14291
+ const editor = plateCommon.useEditorState();
14292
+ const state = plate.useListToolbarButtonState({ nodeType: plate.ELEMENT_OL });
14293
+ const { props: buttonProps } = plate.useListToolbarButton(state);
14294
+ return /* @__PURE__ */ React.createElement(
14295
+ ToolbarButton,
14296
+ {
14297
+ ref,
14298
+ tooltip: "Numbered List",
14299
+ ...buttonProps,
14300
+ onClick: (e) => {
14301
+ e.preventDefault();
14302
+ e.stopPropagation();
14303
+ plate.toggleList(editor, { type: plate.ELEMENT_OL });
14304
+ }
14305
+ },
14306
+ /* @__PURE__ */ React.createElement(Icons.ol, null)
14307
+ );
14308
+ }
14309
+ );
14379
14310
  const LinkToolbarButton = cn$1.withRef((rest, ref) => {
14380
14311
  const state = plateLink.useLinkToolbarButtonState();
14381
14312
  const { props } = plateLink.useLinkToolbarButton(state);
14382
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link", ...props, ...rest }, /* @__PURE__ */ React.createElement(Icons.link, null));
14383
- });
14384
- const MarkToolbarButton = cn$1.withRef(({ clear, nodeType, ...rest }, ref) => {
14385
- const state = plateCommon.useMarkToolbarButtonState({ clear, nodeType });
14386
- const { props } = plateCommon.useMarkToolbarButton(state);
14387
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest });
14313
+ return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest, tooltip: "Link" }, /* @__PURE__ */ React.createElement(Icons.link, null));
14388
14314
  });
14389
14315
  const useMermaidToolbarButtonState = () => {
14390
14316
  const editor = plateCommon.useEditorState();
@@ -14427,6 +14353,7 @@ flowchart TD
14427
14353
  ToolbarButton,
14428
14354
  {
14429
14355
  showArrow: false,
14356
+ "data-testid": "rich-text-editor-overflow-menu-button",
14430
14357
  className: "lg:min-w-[130px]",
14431
14358
  isDropdown: true,
14432
14359
  pressed: openState.open,
@@ -14464,7 +14391,7 @@ flowchart TD
14464
14391
  const QuoteToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
14465
14392
  const state = useBlockQuoteToolbarButtonState();
14466
14393
  const { props } = useBlockQuoteToolbarButton(state);
14467
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.quote, null));
14394
+ return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Quote (⌘+⇧+.)", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.quote, null));
14468
14395
  });
14469
14396
  const useRawMarkdownToolbarButton = () => {
14470
14397
  const { setRawMode } = useEditorContext();
@@ -14480,7 +14407,17 @@ flowchart TD
14480
14407
  };
14481
14408
  const RawMarkdownToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
14482
14409
  const { props } = useRawMarkdownToolbarButton();
14483
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.raw, null));
14410
+ return /* @__PURE__ */ React.createElement(
14411
+ ToolbarButton,
14412
+ {
14413
+ ref,
14414
+ tooltip: "Raw Markdown",
14415
+ ...rest,
14416
+ ...props,
14417
+ "data-testid": "markdown-button"
14418
+ },
14419
+ /* @__PURE__ */ React.createElement(Icons.raw, null)
14420
+ );
14484
14421
  });
14485
14422
  function TableDropdownMenu(props) {
14486
14423
  const tableSelected = plateCommon.useEditorSelector(
@@ -14619,7 +14556,7 @@ flowchart TD
14619
14556
  key: template.name,
14620
14557
  onMouseDown: (e) => {
14621
14558
  e.preventDefault();
14622
- close();
14559
+ setOpen(false);
14623
14560
  insertMDX(editor, template);
14624
14561
  },
14625
14562
  className: ""
@@ -14627,6 +14564,15 @@ flowchart TD
14627
14564
  template.label || template.name
14628
14565
  ))));
14629
14566
  };
14567
+ const MarkToolbarButton = cn$1.withRef(({ clear, nodeType, ...rest }, ref) => {
14568
+ const state = plateCommon.useMarkToolbarButtonState({ clear, nodeType });
14569
+ const { props } = plateCommon.useMarkToolbarButton(state);
14570
+ return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, ...props, ...rest });
14571
+ });
14572
+ const BoldToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: plate.MARK_BOLD }, /* @__PURE__ */ React.createElement(Icons.bold, null));
14573
+ const StrikethroughToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Strikethrough", nodeType: plate.MARK_STRIKETHROUGH }, /* @__PURE__ */ React.createElement(Icons.strikethrough, null));
14574
+ const ItalicToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: plate.MARK_ITALIC }, /* @__PURE__ */ React.createElement(Icons.italic, null));
14575
+ const CodeToolbarButton = () => /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: plate.MARK_CODE }, /* @__PURE__ */ React.createElement(Icons.code, null));
14630
14576
  const toolbarItems = {
14631
14577
  heading: {
14632
14578
  label: HEADING_LABEL,
@@ -14647,32 +14593,37 @@ flowchart TD
14647
14593
  quote: {
14648
14594
  label: "Quote",
14649
14595
  width: () => STANDARD_ICON_WIDTH,
14650
- Component: /* @__PURE__ */ React.createElement(QuoteToolbarButton, { tooltip: "Quote Quote (⌘+⇧+.)" })
14596
+ Component: /* @__PURE__ */ React.createElement(QuoteToolbarButton, null)
14651
14597
  },
14652
14598
  ul: {
14653
14599
  label: "Unordered List",
14654
14600
  width: () => STANDARD_ICON_WIDTH,
14655
- Component: /* @__PURE__ */ React.createElement(IndentListToolbarButton, { nodeType: plate.ELEMENT_UL })
14601
+ Component: /* @__PURE__ */ React.createElement(UnorderedListToolbarButton, null)
14656
14602
  },
14657
14603
  ol: {
14658
14604
  label: "Ordered List",
14659
14605
  width: () => STANDARD_ICON_WIDTH,
14660
- Component: /* @__PURE__ */ React.createElement(IndentListToolbarButton, { nodeType: plate.ELEMENT_OL })
14606
+ Component: /* @__PURE__ */ React.createElement(OrderedListToolbarButton, null)
14661
14607
  },
14662
14608
  bold: {
14663
14609
  label: "Bold",
14664
14610
  width: () => STANDARD_ICON_WIDTH,
14665
- Component: /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Bold (⌘+B)", nodeType: plate.MARK_BOLD }, /* @__PURE__ */ React.createElement(Icons.bold, null))
14611
+ Component: /* @__PURE__ */ React.createElement(BoldToolbarButton, null)
14612
+ },
14613
+ strikethrough: {
14614
+ label: "Strikethrough",
14615
+ width: () => STANDARD_ICON_WIDTH,
14616
+ Component: /* @__PURE__ */ React.createElement(StrikethroughToolbarButton, null)
14666
14617
  },
14667
14618
  italic: {
14668
14619
  label: "Italic",
14669
14620
  width: () => STANDARD_ICON_WIDTH,
14670
- Component: /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Italic (⌘+I)", nodeType: plate.MARK_ITALIC }, /* @__PURE__ */ React.createElement(Icons.italic, null))
14621
+ Component: /* @__PURE__ */ React.createElement(ItalicToolbarButton, null)
14671
14622
  },
14672
14623
  code: {
14673
14624
  label: "Code",
14674
14625
  width: () => STANDARD_ICON_WIDTH,
14675
- Component: /* @__PURE__ */ React.createElement(MarkToolbarButton, { tooltip: "Code (⌘+E)", nodeType: plate.MARK_CODE }, /* @__PURE__ */ React.createElement(Icons.code, null))
14626
+ Component: /* @__PURE__ */ React.createElement(CodeToolbarButton, null)
14676
14627
  },
14677
14628
  codeBlock: {
14678
14629
  label: "Code Block",
@@ -14705,7 +14656,12 @@ flowchart TD
14705
14656
  const [itemsShown, setItemsShown] = React.useState(11);
14706
14657
  const { overrides, templates } = useToolbarContext();
14707
14658
  const showEmbedButton = templates.length > 0;
14708
- let items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14659
+ let items2 = [];
14660
+ if (Array.isArray(overrides)) {
14661
+ items2 = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14662
+ } else {
14663
+ items2 = (overrides == null ? void 0 : overrides.toolbar) === void 0 ? Object.values(toolbarItems) : overrides.toolbar.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
14664
+ }
14709
14665
  if (!showEmbedButton) {
14710
14666
  items2 = items2.filter((item) => item.label !== toolbarItems.embed.label);
14711
14667
  }
@@ -15033,6 +14989,9 @@ flowchart TD
15033
14989
  if (typeof string !== "string") {
15034
14990
  return false;
15035
14991
  }
14992
+ if (string.startsWith("#")) {
14993
+ return true;
14994
+ }
15036
14995
  const generalMatch = string.match(protocolAndDomainRE);
15037
14996
  const emailLinkMatch = string.match(emailLintRE);
15038
14997
  const localUrlMatch = string.match(localUrlRE);
@@ -15054,12 +15013,12 @@ flowchart TD
15054
15013
  }
15055
15014
  return localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol);
15056
15015
  };
15057
- const RichEditor = (props) => {
15016
+ const RichEditor = ({ input, tinaForm, field }) => {
15058
15017
  var _a;
15059
15018
  const initialValue = React.useMemo(
15060
15019
  () => {
15061
15020
  var _a2, _b;
15062
- 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: "" }] }];
15021
+ 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: "" }] }];
15063
15022
  },
15064
15023
  []
15065
15024
  );
@@ -15087,7 +15046,7 @@ flowchart TD
15087
15046
  ),
15088
15047
  []
15089
15048
  );
15090
- const tempId = [props.tinaForm.id, props.input.name].join(".");
15049
+ const tempId = [tinaForm.id, input.name].join(".");
15091
15050
  const id = React.useMemo(() => uuid() + tempId, [tempId]);
15092
15051
  const ref = React.useRef(null);
15093
15052
  React.useEffect(() => {
@@ -15097,13 +15056,13 @@ flowchart TD
15097
15056
  const plateElement = (_a2 = ref.current) == null ? void 0 : _a2.querySelector(
15098
15057
  '[role="textbox"]'
15099
15058
  );
15100
- if (props.field.experimental_focusIntent && plateElement) {
15059
+ if (field.experimental_focusIntent && plateElement) {
15101
15060
  if (plateElement)
15102
15061
  plateElement.focus();
15103
15062
  }
15104
15063
  }, 100);
15105
15064
  }
15106
- }, [props.field.experimental_focusIntent, ref]);
15065
+ }, [field.experimental_focusIntent, ref]);
15107
15066
  return /* @__PURE__ */ React.createElement("div", { ref }, /* @__PURE__ */ React.createElement(
15108
15067
  plateCommon.Plate,
15109
15068
  {
@@ -15111,7 +15070,7 @@ flowchart TD
15111
15070
  initialValue,
15112
15071
  plugins: plugins$2,
15113
15072
  onChange: (value) => {
15114
- props.input.onChange({
15073
+ input.onChange({
15115
15074
  type: "root",
15116
15075
  children: value
15117
15076
  });
@@ -15120,12 +15079,12 @@ flowchart TD
15120
15079
  /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(
15121
15080
  ToolbarProvider,
15122
15081
  {
15123
- tinaForm: props.tinaForm,
15124
- templates: props.field.templates,
15125
- overrides: (_a = props.field) == null ? void 0 : _a.toolbarOverride
15082
+ tinaForm,
15083
+ templates: field.templates,
15084
+ overrides: (field == null ? void 0 : field.toolbarOverride) ? field.toolbarOverride : field.overrides
15126
15085
  },
15127
15086
  /* @__PURE__ */ React.createElement(FixedToolbar, null, /* @__PURE__ */ React.createElement(FixedToolbarButtons, null)),
15128
- /* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null))
15087
+ ((_a = field == null ? void 0 : field.overrides) == null ? void 0 : _a.showFloatingToolbar) !== false ? /* @__PURE__ */ React.createElement(FloatingToolbar, null, /* @__PURE__ */ React.createElement(FloatingToolbarButtons, null)) : null
15129
15088
  ), /* @__PURE__ */ React.createElement(Editor, null))
15130
15089
  ));
15131
15090
  };
@@ -16313,132 +16272,1209 @@ flowchart TD
16313
16272
  "হয়"
16314
16273
  ];
16315
16274
  const bre = [
16275
+ "'blam",
16276
+ "'d",
16277
+ "'m",
16278
+ "'r",
16279
+ "'ta",
16280
+ "'vat",
16281
+ "'z",
16282
+ "'zo",
16316
16283
  "a",
16317
- "ainda",
16318
- "alem",
16319
- "ambas",
16320
- "ambos",
16321
- "antes",
16322
- "ao",
16323
- "aonde",
16324
- "aos",
16325
- "apos",
16326
- "aquele",
16327
- "aqueles",
16328
- "as",
16329
- "assim",
16330
- "com",
16331
- "como",
16332
- "contra",
16333
- "contudo",
16334
- "cuja",
16335
- "cujas",
16336
- "cujo",
16337
- "cujos",
16284
+ "a:",
16285
+ "aba",
16286
+ "abalamour",
16287
+ "abaoe",
16288
+ "ac'hane",
16289
+ "ac'hanoc'h",
16290
+ "ac'hanomp",
16291
+ "ac'hanon",
16292
+ "ac'hanout",
16293
+ "adal",
16294
+ "adalek",
16295
+ "adarre",
16296
+ "ae",
16297
+ "aec'h",
16298
+ "aed",
16299
+ "aemp",
16300
+ "aen",
16301
+ "aent",
16302
+ "aes",
16303
+ "afe",
16304
+ "afec'h",
16305
+ "afed",
16306
+ "afemp",
16307
+ "afen",
16308
+ "afent",
16309
+ "afes",
16310
+ "ag",
16311
+ "ah",
16312
+ "aimp",
16313
+ "aint",
16314
+ "aio",
16315
+ "aiou",
16316
+ "aje",
16317
+ "ajec'h",
16318
+ "ajed",
16319
+ "ajemp",
16320
+ "ajen",
16321
+ "ajent",
16322
+ "ajes",
16323
+ "al",
16324
+ "alato",
16325
+ "alies",
16326
+ "aliesañ",
16327
+ "alkent",
16328
+ "all",
16329
+ "allas",
16330
+ "allo",
16331
+ "allô",
16332
+ "am",
16333
+ "amañ",
16334
+ "amzer",
16335
+ "an",
16336
+ "anezhañ",
16337
+ "anezhe",
16338
+ "anezhi",
16339
+ "anezho",
16340
+ "anvet",
16341
+ "aon",
16342
+ "aotren",
16343
+ "ar",
16344
+ "arall",
16345
+ "araok",
16346
+ "araoki",
16347
+ "araozañ",
16348
+ "araozo",
16349
+ "araozoc'h",
16350
+ "araozomp",
16351
+ "araozon",
16352
+ "araozor",
16353
+ "araozout",
16354
+ "arbenn",
16355
+ "arre",
16356
+ "atalek",
16357
+ "atav",
16358
+ "az",
16359
+ "azalek",
16360
+ "azirazañ",
16361
+ "azirazi",
16362
+ "azirazo",
16363
+ "azirazoc'h",
16364
+ "azirazomp",
16365
+ "azirazon",
16366
+ "azirazor",
16367
+ "azirazout",
16368
+ "b:",
16369
+ "ba",
16370
+ "ba'l",
16371
+ "ba'n",
16372
+ "ba'r",
16373
+ "bad",
16374
+ "bah",
16375
+ "bal",
16376
+ "ban",
16377
+ "bar",
16378
+ "bastañ",
16379
+ "befe",
16380
+ "bell",
16381
+ "benaos",
16382
+ "benn",
16383
+ "bennag",
16384
+ "bennak",
16385
+ "bennozh",
16386
+ "bep",
16387
+ "bepred",
16388
+ "berr",
16389
+ "berzh",
16390
+ "bet",
16391
+ "betek",
16392
+ "betra",
16393
+ "bev",
16394
+ "bevet",
16395
+ "bez",
16396
+ "bezañ",
16397
+ "beze",
16398
+ "bezent",
16399
+ "bezet",
16400
+ "bezh",
16401
+ "bezit",
16402
+ "bezomp",
16403
+ "bihan",
16404
+ "bije",
16405
+ "biou",
16406
+ "biskoazh",
16407
+ "blam",
16408
+ "bo",
16409
+ "boa",
16410
+ "bominapl",
16411
+ "boudoudom",
16412
+ "bouez",
16413
+ "boull",
16414
+ "boum",
16415
+ "bout",
16416
+ "bras",
16417
+ "brasañ",
16418
+ "brav",
16419
+ "bravo",
16420
+ "bremañ",
16421
+ "bres",
16422
+ "brokenn",
16423
+ "bronn",
16424
+ "brrr",
16425
+ "brutal",
16426
+ "buhezek",
16427
+ "c'h:",
16428
+ "c'haout",
16429
+ "c'he",
16430
+ "c'hem",
16431
+ "c'herz",
16432
+ "c'heñver",
16433
+ "c'hichen",
16434
+ "c'hiz",
16435
+ "c'hoazh",
16436
+ "c'horre",
16437
+ "c'houde",
16438
+ "c'houst",
16439
+ "c'hreiz",
16440
+ "c'hwec'h",
16441
+ "c'hwec'hvet",
16442
+ "c'hwezek",
16443
+ "c'hwi",
16444
+ "ch:",
16445
+ "chaous",
16446
+ "chik",
16447
+ "chit",
16448
+ "chom",
16449
+ "chut",
16450
+ "d'",
16451
+ "d'al",
16452
+ "d'an",
16453
+ "d'ar",
16454
+ "d'az",
16455
+ "d'e",
16456
+ "d'he",
16457
+ "d'ho",
16458
+ "d'hol",
16459
+ "d'hon",
16460
+ "d'hor",
16461
+ "d'o",
16462
+ "d'ober",
16463
+ "d'ul",
16464
+ "d'un",
16465
+ "d'ur",
16466
+ "d:",
16338
16467
  "da",
16339
- "das",
16340
- "de",
16341
- "dela",
16342
- "dele",
16343
- "deles",
16344
- "demais",
16345
- "depois",
16346
- "desde",
16347
- "desta",
16348
- "deste",
16349
- "dispoe",
16350
- "dispoem",
16351
- "diversa",
16352
- "diversas",
16353
- "diversos",
16468
+ "dak",
16469
+ "daka",
16470
+ "dal",
16471
+ "dalbezh",
16472
+ "dalc'hmat",
16473
+ "dalit",
16474
+ "damdost",
16475
+ "damheñvel",
16476
+ "damm",
16477
+ "dan",
16478
+ "danvez",
16479
+ "dao",
16480
+ "daol",
16481
+ "daonet",
16482
+ "daou",
16483
+ "daoust",
16484
+ "daouzek",
16485
+ "daouzekvet",
16486
+ "darn",
16487
+ "dastrewiñ",
16488
+ "dav",
16489
+ "davedoc'h",
16490
+ "davedomp",
16491
+ "davedon",
16492
+ "davedor",
16493
+ "davedout",
16494
+ "davet",
16495
+ "davetañ",
16496
+ "davete",
16497
+ "daveti",
16498
+ "daveto",
16499
+ "defe",
16500
+ "dehou",
16501
+ "dek",
16502
+ "dekvet",
16503
+ "den",
16504
+ "deoc'h",
16505
+ "deomp",
16506
+ "deor",
16507
+ "derc'hel",
16508
+ "deus",
16509
+ "dez",
16510
+ "deze",
16511
+ "dezhañ",
16512
+ "dezhe",
16513
+ "dezhi",
16514
+ "dezho",
16515
+ "di",
16516
+ "diabarzh",
16517
+ "diagent",
16518
+ "diar",
16519
+ "diaraok",
16520
+ "diavaez",
16521
+ "dibaoe",
16522
+ "dibaot",
16523
+ "dibar",
16524
+ "dic'halañ",
16525
+ "didiac'h",
16526
+ "dienn",
16527
+ "difer",
16528
+ "diganeoc'h",
16529
+ "diganeomp",
16530
+ "diganeor",
16531
+ "diganimp",
16532
+ "diganin",
16533
+ "diganit",
16534
+ "digant",
16535
+ "digantañ",
16536
+ "digante",
16537
+ "diganti",
16538
+ "diganto",
16539
+ "digemmesk",
16540
+ "diget",
16541
+ "digor",
16542
+ "digoret",
16543
+ "dija",
16544
+ "dije",
16545
+ "dimp",
16546
+ "din",
16547
+ "dinaou",
16548
+ "dindan",
16549
+ "dindanañ",
16550
+ "dindani",
16551
+ "dindano",
16552
+ "dindanoc'h",
16553
+ "dindanomp",
16554
+ "dindanon",
16555
+ "dindanor",
16556
+ "dindanout",
16557
+ "dioutañ",
16558
+ "dioute",
16559
+ "diouti",
16560
+ "diouto",
16561
+ "diouzh",
16562
+ "diouzhin",
16563
+ "diouzhit",
16564
+ "diouzhoc'h",
16565
+ "diouzhomp",
16566
+ "diouzhor",
16567
+ "dirak",
16568
+ "dirazañ",
16569
+ "dirazi",
16570
+ "dirazo",
16571
+ "dirazoc'h",
16572
+ "dirazomp",
16573
+ "dirazon",
16574
+ "dirazor",
16575
+ "dirazout",
16576
+ "disheñvel",
16577
+ "dispar",
16578
+ "distank",
16579
+ "dister",
16580
+ "disterañ",
16581
+ "disterig",
16582
+ "distro",
16583
+ "dit",
16584
+ "divaez",
16585
+ "diwar",
16586
+ "diwezhat",
16587
+ "diwezhañ",
16354
16588
  "do",
16355
- "dos",
16356
- "durante",
16589
+ "doa",
16590
+ "doare",
16591
+ "dont",
16592
+ "dost",
16593
+ "doue",
16594
+ "douetus",
16595
+ "douez",
16596
+ "doug",
16597
+ "draou",
16598
+ "draoñ",
16599
+ "dre",
16600
+ "drede",
16601
+ "dreist",
16602
+ "dreistañ",
16603
+ "dreisti",
16604
+ "dreisto",
16605
+ "dreistoc'h",
16606
+ "dreistomp",
16607
+ "dreiston",
16608
+ "dreistor",
16609
+ "dreistout",
16610
+ "drek",
16611
+ "dreñv",
16612
+ "dring",
16613
+ "dro",
16614
+ "du",
16357
16615
  "e",
16358
- "ela",
16359
- "elas",
16360
- "ele",
16361
- "eles",
16616
+ "e:",
16617
+ "eas",
16618
+ "ebet",
16619
+ "ec'h",
16620
+ "edo",
16621
+ "edoc'h",
16622
+ "edod",
16623
+ "edomp",
16624
+ "edon",
16625
+ "edont",
16626
+ "edos",
16627
+ "eer",
16628
+ "eeun",
16629
+ "efed",
16630
+ "egedoc'h",
16631
+ "egedomp",
16632
+ "egedon",
16633
+ "egedor",
16634
+ "egedout",
16635
+ "eget",
16636
+ "egetañ",
16637
+ "egete",
16638
+ "egeti",
16639
+ "egeto",
16640
+ "eh",
16641
+ "eil",
16642
+ "eilvet",
16643
+ "eizh",
16644
+ "eizhvet",
16645
+ "ejoc'h",
16646
+ "ejod",
16647
+ "ejomp",
16648
+ "ejont",
16649
+ "ejout",
16650
+ "el",
16362
16651
  "em",
16363
- "entao",
16364
- "entre",
16365
- "essa",
16366
- "essas",
16367
- "esse",
16368
- "esses",
16369
- "esta",
16370
- "estas",
16371
- "este",
16372
- "estes",
16652
+ "emaint",
16653
+ "emaoc'h",
16654
+ "emaomp",
16655
+ "emaon",
16656
+ "emaout",
16657
+ "emañ",
16658
+ "eme",
16659
+ "emeur",
16660
+ "emezañ",
16661
+ "emezi",
16662
+ "emezo",
16663
+ "emezoc'h",
16664
+ "emezomp",
16665
+ "emezon",
16666
+ "emezout",
16667
+ "emporzhiañ",
16668
+ "en",
16669
+ "end",
16670
+ "endan",
16671
+ "endra",
16672
+ "enep",
16673
+ "ennañ",
16674
+ "enni",
16675
+ "enno",
16676
+ "ennoc'h",
16677
+ "ennomp",
16678
+ "ennon",
16679
+ "ennor",
16680
+ "ennout",
16681
+ "enta",
16682
+ "eo",
16683
+ "eomp",
16684
+ "eont",
16685
+ "eor",
16686
+ "eot",
16687
+ "er",
16688
+ "erbet",
16689
+ "erfin",
16690
+ "esa",
16691
+ "esae",
16692
+ "espar",
16693
+ "estlamm",
16694
+ "estrañj",
16695
+ "eta",
16696
+ "etre",
16697
+ "etreoc'h",
16698
+ "etrezo",
16699
+ "etrezoc'h",
16700
+ "etrezomp",
16701
+ "etrezor",
16702
+ "euh",
16703
+ "eur",
16704
+ "eus",
16705
+ "evel",
16706
+ "evelato",
16707
+ "eveldoc'h",
16708
+ "eveldomp",
16709
+ "eveldon",
16710
+ "eveldor",
16711
+ "eveldout",
16712
+ "evelkent",
16713
+ "eveltañ",
16714
+ "evelte",
16715
+ "evelti",
16716
+ "evelto",
16717
+ "evidoc'h",
16718
+ "evidomp",
16719
+ "evidon",
16720
+ "evidor",
16721
+ "evidout",
16722
+ "evit",
16723
+ "evitañ",
16724
+ "evite",
16725
+ "eviti",
16726
+ "evito",
16727
+ "ez",
16728
+ "eñ",
16729
+ "f:",
16730
+ "fac'h",
16731
+ "fall",
16732
+ "fed",
16733
+ "feiz",
16734
+ "fenn",
16735
+ "fezh",
16736
+ "fin",
16737
+ "finsalvet",
16738
+ "foei",
16739
+ "fouilhezañ",
16740
+ "g:",
16741
+ "gallout",
16742
+ "ganeoc'h",
16743
+ "ganeomp",
16744
+ "ganin",
16745
+ "ganit",
16746
+ "gant",
16747
+ "gantañ",
16748
+ "ganti",
16749
+ "ganto",
16750
+ "gaout",
16751
+ "gast",
16752
+ "gein",
16753
+ "gellout",
16754
+ "genndost",
16755
+ "gentañ",
16756
+ "ger",
16757
+ "gerz",
16758
+ "get",
16759
+ "geñver",
16760
+ "gichen",
16761
+ "gin",
16762
+ "giz",
16763
+ "glan",
16764
+ "gloev",
16765
+ "goll",
16766
+ "gorre",
16767
+ "goude",
16768
+ "gouez",
16769
+ "gouezit",
16770
+ "gouezomp",
16771
+ "goulz",
16772
+ "gounnar",
16773
+ "gour",
16774
+ "goust",
16775
+ "gouze",
16776
+ "gouzout",
16777
+ "gra",
16778
+ "grak",
16779
+ "grec'h",
16780
+ "greiz",
16781
+ "grenn",
16782
+ "greomp",
16783
+ "grit",
16784
+ "groñs",
16785
+ "gutez",
16786
+ "gwall",
16787
+ "gwashoc'h",
16788
+ "gwazh",
16789
+ "gwech",
16790
+ "gwechall",
16791
+ "gwechoù",
16792
+ "gwell",
16793
+ "gwezh",
16794
+ "gwezhall",
16795
+ "gwezharall",
16796
+ "gwezhoù",
16797
+ "gwig",
16798
+ "gwirionez",
16799
+ "gwitibunan",
16800
+ "gêr",
16801
+ "h:",
16373
16802
  "ha",
16374
- "isso",
16375
- "isto",
16376
- "logo",
16377
- "mais",
16378
- "mas",
16379
- "mediante",
16380
- "menos",
16381
- "mesma",
16382
- "mesmas",
16383
- "mesmo",
16384
- "mesmos",
16803
+ "hag",
16804
+ "han",
16805
+ "hanter",
16806
+ "hanterc'hantad",
16807
+ "hanterkantved",
16808
+ "harz",
16809
+ "hañ",
16810
+ "hañval",
16811
+ "he",
16812
+ "hebioù",
16813
+ "hec'h",
16814
+ "hei",
16815
+ "hein",
16816
+ "hem",
16817
+ "hemañ",
16818
+ "hen",
16819
+ "hend",
16820
+ "henhont",
16821
+ "henn",
16822
+ "hennezh",
16823
+ "hent",
16824
+ "hep",
16825
+ "hervez",
16826
+ "hervezañ",
16827
+ "hervezi",
16828
+ "hervezo",
16829
+ "hervezoc'h",
16830
+ "hervezomp",
16831
+ "hervezon",
16832
+ "hervezor",
16833
+ "hervezout",
16834
+ "heul",
16835
+ "heuliañ",
16836
+ "hevelep",
16837
+ "heverk",
16838
+ "heñvel",
16839
+ "heñvelat",
16840
+ "heñvelañ",
16841
+ "heñveliñ",
16842
+ "heñveloc'h",
16843
+ "heñvelout",
16844
+ "hi",
16845
+ "hilh",
16846
+ "hini",
16847
+ "hirie",
16848
+ "hirio",
16849
+ "hiziv",
16850
+ "hiziviken",
16851
+ "ho",
16852
+ "hoaliñ",
16853
+ "hoc'h",
16854
+ "hogen",
16855
+ "hogos",
16856
+ "hogozik",
16857
+ "hol",
16858
+ "holl",
16859
+ "holà",
16860
+ "homañ",
16861
+ "hon",
16862
+ "honhont",
16863
+ "honnezh",
16864
+ "hont",
16865
+ "hop",
16866
+ "hopala",
16867
+ "hor",
16868
+ "hou",
16869
+ "houp",
16870
+ "hudu",
16871
+ "hue",
16872
+ "hui",
16873
+ "hum",
16874
+ "hurrah",
16875
+ "i",
16876
+ "i:",
16877
+ "in",
16878
+ "int",
16879
+ "is",
16880
+ "ispisial",
16881
+ "isurzhiet",
16882
+ "it",
16883
+ "ivez",
16884
+ "izelañ",
16885
+ "j:",
16886
+ "just",
16887
+ "k:",
16888
+ "kae",
16889
+ "kaer",
16890
+ "kalon",
16891
+ "kalz",
16892
+ "kant",
16893
+ "kaout",
16894
+ "kar",
16895
+ "kazi",
16896
+ "keid",
16897
+ "kein",
16898
+ "keit",
16899
+ "kel",
16900
+ "kellies",
16901
+ "keloù",
16902
+ "kement",
16903
+ "ken",
16904
+ "kenkent",
16905
+ "kenkoulz",
16906
+ "kenment",
16907
+ "kent",
16908
+ "kentañ",
16909
+ "kentizh",
16910
+ "kentoc'h",
16911
+ "kentre",
16912
+ "ker",
16913
+ "kerkent",
16914
+ "kerz",
16915
+ "kerzh",
16916
+ "ket",
16917
+ "keta",
16918
+ "keñver",
16919
+ "keñverel",
16920
+ "keñverius",
16921
+ "kichen",
16922
+ "kichenik",
16923
+ "kit",
16924
+ "kiz",
16925
+ "klak",
16926
+ "klek",
16927
+ "klik",
16928
+ "komprenet",
16929
+ "komz",
16930
+ "kont",
16931
+ "korf",
16932
+ "korre",
16933
+ "koulskoude",
16934
+ "koulz",
16935
+ "koust",
16936
+ "krak",
16937
+ "krampouezh",
16938
+ "krec'h",
16939
+ "kreiz",
16940
+ "kuit",
16941
+ "kwir",
16942
+ "l:",
16943
+ "la",
16944
+ "laez",
16945
+ "laoskel",
16946
+ "laouen",
16947
+ "lavar",
16948
+ "lavaret",
16949
+ "lavarout",
16950
+ "lec'h",
16951
+ "lein",
16952
+ "leizh",
16953
+ "lerc'h",
16954
+ "leun",
16955
+ "leuskel",
16956
+ "lew",
16957
+ "lies",
16958
+ "liesañ",
16959
+ "lod",
16960
+ "lusk",
16961
+ "lâr",
16962
+ "lârout",
16963
+ "m:",
16964
+ "ma",
16965
+ "ma'z",
16966
+ "mac'h",
16967
+ "mac'hat",
16968
+ "mac'hañ",
16969
+ "mac'hoc'h",
16970
+ "mad",
16971
+ "maez",
16972
+ "maksimal",
16973
+ "mann",
16974
+ "mar",
16975
+ "mard",
16976
+ "marg",
16977
+ "marzh",
16978
+ "mat",
16979
+ "mañ",
16980
+ "me",
16981
+ "memes",
16982
+ "memestra",
16983
+ "merkapl",
16984
+ "mersi",
16985
+ "mes",
16986
+ "mesk",
16987
+ "met",
16988
+ "meur",
16989
+ "mil",
16990
+ "minimal",
16991
+ "moan",
16992
+ "moaniaat",
16993
+ "mod",
16994
+ "mont",
16995
+ "mout",
16996
+ "mui",
16997
+ "muiañ",
16998
+ "muioc'h",
16999
+ "n",
17000
+ "n'",
17001
+ "n:",
16385
17002
  "na",
16386
- "nao",
16387
- "nas",
16388
- "nem",
16389
- "nesse",
16390
- "neste",
16391
- "nos",
17003
+ "nag",
17004
+ "naontek",
17005
+ "naturel",
17006
+ "nav",
17007
+ "navet",
17008
+ "ne",
17009
+ "nebeudig",
17010
+ "nebeut",
17011
+ "nebeutañ",
17012
+ "nebeutoc'h",
17013
+ "neketa",
17014
+ "nemedoc'h",
17015
+ "nemedomp",
17016
+ "nemedon",
17017
+ "nemedor",
17018
+ "nemedout",
17019
+ "nemet",
17020
+ "nemetañ",
17021
+ "nemete",
17022
+ "nemeti",
17023
+ "nemeto",
17024
+ "nemeur",
17025
+ "neoac'h",
17026
+ "nepell",
17027
+ "nerzh",
17028
+ "nes",
17029
+ "neseser",
17030
+ "netra",
17031
+ "neubeudoù",
17032
+ "neuhe",
17033
+ "neuze",
17034
+ "nevez",
17035
+ "newazh",
17036
+ "nez",
17037
+ "ni",
17038
+ "nikun",
17039
+ "niverus",
17040
+ "nul",
16392
17041
  "o",
16393
- "os",
16394
- "ou",
16395
- "outra",
16396
- "outras",
16397
- "outro",
16398
- "outros",
16399
- "pelas",
16400
- "pelo",
16401
- "pelos",
16402
- "perante",
16403
- "pois",
16404
- "por",
16405
- "porque",
16406
- "portanto",
16407
- "propios",
16408
- "proprio",
16409
- "quais",
16410
- "qual",
16411
- "qualquer",
16412
- "quando",
16413
- "quanto",
16414
- "que",
16415
- "quem",
16416
- "quer",
17042
+ "o:",
17043
+ "oa",
17044
+ "oac'h",
17045
+ "oad",
17046
+ "oamp",
17047
+ "oan",
17048
+ "oant",
17049
+ "oar",
17050
+ "oas",
17051
+ "ober",
17052
+ "oc'h",
17053
+ "oc'ho",
17054
+ "oc'hola",
17055
+ "oc'hpenn",
17056
+ "oh",
17057
+ "ohe",
17058
+ "ollé",
17059
+ "olole",
17060
+ "olé",
17061
+ "omp",
17062
+ "on",
17063
+ "ordin",
17064
+ "ordinal",
17065
+ "ouejoc'h",
17066
+ "ouejod",
17067
+ "ouejomp",
17068
+ "ouejont",
17069
+ "ouejout",
17070
+ "ouek",
17071
+ "ouezas",
17072
+ "ouezi",
17073
+ "ouezimp",
17074
+ "ouezin",
17075
+ "ouezint",
17076
+ "ouezis",
17077
+ "ouezo",
17078
+ "ouezoc'h",
17079
+ "ouezor",
17080
+ "ouf",
17081
+ "oufe",
17082
+ "oufec'h",
17083
+ "oufed",
17084
+ "oufemp",
17085
+ "oufen",
17086
+ "oufent",
17087
+ "oufes",
17088
+ "ouie",
17089
+ "ouiec'h",
17090
+ "ouied",
17091
+ "ouiemp",
17092
+ "ouien",
17093
+ "ouient",
17094
+ "ouies",
17095
+ "ouije",
17096
+ "ouijec'h",
17097
+ "ouijed",
17098
+ "ouijemp",
17099
+ "ouijen",
17100
+ "ouijent",
17101
+ "ouijes",
17102
+ "out",
17103
+ "outañ",
17104
+ "outi",
17105
+ "outo",
17106
+ "ouzer",
17107
+ "ouzh",
17108
+ "ouzhin",
17109
+ "ouzhit",
17110
+ "ouzhoc'h",
17111
+ "ouzhomp",
17112
+ "ouzhor",
17113
+ "ouzhpenn",
17114
+ "ouzhpennik",
17115
+ "ouzoc'h",
17116
+ "ouzomp",
17117
+ "ouzon",
17118
+ "ouzont",
17119
+ "ouzout",
17120
+ "p'",
17121
+ "p:",
17122
+ "pa",
17123
+ "pad",
17124
+ "padal",
17125
+ "paf",
17126
+ "pan",
17127
+ "panevedeoc'h",
17128
+ "panevedo",
17129
+ "panevedomp",
17130
+ "panevedon",
17131
+ "panevedout",
17132
+ "panevet",
17133
+ "panevetañ",
17134
+ "paneveti",
17135
+ "pas",
17136
+ "paseet",
17137
+ "pe",
17138
+ "peadra",
17139
+ "peder",
17140
+ "pedervet",
17141
+ "pedervetvet",
17142
+ "pefe",
17143
+ "pegeit",
17144
+ "pegement",
17145
+ "pegen",
17146
+ "pegiz",
17147
+ "pegoulz",
17148
+ "pehini",
17149
+ "pelec'h",
17150
+ "pell",
17151
+ "pemod",
17152
+ "pemp",
17153
+ "pempved",
17154
+ "pemzek",
17155
+ "penaos",
17156
+ "penn",
17157
+ "peogwir",
17158
+ "peotramant",
17159
+ "pep",
17160
+ "perak",
17161
+ "perc'hennañ",
17162
+ "pergen",
17163
+ "permetiñ",
17164
+ "peseurt",
17165
+ "pet",
17166
+ "petiaoul",
17167
+ "petoare",
17168
+ "petra",
17169
+ "peur",
17170
+ "peurgetket",
17171
+ "peurheñvel",
17172
+ "peurliesañ",
17173
+ "peurvuiañ",
17174
+ "peus",
17175
+ "peustost",
17176
+ "peuz",
17177
+ "pevar",
17178
+ "pevare",
17179
+ "pevarevet",
17180
+ "pevarzek",
17181
+ "pez",
17182
+ "peze",
17183
+ "pezh",
17184
+ "pff",
17185
+ "pfft",
17186
+ "pfut",
17187
+ "picher",
17188
+ "pif",
17189
+ "pife",
17190
+ "pign",
17191
+ "pije",
17192
+ "pikol",
17193
+ "pitiaoul",
17194
+ "piv",
17195
+ "plaouf",
17196
+ "plok",
17197
+ "plouf",
17198
+ "po",
17199
+ "poa",
17200
+ "poelladus",
17201
+ "pof",
17202
+ "pok",
17203
+ "posupl",
17204
+ "pouah",
17205
+ "pourc'henn",
17206
+ "prest",
17207
+ "prestik",
17208
+ "prim",
17209
+ "prin",
17210
+ "provostapl",
17211
+ "pst",
17212
+ "pu",
17213
+ "pur",
17214
+ "r:",
17215
+ "ra",
17216
+ "rae",
17217
+ "raec'h",
17218
+ "raed",
17219
+ "raemp",
17220
+ "raen",
17221
+ "raent",
17222
+ "raes",
17223
+ "rafe",
17224
+ "rafec'h",
17225
+ "rafed",
17226
+ "rafemp",
17227
+ "rafen",
17228
+ "rafent",
17229
+ "rafes",
17230
+ "rag",
17231
+ "raimp",
17232
+ "raint",
17233
+ "raio",
17234
+ "raje",
17235
+ "rajec'h",
17236
+ "rajed",
17237
+ "rajemp",
17238
+ "rajen",
17239
+ "rajent",
17240
+ "rajes",
17241
+ "rak",
17242
+ "ral",
17243
+ "ran",
17244
+ "rankout",
17245
+ "raok",
17246
+ "razh",
17247
+ "re",
17248
+ "reas",
17249
+ "reer",
17250
+ "regennoù",
17251
+ "reiñ",
17252
+ "rejoc'h",
17253
+ "rejod",
17254
+ "rejomp",
17255
+ "rejont",
17256
+ "rejout",
17257
+ "rener",
17258
+ "rentañ",
17259
+ "reoc'h",
17260
+ "reomp",
17261
+ "reont",
17262
+ "reor",
17263
+ "reot",
17264
+ "resis",
17265
+ "ret",
17266
+ "reve",
17267
+ "rez",
17268
+ "ri",
17269
+ "rik",
17270
+ "rin",
17271
+ "ris",
17272
+ "rit",
17273
+ "rouez",
17274
+ "s:",
17275
+ "sac'h",
17276
+ "sant",
17277
+ "sav",
17278
+ "sañset",
16417
17279
  "se",
16418
- "seja",
16419
- "sem",
16420
- "sendo",
16421
- "seu",
16422
- "seus",
16423
- "sob",
16424
- "sobre",
16425
- "sua",
16426
- "suas",
17280
+ "sed",
17281
+ "seitek",
17282
+ "seizh",
17283
+ "seizhvet",
17284
+ "sell",
17285
+ "sellit",
17286
+ "ser",
17287
+ "setu",
17288
+ "seul",
17289
+ "seurt",
17290
+ "siwazh",
17291
+ "skignañ",
17292
+ "skoaz",
17293
+ "skouer",
17294
+ "sort",
17295
+ "souden",
17296
+ "souvitañ",
17297
+ "soñj",
17298
+ "speriañ",
17299
+ "spririñ",
17300
+ "stad",
17301
+ "stlabezañ",
17302
+ "stop",
17303
+ "stranañ",
17304
+ "strewiñ",
17305
+ "strishaat",
17306
+ "stumm",
17307
+ "sujed",
17308
+ "surtoud",
17309
+ "t:",
17310
+ "ta",
17311
+ "taer",
17312
+ "tailh",
17313
+ "tak",
16427
17314
  "tal",
16428
- "tambem",
16429
- "teu",
17315
+ "talvoudegezh",
17316
+ "tamm",
17317
+ "tanav",
17318
+ "taol",
17319
+ "te",
17320
+ "techet",
17321
+ "teir",
17322
+ "teirvet",
17323
+ "telt",
17324
+ "teltenn",
16430
17325
  "teus",
16431
- "toda",
16432
- "todas",
16433
- "todo",
16434
- "todos",
16435
- "tua",
16436
- "tuas",
16437
- "tudo",
16438
- "um",
16439
- "uma",
16440
- "umas",
16441
- "uns"
17326
+ "teut",
17327
+ "teuteu",
17328
+ "ti",
17329
+ "tik",
17330
+ "toa",
17331
+ "tok",
17332
+ "tost",
17333
+ "tostig",
17334
+ "toud",
17335
+ "touesk",
17336
+ "touez",
17337
+ "toull",
17338
+ "tra",
17339
+ "trantenn",
17340
+ "traoñ",
17341
+ "trawalc'h",
17342
+ "tre",
17343
+ "trede",
17344
+ "tregont",
17345
+ "tremenet",
17346
+ "tri",
17347
+ "trivet",
17348
+ "triwec'h",
17349
+ "trizek",
17350
+ "tro",
17351
+ "trugarez",
17352
+ "trumm",
17353
+ "tsoin",
17354
+ "tsouin",
17355
+ "tu",
17356
+ "tud",
17357
+ "u:",
17358
+ "ugent",
17359
+ "uhel",
17360
+ "uhelañ",
17361
+ "ul",
17362
+ "un",
17363
+ "unan",
17364
+ "unanez",
17365
+ "unanig",
17366
+ "unnek",
17367
+ "unnekvet",
17368
+ "ur",
17369
+ "urzh",
17370
+ "us",
17371
+ "v:",
17372
+ "va",
17373
+ "vale",
17374
+ "van",
17375
+ "vare",
17376
+ "vat",
17377
+ "vefe",
17378
+ "vefec'h",
17379
+ "vefed",
17380
+ "vefemp",
17381
+ "vefen",
17382
+ "vefent",
17383
+ "vefes",
17384
+ "vesk",
17385
+ "vete",
17386
+ "vez",
17387
+ "vezan",
17388
+ "vezañ",
17389
+ "veze",
17390
+ "vezec'h",
17391
+ "vezed",
17392
+ "vezemp",
17393
+ "vezen",
17394
+ "vezent",
17395
+ "vezer",
17396
+ "vezes",
17397
+ "vezez",
17398
+ "vezit",
17399
+ "vezomp",
17400
+ "vezont",
17401
+ "vi",
17402
+ "vihan",
17403
+ "vihanañ",
17404
+ "vije",
17405
+ "vijec'h",
17406
+ "vijed",
17407
+ "vijemp",
17408
+ "vijen",
17409
+ "vijent",
17410
+ "vijes",
17411
+ "viken",
17412
+ "vimp",
17413
+ "vin",
17414
+ "vint",
17415
+ "vior",
17416
+ "viot",
17417
+ "virviken",
17418
+ "viskoazh",
17419
+ "vlan",
17420
+ "vlaou",
17421
+ "vo",
17422
+ "vod",
17423
+ "voe",
17424
+ "voec'h",
17425
+ "voed",
17426
+ "voemp",
17427
+ "voen",
17428
+ "voent",
17429
+ "voes",
17430
+ "vont",
17431
+ "vostapl",
17432
+ "vrac'h",
17433
+ "vrasañ",
17434
+ "vremañ",
17435
+ "w:",
17436
+ "walc'h",
17437
+ "war",
17438
+ "warnañ",
17439
+ "warni",
17440
+ "warno",
17441
+ "warnoc'h",
17442
+ "warnomp",
17443
+ "warnon",
17444
+ "warnor",
17445
+ "warnout",
17446
+ "wazh",
17447
+ "wech",
17448
+ "wechoù",
17449
+ "well",
17450
+ "y:",
17451
+ "you",
17452
+ "youadenn",
17453
+ "youc'hadenn",
17454
+ "youc'hou",
17455
+ "z:",
17456
+ "za",
17457
+ "zan",
17458
+ "zaw",
17459
+ "zeu",
17460
+ "zi",
17461
+ "ziar",
17462
+ "zigarez",
17463
+ "ziget",
17464
+ "zindan",
17465
+ "zioc'h",
17466
+ "ziouzh",
17467
+ "zirak",
17468
+ "zivout",
17469
+ "ziwar",
17470
+ "ziwezhañ",
17471
+ "zo",
17472
+ "zoken",
17473
+ "zokenoc'h",
17474
+ "zouesk",
17475
+ "zouez",
17476
+ "zro",
17477
+ "zu"
16442
17478
  ];
16443
17479
  const bul = [
16444
17480
  "а",
@@ -28094,22 +29130,32 @@ flowchart TD
28094
29130
  "şöyle"
28095
29131
  ];
28096
29132
  const ukr = [
29133
+ "а",
29134
+ "або",
28097
29135
  "авжеж",
28098
29136
  "адже",
29137
+ "аж",
28099
29138
  "але",
29139
+ "ані",
28100
29140
  "б",
28101
29141
  "без",
29142
+ "би",
29143
+ "бо",
28102
29144
  "був",
28103
29145
  "була",
28104
29146
  "були",
28105
29147
  "було",
28106
29148
  "бути",
28107
29149
  "більш",
29150
+ "в",
28108
29151
  "вам",
29152
+ "вами",
28109
29153
  "вас",
28110
29154
  "весь",
29155
+ "вже",
28111
29156
  "вздовж",
28112
29157
  "ви",
29158
+ "від",
28113
29159
  "вниз",
28114
29160
  "внизу",
28115
29161
  "вона",
@@ -28118,55 +29164,138 @@ flowchart TD
28118
29164
  "все",
28119
29165
  "всередині",
28120
29166
  "всіх",
29167
+ "вся",
28121
29168
  "від",
28122
29169
  "він",
28123
29170
  "да",
28124
29171
  "давай",
28125
29172
  "давати",
28126
29173
  "де",
29174
+ "десь",
28127
29175
  "дещо",
28128
29176
  "для",
28129
29177
  "до",
29178
+ "є",
29179
+ "ж",
29180
+ "же",
28130
29181
  "з",
29182
+ "за",
28131
29183
  "завжди",
28132
29184
  "замість",
29185
+ "зі",
29186
+ "і",
29187
+ "із",
29188
+ "інших",
29189
+ "її",
29190
+ "їй",
29191
+ "їм",
29192
+ "їх",
28133
29193
  "й",
29194
+ "його",
29195
+ "йому",
28134
29196
  "коли",
28135
29197
  "ледве",
29198
+ "лиш",
28136
29199
  "майже",
29200
+ "мене",
29201
+ "мені",
28137
29202
  "ми",
29203
+ "між",
29204
+ "мій",
29205
+ "мною",
29206
+ "мов",
29207
+ "мого",
29208
+ "моєї",
29209
+ "моє",
29210
+ "може",
29211
+ "мої",
29212
+ "моїх",
29213
+ "моя",
29214
+ "на",
29215
+ "над",
28138
29216
  "навколо",
28139
29217
  "навіть",
28140
29218
  "нам",
29219
+ "нами",
29220
+ "нас",
29221
+ "наче",
29222
+ "наш",
29223
+ "не",
29224
+ "нє",
29225
+ "неї",
29226
+ "нема",
29227
+ "немов",
29228
+ "неначе",
29229
+ "нею",
29230
+ "ним",
29231
+ "ними",
29232
+ "них",
29233
+ "ні",
29234
+ "ніби",
29235
+ "ніщо",
29236
+ "нього",
29237
+ "о",
29238
+ "ось",
28141
29239
  "от",
28142
29240
  "отже",
28143
29241
  "отож",
29242
+ "під",
29243
+ "по",
28144
29244
  "поза",
28145
29245
  "про",
28146
29246
  "під",
29247
+ "сам",
29248
+ "сама",
29249
+ "свій",
29250
+ "свої",
29251
+ "своя",
29252
+ "свою",
29253
+ "себе",
29254
+ "собі",
28147
29255
  "та",
29256
+ "там",
28148
29257
  "так",
29258
+ "така",
28149
29259
  "такий",
28150
29260
  "також",
29261
+ "твій",
29262
+ "твого",
29263
+ "твоєї",
29264
+ "твої",
29265
+ "твоя",
28151
29266
  "те",
29267
+ "тебе",
28152
29268
  "ти",
29269
+ "ті",
29270
+ "тільки",
29271
+ "то",
29272
+ "тобі",
29273
+ "тобою",
28153
29274
  "тобто",
29275
+ "тоді",
28154
29276
  "тож",
29277
+ "той",
28155
29278
  "тощо",
29279
+ "тут",
29280
+ "у",
29281
+ "хіба",
29282
+ "хоч",
28156
29283
  "хоча",
28157
29284
  "це",
28158
29285
  "цей",
29286
+ "ці",
29287
+ "ця",
28159
29288
  "чи",
28160
29289
  "чого",
29290
+ "ще",
28161
29291
  "що",
29292
+ "щоб",
29293
+ "щось",
29294
+ "я",
28162
29295
  "як",
29296
+ "яка",
28163
29297
  "який",
28164
- "якої",
28165
- "є",
28166
- "із",
28167
- "інших",
28168
- "їх",
28169
- "її"
29298
+ "якої"
28170
29299
  ];
28171
29300
  const urd = [
28172
29301
  "آئی",
@@ -29164,7 +30293,14 @@ flowchart TD
29164
30293
  const AUTH_TOKEN_KEY = "tinacms-auth";
29165
30294
  const authenticate = (clientId, frontendUrl) => {
29166
30295
  return new Promise((resolve) => {
29167
- let authTab;
30296
+ const origin = `${window.location.protocol}//${window.location.host}`;
30297
+ const authTab = popupWindow(
30298
+ `${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
30299
+ "_blank",
30300
+ window,
30301
+ 1e3,
30302
+ 700
30303
+ );
29168
30304
  window.addEventListener("message", function(e) {
29169
30305
  if (e.data.source === TINA_LOGIN_EVENT) {
29170
30306
  if (authTab) {
@@ -29177,14 +30313,6 @@ flowchart TD
29177
30313
  });
29178
30314
  }
29179
30315
  });
29180
- const origin = `${window.location.protocol}//${window.location.host}`;
29181
- authTab = popupWindow(
29182
- `${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`,
29183
- "_blank",
29184
- window,
29185
- 1e3,
29186
- 700
29187
- );
29188
30316
  });
29189
30317
  };
29190
30318
  const DefaultSessionProvider = ({
@@ -29890,56 +31018,6 @@ mutation addPendingDocumentMutation(
29890
31018
  !submitting && name
29891
31019
  );
29892
31020
  };
29893
- const TINA_AUTH_CONFIG = "tina_auth_config";
29894
- const useTinaAuthRedirect = () => {
29895
- React.useEffect(() => {
29896
- const urlParams = new URLSearchParams(window.location.search);
29897
- const config = {
29898
- code: urlParams.get("code") || "",
29899
- scope: urlParams.get("scope") || "email",
29900
- state: urlParams.get("state")
29901
- };
29902
- if (!config.code) {
29903
- return;
29904
- }
29905
- localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
29906
- }, []);
29907
- };
29908
- const createClient = ({
29909
- clientId,
29910
- isLocalClient = true,
29911
- branch,
29912
- tinaioConfig,
29913
- schema,
29914
- apiUrl,
29915
- tinaGraphQLVersion
29916
- }) => {
29917
- return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
29918
- clientId: clientId || "",
29919
- branch: branch || "main",
29920
- tokenStorage: "LOCAL_STORAGE",
29921
- tinaioConfig,
29922
- schema,
29923
- tinaGraphQLVersion
29924
- });
29925
- };
29926
- function assertShape(value, yupSchema, errorMessage) {
29927
- const shape = yupSchema(yup__namespace);
29928
- try {
29929
- shape.validateSync(value);
29930
- } catch (e) {
29931
- const message = errorMessage || `Failed to assertShape - ${e.message}`;
29932
- throw new Error(message);
29933
- }
29934
- }
29935
- function safeAssertShape(value, yupSchema) {
29936
- try {
29937
- assertShape(value, yupSchema);
29938
- return true;
29939
- } catch (e) {
29940
- return false;
29941
- }
29942
- }
29943
31021
  class TinaAdminApi {
29944
31022
  constructor(cms) {
29945
31023
  var _a, _b, _c, _d;
@@ -30079,6 +31157,7 @@ mutation addPendingDocumentMutation(
30079
31157
  relativePath
30080
31158
  filename
30081
31159
  extension
31160
+ hasReferences
30082
31161
  }
30083
31162
  }
30084
31163
  }
@@ -30170,6 +31249,9 @@ mutation addPendingDocumentMutation(
30170
31249
  document(collection:$collection, relativePath:$relativePath) {
30171
31250
  ... on Document {
30172
31251
  _values
31252
+ _sys {
31253
+ hasReferences
31254
+ }
30173
31255
  }
30174
31256
  }
30175
31257
  }`;
@@ -30282,6 +31364,56 @@ mutation addPendingDocumentMutation(
30282
31364
  );
30283
31365
  }
30284
31366
  }
31367
+ const createClient = ({
31368
+ clientId,
31369
+ isLocalClient = true,
31370
+ branch,
31371
+ tinaioConfig,
31372
+ schema,
31373
+ apiUrl,
31374
+ tinaGraphQLVersion
31375
+ }) => {
31376
+ return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
31377
+ clientId: clientId || "",
31378
+ branch: branch || "main",
31379
+ tokenStorage: "LOCAL_STORAGE",
31380
+ tinaioConfig,
31381
+ schema,
31382
+ tinaGraphQLVersion
31383
+ });
31384
+ };
31385
+ function assertShape(value, yupSchema, errorMessage) {
31386
+ const shape = yupSchema(yup__namespace);
31387
+ try {
31388
+ shape.validateSync(value);
31389
+ } catch (e) {
31390
+ const message = errorMessage || `Failed to assertShape - ${e.message}`;
31391
+ throw new Error(message);
31392
+ }
31393
+ }
31394
+ function safeAssertShape(value, yupSchema) {
31395
+ try {
31396
+ assertShape(value, yupSchema);
31397
+ return true;
31398
+ } catch (e) {
31399
+ return false;
31400
+ }
31401
+ }
31402
+ const TINA_AUTH_CONFIG = "tina_auth_config";
31403
+ const useTinaAuthRedirect = () => {
31404
+ React.useEffect(() => {
31405
+ const urlParams = new URLSearchParams(window.location.search);
31406
+ const config = {
31407
+ code: urlParams.get("code") || "",
31408
+ scope: urlParams.get("scope") || "email",
31409
+ state: urlParams.get("state")
31410
+ };
31411
+ if (!config.code) {
31412
+ return;
31413
+ }
31414
+ localStorage[TINA_AUTH_CONFIG] = JSON.stringify(config);
31415
+ }, []);
31416
+ };
30285
31417
  function sleep(ms) {
30286
31418
  return new Promise((resolve) => setTimeout(resolve, ms));
30287
31419
  }
@@ -30499,6 +31631,7 @@ mutation addPendingDocumentMutation(
30499
31631
  "tinacms-current-branch",
30500
31632
  baseBranch
30501
31633
  );
31634
+ console.log({ currentBranch });
30502
31635
  useTinaAuthRedirect();
30503
31636
  const cms = React.useMemo(
30504
31637
  () => props.cms || new TinaCMS({
@@ -30618,6 +31751,12 @@ mutation addPendingDocumentMutation(
30618
31751
  cms.flags.set("branch-switcher", true);
30619
31752
  client.usingEditorialWorkflow = true;
30620
31753
  client.protectedBranches = project.protectedBranches;
31754
+ console.log("currentBranch", currentBranch);
31755
+ console.log(project.metadata[currentBranch]);
31756
+ if (!project.metadata[currentBranch]) {
31757
+ console.log("resetting to default branch", project.defaultBranch);
31758
+ setCurrentBranch(project.defaultBranch || "main");
31759
+ }
30621
31760
  }
30622
31761
  });
30623
31762
  };
@@ -30630,7 +31769,7 @@ mutation addPendingDocumentMutation(
30630
31769
  }
30631
31770
  });
30632
31771
  return unsubscribe;
30633
- }, [isTinaCloud, cms]);
31772
+ }, [currentBranch, isTinaCloud, cms]);
30634
31773
  return /* @__PURE__ */ React.createElement(SessionProvider, { basePath: "/api/tina/auth" }, /* @__PURE__ */ React.createElement(
30635
31774
  BranchDataProvider,
30636
31775
  {
@@ -31793,6 +32932,7 @@ This will work when developing locally but NOT when deployed to production.
31793
32932
  const [vars, setVars] = React.useState({
31794
32933
  collection: collectionName,
31795
32934
  relativePath: "",
32935
+ relativePathWithoutExtension: "",
31796
32936
  newRelativePath: "",
31797
32937
  filterField: "",
31798
32938
  folderName: "",
@@ -31834,6 +32974,7 @@ This will work when developing locally but NOT when deployed to production.
31834
32974
  ...old,
31835
32975
  collection: collectionName,
31836
32976
  relativePath: "",
32977
+ relativePathWithoutExtension: "",
31837
32978
  newRelativePath: "",
31838
32979
  filterField: "",
31839
32980
  startsWith: "",
@@ -31859,6 +33000,7 @@ This will work when developing locally but NOT when deployed to production.
31859
33000
  collectionName === vars.collection ? vars : {
31860
33001
  collection: collectionName,
31861
33002
  relativePath: "",
33003
+ relativePathWithoutExtension: "",
31862
33004
  newRelativePath: "",
31863
33005
  filterField: "",
31864
33006
  startsWith: "",
@@ -31896,6 +33038,23 @@ This will work when developing locally but NOT when deployed to production.
31896
33038
  DeleteModal,
31897
33039
  {
31898
33040
  filename: vars.relativePath,
33041
+ checkRefsFunc: async () => {
33042
+ var _a2, _b2;
33043
+ try {
33044
+ const doc = await admin.fetchDocument(
33045
+ collection.name,
33046
+ vars.relativePath,
33047
+ true
33048
+ );
33049
+ return (_b2 = (_a2 = doc == null ? void 0 : doc.document) == null ? void 0 : _a2._sys) == null ? void 0 : _b2.hasReferences;
33050
+ } catch (error) {
33051
+ cms.alerts.error(
33052
+ "Document was not found, ask a developer for help or check the console for an error message"
33053
+ );
33054
+ console.error(error);
33055
+ throw error;
33056
+ }
33057
+ },
31899
33058
  deleteFunc: async () => {
31900
33059
  try {
31901
33060
  await admin.deleteDocument(vars);
@@ -31904,6 +33063,12 @@ This will work when developing locally but NOT when deployed to production.
31904
33063
  );
31905
33064
  reFetchCollection();
31906
33065
  } catch (error) {
33066
+ if (error.message.indexOf("has references")) {
33067
+ cms.alerts.error(
33068
+ error.message.split("\n ").filter(Boolean)[1]
33069
+ );
33070
+ return;
33071
+ }
31907
33072
  cms.alerts.warn(
31908
33073
  "Document was not deleted, ask a developer for help or check the console for an error message"
31909
33074
  );
@@ -31923,7 +33088,9 @@ This will work when developing locally but NOT when deployed to production.
31923
33088
  safeSubmit: async () => {
31924
33089
  try {
31925
33090
  await admin.deleteDocument(vars);
31926
- cms.alerts.info("Document was successfully deleted");
33091
+ cms.alerts.info(
33092
+ "Document was successfully deleted"
33093
+ );
31927
33094
  reFetchCollection();
31928
33095
  } catch (error) {
31929
33096
  cms.alerts.warn(
@@ -31937,7 +33104,7 @@ This will work when developing locally but NOT when deployed to production.
31937
33104
  ), renameModalOpen && /* @__PURE__ */ React.createElement(
31938
33105
  RenameModal,
31939
33106
  {
31940
- filename: vars.relativePath,
33107
+ filename: vars.relativePathWithoutExtension,
31941
33108
  newRelativePath: vars.newRelativePath,
31942
33109
  setNewRelativePath: (newRelativePath) => {
31943
33110
  setVars((vars2) => {
@@ -31952,9 +33119,17 @@ This will work when developing locally but NOT when deployed to production.
31952
33119
  relativePath: vars.relativePath,
31953
33120
  newRelativePath
31954
33121
  });
31955
- cms.alerts.info("Document was successfully renamed");
33122
+ cms.alerts.info(
33123
+ "Document was successfully renamed"
33124
+ );
31956
33125
  reFetchCollection();
31957
33126
  } catch (error) {
33127
+ if (error.message.indexOf("has references")) {
33128
+ cms.alerts.error(
33129
+ error.message.split("\n ").filter(Boolean)[1]
33130
+ );
33131
+ return;
33132
+ }
31958
33133
  cms.alerts.warn(
31959
33134
  "Document was not renamed, ask a developer for help or check the console for an error message"
31960
33135
  );
@@ -32046,7 +33221,9 @@ This will work when developing locally but NOT when deployed to production.
32046
33221
  name: "sort",
32047
33222
  value: sortKey,
32048
33223
  onChange: (e) => {
32049
- const val = JSON.parse(e.target.value);
33224
+ const val = JSON.parse(
33225
+ e.target.value
33226
+ );
32050
33227
  setEndCursor("");
32051
33228
  setPrevCursors([]);
32052
33229
  window == null ? void 0 : window.localStorage.setItem(
@@ -32252,6 +33429,9 @@ This will work when developing locally but NOT when deployed to production.
32252
33429
  setVars((old) => ({
32253
33430
  ...old,
32254
33431
  collection: collectionName,
33432
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
33433
+ "/"
33434
+ ),
32255
33435
  relativePath: document2.node._sys.breadcrumbs.join(
32256
33436
  "/"
32257
33437
  ) + document2.node._sys.extension,
@@ -32274,6 +33454,9 @@ This will work when developing locally but NOT when deployed to production.
32274
33454
  setVars((old) => ({
32275
33455
  ...old,
32276
33456
  collection: collectionName,
33457
+ relativePathWithoutExtension: document2.node._sys.breadcrumbs.join(
33458
+ "/"
33459
+ ),
32277
33460
  relativePath: document2.node._sys.breadcrumbs.join(
32278
33461
  "/"
32279
33462
  ) + document2.node._sys.extension,
@@ -32428,8 +33611,19 @@ This will work when developing locally but NOT when deployed to production.
32428
33611
  const NoDocumentsPlaceholder = () => {
32429
33612
  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."));
32430
33613
  };
32431
- const DeleteModal = ({ close: close2, deleteFunc, filename }) => {
32432
- 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(
33614
+ const DeleteModal = ({
33615
+ close: close2,
33616
+ deleteFunc,
33617
+ checkRefsFunc,
33618
+ filename
33619
+ }) => {
33620
+ const [hasRefs, setHasRefs] = React.useState();
33621
+ React.useEffect(() => {
33622
+ checkRefsFunc().then((result) => {
33623
+ setHasRefs(result);
33624
+ });
33625
+ }, [filename, checkRefsFunc]);
33626
+ 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(
32433
33627
  Button$1,
32434
33628
  {
32435
33629
  style: { flexGrow: 3 },
@@ -32475,7 +33669,7 @@ This will work when developing locally but NOT when deployed to production.
32475
33669
  newRelativePath,
32476
33670
  setNewRelativePath
32477
33671
  }) => {
32478
- 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(
33672
+ 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(
32479
33673
  BaseTextField,
32480
33674
  {
32481
33675
  placeholder: "Enter a new name for the document's file",
@@ -32490,7 +33684,8 @@ This will work when developing locally but NOT when deployed to production.
32490
33684
  onClick: async () => {
32491
33685
  await renameFunc();
32492
33686
  close2();
32493
- }
33687
+ },
33688
+ disabled: !newRelativePath || newRelativePath === filename
32494
33689
  },
32495
33690
  "Rename"
32496
33691
  ))));
@@ -32817,7 +34012,10 @@ This will work when developing locally but NOT when deployed to production.
32817
34012
  const fetchDocument = async () => {
32818
34013
  if (api.isAuthenticated()) {
32819
34014
  try {
32820
- const response = await api.fetchDocument(collectionName, relativePath2);
34015
+ const response = await api.fetchDocument(
34016
+ collectionName,
34017
+ relativePath2
34018
+ );
32821
34019
  setDocument(response.document);
32822
34020
  } catch (error2) {
32823
34021
  cms.alerts.error(
@@ -33161,15 +34359,24 @@ This will work when developing locally but NOT when deployed to production.
33161
34359
  }
33162
34360
  }
33163
34361
  if (state === "creatingPR") {
33164
- const foo = await tinaApi.createPullRequest({
33165
- baseBranch,
33166
- branch,
33167
- title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
33168
- });
33169
- console.log("PR created", foo);
33170
- cms.alerts.success("Pull request created.");
33171
- localStorage.setItem("tina.createBranchState", "done");
33172
- setState("done");
34362
+ try {
34363
+ const foo = await tinaApi.createPullRequest({
34364
+ baseBranch,
34365
+ branch,
34366
+ title: `${branch.replace("tina/", "").replace("-", " ")} (PR from TinaCMS)`
34367
+ });
34368
+ console.log("PR created", foo);
34369
+ cms.alerts.success("Pull request created.");
34370
+ localStorage.setItem("tina.createBranchState", "done");
34371
+ setState("done");
34372
+ } catch (e) {
34373
+ console.error(e);
34374
+ cms.alerts.error("Failed to create PR");
34375
+ setErrorMessage(
34376
+ "Failed to create PR, please try again. If the problem persists please contact support."
34377
+ );
34378
+ setState("error");
34379
+ }
33173
34380
  }
33174
34381
  if (state === "done") {
33175
34382
  window.location.href = back;
@@ -33796,6 +35003,7 @@ This will work when developing locally but NOT when deployed to production.
33796
35003
  exports2.useScreenPlugin = useScreenPlugin;
33797
35004
  exports2.useTinaAuthRedirect = useTinaAuthRedirect;
33798
35005
  exports2.wrapFieldWithError = wrapFieldWithError;
35006
+ exports2.wrapFieldWithNoHeader = wrapFieldWithNoHeader;
33799
35007
  exports2.wrapFieldsWithMeta = wrapFieldsWithMeta;
33800
35008
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
33801
35009
  });