tinacms 0.0.0-ef282d9-20241024212433 → 0.0.0-f3aa146-20241112221138

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.
@@ -25,6 +25,9 @@ export interface DocumentNode {
25
25
  }
26
26
  export interface DocumentForm {
27
27
  _values: Object;
28
+ _sys?: {
29
+ hasReferences?: boolean;
30
+ };
28
31
  }
29
32
  export interface DocumentSys {
30
33
  _sys: {
package/dist/index.js CHANGED
@@ -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(
@@ -850,9 +866,9 @@ var __publicField = (obj, key, value) => {
850
866
  "span",
851
867
  {
852
868
  className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0 ${className}`,
853
- ...props
854
- },
855
- children
869
+ ...props,
870
+ dangerouslySetInnerHTML: { __html: children }
871
+ }
856
872
  );
857
873
  };
858
874
  const FieldError = ({
@@ -5710,10 +5726,11 @@ flowchart TD
5710
5726
  return /* @__PURE__ */ React.createElement(
5711
5727
  "button",
5712
5728
  {
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"}`,
5729
+ type: "button",
5730
+ 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
5731
  onClick
5715
5732
  },
5716
- /* @__PURE__ */ React.createElement(TrashIcon, { className: "fill-current transition-colors ease-out duration-100" })
5733
+ /* @__PURE__ */ React.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
5717
5734
  );
5718
5735
  };
5719
5736
  const DragHandle = ({ isDragging }) => {
@@ -5791,27 +5808,35 @@ flowchart TD
5791
5808
  ))))
5792
5809
  ))));
