tinacms 1.5.22 → 1.5.24
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/auth/AuthModal.d.ts +3 -2
- package/dist/auth/TinaCloudProvider.d.ts +0 -3
- package/dist/auth/defaultSessionProvider.d.ts +3 -0
- package/dist/dev-tools.js +8 -19
- package/dist/dev-tools.mjs +8 -19
- package/dist/index.d.ts +1 -5
- package/dist/index.js +941 -418
- package/dist/index.mjs +942 -418
- package/dist/internalClient/asyncPoll.d.ts +84 -0
- package/dist/internalClient/authProvider.d.ts +61 -0
- package/dist/internalClient/index.d.ts +4 -115
- package/dist/rich-text/index.d.ts +6 -10
- package/dist/rich-text/index.js +8 -19
- package/dist/rich-text/index.mjs +8 -19
- package/dist/table.d.ts +5 -0
- package/dist/toolkit/components/account/update-password.d.ts +2 -0
- package/dist/toolkit/fields/components/index.d.ts +1 -0
- package/dist/toolkit/fields/components/password-field.d.ts +9 -0
- package/dist/toolkit/fields/components/toggle.d.ts +3 -3
- package/dist/toolkit/fields/plugins/index.d.ts +1 -0
- package/dist/toolkit/fields/plugins/password-field-plugin.d.ts +15 -0
- package/dist/toolkit/fields/plugins/text-field-plugin.d.ts +1 -1
- package/dist/toolkit/forms/form.d.ts +1 -0
- package/dist/toolkit/plugin-screens/password-screen.d.ts +1 -0
- package/dist/toolkit/react-screens/screen-plugin.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/nav.d.ts +13 -5
- package/package.json +6 -6
package/dist/auth/AuthModal.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import React from 'react';
|
|
5
5
|
interface ModalBuilderProps {
|
|
6
6
|
title: string;
|
|
7
|
-
message
|
|
7
|
+
message?: string;
|
|
8
8
|
error?: string;
|
|
9
9
|
actions: ButtonProps[];
|
|
10
10
|
close(): void;
|
|
11
|
+
children?: React.ReactNode;
|
|
11
12
|
}
|
|
12
13
|
export declare function ModalBuilder(modalProps: ModalBuilderProps): JSX.Element;
|
|
13
14
|
export declare const ErrorLabel: ({ style, ...props }: {
|
package/dist/dev-tools.js
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
return MNode;
|
|
73
73
|
};
|
|
74
74
|
const Node = ({ components, child }) => {
|
|
75
|
-
var _a, _b, _c, _d, _e;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f;
|
|
76
76
|
const { children, ...props } = child;
|
|
77
77
|
switch (child.type) {
|
|
78
78
|
case "h1":
|
|
@@ -154,23 +154,18 @@
|
|
|
154
154
|
const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
|
|
155
155
|
const TableComponent = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }));
|
|
156
156
|
const TrComponent = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
157
|
-
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { ...props2 }));
|
|
158
|
-
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { ...props2 }));
|
|
157
|
+
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
158
|
+
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
159
|
+
const align = ((_f = child.props) == null ? void 0 : _f.align) || [];
|
|
159
160
|
return /* @__PURE__ */ React.createElement(TableComponent, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent, null, header.tableCells.map((c, i) => {
|
|
160
161
|
return /* @__PURE__ */ React.createElement(
|
|
161
162
|
TinaMarkdown,
|
|
162
163
|
{
|
|
163
164
|
key: i,
|
|
164
165
|
components: {
|
|
165
|
-
p: (props2) => {
|
|
166
|
-
if (ThComponent) {
|
|
167
|
-
return /* @__PURE__ */ React.createElement(ThComponent, { ...props2 });
|
|
168
|
-
} else {
|
|
169
|
-
return /* @__PURE__ */ React.createElement("th", { ...props2 });
|
|
170
|
-
}
|
|
171
|
-
}
|
|
166
|
+
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align[i], ...props2 })
|
|
172
167
|
},
|
|
173
|
-
content: c.
|
|
168
|
+
content: c.value
|
|
174
169
|
}
|
|
175
170
|
);
|
|
176
171
|
}))), /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
|
|
@@ -181,15 +176,9 @@
|
|
|
181
176
|
{
|
|
182
177
|
key: i2,
|
|
183
178
|
components: {
|
|
184
|
-
p: (props2) => {
|
|
185
|
-
if (TdComponent) {
|
|
186
|
-
return /* @__PURE__ */ React.createElement(TdComponent, { ...props2 });
|
|
187
|
-
} else {
|
|
188
|
-
return /* @__PURE__ */ React.createElement("td", { ...props2 });
|
|
189
|
-
}
|
|
190
|
-
}
|
|
179
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
|
|
191
180
|
},
|
|
192
|
-
content: c.
|
|
181
|
+
content: c.value
|
|
193
182
|
}
|
|
194
183
|
);
|
|
195
184
|
}));
|
package/dist/dev-tools.mjs
CHANGED
|
@@ -69,7 +69,7 @@ const MemoNode = (props) => {
|
|
|
69
69
|
return MNode;
|
|
70
70
|
};
|
|
71
71
|
const Node = ({ components, child }) => {
|
|
72
|
-
var _a, _b, _c, _d, _e;
|
|
72
|
+
var _a, _b, _c, _d, _e, _f;
|
|
73
73
|
const { children, ...props } = child;
|
|
74
74
|
switch (child.type) {
|
|
75
75
|
case "h1":
|
|
@@ -151,23 +151,18 @@ const Node = ({ components, child }) => {
|
|
|
151
151
|
const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
|
|
152
152
|
const TableComponent = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }));
|
|
153
153
|
const TrComponent = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
154
|
-
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { ...props2 }));
|
|
155
|
-
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { ...props2 }));
|
|
154
|
+
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
155
|
+
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
156
|
+
const align = ((_f = child.props) == null ? void 0 : _f.align) || [];
|
|
156
157
|
return /* @__PURE__ */ React.createElement(TableComponent, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent, null, header.tableCells.map((c, i) => {
|
|
157
158
|
return /* @__PURE__ */ React.createElement(
|
|
158
159
|
TinaMarkdown,
|
|
159
160
|
{
|
|
160
161
|
key: i,
|
|
161
162
|
components: {
|
|
162
|
-
p: (props2) => {
|
|
163
|
-
if (ThComponent) {
|
|
164
|
-
return /* @__PURE__ */ React.createElement(ThComponent, { ...props2 });
|
|
165
|
-
} else {
|
|
166
|
-
return /* @__PURE__ */ React.createElement("th", { ...props2 });
|
|
167
|
-
}
|
|
168
|
-
}
|
|
163
|
+
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align[i], ...props2 })
|
|
169
164
|
},
|
|
170
|
-
content: c.
|
|
165
|
+
content: c.value
|
|
171
166
|
}
|
|
172
167
|
);
|
|
173
168
|
}))), /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
|
|
@@ -178,15 +173,9 @@ const Node = ({ components, child }) => {
|
|
|
178
173
|
{
|
|
179
174
|
key: i2,
|
|
180
175
|
components: {
|
|
181
|
-
p: (props2) => {
|
|
182
|
-
if (TdComponent) {
|
|
183
|
-
return /* @__PURE__ */ React.createElement(TdComponent, { ...props2 });
|
|
184
|
-
} else {
|
|
185
|
-
return /* @__PURE__ */ React.createElement("td", { ...props2 });
|
|
186
|
-
}
|
|
187
|
-
}
|
|
176
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
|
|
188
177
|
},
|
|
189
|
-
content: c.
|
|
178
|
+
content: c.value
|
|
190
179
|
}
|
|
191
180
|
);
|
|
192
181
|
}));
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ export type { TinaCMSProviderDefaultProps };
|
|
|
19
19
|
export default TinaCMSProvider2;
|
|
20
20
|
import { MediaStore, TinaCMS } from '@tinacms/toolkit';
|
|
21
21
|
import { formifyCallback } from './hooks/use-graphql-forms';
|
|
22
|
-
import { RichTextTemplate } from '@tinacms/schema-tools';
|
|
23
22
|
export { NAMER, resolveField } from '@tinacms/schema-tools';
|
|
24
23
|
import { TinaSchema, TinaField, Config, Schema, Collection, Template } from '@tinacms/schema-tools';
|
|
25
24
|
export type { Config, Schema, Collection, Template, TinaField, TinaSchema };
|
|
@@ -58,7 +57,4 @@ interface MediaStoreClass {
|
|
|
58
57
|
}
|
|
59
58
|
export declare const defineStaticConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass, undefined>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass, undefined>;
|
|
60
59
|
export declare const defineConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass, undefined>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass, undefined>;
|
|
61
|
-
|
|
62
|
-
* Out-of-the-box template for rendering basic markdown tables
|
|
63
|
-
*/
|
|
64
|
-
export declare const tinaTableTemplate: RichTextTemplate;
|
|
60
|
+
export { tinaTableTemplate } from './table';
|