tinacms 0.0.0-bdea884-20250606054015 → 0.0.0-bebaba8-20251211002320

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.
Files changed (119) hide show
  1. package/dist/__vite-browser-external-d06ac358.js +4 -0
  2. package/dist/admin/api.d.ts +4 -1
  3. package/dist/admin/components/{Sidebar.d.ts → AdminNav.d.ts} +0 -3
  4. package/dist/admin/components/Page.d.ts +3 -9
  5. package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
  6. package/dist/admin/pages/DashboardPage.d.ts +0 -3
  7. package/dist/admin/pages/ScreenPage.d.ts +0 -3
  8. package/dist/auth/AuthModal.d.ts +1 -4
  9. package/dist/auth/TinaCloudProvider.d.ts +0 -1
  10. package/dist/client.js +131 -185
  11. package/dist/index.js +120018 -118199
  12. package/dist/internalClient/index.d.ts +26 -1
  13. package/dist/{node-cache-5e8db9f0.mjs → node-cache-c9558e1e.js} +5 -5
  14. package/dist/react.d.ts +13 -6
  15. package/dist/react.js +209 -204
  16. package/dist/rich-text/index.d.ts +6 -0
  17. package/dist/rich-text/index.js +234 -230
  18. package/dist/rich-text/prism.js +16 -18
  19. package/dist/rich-text/static.d.ts +154 -0
  20. package/dist/rich-text/{index.mjs → static.js} +90 -96
  21. package/dist/tina-cms.d.ts +1 -1
  22. package/dist/toolkit/components/ProgressBar.d.ts +11 -0
  23. package/dist/toolkit/components/media/media-item.d.ts +11 -1
  24. package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
  25. package/dist/toolkit/components/ui/button.d.ts +11 -0
  26. package/dist/toolkit/components/ui/calendar.d.ts +8 -0
  27. package/dist/toolkit/components/ui/date-time-picker.d.ts +111 -0
  28. package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
  29. package/dist/toolkit/components/ui/input.d.ts +3 -0
  30. package/dist/toolkit/components/ui/popover.d.ts +7 -0
  31. package/dist/toolkit/components/ui/select.d.ts +13 -0
  32. package/dist/toolkit/fields/components/color-picker/block-widget.d.ts +3 -0
  33. package/dist/toolkit/fields/components/color-picker/color-input.d.ts +35 -0
  34. package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +6 -2
  35. package/dist/toolkit/fields/components/color-picker/color-utils.d.ts +37 -0
  36. package/dist/toolkit/fields/components/color-picker/sketch-widget.d.ts +3 -0
  37. package/dist/toolkit/fields/components/password-field.d.ts +1 -1
  38. package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
  39. package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
  40. package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
  41. package/dist/toolkit/fields/components/select.d.ts +2 -2
  42. package/dist/toolkit/fields/components/text-field.d.ts +1 -1
  43. package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +2 -2
  44. package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
  45. package/dist/toolkit/fields/plugins/color-field-plugin.d.ts +1 -0
  46. package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +0 -2
  47. package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
  48. package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
  49. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +3 -1
  50. package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
  51. package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -0
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +2 -2
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +2 -2
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +1 -1
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +2 -2
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +1 -1
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +1 -1
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +7 -7
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +2 -2
  60. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +1 -1
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +1 -1
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +2 -2
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +1 -1
  64. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +1 -1
  65. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +1 -1
  66. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +6 -0
  67. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +4 -0
  68. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +2 -2
  69. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +18 -18
  70. package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +2 -2
  71. package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
  72. package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
  73. package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
  74. package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
  75. package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
  76. package/dist/toolkit/form-builder/form-builder.d.ts +4 -16
  77. package/dist/toolkit/form-builder/index.d.ts +1 -0
  78. package/dist/toolkit/forms/field.d.ts +3 -0
  79. package/dist/toolkit/forms/form.d.ts +22 -3
  80. package/dist/toolkit/git-client/git-client.d.ts +25 -2
  81. package/dist/toolkit/git-client/git-file.d.ts +18 -0
  82. package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
  83. package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
  84. package/dist/toolkit/icons/Tina.d.ts +0 -5
  85. package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
  86. package/dist/toolkit/icons/index.d.ts +1 -0
  87. package/dist/toolkit/index.d.ts +1 -1
  88. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +4 -1
  89. package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
  90. package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
  91. package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
  92. package/dist/toolkit/react-sidebar/components/NavMenuTrigger.d.ts +11 -0
  93. package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
  94. package/dist/toolkit/react-sidebar/components/badge.d.ts +6 -0
  95. package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
  96. package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
  97. package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
  98. package/dist/toolkit/react-sidebar/components/nav-components.d.ts +11 -0
  99. package/dist/toolkit/react-sidebar/components/nav-context.d.ts +15 -0
  100. package/dist/toolkit/react-sidebar/components/nav.d.ts +6 -3
  101. package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
  102. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +28 -7
  103. package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
  104. package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
  105. package/dist/toolkit/react-sidebar/index.d.ts +4 -1
  106. package/dist/toolkit/styles/button.d.ts +2 -2
  107. package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
  108. package/dist/toolkit/styles/index.d.ts +1 -0
  109. package/dist/toolkit/tina-state.d.ts +11 -0
  110. package/dist/utils/cn.d.ts +2 -0
  111. package/dist/utils/index.d.ts +1 -0
  112. package/package.json +29 -51
  113. package/dist/admin/pages/IndexingPage.d.ts +0 -2
  114. package/dist/client.mjs +0 -132
  115. package/dist/index.mjs +0 -121710
  116. package/dist/react.mjs +0 -246
  117. package/dist/rich-text/prism.mjs +0 -16
  118. package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
  119. package/dist/toolkit/react-datetime/DateTime.d.ts +0 -135
