tinacms 2.9.0 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -39267,7 +39267,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
39267
39267
  },
39268
39268
  className: classNames(
39269
39269
  toolbarItem.active ? "bg-gray-50 text-blue-500" : "bg-white text-gray-600",
39270
- "hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap"
39270
+ "hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap",
39271
+ toolbarItem.className ?? ""
39271
39272
  )
39272
39273
  },
39273
39274
  /* @__PURE__ */ React.createElement("div", { className: "mr-2 opacity-80" }, toolbarItem.Icon),
@@ -40342,6 +40343,18 @@ Please wrap them with useCallback or configure the deps array correctly.`
40342
40343
  name: "group",
40343
40344
  Component: Group
40344
40345
  };
40346
+ const constructUrlWithBasePath = (url, basePath) => {
40347
+ if (!url)
40348
+ return url;
40349
+ if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
40350
+ return url;
40351
+ }
40352
+ if (basePath) {
40353
+ const cleanBasePath = basePath.replace(/^\/+|\/+$/g, "");
40354
+ return `/${cleanBasePath}/${url}`;
40355
+ }
40356
+ return url;
40357
+ };
40345
40358
  const BlockSelectorBig = ({
40346
40359
  templates,
40347
40360
  addItem,
@@ -40541,6 +40554,10 @@ Please wrap them with useCallback or configure the deps array correctly.`
40541
40554
  );
40542
40555
  };
