tinacms 0.66.3 → 0.66.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # tinacms
2
2
 
3
+ ## 0.66.4
4
+
5
+ ### Patch Changes
6
+
7
+ - cc5c8431d: Remove console.log
8
+ - Updated dependencies [af9f6c2c2]
9
+ - Updated dependencies [2e14cda5e]
10
+ - Updated dependencies [3d4c52a19]
11
+ - @tinacms/toolkit@0.56.14
12
+
3
13
  ## 0.66.3
4
14
 
5
15
  ### Patch Changes
package/dist/index.es.js CHANGED
@@ -2132,10 +2132,6 @@ Document
2132
2132
  width: 224px !important;
2133
2133
  }
2134
2134
 
2135
- .tina-tailwind .w-0 {
2136
- width: 0px !important;
2137
- }
2138
-
2139
2135
  .tina-tailwind .w-6 {
2140
2136
  width: 24px !important;
2141
2137
  }
@@ -3232,9 +3228,6 @@ const GetCMS = ({ children }) => {
3232
3228
  function BiEdit(props) {
3233
3229
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" } }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" } }] })(props);
3234
3230
  }
3235
- function BiExit(props) {
3236
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z" } }, { "tag": "path", "attr": { "d": "m11 16 5-4-5-4v3.001H3v2h8z" } }] })(props);
3237
- }
3238
3231
  function BiLogIn(props) {
3239
3232
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
3240
3233
  }
@@ -3351,9 +3344,6 @@ const DashboardPage = () => {
3351
3344
  }, "Welcome to Tina!")), /* @__PURE__ */ React.createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
3352
3345
  });
3353
3346
  };
3354
- function FiMoreVertical(props) {
3355
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "1" } }, { "tag": "circle", "attr": { "cx": "12", "cy": "5", "r": "1" } }, { "tag": "circle", "attr": { "cx": "12", "cy": "19", "r": "1" } }] })(props);
3356
- }
3357
3347
  const useGetCollection = (cms, collectionName, includeDocuments = true) => {
3358
3348
  const api = new TinaAdminApi(cms);
3359
3349
  const [collection, setCollection] = useState(void 0);
@@ -3407,7 +3397,7 @@ const TemplateMenu = ({ templates }) => {
3407
3397
  };
3408
3398
  const CollectionListPage = () => {
3409
3399
  const { collectionName } = useParams();
3410
- const navigate = useNavigate();
3400
+ useNavigate();
3411
3401
  return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
3412
3402
  const plugins = cms.plugins.all("tina-admin");
3413
3403
  const routeMapping = plugins.find(({ name }) => name === "route-mapping");
@@ -3473,55 +3463,11 @@ const CollectionListPage = () => {
3473
3463
  className: "block text-xs text-gray-400 mb-1 uppercase"
3474
3464
  }, "Template"), /* @__PURE__ */ React.createElement("span", {
3475
3465
  className: "h-5 leading-5 block text-sm font-medium text-gray-900"
3476
- }, document.node.sys.template)), overrideRoute && /* @__PURE__ */ React.createElement("td", {
3477
- className: "w-0"
3478
- }, /* @__PURE__ */ React.createElement(OverflowMenu, {
3479
- items: [
3480
- {
3481
- label: "Edit in Admin",
3482
- icon: BiEdit,
3483
- onClick: () => {
3484
- navigate(`${document.node.sys.filename}`, { replace: true });
3485
- }
3486
- }
3487
- ]
3488
- })));
3466
+ }, document.node.sys.template)));
3489
3467
  })))))));
3490
3468
  });
3491
3469
  });
3492
3470
  };
