tinacms 0.0.0-e0ddb8c-20241004065742 → 0.0.0-e27c017-20250619233313
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/README.md +1 -1
- package/dist/admin/api.d.ts +1 -0
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/components/Page.d.ts +3 -9
- package/dist/admin/components/Sidebar.d.ts +0 -3
- package/dist/admin/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/admin/pages/DashboardPage.d.ts +0 -3
- package/dist/admin/pages/ScreenPage.d.ts +0 -3
- package/dist/admin/types.d.ts +3 -0
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/cache/node-cache.d.ts +1 -0
- package/dist/client.js +100 -62
- package/dist/client.mjs +59 -36
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10973 -9252
- package/dist/index.mjs +11112 -9389
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/node-cache-5e8db9f0.mjs +63 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +13 -1
- package/dist/react.mjs +13 -1
- package/dist/rich-text/index.js +42 -11
- package/dist/rich-text/index.mjs +42 -11
- package/dist/rich-text/prism.js +1 -1
- package/dist/rich-text/prism.mjs +1 -1
- package/dist/toolkit/components/media/media-item.d.ts +1 -1
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
- package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/components/select.d.ts +2 -2
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +0 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +39 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +27 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-dropdown-menu.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +14 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +13 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +54 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +11 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
- package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
- package/dist/toolkit/form-builder/form-builder.d.ts +15 -5
- package/dist/toolkit/forms/field.d.ts +3 -0
- package/dist/toolkit/forms/form.d.ts +22 -3
- package/dist/toolkit/git-client/git-client.d.ts +25 -2
- package/dist/toolkit/git-client/git-file.d.ts +18 -0
- package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
- package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
- package/dist/toolkit/icons/Tina.d.ts +0 -5
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +1 -0
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/alert.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/nav.d.ts +5 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
- package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
- package/dist/toolkit/react-sidebar/index.d.ts +1 -1
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/dist/toolkit/tina-state.d.ts +15 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/dist/utils/cn.d.ts +2 -0
- package/package.json +44 -43
- package/dist/__vite-browser-external-d06ac358.mjs +0 -4
- package/dist/node-cache-7fa2452c.mjs +0 -43
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-mermaid-element.d.ts +0 -3
- package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TokenObject } from '../auth/authenticate';
|
|
2
1
|
import { BranchData, EventBus } from '@tinacms/toolkit';
|
|
3
2
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
|
3
|
+
import { TokenObject } from '../auth/authenticate';
|
|
4
|
+
import { AuthProvider, Schema, TinaSchema } from '@tinacms/schema-tools';
|
|
5
|
+
import { SearchClient } from '@tinacms/search/dist/index-client';
|
|
4
6
|
import gql from 'graphql-tag';
|
|
5
|
-
import { TinaSchema, Schema, AuthProvider } from '@tinacms/schema-tools';
|
|
6
7
|
import { TinaCloudProject } from './types';
|
|
7
|
-
import { SearchClient } from '@tinacms/search/dist/index-client';
|
|
8
8
|
export * from './authProvider';
|
|
9
9
|
export type OnLoginFunc = (args: {
|
|
10
10
|
token?: TokenObject;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const makeCacheDir = async (dir, fs, path, os) => {
|
|
2
|
+
const pathParts = dir.split(path.sep).filter(Boolean);
|
|
3
|
+
const cacheHash = pathParts[pathParts.length - 1];
|
|
4
|
+
const rootUser = pathParts[0];
|
|
5
|
+
let cacheDir = dir;
|
|
6
|
+
if (!fs.existsSync(path.join(path.sep, rootUser))) {
|
|
7
|
+
cacheDir = path.join(os.tmpdir(), cacheHash);
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
11
|
+
} catch (error) {
|
|
12
|
+
throw new Error(`Failed to create cache directory: ${error.message}`);
|
|
13
|
+
}
|
|
14
|
+
return cacheDir;
|
|
15
|
+
};
|
|
16
|
+
const NodeCache = async (dir) => {
|
|
17
|
+
const fs = require("node:fs");
|
|
18
|
+
const path = require("node:path");
|
|
19
|
+
const os = require("node:os");
|
|
20
|
+
const { createHash } = require("node:crypto");
|
|
21
|
+
const cacheDir = await makeCacheDir(dir, fs, path, os);
|
|
22
|
+
return {
|
|
23
|
+
makeKey: (key) => {
|
|
24
|
+
const input = key && key instanceof Object ? JSON.stringify(key) : key || "";
|
|
25
|
+
return createHash("sha256").update(input).digest("hex");
|
|
26
|
+
},
|
|
27
|
+
get: async (key) => {
|
|
28
|
+
let readValue;
|
|
29
|
+
const cacheFilename = `${cacheDir}/${key}`;
|
|
30
|
+
try {
|
|
31
|
+
const data = await fs.promises.readFile(cacheFilename, "utf-8");
|
|
32
|
+
readValue = JSON.parse(data);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if (e.code !== "ENOENT") {
|
|
35
|
+
console.error(
|
|
36
|
+
`Failed to read cache file to ${cacheFilename}: ${e.message}`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return readValue;
|
|
41
|
+
},
|
|
42
|
+
set: async (key, value) => {
|
|
43
|
+
const cacheFilename = `${cacheDir}/${key}`;
|
|
44
|
+
try {
|
|
45
|
+
await fs.promises.writeFile(cacheFilename, JSON.stringify(value), {
|
|
46
|
+
encoding: "utf-8",
|
|
47
|
+
flag: "wx"
|
|
48
|
+
// Don't overwrite existing caches
|
|
49
|
+
});
|
|
50
|
+
} catch (e) {
|
|
51
|
+
if (e.code !== "EEXIST") {
|
|
52
|
+
console.error(
|
|
53
|
+
`Failed to write cache file to ${cacheFilename}: ${e.message}`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
NodeCache,
|
|
62
|
+
makeCacheDir
|
|
63
|
+
};
|
package/dist/react.d.ts
CHANGED
package/dist/react.js
CHANGED
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
React.useEffect(() => {
|
|
19
19
|
setIsClient(true);
|
|
20
20
|
setData(props.data);
|
|
21
|
+
parent.postMessage({
|
|
22
|
+
type: "url-changed"
|
|
23
|
+
});
|
|
21
24
|
}, [id]);
|
|
22
25
|
React.useEffect(() => {
|
|
23
26
|
if (quickEditEnabled) {
|
|
@@ -100,7 +103,16 @@
|
|
|
100
103
|
}
|
|
101
104
|
}, [quickEditEnabled, isInTinaIframe]);
|
|
102
105
|
React.useEffect(() => {
|
|
103
|
-
|
|
106
|
+
if (props == null ? void 0 : props.experimental___selectFormByFormId) {
|
|
107
|
+
parent.postMessage({
|
|
108
|
+
type: "user-select-form",
|
|
109
|
+
formId: props.experimental___selectFormByFormId()
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}, [id]);
|
|
113
|
+
React.useEffect(() => {
|
|
114
|
+
const { experimental___selectFormByFormId, ...rest } = props;
|
|
115
|
+
parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
|
|
104
116
|
window.addEventListener("message", (event) => {
|
|
105
117
|
if (event.data.type === "quickEditEnabled") {
|
|
106
118
|
setQuickEditEnabled(event.data.value);
|
package/dist/react.mjs
CHANGED
|
@@ -15,6 +15,9 @@ function useTina(props) {
|
|
|
15
15
|
React.useEffect(() => {
|
|
16
16
|
setIsClient(true);
|
|
17
17
|
setData(props.data);
|
|
18
|
+
parent.postMessage({
|
|
19
|
+
type: "url-changed"
|
|
20
|
+
});
|
|
18
21
|
}, [id]);
|
|
19
22
|
React.useEffect(() => {
|
|
20
23
|
if (quickEditEnabled) {
|
|
@@ -97,7 +100,16 @@ function useTina(props) {
|
|
|
97
100
|
}
|
|
98
101
|
}, [quickEditEnabled, isInTinaIframe]);
|
|
99
102
|
React.useEffect(() => {
|
|
100
|
-
|
|
103
|
+
if (props == null ? void 0 : props.experimental___selectFormByFormId) {
|
|
104
|
+
parent.postMessage({
|
|
105
|
+
type: "user-select-form",
|
|
106
|
+
formId: props.experimental___selectFormByFormId()
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}, [id]);
|
|
110
|
+
React.useEffect(() => {
|
|
111
|
+
const { experimental___selectFormByFormId, ...rest } = props;
|
|
112
|
+
parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
|
|
101
113
|
window.addEventListener("message", (event) => {
|
|
102
114
|
if (event.data.type === "quickEditEnabled") {
|
|
103
115
|
setQuickEditEnabled(event.data.value);
|
package/dist/rich-text/index.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, _f;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
76
76
|
const { children, ...props } = child;
|
|
77
77
|
switch (child.type) {
|
|
78
78
|
case "h1":
|
|
@@ -152,33 +152,33 @@
|
|
|
152
152
|
} else {
|
|
153
153
|
if (child.name === "table") {
|
|
154
154
|
const firstRowHeader = (_a = child.props) == null ? void 0 : _a.firstRowHeader;
|
|
155
|
-
const
|
|
155
|
+
const rows2 = (firstRowHeader ? (_b = child.props) == null ? void 0 : _b.tableRows.filter((_, i) => i !== 0) : (_c = child.props) == null ? void 0 : _c.tableRows) || [];
|
|
156
156
|
const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
|
|
157
|
-
const
|
|
158
|
-
const
|
|
157
|
+
const TableComponent2 = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }));
|
|
158
|
+
const TrComponent2 = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
159
159
|
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
return /* @__PURE__ */ React.createElement(
|
|
160
|
+
const TdComponent2 = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
161
|
+
const align2 = ((_f = child.props) == null ? void 0 : _f.align) || [];
|
|
162
|
+
return /* @__PURE__ */ React.createElement(TableComponent2, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent2, null, header.tableCells.map((c, i) => {
|
|
163
163
|
return /* @__PURE__ */ React.createElement(
|
|
164
164
|
TinaMarkdown,
|
|
165
165
|
{
|
|
166
166
|
key: i,
|
|
167
167
|
components: {
|
|
168
|
-
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align:
|
|
168
|
+
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align2[i], ...props2 })
|
|
169
169
|
},
|
|
170
170
|
content: c.value
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
|
-
}))), /* @__PURE__ */ React.createElement("tbody", null,
|
|
173
|
+
}))), /* @__PURE__ */ React.createElement("tbody", null, rows2.map((row, i) => {
|
|
174
174
|
var _a2;
|
|
175
|
-
return /* @__PURE__ */ React.createElement(
|
|
175
|
+
return /* @__PURE__ */ React.createElement(TrComponent2, { key: i }, (_a2 = row == null ? void 0 : row.tableCells) == null ? void 0 : _a2.map((c, i2) => {
|
|
176
176
|
return /* @__PURE__ */ React.createElement(
|
|
177
177
|
TinaMarkdown,
|
|
178
178
|
{
|
|
179
179
|
key: i2,
|
|
180
180
|
components: {
|
|
181
|
-
p: (props2) => /* @__PURE__ */ React.createElement(
|
|
181
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent2, { align: align2[i2], ...props2 })
|
|
182
182
|
},
|
|
183
183
|
content: c.value
|
|
184
184
|
}
|
|
@@ -193,6 +193,37 @@
|
|
|
193
193
|
return /* @__PURE__ */ React.createElement("span", null, `No component provided for ${child.name}`);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
+
case "table":
|
|
197
|
+
const rows = child.children || [];
|
|
198
|
+
const TableComponent = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { style: { border: "1px solid #EDECF3" }, ...props2 }));
|
|
199
|
+
const TrComponent = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
200
|
+
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement(
|
|
201
|
+
"td",
|
|
202
|
+
{
|
|
203
|
+
style: {
|
|
204
|
+
textAlign: (props2 == null ? void 0 : props2.align) || "auto",
|
|
205
|
+
border: "1px solid #EDECF3",
|
|
206
|
+
padding: "0.25rem"
|
|
207
|
+
},
|
|
208
|
+
...props2
|
|
209
|
+
}
|
|
210
|
+
));
|
|
211
|
+
const align = ((_g = child.props) == null ? void 0 : _g.align) || [];
|
|
212
|
+
return /* @__PURE__ */ React.createElement(TableComponent, null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
|
|
213
|
+
var _a2;
|
|
214
|
+
return /* @__PURE__ */ React.createElement(TrComponent, { key: i }, (_a2 = row.children) == null ? void 0 : _a2.map((cell, i2) => {
|
|
215
|
+
return /* @__PURE__ */ React.createElement(
|
|
216
|
+
TinaMarkdown,
|
|
217
|
+
{
|
|
218
|
+
key: i2,
|
|
219
|
+
components: {
|
|
220
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
|
|
221
|
+
},
|
|
222
|
+
content: cell.children
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}));
|
|
226
|
+
})));
|
|
196
227
|
case "maybe_mdx":
|
|
197
228
|
return null;
|
|
198
229
|
case "html":
|
package/dist/rich-text/index.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, _f;
|
|
72
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
73
73
|
const { children, ...props } = child;
|
|
74
74
|
switch (child.type) {
|
|
75
75
|
case "h1":
|
|
@@ -149,33 +149,33 @@ const Node = ({ components, child }) => {
|
|
|
149
149
|
} else {
|
|
150
150
|
if (child.name === "table") {
|
|
151
151
|
const firstRowHeader = (_a = child.props) == null ? void 0 : _a.firstRowHeader;
|
|
152
|
-
const
|
|
152
|
+
const rows2 = (firstRowHeader ? (_b = child.props) == null ? void 0 : _b.tableRows.filter((_, i) => i !== 0) : (_c = child.props) == null ? void 0 : _c.tableRows) || [];
|
|
153
153
|
const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
|
|
154
|
-
const
|
|
155
|
-
const
|
|
154
|
+
const TableComponent2 = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }));
|
|
155
|
+
const TrComponent2 = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
156
156
|
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
return /* @__PURE__ */ React.createElement(
|
|
157
|
+
const TdComponent2 = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
158
|
+
const align2 = ((_f = child.props) == null ? void 0 : _f.align) || [];
|
|
159
|
+
return /* @__PURE__ */ React.createElement(TableComponent2, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent2, null, header.tableCells.map((c, i) => {
|
|
160
160
|
return /* @__PURE__ */ React.createElement(
|
|
161
161
|
TinaMarkdown,
|
|
162
162
|
{
|
|
163
163
|
key: i,
|
|
164
164
|
components: {
|
|
165
|
-
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align:
|
|
165
|
+
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align2[i], ...props2 })
|
|
166
166
|
},
|
|
167
167
|
content: c.value
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
|
-
}))), /* @__PURE__ */ React.createElement("tbody", null,
|
|
170
|
+
}))), /* @__PURE__ */ React.createElement("tbody", null, rows2.map((row, i) => {
|
|
171
171
|
var _a2;
|
|
172
|
-
return /* @__PURE__ */ React.createElement(
|
|
172
|
+
return /* @__PURE__ */ React.createElement(TrComponent2, { key: i }, (_a2 = row == null ? void 0 : row.tableCells) == null ? void 0 : _a2.map((c, i2) => {
|
|
173
173
|
return /* @__PURE__ */ React.createElement(
|
|
174
174
|
TinaMarkdown,
|
|
175
175
|
{
|
|
176
176
|
key: i2,
|
|
177
177
|
components: {
|
|
178
|
-
p: (props2) => /* @__PURE__ */ React.createElement(
|
|
178
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent2, { align: align2[i2], ...props2 })
|
|
179
179
|
},
|
|
180
180
|
content: c.value
|
|
181
181
|
}
|
|
@@ -190,6 +190,37 @@ const Node = ({ components, child }) => {
|
|
|
190
190
|
return /* @__PURE__ */ React.createElement("span", null, `No component provided for ${child.name}`);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
case "table":
|
|
194
|
+
const rows = child.children || [];
|
|
195
|
+
const TableComponent = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { style: { border: "1px solid #EDECF3" }, ...props2 }));
|
|
196
|
+
const TrComponent = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
197
|
+
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement(
|
|
198
|
+
"td",
|
|
199
|
+
{
|
|
200
|
+
style: {
|
|
201
|
+
textAlign: (props2 == null ? void 0 : props2.align) || "auto",
|
|
202
|
+
border: "1px solid #EDECF3",
|
|
203
|
+
padding: "0.25rem"
|
|
204
|
+
},
|
|
205
|
+
...props2
|
|
206
|
+
}
|
|
207
|
+
));
|
|
208
|
+
const align = ((_g = child.props) == null ? void 0 : _g.align) || [];
|
|
209
|
+
return /* @__PURE__ */ React.createElement(TableComponent, null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
|
|
210
|
+
var _a2;
|
|
211
|
+
return /* @__PURE__ */ React.createElement(TrComponent, { key: i }, (_a2 = row.children) == null ? void 0 : _a2.map((cell, i2) => {
|
|
212
|
+
return /* @__PURE__ */ React.createElement(
|
|
213
|
+
TinaMarkdown,
|
|
214
|
+
{
|
|
215
|
+
key: i2,
|
|
216
|
+
components: {
|
|
217
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
|
|
218
|
+
},
|
|
219
|
+
content: cell.children
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
}));
|
|
223
|
+
})));
|
|
193
224
|
case "maybe_mdx":
|
|
194
225
|
return null;
|
|
195
226
|
case "html":
|
package/dist/rich-text/prism.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
prismReactRenderer.Highlight,
|
|
8
8
|
{
|
|
9
9
|
theme: prismReactRenderer.themes[props.theme || "github"],
|
|
10
|
-
code: props.value,
|
|
10
|
+
code: props.value || "",
|
|
11
11
|
language: props.lang || ""
|
|
12
12
|
},
|
|
13
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 }) })))))
|
package/dist/rich-text/prism.mjs
CHANGED
|
@@ -5,7 +5,7 @@ const Prism = (props) => {
|
|
|
5
5
|
Highlight,
|
|
6
6
|
{
|
|
7
7
|
theme: themes[props.theme || "github"],
|
|
8
|
-
code: props.value,
|
|
8
|
+
code: props.value || "",
|
|
9
9
|
language: props.lang || ""
|
|
10
10
|
},
|
|
11
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 }) })))))
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: 'default' | 'destructive';
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -4,6 +4,6 @@ export interface PasswordFieldProps extends a {
|
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const passwordFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded
|
|
7
|
+
export declare const passwordFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded";
|
|
8
8
|
export declare const BasePasswordField: React.ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -7,5 +7,5 @@ interface ReferenceSelectProps {
|
|
|
7
7
|
input: any;
|
|
8
8
|
field: ReferenceFieldProps & Field;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const Combobox: React.FC<ReferenceSelectProps>;
|
|
11
|
+
export default Combobox;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Field } from '../../forms';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
type Option = {
|
|
4
4
|
value: string;
|
|
5
5
|
label: string;
|
|
@@ -18,6 +18,6 @@ export interface SelectProps {
|
|
|
18
18
|
options?: (Option | string)[];
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const selectFieldClasses = "shadow appearance-none bg-white block pl-3 pr-8 py-2 truncate w-full text-base cursor-pointer border border-gray-200 focus:outline-none focus:shadow-outline focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded
|
|
21
|
+
export declare const selectFieldClasses = "shadow appearance-none bg-white block pl-3 pr-8 py-2 truncate w-full text-base cursor-pointer border border-gray-200 focus:outline-none focus:shadow-outline focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded";
|
|
22
22
|
export declare const Select: React.FC<SelectProps>;
|
|
23
23
|
export {};
|
|
@@ -4,6 +4,6 @@ export interface TextFieldProps extends a {
|
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const textFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded
|
|
7
|
+
export declare const textFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded";
|
|
8
8
|
export declare const BaseTextField: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export {};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type InputFieldType } from '../wrap-field-with-meta';
|
|
3
|
-
import type { MdxTemplate } from './plate/types';
|
|
4
3
|
import type { InputProps } from '../../../fields/components';
|
|
5
|
-
import type { ToolbarOverrideType } from './plate/toolbar/toolbar-overrides';
|
|
4
|
+
import type { ToolbarOverrideType, ToolbarOverrides } from './plate/toolbar/toolbar-overrides';
|
|
5
|
+
import type { MdxTemplate } from './plate/types';
|
|
6
6
|
export type RichTextType = React.PropsWithChildren<InputFieldType<InputProps, {
|
|
7
7
|
templates: MdxTemplate[];
|
|
8
8
|
toolbarOverride?: ToolbarOverrideType[];
|
|
9
|
+
overrides?: ToolbarOverrides;
|
|
9
10
|
}>>;
|
|
10
11
|
export declare const MdxFieldPlugin: {
|
|
11
12
|
name: string;
|
|
12
13
|
Component: (props: InputFieldType<InputProps, {
|
|
13
14
|
templates: MdxTemplate[];
|
|
14
15
|
toolbarOverride?: ToolbarOverrideType[];
|
|
16
|
+
overrides?: ToolbarOverrides;
|
|
15
17
|
}>) => React.JSX.Element;
|
|
16
18
|
};
|
|
17
19
|
export declare const MdxFieldPluginExtendible: {
|
|
@@ -20,5 +22,6 @@ export declare const MdxFieldPluginExtendible: {
|
|
|
20
22
|
Component: (props: InputFieldType<InputProps, {
|
|
21
23
|
templates: MdxTemplate[];
|
|
22
24
|
toolbarOverride?: ToolbarOverrideType[];
|
|
25
|
+
overrides?: ToolbarOverrides;
|
|
23
26
|
}>) => React.JSX.Element;
|
|
24
27
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const IndentListToolbarButton: React.ForwardRefExoticComponent<{
|
|
4
|
-
nodeType?: typeof ELEMENT_UL | typeof ELEMENT_OL;
|
|
5
|
-
} & Omit<Omit<{
|
|
2
|
+
export declare const UnorderedListToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
6
3
|
tooltip?: React.ReactNode;
|
|
7
4
|
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
8
5
|
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
@@ -16,4 +13,19 @@ export declare const IndentListToolbarButton: React.ForwardRefExoticComponent<{
|
|
|
16
13
|
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
17
14
|
size?: "default" | "sm" | "lg";
|
|
18
15
|
variant?: "default" | "outline";
|
|
19
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">,
|
|
16
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, never> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export declare const OrderedListToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
18
|
+
tooltip?: React.ReactNode;
|
|
19
|
+
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
20
|
+
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
21
|
+
} & Omit<{
|
|
22
|
+
isDropdown?: boolean;
|
|
23
|
+
pressed?: boolean;
|
|
24
|
+
showArrow?: boolean;
|
|
25
|
+
} & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
26
|
+
size?: "default" | "sm" | "lg";
|
|
27
|
+
variant?: "default" | "outline";
|
|
28
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
29
|
+
size?: "default" | "sm" | "lg";
|
|
30
|
+
variant?: "default" | "outline";
|
|
31
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, never> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tooltip?: React.ReactNode;
|
|
7
|
-
tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
|
|
8
|
-
tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
|
|
9
|
-
} & Omit<{
|
|
10
|
-
isDropdown?: boolean;
|
|
11
|
-
pressed?: boolean;
|
|
12
|
-
showArrow?: boolean;
|
|
13
|
-
} & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
14
|
-
size?: "default" | "sm" | "lg";
|
|
15
|
-
variant?: "default" | "outline";
|
|
16
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
|
|
17
|
-
size?: "default" | "sm" | "lg";
|
|
18
|
-
variant?: "default" | "outline";
|
|
19
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, "clear" | "nodeType"> & React.RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
export declare const BoldToolbarButton: () => React.JSX.Element;
|
|
3
|
+
export declare const StrikethroughToolbarButton: () => React.JSX.Element;
|
|
4
|
+
export declare const ItalicToolbarButton: () => React.JSX.Element;
|
|
5
|
+
export declare const CodeToolbarButton: () => React.JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const mediaResizeHandleVariants: (props?: {
|
|
3
|
+
direction?: "left" | "right";
|
|
4
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
5
|
+
export declare const ResizeHandle: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
6
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
options?: import("@udecode/plate-resizable").ResizeHandleOptions | undefined;
|
|
10
|
+
setProps?: ((hookProps: {
|
|
11
|
+
onMouseDown: React.MouseEventHandler<Element>;
|
|
12
|
+
onMouseOut: () => void;
|
|
13
|
+
onMouseOver: () => void;
|
|
14
|
+
onTouchEnd: () => void;
|
|
15
|
+
onTouchMove: () => void;
|
|
16
|
+
onTouchStart: React.TouchEventHandler<Element>;
|
|
17
|
+
}) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
|
|
18
|
+
state?: {
|
|
19
|
+
direction: import("@udecode/plate-resizable").ResizeDirection;
|
|
20
|
+
initialPosition: number;
|
|
21
|
+
initialSize: number;
|
|
22
|
+
isHorizontal: boolean;
|
|
23
|
+
isResizing: boolean;
|
|
24
|
+
onHover: (() => void) | undefined;
|
|
25
|
+
onHoverEnd: (() => void) | undefined;
|
|
26
|
+
onMouseDown: React.MouseEventHandler<Element> | undefined;
|
|
27
|
+
onResize: (event: import("@udecode/plate-resizable").ResizeEvent) => void;
|
|
28
|
+
onTouchStart: React.TouchEventHandler<Element> | undefined;
|
|
29
|
+
setInitialPosition: React.Dispatch<React.SetStateAction<number>>;
|
|
30
|
+
setInitialSize: React.Dispatch<React.SetStateAction<number>>;
|
|
31
|
+
setIsResizing: React.Dispatch<React.SetStateAction<boolean>>;
|
|
32
|
+
} | undefined;
|
|
33
|
+
style?: React.CSSProperties | undefined;
|
|
34
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> & React.RefAttributes<any>, "ref">, never> & React.RefAttributes<any>>;
|
|
35
|
+
export declare const Resizable: React.ForwardRefExoticComponent<Omit<{
|
|
36
|
+
options: import("@udecode/plate-resizable").ResizableOptions;
|
|
37
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
|
|
38
|
+
align?: "center" | "left" | "right";
|
|
39
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
|