tinacms 3.4.0 → 3.5.0
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/index.js +1697 -835
- package/dist/lib/posthog/index.d.ts +3 -0
- package/dist/lib/posthog/posthog.d.ts +33 -0
- package/dist/lib/posthog/posthogProvider.d.ts +39 -0
- package/dist/toolkit/components/ui/table.d.ts +13 -0
- package/dist/toolkit/plugin-branch-switcher/branch-selector-table.d.ts +11 -0
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +13 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +2 -17
- package/package.json +7 -5
- package/dist/lib/utils.d.ts +0 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const BranchSwitchedEvent: string;
|
|
2
|
+
export type BranchSwitchedPayload = {
|
|
3
|
+
branchName: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const SavedContentEvent: string;
|
|
6
|
+
export type SavedContentPayload = {
|
|
7
|
+
collection?: string;
|
|
8
|
+
documentPath?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const MediaManagerContentUploadedEvent: string;
|
|
11
|
+
export type MediaManagerContentUploadedPayload = Record<string, never>;
|
|
12
|
+
export declare const MediaManagerContentDeletedEvent: string;
|
|
13
|
+
export type MediaManagerContentDeletedPayload = Record<string, never>;
|
|
14
|
+
export declare const RichTextEditorSwitchedEvent: string;
|
|
15
|
+
export type RichTextEditorSwitchedPayload = {
|
|
16
|
+
to: 'markdown' | 'richtext';
|
|
17
|
+
};
|
|
18
|
+
export declare const ProjectConfigNavigatedToFromWebsiteEvent: string;
|
|
19
|
+
export type ProjectConfigNavigatedToFromWebsitePayload = Record<string, never>;
|
|
20
|
+
export declare const UserManagementNavigatedToFromWebsiteEvent: string;
|
|
21
|
+
export type UserManagementNavigatedToFromWebsitePayload = Record<string, never>;
|
|
22
|
+
export declare const TinaCMSStartedEvent: string;
|
|
23
|
+
export type TinaCMSStartedPayload = {
|
|
24
|
+
tinaCMSVersion: string;
|
|
25
|
+
system: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const CollectionListPageItemClickedEvent: string;
|
|
28
|
+
export type CollectionListPageItemClickedPayload = {
|
|
29
|
+
itemName: string;
|
|
30
|
+
itemType: 'collection' | 'folder' | 'document';
|
|
31
|
+
};
|
|
32
|
+
export declare const CollectionListPageSearchEvent: string;
|
|
33
|
+
export declare const EventLogPageViewedEvent: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PostHog } from 'posthog-js';
|
|
2
|
+
import type { TelemetryMode } from '@tinacms/schema-tools';
|
|
3
|
+
export type { TelemetryMode };
|
|
4
|
+
/**
|
|
5
|
+
* Get the current telemetry mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTelemetryMode(): TelemetryMode;
|
|
8
|
+
/**
|
|
9
|
+
* Check if telemetry is enabled (anonymous mode).
|
|
10
|
+
* In anonymous mode, events are captured but without user/project identification.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isAnonymousMode(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Initialize PostHog client for browser-side analytics.
|
|
15
|
+
* Fetches config from TinaCloud identity service.
|
|
16
|
+
* Call this once at app startup (e.g., in TinaCloudProvider or TinaAdmin).
|
|
17
|
+
*
|
|
18
|
+
* @param mode - The telemetry mode from user config. Defaults to 'anonymous'.
|
|
19
|
+
*/
|
|
20
|
+
export declare function initializePostHog(mode?: TelemetryMode): Promise<PostHog | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the PostHog client instance.
|
|
23
|
+
* Returns null if not initialized.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getPostHogClient(): PostHog | null;
|
|
26
|
+
/**
|
|
27
|
+
* Identify a user in PostHog.
|
|
28
|
+
* Call this after authentication.
|
|
29
|
+
*/
|
|
30
|
+
export declare function identifyUser(userId: string, properties?: Record<string, any>): void;
|
|
31
|
+
/**
|
|
32
|
+
* Reset PostHog identity.
|
|
33
|
+
* Call this on logout.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resetPostHog(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Capture an event in PostHog.
|
|
38
|
+
*/
|
|
39
|
+
export declare function captureEvent(event: string, properties?: Record<string, any>): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
3
|
+
wrapperClassName?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
6
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
7
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
8
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
9
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
10
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
11
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
12
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
13
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Branch } from './types';
|
|
3
|
+
interface BranchSelectorTableProps {
|
|
4
|
+
branchList: Branch[];
|
|
5
|
+
currentBranch: string;
|
|
6
|
+
onChange: (branchName: string) => void;
|
|
7
|
+
refreshBranchList: () => void;
|
|
8
|
+
createBranch: () => void;
|
|
9
|
+
}
|
|
10
|
+
export default function BranchSelectorTable({ branchList, currentBranch, onChange, refreshBranchList, createBranch, }: BranchSelectorTableProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Branch, BranchSwitcherProps } from './types';
|
|
3
|
+
export declare const tableHeadingStyle = "px-3 py-3 text-left text-xs font-bold text-gray-700 tracking-wider sticky top-0 bg-gray-100 z-20 border-b-2 border-gray-200 ";
|
|
3
4
|
export declare function formatBranchName(str: string): string;
|
|
4
5
|
export declare const BranchSwitcher: (props: BranchSwitcherProps) => React.JSX.Element;
|
|
5
6
|
export declare const EditoralBranchSwitcher: ({ listBranches, createBranch, chooseBranch, setModalTitle, }: BranchSwitcherProps) => React.JSX.Element;
|
|
6
7
|
export declare const getFilteredBranchList: (branchList: Branch[], search: string, currentBranchName: string, filter?: "content" | "all") => Branch[];
|
|
8
|
+
export declare const sortBranchListFn: (sortValue: "default" | "updated" | "name") => (a: Branch, b: Branch) => number;
|
|
9
|
+
export declare const extractPullRequestId: (url: string) => string;
|
|
10
|
+
export declare const BranchItem: ({ branch, currentBranch, onChange, refreshBranchList, previewFunction, cms, selectedBranch, onSelectBranch, }: {
|
|
11
|
+
branch: Branch;
|
|
12
|
+
currentBranch: string;
|
|
13
|
+
onChange: (branchName: string) => void;
|
|
14
|
+
refreshBranchList: () => void;
|
|
15
|
+
previewFunction?: any;
|
|
16
|
+
cms: any;
|
|
17
|
+
selectedBranch: string | null;
|
|
18
|
+
onSelectBranch: (branchName: string | null) => void;
|
|
19
|
+
}) => React.JSX.Element;
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import type { TinaState } from '../../tina-state';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
type FormListItem = TinaState['formLists'][number]['items'][number];
|
|
4
|
-
export interface FormsListProps {
|
|
5
|
-
formList: FormListItem[];
|
|
6
|
-
setActiveFormId(id: string): void;
|
|
7
|
-
isEditing: boolean;
|
|
8
|
-
hidden?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const FormListItem: ({ item, depth, setActiveFormId, }: {
|
|
11
|
-
item: Extract<FormListItem, {
|
|
12
|
-
type: "document";
|
|
13
|
-
}>;
|
|
14
|
-
depth: number;
|
|
15
|
-
setActiveFormId: (id: string) => void;
|
|
16
|
-
}) => React.JSX.Element;
|
|
17
3
|
export declare const FormLists: (props: {
|
|
18
|
-
|
|
4
|
+
lastActiveFormId: string | null;
|
|
19
5
|
}) => React.JSX.Element;
|
|
20
6
|
export declare const FormList: (props: {
|
|
21
|
-
isEditing: boolean;
|
|
22
7
|
setActiveFormId: (id: string) => void;
|
|
23
8
|
formList: TinaState["formLists"][number];
|
|
9
|
+
showReferences: boolean;
|
|
24
10
|
}) => React.JSX.Element;
|
|
25
|
-
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "tinacms",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"typings": "dist/index.d.ts",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.5.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@radix-ui/react-toolbar": "^1.1.2",
|
|
54
54
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
55
|
"@react-hook/window-size": "^3.1.1",
|
|
56
|
+
"@tanstack/react-table": "^8.21.3",
|
|
56
57
|
"@udecode/cmdk": "^0.2.1",
|
|
57
58
|
"@udecode/cn": "^48.0.3",
|
|
58
59
|
"@udecode/plate": "^48.0.3",
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
"moment": "2.29.4",
|
|
97
98
|
"moment-timezone": "^0.6.0",
|
|
98
99
|
"monaco-editor": "0.31.0",
|
|
100
|
+
"posthog-js": "^1.347.1",
|
|
99
101
|
"prism-react-renderer": "^2.4.1",
|
|
100
102
|
"prop-types": "15.7.2",
|
|
101
103
|
"react-colorful": "^5.6.1",
|
|
@@ -110,9 +112,9 @@
|
|
|
110
112
|
"webfontloader": "1.6.28",
|
|
111
113
|
"yup": "^1.6.1",
|
|
112
114
|
"zod": "^3.24.2",
|
|
113
|
-
"@tinacms/mdx": "2.0.
|
|
114
|
-
"@tinacms/schema-tools": "2.
|
|
115
|
-
"@tinacms/search": "1.2.
|
|
115
|
+
"@tinacms/mdx": "2.0.6",
|
|
116
|
+
"@tinacms/schema-tools": "2.6.0",
|
|
117
|
+
"@tinacms/search": "1.2.3"
|
|
116
118
|
},
|
|
117
119
|
"devDependencies": {
|
|
118
120
|
"@graphql-tools/utils": "^10.8.1",
|
|
@@ -140,7 +142,7 @@
|
|
|
140
142
|
"typescript": "^5.7.3",
|
|
141
143
|
"vite": "^5.4.14",
|
|
142
144
|
"vitest": "^2.1.9",
|
|
143
|
-
"@tinacms/scripts": "1.
|
|
145
|
+
"@tinacms/scripts": "1.5.0"
|
|
144
146
|
},
|
|
145
147
|
"peerDependencies": {
|
|
146
148
|
"react": ">=16.14.0",
|
package/dist/lib/utils.d.ts
DELETED