5793
5810
  };
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;
5811
+ const Group = wrapFieldWithNoHeader(
5812
+ ({ tinaForm, field }) => {
5813
+ const cms = useCMS$1();
5814
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
5815
+ Header,
5816
+ {
5817
+ onClick: () => {
5818
+ const state = tinaForm.finalForm.getState();
5819
+ if (state.invalid === true) {
5820
+ cms.alerts.error("Cannot navigate away from an invalid form.");
5821
+ return;
5822
+ }
5823
+ cms.dispatch({
5824
+ type: "forms:set-active-field-name",
5825
+ value: { formId: tinaForm.id, fieldName: field.name }
5826
+ });
5805
5827
  }
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
- });
5828
+ },
5829
+ field.label || field.name,
5830
+ field.description && /* @__PURE__ */ React__namespace.createElement(
5831
+ "span",
5832
+ {
5833
+ className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0`,
5834
+ dangerouslySetInnerHTML: { __html: field.description }
5835
+ }
5836
+ )
5837
+ ));
5838
+ }
5839
+ );
5815
5840
  const Header = ({ onClick, children }) => {
5816
5841
  return /* @__PURE__ */ React__namespace.createElement("div", { className: "pt-1 mb-5" }, /* @__PURE__ */ React__namespace.createElement(
5817
5842
  "button",
@@ -10308,7 +10333,7 @@ flowchart TD
10308
10333
  "Event Log"
10309
10334
  ));
10310
10335
  };
10311
- const version = "2.3.0";
10336
+ const version = "2.4.0";
10312
10337
  const Nav = ({
10313
10338
  isLocalMode,
10314
10339
  className = "",
@@ -14425,6 +14450,7 @@ flowchart TD
14425
14450
  ToolbarButton,
14426
14451
  {
14427
14452
  showArrow: false,
14453
+ "data-testid": "rich-text-editor-overflow-menu-button",
14428
14454
  className: "lg:min-w-[130px]",
14429
14455
  isDropdown: true,
14430
14456
  pressed: openState.open,
@@ -14478,7 +14504,17 @@ flowchart TD
14478
14504
  };
14479
14505
  const RawMarkdownToolbarButton = cn$1.withRef(({ clear, ...rest }, ref) => {
14480
14506
  const { props } = useRawMarkdownToolbarButton();
14481
- return /* @__PURE__ */ React.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React.createElement(Icons.raw, null));
14507
+ return /* @__PURE__ */ React.createElement(
14508
+ ToolbarButton,
14509
+ {
14510
+ ref,
14511
+ tooltip: "Link",
14512
+ ...rest,
14513
+ ...props,
14514
+ "data-testid": "markdown-button"
14515
+ },
14516
+ /* @__PURE__ */ React.createElement(Icons.raw, null)
14517
+ );
14482
14518
  });
14483
14519
  function TableDropdownMenu(props) {
14484
14520
  const tableSelected = plateCommon.useEditorSelector(
@@ -30077,6 +30113,7 @@ mutation addPendingDocumentMutation(
30077
30113
  relativePath
30078
30114
  filename
30079
30115
  extension
30116
+ hasReferences
30080
30117
  }
30081
30118
  }
30082
30119
  }
@@ -30168,6 +30205,9 @@ mutation addPendingDocumentMutation(
30168
30205
  document(collection:$collection, relativePath:$relativePath) {
30169
30206
  ... on Document {
30170
30207
  _values
30208
+ _sys {
30209
+ hasReferences
30210
+ }
30171
30211
  }
30172
30212
  }
30173
30213
  }`;
@@ -31894,6 +31934,23 @@ This will work when developing locally but NOT when deployed to production.
31894
31934
  DeleteModal,
31895
31935
  {
31896
31936
  filename: vars.relativePath,
31937
+ checkRefsFunc: async () => {
31938
+ var _a2, _b2;
31939
+ try {
31940
+ const doc = await admin.fetchDocument(
31941
+ collection.name,
31942
+ vars.relativePath,
31943
+ true
31944
+ );
31945
+ return (_b2 = (_a2 = doc == null ? void 0 : doc.document) == null ? void 0 : _a2._sys) == null ? void 0 : _b2.hasReferences;
31946
+ } catch (error) {
31947
+ cms.alerts.error(
31948
+ "Document was not found, ask a developer for help or check the console for an error message"
31949
+ );
31950
+ console.error(error);
31951
+ throw error;
31952
+ }
31953
+ },
31897
31954
  deleteFunc: async () => {
31898
31955
  try {
31899
31956
  await admin.deleteDocument(vars);
@@ -31902,6 +31959,12 @@ This will work when developing locally but NOT when deployed to production.
31902
31959
  );
31903
31960
  reFetchCollection();
31904
31961
  } catch (error) {
31962
+ if (error.message.indexOf("has references")) {
31963
+ cms.alerts.error(
31964
+ error.message.split("\n ").filter(Boolean)[1]
31965
+ );
31966
+ return;
31967
+ }
31905
31968
  cms.alerts.warn(
31906
31969
  "Document was not deleted, ask a developer for help or check the console for an error message"
31907
31970
  );
@@ -31953,6 +32016,12 @@ This will work when developing locally but NOT when deployed to production.
31953
32016
  cms.alerts.info("Document was successfully renamed");
31954
32017
  reFetchCollection();
31955
32018
  } catch (error) {
32019
+ if (error.message.indexOf("has references")) {
32020
+ cms.alerts.error(
32021
+ error.message.split("\n ").filter(Boolean)[1]
32022
+ );
32023
+ return;
32024
+ }
31956
32025
  cms.alerts.warn(
31957
32026
  "Document was not renamed, ask a developer for help or check the console for an error message"
31958
32027
  );
@@ -32426,8 +32495,19 @@ This will work when developing locally but NOT when deployed to production.
32426
32495
  const NoDocumentsPlaceholder = () => {
32427
32496
  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."));
32428
32497
  };
32429
- const DeleteModal = ({ close: close2, deleteFunc, filename }) => {
32430
- 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(
32498
+ const DeleteModal = ({
32499
+ close: close2,
32500
+ deleteFunc,
32501
+ checkRefsFunc,
32502
+ filename
32503
+ }) => {
32504
+ const [hasRefs, setHasRefs] = React.useState();
32505
+ React.useEffect(() => {
32506
+ checkRefsFunc().then((result) => {
32507
+ setHasRefs(result);
32508
+ });
32509
+ }, [filename, checkRefsFunc]);
32510
+ 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(
32431
32511
  Button$1,
32432
32512
  {
32433
32513
  style: { flexGrow: 3 },
@@ -33794,6 +33874,7 @@ This will work when developing locally but NOT when deployed to production.
33794
33874
  exports2.useScreenPlugin = useScreenPlugin;
33795
33875
  exports2.useTinaAuthRedirect = useTinaAuthRedirect;
33796
33876
  exports2.wrapFieldWithError = wrapFieldWithError;
33877
+ exports2.wrapFieldWithNoHeader = wrapFieldWithNoHeader;
33797
33878
  exports2.wrapFieldsWithMeta = wrapFieldsWithMeta;
33798
33879
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
33799
33880
  });
package/dist/index.mjs CHANGED
@@ -801,6 +801,22 @@ function wrapFieldsWithMeta(Field2) {
801
801
  );
802
802
  };
803
803
  }
804
+ function wrapFieldWithNoHeader(Field2) {
805
+ return (props) => {
806
+ return /* @__PURE__ */ React.createElement(
807
+ FieldMeta,
808
+ {
809
+ name: props.input.name,
810
+ label: false,
811
+ description: "",
812
+ error: props.meta.error,
813
+ index: props.index,
814
+ tinaForm: props.tinaForm
815
+ },
816
+ /* @__PURE__ */ React.createElement(Field2, { ...props })
817
+ );
818
+ };
819
+ }
804
820
  function wrapFieldWithError(Field2) {
805
821
  return (props) => {
806
822
  return /* @__PURE__ */ React.createElement(
@@ -877,9 +893,9 @@ const FieldDescription = ({
877
893
  "span",
878
894
  {
879
895
  className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0 ${className}`,
880
- ...props
881
- },
882
- children
896
+ ...props,
897
+ dangerouslySetInnerHTML: { __html: children }
898
+ }
883
899
  );
884
900
  };
885
901
  const FieldError = ({
@@ -5737,10 +5753,11 @@ const ItemDeleteButton = ({ onClick, disabled = false }) => {
5737
5753
  return /* @__PURE__ */ React__default.createElement(
5738
5754
  "button",
5739
5755
  {
5740
- 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"}`,
5756
+ type: "button",
5757
+ 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"}`,
5741
5758
  onClick
5742
5759
  },
5743
- /* @__PURE__ */ React__default.createElement(TrashIcon, { className: "fill-current transition-colors ease-out duration-100" })
5760
+ /* @__PURE__ */ React__default.createElement(TrashIcon, { className: "h-5 w-auto fill-current text-red-500 transition-colors duration-150 ease-out" })
5744
5761
  );
5745
5762
  };
5746
5763
  const DragHandle = ({ isDragging }) => {
@@ -5818,27 +5835,35 @@ const BlockSelector = ({
5818
5835
  ))))
5819
5836
  ))));
5820
5837
  };
5821
- const Group = wrapFieldWithError(({ tinaForm, field }) => {
5822
- const cms = useCMS$1();
5823
- React.useState(false);
5824
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
5825
- Header,
5826
- {
5827
- onClick: () => {
5828
- const state = tinaForm.finalForm.getState();
5829
- if (state.invalid === true) {
5830
- cms.alerts.error("Cannot navigate away from an invalid form.");
5831
- return;
5838
+ const Group = wrapFieldWithNoHeader(
5839
+ ({ tinaForm, field }) => {
5840
+ const cms = useCMS$1();
5841
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
5842
+ Header,
5843
+ {
5844
+ onClick: () => {
5845
+ const state = tinaForm.finalForm.getState();
5846
+ if (state.invalid === true) {
5847
+ cms.alerts.error("Cannot navigate away from an invalid form.");
5848
+ return;
5849
+ }
5850
+ cms.dispatch({
5851
+ type: "forms:set-active-field-name",
5852
+ value: { formId: tinaForm.id, fieldName: field.name }
5853
+ });
5832
5854
  }
5833
- cms.dispatch({
5834
- type: "forms:set-active-field-name",
5835
- value: { formId: tinaForm.id, fieldName: field.name }
5836
- });
5837
- }
5838
- },
5839
- field.label || field.name
5840
- ));
5841
- });
5855
+ },
5856
+ field.label || field.name,
5857
+ field.description && /* @__PURE__ */ React.createElement(
5858
+ "span",
5859
+ {
5860
+ className: `block font-sans text-xs italic font-light text-gray-400 pt-0.5 whitespace-normal m-0`,
5861
+ dangerouslySetInnerHTML: { __html: field.description }
5862
+ }
5863
+ )
5864
+ ));
5865
+ }
5866
+ );
5842
5867
  const Header = ({ onClick, children }) => {
5843
5868
  return /* @__PURE__ */ React.createElement("div", { className: "pt-1 mb-5" }, /* @__PURE__ */ React.createElement(
5844
5869
  "button",
@@ -10335,7 +10360,7 @@ const SyncStatus = ({ cms, setEventsOpen }) => {
10335
10360
  "Event Log"
10336
10361
  ));
10337
10362
  };
10338
- const version = "2.3.0";
10363
+ const version = "2.4.0";
10339
10364
  const Nav = ({
10340
10365
  isLocalMode,
10341
10366
  className = "",
@@ -14452,6 +14477,7 @@ function OverflowMenu({
14452
14477
  ToolbarButton,
14453
14478
  {
14454
14479
  showArrow: false,
14480
+ "data-testid": "rich-text-editor-overflow-menu-button",
14455
14481
  className: "lg:min-w-[130px]",
14456
14482
  isDropdown: true,
14457
14483
  pressed: openState.open,
@@ -14505,7 +14531,17 @@ const useRawMarkdownToolbarButton = () => {
14505
14531
  };
14506
14532
  const RawMarkdownToolbarButton = withRef(({ clear, ...rest }, ref) => {
14507
14533
  const { props } = useRawMarkdownToolbarButton();
14508
- return /* @__PURE__ */ React__default.createElement(ToolbarButton, { ref, tooltip: "Link", ...rest, ...props }, /* @__PURE__ */ React__default.createElement(Icons.raw, null));
14534
+ return /* @__PURE__ */ React__default.createElement(
14535
+ ToolbarButton,
14536
+ {
14537
+ ref,
14538
+ tooltip: "Link",
14539
+ ...rest,
14540
+ ...props,
14541
+ "data-testid": "markdown-button"
14542
+ },
14543
+ /* @__PURE__ */ React__default.createElement(Icons.raw, null)
14544
+ );
14509
14545
  });
14510
14546
  function TableDropdownMenu(props) {
14511
14547
  const tableSelected = useEditorSelector(
@@ -30104,6 +30140,7 @@ class TinaAdminApi {
30104
30140
  relativePath
30105
30141
  filename
30106
30142
  extension
30143
+ hasReferences
30107
30144
  }
30108
30145
  }
30109
30146
  }
@@ -30195,6 +30232,9 @@ class TinaAdminApi {
30195
30232
  document(collection:$collection, relativePath:$relativePath) {
30196
30233
  ... on Document {
30197
30234
  _values
30235
+ _sys {
30236
+ hasReferences
30237
+ }
30198
30238
  }
30199
30239
  }
30200
30240
  }`;
@@ -31921,6 +31961,23 @@ const CollectionListPage = () => {
31921
31961
  DeleteModal,
31922
31962
  {
31923
31963
  filename: vars.relativePath,
31964
+ checkRefsFunc: async () => {
31965
+ var _a2, _b2;
31966
+ try {
31967
+ const doc = await admin.fetchDocument(
31968
+ collection.name,
31969
+ vars.relativePath,
31970
+ true
31971
+ );
31972
+ return (_b2 = (_a2 = doc == null ? void 0 : doc.document) == null ? void 0 : _a2._sys) == null ? void 0 : _b2.hasReferences;
31973
+ } catch (error) {
31974
+ cms.alerts.error(
31975
+ "Document was not found, ask a developer for help or check the console for an error message"
31976
+ );
31977
+ console.error(error);
31978
+ throw error;
31979
+ }
31980
+ },
31924
31981
  deleteFunc: async () => {
31925
31982
  try {
31926
31983
  await admin.deleteDocument(vars);
@@ -31929,6 +31986,12 @@ const CollectionListPage = () => {
31929
31986
  );
31930
31987
  reFetchCollection();
31931
31988
  } catch (error) {
31989
+ if (error.message.indexOf("has references")) {
31990
+ cms.alerts.error(
31991
+ error.message.split("\n ").filter(Boolean)[1]
31992
+ );
31993
+ return;
31994
+ }
31932
31995
  cms.alerts.warn(
31933
31996
  "Document was not deleted, ask a developer for help or check the console for an error message"
31934
31997
  );
@@ -31980,6 +32043,12 @@ const CollectionListPage = () => {
31980
32043
  cms.alerts.info("Document was successfully renamed");
31981
32044
  reFetchCollection();
31982
32045
  } catch (error) {
32046
+ if (error.message.indexOf("has references")) {
32047
+ cms.alerts.error(
32048
+ error.message.split("\n ").filter(Boolean)[1]
32049
+ );
32050
+ return;
32051
+ }
31983
32052
  cms.alerts.warn(
31984
32053
  "Document was not renamed, ask a developer for help or check the console for an error message"
31985
32054
  );
@@ -32453,8 +32522,19 @@ const Breadcrumb = ({ folder, navigate, collectionName }) => {
32453
32522
  const NoDocumentsPlaceholder = () => {
32454
32523
  return /* @__PURE__ */ React__default.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__default.createElement("p", { className: "text-base italic font-medium text-gray-300" }, "No documents found."));
32455
32524
  };
32456
- const DeleteModal = ({ close: close2, deleteFunc, filename }) => {
32457
- return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("p", null, `Are you sure you want to delete ${filename}?`)), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
32525
+ const DeleteModal = ({
32526
+ close: close2,
32527
+ deleteFunc,
32528
+ checkRefsFunc,
32529
+ filename
32530
+ }) => {
32531
+ const [hasRefs, setHasRefs] = React__default.useState();
32532
+ useEffect(() => {
32533
+ checkRefsFunc().then((result) => {
32534
+ setHasRefs(result);
32535
+ });
32536
+ }, [filename, checkRefsFunc]);
32537
+ return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("p", null, `Are you sure you want to delete ${filename}?${hasRefs ? " References to this document will also be deleted." : ""}`)), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
32458
32538
  Button$1,
32459
32539
  {
32460
32540
  style: { flexGrow: 3 },
@@ -33816,5 +33896,6 @@ export {
33816
33896
  useScreenPlugin,
33817
33897
  useTinaAuthRedirect,
33818
33898
  wrapFieldWithError,
33899
+ wrapFieldWithNoHeader,
33819
33900
  wrapFieldsWithMeta
33820
33901
  };
@@ -3,6 +3,14 @@ import { FieldProps } from './field-props';
3
3
  import { Form } from '../../forms';
4
4
  export type InputFieldType<ExtraFieldProps, InputProps> = FieldProps<InputProps> & ExtraFieldProps;
5
5
  export declare function wrapFieldsWithMeta<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
6
+ /**
7
+ * Same as wrapFieldsWithMeta but excludes the label, and description useful for fields that render their label and description
8
+ */
9
+ export declare function wrapFieldWithNoHeader<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
10
+ /**
11
+ * Same as above but excludes the label, useful for fields that have their own label
12
+ * @deprecated This function is deprecated and will be removed in future versions.
13
+ */
6
14
  export declare function wrapFieldWithError<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
7
15
  interface FieldMetaProps extends React.HTMLAttributes<HTMLElement> {
8
16
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-ef282d9-20241024212433",
3
+ "version": "0.0.0-f3aa146-20241112221138",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -129,9 +129,9 @@
129
129
  "webfontloader": "1.6.28",
130
130
  "yup": "^1.4.0",
131
131
  "zod": "^3.23.8",
132
- "@tinacms/mdx": "0.0.0-ef282d9-20241024212433",
133
- "@tinacms/search": "0.0.0-ef282d9-20241024212433",
134
- "@tinacms/schema-tools": "0.0.0-ef282d9-20241024212433"
132
+ "@tinacms/mdx": "0.0.0-f3aa146-20241112221138",
133
+ "@tinacms/search": "0.0.0-f3aa146-20241112221138",
134
+ "@tinacms/schema-tools": "0.0.0-f3aa146-20241112221138"
135
135
  },
136
136
  "devDependencies": {
137
137
  "@graphql-tools/utils": "^10.5.4",
@@ -151,7 +151,7 @@
151
151
  "@types/react-color": "^3.0.12",
152
152
  "@types/react-dom": "^18.3.0",
153
153
  "@types/yup": "^0.32.0",
154
- "happy-dom": "^14.12.3",
154
+ "happy-dom": "15.10.2",
155
155
  "identity-obj-proxy": "^3.0.0",
156
156
  "isomorphic-fetch": "^3.0.0",
157
157
  "jest-file-snapshot": "^0.7.0",