tinacms 2.7.3 → 2.7.4
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/GetCollection.d.ts +2 -2
- package/dist/client.d.ts +1 -4
- package/dist/index.d.ts +1 -61
- package/dist/index.js +516 -442
- package/dist/index.mjs +515 -441
- package/dist/react.d.ts +1 -34
- package/dist/react.js +3 -0
- package/dist/react.mjs +3 -0
- package/dist/rich-text/index.d.ts +1 -142
- package/dist/rich-text/prism.d.ts +1 -10
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
- 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/sidebar.d.ts +2 -2
- package/dist/toolkit/tina-state.d.ts +4 -0
- package/package.json +2 -2
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
package/dist/react.d.ts
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
export
|
|
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
|
+
export * from "../src/react"
|
package/dist/react.js
CHANGED
package/dist/react.mjs
CHANGED
|
@@ -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
|
+
export * from "../../src/rich-text/index"
|
|
@@ -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;
|
|
1
|
+
export * from "../../src/rich-text/prism"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Form } from '../../forms';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface FormsViewProps {
|
|
4
|
+
loadingPlaceholder?: React.FC;
|
|
5
|
+
}
|
|
6
|
+
export declare const FormsView: ({ loadingPlaceholder }?: FormsViewProps) => React.JSX.Element;
|
|
6
7
|
export interface MultiformFormHeaderProps {
|
|
7
8
|
activeForm: {
|
|
8
9
|
activeFieldName?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventBus, Callback } from '../core';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { Callback, EventBus } from '../core';
|
|
3
3
|
export interface SidebarStateOptions {
|
|
4
4
|
position?: SidebarPosition;
|
|
5
5
|
buttons?: SidebarButtons;
|
|
@@ -22,7 +22,7 @@ export declare type DefaultSidebarState = 'open' | 'closed';
|
|
|
22
22
|
export declare class SidebarState {
|
|
23
23
|
private events;
|
|
24
24
|
private _isOpen;
|
|
25
|
-
|
|
25
|
+
loadingPlaceholder: React.FC;
|
|
26
26
|
defaultState: DefaultSidebarState;
|
|
27
27
|
position: SidebarPosition;
|
|
28
28
|
renderNav: boolean;
|
|
@@ -58,6 +58,9 @@ export type TinaAction = {
|
|
|
58
58
|
} | {
|
|
59
59
|
type: 'sidebar:set-display-state';
|
|
60
60
|
value: TinaState['sidebarDisplayState'] | 'openOrFull';
|
|
61
|
+
} | {
|
|
62
|
+
type: 'sidebar:set-loading-state';
|
|
63
|
+
value: boolean;
|
|
61
64
|
};
|
|
62
65
|
export interface TinaState {
|
|
63
66
|
activeFormId: string | null;
|
|
@@ -76,6 +79,7 @@ export interface TinaState {
|
|
|
76
79
|
}[];
|
|
77
80
|
formLists: FormList[];
|
|
78
81
|
editingMode: 'visual' | 'basic';
|
|
82
|
+
isLoadingContent: boolean;
|
|
79
83
|
quickEditSupported: boolean;
|
|
80
84
|
sidebarDisplayState: 'closed' | 'open' | 'fullscreen';
|
|
81
85
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"zod": "^3.24.2",
|
|
132
132
|
"@tinacms/mdx": "1.6.1",
|
|
133
133
|
"@tinacms/schema-tools": "1.7.2",
|
|
134
|
-
"@tinacms/search": "1.0.
|
|
134
|
+
"@tinacms/search": "1.0.42"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@graphql-tools/utils": "^10.8.1",
|