tinacms 0.0.0-a631a37-20250929053520 → 0.0.0-a63a1f5-20251124043708

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.
Files changed (36) hide show
  1. package/dist/index.js +1602 -1120
  2. package/dist/index.mjs +1603 -1120
  3. package/dist/rich-text/index.d.ts +6 -0
  4. package/dist/rich-text/index.js +8 -1
  5. package/dist/rich-text/index.mjs +8 -1
  6. package/dist/rich-text/static.d.ts +6 -0
  7. package/dist/rich-text/static.js +8 -1
  8. package/dist/rich-text/static.mjs +8 -1
  9. package/dist/toolkit/fields/components/select.d.ts +1 -1
  10. package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
  11. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +2 -1
  12. package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +2 -0
  13. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +1 -1
  14. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +2 -2
  15. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +1 -1
  16. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +1 -1
  17. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +2 -2
  18. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +1 -1
  19. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +1 -1
  20. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +2 -2
  21. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +1 -1
  22. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +1 -1
  23. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +18 -18
  24. package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
  25. package/dist/toolkit/form-builder/form-builder.d.ts +0 -11
  26. package/dist/toolkit/form-builder/index.d.ts +1 -0
  27. package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
  28. package/dist/toolkit/icons/index.d.ts +1 -0
  29. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +3 -1
  30. package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
  31. package/dist/toolkit/react-sidebar/components/badge.d.ts +2 -1
  32. package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
  33. package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
  34. package/dist/toolkit/styles/index.d.ts +1 -0
  35. package/dist/utils/index.d.ts +1 -0
  36. package/package.json +10 -14
@@ -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;
@@ -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;
@@ -7,4 +7,5 @@ export * from './form-portal';
7
7
  export * from './loading-dots';
8
8
  export * from './reset-form';
9
9
  export * from './form-actions';
10
+ export * from './create-branch-modal';
10
11
  export type { FieldRenderProps } from 'react-final-form';
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export declare const TinaExtendedIcon: ({ ...props }: {
3
+ [x: string]: any;
4
+ }) => React.JSX.Element;
@@ -52,3 +52,4 @@ export * from './Folder';
52
52
  export * from './File';
53
53
  export * from './Circle';
54
54
  export * from './CircleCheck';
