tinacms 0.63.0 → 0.64.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # tinacms
2
2
 
3
+ ## 0.64.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4a3990c7e: Cloudinary media store now serves images over `https` by default. This can now be configured though the handler provided.
8
+
9
+ To revert to the old behavior:
10
+
11
+ ```ts
12
+ export default createMediaHandler(
13
+ {
14
+ // ...
15
+ },
16
+ {
17
+ useHttps: false,
18
+ }
19
+ )
20
+ ```
21
+
22
+ The default for `useHttps` is `true`
23
+
3
24
  ## 0.63.0
4
25
 
5
26
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- import { EventBus, StyleReset, Modal, ModalPopup, ModalHeader, ModalBody, ModalActions, Button, LoadingDots, useLocalStorage, TinaCMS, BranchSwitcherPlugin, BranchDataProvider, TinaProvider, useCMS, useBranchData, FormMetaPlugin, Form, GlobalFormPlugin, FullscreenFormBuilder } from "@tinacms/toolkit";
32
+ import { EventBus, Modal, ModalPopup, ModalHeader, ModalBody, ModalActions, Button, LoadingDots, useLocalStorage, TinaCMS, BranchSwitcherPlugin, BranchDataProvider, TinaProvider, useCMS, useBranchData, FormMetaPlugin, Form, GlobalFormPlugin, FullscreenFormBuilder } from "@tinacms/toolkit";
33
33
  export * from "@tinacms/toolkit";
34
34
  import { TypeInfo, visit, visitWithTypeInfo, getNamedType, GraphQLObjectType, isLeafType, GraphQLUnionType, isScalarType, getIntrospectionQuery, buildClientSchema, print } from "graphql";
35
35
  import set from "lodash.set";
@@ -633,11 +633,11 @@ class LocalClient extends Client {
633
633
  }
634
634
  }
635
635
  function ModalBuilder(modalProps) {
636
- return /* @__PURE__ */ React.createElement(StyleReset, null, /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, null, modalProps.title), /* @__PURE__ */ React.createElement(ModalBody, {
636
+ return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, null, modalProps.title), /* @__PURE__ */ React.createElement(ModalBody, {
637
637
  padded: true
638
638
  }, /* @__PURE__ */ React.createElement("p", null, modalProps.message), modalProps.error && /* @__PURE__ */ React.createElement(ErrorLabel, null, modalProps.error)), /* @__PURE__ */ React.createElement(ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React.createElement(AsyncButton, __spreadValues({
639
639
  key: action.name
640
- }, action)))))));
640
+ }, action))))));
641
641
  }
