tinacms 0.0.0-a5bc4cd-20241024211559 → 0.0.0-a6daef4-20250115020754

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.
@@ -25,6 +25,9 @@ export interface DocumentNode {
25
25
  }
26
26
  export interface DocumentForm {
27
27
  _values: Object;
28
+ _sys?: {
29
+ hasReferences?: boolean;
30
+ };
28
31
  }
29
32
  export interface DocumentSys {
30
33
  _sys: {
package/dist/client.js CHANGED
@@ -1,10 +1,7 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("fetch-ponyfill")) : typeof define === "function" && define.amd ? define(["exports", "fetch-ponyfill"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP));
3
- })(this, function(exports2, fetchPonyfill) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}));
3
+ })(this, function(exports2) {
4
4
  "use strict";
5
- const { fetch: fetchPonyfillFN, Headers: HeadersPonyfill } = fetchPonyfill();
6
- const fetchDefined = typeof fetch === "undefined" ? fetchPonyfillFN : fetch;
7
- const HeadersDefined = typeof Headers === "undefined" ? HeadersPonyfill : Headers;
8
5
  const TINA_HOST = "content.tinajs.io";
9
6
  class TinaClient {
10
7
  constructor({
@@ -39,7 +36,7 @@
39
36
  var _a;
40
37
  await this.init();
41
38
  const errorPolicyDefined = errorPolicy || this.errorPolicy;
42
- const headers = new HeadersDefined();
39
+ const headers = new Headers();
43
40
  if (this.readonlyToken) {
44
41
  headers.append("X-API-KEY", this.readonlyToken);
45
42
  }
@@ -72,7 +69,7 @@
72
69
  return value;
73
70
  }
74
71
  }
75
- const res = await fetchDefined(url, optionsObject);
72
+ const res = await fetch(url, optionsObject);
76
73
  if (!res.ok) {
77
74
  let additionalInfo = "";
78
75
  if (res.status === 401) {
package/dist/client.mjs CHANGED
@@ -1,7 +1,3 @@
1
- import fetchPonyfill from "fetch-ponyfill";
2
- const { fetch: fetchPonyfillFN, Headers: HeadersPonyfill } = fetchPonyfill();
3
- const fetchDefined = typeof fetch === "undefined" ? fetchPonyfillFN : fetch;
4
- const HeadersDefined = typeof Headers === "undefined" ? HeadersPonyfill : Headers;
5
1
  const TINA_HOST = "content.tinajs.io";
6
2
  class TinaClient {
7
3
  constructor({
@@ -36,7 +32,7 @@ class TinaClient {
36
32
  var _a;
37
33
  await this.init();
38
34
  const errorPolicyDefined = errorPolicy || this.errorPolicy;
39
- const headers = new HeadersDefined();
35
+ const headers = new Headers();
40
36
  if (this.readonlyToken) {
41
37
  headers.append("X-API-KEY", this.readonlyToken);
42
38
  }
@@ -69,7 +65,7 @@ class TinaClient {
69
65
  return value;
70
66
  }
71
67
  }
72
- const res = await fetchDefined(url, optionsObject);
68
+ const res = await fetch(url, optionsObject);
73
69
  if (!res.ok) {
74
70
  let additionalInfo = "";
75
71
  if (res.status === 401) {
package/dist/index.d.ts CHANGED
@@ -53,7 +53,7 @@ export type TinaCollection = Collection;
53
53
  export type TinaCloudSchema = Schema;
54
54
  export declare const defineSchema: (config: Schema) => Schema<false>;
55
55
  export declare const defineLegacyConfig: (config: Omit<TinaCMSProviderDefaultProps, "children">) => Omit<TinaCMSProviderDefaultProps, "children">;
56
- interface MediaStoreClass {
56
+ export interface MediaStoreClass {
57
57
  new (...args: any[]): MediaStore;
58
58
  }
59
59
  export declare const defineStaticConfig: (config: Config<(cms: TinaCMS) => TinaCMS, formifyCallback, DocumentCreatorCallback, MediaStoreClass>) => Config<(cms: TinaCMS) => TinaCMS, formifyCallback, import("./hooks/use-content-creator").DocumentCreatorArgs, MediaStoreClass, undefined>;