tinacms 0.0.0-ea9b54c-20241003003029 → 0.0.0-fe63759-20241004045825
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
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
|
}
|
package/dist/client.mjs
CHANGED
|
@@ -23,7 +23,7 @@ class TinaClient {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
|
-
if (this.cacheDir && window ===
|
|
26
|
+
if (this.cacheDir && typeof window === "undefined" && typeof require !== "undefined") {
|
|
27
27
|
const { NodeCache } = await import("./node-cache-7fa2452c.mjs");
|
|
28
28
|
this.cache = await NodeCache(this.cacheDir);
|
|
29
29
|
}
|
package/dist/index.js
CHANGED
|
@@ -4605,6 +4605,10 @@ var __publicField = (obj, key, value) => {
|
|
|
4605
4605
|
edges: response.collection.documents.edges
|
|
4606
4606
|
};
|
|
4607
4607
|
} catch (e) {
|
|
4608
|
+
console.error(
|
|
4609
|
+
"Exception thrown while building and running GraphQL query: ",
|
|
4610
|
+
e
|
|
4611
|
+
);
|
|
4608
4612
|
return {
|
|
4609
4613
|
collection,
|
|
4610
4614
|
edges: []
|
|
@@ -13757,7 +13761,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13757
13761
|
tooltip: "Headings"
|
|
13758
13762
|
},
|
|
13759
13763
|
/* @__PURE__ */ React.createElement(SelectedItemIcon, { className: "size-5" }),
|
|
13760
|
-
/* @__PURE__ */ React.createElement("span", { className: "
|
|
13764
|
+
/* @__PURE__ */ React.createElement("span", { className: "@md/toolbar:flex hidden" }, selectedItemLabel)
|
|
13761
13765
|
)), /* @__PURE__ */ React.createElement(DropdownMenuContent, { align: "start", className: "min-w-0" }, /* @__PURE__ */ React.createElement(
|
|
13762
13766
|
DropdownMenuRadioGroup,
|
|
13763
13767
|
{
|
|
@@ -13959,6 +13963,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13959
13963
|
};
|
|
13960
13964
|
const ICON_WIDTH = 32;
|
|
13961
13965
|
const EMBED_ICON_WIDTH = 78;
|
|
13966
|
+
const MD_BREAKPOINT = 768;
|
|
13962
13967
|
const useResize = (ref, callback) => {
|
|
13963
13968
|
React.useEffect(() => {
|
|
13964
13969
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -14045,11 +14050,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14045
14050
|
const { overrides } = useToolbarContext();
|
|
14046
14051
|
useResize(toolbarRef, (entry) => {
|
|
14047
14052
|
const width = entry.target.getBoundingClientRect().width;
|
|
14048
|
-
const
|
|
14053
|
+
const paragraphIconWidth = width < MD_BREAKPOINT ? 58 : 128;
|
|
14054
|
+
const itemsShown2 = (width - EMBED_ICON_WIDTH - paragraphIconWidth) / ICON_WIDTH;
|
|
14049
14055
|
setItemsShown(Math.floor(itemsShown2));
|
|
14050
14056
|
});
|
|
14051
14057
|
const toolbarItemsArray = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14052
|
-
return /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-hidden", ref: toolbarRef }, /* @__PURE__ */ React.createElement(
|
|
14058
|
+
return /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-hidden @container/toolbar", ref: toolbarRef }, /* @__PURE__ */ React.createElement(
|
|
14053
14059
|
"div",
|
|
14054
14060
|
{
|
|
14055
14061
|
className: "flex",
|
package/dist/index.mjs
CHANGED
|
@@ -4628,6 +4628,10 @@ const useGetOptionSets = (cms, collections, collectionFilter) => {
|
|
|
4628
4628
|
edges: response.collection.documents.edges
|
|
4629
4629
|
};
|
|
4630
4630
|
} catch (e) {
|
|
4631
|
+
console.error(
|
|
4632
|
+
"Exception thrown while building and running GraphQL query: ",
|
|
4633
|
+
e
|
|
4634
|
+
);
|
|
4631
4635
|
return {
|
|
4632
4636
|
collection,
|
|
4633
4637
|
edges: []
|
|
@@ -13780,7 +13784,7 @@ function HeadingsMenu(props) {
|
|
|
13780
13784
|
tooltip: "Headings"
|
|
13781
13785
|
},
|
|
13782
13786
|
/* @__PURE__ */ React__default.createElement(SelectedItemIcon, { className: "size-5" }),
|
|
13783
|
-
/* @__PURE__ */ React__default.createElement("span", { className: "
|
|
13787
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "@md/toolbar:flex hidden" }, selectedItemLabel)
|
|
13784
13788
|
)), /* @__PURE__ */ React__default.createElement(DropdownMenuContent, { align: "start", className: "min-w-0" }, /* @__PURE__ */ React__default.createElement(
|
|
13785
13789
|
DropdownMenuRadioGroup,
|
|
13786
13790
|
{
|
|
@@ -13982,6 +13986,7 @@ const EmbedButton = ({ editor, templates }) => {
|
|
|
13982
13986
|
};
|
|
13983
13987
|
const ICON_WIDTH = 32;
|
|
13984
13988
|
const EMBED_ICON_WIDTH = 78;
|
|
13989
|
+
const MD_BREAKPOINT = 768;
|
|
13985
13990
|
const useResize = (ref, callback) => {
|
|
13986
13991
|
React__default.useEffect(() => {
|
|
13987
13992
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -14068,11 +14073,12 @@ function FixedToolbarButtons() {
|
|
|
14068
14073
|
const { overrides } = useToolbarContext();
|
|
14069
14074
|
useResize(toolbarRef, (entry) => {
|
|
14070
14075
|
const width = entry.target.getBoundingClientRect().width;
|
|
14071
|
-
const
|
|
14076
|
+
const paragraphIconWidth = width < MD_BREAKPOINT ? 58 : 128;
|
|
14077
|
+
const itemsShown2 = (width - EMBED_ICON_WIDTH - paragraphIconWidth) / ICON_WIDTH;
|
|
14072
14078
|
setItemsShown(Math.floor(itemsShown2));
|
|
14073
14079
|
});
|
|
14074
14080
|
const toolbarItemsArray = overrides === void 0 ? Object.values(toolbarItems) : overrides.map((item) => toolbarItems[item]).filter((item) => item !== void 0);
|
|
14075
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full overflow-hidden", ref: toolbarRef }, /* @__PURE__ */ React__default.createElement(
|
|
14081
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full overflow-hidden @container/toolbar", ref: toolbarRef }, /* @__PURE__ */ React__default.createElement(
|
|
14076
14082
|
"div",
|
|
14077
14083
|
{
|
|
14078
14084
|
className: "flex",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'raw' | 'embed';
|
|
2
2
|
export declare const ICON_WIDTH = 32;
|
|
3
3
|
export declare const EMBED_ICON_WIDTH = 78;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const MD_BREAKPOINT = 768;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-fe63759-20241004045825",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
"webfontloader": "1.6.28",
|
|
128
128
|
"yup": "^1.4.0",
|
|
129
129
|
"zod": "^3.23.8",
|
|
130
|
-
"@tinacms/
|
|
131
|
-
"@tinacms/
|
|
132
|
-
"@tinacms/schema-tools": "
|
|
130
|
+
"@tinacms/mdx": "0.0.0-fe63759-20241004045825",
|
|
131
|
+
"@tinacms/search": "0.0.0-fe63759-20241004045825",
|
|
132
|
+
"@tinacms/schema-tools": "0.0.0-fe63759-20241004045825"
|
|
133
133
|
},
|
|
134
134
|
"devDependencies": {
|
|
135
135
|
"@graphql-tools/utils": "^10.5.4",
|