3493
- const OverflowMenu = ({ items = [] }) => {
3494
- if (items.length === 0)
3495
- return null;
3496
- return /* @__PURE__ */ React.createElement(Menu, null, ({ open }) => /* @__PURE__ */ React.createElement("div", {
3497
- className: "relative"
3498
- }, /* @__PURE__ */ React.createElement(Menu.Button, {
3499
- className: `flex-1 group px-5 py-3 flex justify-between items-center transition-all duration-300 ease-in-out transform`
3500
- }, /* @__PURE__ */ React.createElement(FiMoreVertical, {
3501
- className: `flex-0 w-6 h-full inline-block text-gray-400 transition-all duration-300 ease-in-out transform ${open ? `opacity-100 text-blue-500` : `opacity-70 group-hover:opacity-100`}`
3502
- })), /* @__PURE__ */ React.createElement("div", {
3503
- className: "transform translate-y-full absolute bottom-2 right-5 z-50"
3504
- }, /* @__PURE__ */ React.createElement(Transition, {
3505
- enter: "transition duration-150 ease-out",
3506
- enterFrom: "transform opacity-0 -translate-y-2",
3507
- enterTo: "transform opacity-100 translate-y-0",
3508
- leave: "transition duration-75 ease-in",
3509
- leaveFrom: "transform opacity-100 translate-y-0",
3510
- leaveTo: "transform opacity-0 -translate-y-2"
3511
- }, /* @__PURE__ */ React.createElement(Menu.Items, {
3512
- className: "bg-white border border-gray-150 rounded-lg shadow-lg"
3513
- }, items.map((item) => {
3514
- const Icon = item.icon ? item.icon : BiExit;
3515
- return /* @__PURE__ */ React.createElement(Menu.Item, {
3516
- key: `menu-item-${item.label}`
3517
- }, ({ active }) => /* @__PURE__ */ React.createElement("button", {
3518
- className: `w-full text-base px-4 py-2 first:pt-3 last:pb-3 tracking-wide whitespace-nowrap flex items-center opacity-80 text-gray-600 ${active && "text-blue-400 bg-gray-50 opacity-100"}`,
3519
- onClick: item.onClick
3520
- }, /* @__PURE__ */ React.createElement(Icon, {
3521
- className: "w-6 h-auto mr-2 text-blue-400"
3522
- }), " ", item.label));
3523
- }))))));
3524
- };
3525
3471
  function HiChevronRight(props) {
3526
3472
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 20 20", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clipRule": "evenodd" } }] })(props);
3527
3473
  }
package/dist/index.js CHANGED
@@ -2152,10 +2152,6 @@ Document
2152
2152
  width: 224px !important;
2153
2153
  }
2154
2154
 
2155
- .tina-tailwind .w-0 {
2156
- width: 0px !important;
2157
- }
2158
-
2159
2155
  .tina-tailwind .w-6 {
2160
2156
  width: 24px !important;
2161
2157
  }
@@ -3252,9 +3248,6 @@ This will work when developing locally but NOT when deployed to production.
3252
3248
  function BiEdit(props) {
3253
3249
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" } }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" } }] })(props);
3254
3250
  }
3255
- function BiExit(props) {
3256
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z" } }, { "tag": "path", "attr": { "d": "m11 16 5-4-5-4v3.001H3v2h8z" } }] })(props);
3257
- }
3258
3251
  function BiLogIn(props) {
3259
3252
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
3260
3253
  }
@@ -3371,9 +3364,6 @@ This will work when developing locally but NOT when deployed to production.
3371
3364
  }, "Welcome to Tina!")), /* @__PURE__ */ React__default["default"].createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
3372
3365
  });
3373
3366
  };
3374
- function FiMoreVertical(props) {
3375
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "1" } }, { "tag": "circle", "attr": { "cx": "12", "cy": "5", "r": "1" } }, { "tag": "circle", "attr": { "cx": "12", "cy": "19", "r": "1" } }] })(props);
3376
- }
3377
3367
  const useGetCollection = (cms, collectionName, includeDocuments = true) => {
3378
3368
  const api = new TinaAdminApi(cms);
3379
3369
  const [collection, setCollection] = React.useState(void 0);
@@ -3427,7 +3417,7 @@ This will work when developing locally but NOT when deployed to production.
3427
3417
  };
3428
3418
  const CollectionListPage = () => {
3429
3419
  const { collectionName } = reactRouterDom.useParams();
3430
- const navigate = reactRouterDom.useNavigate();
3420
+ reactRouterDom.useNavigate();
3431
3421
  return /* @__PURE__ */ React__default["default"].createElement(GetCMS, null, (cms) => {
3432
3422
  const plugins = cms.plugins.all("tina-admin");
3433
3423
  const routeMapping = plugins.find(({ name }) => name === "route-mapping");
@@ -3493,55 +3483,11 @@ This will work when developing locally but NOT when deployed to production.
3493
3483
  className: "block text-xs text-gray-400 mb-1 uppercase"
3494
3484
  }, "Template"), /* @__PURE__ */ React__default["default"].createElement("span", {
3495
3485
  className: "h-5 leading-5 block text-sm font-medium text-gray-900"
3496
- }, document.node.sys.template)), overrideRoute && /* @__PURE__ */ React__default["default"].createElement("td", {
3497
- className: "w-0"
3498
- }, /* @__PURE__ */ React__default["default"].createElement(OverflowMenu, {
3499
- items: [
3500
- {
3501
- label: "Edit in Admin",
3502
- icon: BiEdit,
3503
- onClick: () => {
3504
- navigate(`${document.node.sys.filename}`, { replace: true });
3505
- }
3506
- }
3507
- ]
3508
- })));
3486
+ }, document.node.sys.template)));
3509
3487
  })))))));
