tinacms 1.5.12 → 1.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.es.js +12 -4
- package/dist/client.js +9 -9
- package/dist/dev-tools.es.js +211 -245
- package/dist/dev-tools.js +221 -262
- package/dist/edit-state.es.js +37 -23
- package/dist/edit-state.js +39 -39
- package/dist/index.es.js +1960 -1538
- package/dist/index.js +1989 -1614
- package/dist/internalClient/index.d.ts +1 -0
- package/dist/react.es.js +32 -8
- package/dist/react.js +35 -21
- package/dist/rich-text/index.es.js +43 -104
- package/dist/rich-text/index.js +50 -117
- package/dist/rich-text/prism.d.ts +2 -0
- package/dist/rich-text/prism.es.js +13 -69
- package/dist/rich-text/prism.js +11 -74
- package/dist/utils/index.d.ts +2 -2
- package/package.json +8 -7
package/dist/client.es.js
CHANGED
|
@@ -29,14 +29,18 @@ class TinaClient {
|
|
|
29
29
|
if (res.status === 401) {
|
|
30
30
|
additionalInfo = "Please check that your client ID, URL and read only token are configured properly.";
|
|
31
31
|
}
|
|
32
|
-
throw new Error(
|
|
32
|
+
throw new Error(
|
|
33
|
+
`Server responded with status code ${res.status}, ${res.statusText}. ${additionalInfo ? additionalInfo : ""} Please see our FAQ for more information: https://tina.io/docs/errors/faq/`
|
|
34
|
+
);
|
|
33
35
|
}
|
|
34
36
|
const json = await res.json();
|
|
35
37
|
if (json.errors) {
|
|
36
|
-
throw new Error(
|
|
38
|
+
throw new Error(
|
|
39
|
+
`Unable to fetch, please see our FAQ for more information: https://tina.io/docs/errors/faq/
|
|
37
40
|
|
|
38
41
|
Errors:
|
|
39
|
-
${json.errors.map((error) => error.message).join("\n")}`
|
|
42
|
+
${json.errors.map((error) => error.message).join("\n")}`
|
|
43
|
+
);
|
|
40
44
|
}
|
|
41
45
|
return {
|
|
42
46
|
data: json == null ? void 0 : json.data,
|
|
@@ -48,4 +52,8 @@ function createClient(args) {
|
|
|
48
52
|
const client = new TinaClient(args);
|
|
49
53
|
return client;
|
|
50
54
|
}
|
|
51
|
-
export {
|
|
55
|
+
export {
|
|
56
|
+
TINA_HOST,
|
|
57
|
+
TinaClient,
|
|
58
|
+
createClient
|
|
59
|
+
};
|
package/dist/client.js
CHANGED
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("fetch-ponyfill")) : typeof define === "function" && define.amd ? define(["exports", "fetch-ponyfill"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP));
|
|
3
3
|
})(this, function(exports2, fetchPonyfill) {
|
|
4
4
|
"use strict";
|
|
5
|
-
|
|
6
|
-
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
7
|
-
}
|
|
8
|
-
var fetchPonyfill__default = /* @__PURE__ */ _interopDefaultLegacy(fetchPonyfill);
|
|
9
|
-
const { fetch, Headers } = fetchPonyfill__default["default"]();
|
|
5
|
+
const { fetch, Headers } = fetchPonyfill();
|
|
10
6
|
const TINA_HOST = "content.tinajs.io";
|
|
11
7
|
class TinaClient {
|
|
12
8
|
constructor({ token, url, queries }) {
|
|
@@ -36,14 +32,18 @@
|
|
|
36
32
|
if (res.status === 401) {
|
|
37
33
|
additionalInfo = "Please check that your client ID, URL and read only token are configured properly.";
|
|
38
34
|
}
|
|
39
|
-
throw new Error(
|
|
35
|
+
throw new Error(
|
|
36
|
+
`Server responded with status code ${res.status}, ${res.statusText}. ${additionalInfo ? additionalInfo : ""} Please see our FAQ for more information: https://tina.io/docs/errors/faq/`
|
|
37
|
+
);
|
|
40
38
|
}
|
|
41
39
|
const json = await res.json();
|
|
42
40
|
if (json.errors) {
|
|
43
|
-
throw new Error(
|
|
41
|
+
throw new Error(
|
|
42
|
+
`Unable to fetch, please see our FAQ for more information: https://tina.io/docs/errors/faq/
|
|
44
43
|
|
|
45
44
|
Errors:
|
|
46
|
-
${json.errors.map((error) => error.message).join("\n")}`
|
|
45
|
+
${json.errors.map((error) => error.message).join("\n")}`
|
|
46
|
+
);
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
49
49
|
data: json == null ? void 0 : json.data,
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
exports2.TINA_HOST = TINA_HOST;
|
|
59
59
|
exports2.TinaClient = TinaClient;
|
|
60
60
|
exports2.createClient = createClient;
|
|
61
|
-
Object.
|
|
61
|
+
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
62
62
|
});
|