@@ -0,0 +1,154 @@
1
+ /**
2
+ * This is a static-ready version of the TinaMarkdown component.
3
+ * The primary change is the removal of the `MemoNode` wrapper, which used
4
+ * the `React.useMemo` hook. This hook is for client-side performance
5
+ * optimization and is not needed for server-side rendering (SSR).
6
+ * By rendering the `Node` component directly, the component becomes
7
+ * fully static and can be rendered on the server.
8
+ */
9
+ import React from 'react';
10
+ type BaseComponents = {
11
+ h1?: {
12
+ children: JSX.Element;
13
+ };
14
+ h2?: {
15
+ children: JSX.Element;
16
+ };
17
+ h3?: {
18
+ children: JSX.Element;
19
+ };
20
+ h4?: {
21
+ children: JSX.Element;
22
+ };
23
+ h5?: {
24
+ children: JSX.Element;
25
+ };
26
+ h6?: {
27
+ children: JSX.Element;
28
+ };
29
+ p?: {
30
+ children: JSX.Element;
31
+ };
32
+ a?: {
33
+ url: string;
34
+ children: JSX.Element;
35
+ };
36
+ italic?: {
37
+ children: JSX.Element;
38
+ };
39
+ bold?: {
40
+ children: JSX.Element;
41
+ };
42
+ strikethrough?: {
43
+ children: JSX.Element;
44
+ };
45
+ underline?: {
46
+ children: JSX.Element;
47
+ };
48
+ code?: {
49
+ children: JSX.Element;
50
+ };
51
+ text?: {
52
+ children: string;
53
+ };
54
+ ul?: {
55
+ children: JSX.Element;
56
+ };
57
+ ol?: {
58
+ children: JSX.Element;
59
+ };
60
+ li?: {
61
+ children: JSX.Element;
62
+ };
63
+ lic?: {
64
+ children: JSX.Element;
65
+ };
66
+ /**
67
+ * @deprecated Use `blockquote` instead. This was incorrectly named and will be removed in a future version.
68
+ */
69
+ block_quote?: {
70
+ children: JSX.Element;
71
+ };
72
+ blockquote?: {
73
+ children: JSX.Element;
74
+ };
75
+ code_block?: {
76
+ lang?: string;
77
+ value: string;
78
+ };
79
+ mermaid?: {
80
+ value: string;
81
+ };
82
+ img?: {
83
+ url: string;
84
+ caption?: string;
85
+ alt?: string;
86
+ };
87
+ hr?: {};
88
+ break?: {};
89
+ maybe_mdx?: {
90
+ children: JSX.Element;
91
+ };
92
+ html?: {
93
+ value: string;
94
+ };
95
+ html_inline?: {
96
+ value: string;
97
+ };
98
+ table?: {
99
+ align?: ('left' | 'right' | 'center')[];
100
+ tableRows: {
101
+ tableCells: {
102
+ value: TinaMarkdownContent;
103
+ }[];
104
+ }[];
105
+ };
106
+ component_missing?: {
107
+ name: string;
108
+ };
109
+ };
110
+ type BaseComponentSignature = {
111
+ [BK in keyof BaseComponents]: (props: BaseComponents[BK]) => JSX.Element;
112
+ };
113
+ /**
114
+ * Define the allowed components and their props
115
+ * ```ts
116
+ * const components:
117
+ * Components<{
118
+ * BlockQuote: {
119
+ * children: TinaMarkdownContent;
120
+ * authorName: string;
121
+ * };
122
+ * }> = {
123
+ * BlockQuote: (props: {
124
+ * children: TinaMarkdownContent;
125
+ * authorName: string;
126
+ * }) => {
127
+ * return (
128
+ * <div>
129
+ * <blockquote>
130
+ * <TinaMarkdown content={props.children} />
131
+ * {props.authorName}
132
+ * </blockquote>
133
+ * </div>
134
+ * );
135
+ * }
136
+ * }
137
+ * }
138
+ * ```
139
+ */
140
+ export type Components<ComponentAndProps extends object> = {
141
+ [K in keyof ComponentAndProps]: (props: ComponentAndProps[K]) => JSX.Element;
142
+ } & BaseComponentSignature;
143
+ export type TinaMarkdownContent = {
144
+ type: string;
145
+ children: TinaMarkdownContent[];
146
+ [key: string]: any;
147
+ };
148
+ export declare const StaticTinaMarkdown: <CustomComponents extends {
149
+ [key: string]: object;
150
+ } = any>({ content, components, }: {
151
+ content: TinaMarkdownContent | TinaMarkdownContent[];
152
+ components?: Components<{}> | Components<{ [BK in keyof CustomComponents]: (props: CustomComponents[BK]) => JSX.Element; }>;
153
+ }) => React.JSX.Element;
154
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- const TinaMarkdown = ({
2
+ const StaticTinaMarkdown = ({
3
3
  content,
4
4
  components = {}
5
5
  }) => {
@@ -11,64 +11,41 @@ const TinaMarkdown = ({
11
11
  return null;
12
12
  }
13
13
  return /* @__PURE__ */ React.createElement(React.Fragment, null, nodes.map((child, index) => {
14
- return /* @__PURE__ */ React.createElement(MemoNode, { components, key: index, child });
14
+ return /* @__PURE__ */ React.createElement(Node, { components, key: index, child });
15
15
  }));
16
16
  };
17
17
  const Leaf = (props) => {
18
+ let el = /* @__PURE__ */ React.createElement(React.Fragment, null, props.text);
19
+ if (props.components.text) {
20
+ const Component = props.components.text;
21
+ el = /* @__PURE__ */ React.createElement(Component, null, props.text);
22
+ }
18
23
  if (props.bold) {
19
- const { bold, ...rest } = props;
20
- if (props.components.bold) {
21
- const Component = props.components.bold;
22
- return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
23
- }
24
- return /* @__PURE__ */ React.createElement("strong", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
24
+ const Component = props.components.bold || "strong";
25
+ el = /* @__PURE__ */ React.createElement(Component, null, el);
25
26
  }
26
27
  if (props.italic) {
27
- const { italic, ...rest } = props;
28
- if (props.components.italic) {
29
- const Component = props.components.italic;
30
- return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
31
- }
32
- return /* @__PURE__ */ React.createElement("em", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
28
+ const Component = props.components.italic || "em";
29
+ el = /* @__PURE__ */ React.createElement(Component, null, el);
33
30
  }
34
31
  if (props.underline) {
35
- const { underline, ...rest } = props;
36
- if (props.components.underline) {
37
- const Component = props.components.underline;
38
- return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
39
- }
40
- return /* @__PURE__ */ React.createElement("u", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
32
+ const Component = props.components.underline || "u";
33
+ el = /* @__PURE__ */ React.createElement(Component, null, el);
41
34
  }
42
35
  if (props.strikethrough) {
43
- const { strikethrough, ...rest } = props;
44
- if (props.components.strikethrough) {
45
- const Component = props.components.strikethrough;
46
- return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
47
- }
48
- return /* @__PURE__ */ React.createElement("s", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
36
+ const Component = props.components.strikethrough || "s";
37
+ el = /* @__PURE__ */ React.createElement(Component, null, el);
49
38
  }
50
39
  if (props.code) {
51
- const { code, ...rest } = props;
52
- if (props.components.code) {
53
- const Component = props.components.code;
54
- return /* @__PURE__ */ React.createElement(Component, null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
55
- }
56
- return /* @__PURE__ */ React.createElement("code", null, /* @__PURE__ */ React.createElement(Leaf, { ...rest }));
57
- }
58
- if (props.components.text) {
59
- const Component = props.components.text;
60
- return /* @__PURE__ */ React.createElement(Component, null, props.text);
40
+ const Component = props.components.code || "code";
41
+ el = /* @__PURE__ */ React.createElement(Component, null, el);
61
42
  }
62
- return /* @__PURE__ */ React.createElement(React.Fragment, null, props.text);
43
+ return el;
63
44
  };
64
- const MemoNode = (props) => {
65
- const MNode = React.useMemo(
66
- () => /* @__PURE__ */ React.createElement(Node, { ...props }),
67
- [JSON.stringify(props)]
68
- );
69
- return MNode;
70
- };
71
- const Node = ({ components, child }) => {
45
+ const Node = ({
46
+ components,
47
+ child
48
+ }) => {
72
49
  var _a, _b, _c, _d, _e, _f, _g;
73
50
  const { children, ...props } = child;
74
51
  switch (child.type) {
@@ -79,23 +56,36 @@ const Node = ({ components, child }) => {
79
56
  case "h5":
80
57
  case "h6":
81
58
  case "p":
82
- case "blockquote":
83
59
  case "ol":
84
60
  case "ul":
85
61
  case "li":
86
62
  if (components[child.type]) {
87
63
  const Component2 = components[child.type];
88
- return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
64
+ return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
89
65
  }
90
66
  return React.createElement(child.type, {
91
- children: /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children })
67
+ children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
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 })
92
76
  });
93
77
  case "lic":
94
78
  if (components.lic) {
95
79
  const Component2 = components.lic;
96
- return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }));
80
+ return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
97
81
  }
98
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: child.children }));
82
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
83
+ StaticTinaMarkdown,
84
+ {
85
+ components,
86
+ content: child.children
87
+ }
88
+ ));
99
89
  case "img":
