tinacms 0.0.0-d80714b-20241205222511 → 0.0.0-d94de9b-20250707010010

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 (82) hide show
  1. package/README.md +1 -1
  2. package/dist/admin/api.d.ts +1 -0
  3. package/dist/admin/components/GetCollection.d.ts +2 -2
  4. package/dist/admin/components/Page.d.ts +3 -9
  5. package/dist/admin/components/Sidebar.d.ts +0 -3
  6. package/dist/admin/components/ui/tooltip.d.ts +7 -0
  7. package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
  8. package/dist/admin/pages/CollectionListPage.d.ts +2 -2
  9. package/dist/admin/pages/DashboardPage.d.ts +0 -3
  10. package/dist/admin/pages/ScreenPage.d.ts +0 -3
  11. package/dist/auth/TinaCloudProvider.d.ts +1 -1
  12. package/dist/client.js +82 -46
  13. package/dist/client.mjs +59 -36
  14. package/dist/hooks/create-page-plugin.d.ts +1 -1
  15. package/dist/index.js +9132 -7215
  16. package/dist/index.mjs +10466 -8550
  17. package/dist/internalClient/index.d.ts +9 -3
  18. package/dist/{node-cache-4c336858.mjs → node-cache-5e8db9f0.mjs} +23 -10
  19. package/dist/react.d.ts +14 -6
  20. package/dist/react.js +73 -53
  21. package/dist/react.mjs +73 -53
  22. package/dist/rich-text/prism.js +1 -1
  23. package/dist/rich-text/prism.mjs +1 -1
  24. package/dist/rich-text/static.d.ts +148 -0
  25. package/dist/rich-text/static.js +239 -0
  26. package/dist/rich-text/static.mjs +236 -0
  27. package/dist/toolkit/components/media/media-item.d.ts +1 -1
  28. package/dist/toolkit/components/media/media-manager.d.ts +1 -1
  29. package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
  30. package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
  31. package/dist/toolkit/fields/components/password-field.d.ts +1 -1
  32. package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
  33. package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
  34. package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
  35. package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
  36. package/dist/toolkit/fields/components/select.d.ts +2 -2
  37. package/dist/toolkit/fields/components/text-field.d.ts +1 -1
  38. package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
  39. package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
  40. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -2
  41. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
  42. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
  43. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
  44. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
  45. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
  46. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
  48. package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
  49. package/dist/toolkit/form-builder/form-builder.d.ts +15 -5
  50. package/dist/toolkit/forms/field.d.ts +3 -0
  51. package/dist/toolkit/forms/form.d.ts +22 -3
  52. package/dist/toolkit/git-client/git-client.d.ts +25 -2
  53. package/dist/toolkit/git-client/git-file.d.ts +18 -0
  54. package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
  55. package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
  56. package/dist/toolkit/icons/Tina.d.ts +0 -5
  57. package/dist/toolkit/index.d.ts +1 -1
  58. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +1 -0
  59. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
  60. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
  61. package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
  62. package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
  63. package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
  64. package/dist/toolkit/react-sidebar/components/alert.d.ts +5 -0
  65. package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
  66. package/dist/toolkit/react-sidebar/components/nav.d.ts +5 -3
  67. package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
  68. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
  69. package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
  70. package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
  71. package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
  72. package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
  73. package/dist/toolkit/react-sidebar/index.d.ts +1 -1
  74. package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
  75. package/dist/toolkit/styles/button.d.ts +2 -2
  76. package/dist/toolkit/tina-cms.d.ts +3 -3
  77. package/dist/toolkit/tina-state.d.ts +15 -0
  78. package/dist/unifiedClient/index.d.ts +8 -1
  79. package/dist/utils/cn.d.ts +2 -0
  80. package/package.json +44 -37
  81. package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
  82. package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
- variant?: 'primary' | 'secondary' | 'white' | 'ghost' | 'danger';
3
+ variant?: 'primary' | 'secondary' | 'white' | 'ghost' | 'danger' | 'custom';
4
4
  as?: React.ElementType;
5
5
  href?: string;
6
6
  target?: string;