642
642
  const ErrorLabel = styled.p`
643
643
  color: var(--tina-color-error) !important;
@@ -1018,24 +1018,10 @@ function useGraphqlForms({
1018
1018
  name: "tina-admin-link",
1019
1019
  Component: () => /* @__PURE__ */ React.createElement("a", {
1020
1020
  href: `/admin/collections/${result._internalSys.collection.name}/${result._internalSys.filename}`,
1021
- style: {
1022
- display: "flex",
1023
- alignItems: "center",
1024
- padding: "10px 20px",
1025
- borderTop: "1px solid var(--tina-color-grey-2)",
1026
- textTransform: "uppercase",
1027
- fontSize: "11px",
1028
- fontWeight: 500,
1029
- background: "var(--tina-color-grey-0)"
1030
- }
1021
+ className: "flex items-center px-5 py-2 border-t border-b shadow border-gray-100 uppercase text-xs font-medium bg-white hover:bg-gray-50 hover:text-blue-500 transition-colors duration-100 ease-out"
1031
1022
  }, /* @__PURE__ */ React.createElement(BiLinkExternal, {
1032
- style: {
1033
- height: "1.25em",
1034
- width: "auto",
1035
- opacity: "0.8",
1036
- marginRight: "8px"
1037
- }
1038
- }), " ", "Edit in Tina Admin")
1023
+ className: "h-4 w-auto opacity-80 mr-2"
1024
+ }), " Edit in Tina Admin")
1039
1025
  });
1040
1026
  cms.plugins.add(TinaAdminLink);
1041
1027
  }
@@ -1163,8 +1149,8 @@ function useGraphqlForms({
1163
1149
  }, [queryString, JSON.stringify(variables), currentBranch]);
1164
1150
  return [data, isLoading];
1165
1151
  }
1166
- const transformDocumentIntoMutationRequestPayload = (document2, instructions) => {
1167
- const _a = document2, { _collection, __typename, _template } = _a, rest = __objRest(_a, ["_collection", "__typename", "_template"]);
1152
+ const transformDocumentIntoMutationRequestPayload = (document, instructions) => {
1153
+ const _a = document, { _collection, __typename, _template } = _a, rest = __objRest(_a, ["_collection", "__typename", "_template"]);
1168
1154
  const params = transformParams(rest);
1169
1155
  const paramsWithTemplate = instructions.includeTemplate ? { [_template]: params } : params;
1170
1156
  return instructions.includeCollection ? { [_collection]: paramsWithTemplate } : paramsWithTemplate;
@@ -1391,6 +1377,7 @@ const useDocumentCreatorPlugin = (args) => {
1391
1377
  };
1392
1378
  }, [plugin]);
1393
1379
  };
1380
+ var styles = ".tina-tailwind {\n\n /* gray-600 from tailwind config */\n}\n\n/**\nUse a better box model (opinionated).\n*/\n\n.tina-tailwind *,\n.tina-tailwind ::before,\n.tina-tailwind ::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n.tina-tailwind html {\n -moz-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\n.tina-tailwind html {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\nRemove the margin in all browsers.\n*/\n\n.tina-tailwind body {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\n.tina-tailwind body {\n font-family:\n system-ui,\n -apple-system, /* Firefox supports this but not yet `system-ui` */\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji';\n}\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\n.tina-tailwind hr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\n.tina-tailwind abbr[title] {\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\n.tina-tailwind b,\n.tina-tailwind strong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\n.tina-tailwind code,\n.tina-tailwind kbd,\n.tina-tailwind samp,\n.tina-tailwind pre {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Consolas,\n 'Liberation Mono',\n Menlo,\n monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\n.tina-tailwind small {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\n.tina-tailwind sub,\n.tina-tailwind sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\n/*\nText-level semantics\n====================\n*/\n\n.tina-tailwind sub {\n bottom: -0.25em;\n}\n\n/*\nGrouping content\n================\n*/\n\n.tina-tailwind sup {\n top: -0.5em;\n}\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\n.tina-tailwind table {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\n.tina-tailwind button,\n.tina-tailwind input,\n.tina-tailwind optgroup,\n.tina-tailwind select,\n.tina-tailwind textarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\n.tina-tailwind button,\n.tina-tailwind select { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\n.tina-tailwind button,\n.tina-tailwind [type='button'],\n.tina-tailwind [type='reset'],\n.tina-tailwind [type='submit'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n.tina-tailwind ::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n.tina-tailwind :-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n.tina-tailwind :-moz-ui-invalid {\n box-shadow: none;\n}\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\n.tina-tailwind legend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\n.tina-tailwind progress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n.tina-tailwind ::-webkit-inner-spin-button,\n.tina-tailwind ::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n.tina-tailwind [type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n.tina-tailwind ::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n.tina-tailwind ::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\n.tina-tailwind summary {\n display: list-item;\n}\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\n.tina-tailwind blockquote,\n.tina-tailwind dl,\n.tina-tailwind dd,\n.tina-tailwind h1,\n.tina-tailwind h2,\n.tina-tailwind h3,\n.tina-tailwind h4,\n.tina-tailwind h5,\n.tina-tailwind h6,\n.tina-tailwind hr,\n.tina-tailwind figure,\n.tina-tailwind p,\n.tina-tailwind pre {\n margin: 0;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n.tina-tailwind button {\n background-color: transparent;\n background-image: none;\n}\n\n/*\nInteractive\n===========\n*/\n\n.tina-tailwind fieldset {\n margin: 0;\n padding: 0;\n}\n\n/*\nForms\n=====\n*/\n\n.tina-tailwind ol,\n.tina-tailwind ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\n.tina-tailwind html {\n font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\n.tina-tailwind body {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n.tina-tailwind *,\n.tina-tailwind ::before,\n.tina-tailwind ::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\n.tina-tailwind hr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\n.tina-tailwind img {\n border-style: solid;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n.tina-tailwind textarea {\n resize: vertical;\n}\n\n/*\nTabular data\n============\n*/\n\n.tina-tailwind input::placeholder,\n.tina-tailwind textarea::placeholder {\n opacity: 1;\n color: #918c9e;\n}\n\n/*\nSections\n========\n*/\n\n.tina-tailwind button,\n.tina-tailwind [role=\"button\"] {\n cursor: pointer;\n}\n\n/**\n * Override legacy focus reset from Normalize with modern Firefox focus styles.\n *\n * This is actually an improvement over the new defaults in Firefox in our testing,\n * as it triggers the better focus styles even for links, which still use a dotted\n * outline in Firefox by default.\n */\n\n.tina-tailwind :-moz-focusring {\n outline: auto;\n}\n\n/*\nDocument\n========\n*/\n\n.tina-tailwind table {\n border-collapse: collapse;\n}\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n.tina-tailwind h1,\n.tina-tailwind h2,\n.tina-tailwind h3,\n.tina-tailwind h4,\n.tina-tailwind h5,\n.tina-tailwind h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\n.tina-tailwind a {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\n.tina-tailwind button,\n.tina-tailwind input,\n.tina-tailwind optgroup,\n.tina-tailwind select,\n.tina-tailwind textarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\n.tina-tailwind pre,\n.tina-tailwind code,\n.tina-tailwind kbd,\n.tina-tailwind samp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * 1. Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n * \n * 2. Add `vertical-align: middle` to align replaced elements more\n * sensibly by default when overriding `display` by adding a\n * utility like `inline`.\n *\n * This can trigger a poorly considered linting error in some\n * tools but is included by design.\n * \n * https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210\n */\n\n.tina-tailwind img,\n.tina-tailwind svg,\n.tina-tailwind video,\n.tina-tailwind canvas,\n.tina-tailwind audio,\n.tina-tailwind iframe,\n.tina-tailwind embed,\n.tina-tailwind object {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their intrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\n.tina-tailwind img,\n.tina-tailwind video {\n max-width: 100%;\n height: auto;\n}\n\n/**\n * Ensure the default browser behavior of the `hidden` attribute.\n */\n\n.tina-tailwind [hidden] {\n display: none;\n}\n\n/* ! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com */\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-border-opacity: 1;\n border-color: rgba(225, 221, 236, var(--tw-border-opacity));\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(0, 132, 255, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-blur: var(--tw-empty,/*!*/ /*!*/);\n --tw-brightness: var(--tw-empty,/*!*/ /*!*/);\n --tw-contrast: var(--tw-empty,/*!*/ /*!*/);\n --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);\n --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);\n --tw-invert: var(--tw-empty,/*!*/ /*!*/);\n --tw-saturate: var(--tw-empty,/*!*/ /*!*/);\n --tw-sepia: var(--tw-empty,/*!*/ /*!*/);\n --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);\n --tw-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.tina-tailwind .static {\n position: static !important;\n}\n\n.tina-tailwind .fixed {\n position: fixed !important;\n}\n\n.tina-tailwind .absolute {\n position: absolute !important;\n}\n\n.tina-tailwind .relative {\n position: relative !important;\n}\n\n.tina-tailwind .bottom-3 {\n bottom: 12px !important;\n}\n\n.tina-tailwind .right-5 {\n right: 20px !important;\n}\n\n.tina-tailwind .right-0 {\n right: 0px !important;\n}\n\n.tina-tailwind .z-50 {\n z-index: 50 !important;\n}\n\n.tina-tailwind .mr-2 {\n margin-right: 8px !important;\n}\n\n.tina-tailwind .-ml-1 {\n margin-left: -4px !important;\n}\n\n.tina-tailwind .mr-1\\.5 {\n margin-right: 6px !important;\n}\n\n.tina-tailwind .mr-1 {\n margin-right: 4px !important;\n}\n\n.tina-tailwind .mb-3 {\n margin-bottom: 12px !important;\n}\n\n.tina-tailwind .ml-1 {\n margin-left: 4px !important;\n}\n\n.tina-tailwind .mt-2 {\n margin-top: 8px !important;\n}\n\n.tina-tailwind .mt-8 {\n margin-top: 32px !important;\n}\n\n.tina-tailwind .mb-0\\.5 {\n margin-bottom: 2px !important;\n}\n\n.tina-tailwind .mb-0 {\n margin-bottom: 0px !important;\n}\n\n.tina-tailwind .block {\n display: block !important;\n}\n\n.tina-tailwind .inline-block {\n display: inline-block !important;\n}\n\n.tina-tailwind .flex {\n display: flex !important;\n}\n\n.tina-tailwind .inline-flex {\n display: inline-flex !important;\n}\n\n.tina-tailwind .table {\n display: table !important;\n}\n\n.tina-tailwind .h-screen {\n height: 100vh !important;\n}\n\n.tina-tailwind .h-4 {\n height: 16px !important;\n}\n\n.tina-tailwind .h-auto {\n height: auto !important;\n}\n\n.tina-tailwind .h-6 {\n height: 24px !important;\n}\n\n.tina-tailwind .h-5 {\n height: 20px !important;\n}\n\n.tina-tailwind .w-auto {\n width: auto !important;\n}\n\n.tina-tailwind .w-full {\n width: 100% !important;\n}\n\n.tina-tailwind .w-10 {\n width: 40px !important;\n}\n\n.tina-tailwind .w-80 {\n width: 320px !important;\n}\n\n.tina-tailwind .w-2\\/3 {\n width: 66.666667% !important;\n}\n\n.tina-tailwind .w-6 {\n width: 24px !important;\n}\n\n.tina-tailwind .w-56 {\n width: 224px !important;\n}\n\n.tina-tailwind .min-w-full {\n min-width: 100% !important;\n}\n\n.tina-tailwind .max-w-lg {\n max-width: 32rem !important;\n}\n\n.tina-tailwind .max-w-screen-md {\n max-width: 768px !important;\n}\n\n.tina-tailwind .max-w-xs {\n max-width: 20rem !important;\n}\n\n.tina-tailwind .flex-1 {\n flex: 1 1 0% !important;\n}\n\n.tina-tailwind .flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.tina-tailwind .origin-top-right {\n transform-origin: top right !important;\n}\n\n.tina-tailwind .translate-y-full {\n --tw-translate-y: 100% !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .-translate-y-2 {\n --tw-translate-y: -8px !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .translate-y-0 {\n --tw-translate-y: 0px !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .rotate-90 {\n --tw-rotate: 90deg !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .rotate-0 {\n --tw-rotate: 0deg !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .scale-95 {\n --tw-scale-x: .95 !important;\n --tw-scale-y: .95 !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .scale-100 {\n --tw-scale-x: 1 !important;\n --tw-scale-y: 1 !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .transform {\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .flex-col {\n flex-direction: column !important;\n}\n\n.tina-tailwind .items-end {\n align-items: flex-end !important;\n}\n\n.tina-tailwind .items-center {\n align-items: center !important;\n}\n\n.tina-tailwind .items-stretch {\n align-items: stretch !important;\n}\n\n.tina-tailwind .justify-start {\n justify-content: flex-start !important;\n}\n\n.tina-tailwind .justify-end {\n justify-content: flex-end !important;\n}\n\n.tina-tailwind .justify-center {\n justify-content: center !important;\n}\n\n.tina-tailwind .justify-between {\n justify-content: space-between !important;\n}\n\n.tina-tailwind .gap-0\\.5 {\n gap: 2px !important;\n}\n\n.tina-tailwind .gap-0 {\n gap: 0px !important;\n}\n\n.tina-tailwind .gap-4 {\n gap: 16px !important;\n}\n\n.tina-tailwind .gap-1 {\n gap: 4px !important;\n}\n\n.tina-tailwind .gap-3 {\n gap: 12px !important;\n}\n\n.tina-tailwind .gap-1\\.5 {\n gap: 6px !important;\n}\n\n.tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0 !important;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))) !important;\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse)) !important;\n}\n\n.tina-tailwind .overflow-hidden {\n overflow: hidden !important;\n}\n\n.tina-tailwind .overflow-y-auto {\n overflow-y: auto !important;\n}\n\n.tina-tailwind .overflow-ellipsis {\n text-overflow: ellipsis !important;\n}\n\n.tina-tailwind .whitespace-nowrap {\n white-space: nowrap !important;\n}\n\n.tina-tailwind .rounded-lg {\n border-radius: 8px !important;\n}\n\n.tina-tailwind .rounded-full {\n border-radius: 9999px !important;\n}\n\n.tina-tailwind .rounded-md {\n border-radius: 6px !important;\n}\n\n.tina-tailwind .border {\n border-width: 1px !important;\n}\n\n.tina-tailwind .border-t {\n border-top-width: 1px !important;\n}\n\n.tina-tailwind .border-b {\n border-bottom-width: 1px !important;\n}\n\n.tina-tailwind .border-r {\n border-right-width: 1px !important;\n}\n\n.tina-tailwind .border-gray-100 {\n --tw-border-opacity: 1 !important;\n border-color: rgba(237, 236, 243, var(--tw-border-opacity)) !important;\n}\n\n.tina-tailwind .border-gray-200 {\n --tw-border-opacity: 1 !important;\n border-color: rgba(225, 221, 236, var(--tw-border-opacity)) !important;\n}\n\n.tina-tailwind .border-transparent {\n border-color: transparent !important;\n}\n\n.tina-tailwind .bg-white {\n --tw-bg-opacity: 1 !important;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;\n}\n\n.tina-tailwind .bg-gray-50 {\n --tw-bg-opacity: 1 !important;\n background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;\n}\n\n.tina-tailwind .bg-transparent {\n background-color: transparent !important;\n}\n\n.tina-tailwind .bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important;\n}\n\n.tina-tailwind .from-blue-900 {\n --tw-gradient-from: #1D2C6C !important;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 44, 108, 0)) !important;\n}\n\n.tina-tailwind .from-white {\n --tw-gradient-from: #fff !important;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;\n}\n\n.tina-tailwind .to-gray-900 {\n --tw-gradient-to: #252336 !important;\n}\n\n.tina-tailwind .to-gray-50 {\n --tw-gradient-to: #F6F6F9 !important;\n}\n\n.tina-tailwind .px-5 {\n padding-left: 20px !important;\n padding-right: 20px !important;\n}\n\n.tina-tailwind .py-2 {\n padding-top: 8px !important;\n padding-bottom: 8px !important;\n}\n\n.tina-tailwind .px-4 {\n padding-left: 16px !important;\n padding-right: 16px !important;\n}\n\n.tina-tailwind .py-6 {\n padding-top: 24px !important;\n padding-bottom: 24px !important;\n}\n\n.tina-tailwind .py-4 {\n padding-top: 16px !important;\n padding-bottom: 16px !important;\n}\n\n.tina-tailwind .px-6 {\n padding-left: 24px !important;\n padding-right: 24px !important;\n}\n\n.tina-tailwind .py-1 {\n padding-top: 4px !important;\n padding-bottom: 4px !important;\n}\n\n.tina-tailwind .py-7 {\n padding-top: 28px !important;\n padding-bottom: 28px !important;\n}\n\n.tina-tailwind .px-8 {\n padding-left: 32px !important;\n padding-right: 32px !important;\n}\n\n.tina-tailwind .py-2\\.5 {\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n}\n\n.tina-tailwind .py-14 {\n padding-top: 56px !important;\n padding-bottom: 56px !important;\n}\n\n.tina-tailwind .py-3 {\n padding-top: 12px !important;\n padding-bottom: 12px !important;\n}\n\n.tina-tailwind .py-1\\.5 {\n padding-top: 6px !important;\n padding-bottom: 6px !important;\n}\n\n.tina-tailwind .py-10 {\n padding-top: 40px !important;\n padding-bottom: 40px !important;\n}\n\n.tina-tailwind .pt-16 {\n padding-top: 64px !important;\n}\n\n.tina-tailwind .pb-10 {\n padding-bottom: 40px !important;\n}\n\n.tina-tailwind .text-left {\n text-align: left !important;\n}\n\n.tina-tailwind .text-center {\n text-align: center !important;\n}\n\n.tina-tailwind .font-sans {\n font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !important;\n}\n\n.tina-tailwind .text-xs {\n font-size: 13px !important;\n line-height: 1.33 !important;\n}\n\n.tina-tailwind .text-2xl {\n font-size: 24px !important;\n line-height: 1.33 !important;\n}\n\n.tina-tailwind .text-base {\n font-size: 16px !important;\n line-height: 1.5 !important;\n}\n\n.tina-tailwind .text-lg {\n font-size: 18px !important;\n line-height: 1.55 !important;\n}\n\n.tina-tailwind .text-sm {\n font-size: 14px !important;\n line-height: 1.43 !important;\n}\n\n.tina-tailwind .text-3xl {\n font-size: 30px !important;\n line-height: 1.2 !important;\n}\n\n.tina-tailwind .text-4xl {\n font-size: 36px !important;\n line-height: 1.1 !important;\n}\n\n.tina-tailwind .font-medium {\n font-weight: 500 !important;\n}\n\n.tina-tailwind .font-bold {\n font-weight: 700 !important;\n}\n\n.tina-tailwind .uppercase {\n text-transform: uppercase !important;\n}\n\n.tina-tailwind .italic {\n font-style: italic !important;\n}\n\n.tina-tailwind .leading-normal {\n line-height: 1.5 !important;\n}\n\n.tina-tailwind .leading-4 {\n line-height: 16px !important;\n}\n\n.tina-tailwind .leading-5 {\n line-height: 20px !important;\n}\n\n.tina-tailwind .tracking-wide {\n letter-spacing: 0.025em !important;\n}\n\n.tina-tailwind .text-gray-700 {\n --tw-text-opacity: 1 !important;\n color: rgba(67, 62, 82, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-800 {\n --tw-text-opacity: 1 !important;\n color: rgba(54, 49, 69, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-600 {\n --tw-text-opacity: 1 !important;\n color: rgba(86, 81, 101, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-blue-400 {\n --tw-text-opacity: 1 !important;\n color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-blue-600 {\n --tw-text-opacity: 1 !important;\n color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-white {\n --tw-text-opacity: 1 !important;\n color: rgba(255, 255, 255, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-400 {\n --tw-text-opacity: 1 !important;\n color: rgba(145, 140, 158, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-300 {\n --tw-text-opacity: 1 !important;\n color: rgba(178, 173, 190, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-500 {\n --tw-text-opacity: 1 !important;\n color: rgba(113, 108, 127, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .underline {\n text-decoration: underline !important;\n}\n\n.tina-tailwind .opacity-80 {\n opacity: .8 !important;\n}\n\n.tina-tailwind .opacity-50 {\n opacity: .5 !important;\n}\n\n.tina-tailwind .opacity-100 {\n opacity: 1 !important;\n}\n\n.tina-tailwind .opacity-0 {\n opacity: 0 !important;\n}\n\n.tina-tailwind .opacity-90 {\n opacity: .9 !important;\n}\n\n.tina-tailwind .opacity-70 {\n opacity: .7 !important;\n}\n\n.tina-tailwind .shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;\n}\n\n.tina-tailwind .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;\n}\n\n.tina-tailwind .shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;\n}\n\n.tina-tailwind .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;\n}\n\n.tina-tailwind .ring-black {\n --tw-ring-opacity: 1 !important;\n --tw-ring-color: rgba(0, 0, 0, var(--tw-ring-opacity)) !important;\n}\n\n.tina-tailwind .ring-opacity-5 {\n --tw-ring-opacity: .05 !important;\n}\n\n.tina-tailwind .filter {\n filter: var(--tw-filter) !important;\n}\n\n.tina-tailwind .transition-colors {\n transition-property: background-color, border-color, color, fill, stroke !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .transition-opacity {\n transition-property: opacity !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .transition-all {\n transition-property: all !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .duration-100 {\n transition-duration: 100ms !important;\n}\n\n.tina-tailwind .duration-150 {\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .duration-300 {\n transition-duration: 300ms !important;\n}\n\n.tina-tailwind .duration-75 {\n transition-duration: 75ms !important;\n}\n\n.tina-tailwind .ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;\n}\n\n.tina-tailwind .ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n}\n\n.tina-tailwind .ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;\n}\n\n.tina-tailwind {\n color: #565165;\n}\n\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;\n}\n\n.hover\\:text-blue-500:hover {\n --tw-text-opacity: 1 !important;\n color: rgba(0, 132, 255, var(--tw-text-opacity)) !important;\n}\n\n.hover\\:text-blue-600:hover {\n --tw-text-opacity: 1 !important;\n color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;\n}\n\n.hover\\:opacity-100:hover {\n opacity: 1 !important;\n}\n\n.hover\\:opacity-80:hover {\n opacity: .8 !important;\n}\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent !important;\n outline-offset: 2px !important;\n}\n\n.group:hover .group-hover\\:opacity-100 {\n opacity: 1 !important;\n}\n\n.group:hover .group-hover\\:opacity-80 {\n opacity: .8 !important;\n}\n\n@media (min-width: 640px) {\n\n .sm\\:rounded-lg {\n border-radius: 8px !important;\n }\n}\n\n@media (min-width: 1024px) {\n\n .lg\\:w-96 {\n width: 384px !important;\n }\n}\n";
1394
1381
  const errorButtonStyles = {
1395
1382
  background: "#eb6337",
1396
1383
  padding: "12px 18px",
@@ -1506,7 +1493,8 @@ const TinaCMSProvider2 = (_c) => {
1506
1493
  if (typeof props.query === "string") {
1507
1494
  props.query;
1508
1495
  }
1509
- if (!props.apiURL && !((props == null ? void 0 : props.clientId) || (props == null ? void 0 : props.isLocalClient))) {
1496
+ const validOldSetup = new Boolean(props == null ? void 0 : props.isLocalClient) || new Boolean(props == null ? void 0 : props.clientId) && new Boolean(props == null ? void 0 : props.branch);
1497
+ if (!props.apiURL && !validOldSetup) {
1510
1498
  throw new Error(`apiURL is a required field`);
1511
1499
  }
1512
1500
  const { branch, clientId, isLocalClient } = props.apiURL ? parseURL(props.apiURL) : {
@@ -1521,7 +1509,7 @@ const TinaCMSProvider2 = (_c) => {
1521
1509
  isLocalClient,
1522
1510
  cmsCallback,
1523
1511
  mediaStore
1524
- }, props.query ? /* @__PURE__ */ React.createElement(SetupHooks, __spreadProps(__spreadValues({
1512
+ }, /* @__PURE__ */ React.createElement("style", null, styles), props.query ? /* @__PURE__ */ React.createElement(SetupHooks, __spreadProps(__spreadValues({
1525
1513
  key: props.query
1526
1514
  }, props), {
1527
1515
  query: props.query || ""
@@ -1671,7 +1659,8 @@ function gql(strings, ...args) {
1671
1659
  return str;
1672
1660
  }
1673
1661
  const Layout = ({ children }) => {
1674
- return /* @__PURE__ */ React.createElement("div", {
1662
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, styles), /* @__PURE__ */ React.createElement("div", {
1663
+ className: "tina-tailwind",
1675
1664
  style: {
1676
1665
  position: "fixed",
1677
1666
  top: 0,
@@ -1680,9 +1669,10 @@ const Layout = ({ children }) => {
1680
1669
  height: "100%",
1681
1670
  overflow: "auto",
1682
1671
  background: "#F6F6F9",
1672
+ fontFamily: "'Inter', sans-serif",
1683
1673
  zIndex: 9999
1684
1674
  }
1685
- }, children);
1675
+ }, children));
1686
1676
  };
1687
1677
  function ImFilesEmpty(props) {
1688
1678
  return GenIcon({ "tag": "svg", "attr": { "version": "1.1", "viewBox": "0 0 16 16" }, "child": [{ "tag": "path", "attr": { "d": "M14.341 5.579c-0.347-0.473-0.831-1.027-1.362-1.558s-1.085-1.015-1.558-1.362c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.689 0.561 1.25 1.25 1.25h9.5c0.689 0 1.25-0.561 1.25-1.25v-7.75c0-0.224-0.068-0.615-0.659-1.421zM12.271 4.729c0.48 0.48 0.856 0.912 1.134 1.271h-2.406v-2.405c0.359 0.278 0.792 0.654 1.271 1.134v0zM14 14.75c0 0.136-0.114 0.25-0.25 0.25h-9.5c-0.136 0-0.25-0.114-0.25-0.25v-11.5c0-0.135 0.114-0.25 0.25-0.25 0 0 5.749-0 5.75 0v3.5c0 0.276 0.224 0.5 0.5 0.5h3.5v7.75z" } }, { "tag": "path", "attr": { "d": "M9.421 0.659c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.604 0.43 1.109 1 1.225v-12.725c0-0.135 0.115-0.25 0.25-0.25h7.607c-0.151-0.124-0.297-0.238-0.437-0.341z" } }] })(props);
@@ -1997,37 +1987,37 @@ const CollectionListPage = () => {
1997
1987
  className: "min-w-full"
1998
1988
  }, /* @__PURE__ */ React.createElement("tbody", {
1999
1989
  className: "bg-white divide-y divide-gray-150"
2000
- }, documents.map((document2) => {
2001
- const livesiteRoute = routeMapping ? routeMapping.mapper(collection, document2.node) : void 0;
1990
+ }, documents.map((document) => {
1991
+ const livesiteRoute = routeMapping ? routeMapping.mapper(collection, document.node) : void 0;
2002
1992
  return /* @__PURE__ */ React.createElement("tr", {
2003
- key: document2.node.sys.relativePath
1993
+ key: document.node.sys.relativePath
2004
1994
  }, /* @__PURE__ */ React.createElement("td", {
2005
1995
  className: "px-5 py-3 whitespace-nowrap"
2006
1996
  }, /* @__PURE__ */ React.createElement("span", {
2007
1997
  className: "block text-xs mb-0.5 text-gray-400 uppercase"
2008
1998
  }, "Filename"), /* @__PURE__ */ React.createElement(Link, {
2009
- to: `${location2.pathname}/${document2.node.sys.filename}`,
1999
+ to: `${location2.pathname}/${document.node.sys.filename}`,
2010
2000
  className: "h-5 leading-5 flex max-w-xs"
2011
2001
  }, /* @__PURE__ */ React.createElement("span", {
2012
2002
  className: "flex-shrink-1 leading-5 font-medium text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-700"
2013
- }, document2.node.sys.filename), /* @__PURE__ */ React.createElement("span", {
2003
+ }, document.node.sys.filename), /* @__PURE__ */ React.createElement("span", {
2014
2004
  className: "flex-shrink-0 leading-5 text-base font-medium text-gray-300"
2015
- }, document2.node.sys.extension))), /* @__PURE__ */ React.createElement("td", {
2005
+ }, document.node.sys.extension))), /* @__PURE__ */ React.createElement("td", {
2016
2006
  className: "px-5 py-3 whitespace-nowrap"
2017
2007
  }, /* @__PURE__ */ React.createElement("span", {
2018
2008
  className: "block text-xs mb-0.5 text-gray-400 uppercase"
2019
2009
  }, "Template"), /* @__PURE__ */ React.createElement("span", {
2020
2010
  className: "h-5 block leading-5 font-regular text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-500"
2021
- }, document2.node.sys.template)), /* @__PURE__ */ React.createElement("td", {
2011
+ }, document.node.sys.template)), /* @__PURE__ */ React.createElement("td", {
2022
2012
  className: "px-5 py-3 whitespace-nowrap flex gap-3 items-center justify-end"
2023
2013
  }, livesiteRoute && /* @__PURE__ */ React.createElement("a", {
2024
2014
  href: livesiteRoute,
2025
- className: "flex gap-1.5 items-center px-4 py-1.5 rounded-full transition-all ease-out duration-150 text-gray-500 hover:text-blue-500"
2015
+ className: "flex gap-1.5 items-center text-base px-4 py-1.5 rounded-full transition-all ease-out duration-150 text-gray-500 hover:text-blue-500"
2026
2016
  }, /* @__PURE__ */ React.createElement(BiLinkExternal, {
2027
2017
  className: "inline-block h-5 w-auto opacity-70"
2028
2018
  }), " ", "View"), /* @__PURE__ */ React.createElement(Link, {
2029
- to: `${location2.pathname}/${document2.node.sys.filename}`,
2030
- className: "flex gap-1.5 items-center px-4 py-1.5 rounded-full border border-gray-150 transition-all ease-out duration-150 text-gray-700 hover:bg-gray-50 hover:text-blue-500"
2019
+ to: `${location2.pathname}/${document.node.sys.filename}`,
2020
+ className: "flex gap-1.5 items-center text-base px-4 py-1.5 rounded-full border border-gray-150 transition-all ease-out duration-150 text-gray-700 hover:bg-gray-50 hover:text-blue-500"
2031
2021
  }, /* @__PURE__ */ React.createElement(BiEdit, {
2032
2022
  className: "inline-block h-5 w-auto opacity-70"
2033
2023
  }), " ", "Edit")));
@@ -2090,10 +2080,8 @@ const createDocument = async (cms, collection, template, mutationInfo, values) =
2090
2080
  });
2091
2081
  await cms.api.tina.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
2092
2082
  createDocument(
2093
- collection: $collection,
2094
- relativePath: $relativePath,
2095
- params: $params
2096
- ){__typename}
2083
+ collection: $collection,
2084
+ relativePath: $relativePath,
2097
2085
  }`, {
2098
2086
  variables: {
2099
2087
  collection: collection.name,
@@ -2140,7 +2128,7 @@ const CollectionCreatePage = () => {
2140
2128
  }));