55
+ export * from './TinaExtended';
@@ -1,3 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const BranchButton: () => React.JSX.Element;
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,4 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const ModalActions: ({ children }: {
2
+ export declare const ModalActions: ({ align, children }: {
3
+ align?: string;
3
4
  children: any;
4
5
  }) => React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare const Badge: ({ children, calloutStyle, className, ...props }: {
2
+ export declare const Badge: ({ children, calloutStyle, className, displayIcon, ...props }: {
3
3
  children?: React.ReactNode;
4
4
  calloutStyle?: "warning" | "info" | "success" | "error";
5
+ displayIcon?: boolean;
5
6
  } & React.HTMLProps<HTMLDivElement>) => React.JSX.Element;
@@ -1,3 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const LocalWarning: () => React.JSX.Element;
2
+ export declare const LocalWarning: ({ className }: {
3
+ className?: string;
4
+ }) => React.JSX.Element;
3
5
  export declare const BillingWarning: () => React.JSX.Element;
@@ -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>>;
@@ -2,3 +2,4 @@ export * from './button';
2
2
  export * from './font-loader';
3
3
  export * from './overflow-menu';
4
4
  export * from './message';
5
+ export * from './dropdown-button';
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-a631a37-20250929053520",
3
+ "version": "0.0.0-a63a1f5-20251124043708",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -67,6 +67,9 @@
67
67
  "license": "Apache-2.0",
68
68
  "dependencies": {
69
69
  "@ariakit/react": "^0.4.15",
70
+ "@dnd-kit/core": "^6.1.0",
71
+ "@dnd-kit/sortable": "^8.0.0",
72
+ "@dnd-kit/utilities": "^3.2.2",
70
73
  "@floating-ui/dom": "^1.6.13",
71
74
  "@floating-ui/react-dom": "^2.1.2",
72
75
  "@graphql-inspector/core": "^6.2.1",
@@ -113,25 +116,21 @@
113
116
  "color-string": "^1.9.1",
114
117
  "crypto-js": "^4.2.0",
115
118
  "date-fns": "2.30.0",
119
+ "es-toolkit": "^1.42.0",
116
120
  "final-form": "4.20.10",
117
121
  "final-form-arrays": "^3.1.0",
118
122
  "final-form-set-field-data": "^1.0.2",
119
123
  "graphql": "15.8.0",
120
124
  "graphql-tag": "^2.12.6",
121
125
  "is-hotkey": "^0.2.0",
122
- "lodash.get": "^4.4.2",
123
- "lodash.set": "^4.3.2",
124
126
  "lucide-react": "^0.424.0",
125
127
  "mermaid": "9.3.0",
126
128
  "moment": "2.29.4",
127
129
  "monaco-editor": "0.31.0",
128
130
  "prism-react-renderer": "^2.4.1",
129
131
  "prop-types": "15.7.2",
130
- "react-beautiful-dnd": "^13.1.1",
131
132
  "react-color": "^2.19.3",
132
133
  "react-datetime": "^3.3.1",
133
- "react-dnd": "^16.0.1",
134
- "react-dnd-html5-backend": "^16.0.1",
135
134
  "react-dropzone": "14.2.3",
136
135
  "react-final-form": "^6.5.9",
137
136
  "react-icons": "^5.4.0",
@@ -141,9 +140,9 @@
141
140
  "webfontloader": "1.6.28",
142
141
  "yup": "^1.6.1",
143
142
  "zod": "^3.24.2",
144
- "@tinacms/schema-tools": "1.9.1",
145
- "@tinacms/search": "1.1.1",
146
- "@tinacms/mdx": "1.8.1"
143
+ "@tinacms/mdx": "0.0.0-a63a1f5-20251124043708",
144
+ "@tinacms/schema-tools": "0.0.0-a63a1f5-20251124043708",
145
+ "@tinacms/search": "0.0.0-a63a1f5-20251124043708"
147
146
  },
148
147
  "devDependencies": {
149
148
  "@graphql-tools/utils": "^10.8.1",
@@ -154,20 +153,17 @@
154
153
  "@types/atob": "^2.1.4",
155
154
  "@types/codemirror": "^5.60.15",
156
155
  "@types/color-string": "^1.5.5",
157
- "@types/lodash.debounce": "^4.0.9",
158
- "@types/lodash.get": "^4.4.9",
159
156
  "@types/node": "^22.13.1",
160
157
  "@types/prop-types": "^15.7.14",
161
158
  "@types/react": "^18.3.18",
162
- "@types/react-beautiful-dnd": "^13.1.8",
163
159
  "@types/react-color": "^3.0.13",
164
160
  "@types/react-dom": "^18.3.5",
165
161
  "@types/yup": "^0.32.0",
166
- "lowlight": "^3.3.0",
167
162
  "happy-dom": "15.10.2",
168
163
  "identity-obj-proxy": "^3.0.0",
169
164
  "isomorphic-fetch": "^3.0.0",
170
165
  "jest-file-snapshot": "^0.7.0",
166
+ "lowlight": "^3.3.0",
171
167
  "next": "14.2.10",
172
168
  "react": "^18.3.1",
173
169
  "react-dom": "^18.3.1",
@@ -177,7 +173,7 @@
177
173
  "typescript": "^5.7.3",
178
174
  "vite": "^5.4.14",
179
175
  "vitest": "^2.1.9",
180
- "@tinacms/scripts": "1.4.0"
176
+ "@tinacms/scripts": "0.0.0-a63a1f5-20251124043708"
181
177
  },
182
178
  "peerDependencies": {
183
179
  "react": ">=16.14.0",