tinacms 1.6.4 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -27,9 +27,9 @@ import { EditContext, useEditState, setEditing } from "@tinacms/sharedctx";
27
27
  import get from "lodash.get";
28
28
  import moment from "moment";
29
29
  import { formatDistanceToNow } from "date-fns";
30
- import { useWindowWidth } from "@react-hook/window-size";
31
30
  import { isHotkey } from "is-hotkey";
32
31
  import { computePosition, flip, shift } from "@floating-ui/dom";
32
+ import { useWindowWidth } from "@react-hook/window-size";
33
33
  import { getIntrospectionQuery, buildClientSchema, print, parse as parse$3, buildSchema } from "graphql";
34
34
  import gql$1 from "graphql-tag";
35
35
  import { TinaSchema, addNamespaceToSchema, parseURL, resolveForm, normalizePath, validateSchema } from "@tinacms/schema-tools";
@@ -64,7 +64,7 @@ function useModalContainer() {
64
64
  return modalContainer;
65
65
  }
66
66
  const ModalOverlay = ({ children }) => {
67
- return /* @__PURE__ */ React.createElement("div", { className: "fixed inset-0 z-modal w-screen h-screen overflow-y-auto" }, children, /* @__PURE__ */ React.createElement("div", { className: "fixed -z-1 inset-0 opacity-80 bg-gradient-to-br from-gray-800 via-gray-900 to-black" }));
67
+ return /* @__PURE__ */ React.createElement("div", { className: "fixed inset-0 z-modal w-screen h-dvh overflow-y-auto" }, children, /* @__PURE__ */ React.createElement("div", { className: "fixed -z-1 inset-0 opacity-80 bg-gradient-to-br from-gray-800 via-gray-900 to-black" }));
68
68
  };
69
69
  const Modal = (props) => {
70
70
  const { portalNode } = useModalContainer();
@@ -2811,6 +2811,9 @@ function BiLogOut(props) {
2811
2811
  function BiMenu(props) {
2812
2812
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, "child": [] }] })(props);
2813
2813
  }
2814
+ function BiMovie(props) {
2815
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zm.001 6c-.001 0-.001 0 0 0h-.466l-2.667-4H20l.001 4zM9.535 9 6.868 5h2.597l2.667 4H9.535zm5 0-2.667-4h2.597l2.667 4h-2.597zM4 5h.465l2.667 4H4V5zm0 14v-8h16l.002 8H4z" }, "child": [] }] })(props);
2816
+ }
2814
2817
  function BiPencil(props) {
2815
2818
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M4 21a1 1 0 0 0 .24 0l4-1a1 1 0 0 0 .47-.26L21 7.41a2 2 0 0 0 0-2.82L19.42 3a2 2 0 0 0-2.83 0L4.3 15.29a1.06 1.06 0 0 0-.27.47l-1 4A1 1 0 0 0 3.76 21 1 1 0 0 0 4 21zM18 4.41 19.59 6 18 7.59 16.42 6zM5.91 16.51 15 7.41 16.59 9l-9.1 9.1-2.11.52z" }, "child": [] }] })(props);
2816
2819
  }