100
90
  if (components[child.type]) {
101
91
  const Component2 = components[child.type];
@@ -106,14 +96,11 @@ const Node = ({ components, child }) => {
106
96
  if (components[child.type]) {
107
97
  const Component2 = components[child.type];
108
98
  return (
109
- // @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
110
- /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }))
99
+ //@ts-ignore Same issue with TinaMarkdown
100
+ /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }))
111
101
  );
112
102
  }
113
- return (
114
- // @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
115
- /* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }))
116
- );
103
+ return /* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
117
104
  case "code_block": {
118
105
  let codeString = "";
119
106
  if (Array.isArray(child.children)) {
@@ -125,10 +112,7 @@ const Node = ({ components, child }) => {
125
112
  }
126
113
  if (components[child.type]) {
127
114
  const Component2 = components[child.type];
128
- return (
129
- // @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
130
- /* @__PURE__ */ React.createElement(Component2, { ...props, value: codeString })
131
- );
115
+ return /* @__PURE__ */ React.createElement(Component2, { ...props, value: codeString });
132
116
  }
133
117
  return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null, codeString));
134
118
  }
@@ -157,37 +141,43 @@ const Node = ({ components, child }) => {
157
141
  const firstRowHeader = (_a = child.props) == null ? void 0 : _a.firstRowHeader;
158
142
  const rows2 = (firstRowHeader ? (_b = child.props) == null ? void 0 : _b.tableRows.filter((_, i) => i !== 0) : (_c = child.props) == null ? void 0 : _c.tableRows) || [];
159
143
  const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
160
- const TableComponent2 = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }));
144
+ const TableComponent2 = (
145
+ //@ts-ignore Same issue with TinaMarkdown
146
+ components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }))
147
+ );
161
148
  const TrComponent2 = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