2141
2129
  };
2142
2130
  const useGetDocument = (cms, collectionName, relativePath) => {
2143
- const [document2, setDocument] = useState(void 0);
2131
+ const [document, setDocument] = useState(void 0);
2144
2132
  useEffect(() => {
2145
2133
  const fetchDocument = async () => {
2146
2134
  const response = await cms.api.tina.request(`
@@ -2156,7 +2144,7 @@ const useGetDocument = (cms, collectionName, relativePath) => {
2156
2144
  };
2157
2145
  fetchDocument();
2158
2146
  }, [cms, collectionName, relativePath]);
2159
- return document2;
2147
+ return document;
2160
2148
  };
2161
2149
  const GetDocument = ({
2162
2150
  cms,
@@ -2164,11 +2152,11 @@ const GetDocument = ({
2164
2152
  relativePath,
2165
2153
  children
2166
2154
  }) => {
2167
- const document2 = useGetDocument(cms, collectionName, relativePath);
2168
- if (!document2) {
2155
+ const document = useGetDocument(cms, collectionName, relativePath);
2156
+ if (!document) {
2169
2157
  return null;
2170
2158
  }
2171
- return /* @__PURE__ */ React.createElement(React.Fragment, null, children(document2));
2159
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, children(document));
2172
2160
  };
2173
2161
  const updateDocument = async (cms, relativePath, collection, mutationInfo, values) => {
2174
2162
  const { includeCollection, includeTemplate } = mutationInfo;
@@ -2202,12 +2190,12 @@ const CollectionUpdatePage = () => {
2202
2190
  cms,
2203
2191
  collectionName: collection.name,
2204
2192
  relativePath
2205
- }, (document2) => {
2193
+ }, (document) => {
2206
2194
  const form = new Form({
2207
2195
  id: "update-form",
2208
2196
  label: "form",
2209
- fields: document2.form.fields,
2210
- initialValues: document2.values,
2197
+ fields: document.form.fields,
2198
+ initialValues: document.values,
2211
2199
  onSubmit: async (values) => {
2212
2200
  await updateDocument(cms, relativePath, collection, mutationInfo, values);
2213
2201
  navigate(`/collections/${collection.name}`);
@@ -2224,20 +2212,6 @@ const CollectionUpdatePage = () => {
2224
2212
  });
2225
2213
  }));
2226
2214
  };
2227
- const useEmbedTailwind = () => {
2228
- useEffect(() => {
2229
- const isSSR = typeof window === "undefined";
2230
- if (!isSSR) {
2231
- const head = document.head;
2232
- const link = document.createElement("link");
2233
- link.id = "tina-admin-stylesheet";
2234
- link.type = "text/css";
2235
- link.rel = "stylesheet";
2236
- link.href = "https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css";
2237
- head.appendChild(link);
2238
- }
2239
- }, []);
2240
- };
2241
2215
  const Redirect = () => {
2242
2216
  React.useEffect(() => {
2243
2217
  if (window) {
@@ -2247,7 +2221,6 @@ const Redirect = () => {
2247
2221
  return null;
2248
2222
  };
2249
2223
  const TinaAdmin = () => {
2250
- useEmbedTailwind();
2251
2224
  const isSSR = typeof window === "undefined";
2252
2225
  const { edit } = useEditState();
2253
2226
  if (isSSR) {
package/dist/index.js CHANGED
@@ -653,11 +653,11 @@ mutation addPendingDocumentMutation(
653
653
  }
654
654
  }
655
655
  function ModalBuilder(modalProps) {
656
- return /* @__PURE__ */ React__default["default"].createElement(toolkit.StyleReset, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.Modal, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalPopup, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalHeader, null, modalProps.title), /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalBody, {
656
+ return /* @__PURE__ */ React__default["default"].createElement(toolkit.Modal, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalPopup, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalHeader, null, modalProps.title), /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalBody, {
657
657
  padded: true
658
658
  }, /* @__PURE__ */ React__default["default"].createElement("p", null, modalProps.message), modalProps.error && /* @__PURE__ */ React__default["default"].createElement(ErrorLabel, null, modalProps.error)), /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React__default["default"].createElement(AsyncButton, __spreadValues({
659
659
  key: action.name
660
- }, action)))))));
660
+ }, action))))));
661
661
  }
662
662
  const ErrorLabel = styled__default["default"].p`
663
663
  color: var(--tina-color-error) !important;
@@ -1038,24 +1038,10 @@ mutation addPendingDocumentMutation(
1038
1038
  name: "tina-admin-link",
1039
1039
  Component: () => /* @__PURE__ */ React__default["default"].createElement("a", {
1040
1040
  href: `/admin/collections/${result._internalSys.collection.name}/${result._internalSys.filename}`,
1041
- style: {
1042
- display: "flex",
1043
- alignItems: "center",
1044
- padding: "10px 20px",
1045
- borderTop: "1px solid var(--tina-color-grey-2)",
1046
- textTransform: "uppercase",
1047
- fontSize: "11px",
1048
- fontWeight: 500,
1049
- background: "var(--tina-color-grey-0)"
1050
- }
1041
+ className: "flex items-center px-5 py-2 border-t border-b shadow border-gray-100 uppercase text-xs font-medium bg-white hover:bg-gray-50 hover:text-blue-500 transition-colors duration-100 ease-out"
1051
1042
  }, /* @__PURE__ */ React__default["default"].createElement(BiLinkExternal, {
1052
- style: {
1053
- height: "1.25em",
1054
- width: "auto",
1055
- opacity: "0.8",
1056
- marginRight: "8px"
1057
- }
1058
- }), " ", "Edit in Tina Admin")
1043
+ className: "h-4 w-auto opacity-80 mr-2"
1044
+ }), " Edit in Tina Admin")
1059
1045
  });
1060
1046
  cms.plugins.add(TinaAdminLink);
1061
1047
  }
