tinacms 0.60.1 → 0.60.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/CHANGELOG.md +6 -0
- package/dist/edit-state.d.ts +1 -20
- package/dist/index.d.ts +1 -23
- package/dist/index.es.js +13 -5
- package/dist/index.js +13 -5
- package/dist/rich-text.d.ts +1 -118
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/edit-state.d.ts
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
See the License for the specific language governing permissions and
|
|
11
|
-
limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
import { isEditing, setEditing, useEditState } from '@tinacms/sharedctx';
|
|
14
|
-
import React from 'react';
|
|
15
|
-
export { isEditing, setEditing, useEditState };
|
|
16
|
-
export declare const TinaEditProvider: ({ showEditButton, ...props }: {
|
|
17
|
-
showEditButton?: boolean;
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
editMode: React.ReactNode;
|
|
20
|
-
}) => JSX.Element;
|
|
1
|
+
export * from "../src/edit-state"
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
See the License for the specific language governing permissions and
|
|
11
|
-
limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
export * from './client';
|
|
14
|
-
export * from './auth';
|
|
15
|
-
export * from './utils';
|
|
16
|
-
export * from './tina-cms';
|
|
17
|
-
export { useGraphqlForms } from './hooks/use-graphql-forms';
|
|
18
|
-
export { useDocumentCreatorPlugin } from './hooks/use-content-creator';
|
|
19
|
-
export * from '@tinacms/toolkit';
|
|
20
|
-
export { TinaAdmin } from './admin';
|
|
21
|
-
export { RouteMappingPlugin } from './admin/plugins/route-mapping';
|
|
22
|
-
import { TinaCMSProvider2 } from './tina-cms';
|
|
23
|
-
export default TinaCMSProvider2;
|
|
1
|
+
export * from "../src/index"
|
package/dist/index.es.js
CHANGED
|
@@ -2204,6 +2204,14 @@ const useEmbedTailwind = () => {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
}, []);
|
|
2206
2206
|
};
|
|
2207
|
+
const Redirect = () => {
|
|
2208
|
+
React.useEffect(() => {
|
|
2209
|
+
if (window) {
|
|
2210
|
+
window.location.assign("/");
|
|
2211
|
+
}
|
|
2212
|
+
}, []);
|
|
2213
|
+
return null;
|
|
2214
|
+
};
|
|
2207
2215
|
const TinaAdmin = () => {
|
|
2208
2216
|
useEmbedTailwind();
|
|
2209
2217
|
const isSSR = typeof window === "undefined";
|
|
@@ -2241,11 +2249,11 @@ const TinaAdmin = () => {
|
|
|
2241
2249
|
}))))));
|
|
2242
2250
|
} else {
|
|
2243
2251
|
return /* @__PURE__ */ React.createElement(Layout, null, /* @__PURE__ */ React.createElement(BrowserRouter, null, /* @__PURE__ */ React.createElement(Routes, null, /* @__PURE__ */ React.createElement(Route, {
|
|
2244
|
-
path: "/admin/logout"
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2252
|
+
path: "/admin/logout",
|
|
2253
|
+
element: /* @__PURE__ */ React.createElement(LogoutPage, null)
|
|
2254
|
+
}), /* @__PURE__ */ React.createElement(Route, {
|
|
2255
|
+
path: "/admin",
|
|
2256
|
+
element: /* @__PURE__ */ React.createElement(Redirect, null)
|
|
2249
2257
|
}))));
|
|
2250
2258
|
}
|
|
2251
2259
|
});
|
package/dist/index.js
CHANGED
|
@@ -2224,6 +2224,14 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2224
2224
|
}
|
|
2225
2225
|
}, []);
|
|
2226
2226
|
};
|
|
2227
|
+
const Redirect = () => {
|
|
2228
|
+
React__default["default"].useEffect(() => {
|
|
2229
|
+
if (window) {
|
|
2230
|
+
window.location.assign("/");
|
|
2231
|
+
}
|
|
2232
|
+
}, []);
|
|
2233
|
+
return null;
|
|
2234
|
+
};
|
|
2227
2235
|
const TinaAdmin = () => {
|
|
2228
2236
|
useEmbedTailwind();
|
|
2229
2237
|
const isSSR = typeof window === "undefined";
|
|
@@ -2261,11 +2269,11 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2261
2269
|
}))))));
|
|
2262
2270
|
} else {
|
|
2263
2271
|
return /* @__PURE__ */ React__default["default"].createElement(Layout, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.BrowserRouter, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Routes, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Route, {
|
|
2264
|
-
path: "/admin/logout"
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2272
|
+
path: "/admin/logout",
|
|
2273
|
+
element: /* @__PURE__ */ React__default["default"].createElement(LogoutPage, null)
|
|
2274
|
+
}), /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Route, {
|
|
2275
|
+
path: "/admin",
|
|
2276
|
+
element: /* @__PURE__ */ React__default["default"].createElement(Redirect, null)
|
|
2269
2277
|
}))));
|
|
2270
2278
|
}
|
|
2271
2279
|
});
|
package/dist/rich-text.d.ts
CHANGED
|
@@ -1,118 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
See the License for the specific language governing permissions and
|
|
11
|
-
limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
declare type BaseComponents = {
|
|
14
|
-
h1?: {
|
|
15
|
-
children: JSX.Element;
|
|
16
|
-
};
|
|
17
|
-
h2?: {
|
|
18
|
-
children: JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
h3?: {
|
|
21
|
-
children: JSX.Element;
|
|
22
|
-
};
|
|
23
|
-
h4?: {
|
|
24
|
-
children: JSX.Element;
|
|
25
|
-
};
|
|
26
|
-
h5?: {
|
|
27
|
-
children: JSX.Element;
|
|
28
|
-
};
|
|
29
|
-
h6?: {
|
|
30
|
-
children: JSX.Element;
|
|
31
|
-
};
|
|
32
|
-
p?: {
|
|
33
|
-
children: JSX.Element;
|
|
34
|
-
};
|
|
35
|
-
a?: {
|
|
36
|
-
url: string;
|
|
37
|
-
children: JSX.Element;
|
|
38
|
-
};
|
|
39
|
-
italic?: {
|
|
40
|
-
children: JSX.Element;
|
|
41
|
-
};
|
|
42
|
-
bold?: {
|
|
43
|
-
children: JSX.Element;
|
|
44
|
-
};
|
|
45
|
-
strikethrough?: {
|
|
46
|
-
children: JSX.Element;
|
|
47
|
-
};
|
|
48
|
-
underline?: {
|
|
49
|
-
children: JSX.Element;
|
|
50
|
-
};
|
|
51
|
-
code?: {
|
|
52
|
-
children: JSX.Element;
|
|
53
|
-
};
|
|
54
|
-
ul?: {
|
|
55
|
-
children: JSX.Element;
|
|
56
|
-
};
|
|
57
|
-
ol?: {
|
|
58
|
-
children: JSX.Element;
|
|
59
|
-
};
|
|
60
|
-
block_quote?: {
|
|
61
|
-
children: JSX.Element;
|
|
62
|
-
};
|
|
63
|
-
code_block?: {
|
|
64
|
-
language?: string;
|
|
65
|
-
children: JSX.Element;
|
|
66
|
-
};
|
|
67
|
-
img?: {
|
|
68
|
-
url: string;
|
|
69
|
-
caption?: string;
|
|
70
|
-
alt?: string;
|
|
71
|
-
};
|
|
72
|
-
hr?: {};
|
|
73
|
-
component_missing?: {
|
|
74
|
-
name: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
declare type BaseComponentSignature = {
|
|
78
|
-
[BK in keyof BaseComponents]: (props: BaseComponents[BK]) => JSX.Element;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Define the allowed components and their props
|
|
82
|
-
* ```ts
|
|
83
|
-
* const components:
|
|
84
|
-
* Components<{
|
|
85
|
-
* BlockQuote: {
|
|
86
|
-
* children: TinaMarkdownContent;
|
|
87
|
-
* authorName: string;
|
|
88
|
-
* };
|
|
89
|
-
* }> = {
|
|
90
|
-
* BlockQuote: (props: {
|
|
91
|
-
* children: TinaMarkdownContent;
|
|
92
|
-
* authorName: string;
|
|
93
|
-
* }) => {
|
|
94
|
-
* return (
|
|
95
|
-
* <div>
|
|
96
|
-
* <blockquote>
|
|
97
|
-
* <TinaMarkdown content={props.children} />
|
|
98
|
-
* {props.authorName}
|
|
99
|
-
* </blockquote>
|
|
100
|
-
* </div>
|
|
101
|
-
* );
|
|
102
|
-
* }
|
|
103
|
-
* }
|
|
104
|
-
* }
|
|
105
|
-
* ```
|
|
106
|
-
*/
|
|
107
|
-
export declare type Components<ComponentAndProps extends object> = {
|
|
108
|
-
[K in keyof ComponentAndProps]: (props: ComponentAndProps[K]) => JSX.Element;
|
|
109
|
-
} & BaseComponentSignature;
|
|
110
|
-
export declare type TinaMarkdownContent = {
|
|
111
|
-
type: string;
|
|
112
|
-
children: TinaMarkdownContent[];
|
|
113
|
-
};
|
|
114
|
-
export declare const TinaMarkdown: ({ content, components, }: {
|
|
115
|
-
content: TinaMarkdownContent | TinaMarkdownContent[];
|
|
116
|
-
components?: Components<{}>;
|
|
117
|
-
}) => JSX.Element;
|
|
118
|
-
export {};
|
|
1
|
+
export * from "../src/rich-text"
|