@tinacms/app 0.0.17 → 0.0.19

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.
@@ -82215,17 +82215,19 @@ function FieldsBuilder({
82215
82215
  useEventSubscription("plugin:add:field", () => updateFieldPlugins(), []);
82216
82216
  return /* @__PURE__ */ jsx$1(FieldsGroup, {
82217
82217
  padding,
82218
- children: fields7.map((field) => /* @__PURE__ */ jsx$1(InnerField, {
82218
+ children: fields7.map((field, index2) => /* @__PURE__ */ jsx$1(InnerField, {
82219
82219
  field,
82220
82220
  form,
82221
- fieldPlugins
82221
+ fieldPlugins,
82222
+ index: index2
82222
82223
  }, field.name))
82223
82224
  });
82224
82225
  }
82225
82226
  const InnerField = ({
82226
82227
  field,
82227
82228
  form,
82228
- fieldPlugins
82229
+ fieldPlugins,
82230
+ index: index2
82229
82231
  }) => {
82230
82232
  react.exports.useEffect(() => {
82231
82233
  form.mutators.setFieldData(field.name, {
@@ -82269,7 +82271,8 @@ const InnerField = ({
82269
82271
  ...fieldProps,
82270
82272
  form: form.finalForm,
82271
82273
  tinaForm: form,
82272
- field
82274
+ field,
82275
+ index: index2
82273
82276
  });
82274
82277
  }
82275
82278
  return /* @__PURE__ */ jsx$1("p", {
@@ -84317,6 +84320,7 @@ function wrapFieldsWithMeta(Field22) {
84317
84320
  label: props.field.label,
84318
84321
  description: props.field.description,
84319
84322
  error: props.meta.error,
84323
+ index: props.index,
84320
84324
  children: /* @__PURE__ */ jsx$1(Field22, {
84321
84325
  ...props
84322
84326
  })
@@ -84329,6 +84333,7 @@ const FieldMeta = ({
84329
84333
  error: error2,
84330
84334
  margin = true,
84331
84335
  children: children2,
84336
+ index: index2,
84332
84337
  ...props
84333
84338
  }) => {
84334
84339
  const {
@@ -84348,6 +84353,9 @@ const FieldMeta = ({
84348
84353
  onClick: () => setFocusedField({
84349
84354
  fieldName: name2
84350
84355
  }),
84356
+ style: {
84357
+ zIndex: index2 ? 1e3 - index2 : void 0
84358
+ },
84351
84359
  ...props,
84352
84360
  children: [/* @__PURE__ */ jsxs(FieldLabel, {
84353
84361
  name: name2,
@@ -114799,9 +114807,9 @@ const RenderForm$1 = ({
114799
114807
  schema,
114800
114808
  template
114801
114809
  });
114802
- let slugFunction = (_b = (_a2 = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b.slugify;
114810
+ let slugFunction = (_b = (_a2 = template == null ? void 0 : template.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b.slugify;
114803
114811
  if (!slugFunction) {
114804
- const titleField = (_c = schemaCollection.fields.find((x2) => x2.required && x2.type === "string" && x2.isTitle)) == null ? void 0 : _c.name;
114812
+ const titleField = (_c = template == null ? void 0 : template.fields.find((x2) => x2.required && x2.type === "string" && x2.isTitle)) == null ? void 0 : _c.name;
114805
114813
  if (titleField) {
114806
114814
  slugFunction = (values2) => {
114807
114815
  var _a22;
@@ -114820,7 +114828,7 @@ const RenderForm$1 = ({
114820
114828
  },
114821
114829
  onChange: (values2) => {
114822
114830
  var _a3;
114823
- if (slugFunction && typeof values2.active === "string" && (values2 == null ? void 0 : values2.active) !== "filename" && !(values2 == null ? void 0 : values2.submitting) && !((_a3 = values2.touched) == null ? void 0 : _a3.filename)) {
114831
+ if (slugFunction && (values2 == null ? void 0 : values2.active) !== "filename" && !(values2 == null ? void 0 : values2.submitting) && !((_a3 = values2.touched) == null ? void 0 : _a3.filename)) {
114824
114832
  const value = slugFunction(values2 == null ? void 0 : values2.values);
114825
114833
  form.finalForm.change("filename", value);
114826
114834
  }
@@ -114831,7 +114839,7 @@ const RenderForm$1 = ({
114831
114839
  name: "filename",
114832
114840
  label: "Filename",
114833
114841
  component: "text",
114834
- disabled: (_b2 = (_a22 = schemaCollection == null ? void 0 : schemaCollection.ui) == null ? void 0 : _a22.filename) == null ? void 0 : _b2.disabled,
114842
+ disabled: (_b2 = (_a22 = template == null ? void 0 : template.ui) == null ? void 0 : _a22.filename) == null ? void 0 : _b2.disabled,
114835
114843
  description: /* @__PURE__ */ jsxs("span", {
114836
114844
  children: ["A unique filename for the content.", /* @__PURE__ */ jsx$1("br", {}), "Examples: ", /* @__PURE__ */ jsx$1("code", {
114837
114845
  children: "My_Document"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -37,7 +37,7 @@
37
37
  "@tailwindcss/aspect-ratio": "^0.4.0",
38
38
  "@tailwindcss/line-clamp": "^0.3.1",
39
39
  "@tailwindcss/typography": "^0.5.4",
40
- "@tinacms/schema-tools": "0.1.5",
40
+ "@tinacms/schema-tools": "0.1.6",
41
41
  "@tinacms/scripts": "0.51.1",
42
42
  "@vitejs/plugin-react": "^1.3.2",
43
43
  "@xstate/react": "^3.0.0",
@@ -55,7 +55,7 @@
55
55
  "react-router-dom": "6",
56
56
  "styled-components": "5.3.5",
57
57
  "tailwindcss": "^3.1.6",
58
- "tinacms": "0.69.12",
58
+ "tinacms": "0.69.14",
59
59
  "typescript": "^4.6.4",
60
60
  "vite": "2.9.15",
61
61
  "vite-node": "^0.23.4",