@@ -1183,8 +1169,8 @@ mutation addPendingDocumentMutation(
1183
1169
  }, [queryString, JSON.stringify(variables), currentBranch]);
1184
1170
  return [data, isLoading];
1185
1171
  }
1186
- const transformDocumentIntoMutationRequestPayload = (document2, instructions) => {
1187
- const _a = document2, { _collection, __typename, _template } = _a, rest = __objRest(_a, ["_collection", "__typename", "_template"]);
1172
+ const transformDocumentIntoMutationRequestPayload = (document, instructions) => {
1173
+ const _a = document, { _collection, __typename, _template } = _a, rest = __objRest(_a, ["_collection", "__typename", "_template"]);
1188
1174
  const params = transformParams(rest);
1189
1175
  const paramsWithTemplate = instructions.includeTemplate ? { [_template]: params } : params;
1190
1176
  return instructions.includeCollection ? { [_collection]: paramsWithTemplate } : paramsWithTemplate;
@@ -1411,6 +1397,7 @@ mutation addPendingDocumentMutation(
1411
1397
  };
1412
1398
  }, [plugin]);
1413
1399
  };
1400
+ var styles = ".tina-tailwind {\n\n /* gray-600 from tailwind config */\n}\n\n/**\nUse a better box model (opinionated).\n*/\n\n.tina-tailwind *,\n.tina-tailwind ::before,\n.tina-tailwind ::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n.tina-tailwind html {\n -moz-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\n.tina-tailwind html {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\nRemove the margin in all browsers.\n*/\n\n.tina-tailwind body {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\n.tina-tailwind body {\n font-family:\n system-ui,\n -apple-system, /* Firefox supports this but not yet `system-ui` */\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji';\n}\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\n.tina-tailwind hr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\n.tina-tailwind abbr[title] {\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\n.tina-tailwind b,\n.tina-tailwind strong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\n.tina-tailwind code,\n.tina-tailwind kbd,\n.tina-tailwind samp,\n.tina-tailwind pre {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Consolas,\n 'Liberation Mono',\n Menlo,\n monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\n.tina-tailwind small {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\n.tina-tailwind sub,\n.tina-tailwind sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\n/*\nText-level semantics\n====================\n*/\n\n.tina-tailwind sub {\n bottom: -0.25em;\n}\n\n/*\nGrouping content\n================\n*/\n\n.tina-tailwind sup {\n top: -0.5em;\n}\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\n.tina-tailwind table {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\n.tina-tailwind button,\n.tina-tailwind input,\n.tina-tailwind optgroup,\n.tina-tailwind select,\n.tina-tailwind textarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\n.tina-tailwind button,\n.tina-tailwind select { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\n.tina-tailwind button,\n.tina-tailwind [type='button'],\n.tina-tailwind [type='reset'],\n.tina-tailwind [type='submit'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n.tina-tailwind ::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n.tina-tailwind :-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n.tina-tailwind :-moz-ui-invalid {\n box-shadow: none;\n}\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\n.tina-tailwind legend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\n.tina-tailwind progress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n.tina-tailwind ::-webkit-inner-spin-button,\n.tina-tailwind ::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n.tina-tailwind [type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n.tina-tailwind ::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n.tina-tailwind ::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\n.tina-tailwind summary {\n display: list-item;\n}\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\n.tina-tailwind blockquote,\n.tina-tailwind dl,\n.tina-tailwind dd,\n.tina-tailwind h1,\n.tina-tailwind h2,\n.tina-tailwind h3,\n.tina-tailwind h4,\n.tina-tailwind h5,\n.tina-tailwind h6,\n.tina-tailwind hr,\n.tina-tailwind figure,\n.tina-tailwind p,\n.tina-tailwind pre {\n margin: 0;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n.tina-tailwind button {\n background-color: transparent;\n background-image: none;\n}\n\n/*\nInteractive\n===========\n*/\n\n.tina-tailwind fieldset {\n margin: 0;\n padding: 0;\n}\n\n/*\nForms\n=====\n*/\n\n.tina-tailwind ol,\n.tina-tailwind ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\n.tina-tailwind html {\n font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\n.tina-tailwind body {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n.tina-tailwind *,\n.tina-tailwind ::before,\n.tina-tailwind ::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\n.tina-tailwind hr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\n.tina-tailwind img {\n border-style: solid;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n.tina-tailwind textarea {\n resize: vertical;\n}\n\n/*\nTabular data\n============\n*/\n\n.tina-tailwind input::placeholder,\n.tina-tailwind textarea::placeholder {\n opacity: 1;\n color: #918c9e;\n}\n\n/*\nSections\n========\n*/\n\n.tina-tailwind button,\n.tina-tailwind [role=\"button\"] {\n cursor: pointer;\n}\n\n/**\n * Override legacy focus reset from Normalize with modern Firefox focus styles.\n *\n * This is actually an improvement over the new defaults in Firefox in our testing,\n * as it triggers the better focus styles even for links, which still use a dotted\n * outline in Firefox by default.\n */\n\n.tina-tailwind :-moz-focusring {\n outline: auto;\n}\n\n/*\nDocument\n========\n*/\n\n.tina-tailwind table {\n border-collapse: collapse;\n}\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n.tina-tailwind h1,\n.tina-tailwind h2,\n.tina-tailwind h3,\n.tina-tailwind h4,\n.tina-tailwind h5,\n.tina-tailwind h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\n.tina-tailwind a {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\n.tina-tailwind button,\n.tina-tailwind input,\n.tina-tailwind optgroup,\n.tina-tailwind select,\n.tina-tailwind textarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\n.tina-tailwind pre,\n.tina-tailwind code,\n.tina-tailwind kbd,\n.tina-tailwind samp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * 1. Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n * \n * 2. Add `vertical-align: middle` to align replaced elements more\n * sensibly by default when overriding `display` by adding a\n * utility like `inline`.\n *\n * This can trigger a poorly considered linting error in some\n * tools but is included by design.\n * \n * https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210\n */\n\n.tina-tailwind img,\n.tina-tailwind svg,\n.tina-tailwind video,\n.tina-tailwind canvas,\n.tina-tailwind audio,\n.tina-tailwind iframe,\n.tina-tailwind embed,\n.tina-tailwind object {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their intrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\n.tina-tailwind img,\n.tina-tailwind video {\n max-width: 100%;\n height: auto;\n}\n\n/**\n * Ensure the default browser behavior of the `hidden` attribute.\n */\n\n.tina-tailwind [hidden] {\n display: none;\n}\n\n/* ! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com */\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-border-opacity: 1;\n border-color: rgba(225, 221, 236, var(--tw-border-opacity));\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(0, 132, 255, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n\n.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {\n --tw-blur: var(--tw-empty,/*!*/ /*!*/);\n --tw-brightness: var(--tw-empty,/*!*/ /*!*/);\n --tw-contrast: var(--tw-empty,/*!*/ /*!*/);\n --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);\n --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);\n --tw-invert: var(--tw-empty,/*!*/ /*!*/);\n --tw-saturate: var(--tw-empty,/*!*/ /*!*/);\n --tw-sepia: var(--tw-empty,/*!*/ /*!*/);\n --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);\n --tw-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.tina-tailwind .static {\n position: static !important;\n}\n\n.tina-tailwind .fixed {\n position: fixed !important;\n}\n\n.tina-tailwind .absolute {\n position: absolute !important;\n}\n\n.tina-tailwind .relative {\n position: relative !important;\n}\n\n.tina-tailwind .bottom-3 {\n bottom: 12px !important;\n}\n\n.tina-tailwind .right-5 {\n right: 20px !important;\n}\n\n.tina-tailwind .right-0 {\n right: 0px !important;\n}\n\n.tina-tailwind .z-50 {\n z-index: 50 !important;\n}\n\n.tina-tailwind .mr-2 {\n margin-right: 8px !important;\n}\n\n.tina-tailwind .-ml-1 {\n margin-left: -4px !important;\n}\n\n.tina-tailwind .mr-1\\.5 {\n margin-right: 6px !important;\n}\n\n.tina-tailwind .mr-1 {\n margin-right: 4px !important;\n}\n\n.tina-tailwind .mb-3 {\n margin-bottom: 12px !important;\n}\n\n.tina-tailwind .ml-1 {\n margin-left: 4px !important;\n}\n\n.tina-tailwind .mt-2 {\n margin-top: 8px !important;\n}\n\n.tina-tailwind .mt-8 {\n margin-top: 32px !important;\n}\n\n.tina-tailwind .mb-0\\.5 {\n margin-bottom: 2px !important;\n}\n\n.tina-tailwind .mb-0 {\n margin-bottom: 0px !important;\n}\n\n.tina-tailwind .block {\n display: block !important;\n}\n\n.tina-tailwind .inline-block {\n display: inline-block !important;\n}\n\n.tina-tailwind .flex {\n display: flex !important;\n}\n\n.tina-tailwind .inline-flex {\n display: inline-flex !important;\n}\n\n.tina-tailwind .table {\n display: table !important;\n}\n\n.tina-tailwind .h-screen {\n height: 100vh !important;\n}\n\n.tina-tailwind .h-4 {\n height: 16px !important;\n}\n\n.tina-tailwind .h-auto {\n height: auto !important;\n}\n\n.tina-tailwind .h-6 {\n height: 24px !important;\n}\n\n.tina-tailwind .h-5 {\n height: 20px !important;\n}\n\n.tina-tailwind .w-auto {\n width: auto !important;\n}\n\n.tina-tailwind .w-full {\n width: 100% !important;\n}\n\n.tina-tailwind .w-10 {\n width: 40px !important;\n}\n\n.tina-tailwind .w-80 {\n width: 320px !important;\n}\n\n.tina-tailwind .w-2\\/3 {\n width: 66.666667% !important;\n}\n\n.tina-tailwind .w-6 {\n width: 24px !important;\n}\n\n.tina-tailwind .w-56 {\n width: 224px !important;\n}\n\n.tina-tailwind .min-w-full {\n min-width: 100% !important;\n}\n\n.tina-tailwind .max-w-lg {\n max-width: 32rem !important;\n}\n\n.tina-tailwind .max-w-screen-md {\n max-width: 768px !important;\n}\n\n.tina-tailwind .max-w-xs {\n max-width: 20rem !important;\n}\n\n.tina-tailwind .flex-1 {\n flex: 1 1 0% !important;\n}\n\n.tina-tailwind .flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.tina-tailwind .origin-top-right {\n transform-origin: top right !important;\n}\n\n.tina-tailwind .translate-y-full {\n --tw-translate-y: 100% !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .-translate-y-2 {\n --tw-translate-y: -8px !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .translate-y-0 {\n --tw-translate-y: 0px !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .rotate-90 {\n --tw-rotate: 90deg !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .rotate-0 {\n --tw-rotate: 0deg !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .scale-95 {\n --tw-scale-x: .95 !important;\n --tw-scale-y: .95 !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .scale-100 {\n --tw-scale-x: 1 !important;\n --tw-scale-y: 1 !important;\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .transform {\n transform: var(--tw-transform) !important;\n}\n\n.tina-tailwind .flex-col {\n flex-direction: column !important;\n}\n\n.tina-tailwind .items-end {\n align-items: flex-end !important;\n}\n\n.tina-tailwind .items-center {\n align-items: center !important;\n}\n\n.tina-tailwind .items-stretch {\n align-items: stretch !important;\n}\n\n.tina-tailwind .justify-start {\n justify-content: flex-start !important;\n}\n\n.tina-tailwind .justify-end {\n justify-content: flex-end !important;\n}\n\n.tina-tailwind .justify-center {\n justify-content: center !important;\n}\n\n.tina-tailwind .justify-between {\n justify-content: space-between !important;\n}\n\n.tina-tailwind .gap-0\\.5 {\n gap: 2px !important;\n}\n\n.tina-tailwind .gap-0 {\n gap: 0px !important;\n}\n\n.tina-tailwind .gap-4 {\n gap: 16px !important;\n}\n\n.tina-tailwind .gap-1 {\n gap: 4px !important;\n}\n\n.tina-tailwind .gap-3 {\n gap: 12px !important;\n}\n\n.tina-tailwind .gap-1\\.5 {\n gap: 6px !important;\n}\n\n.tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0 !important;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))) !important;\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse)) !important;\n}\n\n.tina-tailwind .overflow-hidden {\n overflow: hidden !important;\n}\n\n.tina-tailwind .overflow-y-auto {\n overflow-y: auto !important;\n}\n\n.tina-tailwind .overflow-ellipsis {\n text-overflow: ellipsis !important;\n}\n\n.tina-tailwind .whitespace-nowrap {\n white-space: nowrap !important;\n}\n\n.tina-tailwind .rounded-lg {\n border-radius: 8px !important;\n}\n\n.tina-tailwind .rounded-full {\n border-radius: 9999px !important;\n}\n\n.tina-tailwind .rounded-md {\n border-radius: 6px !important;\n}\n\n.tina-tailwind .border {\n border-width: 1px !important;\n}\n\n.tina-tailwind .border-t {\n border-top-width: 1px !important;\n}\n\n.tina-tailwind .border-b {\n border-bottom-width: 1px !important;\n}\n\n.tina-tailwind .border-r {\n border-right-width: 1px !important;\n}\n\n.tina-tailwind .border-gray-100 {\n --tw-border-opacity: 1 !important;\n border-color: rgba(237, 236, 243, var(--tw-border-opacity)) !important;\n}\n\n.tina-tailwind .border-gray-200 {\n --tw-border-opacity: 1 !important;\n border-color: rgba(225, 221, 236, var(--tw-border-opacity)) !important;\n}\n\n.tina-tailwind .border-transparent {\n border-color: transparent !important;\n}\n\n.tina-tailwind .bg-white {\n --tw-bg-opacity: 1 !important;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;\n}\n\n.tina-tailwind .bg-gray-50 {\n --tw-bg-opacity: 1 !important;\n background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;\n}\n\n.tina-tailwind .bg-transparent {\n background-color: transparent !important;\n}\n\n.tina-tailwind .bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important;\n}\n\n.tina-tailwind .from-blue-900 {\n --tw-gradient-from: #1D2C6C !important;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 44, 108, 0)) !important;\n}\n\n.tina-tailwind .from-white {\n --tw-gradient-from: #fff !important;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;\n}\n\n.tina-tailwind .to-gray-900 {\n --tw-gradient-to: #252336 !important;\n}\n\n.tina-tailwind .to-gray-50 {\n --tw-gradient-to: #F6F6F9 !important;\n}\n\n.tina-tailwind .px-5 {\n padding-left: 20px !important;\n padding-right: 20px !important;\n}\n\n.tina-tailwind .py-2 {\n padding-top: 8px !important;\n padding-bottom: 8px !important;\n}\n\n.tina-tailwind .px-4 {\n padding-left: 16px !important;\n padding-right: 16px !important;\n}\n\n.tina-tailwind .py-6 {\n padding-top: 24px !important;\n padding-bottom: 24px !important;\n}\n\n.tina-tailwind .py-4 {\n padding-top: 16px !important;\n padding-bottom: 16px !important;\n}\n\n.tina-tailwind .px-6 {\n padding-left: 24px !important;\n padding-right: 24px !important;\n}\n\n.tina-tailwind .py-1 {\n padding-top: 4px !important;\n padding-bottom: 4px !important;\n}\n\n.tina-tailwind .py-7 {\n padding-top: 28px !important;\n padding-bottom: 28px !important;\n}\n\n.tina-tailwind .px-8 {\n padding-left: 32px !important;\n padding-right: 32px !important;\n}\n\n.tina-tailwind .py-2\\.5 {\n padding-top: 10px !important;\n padding-bottom: 10px !important;\n}\n\n.tina-tailwind .py-14 {\n padding-top: 56px !important;\n padding-bottom: 56px !important;\n}\n\n.tina-tailwind .py-3 {\n padding-top: 12px !important;\n padding-bottom: 12px !important;\n}\n\n.tina-tailwind .py-1\\.5 {\n padding-top: 6px !important;\n padding-bottom: 6px !important;\n}\n\n.tina-tailwind .py-10 {\n padding-top: 40px !important;\n padding-bottom: 40px !important;\n}\n\n.tina-tailwind .pt-16 {\n padding-top: 64px !important;\n}\n\n.tina-tailwind .pb-10 {\n padding-bottom: 40px !important;\n}\n\n.tina-tailwind .text-left {\n text-align: left !important;\n}\n\n.tina-tailwind .text-center {\n text-align: center !important;\n}\n\n.tina-tailwind .font-sans {\n font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !important;\n}\n\n.tina-tailwind .text-xs {\n font-size: 13px !important;\n line-height: 1.33 !important;\n}\n\n.tina-tailwind .text-2xl {\n font-size: 24px !important;\n line-height: 1.33 !important;\n}\n\n.tina-tailwind .text-base {\n font-size: 16px !important;\n line-height: 1.5 !important;\n}\n\n.tina-tailwind .text-lg {\n font-size: 18px !important;\n line-height: 1.55 !important;\n}\n\n.tina-tailwind .text-sm {\n font-size: 14px !important;\n line-height: 1.43 !important;\n}\n\n.tina-tailwind .text-3xl {\n font-size: 30px !important;\n line-height: 1.2 !important;\n}\n\n.tina-tailwind .text-4xl {\n font-size: 36px !important;\n line-height: 1.1 !important;\n}\n\n.tina-tailwind .font-medium {\n font-weight: 500 !important;\n}\n\n.tina-tailwind .font-bold {\n font-weight: 700 !important;\n}\n\n.tina-tailwind .uppercase {\n text-transform: uppercase !important;\n}\n\n.tina-tailwind .italic {\n font-style: italic !important;\n}\n\n.tina-tailwind .leading-normal {\n line-height: 1.5 !important;\n}\n\n.tina-tailwind .leading-4 {\n line-height: 16px !important;\n}\n\n.tina-tailwind .leading-5 {\n line-height: 20px !important;\n}\n\n.tina-tailwind .tracking-wide {\n letter-spacing: 0.025em !important;\n}\n\n.tina-tailwind .text-gray-700 {\n --tw-text-opacity: 1 !important;\n color: rgba(67, 62, 82, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-800 {\n --tw-text-opacity: 1 !important;\n color: rgba(54, 49, 69, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-600 {\n --tw-text-opacity: 1 !important;\n color: rgba(86, 81, 101, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-blue-400 {\n --tw-text-opacity: 1 !important;\n color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-blue-600 {\n --tw-text-opacity: 1 !important;\n color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-white {\n --tw-text-opacity: 1 !important;\n color: rgba(255, 255, 255, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-400 {\n --tw-text-opacity: 1 !important;\n color: rgba(145, 140, 158, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-300 {\n --tw-text-opacity: 1 !important;\n color: rgba(178, 173, 190, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .text-gray-500 {\n --tw-text-opacity: 1 !important;\n color: rgba(113, 108, 127, var(--tw-text-opacity)) !important;\n}\n\n.tina-tailwind .underline {\n text-decoration: underline !important;\n}\n\n.tina-tailwind .opacity-80 {\n opacity: .8 !important;\n}\n\n.tina-tailwind .opacity-50 {\n opacity: .5 !important;\n}\n\n.tina-tailwind .opacity-100 {\n opacity: 1 !important;\n}\n\n.tina-tailwind .opacity-0 {\n opacity: 0 !important;\n}\n\n.tina-tailwind .opacity-90 {\n opacity: .9 !important;\n}\n\n.tina-tailwind .opacity-70 {\n opacity: .7 !important;\n}\n\n.tina-tailwind .shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;\n}\n\n.tina-tailwind .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;\n}\n\n.tina-tailwind .shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;\n}\n\n.tina-tailwind .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;\n}\n\n.tina-tailwind .ring-black {\n --tw-ring-opacity: 1 !important;\n --tw-ring-color: rgba(0, 0, 0, var(--tw-ring-opacity)) !important;\n}\n\n.tina-tailwind .ring-opacity-5 {\n --tw-ring-opacity: .05 !important;\n}\n\n.tina-tailwind .filter {\n filter: var(--tw-filter) !important;\n}\n\n.tina-tailwind .transition-colors {\n transition-property: background-color, border-color, color, fill, stroke !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .transition-opacity {\n transition-property: opacity !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .transition-all {\n transition-property: all !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .duration-100 {\n transition-duration: 100ms !important;\n}\n\n.tina-tailwind .duration-150 {\n transition-duration: 150ms !important;\n}\n\n.tina-tailwind .duration-300 {\n transition-duration: 300ms !important;\n}\n\n.tina-tailwind .duration-75 {\n transition-duration: 75ms !important;\n}\n\n.tina-tailwind .ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;\n}\n\n.tina-tailwind .ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n}\n\n.tina-tailwind .ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;\n}\n\n.tina-tailwind {\n color: #565165;\n}\n\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;\n}\n\n.hover\\:text-blue-500:hover {\n --tw-text-opacity: 1 !important;\n color: rgba(0, 132, 255, var(--tw-text-opacity)) !important;\n}\n\n.hover\\:text-blue-600:hover {\n --tw-text-opacity: 1 !important;\n color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;\n}\n\n.hover\\:opacity-100:hover {\n opacity: 1 !important;\n}\n\n.hover\\:opacity-80:hover {\n opacity: .8 !important;\n}\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent !important;\n outline-offset: 2px !important;\n}\n\n.group:hover .group-hover\\:opacity-100 {\n opacity: 1 !important;\n}\n\n.group:hover .group-hover\\:opacity-80 {\n opacity: .8 !important;\n}\n\n@media (min-width: 640px) {\n\n .sm\\:rounded-lg {\n border-radius: 8px !important;\n }\n}\n\n@media (min-width: 1024px) {\n\n .lg\\:w-96 {\n width: 384px !important;\n }\n}\n";
1414
1401
  const errorButtonStyles = {
1415
1402
  background: "#eb6337",
1416
1403
  padding: "12px 18px",
@@ -1526,7 +1513,8 @@ mutation addPendingDocumentMutation(
1526
1513
  if (typeof props.query === "string") {
1527
1514
  props.query;
1528
1515
  }
1529
- if (!props.apiURL && !((props == null ? void 0 : props.clientId) || (props == null ? void 0 : props.isLocalClient))) {
1516
+ const validOldSetup = new Boolean(props == null ? void 0 : props.isLocalClient) || new Boolean(props == null ? void 0 : props.clientId) && new Boolean(props == null ? void 0 : props.branch);
1517
+ if (!props.apiURL && !validOldSetup) {
1530
1518
  throw new Error(`apiURL is a required field`);
1531
1519
  }
1532
1520
  const { branch, clientId, isLocalClient } = props.apiURL ? parseURL(props.apiURL) : {
@@ -1541,7 +1529,7 @@ mutation addPendingDocumentMutation(
1541
1529
  isLocalClient,
1542
1530
  cmsCallback,
1543
1531
  mediaStore
1544
- }, props.query ? /* @__PURE__ */ React__default["default"].createElement(SetupHooks, __spreadProps(__spreadValues({
1532
+ }, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), props.query ? /* @__PURE__ */ React__default["default"].createElement(SetupHooks, __spreadProps(__spreadValues({
1545
1533
  key: props.query
1546
1534
  }, props), {
1547
1535
  query: props.query || ""
@@ -1691,7 +1679,8 @@ This will work when developing locally but NOT when deployed to production.
1691
1679
  return str;
1692
1680
  }
1693
1681
  const Layout = ({ children }) => {
1694
- return /* @__PURE__ */ React__default["default"].createElement("div", {
1682
+ return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), /* @__PURE__ */ React__default["default"].createElement("div", {
1683
+ className: "tina-tailwind",
1695
1684
  style: {
1696
1685
  position: "fixed",
1697
1686
  top: 0,
@@ -1700,9 +1689,10 @@ This will work when developing locally but NOT when deployed to production.
1700
1689
  height: "100%",
1701
1690
  overflow: "auto",
1702
1691
  background: "#F6F6F9",
1692
+ fontFamily: "'Inter', sans-serif",
1703
1693
  zIndex: 9999
1704
1694
  }
1705
- }, children);
1695
+ }, children));
1706
1696
  };
1707
1697
  function ImFilesEmpty(props) {
1708
1698
  return GenIcon({ "tag": "svg", "attr": { "version": "1.1", "viewBox": "0 0 16 16" }, "child": [{ "tag": "path", "attr": { "d": "M14.341 5.579c-0.347-0.473-0.831-1.027-1.362-1.558s-1.085-1.015-1.558-1.362c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.689 0.561 1.25 1.25 1.25h9.5c0.689 0 1.25-0.561 1.25-1.25v-7.75c0-0.224-0.068-0.615-0.659-1.421zM12.271 4.729c0.48 0.48 0.856 0.912 1.134 1.271h-2.406v-2.405c0.359 0.278 0.792 0.654 1.271 1.134v0zM14 14.75c0 0.136-0.114 0.25-0.25 0.25h-9.5c-0.136 0-0.25-0.114-0.25-0.25v-11.5c0-0.135 0.114-0.25 0.25-0.25 0 0 5.749-0 5.75 0v3.5c0 0.276 0.224 0.5 0.5 0.5h3.5v7.75z" } }, { "tag": "path", "attr": { "d": "M9.421 0.659c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.604 0.43 1.109 1 1.225v-12.725c0-0.135 0.115-0.25 0.25-0.25h7.607c-0.151-0.124-0.297-0.238-0.437-0.341z" } }] })(props);
@@ -2017,37 +2007,37 @@ This will work when developing locally but NOT when deployed to production.
2017
2007
  className: "min-w-full"
2018
2008
  }, /* @__PURE__ */ React__default["default"].createElement("tbody", {
2019
2009
  className: "bg-white divide-y divide-gray-150"
2020
- }, documents.map((document2) => {
2021
- const livesiteRoute = routeMapping ? routeMapping.mapper(collection, document2.node) : void 0;
2010
+ }, documents.map((document) => {
2011
+ const livesiteRoute = routeMapping ? routeMapping.mapper(collection, document.node) : void 0;
2022
2012
  return /* @__PURE__ */ React__default["default"].createElement("tr", {
2023
- key: document2.node.sys.relativePath
2013
+ key: document.node.sys.relativePath
2024
2014
  }, /* @__PURE__ */ React__default["default"].createElement("td", {
2025
2015
  className: "px-5 py-3 whitespace-nowrap"
2026
2016
  }, /* @__PURE__ */ React__default["default"].createElement("span", {
2027
2017
  className: "block text-xs mb-0.5 text-gray-400 uppercase"
2028
2018
  }, "Filename"), /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Link, {
2029
- to: `${location2.pathname}/${document2.node.sys.filename}`,
2019
+ to: `${location2.pathname}/${document.node.sys.filename}`,
2030
2020
  className: "h-5 leading-5 flex max-w-xs"
2031
2021
  }, /* @__PURE__ */ React__default["default"].createElement("span", {
2032
2022
  className: "flex-shrink-1 leading-5 font-medium text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-700"
2033
- }, document2.node.sys.filename), /* @__PURE__ */ React__default["default"].createElement("span", {
2023
+ }, document.node.sys.filename), /* @__PURE__ */ React__default["default"].createElement("span", {
2034
2024
  className: "flex-shrink-0 leading-5 text-base font-medium text-gray-300"
2035
- }, document2.node.sys.extension))), /* @__PURE__ */ React__default["default"].createElement("td", {
2025
+ }, document.node.sys.extension))), /* @__PURE__ */ React__default["default"].createElement("td", {
2036
2026
  className: "px-5 py-3 whitespace-nowrap"
2037
2027
  }, /* @__PURE__ */ React__default["default"].createElement("span", {
2038
2028
  className: "block text-xs mb-0.5 text-gray-400 uppercase"
2039
2029
  }, "Template"), /* @__PURE__ */ React__default["default"].createElement("span", {
2040
2030
  className: "h-5 block leading-5 font-regular text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-500"
2041
- }, document2.node.sys.template)), /* @__PURE__ */ React__default["default"].createElement("td", {
2031
+ }, document.node.sys.template)), /* @__PURE__ */ React__default["default"].createElement("td", {
2042
2032
  className: "px-5 py-3 whitespace-nowrap flex gap-3 items-center justify-end"
2043
2033
  }, livesiteRoute && /* @__PURE__ */ React__default["default"].createElement("a", {
2044
2034
  href: livesiteRoute,
2045
- className: "flex gap-1.5 items-center px-4 py-1.5 rounded-full transition-all ease-out duration-150 text-gray-500 hover:text-blue-500"
2035
+ className: "flex gap-1.5 items-center text-base px-4 py-1.5 rounded-full transition-all ease-out duration-150 text-gray-500 hover:text-blue-500"
2046
2036
  }, /* @__PURE__ */ React__default["default"].createElement(BiLinkExternal, {
2047
2037
  className: "inline-block h-5 w-auto opacity-70"
2048
2038
  }), " ", "View"), /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Link, {
2049
- to: `${location2.pathname}/${document2.node.sys.filename}`,
2050
- className: "flex gap-1.5 items-center px-4 py-1.5 rounded-full border border-gray-150 transition-all ease-out duration-150 text-gray-700 hover:bg-gray-50 hover:text-blue-500"
2039
+ to: `${location2.pathname}/${document.node.sys.filename}`,
2040
+ className: "flex gap-1.5 items-center text-base px-4 py-1.5 rounded-full border border-gray-150 transition-all ease-out duration-150 text-gray-700 hover:bg-gray-50 hover:text-blue-500"
2051
2041
  }, /* @__PURE__ */ React__default["default"].createElement(BiEdit, {
2052
2042
  className: "inline-block h-5 w-auto opacity-70"
2053
2043
  }), " ", "Edit")));
@@ -2110,10 +2100,8 @@ This will work when developing locally but NOT when deployed to production.
2110
2100
  });
2111
2101
  await cms.api.tina.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
2112
2102
  createDocument(
2113
- collection: $collection,
2114
- relativePath: $relativePath,
2115
- params: $params
2116
- ){__typename}
2103
+ collection: $collection,
2104
+ relativePath: $relativePath,
2117
2105
  }`, {
2118
2106
  variables: {
2119
2107
  collection: collection.name,
@@ -2160,7 +2148,7 @@ This will work when developing locally but NOT when deployed to production.
2160
2148
  }));
2161
2149
  };
2162
2150
  const useGetDocument = (cms, collectionName, relativePath) => {
2163
- const [document2, setDocument] = React.useState(void 0);
2151
+ const [document, setDocument] = React.useState(void 0);
2164
2152
  React.useEffect(() => {
2165
2153
  const fetchDocument = async () => {
2166
2154
  const response = await cms.api.tina.request(`
@@ -2176,7 +2164,7 @@ This will work when developing locally but NOT when deployed to production.
2176
2164
  };
2177
2165
  fetchDocument();
2178
2166
  }, [cms, collectionName, relativePath]);