7
7
  size?: 'small' | 'medium' | 'custom';
8
8
  busy?: boolean;
9
- rounded?: 'full' | 'left' | 'right' | 'custom';
9
+ rounded?: 'full' | 'left' | 'right' | 'custom' | 'none';
10
10
  disabled?: boolean;
11
11
  className?: string;
12
12
  children?: React.ReactNode;
@@ -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 { Alerts, type EventsToAlerts } from './alerts';
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;
@@ -15,6 +15,12 @@ type FormList = {
15
15
  items: FormListItem[];
16
16
  formIds: string[];
17
17
  };
18
+ type Breadcrumb = {
19
+ label: string;
20
+ formId: string;
21
+ formName: string;
22
+ namespace: string[];
23
+ };
18
24
  export type TinaAction = {
19
25
  type: 'forms:add';
20
26
  value: Form;
@@ -58,8 +64,12 @@ export type TinaAction = {
58
64
  } | {
59
65
  type: 'sidebar:set-display-state';
60
66
  value: TinaState['sidebarDisplayState'] | 'openOrFull';
67
+ } | {
68
+ type: 'sidebar:set-loading-state';
69
+ value: boolean;
61
70
  };
62
71
  export interface TinaState {
72
+ breadcrumbs: Breadcrumb[];
63
73
  activeFormId: string | null;
64
74
  /**
65
75
  * Forms are wrapped here because we need `activeFieldName` to be reactive, so adding it as a propery
@@ -76,9 +86,14 @@ export interface TinaState {
76
86
  }[];
77
87
  formLists: FormList[];
78
88
  editingMode: 'visual' | 'basic';
89
+ isLoadingContent: boolean;
79
90
  quickEditSupported: boolean;
80
91
  sidebarDisplayState: 'closed' | 'open' | 'fullscreen';
81
92
  }
82
93
  export declare const initialState: (cms: TinaCMS) => TinaState;
83
94
  export declare function tinaReducer(state: TinaState, action: TinaAction): TinaState;
95
+ export declare function calculateBreadcrumbs(forms: {
96
+ activeFieldName?: string | null;
97
+ tinaForm: Form;
98
+ }[], activeFormId: string, activeFieldName?: string): Breadcrumb[];
84
99
  export {};
@@ -1,4 +1,6 @@
1
1
  import type { Config } from '@tinacms/schema-tools';
2
+ import AsyncLock from 'async-lock';
3
+ import type { GraphQLError } from 'graphql';
2
4
  import type { Cache } from '../cache/index';
3
5
  export declare const TINA_HOST = "content.tinajs.io";
4
6
  export interface TinaClientArgs<GenQueries = Record<string, unknown>> {
@@ -25,12 +27,17 @@ export declare class TinaClient<GenQueries> {
25
27
  queries: GenQueries;
26
28
  errorPolicy: Config['client']['errorPolicy'];
27
29
  initialized: boolean;
30
+ cacheLock: AsyncLock | undefined;
28
31
  cacheDir: string;
29
32
  cache: Cache;
30
33
  constructor({ token, url, queries, errorPolicy, cacheDir, }: TinaClientArgs<GenQueries>);
31
34
  init(): Promise<void>;
32
35
  request<DataType extends Record<string, any> = any>({ errorPolicy, ...args }: TinaClientRequestArgs, options: {
33
36
  fetchOptions?: Parameters<typeof fetch>[1];
34
- }): Promise<any>;
37
+ }): Promise<{
38
+ data: DataType;
39
+ errors: GraphQLError[] | null;
40
+ query: string;
41
+ }>;
35
42
  }
36
43
  export declare function createClient<GenQueries>(args: TinaClientArgs<GenQueries>): TinaClient<GenQueries>;
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-d80714b-20241205222511",
3
+ "version": "0.0.0-d94de9b-20250707010010",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -29,6 +29,11 @@
29
29
  "import": "./dist/rich-text/index.mjs",
30
30
  "require": "./dist/rich-text/index.js"
31
31
  },
32
+ "./dist/rich-text/static": {
33
+ "types": "./dist/rich-text/static.d.ts",
34
+ "import": "./dist/rich-text/static.mjs",
35
+ "require": "./dist/rich-text/static.js"
36
+ },
32
37
  "./dist/rich-text/prism": {
33
38
  "types": "./dist/rich-text/prism.d.ts",
34
39
  "import": "./dist/rich-text/prism.mjs",
@@ -42,6 +47,7 @@
42
47
  "entryPoints": [
43
48
  "src/index.ts",
44
49
  "src/rich-text/index.tsx",
50
+ "src/rich-text/static.tsx",
45
51
  "src/rich-text/prism.tsx",
46
52
  "src/react.tsx",
47
53
  "src/client.ts"
@@ -60,21 +66,21 @@
60
66
  "typings": "dist/index.d.ts",
61
67
  "license": "Apache-2.0",
62
68
  "dependencies": {
63
- "@ariakit/react": "^0.4.13",
64
- "@floating-ui/dom": "^1.6.12",
69
+ "@ariakit/react": "^0.4.15",
70
+ "@floating-ui/dom": "^1.6.13",
65
71
  "@floating-ui/react-dom": "^2.1.2",
66
- "@graphql-inspector/core": "^6.2.0",
72
+ "@graphql-inspector/core": "^6.2.1",
67
73
  "@headlessui/react": "2.1.8",
68
74
  "@heroicons/react": "^1.0.6",
69
- "@monaco-editor/react": "4.4.5",
70
- "@radix-ui/react-checkbox": "^1.1.2",
71
- "@radix-ui/react-dialog": "^1.1.2",
72
- "@radix-ui/react-dropdown-menu": "^2.1.2",
73
- "@radix-ui/react-popover": "^1.1.2",
74
- "@radix-ui/react-separator": "^1.1.0",
75
- "@radix-ui/react-slot": "^1.1.0",
76
- "@radix-ui/react-toolbar": "^1.1.0",
77
- "@radix-ui/react-tooltip": "^1.1.4",
75
+ "@monaco-editor/react": "4.7.0-rc.0",
76
+ "@radix-ui/react-checkbox": "^1.1.4",
77
+ "@radix-ui/react-dialog": "^1.1.6",
78
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
79
+ "@radix-ui/react-popover": "^1.1.6",
80
+ "@radix-ui/react-separator": "^1.1.2",
81
+ "@radix-ui/react-slot": "^1.1.2",
82
+ "@radix-ui/react-toolbar": "^1.1.2",
83
+ "@radix-ui/react-tooltip": "^1.2.6",
78
84
  "@react-hook/window-size": "^3.1.1",
79
85
  "@udecode/cn": "^33.0.0",
80
86
  "@udecode/plate": "^36.5.9",
@@ -92,13 +98,13 @@
92
98
  "@udecode/plate-resizable": "36.0.0",
93
99
  "@udecode/plate-slash-command": "^36.0.0",
94
100
  "@udecode/plate-table": "36.5.8",
95
- "class-variance-authority": "^0.7.0",
101
+ "async-lock": "^1.4.1",
102
+ "class-variance-authority": "^0.7.1",
96
103
  "clsx": "^2.1.1",
97
104
  "cmdk": "^1.0.4",
98
105
  "color-string": "^1.9.1",
99
106
  "crypto-js": "^4.2.0",
100
107
  "date-fns": "2.30.0",
101
- "fetch-ponyfill": "^7.1.0",
102
108
  "final-form": "4.20.10",
103
109
  "final-form-arrays": "^3.1.0",
104
110
  "final-form-set-field-data": "^1.0.2",
@@ -111,60 +117,61 @@
111
117
  "mermaid": "9.3.0",
112
118
  "moment": "2.29.4",
113
119
  "monaco-editor": "0.31.0",
114
- "prism-react-renderer": "^2.4.0",
120
+ "prism-react-renderer": "^2.4.1",
115
121
  "prop-types": "15.7.2",
116
122
  "react-beautiful-dnd": "^13.1.1",
117
123
  "react-color": "^2.19.3",
118
- "react-datetime": "^3.2.0",
124
+ "react-datetime": "^3.3.1",
119
125
  "react-dropzone": "14.2.3",
120
126
  "react-final-form": "^6.5.9",
121
- "react-icons": "^5.3.0",
122
- "react-onclickoutside": "^6.13.1",
127
+ "react-icons": "^5.4.0",
123
128
  "react-router-dom": "6.3.0",
129
+ "react-use": "^17.6.0",
124
130
  "slate": "^0.103.0",
125
131
  "slate-history": "^0.100.0",
126
132
  "slate-hyperscript": "^0.100.0",
127
133
  "slate-react": "^0.107.1",
128
- "tailwind-merge": "^2.5.4",
134
+ "tailwind-merge": "^2.6.0",
129
135
  "webfontloader": "1.6.28",
130
- "yup": "^1.4.0",
131
- "zod": "^3.23.8",
132
- "@tinacms/mdx": "1.5.2",
133
- "@tinacms/search": "1.0.35",
134
- "@tinacms/schema-tools": "1.6.8"
136
+ "yup": "^1.6.1",
137
+ "zod": "^3.24.2",
138
+ "@tinacms/mdx": "1.7.0",
139
+ "@tinacms/schema-tools": "1.8.0",
140
+ "@tinacms/search": "1.0.46"
135
141
  },
136
142
  "devDependencies": {
137
- "@graphql-tools/utils": "^10.5.6",
143
+ "@graphql-tools/utils": "^10.8.1",
138
144
  "@testing-library/dom": "^10.4.0",
139
145
  "@testing-library/jest-dom": "^6.6.3",
140
- "@testing-library/react": "^16.0.1",
141
- "@testing-library/user-event": "^14.5.2",
146
+ "@testing-library/react": "^16.2.0",
147
+ "@testing-library/user-event": "^14.6.1",
142
148
  "@types/atob": "^2.1.4",
143
149
  "@types/codemirror": "^5.60.15",
144
150
  "@types/color-string": "^1.5.5",
145
151
  "@types/lodash.debounce": "^4.0.9",
146
152
  "@types/lodash.get": "^4.4.9",
147
- "@types/node": "^22.9.0",
148
- "@types/prop-types": "^15.7.13",
149
- "@types/react": "^18.3.12",
153
+ "@types/node": "^22.13.1",
154
+ "@types/prop-types": "^15.7.14",
155
+ "@types/react": "^18.3.18",
150
156
  "@types/react-beautiful-dnd": "^13.1.8",
151
- "@types/react-color": "^3.0.12",
152
- "@types/react-dom": "^18.3.1",
157
+ "@types/react-color": "^3.0.13",
158
+ "@types/react-dom": "^18.3.5",
153
159
  "@types/yup": "^0.32.0",
154
160
  "happy-dom": "15.10.2",
155
161
  "identity-obj-proxy": "^3.0.0",
156
162
  "isomorphic-fetch": "^3.0.0",
157
163
  "jest-file-snapshot": "^0.7.0",
164
+ "lowlight": "^3.3.0",
158
165
  "next": "14.2.10",
159
166
  "react": "^18.3.1",
160
167
  "react-dom": "^18.3.1",
161
168
  "react-is": "^18.3.1",
162
169
  "tsc-alias": "^1.8.10",
163
170
  "tslib": "^2.8.1",
164
- "typescript": "^5.6.3",
165
- "vite": "^5.4.11",
166
- "vitest": "^2.1.5",
167
- "@tinacms/scripts": "1.3.1"
171
+ "typescript": "^5.7.3",
172
+ "vite": "^5.4.14",
173
+ "vitest": "^2.1.9",
174
+ "@tinacms/scripts": "1.3.5"
168
175
  },
169
176
  "peerDependencies": {
170
177
  "react": ">=16.14.0",
@@ -1,2 +0,0 @@
1
- import * as React from 'react';
2
- export declare const BranchBanner: () => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- /**
2
-
3
-
4
-
5
- */
6
- import * as React from 'react';
7
- export declare const PendingFormsPlaceholder: () => React.JSX.Element;
8
- export declare const NoFormsPlaceholder: () => React.JSX.Element;