162
149
  const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
163
150
  const TdComponent2 = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
164
151
  const align2 = ((_f = child.props) == null ? void 0 : _f.align) || [];
165
- return /* @__PURE__ */ React.createElement(TableComponent2, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent2, null, header.tableCells.map((c, i) => {
166
- return /* @__PURE__ */ React.createElement(
167
- TinaMarkdown,
168
- {
169
- key: i,
170
- components: {
171
- p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align2[i], ...props2 })
172
- },
173
- content: c.value
174
- }
175
- );
176
- }))), /* @__PURE__ */ React.createElement("tbody", null, rows2.map((row, i) => {
177
- var _a2;
178
- return /* @__PURE__ */ React.createElement(TrComponent2, { key: i }, (_a2 = row == null ? void 0 : row.tableCells) == null ? void 0 : _a2.map((c, i2) => {
152
+ return (
153
+ //@ts-ignore Same issue with TinaMarkdown
154
+ /* @__PURE__ */ React.createElement(TableComponent2, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent2, null, header.tableCells.map((c, i) => {
179
155
  return /* @__PURE__ */ React.createElement(
180
- TinaMarkdown,
156
+ StaticTinaMarkdown,
181
157
  {
182
- key: i2,
158
+ key: i,
183
159
  components: {
184
- p: (props2) => /* @__PURE__ */ React.createElement(TdComponent2, { align: align2[i2], ...props2 })
160
+ p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align2[i], ...props2 })
185
161
  },
186
162
  content: c.value
187
163
  }
188
164
  );
189
- }));
190
- })));
165
+ }))), /* @__PURE__ */ React.createElement("tbody", null, rows2.map((row, i) => {
166
+ var _a2;
167
+ return /* @__PURE__ */ React.createElement(TrComponent2, { key: i }, (_a2 = row == null ? void 0 : row.tableCells) == null ? void 0 : _a2.map((c, i2) => {
168
+ return /* @__PURE__ */ React.createElement(
169
+ StaticTinaMarkdown,
170
+ {
171
+ key: i2,
172
+ components: {
173
+ p: (props2) => /* @__PURE__ */ React.createElement(TdComponent2, { align: align2[i2], ...props2 })
174
+ },
175
+ content: c.value
176
+ }
177
+ );
178
+ }));
179
+ })))
180
+ );
191
181
  }
