tinacms 0.0.0-c8b1d84-20241003015733 → 0.0.0-cff6c6a-20241023044614
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/client.js +13 -4
- package/dist/client.mjs +2 -2
- package/dist/index.js +1525 -899
- package/dist/index.mjs +1494 -864
- package/dist/{node-cache-7fa2452c.mjs → node-cache-6a1378f7.mjs} +12 -3
- package/dist/rich-text/index.d.ts +3 -0
- package/dist/rich-text/index.js +45 -12
- package/dist/rich-text/index.mjs +45 -12
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +0 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +11 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +20 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +39 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +27 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-dropdown-menu.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +14 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +13 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/text-area.d.ts +5 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +2 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +4 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +58 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +7 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +1 -1
- package/package.json +8 -6
package/dist/client.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
try {
|
|
29
|
-
if (this.cacheDir && window ===
|
|
29
|
+
if (this.cacheDir && typeof window === "undefined" && typeof require !== "undefined") {
|
|
30
30
|
const { NodeCache: NodeCache2 } = await Promise.resolve().then(() => nodeCache);
|
|
31
31
|
this.cache = await NodeCache2(this.cacheDir);
|
|
32
32
|
}
|
|
@@ -108,12 +108,21 @@
|
|
|
108
108
|
const makeCacheDir = async (dir, fs) => {
|
|
109
109
|
const path = await Promise.resolve().then(() => __viteBrowserExternal$1);
|
|
110
110
|
const os = await Promise.resolve().then(() => __viteBrowserExternal$1);
|
|
111
|
+
if (typeof dir !== "string" || !dir.trim()) {
|
|
112
|
+
throw new Error("Invalid directory path");
|
|
113
|
+
}
|
|
111
114
|
const parts = dir.split(path.sep).filter(Boolean);
|
|
112
115
|
let cacheDir = dir;
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
console.log("Logging path: ", path);
|
|
117
|
+
console.log("Logging joined: ", path.join(path.sep, parts[0]));
|
|
118
|
+
if (!fs.existsSync(path.join(path.sep, parts == null ? void 0 : parts[0]))) {
|
|
119
|
+
cacheDir = path.join(os.tmpdir(), parts == null ? void 0 : parts[parts.length - 1]);
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
123
|
+
} catch (error) {
|
|
124
|
+
throw new Error(`Failed to create cache directory: ${error.message}`);
|
|
115
125
|
}
|
|
116
|
-
fs.mkdirSync(cacheDir, { recursive: true });
|
|
117
126
|
return cacheDir;
|
|
118
127
|
};
|
|
119
128
|
const NodeCache = async (dir) => {
|
package/dist/client.mjs
CHANGED
|
@@ -23,8 +23,8 @@ class TinaClient {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
|
-
if (this.cacheDir && window ===
|
|
27
|
-
const { NodeCache } = await import("./node-cache-
|
|
26
|
+
if (this.cacheDir && typeof window === "undefined" && typeof require !== "undefined") {
|
|
27
|
+
const { NodeCache } = await import("./node-cache-6a1378f7.mjs");
|
|
28
28
|
this.cache = await NodeCache(this.cacheDir);
|
|
29
29
|
}
|
|
30
30
|
} catch (e) {
|