tinacms 0.0.0-d80714b-20241205222511 → 0.0.0-de1bef5-20250124020627
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 +72 -45
- package/dist/client.mjs +49 -35
- package/dist/index.js +132 -260
- package/dist/index.mjs +144 -272
- package/dist/{node-cache-4c336858.mjs → node-cache-5e8db9f0.mjs} +23 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
- package/dist/unifiedClient/index.d.ts +8 -1
- package/package.json +6 -6
|
@@ -6,3 +6,7 @@ export declare const EMBED_ICON_WIDTH = 78;
|
|
|
6
6
|
export declare const CONTAINER_MD_BREAKPOINT = 448;
|
|
7
7
|
export declare const FLOAT_BUTTON_WIDTH = 25;
|
|
8
8
|
export declare const HEADING_LABEL = "Headings";
|
|
9
|
+
export type ToolbarOverrides = {
|
|
10
|
+
toolbar?: ToolbarOverrideType[];
|
|
11
|
+
showFloatingToolbar?: boolean;
|
|
12
|
+
};
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import type { Form } from '../../../../../forms';
|
|
4
4
|
import type { MdxTemplate } from '../types';
|
|
5
|
-
import type { ToolbarOverrideType } from './toolbar-overrides';
|
|
5
|
+
import type { ToolbarOverrides, ToolbarOverrideType } from './toolbar-overrides';
|
|
6
6
|
interface ToolbarContextProps {
|
|
7
7
|
tinaForm: Form;
|
|
8
8
|
templates: MdxTemplate[];
|
|
9
|
-
overrides: ToolbarOverrideType[];
|
|
9
|
+
overrides: ToolbarOverrideType[] | ToolbarOverrides;
|
|
10
10
|
}
|
|
11
11
|
interface ToolbarProviderProps extends ToolbarContextProps {
|
|
12
12
|
children: ReactNode;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import AsyncLock from 'async-lock';
|
|
2
|
+
import type { GraphQLError } from 'graphql';
|
|
1
3
|
import type { Config } from '@tinacms/schema-tools';
|
|
2
4
|
import type { Cache } from '../cache/index';
|
|
3
5
|
export declare const TINA_HOST = "content.tinajs.io";
|
|
@@ -25,12 +27,17 @@ export declare class TinaClient<GenQueries> {
|
|
|
25
27
|
queries: GenQueries;
|
|
26
28
|
errorPolicy: Config['client']['errorPolicy'];
|
|
27
29
|
initialized: boolean;
|
|
30
|
+
cacheLock: AsyncLock | undefined;
|
|
28
31
|
cacheDir: string;
|
|
29
32
|
cache: Cache;
|
|
30
33
|
constructor({ token, url, queries, errorPolicy, cacheDir, }: TinaClientArgs<GenQueries>);
|
|
31
34
|
init(): Promise<void>;
|
|
32
35
|
request<DataType extends Record<string, any> = any>({ errorPolicy, ...args }: TinaClientRequestArgs, options: {
|
|
33
36
|
fetchOptions?: Parameters<typeof fetch>[1];
|
|
34
|
-
}): Promise<
|
|
37
|
+
}): Promise<{
|
|
38
|
+
data: DataType;
|
|
39
|
+
errors: GraphQLError[] | null;
|
|
40
|
+
query: string;
|
|
41
|
+
}>;
|
|
35
42
|
}
|
|
36
43
|
export declare function createClient<GenQueries>(args: TinaClientArgs<GenQueries>): TinaClient<GenQueries>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-de1bef5-20250124020627",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -92,13 +92,13 @@
|
|
|
92
92
|
"@udecode/plate-resizable": "36.0.0",
|
|
93
93
|
"@udecode/plate-slash-command": "^36.0.0",
|
|
94
94
|
"@udecode/plate-table": "36.5.8",
|
|
95
|
+
"async-lock": "^1.4.1",
|
|
95
96
|
"class-variance-authority": "^0.7.0",
|
|
96
97
|
"clsx": "^2.1.1",
|
|
97
98
|
"cmdk": "^1.0.4",
|
|
98
99
|
"color-string": "^1.9.1",
|
|
99
100
|
"crypto-js": "^4.2.0",
|
|
100
101
|
"date-fns": "2.30.0",
|
|
101
|
-
"fetch-ponyfill": "^7.1.0",
|
|
102
102
|
"final-form": "4.20.10",
|
|
103
103
|
"final-form-arrays": "^3.1.0",
|
|
104
104
|
"final-form-set-field-data": "^1.0.2",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"react-dropzone": "14.2.3",
|
|
120
120
|
"react-final-form": "^6.5.9",
|
|
121
121
|
"react-icons": "^5.3.0",
|
|
122
|
-
"react-onclickoutside": "^6.13.1",
|
|
123
122
|
"react-router-dom": "6.3.0",
|
|
123
|
+
"react-use": "^17.6.0",
|
|
124
124
|
"slate": "^0.103.0",
|
|
125
125
|
"slate-history": "^0.100.0",
|
|
126
126
|
"slate-hyperscript": "^0.100.0",
|
|
@@ -129,9 +129,9 @@
|
|
|
129
129
|
"webfontloader": "1.6.28",
|
|
130
130
|
"yup": "^1.4.0",
|
|
131
131
|
"zod": "^3.23.8",
|
|
132
|
-
"@tinacms/mdx": "1.5.
|
|
133
|
-
"@tinacms/
|
|
134
|
-
"@tinacms/
|
|
132
|
+
"@tinacms/mdx": "1.5.4",
|
|
133
|
+
"@tinacms/schema-tools": "1.7.0",
|
|
134
|
+
"@tinacms/search": "1.0.37"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@graphql-tools/utils": "^10.5.6",
|