tinacms 0.0.0-df15996-20250420014759 → 0.0.0-e024aec-20250526035050
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/admin/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/auth/authenticate.d.ts +1 -1
- package/dist/client.d.ts +4 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +2260 -2210
- package/dist/index.mjs +2249 -2199
- package/dist/internalClient/authProvider.d.ts +0 -2
- package/dist/react.d.ts +34 -1
- package/dist/rich-text/index.d.ts +142 -1
- package/dist/rich-text/prism.d.ts +10 -1
- package/dist/rich-text/prism.js +1 -1
- package/dist/rich-text/prism.mjs +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
- package/dist/toolkit/form-builder/form-builder.d.ts +11 -0
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/package.json +7 -7
|
@@ -33,7 +33,6 @@ export declare class TinaCloudAuthProvider extends AbstractAuthProvider {
|
|
|
33
33
|
clientId: string;
|
|
34
34
|
identityApiUrl: string;
|
|
35
35
|
frontendUrl: string;
|
|
36
|
-
oauth2: boolean;
|
|
37
36
|
token: string;
|
|
38
37
|
setToken: (_token: TokenObject) => void;
|
|
39
38
|
getToken: () => Promise<TokenObject>;
|
|
@@ -43,7 +42,6 @@ export declare class TinaCloudAuthProvider extends AbstractAuthProvider {
|
|
|
43
42
|
tokenStorage?: 'MEMORY' | 'LOCAL_STORAGE' | 'CUSTOM';
|
|
44
43
|
getTokenFn?: () => Promise<TokenObject>;
|
|
45
44
|
frontendUrl: string;
|
|
46
|
-
oauth2?: boolean;
|
|
47
45
|
});
|
|
48
46
|
authenticate(): Promise<TokenObject>;
|
|
49
47
|
getUser(): Promise<any>;
|
package/dist/react.d.ts
CHANGED
|
@@ -1 +1,34 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useTina<T extends object>(props: {
|
|
2
|
+
query: string;
|
|
3
|
+
variables: object;
|
|
4
|
+
data: T;
|
|
5
|
+
experimental___selectFormByFormId?: () => string | false | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
data: T;
|
|
8
|
+
isClient: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function useEditState(): {
|
|
11
|
+
edit: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Grab the field name for the given attribute
|
|
15
|
+
* to signal to Tina which DOM element the field
|
|
16
|
+
* is working with.
|
|
17
|
+
*/
|
|
18
|
+
export declare const tinaField: <T extends (object & {
|
|
19
|
+
_content_source?: {
|
|
20
|
+
queryId: string;
|
|
21
|
+
path: (number | string)[];
|
|
22
|
+
};
|
|
23
|
+
}) | undefined | null>(object: T, property?: keyof Omit<NonNullable<T>, "__typename" | "_sys">, index?: number) => string;
|
|
24
|
+
export declare const addMetadata: <T extends object>(id: string, object: T & {
|
|
25
|
+
type?: string;
|
|
26
|
+
_content_source?: unknown;
|
|
27
|
+
}, path: (string | number)[]) => T;
|
|
28
|
+
/**
|
|
29
|
+
* This is a pretty rudimentary approach to hashing the query and variables to
|
|
30
|
+
* ensure we treat multiple queries on the page uniquely. It's possible
|
|
31
|
+
* that we would have collisions, and I'm not sure of the likeliness but seems
|
|
32
|
+
* like it'd be rare.
|
|
33
|
+
*/
|
|
34
|
+
export declare const hashFromQuery: (input: string) => string;
|
|
@@ -1 +1,142 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
type BaseComponents = {
|
|
6
|
+
h1?: {
|
|
7
|
+
children: JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
h2?: {
|
|
10
|
+
children: JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
h3?: {
|
|
13
|
+
children: JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
h4?: {
|
|
16
|
+
children: JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
h5?: {
|
|
19
|
+
children: JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
h6?: {
|
|
22
|
+
children: JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
p?: {
|
|
25
|
+
children: JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
a?: {
|
|
28
|
+
url: string;
|
|
29
|
+
children: JSX.Element;
|
|
30
|
+
};
|
|
31
|
+
italic?: {
|
|
32
|
+
children: JSX.Element;
|
|
33
|
+
};
|
|
34
|
+
bold?: {
|
|
35
|
+
children: JSX.Element;
|
|
36
|
+
};
|
|
37
|
+
strikethrough?: {
|
|
38
|
+
children: JSX.Element;
|
|
39
|
+
};
|
|
40
|
+
underline?: {
|
|
41
|
+
children: JSX.Element;
|
|
42
|
+
};
|
|
43
|
+
code?: {
|
|
44
|
+
children: JSX.Element;
|
|
45
|
+
};
|
|
46
|
+
text?: {
|
|
47
|
+
children: string;
|
|
48
|
+
};
|
|
49
|
+
ul?: {
|
|
50
|
+
children: JSX.Element;
|
|
51
|
+
};
|
|
52
|
+
ol?: {
|
|
53
|
+
children: JSX.Element;
|
|
54
|
+
};
|
|
55
|
+
li?: {
|
|
56
|
+
children: JSX.Element;
|
|
57
|
+
};
|
|
58
|
+
lic?: {
|
|
59
|
+
children: JSX.Element;
|
|
60
|
+
};
|
|
61
|
+
block_quote?: {
|
|
62
|
+
children: JSX.Element;
|
|
63
|
+
};
|
|
64
|
+
code_block?: {
|
|
65
|
+
lang?: string;
|
|
66
|
+
value: string;
|
|
67
|
+
};
|
|
68
|
+
mermaid?: {
|
|
69
|
+
value: string;
|
|
70
|
+
};
|
|
71
|
+
img?: {
|
|
72
|
+
url: string;
|
|
73
|
+
caption?: string;
|
|
74
|
+
alt?: string;
|
|
75
|
+
};
|
|
76
|
+
hr?: {};
|
|
77
|
+
break?: {};
|
|
78
|
+
maybe_mdx?: {
|
|
79
|
+
children: JSX.Element;
|
|
80
|
+
};
|
|
81
|
+
html?: {
|
|
82
|
+
value: string;
|
|
83
|
+
};
|
|
84
|
+
html_inline?: {
|
|
85
|
+
value: string;
|
|
86
|
+
};
|
|
87
|
+
table?: {
|
|
88
|
+
align?: ('left' | 'right' | 'center')[];
|
|
89
|
+
tableRows: {
|
|
90
|
+
tableCells: {
|
|
91
|
+
value: TinaMarkdownContent;
|
|
92
|
+
}[];
|
|
93
|
+
}[];
|
|
94
|
+
};
|
|
95
|
+
component_missing?: {
|
|
96
|
+
name: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
type BaseComponentSignature = {
|
|
100
|
+
[BK in keyof BaseComponents]: (props: BaseComponents[BK]) => JSX.Element;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Define the allowed components and their props
|
|
104
|
+
* ```ts
|
|
105
|
+
* const components:
|
|
106
|
+
* Components<{
|
|
107
|
+
* BlockQuote: {
|
|
108
|
+
* children: TinaMarkdownContent;
|
|
109
|
+
* authorName: string;
|
|
110
|
+
* };
|
|
111
|
+
* }> = {
|
|
112
|
+
* BlockQuote: (props: {
|
|
113
|
+
* children: TinaMarkdownContent;
|
|
114
|
+
* authorName: string;
|
|
115
|
+
* }) => {
|
|
116
|
+
* return (
|
|
117
|
+
* <div>
|
|
118
|
+
* <blockquote>
|
|
119
|
+
* <TinaMarkdown content={props.children} />
|
|
120
|
+
* {props.authorName}
|
|
121
|
+
* </blockquote>
|
|
122
|
+
* </div>
|
|
123
|
+
* );
|
|
124
|
+
* }
|
|
125
|
+
* }
|
|
126
|
+
* }
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export type Components<ComponentAndProps extends object> = {
|
|
130
|
+
[K in keyof ComponentAndProps]: (props: ComponentAndProps[K]) => JSX.Element;
|
|
131
|
+
} & BaseComponentSignature;
|
|
132
|
+
export type TinaMarkdownContent = {
|
|
133
|
+
type: string;
|
|
134
|
+
children: TinaMarkdownContent[];
|
|
135
|
+
};
|
|
136
|
+
export declare const TinaMarkdown: <CustomComponents extends {
|
|
137
|
+
[key: string]: object;
|
|
138
|
+
} = any>({ content, components, }: {
|
|
139
|
+
content: TinaMarkdownContent | TinaMarkdownContent[];
|
|
140
|
+
components?: Components<{}> | Components<{ [BK in keyof CustomComponents]: (props: CustomComponents[BK]) => JSX.Element; }>;
|
|
141
|
+
}) => React.JSX.Element;
|
|
142
|
+
export {};
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { themes } from 'prism-react-renderer';
|
|
6
|
+
export declare const Prism: (props: {
|
|
7
|
+
value: string;
|
|
8
|
+
lang?: string;
|
|
9
|
+
theme?: keyof typeof themes;
|
|
10
|
+
}) => React.JSX.Element;
|
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 }) })))))
|
|
@@ -19,6 +19,10 @@ export declare const FormWrapper: ({ header, children, id, }: {
|
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
id: string;
|
|
21
21
|
}) => React.JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* Original misspelt version of CreateBranchModal
|
|
25
|
+
*/
|
|
22
26
|
export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, values, crudType, }: {
|
|
23
27
|
safeSubmit: () => Promise<void>;
|
|
24
28
|
close: () => void;
|
|
@@ -26,6 +30,13 @@ export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, valu
|
|
|
26
30
|
values: Record<string, unknown>;
|
|
27
31
|
crudType: string;
|
|
28
32
|
}) => React.JSX.Element;
|
|
33
|
+
export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crudType, }: {
|
|
34
|
+
safeSubmit: () => Promise<void>;
|
|
35
|
+
close: () => void;
|
|
36
|
+
path: string;
|
|
37
|
+
values: Record<string, unknown>;
|
|
38
|
+
crudType: string;
|
|
39
|
+
}) => React.JSX.Element;
|
|
29
40
|
export declare const PrefixedTextField: ({ prefix, ...props }: {
|
|
30
41
|
[x: string]: any;
|
|
31
42
|
prefix?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { Alerts, type EventsToAlerts } from './alerts';
|
|
1
2
|
import { CMS, type CMSConfig, type PluginType } from './core';
|
|
2
3
|
import type { FieldPlugin } from './form-builder';
|
|
3
|
-
import type { ScreenPlugin } from './react-screens';
|
|
4
4
|
import type { Form } from './forms';
|
|
5
|
-
import {
|
|
5
|
+
import type { ScreenPlugin } from './react-screens';
|
|
6
6
|
import { SidebarState, type SidebarStateOptions } from './react-sidebar';
|
|
7
|
-
import type { TinaAction, TinaState } from './tina-state';
|
|
8
7
|
import type { Client } from '../internalClient';
|
|
8
|
+
import type { TinaAction, TinaState } from './tina-state';
|
|
9
9
|
export interface TinaCMSConfig extends CMSConfig {
|
|
10
10
|
sidebar?: SidebarStateOptions | boolean;
|
|
11
11
|
alerts?: EventsToAlerts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-e024aec-20250526035050",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@graphql-inspector/core": "^6.2.1",
|
|
67
67
|
"@headlessui/react": "2.1.8",
|
|
68
68
|
"@heroicons/react": "^1.0.6",
|
|
69
|
-
"@monaco-editor/react": "4.
|
|
69
|
+
"@monaco-editor/react": "4.7.0-rc.0",
|
|
70
70
|
"@radix-ui/react-checkbox": "^1.1.4",
|
|
71
71
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
72
72
|
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@radix-ui/react-separator": "^1.1.2",
|
|
75
75
|
"@radix-ui/react-slot": "^1.1.2",
|
|
76
76
|
"@radix-ui/react-toolbar": "^1.1.2",
|
|
77
|
-
"@radix-ui/react-tooltip": "^1.
|
|
77
|
+
"@radix-ui/react-tooltip": "^1.2.6",
|
|
78
78
|
"@react-hook/window-size": "^3.1.1",
|
|
79
79
|
"@udecode/cn": "^33.0.0",
|
|
80
80
|
"@udecode/plate": "^36.5.9",
|
|
@@ -129,9 +129,9 @@
|
|
|
129
129
|
"webfontloader": "1.6.28",
|
|
130
130
|
"yup": "^1.6.1",
|
|
131
131
|
"zod": "^3.24.2",
|
|
132
|
-
"@tinacms/mdx": "
|
|
133
|
-
"@tinacms/search": "0.0.0-
|
|
134
|
-
"@tinacms/schema-tools": "
|
|
132
|
+
"@tinacms/mdx": "1.6.2",
|
|
133
|
+
"@tinacms/search": "0.0.0-e024aec-20250526035050",
|
|
134
|
+
"@tinacms/schema-tools": "1.7.3"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@graphql-tools/utils": "^10.8.1",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"typescript": "^5.7.3",
|
|
165
165
|
"vite": "^5.4.14",
|
|
166
166
|
"vitest": "^2.1.9",
|
|
167
|
-
"@tinacms/scripts": "
|
|
167
|
+
"@tinacms/scripts": "0.0.0-e024aec-20250526035050"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"react": ">=16.14.0",
|