tinacms 0.0.0-a1ff961-20250623024558 → 0.0.0-a23fec8-20251217045135
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/api.d.ts +4 -1
- package/dist/auth/AuthModal.d.ts +1 -4
- package/dist/auth/TinaCloudProvider.d.ts +0 -1
- package/dist/cache/node-cache.d.ts +6 -2
- package/dist/client.js +240 -181
- package/dist/index.js +120164 -118241
- package/dist/internalClient/index.d.ts +55 -2
- package/dist/react.js +209 -210
- package/dist/rich-text/index.d.ts +6 -0
- package/dist/rich-text/index.js +234 -230
- package/dist/rich-text/prism.js +16 -18
- package/dist/rich-text/static.d.ts +154 -0
- package/dist/rich-text/{index.mjs → static.js} +90 -96
- package/dist/tina-cms.d.ts +1 -1
- package/dist/toolkit/components/ProgressBar.d.ts +11 -0
- package/dist/toolkit/components/media/media-item.d.ts +10 -0
- package/dist/toolkit/components/ui/button.d.ts +11 -0
- package/dist/toolkit/components/ui/calendar.d.ts +8 -0
- package/dist/toolkit/components/ui/date-time-picker.d.ts +111 -0
- package/dist/toolkit/components/ui/input.d.ts +3 -0
- package/dist/toolkit/components/ui/popover.d.ts +7 -0
- package/dist/toolkit/components/ui/select.d.ts +13 -0
- package/dist/toolkit/fields/components/color-picker/block-widget.d.ts +3 -0
- package/dist/toolkit/fields/components/color-picker/color-input.d.ts +35 -0
- package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +6 -2
- package/dist/toolkit/fields/components/color-picker/color-utils.d.ts +37 -0
- package/dist/toolkit/fields/components/color-picker/sketch-widget.d.ts +3 -0
- package/dist/toolkit/fields/components/select.d.ts +1 -1
- package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/color-field-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +0 -2
- package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +3 -1
- package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +7 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +20 -19
- package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
- package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
- package/dist/toolkit/form-builder/form-builder.d.ts +0 -11
- package/dist/toolkit/form-builder/index.d.ts +1 -0
- package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
- package/dist/toolkit/icons/index.d.ts +1 -0
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +3 -1
- package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
- package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/NavMenuTrigger.d.ts +11 -0
- package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/badge.d.ts +6 -0
- package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
- package/dist/toolkit/react-sidebar/components/nav-components.d.ts +11 -0
- package/dist/toolkit/react-sidebar/components/nav-context.d.ts +15 -0
- package/dist/toolkit/react-sidebar/components/nav.d.ts +3 -2
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +26 -1
- package/dist/toolkit/react-sidebar/index.d.ts +3 -0
- package/dist/toolkit/styles/button.d.ts +1 -1
- package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
- package/dist/toolkit/styles/index.d.ts +1 -0
- package/dist/unifiedClient/index.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/package.json +34 -65
- package/dist/admin/pages/IndexingPage.d.ts +0 -2
- package/dist/client.mjs +0 -132
- package/dist/index.mjs +0 -121720
- package/dist/node-cache-5e8db9f0.mjs +0 -63
- package/dist/react.mjs +0 -252
- package/dist/rich-text/prism.mjs +0 -16
- package/dist/toolkit/react-datetime/DateTime.d.ts +0 -135
- package/dist/toolkit/react-sidebar/components/alert.d.ts +0 -5
- /package/dist/admin/components/{Sidebar.d.ts → AdminNav.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const RadioGroupField: (props: import("./wrap-field-with-meta").InputFieldType<import("
|
|
1
|
+
export declare const RadioGroupField: (props: import("./wrap-field-with-meta").InputFieldType<import("..").RadioGroupProps, {}>) => import("react").JSX.Element;
|
|
2
2
|
export declare const RadioGroupFieldPlugin: {
|
|
3
3
|
name: string;
|
|
4
|
-
Component: (props: import("./wrap-field-with-meta").InputFieldType<import("
|
|
4
|
+
Component: (props: import("./wrap-field-with-meta").InputFieldType<import("..").RadioGroupProps, {}>) => import("react").JSX.Element;
|
|
5
5
|
validate(value: any, values: any, meta: any, field: any): string;
|
|
6
6
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const SelectField: (props: import("./wrap-field-with-meta").InputFieldType<import("
|
|
1
|
+
export declare const SelectField: (props: import("./wrap-field-with-meta").InputFieldType<import("..").SelectProps, {}>) => import("react").JSX.Element;
|
|
2
2
|
export declare const SelectFieldPlugin: {
|
|
3
3
|
name: string;
|
|
4
4
|
type: string;
|
|
5
|
-
Component: (props: import("./wrap-field-with-meta").InputFieldType<import("
|
|
5
|
+
Component: (props: import("./wrap-field-with-meta").InputFieldType<import("..").SelectProps, {}>) => import("react").JSX.Element;
|
|
6
6
|
parse: (value?: string) => string;
|
|
7
7
|
validate(value: any, values: any, meta: any, field: any): string;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const ToggleField: (props: import("./wrap-field-with-meta").InputFieldType<import("
|
|
1
|
+
export declare const ToggleField: (props: import("./wrap-field-with-meta").InputFieldType<import("..").ToggleProps, {}>) => import("react").JSX.Element;
|
|
2
2
|
export declare const ToggleFieldPlugin: {
|
|
3
3
|
name: string;
|
|
4
4
|
type: string;
|
|
5
|
-
Component: (props: import("./wrap-field-with-meta").InputFieldType<import("
|
|
5
|
+
Component: (props: import("./wrap-field-with-meta").InputFieldType<import("..").ToggleProps, {}>) => import("react").JSX.Element;
|
|
6
6
|
validate(value: any, values: any, meta: any, field: any): string;
|
|
7
7
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crudType, }: {
|
|
3
|
+
safeSubmit: () => Promise<void>;
|
|
4
|
+
close: () => void;
|
|
5
|
+
path: string;
|
|
6
|
+
values: Record<string, unknown>;
|
|
7
|
+
crudType: string;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export declare const PrefixedTextField: ({ label, prefix, ...props }: {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
label?: any;
|
|
12
|
+
prefix?: string;
|
|
13
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editorial Workflow Status Constants
|
|
3
|
+
* These match the server-side constants in tinacloud/js/content-api/src/editorial-workflow.ts
|
|
4
|
+
*/
|
|
5
|
+
export declare const EDITORIAL_WORKFLOW_STATUS: {
|
|
6
|
+
readonly QUEUED: "queued";
|
|
7
|
+
readonly PROCESSING: "processing";
|
|
8
|
+
readonly SETTING_UP: "setting_up";
|
|
9
|
+
readonly CREATING_BRANCH: "creating_branch";
|
|
10
|
+
readonly INDEXING: "indexing";
|
|
11
|
+
readonly CONTENT_GENERATION: "content_generation";
|
|
12
|
+
readonly CREATING_PR: "creating_pr";
|
|
13
|
+
readonly COMPLETE: "complete";
|
|
14
|
+
readonly ERROR: "error";
|
|
15
|
+
readonly TIMEOUT: "timeout";
|
|
16
|
+
};
|
|
17
|
+
export type EditorialWorkflowStatus = (typeof EDITORIAL_WORKFLOW_STATUS)[keyof typeof EDITORIAL_WORKFLOW_STATUS];
|
|
@@ -29,14 +29,3 @@ export declare const CreateBranchModel: ({ close, safeSubmit, relativePath, valu
|
|
|
29
29
|
values: Record<string, unknown>;
|
|
30
30
|
crudType: string;
|
|
31
31
|
}) => React.JSX.Element;
|
|
32
|
-
export declare const CreateBranchModal: ({ close, safeSubmit, path, values, crudType, }: {
|
|
33
|
-
safeSubmit: () => Promise<void>;
|
|
34
|
-
close: () => void;
|
|
35
|
-
path: string;
|
|
36
|
-
values: Record<string, unknown>;
|
|
37
|
-
crudType: string;
|
|
38
|
-
}) => React.JSX.Element;
|
|
39
|
-
export declare const PrefixedTextField: ({ prefix, ...props }: {
|
|
40
|
-
[x: string]: any;
|
|
41
|
-
prefix?: string;
|
|
42
|
-
}) => React.JSX.Element;
|
package/dist/toolkit/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type { TinaState } from './tina-state';
|
|
|
19
19
|
export * from './forms';
|
|
20
20
|
export * from './icons';
|
|
21
21
|
export * from './react-dismissible';
|
|
22
|
-
export { Nav, LocalWarning, BillingWarning, SyncStatusButton, } from './react-sidebar';
|
|
22
|
+
export { Nav, NavCloudLink, NavProvider, NavMenuTrigger, useNav, LocalWarning, BillingWarning, SyncStatusButton, } from './react-sidebar';
|
|
23
23
|
export { useCMS } from './react-core';
|
|
24
24
|
/**
|
|
25
25
|
* Custom `tinacms` things
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const BranchButton: (
|
|
2
|
+
export declare const BranchButton: ({ className }: {
|
|
3
|
+
className?: string;
|
|
4
|
+
}) => React.JSX.Element;
|
|
3
5
|
export declare const BranchPreviewButton: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface ModalHeaderProps {
|
|
3
|
-
children: React.
|
|
3
|
+
children: React.ReactNode;
|
|
4
4
|
close?(): void;
|
|
5
5
|
}
|
|
6
6
|
export declare const ModalHeader: ({ children, close }: ModalHeaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface NavMenuTriggerProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A button component that triggers the navigation menu
|
|
8
|
+
* Can be used anywhere within the NavProvider hierarchy
|
|
9
|
+
*/
|
|
10
|
+
export declare const NavMenuTrigger: React.FC<NavMenuTriggerProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const Badge: ({ children, calloutStyle, className, displayIcon, ...props }: {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
calloutStyle?: "warning" | "info" | "success" | "error";
|
|
5
|
+
displayIcon?: boolean;
|
|
6
|
+
} & React.HTMLProps<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CloudConfigPlugin } from '../../react-cloud-config';
|
|
3
|
+
interface NavCloudLinkProps {
|
|
4
|
+
config: CloudConfigPlugin;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Shared component for rendering cloud configuration links
|
|
8
|
+
* Used across both admin and sidebar navigation
|
|
9
|
+
*/
|
|
10
|
+
export declare const NavCloudLink: React.FC<NavCloudLinkProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface NavContextValue {
|
|
3
|
+
menuIsOpen: boolean;
|
|
4
|
+
toggleMenu: () => void;
|
|
5
|
+
openMenu: () => void;
|
|
6
|
+
closeMenu: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const NavContext: React.Context<NavContextValue>;
|
|
9
|
+
export declare const useNav: () => NavContextValue;
|
|
10
|
+
interface NavProviderProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
defaultOpen?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const NavProvider: React.FC<NavProviderProps>;
|
|
15
|
+
export {};
|
|
@@ -9,7 +9,8 @@ interface NavCollection {
|
|
|
9
9
|
interface NavProps {
|
|
10
10
|
isLocalMode: boolean;
|
|
11
11
|
showHamburger?: boolean;
|
|
12
|
-
|
|
12
|
+
menuIsOpen?: boolean;
|
|
13
|
+
toggleMenu?: () => void;
|
|
13
14
|
children?: any;
|
|
14
15
|
className?: string;
|
|
15
16
|
userName?: string;
|
|
@@ -40,5 +41,5 @@ interface NavProps {
|
|
|
40
41
|
};
|
|
41
42
|
}>;
|
|
42
43
|
}
|
|
43
|
-
export declare const Nav: ({ isLocalMode, showHamburger, toggleMenu, className, children, showCollections, collectionsInfo, screens, cloudConfigs, contentCreators, sidebarWidth, RenderNavSite, RenderNavCloud, RenderNavCollection, AuthRenderNavCollection, ...props }: NavProps) => React.JSX.Element;
|
|
44
|
+
export declare const Nav: ({ isLocalMode, showHamburger, menuIsOpen: menuIsOpenProp, toggleMenu: toggleMenuProp, className, children, showCollections, collectionsInfo, screens, cloudConfigs, contentCreators, sidebarWidth, RenderNavSite, RenderNavCloud, RenderNavCollection, AuthRenderNavCollection, ...props }: NavProps) => React.JSX.Element;
|
|
44
45
|
export {};
|
|
@@ -9,8 +9,33 @@ export interface FormHeaderProps {
|
|
|
9
9
|
activeFieldName?: string;
|
|
10
10
|
tinaForm: Form;
|
|
11
11
|
};
|
|
12
|
+
branch?: string;
|
|
13
|
+
isLocalMode?: boolean;
|
|
14
|
+
repoProvider?: {
|
|
15
|
+
defaultBranchName?: string;
|
|
16
|
+
historyUrl?: (context: {
|
|
17
|
+
relativePath: string;
|
|
18
|
+
branch: string;
|
|
19
|
+
}) => {
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const FormHeader: ({ activeForm, repoProvider, branch, isLocalMode, }: FormHeaderProps) => React.JSX.Element;
|
|
25
|
+
interface RepositoryProviderProps {
|
|
26
|
+
contentRelativePath: string;
|
|
27
|
+
tinaBranch?: string;
|
|
28
|
+
isLocalMode?: boolean;
|
|
29
|
+
defaultBranchName?: string;
|
|
30
|
+
historyUrl?: (context: {
|
|
31
|
+
relativePath: string;
|
|
32
|
+
branch: string;
|
|
33
|
+
}) => {
|
|
34
|
+
url: string;
|
|
35
|
+
};
|
|
12
36
|
}
|
|
13
|
-
export declare const
|
|
37
|
+
export declare const FileHistoryProvider: ({ contentRelativePath, tinaBranch, defaultBranchName, historyUrl, isLocalMode, }: RepositoryProviderProps) => React.JSX.Element;
|
|
14
38
|
export declare const FormBreadcrumbs: ({ rootBreadcrumbName, ...props }: {
|
|
15
39
|
rootBreadcrumbName?: string;
|
|
16
40
|
} & React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
41
|
+
export {};
|
|
@@ -3,3 +3,6 @@ export { SidebarProvider } from './components/sidebar';
|
|
|
3
3
|
export { Nav } from './components/nav';
|
|
4
4
|
export { LocalWarning, BillingWarning } from './components/local-warning';
|
|
5
5
|
export { SyncStatusButton } from './components/sync-status';
|
|
6
|
+
export { NavCloudLink } from './components/nav-components';
|
|
7
|
+
export { NavProvider, useNav } from './components/nav-context';
|
|
8
|
+
export { NavMenuTrigger } from './components/NavMenuTrigger';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
variant?: 'primary' | 'secondary' | 'white' | 'ghost' | 'danger' | 'custom';
|
|
3
|
+
variant?: 'primary' | 'secondary' | 'white' | 'ghost' | 'danger' | 'accent' | 'custom';
|
|
4
4
|
as?: React.ElementType;
|
|
5
5
|
href?: string;
|
|
6
6
|
target?: string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
export interface DropdownButtonItem {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
variant?: 'default' | 'destructive';
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DropdownButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
11
|
+
/**
|
|
12
|
+
* The main action to perform when the button is clicked
|
|
13
|
+
*/
|
|
14
|
+
onMainAction?: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Array of dropdown menu items
|
|
17
|
+
*/
|
|
18
|
+
items: DropdownButtonItem[];
|
|
19
|
+
/**
|
|
20
|
+
* Whether to show the dropdown arrow in a split button style
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showSplitButton?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Alignment of the dropdown menu
|
|
26
|
+
* @default 'end'
|
|
27
|
+
*/
|
|
28
|
+
align?: 'start' | 'center' | 'end';
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A button component that combines a primary action with a dropdown menu of additional options.
|
|
32
|
+
*
|
|
33
|
+
* This component follows the split-button pattern found in TinaCMS, where the main button
|
|
34
|
+
* performs a primary action and a small arrow button opens a dropdown menu with additional options.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Basic usage with split button
|
|
38
|
+
* <DropdownButton
|
|
39
|
+
* variant="primary"
|
|
40
|
+
* onMainAction={() => console.log('Save to new branch')}
|
|
41
|
+
* items={[
|
|
42
|
+
* { label: 'Save to protected branch', onClick: () => console.log('Protected') },
|
|
43
|
+
* { label: 'Save and publish', onClick: () => console.log('Publish') },
|
|
44
|
+
* ]}
|
|
45
|
+
* >
|
|
46
|
+
* Save to new branch
|
|
47
|
+
* </DropdownButton>
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Dropdown-only button (no main action)
|
|
51
|
+
* <DropdownButton
|
|
52
|
+
* variant="secondary"
|
|
53
|
+
* showSplitButton={false}
|
|
54
|
+
* items={[
|
|
55
|
+
* { label: 'Save to new branch', onClick: () => console.log('New branch') },
|
|
56
|
+
* { label: 'Save to protected branch', onClick: () => console.log('Protected') },
|
|
57
|
+
* ]}
|
|
58
|
+
* >
|
|
59
|
+
* Save options
|
|
60
|
+
* </DropdownButton>
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* // With icons and destructive action
|
|
64
|
+
* <DropdownButton
|
|
65
|
+
* variant="primary"
|
|
66
|
+
* onMainAction={() => console.log('Save')}
|
|
67
|
+
* items={[
|
|
68
|
+
* { label: 'Duplicate', onClick: () => console.log('Duplicate'), icon: <CopyIcon /> },
|
|
69
|
+
* { label: 'Delete', onClick: () => console.log('Delete'), variant: 'destructive', icon: <TrashIcon /> },
|
|
70
|
+
* ]}
|
|
71
|
+
* >
|
|
72
|
+
* Save
|
|
73
|
+
* </DropdownButton>
|
|
74
|
+
*/
|
|
75
|
+
export declare const DropdownButton: React.ForwardRefExoticComponent<DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -29,7 +29,7 @@ export declare class TinaClient<GenQueries> {
|
|
|
29
29
|
initialized: boolean;
|
|
30
30
|
cacheLock: AsyncLock | undefined;
|
|
31
31
|
cacheDir: string;
|
|
32
|
-
cache: Cache;
|
|
32
|
+
cache: Cache | null;
|
|
33
33
|
constructor({ token, url, queries, errorPolicy, cacheDir, }: TinaClientArgs<GenQueries>);
|
|
34
34
|
init(): Promise<void>;
|
|
35
35
|
request<DataType extends Record<string, any> = any>({ errorPolicy, ...args }: TinaClientRequestArgs, options: {
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -20,3 +20,4 @@ export interface CreateClientProps {
|
|
|
20
20
|
export declare const createClient: ({ clientId, isLocalClient, branch, tinaioConfig, schema, apiUrl, tinaGraphQLVersion, }: CreateClientProps) => Client;
|
|
21
21
|
export declare function assertShape<T>(value: unknown, yupSchema: (args: typeof yup) => yup.AnySchema, errorMessage?: string): asserts value is T;
|
|
22
22
|
export declare function safeAssertShape<T>(value: unknown, yupSchema: (args: typeof yup) => yup.AnySchema): boolean;
|
|
23
|
+
export declare const get: (obj: any, path: any, defaultValue?: any) => any;
|
package/package.json
CHANGED
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"typings": "dist/index.d.ts",
|
|
5
|
+
"version": "0.0.0-a23fec8-20251217045135",
|
|
4
6
|
"main": "dist/index.js",
|
|
5
|
-
"module": "./dist/index.
|
|
7
|
+
"module": "./dist/index.js",
|
|
6
8
|
"exports": {
|
|
7
|
-
".":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"./dist/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"require": "./dist/client.js"
|
|
16
|
-
},
|
|
17
|
-
"./dist/edit-state": {
|
|
18
|
-
"types": "./dist/edit-state.d.ts",
|
|
19
|
-
"import": "./dist/edit-state.mjs",
|
|
20
|
-
"require": "./dist/edit-state.js"
|
|
21
|
-
},
|
|
22
|
-
"./dist/react": {
|
|
23
|
-
"types": "./dist/react.d.ts",
|
|
24
|
-
"import": "./dist/react.mjs",
|
|
25
|
-
"require": "./dist/react.js"
|
|
26
|
-
},
|
|
27
|
-
"./dist/rich-text": {
|
|
28
|
-
"types": "./dist/rich-text/index.d.ts",
|
|
29
|
-
"import": "./dist/rich-text/index.mjs",
|
|
30
|
-
"require": "./dist/rich-text/index.js"
|
|
31
|
-
},
|
|
32
|
-
"./dist/rich-text/prism": {
|
|
33
|
-
"types": "./dist/rich-text/prism.d.ts",
|
|
34
|
-
"import": "./dist/rich-text/prism.mjs",
|
|
35
|
-
"require": "./dist/rich-text/prism.js"
|
|
36
|
-
}
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./dist/client": "./dist/client.js",
|
|
11
|
+
"./dist/edit-state": "./dist/edit-state.js",
|
|
12
|
+
"./react": "./dist/react.js",
|
|
13
|
+
"./dist/react": "./dist/react.js",
|
|
14
|
+
"./dist/rich-text": "./dist/rich-text/index.js",
|
|
15
|
+
"./dist/rich-text/static": "./dist/rich-text/static.js",
|
|
16
|
+
"./dist/rich-text/prism": "./dist/rich-text/prism.js"
|
|
37
17
|
},
|
|
38
18
|
"files": [
|
|
39
19
|
"dist"
|
|
@@ -42,25 +22,21 @@
|
|
|
42
22
|
"entryPoints": [
|
|
43
23
|
"src/index.ts",
|
|
44
24
|
"src/rich-text/index.tsx",
|
|
25
|
+
"src/rich-text/static.tsx",
|
|
45
26
|
"src/rich-text/prism.tsx",
|
|
46
27
|
"src/react.tsx",
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"rollupOptions": {
|
|
51
|
-
"external": [
|
|
52
|
-
"crypto",
|
|
53
|
-
"fs",
|
|
54
|
-
"path",
|
|
55
|
-
"os"
|
|
56
|
-
]
|
|
28
|
+
{
|
|
29
|
+
"name": "src/client.ts",
|
|
30
|
+
"target": "node"
|
|
57
31
|
}
|
|
58
|
-
|
|
32
|
+
]
|
|
59
33
|
},
|
|
60
|
-
"typings": "dist/index.d.ts",
|
|
61
34
|
"license": "Apache-2.0",
|
|
62
35
|
"dependencies": {
|
|
63
36
|
"@ariakit/react": "^0.4.15",
|
|
37
|
+
"@dnd-kit/core": "^6.1.0",
|
|
38
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
39
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
64
40
|
"@floating-ui/dom": "^1.6.13",
|
|
65
41
|
"@floating-ui/react-dom": "^2.1.2",
|
|
66
42
|
"@graphql-inspector/core": "^6.2.1",
|
|
@@ -70,11 +46,12 @@
|
|
|
70
46
|
"@radix-ui/react-checkbox": "^1.1.4",
|
|
71
47
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
72
48
|
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
73
|
-
"@radix-ui/react-popover": "^1.1.
|
|
49
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
50
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
74
51
|
"@radix-ui/react-separator": "^1.1.2",
|
|
75
52
|
"@radix-ui/react-slot": "^1.1.2",
|
|
76
53
|
"@radix-ui/react-toolbar": "^1.1.2",
|
|
77
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
54
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
78
55
|
"@react-hook/window-size": "^3.1.1",
|
|
79
56
|
"@udecode/cmdk": "^0.2.1",
|
|
80
57
|
"@udecode/cn": "^48.0.3",
|
|
@@ -107,25 +84,23 @@
|
|
|
107
84
|
"color-string": "^1.9.1",
|
|
108
85
|
"crypto-js": "^4.2.0",
|
|
109
86
|
"date-fns": "2.30.0",
|
|
87
|
+
"es-toolkit": "^1.42.0",
|
|
110
88
|
"final-form": "4.20.10",
|
|
111
89
|
"final-form-arrays": "^3.1.0",
|
|
112
90
|
"final-form-set-field-data": "^1.0.2",
|
|
113
91
|
"graphql": "15.8.0",
|
|
114
92
|
"graphql-tag": "^2.12.6",
|
|
115
93
|
"is-hotkey": "^0.2.0",
|
|
116
|
-
"lodash.get": "^4.4.2",
|
|
117
|
-
"lodash.set": "^4.3.2",
|
|
118
94
|
"lucide-react": "^0.424.0",
|
|
119
95
|
"mermaid": "9.3.0",
|
|
120
96
|
"moment": "2.29.4",
|
|
97
|
+
"moment-timezone": "^0.6.0",
|
|
121
98
|
"monaco-editor": "0.31.0",
|
|
122
99
|
"prism-react-renderer": "^2.4.1",
|
|
123
100
|
"prop-types": "15.7.2",
|
|
124
|
-
"react-
|
|
125
|
-
"react-color": "^2.19.3",
|
|
101
|
+
"react-colorful": "^5.6.1",
|
|
126
102
|
"react-datetime": "^3.3.1",
|
|
127
|
-
"react-
|
|
128
|
-
"react-dnd-html5-backend": "^16.0.1",
|
|
103
|
+
"react-day-picker": "^9.11.1",
|
|
129
104
|
"react-dropzone": "14.2.3",
|
|
130
105
|
"react-final-form": "^6.5.9",
|
|
131
106
|
"react-icons": "^5.4.0",
|
|
@@ -135,34 +110,28 @@
|
|
|
135
110
|
"webfontloader": "1.6.28",
|
|
136
111
|
"yup": "^1.6.1",
|
|
137
112
|
"zod": "^3.24.2",
|
|
138
|
-
"@tinacms/mdx": "0.0.0-
|
|
139
|
-
"@tinacms/
|
|
140
|
-
"@tinacms/
|
|
113
|
+
"@tinacms/mdx": "0.0.0-a23fec8-20251217045135",
|
|
114
|
+
"@tinacms/schema-tools": "0.0.0-a23fec8-20251217045135",
|
|
115
|
+
"@tinacms/search": "0.0.0-a23fec8-20251217045135"
|
|
141
116
|
},
|
|
142
117
|
"devDependencies": {
|
|
143
118
|
"@graphql-tools/utils": "^10.8.1",
|
|
144
119
|
"@testing-library/dom": "^10.4.0",
|
|
145
|
-
"@testing-library/jest-dom": "^6.
|
|
120
|
+
"@testing-library/jest-dom": "^6.7.0",
|
|
146
121
|
"@testing-library/react": "^16.2.0",
|
|
147
122
|
"@testing-library/user-event": "^14.6.1",
|
|
148
123
|
"@types/atob": "^2.1.4",
|
|
149
124
|
"@types/codemirror": "^5.60.15",
|
|
150
125
|
"@types/color-string": "^1.5.5",
|
|
151
|
-
"@types/lodash.debounce": "^4.0.9",
|
|
152
|
-
"@types/lodash.get": "^4.4.9",
|
|
153
126
|
"@types/node": "^22.13.1",
|
|
154
127
|
"@types/prop-types": "^15.7.14",
|
|
155
128
|
"@types/react": "^18.3.18",
|
|
156
|
-
"@types/react-beautiful-dnd": "^13.1.8",
|
|
157
|
-
"@types/react-color": "^3.0.13",
|
|
158
129
|
"@types/react-dom": "^18.3.5",
|
|
159
|
-
"@types/yup": "^0.32.0",
|
|
160
|
-
"lowlight": "^3.3.0",
|
|
161
130
|
"happy-dom": "15.10.2",
|
|
162
131
|
"identity-obj-proxy": "^3.0.0",
|
|
163
|
-
"isomorphic-fetch": "^3.0.0",
|
|
164
132
|
"jest-file-snapshot": "^0.7.0",
|
|
165
|
-
"
|
|
133
|
+
"lowlight": "^3.3.0",
|
|
134
|
+
"next": "14.2.35",
|
|
166
135
|
"react": "^18.3.1",
|
|
167
136
|
"react-dom": "^18.3.1",
|
|
168
137
|
"react-is": "^18.3.1",
|
|
@@ -171,7 +140,7 @@
|
|
|
171
140
|
"typescript": "^5.7.3",
|
|
172
141
|
"vite": "^5.4.14",
|
|
173
142
|
"vitest": "^2.1.9",
|
|
174
|
-
"@tinacms/scripts": "
|
|
143
|
+
"@tinacms/scripts": "1.4.2"
|
|
175
144
|
},
|
|
176
145
|
"peerDependencies": {
|
|
177
146
|
"react": ">=16.14.0",
|