2179
- return document2;
2167
+ return document;
2180
2168
  };
2181
2169
  const GetDocument = ({
2182
2170
  cms,
@@ -2184,11 +2172,11 @@ This will work when developing locally but NOT when deployed to production.
2184
2172
  relativePath,
2185
2173
  children
2186
2174
  }) => {
2187
- const document2 = useGetDocument(cms, collectionName, relativePath);
2188
- if (!document2) {
2175
+ const document = useGetDocument(cms, collectionName, relativePath);
2176
+ if (!document) {
2189
2177
  return null;
2190
2178
  }
2191
- return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(document2));
2179
+ return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(document));
2192
2180
  };
2193
2181
  const updateDocument = async (cms, relativePath, collection, mutationInfo, values) => {
2194
2182
  const { includeCollection, includeTemplate } = mutationInfo;
@@ -2222,12 +2210,12 @@ This will work when developing locally but NOT when deployed to production.
2222
2210
  cms,
2223
2211
  collectionName: collection.name,
2224
2212
  relativePath
2225
- }, (document2) => {
2213
+ }, (document) => {
2226
2214
  const form = new toolkit.Form({
2227
2215
  id: "update-form",
2228
2216
  label: "form",
2229
- fields: document2.form.fields,
2230
- initialValues: document2.values,
2217
+ fields: document.form.fields,
2218
+ initialValues: document.values,
2231
2219
  onSubmit: async (values) => {
2232
2220
  await updateDocument(cms, relativePath, collection, mutationInfo, values);
2233
2221
  navigate(`/collections/${collection.name}`);
@@ -2244,20 +2232,6 @@ This will work when developing locally but NOT when deployed to production.
2244
2232
  });
2245
2233
  }));