40543
40556
  const BlockCard = ({ close: close2, name, template }) => {
40557
+ const cms = useCMS$1();
40558
+ const basePath = cms.flags.get("tina-basepath");
40559
+ const basePathStr = typeof basePath === "string" ? basePath : void 0;
40560
+ const previewSrc = template.previewSrc ? constructUrlWithBasePath(template.previewSrc, basePathStr) : void 0;
40544
40561
  return /* @__PURE__ */ React__namespace.createElement(
40545
40562
  "button",
40546
40563
  {
@@ -40551,17 +40568,17 @@ Please wrap them with useCallback or configure the deps array correctly.`
40551
40568
  close2(name, template);
40552
40569
  }
40553
40570
  },
40554
- template.previewSrc && /* @__PURE__ */ React__namespace.createElement(
40571
+ previewSrc && /* @__PURE__ */ React__namespace.createElement(
40555
40572
  "img",
40556
40573
  {
40557
- src: template.previewSrc,
40574
+ src: previewSrc,
40558
40575
  className: "w-full h-auto transition-all ease-out duration-150 group-hover:opacity-50"
40559
40576
  }
40560
40577
  ),
40561
40578
  /* @__PURE__ */ React__namespace.createElement(
40562
40579
  "span",
40563
40580
  {
40564
- className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${template.previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
40581
+ className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
40565
40582
  },
40566
40583
  template.label ? template.label : name,
40567
40584
  /* @__PURE__ */ React__namespace.createElement(AddIcon, { className: "w-5 h-auto group-hover:text-blue-500 opacity-30 transition-all ease-out duration-150 group-hover:opacity-80" })
@@ -44833,8 +44850,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
44833
44850
  variant: "primary",
44834
44851
  onClick: () => selectMediaItem(activeItem)
44835
44852
  },
44836
- "Insert",
44837
- /* @__PURE__ */ React.createElement(BiArrowToBottom, { className: "ml-1 -mr-0.5 w-6 h-auto opacity-70" })
44853
+ /* @__PURE__ */ React.createElement(BiArrowToBottom, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
44854
+ "Insert"
44838
44855
  ), allowDelete && /* @__PURE__ */ React.createElement(
44839
44856
  Button$1,
44840
44857
  {
@@ -44842,8 +44859,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
44842
44859
  size: "medium",
44843
44860
  onClick: deleteMediaItem
44844
44861
  },
44845
- "Delete",
44846
- /* @__PURE__ */ React.createElement(TrashIcon, { className: "ml-1 -mr-0.5 w-6 h-auto opacity-70" })
44862
+ /* @__PURE__ */ React.createElement(TrashIcon, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
44863
+ "Delete"
44847
44864
  ))))
44848
44865
  );
44849
44866
  };
@@ -45943,7 +45960,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
45943
45960
  requiredArgs(1, arguments);
45944
45961
  return formatDistance(dirtyDate, Date.now(), options);
45945
45962
  }
45946
- const version$1 = "2.9.0";
45963
+ const version$1 = "2.9.1";
45947
45964
  const VersionInfo = () => {
45948
45965
  var _a2, _b, _c, _d, _e, _f;
45949
45966
  const cms = useCMS();
@@ -63819,7 +63836,9 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
63819
63836
  const tinaApi = cms.api.tina;
63820
63837
  const { setCurrentBranch } = useBranchData();
63821
63838
  const [disabled, setDisabled] = React__namespace.useState(false);
63822
- const [newBranchName, setNewBranchName] = React__namespace.useState("");
63839
+ const [newBranchName, setNewBranchName] = React__namespace.useState(
63840
+ `${crudType}-${path2}`
63841
+ );
63823
63842
  const [isExecuting, setIsExecuting] = React__namespace.useState(false);
63824
63843
  const [errorMessage, setErrorMessage] = React__namespace.useState("");
63825
63844
  const [currentStep, setCurrentStep] = React__namespace.useState(0);
@@ -64031,7 +64050,15 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
64031
64050
  if (isExecuting) {
64032
64051
  return renderProgressIndicator();
64033
64052
  } else {
64034
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React__namespace.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React__namespace.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "This content is protected 🚧"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, you need to create a copy then get it approved and merged for it to go live."), /* @__PURE__ */ React__namespace.createElement(
64053
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React__namespace.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React__namespace.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "First, let's create a copy"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, you need to create a copy then get it approved and merged for it to go live. Learn more about", " ", /* @__PURE__ */ React__namespace.createElement(
64054
+ "a",
64055
+ {
64056
+ className: "underline hover:text-tina-orange",
64057
+ href: "https://tina.io/docs/tinacloud/editorial-workflow",
64058
+ target: "_blank"
64059
+ },
64060
+ "Editorial Workflow"
64061
+ ), "."), /* @__PURE__ */ React__namespace.createElement(
64035
64062
  PrefixedTextField,
64036
64063
  {
64037
64064
  placeholder: "e.g. {{PAGE-NAME}}-updates",
@@ -64053,7 +64080,7 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
64053
64080
  disabled: newBranchName === "" || disabled,
64054
64081
  onClick: executeEditorialWorkflow
64055
64082
  },
64056
- "Confirm"
64083
+ "Continue"
64057
64084
  ), /* @__PURE__ */ React__namespace.createElement(
64058
64085
  OverflowMenu$1,
64059
64086
  {
@@ -119009,7 +119036,7 @@ mutation addPendingDocumentMutation(
119009
119036
  }
119010
119037
  usingProtectedBranch() {
119011
119038
  var _a2;
119012
- return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(this.branch));
119039
+ return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(decodeURIComponent(this.branch)));
119013
119040
  }
119014
119041
  async createBranch({ baseBranch, branchName }) {
119015
119042
  const url = `${this.contentApiBase}/github/${this.clientId}/create_branch`;
@@ -120541,6 +120568,7 @@ This will work when developing locally but NOT when deployed to production.
120541
120568
  const plugins2 = cms.plugins.all("tina-admin");
120542
120569
  const routeMapping = plugins2.find(({ name }) => name === "route-mapping");
120543
120570
  const tinaPreview = cms.flags.get("tina-preview") || false;
120571
+ const basePath = cms.flags.get("tina-basepath");
120544
120572
  let routeOverride = ((_a2 = collectionDefinition.ui) == null ? void 0 : _a2.router) ? await ((_b = collectionDefinition.ui) == null ? void 0 : _b.router({
120545
120573
  document: document2,
120546
120574
  collection: collectionDefinition
@@ -120549,7 +120577,7 @@ This will work when developing locally but NOT when deployed to production.
120549
120577
  if (routeOverride.startsWith("/")) {
120550
120578
  routeOverride = routeOverride.slice(1);
120551
120579
  }
120552
- tinaPreview ? navigate(`/~/${routeOverride}`) : window.location.href = routeOverride;
120580
+ tinaPreview ? navigate(`/~${basePath ? `/${basePath}` : ""}/${routeOverride}`) : window.location.href = `${basePath ? `/${basePath}` : ""}/${routeOverride}`;
120553
120581
  return null;
120554
120582
  } else {
120555
120583
  const pathToDoc = document2._sys.breadcrumbs;
@@ -121086,15 +121114,9 @@ This will work when developing locally but NOT when deployed to production.
121086
121114
  }
121087
121115
  },
121088
121116
  allowDelete && {
121089
- name: "delete",
121090
- label: "Delete",
121091
- Icon: /* @__PURE__ */ React.createElement(
121092
- BiTrash,
121093
- {
121094
- size: "1.3rem",
121095
- className: "text-red-500"
121096
- }
121097
- ),
121117
+ name: "rename",
121118
+ label: "Rename",
121119
+ Icon: /* @__PURE__ */ React.createElement(BiRename, { size: "1.3rem" }),
121098
121120
  onMouseDown: () => {
121099
121121
  setVars((old) => ({
121100
121122
  ...old,
@@ -121107,19 +121129,20 @@ This will work when developing locally but NOT when deployed to production.
121107
121129
  ) + document2.node._sys.extension,
121108
121130
  newRelativePath: ""
121109
121131
  }));
121110
- setDeleteModalOpen(true);
121132
+ setRenameModalOpen(true);
121111
121133
  }
121112
121134
  },
121113
121135
  allowDelete && {
121114
- name: "rename",
121115
- label: "Rename",
121136
+ name: "delete",
121137
+ label: "Delete",
121116
121138
  Icon: /* @__PURE__ */ React.createElement(
121117
- BiRename,
121139
+ BiTrash,
121118
121140
  {
121119
121141
  size: "1.3rem",
121120
121142
  className: "text-red-500"
121121
121143
  }
121122
121144
  ),
121145
+ className: "text-red-500",
121123
121146
  onMouseDown: () => {
121124
121147
  setVars((old) => ({
121125
121148
  ...old,
@@ -121132,7 +121155,7 @@ This will work when developing locally but NOT when deployed to production.
121132
121155
  ) + document2.node._sys.extension,
121133
121156
  newRelativePath: ""
121134
121157
  }));
121135
- setRenameModalOpen(true);
121158
+ setDeleteModalOpen(true);
121136
121159
  }
121137
121160
  }
121138
121161
  ].filter(Boolean)
package/dist/index.mjs CHANGED
@@ -39294,7 +39294,8 @@ const OverflowMenu$1 = ({ toolbarItems: toolbarItems2, className = "w-full" }) =
39294
39294
  },
39295
39295
  className: classNames(
39296
39296
  toolbarItem.active ? "bg-gray-50 text-blue-500" : "bg-white text-gray-600",
39297
- "hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap"
39297
+ "hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap",
39298
+ toolbarItem.className ?? ""
39298
39299
  )
39299
39300
  },
39300
39301
  /* @__PURE__ */ React__default.createElement("div", { className: "mr-2 opacity-80" }, toolbarItem.Icon),
@@ -40369,6 +40370,18 @@ const GroupFieldPlugin = {
40369
40370
  name: "group",
40370
40371
  Component: Group
40371
40372
  };
40373
+ const constructUrlWithBasePath = (url, basePath) => {
40374
+ if (!url)
40375
+ return url;
40376
+ if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
40377
+ return url;
40378
+ }
40379
+ if (basePath) {
40380
+ const cleanBasePath = basePath.replace(/^\/+|\/+$/g, "");
40381
+ return `/${cleanBasePath}/${url}`;
40382
+ }
40383
+ return url;
40384
+ };
40372
40385
  const BlockSelectorBig = ({
40373
40386
  templates,
40374
40387
  addItem,
@@ -40568,6 +40581,10 @@ const CardColumns = ({ children, className = "" }) => {
40568
40581
  );
40569
40582
  };
40570
40583
  const BlockCard = ({ close: close2, name, template }) => {
40584
+ const cms = useCMS$1();
40585
+ const basePath = cms.flags.get("tina-basepath");
40586
+ const basePathStr = typeof basePath === "string" ? basePath : void 0;
40587
+ const previewSrc = template.previewSrc ? constructUrlWithBasePath(template.previewSrc, basePathStr) : void 0;
40571
40588
  return /* @__PURE__ */ React.createElement(
40572
40589
  "button",
40573
40590
  {
@@ -40578,17 +40595,17 @@ const BlockCard = ({ close: close2, name, template }) => {
40578
40595
  close2(name, template);
40579
40596
  }
40580
40597
  },
40581
- template.previewSrc && /* @__PURE__ */ React.createElement(
40598
+ previewSrc && /* @__PURE__ */ React.createElement(
40582
40599
  "img",
40583
40600
  {
40584
- src: template.previewSrc,
40601
+ src: previewSrc,
40585
40602
  className: "w-full h-auto transition-all ease-out duration-150 group-hover:opacity-50"
40586
40603
  }
40587
40604
  ),
40588
40605
  /* @__PURE__ */ React.createElement(
40589
40606
  "span",
40590
40607
  {
40591
- className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${template.previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
40608
+ className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
40592
40609
  },
40593
40610
  template.label ? template.label : name,
40594
40611
  /* @__PURE__ */ React.createElement(AddIcon, { className: "w-5 h-auto group-hover:text-blue-500 opacity-30 transition-all ease-out duration-150 group-hover:opacity-80" })
@@ -44860,8 +44877,8 @@ const ActiveItemPreview = ({
44860
44877
  variant: "primary",
44861
44878
  onClick: () => selectMediaItem(activeItem)
44862
44879
  },
44863
- "Insert",
44864
- /* @__PURE__ */ React__default.createElement(BiArrowToBottom, { className: "ml-1 -mr-0.5 w-6 h-auto opacity-70" })
44880
+ /* @__PURE__ */ React__default.createElement(BiArrowToBottom, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
44881
+ "Insert"
44865
44882
  ), allowDelete && /* @__PURE__ */ React__default.createElement(
44866
44883
  Button$1,
44867
44884
  {
@@ -44869,8 +44886,8 @@ const ActiveItemPreview = ({
44869
44886
  size: "medium",
44870
44887
  onClick: deleteMediaItem
44871
44888
  },
44872
- "Delete",
44873
- /* @__PURE__ */ React__default.createElement(TrashIcon, { className: "ml-1 -mr-0.5 w-6 h-auto opacity-70" })
44889
+ /* @__PURE__ */ React__default.createElement(TrashIcon, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
44890
+ "Delete"
44874
44891
  ))))
44875
44892
  );
44876
44893
  };
@@ -45970,7 +45987,7 @@ function formatDistanceToNow(dirtyDate, options) {
45970
45987
  requiredArgs(1, arguments);
45971
45988
  return formatDistance2(dirtyDate, Date.now(), options);
45972
45989
  }
45973
- const version$1 = "2.9.0";
45990
+ const version$1 = "2.9.1";
45974
45991
  const VersionInfo = () => {
45975
45992
  var _a2, _b, _c, _d, _e, _f;
45976
45993
  const cms = useCMS();
@@ -63846,7 +63863,9 @@ const CreateBranchModal = ({
63846
63863
  const tinaApi = cms.api.tina;
63847
63864
  const { setCurrentBranch } = useBranchData();
63848
63865
  const [disabled, setDisabled] = React.useState(false);
63849
- const [newBranchName, setNewBranchName] = React.useState("");
63866
+ const [newBranchName, setNewBranchName] = React.useState(
63867
+ `${crudType}-${path3}`
63868
+ );
63850
63869
  const [isExecuting, setIsExecuting] = React.useState(false);
63851
63870
  const [errorMessage, setErrorMessage] = React.useState("");
63852
63871
  const [currentStep, setCurrentStep] = React.useState(0);
@@ -64058,7 +64077,15 @@ const CreateBranchModal = ({
64058
64077
  if (isExecuting) {
64059
64078
  return renderProgressIndicator();
64060
64079
  } else {
64061
- return /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "This content is protected 🚧"), /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, you need to create a copy then get it approved and merged for it to go live."), /* @__PURE__ */ React.createElement(
64080
+ return /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "First, let's create a copy"), /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, you need to create a copy then get it approved and merged for it to go live. Learn more about", " ", /* @__PURE__ */ React.createElement(
64081
+ "a",
64082
+ {
64083
+ className: "underline hover:text-tina-orange",
64084
+ href: "https://tina.io/docs/tinacloud/editorial-workflow",
64085
+ target: "_blank"
64086
+ },
64087
+ "Editorial Workflow"
64088
+ ), "."), /* @__PURE__ */ React.createElement(
64062
64089
  PrefixedTextField,
64063
64090
  {
64064
64091
  placeholder: "e.g. {{PAGE-NAME}}-updates",
@@ -64080,7 +64107,7 @@ const CreateBranchModal = ({
64080
64107
  disabled: newBranchName === "" || disabled,
64081
64108
  onClick: executeEditorialWorkflow
64082
64109
  },
64083
- "Confirm"
64110
+ "Continue"
64084
64111
  ), /* @__PURE__ */ React.createElement(
64085
64112
  OverflowMenu$1,
64086
64113
  {
@@ -119036,7 +119063,7 @@ mutation addPendingDocumentMutation(
119036
119063
  }
119037
119064
  usingProtectedBranch() {
119038
119065
  var _a2;
119039
- return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(this.branch));
119066
+ return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(decodeURIComponent(this.branch)));
119040
119067
  }
119041
119068
  async createBranch({ baseBranch, branchName }) {
119042
119069
  const url = `${this.contentApiBase}/github/${this.clientId}/create_branch`;
@@ -120568,6 +120595,7 @@ const handleNavigate = async (navigate, cms, collection, collectionDefinition, d
120568
120595
  const plugins2 = cms.plugins.all("tina-admin");
120569
120596
  const routeMapping = plugins2.find(({ name }) => name === "route-mapping");
120570
120597
  const tinaPreview = cms.flags.get("tina-preview") || false;
120598
+ const basePath = cms.flags.get("tina-basepath");
120571
120599
  let routeOverride = ((_a2 = collectionDefinition.ui) == null ? void 0 : _a2.router) ? await ((_b = collectionDefinition.ui) == null ? void 0 : _b.router({
120572
120600
  document: document2,
120573
120601
  collection: collectionDefinition
@@ -120576,7 +120604,7 @@ const handleNavigate = async (navigate, cms, collection, collectionDefinition, d
120576
120604
  if (routeOverride.startsWith("/")) {
120577
120605
  routeOverride = routeOverride.slice(1);
120578
120606
  }
120579
- tinaPreview ? navigate(`/~/${routeOverride}`) : window.location.href = routeOverride;
120607
+ tinaPreview ? navigate(`/~${basePath ? `/${basePath}` : ""}/${routeOverride}`) : window.location.href = `${basePath ? `/${basePath}` : ""}/${routeOverride}`;
120580
120608
  return null;
120581
120609
  } else {
120582
120610
  const pathToDoc = document2._sys.breadcrumbs;
@@ -121113,15 +121141,9 @@ const CollectionListPage = () => {
121113
121141
  }
121114
121142
  },
121115
121143
  allowDelete && {
121116
- name: "delete",
121117
- label: "Delete",
121118
- Icon: /* @__PURE__ */ React__default.createElement(
121119
- BiTrash,
121120
- {
121121
- size: "1.3rem",
121122
- className: "text-red-500"
121123
- }
121124
- ),
121144
+ name: "rename",
121145
+ label: "Rename",
121146
+ Icon: /* @__PURE__ */ React__default.createElement(BiRename, { size: "1.3rem" }),
121125
121147
  onMouseDown: () => {
121126
121148
  setVars((old) => ({
121127
121149
  ...old,
@@ -121134,19 +121156,20 @@ const CollectionListPage = () => {
121134
121156
  ) + document2.node._sys.extension,
121135
121157
  newRelativePath: ""
121136
121158
  }));
121137
- setDeleteModalOpen(true);
121159
+ setRenameModalOpen(true);
121138
121160
  }
121139
121161
  },
121140
121162
  allowDelete && {
121141
- name: "rename",
121142
- label: "Rename",
121163
+ name: "delete",
121164
+ label: "Delete",
121143
121165
  Icon: /* @__PURE__ */ React__default.createElement(
121144
- BiRename,
121166
+ BiTrash,
121145
121167
  {
121146
121168
  size: "1.3rem",
121147
121169
  className: "text-red-500"
121148
121170
  }
121149
121171
  ),
121172
+ className: "text-red-500",
121150
121173
  onMouseDown: () => {
121151
121174
  setVars((old) => ({
121152
121175
  ...old,
@@ -121159,7 +121182,7 @@ const CollectionListPage = () => {
121159
121182
  ) + document2.node._sys.extension,
121160
121183
  newRelativePath: ""
121161
121184
  }));
121162
- setRenameModalOpen(true);
121185
+ setDeleteModalOpen(true);
121163
121186
  }
121164
121187
  }
121165
121188
  ].filter(Boolean)
@@ -58,9 +58,15 @@ type BaseComponents = {
58
58
  lic?: {
59
59
  children: JSX.Element;
60
60
  };
61
+ /**
62
+ * @deprecated Use `blockquote` instead. This was incorrectly named and will be removed in a future version.
63
+ */
61
64
  block_quote?: {
62
65
  children: JSX.Element;
63
66
  };
67
+ blockquote?: {
68
+ children: JSX.Element;
69
+ };
64
70
  code_block?: {
65
71
  lang?: string;
66
72
  value: string;
@@ -82,7 +82,6 @@
82
82
  case "h5":
83
83
  case "h6":
84
84
  case "p":
85
- case "blockquote":
86
85
  case "ol":
87
86
  case "ul":
88
87
  case "li":
@@ -99,6 +98,14 @@
99
98
  return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
100
99
  }
101
100
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: child.children }));
101
+ case "blockquote":
102
+ const BlockquoteComponent = components.blockquote || components.block_quote;
103
+ if (BlockquoteComponent) {
104
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
105
+ }
106
+ return React.createElement("blockquote", {
107
+ children: /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children })
108
+ });
102
109
  case "img":
103
110
  if (components[child.type]) {
104
111
  const Component2 = components[child.type];
@@ -79,7 +79,6 @@ const Node = ({ components, child }) => {
79
79
  case "h5":
80
80
  case "h6":
81
81
  case "p":
82
- case "blockquote":
83
82
  case "ol":
84
83
  case "ul":
85
84
  case "li":
@@ -96,6 +95,14 @@ const Node = ({ components, child }) => {
96
95
  return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
97
96
  }
98
97
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: child.children }));
98
+ case "blockquote":
99
+ const BlockquoteComponent = components.blockquote || components.block_quote;
100
+ if (BlockquoteComponent) {
101
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
102
+ }
103
+ return React.createElement("blockquote", {
104
+ children: /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children })
105
+ });
99
106
  case "img":
100
107
  if (components[child.type]) {
101
108
  const Component2 = components[child.type];
@@ -63,9 +63,15 @@ type BaseComponents = {
63
63
  lic?: {
64
64
  children: JSX.Element;
65
65
  };
66
+ /**
67
+ * @deprecated Use `blockquote` instead. This was incorrectly named and will be removed in a future version.
68
+ */
66
69
  block_quote?: {
67
70
  children: JSX.Element;
68
71
  };
72
+ blockquote?: {
73
+ children: JSX.Element;
74
+ };
69
75
  code_block?: {
70
76
  lang?: string;
71
77
  value: string;
@@ -59,7 +59,6 @@
59
59
  case "h5":
60
60
  case "h6":
61
61
  case "p":
62
- case "blockquote":
63
62
  case "ol":
64
63
  case "ul":
65
64
  case "li":
@@ -70,6 +69,14 @@
70
69
  return React.createElement(child.type, {
71
70
  children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
72
71
  });
72
+ case "blockquote":
73
+ const BlockquoteComponent = components.blockquote || components.block_quote;
74
+ if (BlockquoteComponent) {
75
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
76
+ }
77
+ return React.createElement("blockquote", {
78
+ children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
79
+ });
73
80
  case "lic":
74
81
  if (components.lic) {
75
82
  const Component2 = components.lic;
@@ -56,7 +56,6 @@ const Node = ({
56
56
  case "h5":
57
57
  case "h6":
58
58
  case "p":
59
- case "blockquote":
60
59
  case "ol":
61
60
  case "ul":
62
61
  case "li":
@@ -67,6 +66,14 @@ const Node = ({
67
66
  return React.createElement(child.type, {
68
67
  children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
69
68
  });
69
+ case "blockquote":
70
+ const BlockquoteComponent = components.blockquote || components.block_quote;
71
+ if (BlockquoteComponent) {
72
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
73
+ }
74
+ return React.createElement("blockquote", {
75
+ children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
76
+ });
70
77
  case "lic":
71
78
  if (components.lic) {
72
79
  const Component2 = components.lic;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {