tinacms 1.5.20 → 1.5.21

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/LICENSE CHANGED
@@ -1,12 +1,4 @@
1
- Copyright (c) 2023-present Forestry.io Holdings Inc.
2
-
3
- Portions of the TinaCMS software are licensed as follows:
4
-
5
- * All software that resides under the "packages/@tinacms/datalayer/" and the "packages/@tinacms/graphql/" directories (the "Tina Data Layer"), is licensed under the license defined in "packages/@tinacms/datalayer/LICENSE".
6
-
7
- * All software outside of the above-mentioned directories is available under the "Apache 2.0" license as set forth below.
8
-
9
- Apache License
1
+ Apache License
10
2
  Version 2.0, January 2004
11
3
  http://www.apache.org/licenses/
12
4
 
package/dist/index.js CHANGED
@@ -2007,7 +2007,7 @@ var __publicField = (obj, key, value) => {
2007
2007
  }
2008
2008
  getFieldGroup({
2009
2009
  formOrObjectField,
2010
- values,
2010
+ values = {},
2011
2011
  namePathIndex,
2012
2012
  namePath
2013
2013
  }) {
@@ -2137,7 +2137,7 @@ var __publicField = (obj, key, value) => {
2137
2137
  };
2138
2138
  } else {
2139
2139
  const childrenIndex = namePathIndex + 1;
2140
- const propsIndex = namePath.findIndex((value2) => value2 === "props");
2140
+ const propsIndex = namePath.slice(childrenIndex).findIndex((value2) => value2 === "props") + childrenIndex;
2141
2141
  const itemName = namePath.slice(childrenIndex, propsIndex).join(".");
2142
2142
  const item = finalForm.getIn(value, itemName);
2143
2143
  const props = item.props;
@@ -9373,7 +9373,7 @@ var __publicField = (obj, key, value) => {
9373
9373
  /* @__PURE__ */ React.createElement("div", { className: "w-16 h-16 bg-gray-50 border-r border-gray-150 overflow-hidden flex justify-center flex-shrink-0" }, isImage(thumbnail) ? /* @__PURE__ */ React.createElement(
9374
9374
  "img",
9375
9375
  {
9376
- className: "object-cover w-full h-full object-center origin-center transition-all duration-150 ease-out group-hover:scale-110",
9376
+ className: "object-contain object-center w-full h-full origin-center transition-all duration-150 ease-out group-hover:scale-110",
9377
9377
  src: thumbnail,
9378
9378
  alt: item.filename
9379
9379
  }
@@ -9411,7 +9411,7 @@ var __publicField = (obj, key, value) => {
9411
9411
  isImage(thumbnail) ? /* @__PURE__ */ React.createElement(
9412
9412
  "img",
9413
9413
  {
9414
- className: "object-cover w-full h-full object-center",
9414
+ className: "object-contain object-center w-full h-full",
9415
9415
  src: thumbnail,
9416
9416
  alt: item.filename
9417
9417
  }
@@ -9901,7 +9901,7 @@ var __publicField = (obj, key, value) => {
9901
9901
  )), isImage(thumbnail) ? /* @__PURE__ */ React.createElement("div", { className: "w-full max-h-[75%]" }, /* @__PURE__ */ React.createElement(
9902
9902
  "img",
9903
9903
  {
9904
- className: "block border border-gray-100 rounded-md overflow-hidden max-w-full max-h-full object-fit h-auto shadow",
9904
+ className: "block border border-gray-100 rounded-md overflow-hidden object-center object-contain max-w-full max-h-full m-auto shadow",
9905
9905
  src: thumbnail,
9906
9906
  alt: activeItem.filename
9907
9907
  }
@@ -11140,7 +11140,7 @@ var __publicField = (obj, key, value) => {
11140
11140
  React.useEffect(() => {
11141
11141
  const handleEnter = (e) => {
11142
11142
  if (selected) {
11143
- if (isHotkey(key, e)) {
11143
+ if (isHotkey.isHotkey(key, e)) {
11144
11144
  e.preventDefault();
11145
11145
  callback();
11146
11146
  }
@@ -11501,7 +11501,7 @@ var __publicField = (obj, key, value) => {
11501
11501
  if (!entry)
11502
11502
  return;
11503
11503
  rules.forEach(({ hotkey, query }) => {
11504
- if (isHotkey(hotkey, event) && plateHeadless.queryNode(entry, query)) {
11504
+ if (isHotkey.isHotkey(hotkey, event) && plateHeadless.queryNode(entry, query)) {
11505
11505
  event.preventDefault();
11506
11506
  event.stopPropagation();
11507
11507
  plateHeadless.insertNodes(
package/dist/index.mjs CHANGED
@@ -23,7 +23,7 @@ import * as Popover$1 from "@radix-ui/react-popover";
23
23
  import * as pkg$1 from "react-color";
24
24
  import * as pkg from "color-string";
25
25
  import * as dropzone from "react-dropzone";
26
- import isHotkey from "is-hotkey";
26
+ import { isHotkey } from "is-hotkey";
27
27
  import { computePosition, flip, shift } from "@floating-ui/dom";
28
28
  import moment from "moment";
29
29
  import { formatDistanceToNow } from "date-fns";
@@ -2013,7 +2013,7 @@ class Form {
2013
2013
  }
2014
2014
  getFieldGroup({
2015
2015
  formOrObjectField,
2016
- values,
2016
+ values = {},
2017
2017
  namePathIndex,
2018
2018
  namePath
2019
2019
  }) {
@@ -2143,7 +2143,7 @@ class Form {
2143
2143
  };
2144
2144
  } else {
2145
2145
  const childrenIndex = namePathIndex + 1;
2146
- const propsIndex = namePath.findIndex((value2) => value2 === "props");
2146
+ const propsIndex = namePath.slice(childrenIndex).findIndex((value2) => value2 === "props") + childrenIndex;
2147
2147
  const itemName = namePath.slice(childrenIndex, propsIndex).join(".");
2148
2148
  const item = getIn(value, itemName);
2149
2149
  const props = item.props;
@@ -9379,7 +9379,7 @@ function ListMediaItem({ item, onClick, active }) {
9379
9379
  /* @__PURE__ */ React__default.createElement("div", { className: "w-16 h-16 bg-gray-50 border-r border-gray-150 overflow-hidden flex justify-center flex-shrink-0" }, isImage(thumbnail) ? /* @__PURE__ */ React__default.createElement(
9380
9380
  "img",
9381
9381
  {
9382
- className: "object-cover w-full h-full object-center origin-center transition-all duration-150 ease-out group-hover:scale-110",
9382
+ className: "object-contain object-center w-full h-full origin-center transition-all duration-150 ease-out group-hover:scale-110",
9383
9383
  src: thumbnail,
9384
9384
  alt: item.filename
9385
9385
  }
@@ -9417,7 +9417,7 @@ function GridMediaItem({ item, active, onClick }) {
9417
9417
  isImage(thumbnail) ? /* @__PURE__ */ React__default.createElement(
9418
9418
  "img",
9419
9419
  {
9420
- className: "object-cover w-full h-full object-center",
9420
+ className: "object-contain object-center w-full h-full",
9421
9421
  src: thumbnail,
9422
9422
  alt: item.filename
9423
9423
  }
@@ -9907,7 +9907,7 @@ const ActiveItemPreview = ({
9907
9907
  )), isImage(thumbnail) ? /* @__PURE__ */ React__default.createElement("div", { className: "w-full max-h-[75%]" }, /* @__PURE__ */ React__default.createElement(
9908
9908
  "img",
9909
9909
  {
9910
- className: "block border border-gray-100 rounded-md overflow-hidden max-w-full max-h-full object-fit h-auto shadow",
9910
+ className: "block border border-gray-100 rounded-md overflow-hidden object-center object-contain max-w-full max-h-full m-auto shadow",
9911
9911
  src: thumbnail,
9912
9912
  alt: activeItem.filename
9913
9913
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "1.5.20",
3
+ "version": "1.5.21",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -70,7 +70,7 @@
70
70
  "@react-types/shared": "^3.10.0",
71
71
  "@sambego/storybook-styles": "^1.0.0",
72
72
  "@tinacms/schema-tools": "1.4.12",
73
- "@tinacms/search": "1.0.10",
73
+ "@tinacms/search": "1.0.11",
74
74
  "@tinacms/sharedctx": "1.0.2",
75
75
  "@udecode/plate-headless": "^21.4.0",
76
76
  "atob": "2.1.2",