3510
3488
  });
3511
3489
  });
3512
3490
  };
3513
- const OverflowMenu = ({ items = [] }) => {
3514
- if (items.length === 0)
3515
- return null;
3516
- return /* @__PURE__ */ React__default["default"].createElement(react.Menu, null, ({ open }) => /* @__PURE__ */ React__default["default"].createElement("div", {
3517
- className: "relative"
3518
- }, /* @__PURE__ */ React__default["default"].createElement(react.Menu.Button, {
3519
- className: `flex-1 group px-5 py-3 flex justify-between items-center transition-all duration-300 ease-in-out transform`
3520
- }, /* @__PURE__ */ React__default["default"].createElement(FiMoreVertical, {
3521
- className: `flex-0 w-6 h-full inline-block text-gray-400 transition-all duration-300 ease-in-out transform ${open ? `opacity-100 text-blue-500` : `opacity-70 group-hover:opacity-100`}`
3522
- })), /* @__PURE__ */ React__default["default"].createElement("div", {
3523
- className: "transform translate-y-full absolute bottom-2 right-5 z-50"
3524
- }, /* @__PURE__ */ React__default["default"].createElement(react.Transition, {
3525
- enter: "transition duration-150 ease-out",
3526
- enterFrom: "transform opacity-0 -translate-y-2",
3527
- enterTo: "transform opacity-100 translate-y-0",
3528
- leave: "transition duration-75 ease-in",
3529
- leaveFrom: "transform opacity-100 translate-y-0",
3530
- leaveTo: "transform opacity-0 -translate-y-2"
3531
- }, /* @__PURE__ */ React__default["default"].createElement(react.Menu.Items, {
3532
- className: "bg-white border border-gray-150 rounded-lg shadow-lg"
3533
- }, items.map((item) => {
3534
- const Icon = item.icon ? item.icon : BiExit;
3535
- return /* @__PURE__ */ React__default["default"].createElement(react.Menu.Item, {
3536
- key: `menu-item-${item.label}`
3537
- }, ({ active }) => /* @__PURE__ */ React__default["default"].createElement("button", {
3538
- className: `w-full text-base px-4 py-2 first:pt-3 last:pb-3 tracking-wide whitespace-nowrap flex items-center opacity-80 text-gray-600 ${active && "text-blue-400 bg-gray-50 opacity-100"}`,
3539
- onClick: item.onClick
3540
- }, /* @__PURE__ */ React__default["default"].createElement(Icon, {
3541
- className: "w-6 h-auto mr-2 text-blue-400"
3542
- }), " ", item.label));
3543
- }))))));
3544
- };
3545
3491
  function HiChevronRight(props) {
3546
3492
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 20 20", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clipRule": "evenodd" } }] })(props);
3547
3493
  }
@@ -39,7 +39,6 @@ const TinaMarkdown = ({
39
39
  }
40
40
  const nodes = Array.isArray(content) ? content : content.children;
41
41
  if (!nodes) {
42
- console.log(`Expected to find structured content for TinaMarkdown`);
43
42
  return null;
44
43
  }
45
44
  return /* @__PURE__ */ React.createElement(React.Fragment, null, nodes.map((child, index) => {
package/dist/rich-text.js CHANGED
@@ -46,7 +46,6 @@ var __objRest = (source, exclude) => {
46
46
  }
47
47
  const nodes = Array.isArray(content) ? content : content.children;
48
48
  if (!nodes) {
49
- console.log(`Expected to find structured content for TinaMarkdown`);
50
49
  return null;
51
50
  }
52
51
  return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, nodes.map((child, index) => {
package/dist/style.css CHANGED
@@ -745,10 +745,6 @@ Document
745
745
  width: 224px !important;
746
746
  }
747
747
 
748
- .tina-tailwind .w-0 {
749
- width: 0px !important;
750
- }
751
-
752
748
  .tina-tailwind .w-6 {
753
749
  width: 24px !important;
754
750
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.66.3",
3
+ "version": "0.66.4",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -24,7 +24,7 @@
24
24
  "@headlessui/react": "^1.4.1",
25
25
  "@heroicons/react": "^1.0.4",
26
26
  "@tinacms/sharedctx": "0.1.0",
27
- "@tinacms/toolkit": "0.56.13",
27
+ "@tinacms/toolkit": "0.56.14",
28
28
  "crypto-js": "^4.0.0",
29
29
  "final-form": "4.20.1",
30
30
  "graphql": "^15.1.0",