tinacms 0.65.0 → 0.65.1

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,13 @@
1
1
  # tinacms
2
2
 
3
+ ## 0.65.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 68284198a: fix: use user-specific document creator callback
8
+ - ccf4dcbd4: chore: Export low-level data provider from "tinacms", for the playground and other sandboz environments
9
+ - f2431c031: Fix type for code_block TinaMarkdown element
10
+
3
11
  ## 0.65.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -2756,7 +2756,9 @@ const TinaCMSProvider2 = (_c) => {
2756
2756
  isLocalClient,
2757
2757
  cmsCallback: props.cmsCallback,
2758
2758
  mediaStore: props.mediaStore
2759
- }, /* @__PURE__ */ React.createElement("style", null, styles), /* @__PURE__ */ React.createElement(ErrorBoundary, null, /* @__PURE__ */ React.createElement(DocumentCreator, null), /* @__PURE__ */ React.createElement(TinaDataProvider, {
2759
+ }, /* @__PURE__ */ React.createElement("style", null, styles), /* @__PURE__ */ React.createElement(ErrorBoundary, null, /* @__PURE__ */ React.createElement(DocumentCreator, {
2760
+ documentCreatorCallback
2761
+ }), /* @__PURE__ */ React.createElement(TinaDataProvider, {
2760
2762
  formifyCallback
2761
2763
  }, typeof props.children == "function" ? /* @__PURE__ */ React.createElement(TinaQuery, __spreadProps(__spreadValues({}, props), {
2762
2764
  variables: props.variables,
@@ -3138,10 +3140,13 @@ class TinaAdminApi {
3138
3140
  return response;
3139
3141
  }
3140
3142
  async createDocument(collectionName, relativePath, params) {
3141
- const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3143
+ const response = await this.api.request(`#graphql
3144
+ mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3142
3145
  createDocument(
3143
3146
  collection: $collection,
3144
3147
  relativePath: $relativePath,
3148
+ params: $params
3149
+ ){__typename}
3145
3150
  }`, {
3146
3151
  variables: {
3147
3152
  collection: collectionName,
@@ -3152,10 +3157,11 @@ class TinaAdminApi {
3152
3157
  return response;
3153
3158
  }
3154
3159
  async updateDocument(collectionName, relativePath, params) {
3155
- const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3156
- updateDocument(
3160
+ const response = await this.api.request(`#graphql
3161
+ mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3162
+ updateDocument(
3157
3163
  collection: $collection,
3158
- relativePath: $relativePath,
3164
+ relativePath: $relativePath,
3159
3165
  params: $params
3160
3166
  ){__typename}
3161
3167
  }`, {
@@ -3710,4 +3716,4 @@ class RouteMappingPlugin {
3710
3716
  this.mapper = mapper;
3711
3717
  }
3712
3718
  }
3713
- export { AuthWallInner, Client, DEFAULT_LOCAL_TINA_GQL_SERVER_URL, LocalClient, RouteMappingPlugin, TinaAdmin, TinaAdminApi, TinaCMSProvider2, TinaCloudAuthWall, TinaCloudProvider, assertShape, createClient, TinaCMSProvider2 as default, getStaticPropsForTina, gql, safeAssertShape, staticRequest, useDocumentCreatorPlugin, useGraphqlForms, useTinaAuthRedirect };
3719
+ export { AuthWallInner, Client, DEFAULT_LOCAL_TINA_GQL_SERVER_URL, LocalClient, RouteMappingPlugin, TinaAdmin, TinaAdminApi, TinaCMSProvider2, TinaCloudAuthWall, TinaCloudProvider, TinaDataProvider, assertShape, createClient, TinaCMSProvider2 as default, getStaticPropsForTina, gql, safeAssertShape, staticRequest, useDocumentCreatorPlugin, useGraphqlForms, useTinaAuthRedirect };
package/dist/index.js CHANGED
@@ -2776,7 +2776,9 @@ Document
2776
2776
  isLocalClient,
2777
2777
  cmsCallback: props.cmsCallback,
2778
2778
  mediaStore: props.mediaStore
2779
- }, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), /* @__PURE__ */ React__default["default"].createElement(ErrorBoundary, null, /* @__PURE__ */ React__default["default"].createElement(DocumentCreator, null), /* @__PURE__ */ React__default["default"].createElement(TinaDataProvider, {
2779
+ }, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), /* @__PURE__ */ React__default["default"].createElement(ErrorBoundary, null, /* @__PURE__ */ React__default["default"].createElement(DocumentCreator, {
2780
+ documentCreatorCallback
2781
+ }), /* @__PURE__ */ React__default["default"].createElement(TinaDataProvider, {
2780
2782
  formifyCallback
2781
2783
  }, typeof props.children == "function" ? /* @__PURE__ */ React__default["default"].createElement(TinaQuery, __spreadProps(__spreadValues({}, props), {
2782
2784
  variables: props.variables,
@@ -3158,10 +3160,13 @@ This will work when developing locally but NOT when deployed to production.
3158
3160
  return response;
3159
3161
  }
3160
3162
  async createDocument(collectionName, relativePath, params) {
3161
- const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3163
+ const response = await this.api.request(`#graphql
3164
+ mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3162
3165
  createDocument(
3163
3166
  collection: $collection,
3164
3167
  relativePath: $relativePath,
3168
+ params: $params
3169
+ ){__typename}
3165
3170
  }`, {
3166
3171
  variables: {
3167
3172
  collection: collectionName,
@@ -3172,10 +3177,11 @@ This will work when developing locally but NOT when deployed to production.
3172
3177
  return response;
3173
3178
  }
3174
3179
  async updateDocument(collectionName, relativePath, params) {
3175
- const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3176
- updateDocument(
3180
+ const response = await this.api.request(`#graphql
3181
+ mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
3182
+ updateDocument(
3177
3183
  collection: $collection,
3178
- relativePath: $relativePath,
3184
+ relativePath: $relativePath,
3179
3185
  params: $params
3180
3186
  ){__typename}
3181
3187
  }`, {
@@ -3740,6 +3746,7 @@ This will work when developing locally but NOT when deployed to production.
3740
3746
  exports2.TinaCMSProvider2 = TinaCMSProvider2;
3741
3747
  exports2.TinaCloudAuthWall = TinaCloudAuthWall;
3742
3748
  exports2.TinaCloudProvider = TinaCloudProvider;
3749
+ exports2.TinaDataProvider = TinaDataProvider;
3743
3750
  exports2.assertShape = assertShape;
3744
3751
  exports2.createClient = createClient;
3745
3752
  exports2["default"] = TinaCMSProvider2;
@@ -61,7 +61,7 @@ declare type BaseComponents = {
61
61
  children: JSX.Element;
62
62
  };
63
63
  code_block?: {
64
- language?: string;
64
+ lang?: string;
65
65
  children: JSX.Element;
66
66
  };
67
67
  img?: {
@@ -98,6 +98,10 @@ declare type QueryProviderProps = {
98
98
  data?: never;
99
99
  };
100
100
  export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, ...props }: QueryProviderProps & APIProviderProps & BaseProviderProps) => JSX.Element;
101
+ export declare const TinaDataProvider: ({ children, formifyCallback, }: {
102
+ children: any;
103
+ formifyCallback: formifyCallback;
104
+ }) => JSX.Element;
101
105
  /**
102
106
  * @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/features/data-fetching/#querying-tina-content-in-nextjs for more details
103
107
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.65.0",
3
+ "version": "0.65.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -17,7 +17,8 @@
17
17
  "scripts": {
18
18
  "types": "yarn tsc",
19
19
  "build": "echo \"Run `yarn build` from the root of the repository instead\"",
20
- "test": "jest --env=jsdom --passWithNoTests"
20
+ "test": "jest --env=jsdom --passWithNoTests",
21
+ "test-watch": "jest --env=jsdom --passWithNoTests --watch"
21
22
  },
22
23
  "dependencies": {
23
24
  "@headlessui/react": "^1.4.1",