2246
2234
  };
2247
- const useEmbedTailwind = () => {
2248
- React.useEffect(() => {
2249
- const isSSR = typeof window === "undefined";
2250
- if (!isSSR) {
2251
- const head = document.head;
2252
- const link = document.createElement("link");
2253
- link.id = "tina-admin-stylesheet";
2254
- link.type = "text/css";
2255
- link.rel = "stylesheet";
2256
- link.href = "https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css";
2257
- head.appendChild(link);
2258
- }
2259
- }, []);
2260
- };
2261
2235
  const Redirect = () => {
2262
2236
  React__default["default"].useEffect(() => {
2263
2237
  if (window) {
@@ -2267,7 +2241,6 @@ This will work when developing locally but NOT when deployed to production.
2267
2241
  return null;
2268
2242
  };
2269
2243
  const TinaAdmin = () => {
2270
- useEmbedTailwind();
2271
2244
  const isSSR = typeof window === "undefined";
2272
2245
  const { edit } = sharedctx.useEditState();
2273
2246
  if (isSSR) {
package/dist/style.css CHANGED
@@ -1,7 +1,6 @@
1
- body {
2
- font-family: system-ui, -apple-system,
3
- /* Firefox supports this but not yet `system-ui` */ 'Segoe UI', Roboto,
4
- Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
1
+ .tina-tailwind {
2
+
3
+ /* gray-600 from tailwind config */
5
4
  }
6
5
 
7
6
  /**
@@ -562,8 +561,7 @@ Document
562
561
  display: none;
563
562
  }
564
563
 
565
- /*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com
566
- */
564
+ /* ! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com */
567
565
 
568
566
  .tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
569
567
  --tw-translate-x: 0;
@@ -610,152 +608,6 @@ Document
610
608
  --tw-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
611
609
  }
612
610
 
613
- .tina-tailwind [type='text'],.tina-tailwind [type='email'],.tina-tailwind [type='url'],.tina-tailwind [type='password'],.tina-tailwind [type='number'],.tina-tailwind [type='date'],.tina-tailwind [type='datetime-local'],.tina-tailwind [type='month'],.tina-tailwind [type='search'],.tina-tailwind [type='tel'],.tina-tailwind [type='time'],.tina-tailwind [type='week'],.tina-tailwind [multiple],.tina-tailwind textarea,.tina-tailwind select {
614
- appearance: none;
615
- background-color: #fff;
616
- border-color: #716c7f;
617
- border-width: 1px;
618
- border-radius: 0px;
619
- padding-top: 0.5rem;
620
- padding-right: 0.75rem;
621
- padding-bottom: 0.5rem;
622
- padding-left: 0.75rem;
623
- font-size: 1rem;
624
- line-height: 1.5rem;
625
- --tw-shadow: 0 0 #0000;
626
- }
627
-
628
- .tina-tailwind [type='text']:focus, .tina-tailwind [type='email']:focus, .tina-tailwind [type='url']:focus, .tina-tailwind [type='password']:focus, .tina-tailwind [type='number']:focus, .tina-tailwind [type='date']:focus, .tina-tailwind [type='datetime-local']:focus, .tina-tailwind [type='month']:focus, .tina-tailwind [type='search']:focus, .tina-tailwind [type='tel']:focus, .tina-tailwind [type='time']:focus, .tina-tailwind [type='week']:focus, .tina-tailwind [multiple]:focus, .tina-tailwind textarea:focus, .tina-tailwind select:focus {
629
- outline: 2px solid transparent;
630
- outline-offset: 2px;
631
- --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
632
- --tw-ring-offset-width: 0px;
633
- --tw-ring-offset-color: #fff;
634
- --tw-ring-color: #0574e4;
635
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
636
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
637
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
638
- border-color: #0574e4;
639
- }
640
-
641
- .tina-tailwind input::placeholder,.tina-tailwind textarea::placeholder {
642
- color: #716c7f;
643
- opacity: 1;
644
- }
645
-
646
- .tina-tailwind ::-webkit-datetime-edit-fields-wrapper {
647
- padding: 0;
648
- }
649
-
650
- .tina-tailwind ::-webkit-date-and-time-value {
651
- min-height: 1.5em;
652
- }
653
-
654
- .tina-tailwind select {
655
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23716c7f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
656
- background-position: right 0.5rem center;
657
- background-repeat: no-repeat;
658
- background-size: 1.5em 1.5em;
659
- padding-right: 2.5rem;
660
- color-adjust: exact;
661
- }
662
-
663
- .tina-tailwind [multiple] {
664
- background-image: initial;
665
- background-position: initial;
666
- background-repeat: unset;
667
- background-size: initial;
668
- padding-right: 0.75rem;
669
- color-adjust: unset;
670
- }
671
-
672
- .tina-tailwind [type='checkbox'],.tina-tailwind [type='radio'] {
673
- appearance: none;
674
- padding: 0;
675
- color-adjust: exact;
676
- display: inline-block;
677
- vertical-align: middle;
678
- background-origin: border-box;
679
- user-select: none;
680
- flex-shrink: 0;
681
- height: 1rem;
682
- width: 1rem;
683
- color: #0574e4;
684
- background-color: #fff;
685
- border-color: #716c7f;
686
- border-width: 1px;
687
- --tw-shadow: 0 0 #0000;
688
- }
689
-
690
- .tina-tailwind [type='checkbox'] {
691
- border-radius: 0px;
692
- }
693
-
694
- .tina-tailwind [type='radio'] {
695
- border-radius: 100%;
696
- }
697
-
698
- .tina-tailwind [type='checkbox']:focus,.tina-tailwind [type='radio']:focus {
699
- outline: 2px solid transparent;
700
- outline-offset: 2px;
701
- --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
702
- --tw-ring-offset-width: 2px;
703
- --tw-ring-offset-color: #fff;
704
- --tw-ring-color: #0574e4;
705
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
706
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
707
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
708
- }
709
-
710
- .tina-tailwind [type='checkbox']:checked,.tina-tailwind [type='radio']:checked {
711
- border-color: transparent;
712
- background-color: currentColor;
713
- background-size: 100% 100%;
714
- background-position: center;
715
- background-repeat: no-repeat;
716
- }
717
-
718
- .tina-tailwind [type='checkbox']:checked {
719
- background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
720
- }
721
-
722
- .tina-tailwind [type='radio']:checked {
723
- background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
724
- }
725
-
726
- .tina-tailwind [type='checkbox']:checked:hover,.tina-tailwind [type='checkbox']:checked:focus,.tina-tailwind [type='radio']:checked:hover,.tina-tailwind [type='radio']:checked:focus {
727
- border-color: transparent;
728
- background-color: currentColor;
729
- }
730
-
731
- .tina-tailwind [type='checkbox']:indeterminate {
732
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
733
- border-color: transparent;
734
- background-color: currentColor;
735
- background-size: 100% 100%;
736
- background-position: center;
737
- background-repeat: no-repeat;
738
- }
739
-
740
- .tina-tailwind [type='checkbox']:indeterminate:hover,.tina-tailwind [type='checkbox']:indeterminate:focus {
741
- border-color: transparent;
742
- background-color: currentColor;
743
- }
744
-
745
- .tina-tailwind [type='file'] {
746
- background: unset;
747
- border-color: inherit;
748
- border-width: 0;
749
- border-radius: 0;
750
- padding: 0;
751
- font-size: unset;
752
- line-height: inherit;
753
- }
754
-
755
- .tina-tailwind [type='file']:focus {
756
- outline: 1px auto -webkit-focus-ring-color;
757
- }
758
-
759
611
  .tina-tailwind .static {
760
612
  position: static !important;
761
613
  }
@@ -900,14 +752,18 @@ Document
900
752
  min-width: 100% !important;
901
753
  }
902
754
 
903
- .tina-tailwind .max-w-md {
904
- max-width: 28rem !important;
755
+ .tina-tailwind .max-w-lg {
756
+ max-width: 32rem !important;
905
757
  }
906
758
 
907
759
  .tina-tailwind .max-w-screen-md {
908
760
  max-width: 768px !important;
909
761
  }
910
762
 
763
+ .tina-tailwind .max-w-xs {
764
+ max-width: 20rem !important;
765
+ }
766
+
911
767
  .tina-tailwind .flex-1 {
912
768
  flex: 1 1 0% !important;
913
769
  }
@@ -1433,6 +1289,10 @@ Document
1433
1289
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;
1434
1290
  }
1435
1291
 
1292
+ .tina-tailwind {
1293
+ color: #565165;
1294
+ }
1295
+
1436
1296
  .hover\:bg-gray-50:hover {
1437
1297
  --tw-bg-opacity: 1 !important;
1438
1298
  background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.63.0",
3
+ "version": "0.64.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"