tinacms 2.8.3 → 2.9.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.
@@ -58,9 +58,15 @@ type BaseComponents = {
58
58
  lic?: {
59
59
  children: JSX.Element;
60
60
  };
61
+ /**
62
+ * @deprecated Use `blockquote` instead. This was incorrectly named and will be removed in a future version.
63
+ */
61
64
  block_quote?: {
62
65
  children: JSX.Element;
63
66
  };
67
+ blockquote?: {
68
+ children: JSX.Element;
69
+ };
64
70
  code_block?: {
65
71
  lang?: string;
66
72
  value: string;
@@ -82,7 +82,6 @@
82
82
  case "h5":
83
83
  case "h6":
84
84
  case "p":
85
- case "blockquote":
86
85
  case "ol":
87
86
  case "ul":
88
87
  case "li":
@@ -99,6 +98,14 @@
99
98
  return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
100
99
  }
101
100
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: child.children }));
101
+ case "blockquote":
102
+ const BlockquoteComponent = components.blockquote || components.block_quote;
103
+ if (BlockquoteComponent) {
104
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
105
+ }
106
+ return React.createElement("blockquote", {
107
+ children: /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children })
108
+ });
102
109
  case "img":
103
110
  if (components[child.type]) {
104
111
  const Component2 = components[child.type];
@@ -79,7 +79,6 @@ const Node = ({ components, child }) => {
79
79
  case "h5":
80
80
  case "h6":
81
81
  case "p":
82
- case "blockquote":
83
82
  case "ol":
84
83
  case "ul":
85
84
  case "li":
@@ -96,6 +95,14 @@ const Node = ({ components, child }) => {
96
95
  return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
97
96
  }
98
97
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: child.children }));
98
+ case "blockquote":
99
+ const BlockquoteComponent = components.blockquote || components.block_quote;
100
+ if (BlockquoteComponent) {
101
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
102
+ }
103
+ return React.createElement("blockquote", {
104
+ children: /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children })
105
+ });
99
106
  case "img":
100
107
  if (components[child.type]) {
101
108
  const Component2 = components[child.type];
@@ -63,9 +63,15 @@ type BaseComponents = {
63
63
  lic?: {
64
64
  children: JSX.Element;
65
65
  };
66
+ /**
67
+ * @deprecated Use `blockquote` instead. This was incorrectly named and will be removed in a future version.
68
+ */
66
69
  block_quote?: {
67
70
  children: JSX.Element;
68
71
  };
72
+ blockquote?: {
73
+ children: JSX.Element;
74
+ };
69
75
  code_block?: {
70
76
  lang?: string;
71
77
  value: string;
@@ -59,7 +59,6 @@
59
59
  case "h5":
60
60
  case "h6":
61
61
  case "p":
62
- case "blockquote":
63
62
  case "ol":
64
63
  case "ul":
65
64
  case "li":
@@ -70,6 +69,14 @@
70
69
  return React.createElement(child.type, {
71
70
  children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
72
71
  });
72
+ case "blockquote":
73
+ const BlockquoteComponent = components.blockquote || components.block_quote;
74
+ if (BlockquoteComponent) {
75
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
76
+ }
77
+ return React.createElement("blockquote", {
78
+ children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
79
+ });
73
80
  case "lic":
74
81
  if (components.lic) {
75
82
  const Component2 = components.lic;
@@ -56,7 +56,6 @@ const Node = ({
56
56
  case "h5":
57
57
  case "h6":
58
58
  case "p":
59
- case "blockquote":
60
59
  case "ol":
61
60
  case "ul":
62
61
  case "li":
@@ -67,6 +66,14 @@ const Node = ({
67
66
  return React.createElement(child.type, {
68
67
  children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
69
68
  });
69
+ case "blockquote":
70
+ const BlockquoteComponent = components.blockquote || components.block_quote;
71
+ if (BlockquoteComponent) {
72
+ return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
73
+ }
74
+ return React.createElement("blockquote", {
75
+ children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
76
+ });
70
77
  case "lic":
71
78
  if (components.lic) {
72
79
  const Component2 = components.lic;
@@ -9,7 +9,7 @@ import type { TinaCMSProviderDefaultProps } from './types/cms';
9
9
  export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, schema, ...props }: TinaCMSProviderDefaultProps) => React.JSX.Element;
10
10
  export type DocumentCreatorCallback = Parameters<typeof useDocumentCreatorPlugin>[0];
11
11
  /**
12
- * @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
12
+ * @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/r/content-api-overview for more details
13
13
  *
14
14
  * A convenience function which makes a GraphQL request
15
15
  * to a local GraphQL server and ensures the response fits
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export declare const Badge: ({ children, calloutStyle, className, ...props }: {
3
+ children?: React.ReactNode;
4
+ calloutStyle?: "warning" | "info" | "success" | "error";
5
+ } & React.HTMLProps<HTMLDivElement>) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export declare const Callout: ({ children, calloutStyle, className, ...props }: {
3
+ children?: React.ReactNode;
4
+ calloutStyle?: "warning" | "info" | "success" | "error";
5
+ } & React.HTMLProps<HTMLDivElement>) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "2.8.3",
3
+ "version": "2.9.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export declare const Alert: ({ children, alertStyle, className, ...props }: {
3
- children?: React.ReactNode;
4
- alertStyle?: "warning";
5
- } & React.HTMLProps<HTMLDivElement>) => React.JSX.Element;