tinacms 0.0.0-a318f2f-20241010063440 → 0.0.0-a4a2eeb-20250102014725

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.
@@ -1,18 +1,24 @@
1
- const makeCacheDir = async (dir, fs) => {
2
- const path = await import("./__vite-browser-external-d06ac358.mjs");
3
- const os = await import("./__vite-browser-external-d06ac358.mjs");
4
- const parts = dir.split(path.sep).filter(Boolean);
1
+ const makeCacheDir = async (dir, fs, path, os) => {
2
+ const pathParts = dir.split(path.sep).filter(Boolean);
3
+ const cacheHash = pathParts[pathParts.length - 1];
4
+ const rootUser = pathParts[0];
5
5
  let cacheDir = dir;
6
- if (!fs.existsSync(path.join(path.sep, parts[0]))) {
7
- cacheDir = path.join(os.tmpdir(), parts[parts.length - 1]);
6
+ if (!fs.existsSync(path.join(path.sep, rootUser))) {
7
+ cacheDir = path.join(os.tmpdir(), cacheHash);
8
+ }
9
+ try {
10
+ fs.mkdirSync(cacheDir, { recursive: true });
11
+ } catch (error) {
12
+ throw new Error(`Failed to create cache directory: ${error.message}`);
8
13
  }
9
- fs.mkdirSync(cacheDir, { recursive: true });
10
14
  return cacheDir;
11
15
  };
12
16
  const NodeCache = async (dir) => {
13
- const fs = await import("./__vite-browser-external-d06ac358.mjs");
14
- const { createHash } = await import("./__vite-browser-external-d06ac358.mjs");
15
- const cacheDir = await makeCacheDir(dir, fs);
17
+ const fs = require("node:fs");
18
+ const path = require("node:path");
19
+ const os = require("node:os");
20
+ const { createHash } = require("node:crypto");
21
+ const cacheDir = await makeCacheDir(dir, fs, path, os);
16
22
  return {
17
23
  makeKey: (key) => {
18
24
  const input = key && key instanceof Object ? JSON.stringify(key) : key || "";
@@ -39,5 +45,6 @@ const NodeCache = async (dir) => {
39
45
  };
40
46
  };
41
47
  export {
42
- NodeCache
48
+ NodeCache,
49
+ makeCacheDir
43
50
  };
@@ -3,6 +3,14 @@ import { FieldProps } from './field-props';
3
3
  import { Form } from '../../forms';
4
4
  export type InputFieldType<ExtraFieldProps, InputProps> = FieldProps<InputProps> & ExtraFieldProps;
5
5
  export declare function wrapFieldsWithMeta<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
6
+ /**
7
+ * Same as wrapFieldsWithMeta but excludes the label, and description useful for fields that render their label and description
8
+ */
9
+ export declare function wrapFieldWithNoHeader<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
10
+ /**
11
+ * Same as above but excludes the label, useful for fields that have their own label
12
+ * @deprecated This function is deprecated and will be removed in future versions.
13
+ */
6
14
  export declare function wrapFieldWithError<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => React.JSX.Element;
7
15
  interface FieldMetaProps extends React.HTMLAttributes<HTMLElement> {
8
16
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-a318f2f-20241010063440",
3
+ "version": "0.0.0-a4a2eeb-20250102014725",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -60,21 +60,21 @@
60
60
  "typings": "dist/index.d.ts",
61
61
  "license": "Apache-2.0",
62
62
  "dependencies": {
63
- "@ariakit/react": "^0.4.11",
64
- "@floating-ui/dom": "^1.6.11",
63
+ "@ariakit/react": "^0.4.13",
64
+ "@floating-ui/dom": "^1.6.12",
65
65
  "@floating-ui/react-dom": "^2.1.2",
66
- "@graphql-inspector/core": "^6.1.0",
66
+ "@graphql-inspector/core": "^6.2.0",
67
67
  "@headlessui/react": "2.1.8",
68
68
  "@heroicons/react": "^1.0.6",
69
69
  "@monaco-editor/react": "4.4.5",
70
- "@radix-ui/react-checkbox": "^1.1.1",
71
- "@radix-ui/react-dialog": "^1.1.1",
72
- "@radix-ui/react-dropdown-menu": "^2.1.1",
73
- "@radix-ui/react-popover": "^1.1.1",
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
74
  "@radix-ui/react-separator": "^1.1.0",
75
75
  "@radix-ui/react-slot": "^1.1.0",
76
76
  "@radix-ui/react-toolbar": "^1.1.0",
77
- "@radix-ui/react-tooltip": "^1.1.2",
77
+ "@radix-ui/react-tooltip": "^1.1.4",
78
78
  "@react-hook/window-size": "^3.1.1",
79
79
  "@udecode/cn": "^33.0.0",
80
80
  "@udecode/plate": "^36.5.9",
@@ -94,11 +94,10 @@
94
94
  "@udecode/plate-table": "36.5.8",
95
95
  "class-variance-authority": "^0.7.0",
96
96
  "clsx": "^2.1.1",
97
- "cmdk": "^1.0.0",
97
+ "cmdk": "^1.0.4",
98
98
  "color-string": "^1.9.1",
99
99
  "crypto-js": "^4.2.0",
100
100
  "date-fns": "2.30.0",
101
- "fetch-ponyfill": "^7.1.0",
102
101
  "final-form": "4.20.10",
103
102
  "final-form-arrays": "^3.1.0",
104
103
  "final-form-set-field-data": "^1.0.2",
@@ -108,7 +107,7 @@
108
107
  "lodash.get": "^4.4.2",
109
108
  "lodash.set": "^4.3.2",
110
109
  "lucide-react": "^0.424.0",
111
- "mermaid": "^10.9.1",
110
+ "mermaid": "9.3.0",
112
111
  "moment": "2.29.4",
113
112
  "monaco-editor": "0.31.0",
114
113
  "prism-react-renderer": "^2.4.0",
@@ -119,24 +118,24 @@
119
118
  "react-dropzone": "14.2.3",
120
119
  "react-final-form": "^6.5.9",
121
120
  "react-icons": "^5.3.0",
122
- "react-onclickoutside": "^6.13.1",
123
121
  "react-router-dom": "6.3.0",
122
+ "react-use": "^17.6.0",
124
123
  "slate": "^0.103.0",
125
124
  "slate-history": "^0.100.0",
126
125
  "slate-hyperscript": "^0.100.0",
127
126
  "slate-react": "^0.107.1",
128
- "tailwind-merge": "^2.5.2",
127
+ "tailwind-merge": "^2.5.4",
129
128
  "webfontloader": "1.6.28",
130
129
  "yup": "^1.4.0",
131
130
  "zod": "^3.23.8",
132
- "@tinacms/schema-tools": "0.0.0-a318f2f-20241010063440",
133
- "@tinacms/search": "0.0.0-a318f2f-20241010063440",
134
- "@tinacms/mdx": "0.0.0-a318f2f-20241010063440"
131
+ "@tinacms/mdx": "0.0.0-a4a2eeb-20250102014725",
132
+ "@tinacms/schema-tools": "1.6.9",
133
+ "@tinacms/search": "0.0.0-a4a2eeb-20250102014725"
135
134
  },
136
135
  "devDependencies": {
137
- "@graphql-tools/utils": "^10.5.4",
136
+ "@graphql-tools/utils": "^10.5.6",
138
137
  "@testing-library/dom": "^10.4.0",
139
- "@testing-library/jest-dom": "^6.5.0",
138
+ "@testing-library/jest-dom": "^6.6.3",
140
139
  "@testing-library/react": "^16.0.1",
141
140
  "@testing-library/user-event": "^14.5.2",
142
141
  "@types/atob": "^2.1.4",
@@ -144,14 +143,14 @@
144
143
  "@types/color-string": "^1.5.5",
145
144
  "@types/lodash.debounce": "^4.0.9",
146
145
  "@types/lodash.get": "^4.4.9",
147
- "@types/node": "^22.7.4",
146
+ "@types/node": "^22.9.0",
148
147
  "@types/prop-types": "^15.7.13",
149
- "@types/react": "^18.3.10",
148
+ "@types/react": "^18.3.12",
150
149
  "@types/react-beautiful-dnd": "^13.1.8",
151
150
  "@types/react-color": "^3.0.12",
152
- "@types/react-dom": "^18.3.0",
151
+ "@types/react-dom": "^18.3.1",
153
152
  "@types/yup": "^0.32.0",
154
- "happy-dom": "^14.12.3",
153
+ "happy-dom": "15.10.2",
155
154
  "identity-obj-proxy": "^3.0.0",
156
155
  "isomorphic-fetch": "^3.0.0",
157
156
  "jest-file-snapshot": "^0.7.0",
@@ -160,11 +159,11 @@
160
159
  "react-dom": "^18.3.1",
161
160
  "react-is": "^18.3.1",
162
161
  "tsc-alias": "^1.8.10",
163
- "tslib": "^2.7.0",
164
- "typescript": "^5.6.2",
165
- "vite": "^5.4.8",
166
- "vitest": "^2.1.1",
167
- "@tinacms/scripts": "0.0.0-a318f2f-20241010063440"
162
+ "tslib": "^2.8.1",
163
+ "typescript": "^5.6.3",
164
+ "vite": "^5.4.11",
165
+ "vitest": "^2.1.5",
166
+ "@tinacms/scripts": "1.3.1"
168
167
  },
169
168
  "peerDependencies": {
170
169
  "react": ">=16.14.0",
@@ -1,4 +0,0 @@
1
- const __viteBrowserExternal = {};
2
- export {
3
- __viteBrowserExternal as default
4
- };