tinacms 2.5.1 → 2.5.2
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.js +4 -7
- package/dist/client.mjs +2 -6
- package/dist/index.js +27 -3
- package/dist/index.mjs +27 -3
- package/package.json +4 -5
package/dist/client.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports
|
|
3
|
-
})(this, function(exports2
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}));
|
|
3
|
+
})(this, function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { fetch: fetchPonyfillFN, Headers: HeadersPonyfill } = fetchPonyfill();
|
|
6
|
-
const fetchDefined = typeof fetch === "undefined" ? fetchPonyfillFN : fetch;
|
|
7
|
-
const HeadersDefined = typeof Headers === "undefined" ? HeadersPonyfill : Headers;
|
|
8
5
|
const TINA_HOST = "content.tinajs.io";
|
|
9
6
|
class TinaClient {
|
|
10
7
|
constructor({
|
|
@@ -39,7 +36,7 @@
|
|
|
39
36
|
var _a;
|
|
40
37
|
await this.init();
|
|
41
38
|
const errorPolicyDefined = errorPolicy || this.errorPolicy;
|
|
42
|
-
const headers = new
|
|
39
|
+
const headers = new Headers();
|
|
43
40
|
if (this.readonlyToken) {
|
|
44
41
|
headers.append("X-API-KEY", this.readonlyToken);
|
|
45
42
|
}
|
|
@@ -72,7 +69,7 @@
|
|
|
72
69
|
return value;
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
|
-
const res = await
|
|
72
|
+
const res = await fetch(url, optionsObject);
|
|
76
73
|
if (!res.ok) {
|
|
77
74
|
let additionalInfo = "";
|
|
78
75
|
if (res.status === 401) {
|
package/dist/client.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import fetchPonyfill from "fetch-ponyfill";
|
|
2
|
-
const { fetch: fetchPonyfillFN, Headers: HeadersPonyfill } = fetchPonyfill();
|
|
3
|
-
const fetchDefined = typeof fetch === "undefined" ? fetchPonyfillFN : fetch;
|
|
4
|
-
const HeadersDefined = typeof Headers === "undefined" ? HeadersPonyfill : Headers;
|
|
5
1
|
const TINA_HOST = "content.tinajs.io";
|
|
6
2
|
class TinaClient {
|
|
7
3
|
constructor({
|
|
@@ -36,7 +32,7 @@ class TinaClient {
|
|
|
36
32
|
var _a;
|
|
37
33
|
await this.init();
|
|
38
34
|
const errorPolicyDefined = errorPolicy || this.errorPolicy;
|
|
39
|
-
const headers = new
|
|
35
|
+
const headers = new Headers();
|
|
40
36
|
if (this.readonlyToken) {
|
|
41
37
|
headers.append("X-API-KEY", this.readonlyToken);
|
|
42
38
|
}
|
|
@@ -69,7 +65,7 @@ class TinaClient {
|
|
|
69
65
|
return value;
|
|
70
66
|
}
|
|
71
67
|
}
|
|
72
|
-
const res = await
|
|
68
|
+
const res = await fetch(url, optionsObject);
|
|
73
69
|
if (!res.ok) {
|
|
74
70
|
let additionalInfo = "";
|
|
75
71
|
if (res.status === 401) {
|
package/dist/index.js
CHANGED
|
@@ -4935,7 +4935,28 @@ flowchart TD
|
|
|
4935
4935
|
onChange,
|
|
4936
4936
|
value,
|
|
4937
4937
|
step
|
|
4938
|
-
}) => /* @__PURE__ */ React__namespace.createElement(
|
|
4938
|
+
}) => /* @__PURE__ */ React__namespace.createElement(
|
|
4939
|
+
Input,
|
|
4940
|
+
{
|
|
4941
|
+
type: "number",
|
|
4942
|
+
step,
|
|
4943
|
+
value,
|
|
4944
|
+
onChange: (event) => {
|
|
4945
|
+
const inputValue = event.target.value;
|
|
4946
|
+
const newValue = inputValue === "" ? void 0 : inputValue;
|
|
4947
|
+
if (onChange) {
|
|
4948
|
+
const syntheticEvent = {
|
|
4949
|
+
...event,
|
|
4950
|
+
target: {
|
|
4951
|
+
...event.target,
|
|
4952
|
+
value: newValue
|
|
4953
|
+
}
|
|
4954
|
+
};
|
|
4955
|
+
onChange(syntheticEvent);
|
|
4956
|
+
}
|
|
4957
|
+
}
|
|
4958
|
+
}
|
|
4959
|
+
);
|
|
4939
4960
|
function useCMS() {
|
|
4940
4961
|
return useCMS$1();
|
|
4941
4962
|
}
|
|
@@ -8012,7 +8033,10 @@ flowchart TD
|
|
|
8012
8033
|
ReactDateTimeWithStyles,
|
|
8013
8034
|
{
|
|
8014
8035
|
value: input.value,
|
|
8015
|
-
onChange:
|
|
8036
|
+
onChange: (value) => {
|
|
8037
|
+
const newValue = value === "" ? void 0 : value;
|
|
8038
|
+
input.onChange(newValue);
|
|
8039
|
+
},
|
|
8016
8040
|
dateFormat: dateFormat || DEFAULT_DATE_DISPLAY_FORMAT,
|
|
8017
8041
|
timeFormat: timeFormat || false,
|
|
8018
8042
|
inputProps: { className: textFieldClasses },
|
|
@@ -10343,7 +10367,7 @@ flowchart TD
|
|
|
10343
10367
|
"Event Log"
|
|
10344
10368
|
));
|
|
10345
10369
|
};
|
|
10346
|
-
const version = "2.5.
|
|
10370
|
+
const version = "2.5.2";
|
|
10347
10371
|
const Nav = ({
|
|
10348
10372
|
isLocalMode,
|
|
10349
10373
|
className = "",
|
package/dist/index.mjs
CHANGED
|
@@ -4962,7 +4962,28 @@ const NumberInput = ({
|
|
|
4962
4962
|
onChange,
|
|
4963
4963
|
value,
|
|
4964
4964
|
step
|
|
4965
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
4965
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
4966
|
+
Input,
|
|
4967
|
+
{
|
|
4968
|
+
type: "number",
|
|
4969
|
+
step,
|
|
4970
|
+
value,
|
|
4971
|
+
onChange: (event) => {
|
|
4972
|
+
const inputValue = event.target.value;
|
|
4973
|
+
const newValue = inputValue === "" ? void 0 : inputValue;
|
|
4974
|
+
if (onChange) {
|
|
4975
|
+
const syntheticEvent = {
|
|
4976
|
+
...event,
|
|
4977
|
+
target: {
|
|
4978
|
+
...event.target,
|
|
4979
|
+
value: newValue
|
|
4980
|
+
}
|
|
4981
|
+
};
|
|
4982
|
+
onChange(syntheticEvent);
|
|
4983
|
+
}
|
|
4984
|
+
}
|
|
4985
|
+
}
|
|
4986
|
+
);
|
|
4966
4987
|
function useCMS() {
|
|
4967
4988
|
return useCMS$1();
|
|
4968
4989
|
}
|
|
@@ -8039,7 +8060,10 @@ const DateField = wrapFieldsWithMeta(
|
|
|
8039
8060
|
ReactDateTimeWithStyles,
|
|
8040
8061
|
{
|
|
8041
8062
|
value: input.value,
|
|
8042
|
-
onChange:
|
|
8063
|
+
onChange: (value) => {
|
|
8064
|
+
const newValue = value === "" ? void 0 : value;
|
|
8065
|
+
input.onChange(newValue);
|
|
8066
|
+
},
|
|
8043
8067
|
dateFormat: dateFormat || DEFAULT_DATE_DISPLAY_FORMAT,
|
|
8044
8068
|
timeFormat: timeFormat || false,
|
|
8045
8069
|
inputProps: { className: textFieldClasses },
|
|
@@ -10370,7 +10394,7 @@ const SyncStatus = ({ cms, setEventsOpen }) => {
|
|
|
10370
10394
|
"Event Log"
|
|
10371
10395
|
));
|
|
10372
10396
|
};
|
|
10373
|
-
const version = "2.5.
|
|
10397
|
+
const version = "2.5.2";
|
|
10374
10398
|
const Nav = ({
|
|
10375
10399
|
isLocalMode,
|
|
10376
10400
|
className = "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
"color-string": "^1.9.1",
|
|
99
99
|
"crypto-js": "^4.2.0",
|
|
100
100
|
"date-fns": "2.30.0",
|
|
101
|
-
"fetch-ponyfill": "^7.1.0",
|
|
102
101
|
"final-form": "4.20.10",
|
|
103
102
|
"final-form-arrays": "^3.1.0",
|
|
104
103
|
"final-form-set-field-data": "^1.0.2",
|
|
@@ -129,9 +128,9 @@
|
|
|
129
128
|
"webfontloader": "1.6.28",
|
|
130
129
|
"yup": "^1.4.0",
|
|
131
130
|
"zod": "^3.23.8",
|
|
132
|
-
"@tinacms/mdx": "1.5.
|
|
133
|
-
"@tinacms/
|
|
134
|
-
"@tinacms/
|
|
131
|
+
"@tinacms/mdx": "1.5.3",
|
|
132
|
+
"@tinacms/search": "1.0.36",
|
|
133
|
+
"@tinacms/schema-tools": "1.6.9"
|
|
135
134
|
},
|
|
136
135
|
"devDependencies": {
|
|
137
136
|
"@graphql-tools/utils": "^10.5.6",
|