@tinacms/app 2.5.14 → 2.5.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "2.5.14",
3
+ "version": "2.5.15",
4
4
  "main": "src/main.tsx",
5
5
  "files": [
6
6
  "src",
@@ -36,8 +36,8 @@
36
36
  "react-dom": "^18.3.1",
37
37
  "react-router-dom": "^6.30.3",
38
38
  "zod": "^3.24.2",
39
- "@tinacms/mdx": "^2.2.3",
40
- "tinacms": "^3.14.0"
39
+ "tinacms": "^3.14.4",
40
+ "@tinacms/mdx": "^2.3.0"
41
41
  },
42
42
  "repository": {
43
43
  "url": "https://github.com/tinacms/tinacms.git",
package/src/global.css CHANGED
@@ -45,8 +45,8 @@
45
45
  --tina-font-weight-regular: 400;
46
46
  --tina-font-weight-bold: 600;
47
47
 
48
- --tina-shadow-big: 0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px
49
- rgba(0, 0, 0, 0.1);
48
+ --tina-shadow-big:
49
+ 0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.1);
50
50
  --tina-shadow-small: 0px 2px 3px rgba(0, 0, 0, 0.12);
51
51
 
52
52
  --tina-timing-short: 85ms;
package/src/index.css CHANGED
@@ -28,16 +28,16 @@
28
28
  body {
29
29
  margin: 0;
30
30
  padding: 0;
31
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
32
- "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
33
- sans-serif;
31
+ font-family:
32
+ -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
33
+ "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
34
34
  -webkit-font-smoothing: antialiased;
35
35
  -moz-osx-font-smoothing: grayscale;
36
36
  }
37
37
 
38
38
  code {
39
- font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
40
- monospace;
39
+ font-family:
40
+ source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
41
41
  }
42
42
 
43
43
  div.graphiql-explorer-root > div:last-child {
@@ -18,11 +18,11 @@ import {
18
18
  TinaState,
19
19
  isSessionExpiredError,
20
20
  resolveField,
21
+ showErrorModal,
21
22
  useCMS,
22
23
  } from 'tinacms';
23
24
  import { z } from 'zod';
24
25
  import { FormifyCallback, createForm, createGlobalForm } from './build-form';
25
- import { showErrorModal } from './errors';
26
26
  import { expandQuery, isConnectionType, isNodeType } from './expand-query';
27
27
  import {
28
28
  getPreviewOrigin,
@@ -722,12 +722,13 @@ const onSubmit = async (
722
722
  } catch (e) {
723
723
  // request() already sent the user back to the login modal; no alert over it
724
724
  if (isSessionExpiredError(e)) throw e;
725
- cms.alerts.error(() =>
726
- ErrorDialog({
727
- title: 'There was a problem saving your document',
728
- message: 'Tina caught an error while updating the page',
729
- error: e,
730
- })
725
+ cms.alerts.error(
726
+ () =>
727
+ ErrorDialog({
728
+ message: 'Tina caught an error while updating the page',
729
+ error: e,
730
+ }),
731
+ { title: 'Save Failed' }
731
732
  );
732
733
  console.error(e);
733
734
  }
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- import { TinaCMS } from 'tinacms';
3
-
4
- const TROUBLESHOOTING_URL = 'https://tina.io/docs/tinacloud/troubleshooting';
5
-
6
- const ErrorModalContent = (props: { title: string; message: string }) => {
7
- const { title, message } = props;
8
- return (
9
- <>
10
- <div>{title}</div>
11
- <p>{message}</p>
12
- <a href={TROUBLESHOOTING_URL} target='_blank' rel='noopener noreferrer'>
13
- Try these troubleshooting tips
14
- </a>
15
- </>
16
- );
17
- };
18
-
19
- export const showErrorModal = (
20
- title: string,
21
- message: string,
22
- cms: TinaCMS
23
- ) => {
24
- if (cms.alerts.all.some((a: { level: string }) => a.level === 'error'))
25
- return;
26
- cms.alerts.error(() => <ErrorModalContent title={title} message={message} />);
27
- };