@tinacms/app 0.0.0-e0bbd2e-20251203224419 → 0.0.0-e103e06-20260512091702

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,11 +1,224 @@
1
1
  # @tinacms/app
2
2
 
3
- ## 0.0.0-e0bbd2e-20251203224419
3
+ ## 0.0.0-e103e06-20260512091702
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`50fa9f4`](https://github.com/tinacms/tinacms/commit/50fa9f4bf932a3dc45b88d245e35917efe8d3423), [`428ec7e`](https://github.com/tinacms/tinacms/commit/428ec7eca20603e2cb666d562fd4cc16dda4cbed), [`6946476`](https://github.com/tinacms/tinacms/commit/69464767d339a5df3c6c530ece94ef80049e534f), [`f99bbbc`](https://github.com/tinacms/tinacms/commit/f99bbbc221eead8d714b3791348d415dd8fcd063), [`429f01a`](https://github.com/tinacms/tinacms/commit/429f01a16366778277515d7462a064e56358606e)]:
8
- - tinacms@0.0.0-e0bbd2e-20251203224419
7
+ - Updated dependencies []:
8
+ - tinacms@0.0.0-e103e06-20260512091702
9
+
10
+ ## 2.4.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`723632b`](https://github.com/tinacms/tinacms/commit/723632b050b1e9502c46215fd6e8e548cc108ac0), [`95758a0`](https://github.com/tinacms/tinacms/commit/95758a0ad31ec96aa652f247211a769e82a37cbb), [`9e7eba9`](https://github.com/tinacms/tinacms/commit/9e7eba9f290c935cd56569421de88b5adfac65d8)]:
15
+ - tinacms@3.8.0
16
+
17
+ ## 2.4.6
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`3e4dcc7`](https://github.com/tinacms/tinacms/commit/3e4dcc76d5fb89ec900b778cb7e82f3aa3ed6501), [`3da4588`](https://github.com/tinacms/tinacms/commit/3da45887c23da552a4bd994154eeaaf8990065f7), [`b37187d`](https://github.com/tinacms/tinacms/commit/b37187d46b6e1a274db7ab79372f02aaa2ef992d), [`84ec7ad`](https://github.com/tinacms/tinacms/commit/84ec7adea7a1d8015cf1430fe804886493c5ae21), [`28b869a`](https://github.com/tinacms/tinacms/commit/28b869a0d2c9b2a608e1076b6dea24bd3e01ac31)]:
22
+ - tinacms@3.7.6
23
+ - @tinacms/mdx@2.1.4
24
+
25
+ ## 2.4.5
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies []:
30
+ - @tinacms/mdx@2.1.3
31
+ - tinacms@3.7.5
32
+
33
+ ## 2.4.4
34
+
35
+ ### Patch Changes
36
+
37
+ - [#6687](https://github.com/tinacms/tinacms/pull/6687) [`a526f9f`](https://github.com/tinacms/tinacms/commit/a526f9f4c37a0aaefb572c9dcc562d89aa9e5c7e) Thanks [@brookjeynes-ssw](https://github.com/brookjeynes-ssw)! - feat: simplify errors shown to users
38
+
39
+ - Updated dependencies [[`4672251`](https://github.com/tinacms/tinacms/commit/4672251c813e51f4471f025943008d2dea700aca), [`ca725ac`](https://github.com/tinacms/tinacms/commit/ca725acb42be499c146d76b12982e05a8127f81e), [`a526f9f`](https://github.com/tinacms/tinacms/commit/a526f9f4c37a0aaefb572c9dcc562d89aa9e5c7e), [`b260b5e`](https://github.com/tinacms/tinacms/commit/b260b5ed4beb5d678b9605357b99a8667fddc8de), [`b56dad4`](https://github.com/tinacms/tinacms/commit/b56dad42d2216ac9c8f90f19b78a4951ca97a61f)]:
40
+ - tinacms@3.7.4
41
+
42
+ ## 2.4.3
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [[`cd262b3`](https://github.com/tinacms/tinacms/commit/cd262b311c218ea4e5b5bb8abbbe54fcff3b8054), [`55dae8e`](https://github.com/tinacms/tinacms/commit/55dae8eef898f49f827c00bc72297863d0d69be1), [`217bfb4`](https://github.com/tinacms/tinacms/commit/217bfb4ff2c1a61fa7b6df3ea460b192b5179bb7), [`5feb18d`](https://github.com/tinacms/tinacms/commit/5feb18d0d3032bbcd6a5aad678208c0dde19bf81), [`32e145d`](https://github.com/tinacms/tinacms/commit/32e145d4859cbc710a222f2a01c55ca7b29a080b), [`d998884`](https://github.com/tinacms/tinacms/commit/d9988849ad67fb5e9d7e233c1ccca0cb0c031c3e), [`c75d871`](https://github.com/tinacms/tinacms/commit/c75d87121224f91dc4e5e2aa8af60b0881b87a5b)]:
47
+ - tinacms@3.7.3
48
+ - @tinacms/mdx@2.1.2
49
+
50
+ ## 2.4.2
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [[`3569c95`](https://github.com/tinacms/tinacms/commit/3569c95c124138013b36cd30bfef4d0b02f5c57b), [`4315d73`](https://github.com/tinacms/tinacms/commit/4315d731e729857713d5f3fc6cdef2b30abd9384), [`ff1cd6f`](https://github.com/tinacms/tinacms/commit/ff1cd6fb50edc24b34f81166d7dedbfec6d22b32), [`d1ad86e`](https://github.com/tinacms/tinacms/commit/d1ad86e204e19bf5bb4811658d40d172635da3af), [`e146e92`](https://github.com/tinacms/tinacms/commit/e146e922b40cb5376c7a3adf81b44ad4cf8f1867), [`246ee27`](https://github.com/tinacms/tinacms/commit/246ee27a8e0b74baf241c6a70a1699013fc59299)]:
55
+ - tinacms@3.7.2
56
+ - @tinacms/mdx@2.1.1
57
+
58
+ ## 2.4.1
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [[`a40f52a`](https://github.com/tinacms/tinacms/commit/a40f52ae01fa2ef059fb983efd22aad42913b351), [`a7ebbe1`](https://github.com/tinacms/tinacms/commit/a7ebbe18a77b05c567564f8b507f76c2a2bb135e), [`519a4c2`](https://github.com/tinacms/tinacms/commit/519a4c2ca8a78274fe88549d41adbe52f7c6258b), [`6e374e5`](https://github.com/tinacms/tinacms/commit/6e374e5975ff240807d59bfd06b3ab22264e91b1), [`039e605`](https://github.com/tinacms/tinacms/commit/039e6052a77e4cd0ae1460e33076a0fad1864019), [`d1f094b`](https://github.com/tinacms/tinacms/commit/d1f094b2d1a62e9c0580a56b8a788bc0e7a0af98)]:
63
+ - tinacms@3.7.1
64
+
65
+ ## 2.4.0
66
+
67
+ ### Minor Changes
68
+
69
+ - [#6510](https://github.com/tinacms/tinacms/pull/6510) [`059f480`](https://github.com/tinacms/tinacms/commit/059f480697ae1af813c165df3cc8954443737488) Thanks [@Aibono1225](https://github.com/Aibono1225)! - support highlight feature in rich text editor
70
+
71
+ ⚠️ `mark` is now a reserved MDX component name used internally for the highlight feature — custom MDX templates named `mark` will conflict with highlight and produce unexpected behavior.
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [[`5a8ec36`](https://github.com/tinacms/tinacms/commit/5a8ec366d35e33bea17740a1f80f81fe152680e3), [`32d0471`](https://github.com/tinacms/tinacms/commit/32d0471356945ed9fa7b4b8b4da0937e1fafcacc), [`059f480`](https://github.com/tinacms/tinacms/commit/059f480697ae1af813c165df3cc8954443737488), [`74f12fd`](https://github.com/tinacms/tinacms/commit/74f12fda610711bd76f43c7f6d4dc890427d3b50), [`7e34861`](https://github.com/tinacms/tinacms/commit/7e34861197af6ec3488277bdfafe8297f51e1c3d)]:
76
+ - tinacms@3.7.0
77
+ - @tinacms/mdx@2.1.0
78
+
79
+ ## 2.3.30
80
+
81
+ ### Patch Changes
82
+
83
+ - [#6524](https://github.com/tinacms/tinacms/pull/6524) [`3c45642`](https://github.com/tinacms/tinacms/commit/3c45642650e1a9e9fd340c62c9a5372d10f0bee7) Thanks [@joshbermanssw](https://github.com/joshbermanssw)! - Fix broken cross-package relative import for posthog in @tinacms/app that caused consumer build failures
84
+
85
+ - Updated dependencies [[`3c45642`](https://github.com/tinacms/tinacms/commit/3c45642650e1a9e9fd340c62c9a5372d10f0bee7)]:
86
+ - tinacms@3.6.3
87
+
88
+ ## 2.3.29
89
+
90
+ ### Patch Changes
91
+
92
+ - [#6495](https://github.com/tinacms/tinacms/pull/6495) [`0a1049d`](https://github.com/tinacms/tinacms/commit/0a1049d4cc205af64e566cd86a00260a20fc7036) Thanks [@joshbermanssw](https://github.com/joshbermanssw)! - 🐖 Telemetry - Adding Telemetry to see when users switch between rich-text and markdown mode in the rich-text editor
93
+
94
+ - [#6480](https://github.com/tinacms/tinacms/pull/6480) [`ebaa246`](https://github.com/tinacms/tinacms/commit/ebaa24655a590eef25f856e98a4bbdae7d26b2a0) Thanks [@joshbermanssw](https://github.com/joshbermanssw)! - 🦙 Add favicon when using TinaCMS editor
95
+
96
+ - Updated dependencies [[`3b44e6a`](https://github.com/tinacms/tinacms/commit/3b44e6ad9bd2ff336aa8147b016de8b9bbb6f90d), [`35385f1`](https://github.com/tinacms/tinacms/commit/35385f16fe9e4cb386021445c8e1cb817a03dcd3), [`0a1049d`](https://github.com/tinacms/tinacms/commit/0a1049d4cc205af64e566cd86a00260a20fc7036), [`960181a`](https://github.com/tinacms/tinacms/commit/960181a4fd351eabdb69d5580a3ca79b0a905fcf), [`7d544d2`](https://github.com/tinacms/tinacms/commit/7d544d22ce17fe616010c6aba63bd43c12725806), [`83ed83f`](https://github.com/tinacms/tinacms/commit/83ed83f27624134feffa0473f02b0f6f3318441b), [`8f08f49`](https://github.com/tinacms/tinacms/commit/8f08f49638edcecaf703681538fa46bbc53df982), [`13e953a`](https://github.com/tinacms/tinacms/commit/13e953a92eebcbfe2a86e12a9161ac6fe52e9236), [`168c283`](https://github.com/tinacms/tinacms/commit/168c283f0f43d601ef5ecec36062463fb5f106bf), [`c439e75`](https://github.com/tinacms/tinacms/commit/c439e759250e418c47a33eee7c9986d3b89131bf), [`9bc4f3c`](https://github.com/tinacms/tinacms/commit/9bc4f3cccb1ab88cfefcc59da7ad228d250f03d3)]:
97
+ - tinacms@3.6.2
98
+
99
+ ## 2.3.28
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies []:
104
+ - tinacms@3.6.1
105
+
106
+ ## 2.3.27
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [[`f23c2a6`](https://github.com/tinacms/tinacms/commit/f23c2a6742373271531bee46ca3cca8b208c3476), [`d782ca2`](https://github.com/tinacms/tinacms/commit/d782ca209ff98ee2143c7fd83f0b793563b6de60), [`60510bb`](https://github.com/tinacms/tinacms/commit/60510bbf8d1b78cad901722d4f9003665412d71e)]:
111
+ - tinacms@3.6.0
112
+ - @tinacms/mdx@2.0.7
113
+
114
+ ## 2.3.26
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [[`2738749`](https://github.com/tinacms/tinacms/commit/2738749bac08c02214fdf208f96bbcc4906ef442), [`dfb4ce8`](https://github.com/tinacms/tinacms/commit/dfb4ce8da7b82b638337109cc7859125e112a0a9)]:
119
+ - tinacms@3.5.1
120
+
121
+ ## 2.3.25
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies [[`da837f7`](https://github.com/tinacms/tinacms/commit/da837f7b17f0540cd47025afd2c45140706d595d), [`f90d47b`](https://github.com/tinacms/tinacms/commit/f90d47b746b000e65324da430aacc8fd623f5065), [`c806e41`](https://github.com/tinacms/tinacms/commit/c806e41232e0204a13539d6236358cb58cbc7692), [`89aee8a`](https://github.com/tinacms/tinacms/commit/89aee8ae3d6867e5793e4df7ff9c700dfd8a48c9)]:
126
+ - tinacms@3.5.0
127
+ - @tinacms/mdx@2.0.6
128
+
129
+ ## 2.3.24
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies []:
134
+ - @tinacms/mdx@2.0.5
135
+ - tinacms@3.4.1
136
+
137
+ ## 2.3.23
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [[`155654c`](https://github.com/tinacms/tinacms/commit/155654ce515ab68a0483cd7e797e9df0a4157431), [`414dc87`](https://github.com/tinacms/tinacms/commit/414dc87ea0e63702d12ec7a3d3e9f4e5527eaa56)]:
142
+ - tinacms@3.4.0
143
+
144
+ ## 2.3.22
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [[`6647240`](https://github.com/tinacms/tinacms/commit/6647240db6cfffcf1efb4fa9799e9c039b929389)]:
149
+ - tinacms@3.3.2
150
+ - @tinacms/mdx@2.0.4
151
+
152
+ ## 2.3.21
153
+
154
+ ### Patch Changes
155
+
156
+ - [#6346](https://github.com/tinacms/tinacms/pull/6346) [`3fa216c`](https://github.com/tinacms/tinacms/commit/3fa216c110af6417e6b835c49a275b08981e028b) Thanks [@JackDevAU](https://github.com/JackDevAU)! - Revert "✨ Visual element highlighting between iframe and form (#6211)"
157
+
158
+ - Updated dependencies [[`3fa216c`](https://github.com/tinacms/tinacms/commit/3fa216c110af6417e6b835c49a275b08981e028b), [`7352c96`](https://github.com/tinacms/tinacms/commit/7352c9660869d413a0f48d3fbb003d4c4c0e3d85)]:
159
+ - tinacms@3.3.1
160
+
161
+ ## 2.3.20
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [[`6c2c48a`](https://github.com/tinacms/tinacms/commit/6c2c48a9d869cb98e78fc656b986ecc244a5dafd)]:
166
+ - tinacms@3.3.0
167
+ - @tinacms/mdx@2.0.3
168
+
169
+ ## 2.3.19
170
+
171
+ ### Patch Changes
172
+
173
+ - Updated dependencies [[`a63401a`](https://github.com/tinacms/tinacms/commit/a63401a3dd8271258bc6bfb4cc22593c19e94c7d)]:
174
+ - tinacms@3.2.0
175
+ - @tinacms/mdx@2.0.2
176
+
177
+ ## 2.3.18
178
+
179
+ ### Patch Changes
180
+
181
+ - [#6211](https://github.com/tinacms/tinacms/pull/6211) [`790c860`](https://github.com/tinacms/tinacms/commit/790c860ae85c3bdcb7d3c07321ed4032ebbb7b49) Thanks [@Pat-Stuart](https://github.com/Pat-Stuart)! - ✨ Visual element highlighting between iframe and form
182
+
183
+ - Updated dependencies [[`790c860`](https://github.com/tinacms/tinacms/commit/790c860ae85c3bdcb7d3c07321ed4032ebbb7b49), [`60814a3`](https://github.com/tinacms/tinacms/commit/60814a3b56f99843211ef144576109857ad6ba86), [`b0f55b5`](https://github.com/tinacms/tinacms/commit/b0f55b511426ebf772d9f06645804f2319f9f9a2)]:
184
+ - tinacms@3.1.3
185
+
186
+ ## 2.3.17
187
+
188
+ ### Patch Changes
189
+
190
+ - Updated dependencies [[`8335218`](https://github.com/tinacms/tinacms/commit/833521832f91c98ff3cb48535eecb3824cb0f7bd)]:
191
+ - tinacms@3.1.2
192
+
193
+ ## 2.3.16
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies [[`3a12a39`](https://github.com/tinacms/tinacms/commit/3a12a392d5a8eb9bba5a5be65d080f24afa08de3)]:
198
+ - tinacms@3.1.1
199
+
200
+ ## 2.3.15
201
+
202
+ ### Patch Changes
203
+
204
+ - Updated dependencies [[`998975c`](https://github.com/tinacms/tinacms/commit/998975cc8e3c71489f3ed6cbf9ca0a5a7619c18b), [`a125472`](https://github.com/tinacms/tinacms/commit/a125472d3278c140cb416dba5cd1478fb5dfe320), [`3097535`](https://github.com/tinacms/tinacms/commit/3097535275e813db907a592ee96bd8481f0eacc5), [`9fb397d`](https://github.com/tinacms/tinacms/commit/9fb397da515468f72b01f5a7cf881187a9c33d6e)]:
205
+ - tinacms@3.1.0
206
+ - @tinacms/mdx@2.0.1
207
+
208
+ ## 2.3.14
209
+
210
+ ### Patch Changes
211
+
212
+ - Updated dependencies [[`5c1e891`](https://github.com/tinacms/tinacms/commit/5c1e89181f595d392ad6cb56ca5fc0b6d9e60a23), [`f717193`](https://github.com/tinacms/tinacms/commit/f717193aa4a1d3205df42d120fd1f6192b5e41e5), [`ac59522`](https://github.com/tinacms/tinacms/commit/ac59522053c71c713057c4c2b6ce610617bce85e)]:
213
+ - tinacms@3.0.2
214
+ - @tinacms/mdx@2.0.0
215
+
216
+ ## 2.3.13
217
+
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [[`50fa9f4`](https://github.com/tinacms/tinacms/commit/50fa9f4bf932a3dc45b88d245e35917efe8d3423), [`428ec7e`](https://github.com/tinacms/tinacms/commit/428ec7eca20603e2cb666d562fd4cc16dda4cbed), [`6946476`](https://github.com/tinacms/tinacms/commit/69464767d339a5df3c6c530ece94ef80049e534f), [`f99bbbc`](https://github.com/tinacms/tinacms/commit/f99bbbc221eead8d714b3791348d415dd8fcd063)]:
221
+ - tinacms@3.0.1
9
222
 
10
223
  ## 2.3.12
11
224
 
package/favicon.svg ADDED
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 32 32" fill="#EC4815" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M18.6466 14.5553C19.9018 13.5141 20.458 7.36086 21.0014 5.14903C21.5447 2.9372 23.7919 3.04938 23.7919 3.04938C23.7919 3.04938 23.2085 4.06764 23.4464 4.82751C23.6844 5.58738 25.3145 6.26662 25.3145 6.26662L24.9629 7.19622C24.9629 7.19622 24.2288 7.10204 23.7919 7.9785C23.355 8.85496 24.3392 17.4442 24.3392 17.4442C24.3392 17.4442 21.4469 22.7275 21.4469 24.9206C21.4469 27.1136 22.4819 28.9515 22.4819 28.9515H21.0296C21.0296 28.9515 18.899 26.4086 18.462 25.1378C18.0251 23.8669 18.1998 22.596 18.1998 22.596C18.1998 22.596 15.8839 22.4646 13.8303 22.596C11.7767 22.7275 10.4072 24.498 10.16 25.4884C9.91287 26.4787 9.81048 28.9515 9.81048 28.9515H8.66211C7.96315 26.7882 7.40803 26.0129 7.70918 24.9206C8.54334 21.8949 8.37949 20.1788 8.18635 19.4145C7.99321 18.6501 6.68552 17.983 6.68552 17.983C7.32609 16.6741 7.97996 16.0452 10.7926 15.9796C13.6052 15.914 17.3915 15.5965 18.6466 14.5553Z"/>
3
+ <path d="M11.1268 24.7939C11.1268 24.7939 11.4236 27.5481 13.0001 28.9516H14.3511C13.0001 27.4166 12.8527 23.4155 12.8527 23.4155C12.1656 23.6399 11.3045 24.3846 11.1268 24.7939Z"/>
4
+ </svg>
package/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
+ <link rel="icon" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>TinaCMS</title>
8
8
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "0.0.0-e0bbd2e-20251203224419",
3
+ "version": "0.0.0-e103e06-20260512091702",
4
4
  "main": "src/main.tsx",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
@@ -26,7 +26,11 @@
26
26
  "react-router-dom": "6.3.0",
27
27
  "typescript": "^5.7.3",
28
28
  "zod": "^3.24.2",
29
- "@tinacms/mdx": "2.0.0",
30
- "tinacms": "0.0.0-e0bbd2e-20251203224419"
29
+ "tinacms": "0.0.0-e103e06-20260512091702",
30
+ "@tinacms/mdx": "2.1.4"
31
+ },
32
+ "repository": {
33
+ "url": "https://github.com/tinacms/tinacms.git",
34
+ "directory": "packages/@tinacms/app"
31
35
  }
32
36
  }
@@ -15,6 +15,7 @@ import {
15
15
  buildError,
16
16
  } from './error-message';
17
17
  import { useDebounce } from './use-debounce';
18
+ import { RichTextEditorSwitchedEvent, captureEvent } from 'tinacms';
18
19
 
19
20
  export const uuid = () => {
20
21
  // @ts-ignore
@@ -154,7 +155,12 @@ export const RawEditor = (props: RichTextType) => {
154
155
  return (
155
156
  <div className='relative'>
156
157
  <div className='sticky top-1 w-full flex justify-between mb-2 z-50 max-w-full bg-white'>
157
- <Button onClick={() => props.setRawMode(false)}>
158
+ <Button
159
+ onClick={() => {
160
+ captureEvent(RichTextEditorSwitchedEvent, { to: 'richtext' });
161
+ props.setRawMode(false);
162
+ }}
163
+ >
158
164
  View in rich-text editor 📝
159
165
  </Button>
160
166
  <ErrorMessage error={error} />
package/src/global.css CHANGED
@@ -65,16 +65,6 @@
65
65
  --tina-toolbar-height: 62px;
66
66
  }
67
67
 
68
- @keyframes fly-in-left {
69
- 0% {
70
- transform: translate3d(100%, 0, 0);
71
- }
72
-
73
- 100% {
74
- transform: translate3d(0, 0, 0);
75
- }
76
- }
77
-
78
68
  @keyframes fly-in-up {
79
69
  0% {
80
70
  transform: translate3d(0, 100%, 0);
@@ -1,24 +1,27 @@
1
1
  import React from 'react';
2
2
  import { TinaCMS } from 'tinacms';
3
3
 
4
- const ErrorModalContent = (props: { title: string; errors: string[] }) => {
5
- const { title, errors } = props;
4
+ const TROUBLESHOOTING_URL = 'https://tina.io/docs/tinacloud/troubleshooting';
5
+
6
+ const ErrorModalContent = (props: { title: string; message: string }) => {
7
+ const { title, message } = props;
6
8
  return (
7
9
  <>
8
10
  <div>{title}</div>
9
- <ul>
10
- {errors.map((error, i) => (
11
- <li key={i}>{error}</li>
12
- ))}
13
- </ul>
11
+ <p>{message}</p>
12
+ <a href={TROUBLESHOOTING_URL} target='_blank' rel='noopener noreferrer'>
13
+ Try these troubleshooting tips
14
+ </a>
14
15
  </>
15
16
  );
16
17
  };
17
18
 
18
19
  export const showErrorModal = (
19
20
  title: string,
20
- errors: string[],
21
+ message: string,
21
22
  cms: TinaCMS
22
23
  ) => {
23
- cms.alerts.error(() => <ErrorModalContent title={title} errors={errors} />);
24
+ if (cms.alerts.all.some((a: { level: string }) => a.level === 'error'))
25
+ return;
26
+ cms.alerts.error(() => <ErrorModalContent title={title} message={message} />);
24
27
  };
@@ -613,7 +613,12 @@ export const useGraphQLReducer = (
613
613
 
614
614
  React.useEffect(() => {
615
615
  if (requestErrors.length) {
616
- showErrorModal('Unexpected error querying content', requestErrors, cms);
616
+ console.error('Unexpected error querying content:', requestErrors);
617
+ showErrorModal(
618
+ 'Unexpected Error',
619
+ 'We ran into an unexpected error while fetching your content. If after refreshing the issue persists, reach out to us on Discord.',
620
+ cms
621
+ );
617
622
  }
618
623
  }, [requestErrors]);
619
624
  };