tinacms 0.0.0-f03fd62-20241023052950 → 0.0.0-f0adfbf-20250521015212

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 (45) 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/ui/tooltip.d.ts +7 -0
  5. package/dist/admin/pages/CollectionListPage.d.ts +2 -2
  6. package/dist/admin/types.d.ts +3 -0
  7. package/dist/auth/TinaCloudProvider.d.ts +1 -1
  8. package/dist/cache/node-cache.d.ts +1 -0
  9. package/dist/client.js +93 -64
  10. package/dist/client.mjs +59 -36
  11. package/dist/hooks/create-page-plugin.d.ts +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +4299 -2976
  14. package/dist/index.mjs +4385 -3062
  15. package/dist/internalClient/index.d.ts +3 -3
  16. package/dist/node-cache-5e8db9f0.mjs +63 -0
  17. package/dist/react.d.ts +1 -0
  18. package/dist/react.js +13 -1
  19. package/dist/react.mjs +13 -1
  20. package/dist/rich-text/prism.js +1 -1
  21. package/dist/rich-text/prism.mjs +1 -1
  22. package/dist/toolkit/components/media/media-manager.d.ts +1 -1
  23. package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
  24. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +4 -1
  25. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +17 -5
  26. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
  27. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
  28. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +6 -11
  29. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +5 -1
  30. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +2 -2
  31. package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
  32. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
  33. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
  34. package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
  35. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +5 -4
  36. package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
  37. package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
  38. package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
  39. package/dist/toolkit/tina-cms.d.ts +3 -3
  40. package/dist/toolkit/tina-state.d.ts +4 -0
  41. package/dist/unifiedClient/index.d.ts +8 -1
  42. package/package.json +41 -41
  43. package/dist/__vite-browser-external-d06ac358.mjs +0 -4
  44. package/dist/node-cache-065e42a2.mjs +0 -52
  45. package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
@@ -1,52 +0,0 @@
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
- if (typeof dir !== "string" || !dir.trim()) {
5
- throw new Error("Invalid directory path");
6
- }
7
- const pathParts = dir.split(path.sep);
8
- const cacheHash = pathParts[pathParts.length - 1];
9
- let cacheDir = dir;
10
- if (!fs.existsSync(dir)) {
11
- cacheDir = path.join(os.tmpdir(), cacheHash);
12
- }
13
- try {
14
- fs.mkdirSync(cacheDir, { recursive: true });
15
- } catch (error) {
16
- throw new Error(`Failed to create cache directory: ${error.message}`);
17
- }
18
- return cacheDir;
19
- };
20
- const NodeCache = async (dir) => {
21
- const fs = await (await import("./__vite-browser-external-d06ac358.mjs")).default;
22
- console.log("fs", JSON.stringify(fs));
23
- const { createHash } = await import("./__vite-browser-external-d06ac358.mjs");
24
- const cacheDir = await makeCacheDir(dir, fs);
25
- return {
26
- makeKey: (key) => {
27
- const input = key && key instanceof Object ? JSON.stringify(key) : key || "";
28
- return createHash("sha256").update(input).digest("hex");
29
- },
30
- get: async (key) => {
31
- try {
32
- const data = await fs.promises.readFile(`${cacheDir}/${key}`, "utf-8");
33
- return JSON.parse(data);
34
- } catch (e) {
35
- if (e.code === "ENOENT") {
36
- return void 0;
37
- }
38
- throw e;
39
- }
40
- },
41
- set: async (key, value) => {
42
- await fs.promises.writeFile(
43
- `${cacheDir}/${key}`,
44
- JSON.stringify(value),
45
- "utf-8"
46
- );
47
- }
48
- };
49
- };
50
- export {
51
- NodeCache
52
- };
@@ -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;