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/rich-text/index.js
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react")) : typeof define === "function" && define.amd ? define(["exports", "react"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP));
|
|
3
3
|
})(this, function(exports2, React) {
|
|
4
4
|
"use strict";
|
|
5
|
-
function _interopDefaultLegacy(e) {
|
|
6
|
-
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
7
|
-
}
|
|
8
|
-
var React__default = /* @__PURE__ */ _interopDefaultLegacy(React);
|
|
9
5
|
const TinaMarkdown = ({
|
|
10
6
|
content,
|
|
11
7
|
components = {}
|
|
@@ -17,12 +13,8 @@
|
|
|
17
13
|
if (!nodes) {
|
|
18
14
|
return null;
|
|
19
15
|
}
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
components,
|
|
23
|
-
key: index,
|
|
24
|
-
child
|
|
25
|
-
});
|
|
16
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, nodes.map((child, index) => {
|
|
17
|
+
return /* @__PURE__ */ React.createElement(MemoNode, { components, key: index, child });
|
|
26
18
|
}));
|
|
27
19
|
};
|
|
28
20
|
const Leaf = (props) => {
|
|
@@ -30,72 +22,53 @@
|
|
|
30
22
|
const { bold, ...rest } = props;
|
|
31
23
|
if (props.components.bold) {
|
|
32
24
|
const Component = props.components.bold;
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
...rest
|
|
35
|
-
}));
|
|
25
|
+
return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
36
26
|
}
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
...rest
|
|
39
|
-
}));
|
|
27
|
+
return /* @__PURE__ */ React.createElement("strong", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
40
28
|
}
|
|
41
29
|
if (props.italic) {
|
|
42
30
|
const { italic, ...rest } = props;
|
|
43
31
|
if (props.components.italic) {
|
|
44
32
|
const Component = props.components.italic;
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
...rest
|
|
47
|
-
}));
|
|
33
|
+
return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
48
34
|
}
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
...rest
|
|
51
|
-
}));
|
|
35
|
+
return /* @__PURE__ */ React.createElement("em", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
52
36
|
}
|
|
53
37
|
if (props.underline) {
|
|
54
38
|
const { underline, ...rest } = props;
|
|
55
39
|
if (props.components.underline) {
|
|
56
40
|
const Component = props.components.underline;
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
...rest
|
|
59
|
-
}));
|
|
41
|
+
return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
60
42
|
}
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
...rest
|
|
63
|
-
}));
|
|
43
|
+
return /* @__PURE__ */ React.createElement("u", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
64
44
|
}
|
|
65
45
|
if (props.strikethrough) {
|
|
66
46
|
const { strikethrough, ...rest } = props;
|
|
67
47
|
if (props.components.strikethrough) {
|
|
68
48
|
const Component = props.components.strikethrough;
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
...rest
|
|
71
|
-
}));
|
|
49
|
+
return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
72
50
|
}
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
...rest
|
|
75
|
-
}));
|
|
51
|
+
return /* @__PURE__ */ React.createElement("s", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
76
52
|
}
|
|
77
53
|
if (props.code) {
|
|
78
54
|
const { code, ...rest } = props;
|
|
79
55
|
if (props.components.code) {
|
|
80
56
|
const Component = props.components.code;
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
...rest
|
|
83
|
-
}));
|
|
57
|
+
return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
84
58
|
}
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
...rest
|
|
87
|
-
}));
|
|
59
|
+
return /* @__PURE__ */ React.createElement("code", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
|
|
88
60
|
}
|
|
89
61
|
if (props.components.text) {
|
|
90
62
|
const Component = props.components.text;
|
|
91
|
-
return /* @__PURE__ */
|
|
63
|
+
return /* @__PURE__ */ React.createElement(Component, null, props.text);
|
|
92
64
|
}
|
|
93
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, props.text);
|
|
94
66
|
};
|
|
95
67
|
const MemoNode = (props) => {
|
|
96
|
-
const MNode =
|
|
97
|
-
...props
|
|
98
|
-
|
|
68
|
+
const MNode = React.useMemo(
|
|
69
|
+
() => /* @__PURE__ */ React.createElement(Node, { ...props }),
|
|
70
|
+
[JSON.stringify(props)]
|
|
71
|
+
);
|
|
99
72
|
return MNode;
|
|
100
73
|
};
|
|
101
74
|
const Node = ({ components, child }) => {
|
|
@@ -114,106 +87,71 @@
|
|
|
114
87
|
case "li":
|
|
115
88
|
if (components[child.type]) {
|
|
116
89
|
const Component2 = components[child.type];
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
...props
|
|
119
|
-
}, /* @__PURE__ */ React__default["default"].createElement(TinaMarkdown, {
|
|
120
|
-
components,
|
|
121
|
-
content: children
|
|
122
|
-
}));
|
|
90
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
|
|
123
91
|
}
|
|
124
|
-
return
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
-
components,
|
|
127
|
-
content: children
|
|
128
|
-
})
|
|
92
|
+
return React.createElement(child.type, {
|
|
93
|
+
children: /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children })
|
|
129
94
|
});
|
|
130
95
|
case "lic":
|
|
131
96
|
if (components.lic) {
|
|
132
97
|
const Component2 = components.lic;
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
...props
|
|
135
|
-
}, /* @__PURE__ */ React__default["default"].createElement(TinaMarkdown, {
|
|
136
|
-
components,
|
|
137
|
-
content: children
|
|
138
|
-
}));
|
|
98
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
|
|
139
99
|
}
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
components,
|
|
142
|
-
content: child.children
|
|
143
|
-
}));
|
|
100
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: child.children }));
|
|
144
101
|
case "img":
|
|
145
102
|
if (components[child.type]) {
|
|
146
103
|
const Component2 = components[child.type];
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
...props
|
|
149
|
-
});
|
|
104
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
150
105
|
}
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
src: child.url,
|
|
153
|
-
alt: child.caption
|
|
154
|
-
});
|
|
106
|
+
return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.caption });
|
|
155
107
|
case "a":
|
|
156
108
|
if (components[child.type]) {
|
|
157
109
|
const Component2 = components[child.type];
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
content: children
|
|
163
|
-
}));
|
|
110
|
+
return (
|
|
111
|
+
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
112
|
+
/* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }))
|
|
113
|
+
);
|
|
164
114
|
}
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
content: children
|
|
170
|
-
}));
|
|
115
|
+
return (
|
|
116
|
+
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
117
|
+
/* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }))
|
|
118
|
+
);
|
|
171
119
|
case "code_block":
|
|
172
120
|
const value = child.value;
|
|
173
121
|
if (components[child.type]) {
|
|
174
122
|
const Component2 = components[child.type];
|
|
175
|
-
return
|
|
176
|
-
|
|
177
|
-
|
|
123
|
+
return (
|
|
124
|
+
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
125
|
+
/* @__PURE__ */ React.createElement(Component2, { ...props })
|
|
126
|
+
);
|
|
178
127
|
}
|
|
179
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null, value));
|
|
180
129
|
case "hr":
|
|
181
130
|
if (components[child.type]) {
|
|
182
131
|
const Component2 = components[child.type];
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
...props
|
|
185
|
-
});
|
|
132
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
186
133
|
}
|
|
187
|
-
return /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ React.createElement("hr", null);
|
|
188
135
|
case "break":
|
|
189
136
|
if (components[child.type]) {
|
|
190
137
|
const Component2 = components[child.type];
|
|
191
|
-
return /* @__PURE__ */
|
|
192
|
-
...props
|
|
193
|
-
});
|
|
138
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
194
139
|
}
|
|
195
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ React.createElement("br", null);
|
|
196
141
|
case "text":
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
components,
|
|
199
|
-
...child
|
|
200
|
-
});
|
|
142
|
+
return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
|
|
201
143
|
case "mdxJsxTextElement":
|
|
202
144
|
case "mdxJsxFlowElement":
|
|
203
145
|
const Component = components[child.name];
|
|
204
146
|
if (Component) {
|
|
205
147
|
const props2 = child.props ? child.props : {};
|
|
206
|
-
return /* @__PURE__ */
|
|
207
|
-
...props2
|
|
208
|
-
});
|
|
148
|
+
return /* @__PURE__ */ React.createElement(Component, { ...props2 });
|
|
209
149
|
} else {
|
|
210
150
|
const ComponentMissing = components["component_missing"];
|
|
211
151
|
if (ComponentMissing) {
|
|
212
|
-
return /* @__PURE__ */
|
|
213
|
-
name: child.name
|
|
214
|
-
});
|
|
152
|
+
return /* @__PURE__ */ React.createElement(ComponentMissing, { name: child.name });
|
|
215
153
|
} else {
|
|
216
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ React.createElement("span", null, `No component provided for ${child.name}`);
|
|
217
155
|
}
|
|
218
156
|
}
|
|
219
157
|
case "maybe_mdx":
|
|
@@ -222,22 +160,17 @@
|
|
|
222
160
|
case "html_inline":
|
|
223
161
|
if (components[child.type]) {
|
|
224
162
|
const Component2 = components[child.type];
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
...props
|
|
227
|
-
});
|
|
163
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
228
164
|
}
|
|
229
165
|
return child.value;
|
|
230
166
|
case "invalid_markdown":
|
|
231
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ React.createElement("pre", null, child.value);
|
|
232
168
|
default:
|
|
233
169
|
if (typeof child.text === "string") {
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
components,
|
|
236
|
-
...child
|
|
237
|
-
});
|
|
170
|
+
return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
|
|
238
171
|
}
|
|
239
172
|
}
|
|
240
173
|
};
|
|
241
174
|
exports2.TinaMarkdown = TinaMarkdown;
|
|
242
|
-
Object.
|
|
175
|
+
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
243
176
|
});
|
|
@@ -1,72 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Highlight,
|
|
3
|
-
var theme = {
|
|
4
|
-
plain: {
|
|
5
|
-
color: "#393A34",
|
|
6
|
-
backgroundColor: "#f6f8fa"
|
|
7
|
-
},
|
|
8
|
-
styles: [{
|
|
9
|
-
types: ["comment", "prolog", "doctype", "cdata"],
|
|
10
|
-
style: {
|
|
11
|
-
color: "#999988",
|
|
12
|
-
fontStyle: "italic"
|
|
13
|
-
}
|
|
14
|
-
}, {
|
|
15
|
-
types: ["namespace"],
|
|
16
|
-
style: {
|
|
17
|
-
opacity: 0.7
|
|
18
|
-
}
|
|
19
|
-
}, {
|
|
20
|
-
types: ["string", "attr-value"],
|
|
21
|
-
style: {
|
|
22
|
-
color: "#e3116c"
|
|
23
|
-
}
|
|
24
|
-
}, {
|
|
25
|
-
types: ["punctuation", "operator"],
|
|
26
|
-
style: {
|
|
27
|
-
color: "#393A34"
|
|
28
|
-
}
|
|
29
|
-
}, {
|
|
30
|
-
types: ["entity", "url", "symbol", "number", "boolean", "variable", "constant", "property", "regex", "inserted"],
|
|
31
|
-
style: {
|
|
32
|
-
color: "#36acaa"
|
|
33
|
-
}
|
|
34
|
-
}, {
|
|
35
|
-
types: ["atrule", "keyword", "attr-name", "selector"],
|
|
36
|
-
style: {
|
|
37
|
-
color: "#00a4db"
|
|
38
|
-
}
|
|
39
|
-
}, {
|
|
40
|
-
types: ["function", "deleted", "tag"],
|
|
41
|
-
style: {
|
|
42
|
-
color: "#d73a49"
|
|
43
|
-
}
|
|
44
|
-
}, {
|
|
45
|
-
types: ["function-variable"],
|
|
46
|
-
style: {
|
|
47
|
-
color: "#6f42c1"
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
types: ["tag", "selector", "keyword"],
|
|
51
|
-
style: {
|
|
52
|
-
color: "#00009f"
|
|
53
|
-
}
|
|
54
|
-
}]
|
|
55
|
-
};
|
|
56
|
-
var theme$1 = theme;
|
|
2
|
+
import { Highlight, themes } from "prism-react-renderer";
|
|
57
3
|
const Prism = (props) => {
|
|
58
|
-
return /* @__PURE__ */ React.createElement(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
style
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}))))));
|
|
4
|
+
return /* @__PURE__ */ React.createElement(
|
|
5
|
+
Highlight,
|
|
6
|
+
{
|
|
7
|
+
theme: themes[props.theme || "github"],
|
|
8
|
+
code: props.value,
|
|
9
|
+
language: props.lang || ""
|
|
10
|
+
},
|
|
11
|
+
({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React.createElement("pre", { className, style }, tokens.map((line, i) => /* @__PURE__ */ React.createElement("div", { ...getLineProps({ line, key: i }) }, line.map((token, key) => /* @__PURE__ */ React.createElement("span", { ...getTokenProps({ token, key }) })))))
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
Prism
|
|
71
16
|
};
|
|
72
|
-
export { Prism };
|
package/dist/rich-text/prism.js
CHANGED
|
@@ -1,81 +1,18 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("prism-react-renderer")) : typeof define === "function" && define.amd ? define(["exports", "react", "prism-react-renderer"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP));
|
|
3
|
-
})(this, function(exports2, React,
|
|
3
|
+
})(this, function(exports2, React, prismReactRenderer) {
|
|
4
4
|
"use strict";
|
|
5
|
-
function _interopDefaultLegacy(e) {
|
|
6
|
-
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
7
|
-
}
|
|
8
|
-
var React__default = /* @__PURE__ */ _interopDefaultLegacy(React);
|
|
9
|
-
var Highlight__default = /* @__PURE__ */ _interopDefaultLegacy(Highlight);
|
|
10
|
-
var theme = {
|
|
11
|
-
plain: {
|
|
12
|
-
color: "#393A34",
|
|
13
|
-
backgroundColor: "#f6f8fa"
|
|
14
|
-
},
|
|
15
|
-
styles: [{
|
|
16
|
-
types: ["comment", "prolog", "doctype", "cdata"],
|
|
17
|
-
style: {
|
|
18
|
-
color: "#999988",
|
|
19
|
-
fontStyle: "italic"
|
|
20
|
-
}
|
|
21
|
-
}, {
|
|
22
|
-
types: ["namespace"],
|
|
23
|
-
style: {
|
|
24
|
-
opacity: 0.7
|
|
25
|
-
}
|
|
26
|
-
}, {
|
|
27
|
-
types: ["string", "attr-value"],
|
|
28
|
-
style: {
|
|
29
|
-
color: "#e3116c"
|
|
30
|
-
}
|
|
31
|
-
}, {
|
|
32
|
-
types: ["punctuation", "operator"],
|
|
33
|
-
style: {
|
|
34
|
-
color: "#393A34"
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
types: ["entity", "url", "symbol", "number", "boolean", "variable", "constant", "property", "regex", "inserted"],
|
|
38
|
-
style: {
|
|
39
|
-
color: "#36acaa"
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
types: ["atrule", "keyword", "attr-name", "selector"],
|
|
43
|
-
style: {
|
|
44
|
-
color: "#00a4db"
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
types: ["function", "deleted", "tag"],
|
|
48
|
-
style: {
|
|
49
|
-
color: "#d73a49"
|
|
50
|
-
}
|
|
51
|
-
}, {
|
|
52
|
-
types: ["function-variable"],
|
|
53
|
-
style: {
|
|
54
|
-
color: "#6f42c1"
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
types: ["tag", "selector", "keyword"],
|
|
58
|
-
style: {
|
|
59
|
-
color: "#00009f"
|
|
60
|
-
}
|
|
61
|
-
}]
|
|
62
|
-
};
|
|
63
|
-
var theme$1 = theme;
|
|
64
5
|
const Prism = (props) => {
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
style
|
|
73
|
-
|
|
74
|
-
...getLineProps({ line, key: i })
|
|
75
|
-
}, line.map((token, key) => /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
76
|
-
...getTokenProps({ token, key })
|
|
77
|
-
}))))));
|
|
6
|
+
return /* @__PURE__ */ React.createElement(
|
|
7
|
+
prismReactRenderer.Highlight,
|
|
8
|
+
{
|
|
9
|
+
theme: prismReactRenderer.themes[props.theme || "github"],
|
|
10
|
+
code: props.value,
|
|
11
|
+
language: props.lang || ""
|
|
12
|
+
},
|
|
13
|
+
({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React.createElement("pre", { className, style }, tokens.map((line, i) => /* @__PURE__ */ React.createElement("div", { ...getLineProps({ line, key: i }) }, line.map((token, key) => /* @__PURE__ */ React.createElement("span", { ...getTokenProps({ token, key }) })))))
|
|
14
|
+
);
|
|
78
15
|
};
|
|
79
16
|
exports2.Prism = Prism;
|
|
80
|
-
Object.
|
|
17
|
+
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
81
18
|
});
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,5 +17,5 @@ export interface CreateClientProps {
|
|
|
17
17
|
tinaGraphQLVersion: string;
|
|
18
18
|
}
|
|
19
19
|
export declare const createClient: ({ clientId, isLocalClient, branch, tinaioConfig, schema, apiUrl, tinaGraphQLVersion, }: CreateClientProps) => Client;
|
|
20
|
-
export declare function assertShape<T
|
|
21
|
-
export declare function safeAssertShape<T
|
|
20
|
+
export declare function assertShape<T>(value: unknown, yupSchema: (args: typeof yup) => yup.AnySchema, errorMessage?: string): asserts value is T;
|
|
21
|
+
export declare function safeAssertShape<T>(value: unknown, yupSchema: (args: typeof yup) => yup.AnySchema): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.14",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -58,14 +58,13 @@
|
|
|
58
58
|
"license": "Apache-2.0",
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@graphql-inspector/core": "^4.0.0",
|
|
61
|
-
"@graphql-tools/relay-operation-optimizer": "^6.4.1",
|
|
62
61
|
"@headlessui/react": "^1.5.0",
|
|
63
62
|
"@heroicons/react": "^1.0.4",
|
|
64
63
|
"@react-hook/window-size": "^3.0.7",
|
|
65
|
-
"@tinacms/search": "1.0.
|
|
64
|
+
"@tinacms/search": "1.0.4",
|
|
66
65
|
"@tinacms/schema-tools": "1.4.7",
|
|
67
66
|
"@tinacms/sharedctx": "1.0.1",
|
|
68
|
-
"@tinacms/toolkit": "1.7.
|
|
67
|
+
"@tinacms/toolkit": "1.7.10",
|
|
69
68
|
"crypto-js": "^4.0.0",
|
|
70
69
|
"encoding": "0.1.13",
|
|
71
70
|
"fetch-ponyfill": "^7.1.0",
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
"graphql": "15.8.0",
|
|
74
73
|
"graphql-tag": "^2.11.0",
|
|
75
74
|
"lodash.set": "^4.3.2",
|
|
76
|
-
"prism-react-renderer": "^
|
|
75
|
+
"prism-react-renderer": "^2.0.6",
|
|
77
76
|
"react-icons": "^4.3.1",
|
|
78
77
|
"react-router-dom": "6.3.0",
|
|
79
78
|
"yup": "^0.32.0",
|
|
@@ -81,10 +80,11 @@
|
|
|
81
80
|
},
|
|
82
81
|
"devDependencies": {
|
|
83
82
|
"@graphql-tools/utils": "^8.6.1",
|
|
84
|
-
"@testing-library/jest-dom": "^5.
|
|
83
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
85
84
|
"@testing-library/react": "^12.0.0",
|
|
86
85
|
"@testing-library/react-hooks": "^7.0.2",
|
|
87
86
|
"@testing-library/user-event": "^12.7.0",
|
|
87
|
+
"@testing-library/dom": "^7.21.4 ",
|
|
88
88
|
"@tinacms/scripts": "1.1.0",
|
|
89
89
|
"@types/jest": "^27.0.1",
|
|
90
90
|
"@types/lodash": "^4.14.169",
|
|
@@ -93,7 +93,8 @@
|
|
|
93
93
|
"@types/yup": "^0.29.10",
|
|
94
94
|
"identity-obj-proxy": "^3.0.0",
|
|
95
95
|
"isomorphic-fetch": "^3.0.0",
|
|
96
|
-
"jest": "^
|
|
96
|
+
"jest": "^29.5.0",
|
|
97
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
97
98
|
"jest-file-snapshot": "^0.5.0",
|
|
98
99
|
"next": "12.2.4",
|
|
99
100
|
"react": "17.0.2",
|