192
182
  const ComponentMissing = components["component_missing"];
193
183
  if (ComponentMissing) {
@@ -212,21 +202,24 @@ const Node = ({ components, child }) => {
212
202
  }
213
203
  ));
214
204
  const align = ((_g = child.props) == null ? void 0 : _g.align) || [];
215
- return /* @__PURE__ */ React.createElement(TableComponent, null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
216
- var _a2;
217
- return /* @__PURE__ */ React.createElement(TrComponent, { key: i }, (_a2 = row.children) == null ? void 0 : _a2.map((cell, i2) => {
218
- return /* @__PURE__ */ React.createElement(
219
- TinaMarkdown,
220
- {
221
- key: i2,
222
- components: {
223
- p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
224
- },
225
- content: cell.children
226
- }
227
- );
228
- }));
229
- })));
205
+ return (
206
+ //@ts-ignore Same issue with TinaMarkdown
207
+ /* @__PURE__ */ React.createElement(TableComponent, null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
208
+ var _a2;
209
+ return /* @__PURE__ */ React.createElement(TrComponent, { key: i }, (_a2 = row.children) == null ? void 0 : _a2.map((cell, i2) => {
210
+ return /* @__PURE__ */ React.createElement(
211
+ StaticTinaMarkdown,
212
+ {
213
+ key: i2,
214
+ components: {
215
+ p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
216
+ },
217
+ content: cell.children
218
+ }
219
+ );
220
+ }));
221
+ })))
222
+ );
230
223
  case "maybe_mdx":