@@ -2895,13 +2898,13 @@ const Message = ({
2895
2898
  {
2896
2899
  className: `rounded-lg border shadow-sm ${sizeClasses[size]} ${containerClasses[type]} ${className}`
2897
2900
  },
2898
- /* @__PURE__ */ React__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React__default.createElement(
2901
+ /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React__default.createElement(
2899
2902
  MessageIcon,
2900
2903
  {
2901
2904
  type,
2902
2905
  className: `${size === "small" ? "w-5" : "w-6"} h-auto flex-shrink-0 ${iconClasses[type]}`
2903
2906
  }
2904
- ), /* @__PURE__ */ React__default.createElement("div", { className: `flex-1 ${textClasses[type]}` }, children), link && /* @__PURE__ */ React__default.createElement(
2907
+ ), /* @__PURE__ */ React__default.createElement("div", { className: `flex-1 ${textClasses[type]}` }, children)), link && /* @__PURE__ */ React__default.createElement(
2905
2908
  "a",
2906
2909
  {
2907
2910
  href: link,
@@ -3521,7 +3524,7 @@ const Select = ({
3521
3524
  ref.current.focus();
3522
3525
  }
3523
3526
  }, [field == null ? void 0 : field.experimental_focusIntent, ref]);
3524
- return /* @__PURE__ */ React.createElement("div", { className: "relative group" }, /* @__PURE__ */ React.createElement(
3527
+ return /* @__PURE__ */ React.createElement("div", { className: "relative group w-full md:w-auto" }, /* @__PURE__ */ React.createElement(
3525
3528
  "select",
3526
3529
  {
3527
3530
  id: input.name,
@@ -3723,6 +3726,9 @@ const dropzoneAcceptFromString = (str) => {
3723
3726
  const isImage = (filename) => {
3724
3727
  return /\.(gif|jpg|jpeg|tiff|png|svg|webp|avif)(\?.*)?$/i.test(filename);
3725
3728
  };
3729
+ const isVideo = (filename) => {
3730
+ return /\.(mp4|webm|ogg|m4v|mov|avi|flv|mkv)(\?.*)?$/i.test(filename);
3731
+ };
3726
3732
  const absoluteImgURL = (str) => {
3727
3733
  if (str.startsWith("http"))
3728
3734
  return str;
@@ -5878,6 +5884,8 @@ function onClickOutsideHOC(WrappedComponent, config) {
5878
5884
  handlersMap[_this._uid] = function(event) {
5879
5885
  if (_this.componentNode === null)
5880
5886
  return;
5887
+ if (_this.initTimeStamp > event.timeStamp)
5888
+ return;
5881
5889
  if (_this.props.preventDefault) {
5882
5890
  event.preventDefault();
5883
5891
  }
@@ -5914,6 +5922,7 @@ function onClickOutsideHOC(WrappedComponent, config) {
5914
5922
  return _this.instanceRef = ref;
5915
5923
  };
5916
5924
  _this._uid = uid();
5925
+ _this.initTimeStamp = performance.now();
5917
5926
  return _this;
5918
5927
  }
5919
5928
  var _proto = onClickOutside.prototype;
@@ -7696,6 +7705,7 @@ class TinaMediaStore {
7696
7705
  return fetch(input, init);
7697
7706
  };
7698
7707
  this.accept = DEFAULT_MEDIA_UPLOAD_TYPES;
7708
+ this.maxSize = 100 * 1024 * 1024;
7699
7709
  this.parse = (img) => {
7700
7710
  return img.src;
7701
7711
  };
@@ -7996,6 +8006,9 @@ let MediaManager$1 = class MediaManager {
7996
8006
  get accept() {
7997
8007
  return this.store.accept;
7998
8008
  }
8009
+ get maxSize() {
8010
+ return this.store.maxSize || void 0;
8011
+ }
7999
8012
  async persist(files) {
8000
8013
  try {
8001
8014
  this.events.dispatch({ type: "media:upload:start", uploaded: files });
@@ -8082,7 +8095,7 @@ class Flags {
8082
8095
  this.events.dispatch({ type: "flag:set", key, value });
8083
8096
  }
8084
8097
  }
8085
- const _CMS = class {
8098
+ const _CMS = class _CMS2 {
8086
8099
  /**
8087
8100
  * @hidden
8088
8101
  */
@@ -8094,11 +8107,11 @@ const _CMS = class {
8094
8107
  this.media = new MediaManager$1(new DummyMediaStore(), this.events);
8095
8108
  this.enable = () => {
8096
8109
  this._enabled = true;
8097
- this.events.dispatch(_CMS.ENABLED);
8110
+ this.events.dispatch(_CMS2.ENABLED);
8098
8111
  };
8099
8112
  this.disable = () => {
8100
8113
  this._enabled = false;
8101
- this.events.dispatch(_CMS.DISABLED);
8114
+ this.events.dispatch(_CMS2.DISABLED);
8102
8115
  };
8103
8116
  this.toggle = () => {
8104
8117
  if (this.enabled) {
@@ -8180,9 +8193,9 @@ const _CMS = class {
8180
8193
  return !this._enabled;
8181
8194
  }
8182
8195
  };
8196
+ _CMS.ENABLED = { type: "cms:enable" };
8197
+ _CMS.DISABLED = { type: "cms:disable" };
8183
8198
  let CMS = _CMS;
8184
- CMS.ENABLED = { type: "cms:enable" };
8185
- CMS.DISABLED = { type: "cms:disable" };
8186
8199
  let Alerts$1 = class Alerts {
8187
8200
  constructor(events, map = {}) {
8188
8201
  this.events = events;
@@ -9096,7 +9109,7 @@ const ResizeHandle = () => {
9096
9109
  const SidebarContext = React.createContext(null);
9097
9110
  const minPreviewWidth = 440;
9098
9111
  const minSidebarWidth = 360;
9099
- const navBreakpoint = 1e3;
9112
+ const navBreakpoint = 1279;
9100
9113
  const LOCALSTATEKEY = "tina.sidebarState";
9101
9114
  const LOCALWIDTHKEY = "tina.sidebarWidth";
9102
9115
  const defaultSidebarWidth = 440;
@@ -9567,12 +9580,12 @@ const SidebarWrapper = ({ children }) => {
9567
9580
  return /* @__PURE__ */ React.createElement(
9568
9581
  "div",
9569
9582
  {
9570
- className: `fixed top-0 left-0 h-screen z-base ${displayState === "closed" ? `pointer-events-none` : ``}`
9583
+ className: `fixed top-0 left-0 h-dvh z-base ${displayState === "closed" ? `pointer-events-none` : ``}`
9571
9584
  },
9572
9585
  /* @__PURE__ */ React.createElement(
9573
9586
  "div",
9574
9587
  {
9575
- className: `relative h-screen transform flex ${displayState !== "closed" ? `` : `-translate-x-full`} ${resizingSidebar ? `transition-none` : displayState === "closed" ? `transition-all duration-300 ease-in` : displayState === "fullscreen" ? `transition-all duration-150 ease-out` : `transition-all duration-300 ease-out`}`,
9588
+ className: `relative h-dvh transform flex ${displayState !== "closed" ? `` : `-translate-x-full`} ${resizingSidebar ? `transition-none` : displayState === "closed" ? `transition-all duration-300 ease-in` : displayState === "fullscreen" ? `transition-all duration-150 ease-out` : `transition-all duration-300 ease-out`}`,
9576
9589
  style: {
9577
9590
  width: displayState === "fullscreen" ? "100vw" : sidebarWidth + "px",
9578
9591
  maxWidth: displayState === "fullscreen" ? "100vw" : "calc(100vw - 8px)",
@@ -9639,7 +9652,12 @@ function CursorPaginator({
9639
9652
  return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex flex-shrink-0 justify-end gap-2 items-center" }, /* @__PURE__ */ React__default.createElement(Button, { variant, disabled: !hasPrev, onClick: navigatePrev }, /* @__PURE__ */ React__default.createElement(BiLeftArrowAlt, { className: "w-6 h-full mr-2 opacity-70" }), " Previous"), /* @__PURE__ */ React__default.createElement(Button, { variant, disabled: !hasNext, onClick: navigateNext }, "Next ", /* @__PURE__ */ React__default.createElement(BiRightArrowAlt, { className: "w-6 h-full ml-2 opacity-70" })));
9640
9653
  }
9641
9654
  function ListMediaItem({ item, onClick, active }) {
9642
- const FileIcon = item.type === "dir" ? BiFolder : BiFile;
9655
+ let FileIcon = BiFile;
9656
+ if (item.type === "dir") {
9657
+ FileIcon = BiFolder;
9658
+ } else if (isVideo(item.src)) {
9659
+ FileIcon = BiMovie;
9660
+ }
9643
9661
  const thumbnail = (item.thumbnails || {})["75x75"];
9644
9662
  return /* @__PURE__ */ React__default.createElement(
9645
9663
  "li",
@@ -9672,7 +9690,12 @@ function ListMediaItem({ item, onClick, active }) {
9672
9690
  );
9673
9691
  }
9674
9692
  function GridMediaItem({ item, active, onClick }) {
9675
- const FileIcon = item.type === "dir" ? BiFolder : BiFile;
9693
+ let FileIcon = BiFile;
9694
+ if (item.type === "dir") {
9695
+ FileIcon = BiFolder;
9696
+ } else if (isVideo(item.src)) {
9697
+ FileIcon = BiMovie;
9698
+ }
9676
9699
  const thumbnail = (item.thumbnails || {})["400x400"];
9677
9700
  return /* @__PURE__ */ React__default.createElement(
9678
9701
  "li",
@@ -9881,6 +9904,7 @@ function MediaPicker({
9881
9904
  close: close2,
9882
9905
  ...props
9883
9906
  }) {
9907
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
9884
9908
  const cms = useCMS();
9885
9909
  const [listState, setListState] = useState(() => {
9886
9910
  if (cms.media.isConfigured)
@@ -9975,10 +9999,14 @@ function MediaPicker({
9975
9999
  };
9976
10000
  }
9977
10001
  const [uploading, setUploading] = useState(false);
10002
+ const accept = Array.isArray(
10003
+ (_c = (_b = (_a = cms.api.tina.schema.schema) == null ? void 0 : _a.config) == null ? void 0 : _b.media) == null ? void 0 : _c.accept
10004
+ ) ? (_f = (_e = (_d = cms.api.tina.schema.schema) == null ? void 0 : _d.config) == null ? void 0 : _e.media) == null ? void 0 : _f.accept.join(",") : (_i = (_h = (_g = cms.api.tina.schema.schema) == null ? void 0 : _g.config) == null ? void 0 : _h.media) == null ? void 0 : _i.accept;
9978
10005
  const { getRootProps, getInputProps, isDragActive } = useDropzone({
9979
10006
  accept: dropzoneAcceptFromString(
9980
- cms.media.accept || DEFAULT_MEDIA_UPLOAD_TYPES
10007
+ accept || cms.media.accept || DEFAULT_MEDIA_UPLOAD_TYPES
9981
10008
  ),
10009
+ maxSize: cms.media.maxSize,
9982
10010
  multiple: true,
9983
10011
  onDrop: async (files, fileRejections) => {
9984
10012
  try {
@@ -11075,16 +11103,13 @@ const BranchBanner = () => {
11075
11103
  const openModal = () => setOpen(true);
11076
11104
  const { currentBranch } = useBranchData();
11077
11105
  const isProtected = cms.api.tina.usingProtectedBranch();
11078
- const navBreakpoint2 = 1e3;
11079
- const windowWidth = useWindowWidth();
11080
- const renderNavToggle = windowWidth < navBreakpoint2 + 1;
11081
11106
  const previewFunction = (_d = (_c = (_b = (_a = cms.api.tina.schema) == null ? void 0 : _a.config) == null ? void 0 : _b.config) == null ? void 0 : _c.ui) == null ? void 0 : _d.previewUrl;
11082
11107
  const branch = decodeURIComponent(cms.api.tina.branch);
11083
11108
  const previewUrl = previewFunction ? (_e = previewFunction({ branch })) == null ? void 0 : _e.url : null;
11084
11109
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
11085
11110
  "div",
11086
11111
  {
11087
- className: `w-full bg-white flex items-center gap-2 -mb-px border-b border-gray-100 py-3 pr-4 ${renderNavToggle ? "pl-20" : "pl-4"}`
11112
+ className: `w-full bg-white flex items-center gap-2 -mb-px border-b border-gray-100 py-3 pr-4 pl-20 xl:pl-4`
11088
11113
  },
11089
11114
  /* @__PURE__ */ React.createElement(
11090
11115
  Button,
@@ -11346,7 +11371,7 @@ const FormBuilder = ({
11346
11371
  );
11347
11372
  };
11348
11373
  const FormStatus = ({ pristine }) => {
11349
- return /* @__PURE__ */ React.createElement("div", { className: "flex flex-0 items-center" }, !pristine && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "w-3 h-3 flex-0 rounded-full bg-yellow-300 border border-yellow-400 mr-2" }), " ", /* @__PURE__ */ React.createElement("p", { className: "text-gray-500 text-xs leading-tight whitespace-nowrap" }, "Unsaved Changes")), pristine && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "w-3 h-3 flex-0 rounded-full bg-green-300 border border-green-400 mr-2" }), " ", /* @__PURE__ */ React.createElement("p", { className: "text-gray-500 text-xs leading-tight whitespace-nowrap" }, "No Changes")));
11374
+ return /* @__PURE__ */ React.createElement("div", { className: "flex flex-0 items-center" }, !pristine && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "text-gray-500 text-xs leading-tight whitespace-nowrap mr-2" }, "Unsaved Changes"), /* @__PURE__ */ React.createElement("span", { className: "w-3 h-3 flex-0 rounded-full bg-red-300 border border-red-400" }), " "), pristine && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "w-3 h-3 flex-0 rounded-full bg-green-300 border border-green-400" }), " "));
11350
11375
  };
11351
11376
  const FormWrapper = ({
11352
11377
  header,
@@ -11360,7 +11385,7 @@ const FormWrapper = ({
11360
11385
  className: "h-full overflow-y-auto max-h-full bg-gray-50"
11361
11386
  },
11362
11387
  header,
11363
- /* @__PURE__ */ React.createElement("div", { className: "py-5 px-6" }, /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-center" }, /* @__PURE__ */ React.createElement("div", { className: "w-full max-w-form" }, children)))
11388
+ /* @__PURE__ */ React.createElement("div", { className: "py-5 px-6 xl:px-12" }, /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-center" }, /* @__PURE__ */ React.createElement("div", { className: "w-full" }, children)))
11364
11389
  );
11365
11390
  };
11366
11391
  const Emoji = ({ className = "", ...props }) => /* @__PURE__ */ React.createElement(
@@ -13060,7 +13085,7 @@ const createInvalidMarkdownPlugin = createPluginFactory({
13060
13085
  function ErrorMessage({ error }) {
13061
13086
  const message = buildErrorMessage(error);
13062
13087
  const { setRawMode } = useEditorContext();
13063
- return /* @__PURE__ */ React__default.createElement("div", { contentEditable: false, className: "bg-red-50 sm:rounded-lg" }, /* @__PURE__ */ React__default.createElement("div", { className: "px-4 py-5 sm:p-6" }, /* @__PURE__ */ React__default.createElement("h3", { className: "text-lg leading-6 font-medium text-red-800" }, "Error parsing markdown"), /* @__PURE__ */ React__default.createElement("div", { className: "mt-2 max-w-xl text-sm text-red-800 space-y-4" }, /* @__PURE__ */ React__default.createElement("p", null, message), /* @__PURE__ */ React__default.createElement("p", null, "To fix these errors, edit the content in raw-mode."), /* @__PURE__ */ React__default.createElement(
13088
+ return /* @__PURE__ */ React__default.createElement("div", { contentEditable: false, className: "bg-red-50 sm:rounded-lg" }, /* @__PURE__ */ React__default.createElement("div", { className: "px-4 py-5 sm:p-6" }, /* @__PURE__ */ React__default.createElement("h3", { className: "text-lg leading-6 font-medium text-red-800" }, "Error parsing markdown"), /* @__PURE__ */ React__default.createElement("div", { className: "mt-2 max-w-xl text-sm text-red-800 space-y-4" }, /* @__PURE__ */ React__default.createElement("p", null, message), /* @__PURE__ */ React__default.createElement("p", null, "To fix these errors, edit the content in raw-mode."), /* @__PURE__ */ React__default.createElement(
13064
13089
  "button",
13065
13090
  {
13066
13091
  onClick: () => setRawMode(true),
@@ -28030,7 +28055,7 @@ const AuthWallInner = ({
28030
28055
  });
28031
28056
  }
28032
28057
  };
28033
- let modalTitle = "Tina Cloud Authorization";
28058
+ let modalTitle = "Tina Cloud";
28034
28059
  if (activeModal === "authenticate" && loginStrategy === "Redirect" && !isTinaCloud) {
28035
28060
  modalTitle = "Enter into edit mode";
28036
28061
  } else if (activeModal === "authenticate" && loginStrategy === "UsernamePassword") {
@@ -28046,20 +28071,12 @@ const AuthWallInner = ({
28046
28071
  ModalBuilder,
28047
28072
  {
28048
28073
  title: modalTitle,
28049
- message: isTinaCloud ? "To save edits, Tina Cloud authorization is required. On save, changes will get committed using your account." : "To save edits, enter into edit mode. On save, changes will saved to the local filesystem.",
28074
+ message: isTinaCloud ? "Your site uses Tina Cloud to track changes. To make edits, you must log in." : "To save edits, enter into edit mode. On save, changes will saved to the local filesystem.",
28050
28075
  close,
28051
28076
  actions: [
28052
28077
  ...otherModalActions,
28053
28078
  {
28054
- action: async () => {
28055
- setEditing(false);
28056
- window.location.reload();
28057
- },
28058
- name: "Close",
28059
- primary: false
28060
- },
28061
- {
28062
- name: isTinaCloud ? "Continue to Tina Cloud" : "Enter Edit Mode",
28079
+ name: isTinaCloud ? "Log in" : "Enter Edit Mode",
28063
28080
  action: handleAuthenticate,
28064
28081
  primary: true
28065
28082
  }
@@ -28597,7 +28614,7 @@ const TinaCMSProvider2 = ({
28597
28614
  !schema.config.contentApiUrlOverride
28598
28615
  ) {
28599
28616
  throw new Error(
28600
- "Invalid setup. See https://tina.io/docs/tina-cloud/connecting-site/ for more information."
28617
+ "Invalid setup. See https://tina.io/docs/tina-cloud/overview for more information."
28601
28618
  );
28602
28619
  }
28603
28620
  if (!schema) {
@@ -28813,7 +28830,7 @@ const Sidebar = ({ cms }) => {
28813
28830
  const cloudConfigs = cms.plugins.getType("cloud-config").all();
28814
28831
  const [menuIsOpen, setMenuIsOpen] = React__default.useState(false);
28815
28832
  const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
28816
- const navBreakpoint2 = 1e3;
28833
+ const navBreakpoint2 = 1279;
28817
28834
  const windowWidth = useWindowWidth();
28818
28835
  const renderDesktopNav = windowWidth > navBreakpoint2;
28819
28836
  const activeScreens = screens.filter(
@@ -29120,14 +29137,14 @@ const PageHeader = ({
29120
29137
  isLocalMode,
29121
29138
  children
29122
29139
  }) => {
29123
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, isLocalMode && /* @__PURE__ */ React__default.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-12 px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
29140
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, isLocalMode && /* @__PURE__ */ React__default.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-16 xl:pt-12 px-6 xl:px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex justify-between items-end" }, children))));
29124
29141
  };
29125
29142
  const PageBody = ({
29126
29143
  children
29127
- }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-8 px-12" }, children);
29144
+ }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-8 px-6 xl:px-12" }, children);
29128
29145
  const PageBodyNarrow = ({
29129
29146
  children
29130
- }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-10 px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
29147
+ }) => /* @__PURE__ */ React__default.createElement("div", { className: "py-10 px-6 xl:px-12" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, children));
29131
29148
  const DashboardPage = () => {
29132
29149
  return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
29133
29150
  var _a, _b;
@@ -29642,7 +29659,6 @@ const CollectionListPage = () => {
29642
29659
  },
29643
29660
  (collection, _loading, reFetchCollection, collectionExtra) => {
29644
29661
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
29645
- collection.documents.totalCount;
29646
29662
  const documents = collection.documents.edges;
29647
29663
  const admin = cms.api.admin;
29648
29664
  const pageInfo = collection.documents.pageInfo;
@@ -29776,7 +29792,7 @@ const CollectionListPage = () => {
29776
29792
  },
29777
29793
  close: () => setFolderModalOpen(false)
29778
29794
  }
29779
- ), /* @__PURE__ */ React__default.createElement(PageHeader, { isLocalMode: (_l = (_k = cms == null ? void 0 : cms.api) == null ? void 0 : _k.tina) == null ? void 0 : _l.isLocalMode }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full grid grid-flow-col items-end gap-4" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React__default.createElement("h3", { className: "font-sans text-2xl text-gray-700" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React__default.createElement("div", { className: "flex gap-4 items-start flex-wrap" }, (fields == null ? void 0 : fields.length) > 0 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !search && /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col gap-2 items-start" }, /* @__PURE__ */ React__default.createElement(
29795
+ ), /* @__PURE__ */ React__default.createElement(PageHeader, { isLocalMode: (_l = (_k = cms == null ? void 0 : cms.api) == null ? void 0 : _k.tina) == null ? void 0 : _l.isLocalMode }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full" }, /* @__PURE__ */ React__default.createElement("h3", { className: "font-sans text-2xl text-gray-700" }, collection.label ? collection.label : collection.name), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col lg:flex-row justify-between lg:items-end pt-2" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col md:flex-row gap-2 md:gap-4 items-start" }, (fields == null ? void 0 : fields.length) > 0 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !search && /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col gap-2 items-start w-full md:w-auto" }, /* @__PURE__ */ React__default.createElement(
29780
29796
  "label",
29781
29797
  {
29782
29798
  htmlFor: "sort",
@@ -29847,7 +29863,7 @@ const CollectionListPage = () => {
29847
29863
  size: "small"
29848
29864
  },
29849
29865
  "Search not configured."
29850
- ))))), /* @__PURE__ */ React__default.createElement("div", { className: "flex self-end justify-self-end" }, !collection.templates && allowCreate && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, allowCreateNestedFolder && /* @__PURE__ */ React__default.createElement(
29866
+ )))), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-2 md:gap-0 pt-4 lg:pt-0" }, !collection.templates && allowCreate && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, allowCreateNestedFolder && /* @__PURE__ */ React__default.createElement(
29851
29867
  Link,
29852
29868
  {
29853
29869
  onMouseDown: (evt) => {
@@ -29860,7 +29876,7 @@ const CollectionListPage = () => {
29860
29876
  evt.stopPropagation();
29861
29877
  },
29862
29878
  to: "/collections/new-folder",
29863
- className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-blue-500 bg-white hover:bg-[#f1f5f9] focus:ring-white focus:ring-blue-500 text-sm h-10 px-6 mr-4"
29879
+ className: "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-blue-500 bg-white hover:bg-[#f1f5f9] focus:ring-white focus:ring-blue-500 w-full md:w-auto text-sm h-10 px-6 mr-4"
29864
29880
  },
29865
29881
  /* @__PURE__ */ React__default.createElement(FaFolder, { className: "mr-2" }),
29866
29882
  "Add Folder",
@@ -29879,7 +29895,7 @@ const CollectionListPage = () => {
29879
29895
  "new",
29880
29896
  collectionName
29881
29897
  ].join("/")}`,
29882
- className: "inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-white bg-blue-500 hover:bg-blue-600 text-sm h-10 px-6"
29898
+ className: "inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded-full justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-white bg-blue-500 hover:bg-blue-600 w-full md:w-auto text-sm h-10 px-6"
29883
29899
  },
29884
29900
  /* @__PURE__ */ React__default.createElement(FaFile, { className: "mr-2" }),
29885
29901
  "Add Files",
@@ -29891,7 +29907,7 @@ const CollectionListPage = () => {
29891
29907
  templates: collection.templates,
29892
29908
  folder
29893
29909
  }
29894
- )))), /* @__PURE__ */ React__default.createElement(PageBody, null, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React__default.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React__default.createElement("em", null, "Sorting on a non-required field. Some documents may be excluded (if they don't have a value for", " ", sortName, ")")), (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React__default.createElement("table", { className: "table-auto shadow bg-white border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React__default.createElement("tbody", { className: "divide-y divide-gray-150" }, folder.name && !search ? /* @__PURE__ */ React__default.createElement("tr", null, /* @__PURE__ */ React__default.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React__default.createElement(
29910
+ ))))), /* @__PURE__ */ React__default.createElement(PageBody, null, /* @__PURE__ */ React__default.createElement("div", { className: "w-full mx-auto max-w-screen-xl" }, sortField && !sortField.required && /* @__PURE__ */ React__default.createElement("p", { className: "mb-4 text-gray-500" }, /* @__PURE__ */ React__default.createElement("em", null, "Sorting on a non-required field. Some documents may be excluded (if they don't have a value for", " ", sortName, ")")), /* @__PURE__ */ React__default.createElement("div", { className: "w-full overflow-x-auto" }, (folder.name && !search || documents.length > 0) && /* @__PURE__ */ React__default.createElement("table", { className: "table-auto shadow bg-white border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React__default.createElement("tbody", { className: "divide-y divide-gray-150" }, folder.name && !search ? /* @__PURE__ */ React__default.createElement("tr", null, /* @__PURE__ */ React__default.createElement("td", { colSpan: 5 }, /* @__PURE__ */ React__default.createElement(
29895
29911
  Breadcrumb,
29896
29912
  {
29897
29913
  folder,
@@ -29901,34 +29917,33 @@ const CollectionListPage = () => {
29901
29917
  ))) : null, documents.length > 0 && documents.map((document2) => {
29902
29918
  var _a2;
29903
29919
  if (document2.node.__typename === "Folder") {
29904
- return /* @__PURE__ */ React__default.createElement("tr", { key: `folder-${document2.node.path}` }, /* @__PURE__ */ React__default.createElement("td", { className: "pl-5 pr-3 py-3 truncate max-w-0" }, /* @__PURE__ */ React__default.createElement(
29905
- "a",
29906
- {
29907
- className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
29908
- onClick: () => {
29909
- navigate(
29910
- `/${[
29911
- "collections",
29912
- collectionName,
29913
- document2.node.path
29914
- ].join("/")}`,
29915
- { replace: true }
29916
- );
29917
- }
29918
- },
29919
- /* @__PURE__ */ React__default.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
29920
- /* @__PURE__ */ React__default.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Name"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block truncate" }, /* @__PURE__ */ React__default.createElement("span", null, document2.node.name)))
29921
- )), /* @__PURE__ */ React__default.createElement(
29922
- "td",
29920
+ return /* @__PURE__ */ React__default.createElement(
29921
+ "tr",
29923
29922
  {
29924
- className: "px-3 py-3 truncate max-w-0",
29925
- colSpan: 4
29923
+ key: `folder-${document2.node.path}`
29926
29924
  },
29927
- /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Path"),
29928
- /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900 truncate" }, document2.node.path.substring(2).split("/").map((node) => {
29925
+ /* @__PURE__ */ React__default.createElement("td", { className: "pl-5 pr-3 py-3" }, /* @__PURE__ */ React__default.createElement(
29926
+ "a",
29927
+ {
29928
+ className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer truncate",
29929
+ onClick: () => {
29930
+ navigate(
29931
+ `/${[
29932
+ "collections",
29933
+ collectionName,
29934
+ document2.node.path
29935
+ ].join("/")}`,
29936
+ { replace: true }
29937
+ );
29938
+ }
29939
+ },
29940
+ /* @__PURE__ */ React__default.createElement(BiFolder, { className: "inline-block h-6 w-auto flex-shrink-0 opacity-70" }),
29941
+ /* @__PURE__ */ React__default.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Name"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block truncate" }, /* @__PURE__ */ React__default.createElement("span", null, document2.node.name)))
29942
+ )),
29943
+ /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3", colSpan: 4 }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Path"), /* @__PURE__ */ React__default.createElement("span", { className: "leading-5 block text-sm font-medium text-gray-900 truncate" }, document2.node.path.substring(2).split("/").map((node) => {
29929
29944
  return /* @__PURE__ */ React__default.createElement("span", { key: node }, /* @__PURE__ */ React__default.createElement("span", { className: "text-gray-300 pr-0.5" }, "/"), /* @__PURE__ */ React__default.createElement("span", { className: "pr-0.5" }, node));
29930
- }))
29931
- ));
29945
+ })))
29946
+ );
29932
29947
  }
29933
29948
  const hasTitle = Boolean(
29934
29949
  document2.node._sys.title
@@ -29937,13 +29952,12 @@ const CollectionListPage = () => {
29937
29952
  return /* @__PURE__ */ React__default.createElement(
29938
29953
  "tr",
29939
29954
  {
29940
- key: `document-${document2.node._sys.relativePath}`,
29941
- className: ""
29955
+ key: `document-${document2.node._sys.relativePath}`
29942
29956
  },
29943
29957
  /* @__PURE__ */ React__default.createElement(
29944
29958
  "td",
29945
29959
  {
29946
- className: "pl-5 pr-3 py-3 truncate max-w-0",
29960
+ className: "pl-5 pr-3 py-3",
29947
29961
  colSpan: hasTitle ? 1 : 2
29948
29962
  },
29949
29963
  /* @__PURE__ */ React__default.createElement(
@@ -29964,9 +29978,9 @@ const CollectionListPage = () => {
29964
29978
  /* @__PURE__ */ React__default.createElement("span", { className: "truncate block" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, hasTitle ? "Title" : "Filename"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block truncate" }, !folderView && !hasTitle && subfolders && /* @__PURE__ */ React__default.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React__default.createElement("span", null, hasTitle ? (_a2 = document2.node._sys) == null ? void 0 : _a2.title : document2.node._sys.filename)))
29965
29979
  )
29966
29980
  ),
29967
- hasTitle && /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3 truncate max-w-0" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Filename"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900 truncate" }, !folderView && subfolders && /* @__PURE__ */ React__default.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React__default.createElement("span", null, document2.node._sys.filename))),
29968
- /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3 truncate w-[15%]" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Extension"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.extension)),
29969
- /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3 truncate w-[15%]" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Template"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.template)),
29981
+ hasTitle && /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Filename"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900 truncate" }, !folderView && subfolders && /* @__PURE__ */ React__default.createElement("span", { className: "text-xs text-gray-400" }, `${subfolders}/`), /* @__PURE__ */ React__default.createElement("span", null, document2.node._sys.filename))),
29982
+ /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Extension"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.extension)),
29983
+ /* @__PURE__ */ React__default.createElement("td", { className: "px-3 py-3" }, /* @__PURE__ */ React__default.createElement("span", { className: "block text-xs text-gray-400 mb-1 uppercase" }, "Template"), /* @__PURE__ */ React__default.createElement("span", { className: "h-5 leading-5 block text-sm font-medium text-gray-900" }, document2.node._sys.template)),
29970
29984
  /* @__PURE__ */ React__default.createElement("td", { className: "w-0" }, /* @__PURE__ */ React__default.createElement(
29971
29985
  OverflowMenu$1,
29972
29986
  {
@@ -30059,7 +30073,7 @@ const CollectionListPage = () => {
30059
30073
  }
30060
30074
  ))
30061
30075
  );
30062
- }))), documents.length === 0 && /* @__PURE__ */ React__default.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React__default.createElement(
30076
+ })))), documents.length === 0 && /* @__PURE__ */ React__default.createElement(NoDocumentsPlaceholder, null), /* @__PURE__ */ React__default.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React__default.createElement(
30063
30077
  CursorPaginator,
30064
30078
  {
30065
30079
  variant: "white",
@@ -30106,7 +30120,7 @@ const SearchInput = ({
30106
30120
  className: "block font-sans text-xs font-semibold text-gray-500 whitespace-normal"
30107
30121
  },
30108
30122
  "Search"
30109
- ), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-wrap items-center gap-3" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex-1 min-w-[200px]" }, /* @__PURE__ */ React__default.createElement(
30123
+ ), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col md:flex-row items-start md:items-center w-full md:w-auto gap-3" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex-1 min-w-[200px] w-full md:w-auto" }, /* @__PURE__ */ React__default.createElement(
30110
30124
  Input,
30111
30125
  {
30112
30126
  type: "text",
@@ -30117,14 +30131,15 @@ const SearchInput = ({
30117
30131
  setSearchInput(e.target.value);
30118
30132
  }
30119
30133
  }
30120
- )), /* @__PURE__ */ React__default.createElement("div", { className: "flex gap-3" }, /* @__PURE__ */ React__default.createElement(
30134
+ )), /* @__PURE__ */ React__default.createElement("div", { className: "flex w-full md:w-auto gap-3" }, /* @__PURE__ */ React__default.createElement(
30121
30135
  Button,
30122
30136
  {
30123
30137
  onClick: () => {
30124
30138
  setSearch(searchInput);
30125
30139
  setSearchLoaded(false);
30126
30140
  },
30127
- variant: "primary"
30141
+ variant: "primary",
30142
+ className: "w-full md:w-auto"
30128
30143
  },
30129
30144
  "Search ",
30130
30145
  /* @__PURE__ */ React__default.createElement(BiSearch, { className: "w-5 h-full ml-1.5 opacity-70" })
@@ -30544,10 +30559,6 @@ const RenderForm$1 = ({
30544
30559
  }
30545
30560
  });
30546
30561
  }, [cms, collection, mutationInfo]);
30547
- const navBreakpoint2 = 1e3;
30548
- const windowWidth = useWindowWidth();
30549
- const renderNavToggle = windowWidth < navBreakpoint2 + 1;
30550
- const headerPadding = renderNavToggle ? "px-20" : "px-6";
30551
30562
  React__default.useEffect(() => {
30552
30563
  cms.dispatch({ type: "forms:add", value: form });
30553
30564
  cms.dispatch({ type: "forms:set-active-form-id", value: form.id });
@@ -30565,9 +30576,9 @@ const RenderForm$1 = ({
30565
30576
  return /* @__PURE__ */ React__default.createElement(PageWrapper, null, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, ((_f = (_e = cms == null ? void 0 : cms.api) == null ? void 0 : _e.tina) == null ? void 0 : _f.isLocalMode) ? /* @__PURE__ */ React__default.createElement(LocalWarning, null) : /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement(
30566
30577
  "div",
30567
30578
  {
30568
- className: `pt-3 pb-4 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center ${headerPadding}`
30579
+ className: `pt-10 xl:pt-3 pb-10 xl:pb-4 px-20 xl:px-12 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center`
30569
30580
  },
30570
- /* @__PURE__ */ React__default.createElement("div", { className: "w-full max-w-form flex gap-1.5 justify-between items-center" }, /* @__PURE__ */ React__default.createElement(
30581
+ /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex gap-1.5 justify-between items-center" }, /* @__PURE__ */ React__default.createElement(
30571
30582
  Link,
30572
30583
  {
30573
30584
  to: `/collections/${collection.name}${folder.fullyQualifiedName ? `/${folder.fullyQualifiedName}` : ""}`,
@@ -30775,10 +30786,6 @@ const RenderForm = ({
30775
30786
  }
30776
30787
  });
30777
30788
  }, [cms, document2, relativePath2, collection, mutationInfo]);
30778
- const navBreakpoint2 = 1e3;
30779
- const windowWidth = useWindowWidth();
30780
- const renderNavToggle = windowWidth < navBreakpoint2 + 1;
30781
- const headerPadding = renderNavToggle ? "px-20" : "px-6";
30782
30789
  React__default.useEffect(() => {
30783
30790
  cms.dispatch({ type: "forms:add", value: form });
30784
30791
  cms.dispatch({ type: "forms:set-active-form-id", value: form.id });
@@ -30796,9 +30803,9 @@ const RenderForm = ({
30796
30803
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) ? /* @__PURE__ */ React__default.createElement(LocalWarning, null) : /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement(
30797
30804
  "div",
30798
30805
  {
30799
- className: `pt-3 pb-4 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center ${headerPadding}`
30806
+ className: `pt-10 xl:pt-3 pb-10 xl:pb-4 px-20 xl:px-12 border-b border-gray-200 bg-white w-full grow-0 shrink basis-0 flex justify-center`
30800
30807
  },
30801
- /* @__PURE__ */ React__default.createElement("div", { className: "w-full max-w-form flex gap-1.5 justify-between items-center" }, /* @__PURE__ */ React__default.createElement(
30808
+ /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex gap-1.5 justify-between items-center" }, /* @__PURE__ */ React__default.createElement(
30802
30809
  Link,
30803
30810
  {
30804
30811
  to: `/collections/${collection.name}/~${parentFolder2}`,
@@ -30810,16 +30817,19 @@ const RenderForm = ({
30810
30817
  };
30811
30818
  const ScreenPage = () => {
30812
30819
  const { screenName } = useParams();
30813
- const navBreakpoint2 = 1e3;
30814
- const windowWidth = useWindowWidth();
30815
- const renderNavToggle = windowWidth < navBreakpoint2 + 1;
30816
30820
  return /* @__PURE__ */ React__default.createElement(GetCMS, null, (cms) => {
30817
30821
  var _a, _b;
30818
30822
  const screens = cms.plugins.getType("screen").all();
30819
30823
  const selectedScreen = screens.find(
30820
30824
  ({ name }) => slugify(name) === screenName
30821
30825
  );
30822
- return /* @__PURE__ */ React__default.createElement("div", { className: "relative w-full h-full flex flex-col items-stretch justify-between" }, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) ? /* @__PURE__ */ React__default.createElement(LocalWarning, null) : /* @__PURE__ */ React__default.createElement(BillingWarning, null), renderNavToggle && /* @__PURE__ */ React__default.createElement("div", { className: `py-5 border-b border-gray-200 bg-white pl-18` }, selectedScreen.name), /* @__PURE__ */ React__default.createElement("div", { className: "flex-1 overflow-y-auto relative flex flex-col items-stretch justify-between" }, /* @__PURE__ */ React__default.createElement(selectedScreen.Component, { close: () => {
30826
+ return /* @__PURE__ */ React__default.createElement("div", { className: "relative w-full h-full flex flex-col items-stretch justify-between" }, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) ? /* @__PURE__ */ React__default.createElement(LocalWarning, null) : /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement(
30827
+ "div",
30828
+ {
30829
+ className: `xl:hidden py-5 border-b border-gray-200 bg-white pl-18`
30830
+ },
30831
+ selectedScreen.name
30832
+ ), /* @__PURE__ */ React__default.createElement("div", { className: "flex-1 overflow-y-auto relative flex flex-col items-stretch justify-between" }, /* @__PURE__ */ React__default.createElement(selectedScreen.Component, { close: () => {
30823
30833
  } })));
30824
30834
  });
30825
30835
  };
@@ -31193,7 +31203,7 @@ const DefaultWrapper = ({
31193
31203
  cms,
31194
31204
  children
31195
31205
  }) => {
31196
- return /* @__PURE__ */ React__default.createElement(Layout, null, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-stretch h-screen overflow-hidden" }, /* @__PURE__ */ React__default.createElement(Sidebar, { cms }), /* @__PURE__ */ React__default.createElement("div", { className: "w-full relative" }, children)));
31206
+ return /* @__PURE__ */ React__default.createElement(Layout, null, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-stretch h-dvh overflow-hidden" }, /* @__PURE__ */ React__default.createElement(Sidebar, { cms }), /* @__PURE__ */ React__default.createElement("div", { className: "w-full relative" }, children)));
31197
31207
  };
31198
31208
  const PlainLayout = ({ children }) => {
31199
31209
  return /* @__PURE__ */ React__default.createElement(
@@ -1,4 +1,5 @@
1
1
  export declare const DEFAULT_MEDIA_UPLOAD_TYPES: string;
2
2
  export declare const dropzoneAcceptFromString: (str: string) => any;
3
3
  export declare const isImage: (filename: string) => boolean;
4
+ export declare const isVideo: (filename: string) => boolean;
4
5
  export declare const absoluteImgURL: (str: string) => string;
@@ -34,6 +34,7 @@ export declare class TinaMediaStore implements MediaStore {
34
34
  setup(): void;
35
35
  isAuthenticated(): Promise<boolean>;
36
36
  accept: string;
37
+ maxSize: number;
37
38
  private persist_cloud;
38
39
  private persist_local;
39
40
  persist(media: MediaUploadOptions[]): Promise<Media[]>;
@@ -47,6 +47,10 @@ export interface MediaStore {
47
47
  * that describes what kind of files the Media Store will accept.
48
48
  */
49
49
  accept: string;
50
+ /**
51
+ * The maximum size of a file that can be uploaded.
52
+ */
53
+ maxSize?: number;
50
54
  /**
51
55
  * Uploads a set of files to the Media Store and
52
56
  * returns a Promise containing the Media objects
@@ -112,6 +116,7 @@ export declare class MediaManager implements MediaStore {
112
116
  set pageSize(pageSize: number);
113
117
  open(options?: SelectMediaOptions): void;
114
118
  get accept(): string;
119
+ get maxSize(): number;
115
120
  persist(files: MediaUploadOptions[]): Promise<Media[]>;
116
121
  delete(media: Media): Promise<void>;
117
122
  list(options: MediaListOptions): Promise<MediaList>;