231
224
  return null;
232
225
  case "html":
@@ -242,8 +235,9 @@ const Node = ({ components, child }) => {
242
235
  if (typeof child.text === "string") {
243
236
  return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
244
237
  }
238
+ return null;
245
239
  }
246
240
  };
247
241
  export {
248
- TinaMarkdown
242
+ StaticTinaMarkdown
249
243
  };
@@ -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,11 @@
1
+ import * as React from 'react';
2
+ interface ProgressBarProps {
3
+ /** Progress percentage (0-100) */
4
+ progress: number;
5
+ /** Additional CSS classes */
6
+ className?: string;
7
+ /** Color of the progress bar */
8
+ color?: 'blue' | 'green';
9
+ }
10
+ export declare const ProgressBar: React.FC<ProgressBarProps>;
11
+ export {};
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { Media } from '../../core';
2
+ import React from 'react';
3
3
  interface MediaItemProps {
4
4
  item: Media & {
5
5
  new?: boolean;
@@ -7,6 +7,16 @@ interface MediaItemProps {
7
7
  onClick(_item: Media | false): void;
8
8
  active: boolean;
9
9
  }
10
+ export declare const checkerboardStyle: {
11
+ backgroundImage: string;
12
+ backgroundSize: string;
13
+ backgroundPosition: string;
14
+ };
15
+ export declare const smallCheckerboardStyle: {
16
+ backgroundImage: string;
17
+ backgroundSize: string;
18
+ backgroundPosition: string;
19
+ };
10
20
  export declare function ListMediaItem({ item, onClick, active }: MediaItemProps): React.JSX.Element;
11
21
  export declare function GridMediaItem({ item, active, onClick }: MediaItemProps): React.JSX.Element;
12
22
  export {};
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
3
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): React.JSX.Element;
4
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
5
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
6
+ asChild?: boolean;
7
+ }): React.JSX.Element;
8
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
9
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
10
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
11
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const buttonVariants: (props?: {
4
+ variant?: "default" | "link" | "secondary" | "ghost" | "destructive" | "outline";
5
+ size?: "default" | "icon" | "sm" | "lg";
6
+ } & import("class-variance-authority/types").ClassProp) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { DayButton, DayPicker } from 'react-day-picker';
3
+ import { Button } from './button';
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: React.ComponentProps<typeof Button>['variant'];
6
+ }): React.JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
8
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,111 @@
1
+ import 'moment-timezone';
2
+ import * as React from 'react';
3
+ import { DayPickerProps } from 'react-day-picker';
4
+ type TimePickerType = 'minutes' | 'seconds' | 'hours' | '12hours';
5
+ type Period = 'AM' | 'PM';
6
+ declare const formatCurrentDate: ({ dateFormat, timeFormat, displayDate, }: {
7
+ dateFormat?: string;
8
+ timeFormat?: string;
9
+ displayDate: Date;
10
+ }) => string;
11
+ interface TimePickerInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
12
+ picker: TimePickerType;
13
+ date?: Date | null;
14
+ onDateChange?: (date: Date | undefined) => void;
15
+ period?: Period;
16
+ onRightFocus?: () => void;
17
+ onLeftFocus?: () => void;
18
+ }
19
+ declare const TimePickerInput: React.ForwardRefExoticComponent<TimePickerInputProps & React.RefAttributes<HTMLInputElement>>;
20
+ interface TimePickerProps {
21
+ date?: Date | null;
22
+ onChange?: (date: Date | undefined) => void;
23
+ hourCycle?: 12 | 24;
24
+ /**
25
+ * Determines the smallest unit that is displayed in the datetime picker.
26
+ * Default is 'second'.
27
+ * */
28
+ granularity?: Granularity;
29
+ }
30
+ interface TimePickerRef {
31
+ minuteRef: HTMLInputElement | null;
32
+ hourRef: HTMLInputElement | null;
33
+ secondRef: HTMLInputElement | null;
34
+ }
35
+ declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<TimePickerRef>>;
36
+ type Granularity = 'day' | 'hour' | 'minute' | 'second';
37
+ type DateTimePickerProps = {
38
+ value?: Date;
39
+ onChange?: (date: Date | undefined) => void;
40
+ disabled?: boolean;
41
+ dateFormat?: string;
42
+ timeFormat?: string;
43
+ /** showing `AM/PM` or not. */
44
+ hourCycle?: 12 | 24;
45
+ placeholder?: string;
46
+ /**
47
+ * The year range will be: `This year + yearRange` and `this year - yearRange`.
48
+ * Default is 50.
49
+ * For example:
50
+ * This year is 2024, The year dropdown will be 1974 to 2024 which is generated by `2024 - 50 = 1974` and `2024 + 50 = 2074`.
51
+ * */
52
+ yearRange?: number;
53
+ /**
54
+ * The format is derived from the `date-fns` documentation.
55
+ * @reference https://date-fns.org/v3.6.0/docs/format
56
+ **/
57
+ displayFormat?: {
58
+ hour24?: string;
59
+ hour12?: string;
60
+ };
61
+ /**
62
+ * The granularity prop allows you to control the smallest unit that is displayed by DateTimePicker.
63
+ * By default, the value is `second` which shows all time inputs.
64
+ **/
65
+ granularity?: Granularity;
66
+ className?: string;
67
+ /**
68
+ * Show the default month and time when popup the calendar. Default is the current Date().
69
+ **/
70
+ defaultPopupValue?: Date;
71
+ } & Pick<DayPickerProps, 'locale' | 'weekStartsOn' | 'showWeekNumber' | 'showOutsideDays'>;
72
+ type DateTimePickerRef = {
73
+ value?: Date;
74
+ } & Omit<HTMLInputElement, 'value'>;
75
+ declare const DateTimePicker: React.ForwardRefExoticComponent<{
76
+ value?: Date;
77
+ onChange?: (date: Date | undefined) => void;
78
+ disabled?: boolean;
79
+ dateFormat?: string;
80
+ timeFormat?: string;
81
+ /** showing `AM/PM` or not. */
82
+ hourCycle?: 12 | 24;
83
+ placeholder?: string;
84
+ /**
85
+ * The year range will be: `This year + yearRange` and `this year - yearRange`.
86
+ * Default is 50.
87
+ * For example:
88
+ * This year is 2024, The year dropdown will be 1974 to 2024 which is generated by `2024 - 50 = 1974` and `2024 + 50 = 2074`.
89
+ * */
90
+ yearRange?: number;
91
+ /**
92
+ * The format is derived from the `date-fns` documentation.
93
+ * @reference https://date-fns.org/v3.6.0/docs/format
94
+ **/
95
+ displayFormat?: {
96
+ hour24?: string;
97
+ hour12?: string;
98
+ };
99
+ /**
100
+ * The granularity prop allows you to control the smallest unit that is displayed by DateTimePicker.
101
+ * By default, the value is `second` which shows all time inputs.
102
+ **/
103
+ granularity?: Granularity;
104
+ className?: string;
105
+ /**
106
+ * Show the default month and time when popup the calendar. Default is the current Date().
107
+ **/
108
+ defaultPopupValue?: Date;
109
+ } & Pick<DayPickerProps, "showOutsideDays" | "showWeekNumber" | "locale" | "weekStartsOn"> & React.RefAttributes<Partial<DateTimePickerRef>>>;
110
+ export { DateTimePicker, TimePickerInput, TimePicker, formatCurrentDate };
111
+ export type { TimePickerType, DateTimePickerProps, DateTimePickerRef };
@@ -0,0 +1,25 @@
1
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
+ import * as React from 'react';
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: 'default' | 'destructive';
11
+ }): React.JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): React.JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): React.JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
+ export { Input };