tinacms 0.0.0-d94de9b-20250707010010 → 0.0.0-db7231c-20251216055550

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 (149) hide show
  1. package/dist/admin/api.d.ts +4 -1
  2. package/dist/auth/AuthModal.d.ts +1 -4
  3. package/dist/auth/TinaCloudProvider.d.ts +0 -1
  4. package/dist/cache/node-cache.d.ts +6 -2
  5. package/dist/client.js +240 -181
  6. package/dist/index.js +122119 -34419
  7. package/dist/internalClient/index.d.ts +20 -1
  8. package/dist/react.js +210 -213
  9. package/dist/rich-text/index.d.ts +6 -0
  10. package/dist/rich-text/index.js +234 -224
  11. package/dist/rich-text/prism.js +16 -18
  12. package/dist/rich-text/static.d.ts +6 -0
  13. package/dist/rich-text/static.js +229 -225
  14. package/dist/tina-cms.d.ts +1 -1
  15. package/dist/toolkit/components/ProgressBar.d.ts +11 -0
  16. package/dist/toolkit/components/media/media-item.d.ts +10 -0
  17. package/dist/toolkit/components/ui/button.d.ts +11 -0
  18. package/dist/toolkit/components/ui/calendar.d.ts +8 -0
  19. package/dist/toolkit/components/ui/date-time-picker.d.ts +111 -0
  20. package/dist/toolkit/components/ui/input.d.ts +3 -0
  21. package/dist/toolkit/components/ui/popover.d.ts +7 -0
  22. package/dist/toolkit/components/ui/select.d.ts +13 -0
  23. package/dist/toolkit/fields/components/color-picker/block-widget.d.ts +3 -0
  24. package/dist/toolkit/fields/components/color-picker/color-input.d.ts +35 -0
  25. package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +6 -2
  26. package/dist/toolkit/fields/components/color-picker/color-utils.d.ts +37 -0
  27. package/dist/toolkit/fields/components/color-picker/sketch-widget.d.ts +3 -0
  28. package/dist/toolkit/fields/components/reference/components/button.d.ts +1 -1
  29. package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
  30. package/dist/toolkit/fields/components/select.d.ts +1 -1
  31. package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +2 -2
  32. package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
  33. package/dist/toolkit/fields/plugins/color-field-plugin.d.ts +1 -0
  34. package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +0 -2
  35. package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
  36. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +3 -1
  37. package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -0
  38. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
  39. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
  40. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +5 -5
  41. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
  42. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
  43. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
  44. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
  45. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
  46. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
  48. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
  49. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
  50. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
  51. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -1
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -19
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
  60. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +3 -10
  64. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +6 -8
  65. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
  66. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
  67. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
  68. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
  69. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +24 -21
  70. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
  71. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
  72. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
  73. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
  74. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/{table-dropdown-menu.d.ts → table/table-dropdown-menu.d.ts} +1 -0
  75. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
  76. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
  77. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
  78. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
  79. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
  80. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
  81. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
  82. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
  83. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
  84. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
  85. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +11 -6
  86. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
  87. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
  88. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +6 -0
  89. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
  90. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
  91. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
  92. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
  93. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
  94. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +262 -207
  95. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
  96. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +1 -1
  97. package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +2 -2
  98. package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
  99. package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
  100. package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
  101. package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
  102. package/dist/toolkit/form-builder/form-builder.d.ts +0 -11
  103. package/dist/toolkit/form-builder/index.d.ts +1 -0
  104. package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
  105. package/dist/toolkit/icons/index.d.ts +1 -0
  106. package/dist/toolkit/index.d.ts +1 -1
  107. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +3 -1
  108. package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
  109. package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
  110. package/dist/toolkit/react-sidebar/components/NavMenuTrigger.d.ts +11 -0
  111. package/dist/toolkit/react-sidebar/components/badge.d.ts +6 -0
  112. package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
  113. package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
  114. package/dist/toolkit/react-sidebar/components/nav-components.d.ts +11 -0
  115. package/dist/toolkit/react-sidebar/components/nav-context.d.ts +15 -0
  116. package/dist/toolkit/react-sidebar/components/nav.d.ts +3 -2
  117. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +26 -1
  118. package/dist/toolkit/react-sidebar/index.d.ts +3 -0
  119. package/dist/toolkit/styles/button.d.ts +1 -1
  120. package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
  121. package/dist/toolkit/styles/index.d.ts +1 -0
  122. package/dist/unifiedClient/index.d.ts +1 -1
  123. package/dist/utils/index.d.ts +1 -0
  124. package/package.json +56 -87
  125. package/dist/admin/pages/IndexingPage.d.ts +0 -2
  126. package/dist/client.mjs +0 -132
  127. package/dist/index.mjs +0 -35827
  128. package/dist/node-cache-5e8db9f0.mjs +0 -63
  129. package/dist/react.mjs +0 -254
  130. package/dist/rich-text/index.mjs +0 -243
  131. package/dist/rich-text/prism.mjs +0 -16
  132. package/dist/rich-text/static.mjs +0 -236
  133. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
  134. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +0 -27
  135. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +0 -14
  136. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +0 -13
  137. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
  138. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
  139. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
  140. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +0 -2
  141. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
  142. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
  143. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
  144. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
  145. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -11
  146. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
  147. package/dist/toolkit/react-datetime/DateTime.d.ts +0 -135
  148. package/dist/toolkit/react-sidebar/components/alert.d.ts +0 -5
  149. /package/dist/admin/components/{Sidebar.d.ts → AdminNav.d.ts} +0 -0
@@ -1,236 +0,0 @@
1
- import React from "react";
2
- const StaticTinaMarkdown = ({
3
- content,
4
- components = {}
5
- }) => {
6
- if (!content) {
7
- return null;
8
- }
9
- const nodes = Array.isArray(content) ? content : content.children;
10
- if (!nodes) {
11
- return null;
12
- }
13
- return /* @__PURE__ */ React.createElement(React.Fragment, null, nodes.map((child, index) => {
14
- return /* @__PURE__ */ React.createElement(Node, { components, key: index, child });
15
- }));
16
- };
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
- }
23
- if (props.bold) {
24
- const Component = props.components.bold || "strong";
25
- el = /* @__PURE__ */ React.createElement(Component, null, el);
26
- }
27
- if (props.italic) {
28
- const Component = props.components.italic || "em";
29
- el = /* @__PURE__ */ React.createElement(Component, null, el);
30
- }
31
- if (props.underline) {
32
- const Component = props.components.underline || "u";
33
- el = /* @__PURE__ */ React.createElement(Component, null, el);
34
- }
35
- if (props.strikethrough) {
36
- const Component = props.components.strikethrough || "s";
37
- el = /* @__PURE__ */ React.createElement(Component, null, el);
38
- }
39
- if (props.code) {
40
- const Component = props.components.code || "code";
41
- el = /* @__PURE__ */ React.createElement(Component, null, el);
42
- }
43
- return el;
44
- };
45
- const Node = ({
46
- components,
47
- child
48
- }) => {
49
- var _a, _b, _c, _d, _e, _f, _g;
50
- const { children, ...props } = child;
51
- switch (child.type) {
52
- case "h1":
53
- case "h2":
54
- case "h3":
55
- case "h4":
56
- case "h5":
57
- case "h6":
58
- case "p":
59
- case "blockquote":
60
- case "ol":
61
- case "ul":
62
- case "li":
63
- if (components[child.type]) {
64
- const Component2 = components[child.type];
65
- return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
66
- }
67
- return React.createElement(child.type, {
68
- children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
69
- });
70
- case "lic":
71
- if (components.lic) {
72
- const Component2 = components.lic;
73
- return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
74
- }
75
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
76
- StaticTinaMarkdown,
77
- {
78
- components,
79
- content: child.children
80
- }
81
- ));
82
- case "img":
83
- if (components[child.type]) {
84
- const Component2 = components[child.type];
85
- return /* @__PURE__ */ React.createElement(Component2, { ...props });
86
- }
87
- return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.alt });
88
- case "a":
89
- if (components[child.type]) {
90
- const Component2 = components[child.type];
91
- return (
92
- //@ts-ignore Same issue with TinaMarkdown
93
- /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }))
94
- );
95
- }
96
- return /* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
97
- case "code_block": {
98
- let codeString = "";
99
- if (Array.isArray(child.children)) {
100
- codeString = child.children.map(
101
- (line) => Array.isArray(line.children) ? line.children.map((t) => t.text).join("") : ""
102
- ).join("\n");
103
- } else if (typeof child.value === "string") {
104
- codeString = child.value;
105
- }
106
- if (components[child.type]) {
107
- const Component2 = components[child.type];
108
- return /* @__PURE__ */ React.createElement(Component2, { ...props, value: codeString });
109
- }
110
- return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null, codeString));
111
- }
112
- case "hr":
113
- if (components[child.type]) {
114
- const Component2 = components[child.type];
115
- return /* @__PURE__ */ React.createElement(Component2, { ...props });
116
- }
117
- return /* @__PURE__ */ React.createElement("hr", null);
118
- case "break":
119
- if (components[child.type]) {
120
- const Component2 = components[child.type];
121
- return /* @__PURE__ */ React.createElement(Component2, { ...props });
122
- }
123
- return /* @__PURE__ */ React.createElement("br", null);
124
- case "text":
125
- return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
126
- case "mdxJsxTextElement":
127
- case "mdxJsxFlowElement":
128
- const Component = components[child.name];
129
- if (Component) {
130
- const props2 = child.props ? child.props : {};
131
- return /* @__PURE__ */ React.createElement(Component, { ...props2 });
132
- } else {
133
- if (child.name === "table") {
134
- const firstRowHeader = (_a = child.props) == null ? void 0 : _a.firstRowHeader;
135
- const rows2 = (firstRowHeader ? (_b = child.props) == null ? void 0 : _b.tableRows.filter((_, i) => i !== 0) : (_c = child.props) == null ? void 0 : _c.tableRows) || [];
136
- const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
137
- const TableComponent2 = (
138
- //@ts-ignore Same issue with TinaMarkdown
139
- components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }))
140
- );
141
- const TrComponent2 = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
142
- const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
143
- const TdComponent2 = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
144
- const align2 = ((_f = child.props) == null ? void 0 : _f.align) || [];
145
- return (
146
- //@ts-ignore Same issue with TinaMarkdown
147
- /* @__PURE__ */ React.createElement(TableComponent2, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent2, null, header.tableCells.map((c, i) => {
148
- return /* @__PURE__ */ React.createElement(
149
- StaticTinaMarkdown,
150
- {
151
- key: i,
152
- components: {
153
- p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align2[i], ...props2 })
154
- },
155
- content: c.value
156
- }
157
- );
158
- }))), /* @__PURE__ */ React.createElement("tbody", null, rows2.map((row, i) => {
159
- var _a2;
160
- return /* @__PURE__ */ React.createElement(TrComponent2, { key: i }, (_a2 = row == null ? void 0 : row.tableCells) == null ? void 0 : _a2.map((c, i2) => {
161
- return /* @__PURE__ */ React.createElement(
162
- StaticTinaMarkdown,
163
- {
164
- key: i2,
165
- components: {
166
- p: (props2) => /* @__PURE__ */ React.createElement(TdComponent2, { align: align2[i2], ...props2 })
167
- },
168
- content: c.value
169
- }
170
- );
171
- }));
172
- })))
173
- );
174
- }
175
- const ComponentMissing = components["component_missing"];
176
- if (ComponentMissing) {
177
- return /* @__PURE__ */ React.createElement(ComponentMissing, { name: child.name });
178
- } else {
179
- return /* @__PURE__ */ React.createElement("span", null, `No component provided for ${child.name}`);
180
- }
181
- }
182
- case "table":
183
- const rows = child.children || [];
184
- const TableComponent = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { style: { border: "1px solid #EDECF3" }, ...props2 }));
185
- const TrComponent = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
186
- const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement(
187
- "td",
188
- {
189
- style: {
190
- textAlign: (props2 == null ? void 0 : props2.align) || "auto",
191
- border: "1px solid #EDECF3",
192
- padding: "0.25rem"
193
- },
194
- ...props2
195
- }
196
- ));
197
- const align = ((_g = child.props) == null ? void 0 : _g.align) || [];
198
- return (
199
- //@ts-ignore Same issue with TinaMarkdown
200
- /* @__PURE__ */ React.createElement(TableComponent, null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
201
- var _a2;
202
- return /* @__PURE__ */ React.createElement(TrComponent, { key: i }, (_a2 = row.children) == null ? void 0 : _a2.map((cell, i2) => {
203
- return /* @__PURE__ */ React.createElement(
204
- StaticTinaMarkdown,
205
- {
206
- key: i2,
207
- components: {
208
- p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
209
- },
210
- content: cell.children
211
- }
212
- );
213
- }));
214
- })))
215
- );
216
- case "maybe_mdx":
217
- return null;
218
- case "html":
219
- case "html_inline":
220
- if (components[child.type]) {
221
- const Component2 = components[child.type];
222
- return /* @__PURE__ */ React.createElement(Component2, { ...props });
223
- }
224
- return child.value;
225
- case "invalid_markdown":
226
- return /* @__PURE__ */ React.createElement("pre", null, child.value);
227
- default:
228
- if (typeof child.text === "string") {
229
- return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
230
- }
231
- return null;
232
- }
233
- };
234
- export {
235
- StaticTinaMarkdown
236
- };
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export declare const CodeBlockElement: React.ForwardRefExoticComponent<Omit<Omit<{
3
- elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
4
- } & Omit<{
5
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
6
- asChild?: boolean | undefined;
7
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
8
- ref?: React.Ref<any>;
9
- } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
10
- element: import("@udecode/plate-common").TElement;
11
- } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<any>>;
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- export declare const TableCellElement: React.ForwardRefExoticComponent<{
3
- hideBorder?: boolean;
4
- isHeader?: boolean;
5
- } & Omit<Omit<{
6
- elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
7
- } & Omit<{
8
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
9
- asChild?: boolean | undefined;
10
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
11
- ref?: React.Ref<any>;
12
- } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
13
- element: import("@udecode/plate-common").TElement;
14
- } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder" | "isHeader"> & React.RefAttributes<any>>;
15
- export declare const TableCellHeaderElement: React.ForwardRefExoticComponent<Omit<{
16
- hideBorder?: boolean;
17
- isHeader?: boolean;
18
- } & Omit<Omit<{
19
- elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
20
- } & Omit<{
21
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
22
- asChild?: boolean | undefined;
23
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
24
- ref?: React.Ref<any>;
25
- } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
26
- element: import("@udecode/plate-common").TElement;
27
- } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder" | "isHeader"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
- export declare const TableBordersDropdownMenuContent: React.ForwardRefExoticComponent<Omit<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<HTMLDivElement>>;
4
- export declare const TableFloatingToolbar: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("@radix-ui/react-popover").PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<HTMLDivElement>>;
5
- export declare const TableElement: React.ForwardRefExoticComponent<Omit<Omit<Omit<{
6
- elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
7
- } & Omit<{
8
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
9
- asChild?: boolean | undefined;
10
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
11
- ref?: React.Ref<any>;
12
- } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
13
- element: import("@udecode/plate-common").TElement;
14
- } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, never> & React.RefAttributes<any>, "ref"> & React.RefAttributes<unknown>>;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export declare const TableRowElement: React.ForwardRefExoticComponent<{
3
- hideBorder?: boolean;
4
- } & Omit<Omit<{
5
- elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
6
- } & Omit<{
7
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
8
- asChild?: boolean | undefined;
9
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
10
- ref?: React.Ref<any>;
11
- } & import("@udecode/plate-common").PlateRenderNodeProps<import("@udecode/plate-common").Value, import("@udecode/plate-common").PlateEditor<import("@udecode/plate-common").Value>> & {
12
- element: import("@udecode/plate-common").TElement;
13
- } & Omit<import("slate-react").RenderElementProps, "element"> & React.RefAttributes<HTMLDivElement>, "ref">, "hideBorder"> & React.RefAttributes<any>>;
@@ -1,8 +0,0 @@
1
- /**
2
- *
3
- * This fixes a bug where you can't delete between two void nodes
4
- * without deleting the first node.
5
- *
6
- * https://github.com/ianstormtaylor/slate/issues/3991#issuecomment-832160304
7
- */
8
- export declare const withCorrectVoidBehavior: (editor: any) => any;
@@ -1,3 +0,0 @@
1
- export declare const createCodeBlockPlugin: <OP = import("@udecode/plate-common").AnyObject, OV extends import("@udecode/plate-common").Value = import("@udecode/plate-common").Value, OE extends import("@udecode/plate-common").PlateEditor<OV> = import("@udecode/plate-common").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>>, overrideByKey?: import("@udecode/plate-common").OverrideByKey<OV, OE>) => import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>;
2
- export declare const createHTMLBlockPlugin: <OP = import("@udecode/plate-common").AnyObject, OV extends import("@udecode/plate-common").Value = import("@udecode/plate-common").Value, OE extends import("@udecode/plate-common").PlateEditor<OV> = import("@udecode/plate-common").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>>, overrideByKey?: import("@udecode/plate-common").OverrideByKey<OV, OE>) => import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>;
3
- export declare const createHTMLInlinePlugin: <OP = import("@udecode/plate-common").AnyObject, OV extends import("@udecode/plate-common").Value = import("@udecode/plate-common").Value, OE extends import("@udecode/plate-common").PlateEditor<OV> = import("@udecode/plate-common").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>>, overrideByKey?: import("@udecode/plate-common").OverrideByKey<OV, OE>) => import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { type BaseRange } from 'slate';
3
- import { createLinkPlugin } from '@udecode/plate-link';
4
- import { type PlateEditor } from '@udecode/plate-common';
5
- export { createLinkPlugin };
6
- type LinkElement = {
7
- url?: string;
8
- title?: string;
9
- text: string | undefined;
10
- };
11
- export declare const wrapOrRewrapLink: (editor: any) => void;
12
- export declare const LinkForm: (props: any) => React.JSX.Element;
13
- export declare const unwrapLink: (editor: PlateEditor, selection?: BaseRange) => void;
14
- export declare const getLinks: (editor: any) => Generator<import("@udecode/plate-common").TNodeEntry<LinkElement>, void, undefined>;
15
- export declare const isLinkActive: (editor: any) => boolean;
@@ -1,2 +0,0 @@
1
- export declare const ELEMENT_MERMAID = "mermaid";
2
- export declare const createMermaidPlugin: <OP = import("@udecode/plate-common").AnyObject, OV extends import("@udecode/plate-common").Value = import("@udecode/plate-common").Value, OE extends import("@udecode/plate-common").PlateEditor<OV> = import("@udecode/plate-common").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>>, overrideByKey?: import("@udecode/plate-common").OverrideByKey<OV, OE>) => import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>;
@@ -1,7 +0,0 @@
1
- import type { SoftBreakPlugin } from './types';
2
- export declare const KEY_SOFT_BREAK = "break";
3
- /**
4
- * This code is mostly copied from the plate soft-break plugin
5
- * [here](https://github.com/udecode/plate/blob/3c0de39a66308a9b718cf9f35623502702ae2af4/packages/editor/break/src/soft-break/index.ts)
6
- */
7
- export declare const createSoftBreakPlugin: <OP = SoftBreakPlugin, OV extends import("@udecode/plate-common").Value = import("@udecode/plate-common").Value, OE extends import("@udecode/plate-common").PlateEditor<OV> = import("@udecode/plate-common").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>>, overrideByKey?: import("@udecode/plate-common").OverrideByKey<OV, OE>) => import("@udecode/plate-common").PlatePlugin<import("@udecode/plate-common").NoInfer<OP>, OV, OE>;
@@ -1,6 +0,0 @@
1
- /**
2
- * @file Automatically generated by barrelsby.
3
- */
4
- export * from './create-soft-break-plugin';
5
- export * from './on-key-down-soft-break';
6
- export * from './types';
@@ -1,5 +0,0 @@
1
- export declare const onKeyDownSoftBreak: (editor: any, { options: { rules } }: {
2
- options: {
3
- rules?: any[];
4
- };
5
- }) => (event: any) => void;
@@ -1,11 +0,0 @@
1
- import type { QueryNodeOptions } from '@udecode/plate-common';
2
- export interface SoftBreakRule {
3
- hotkey: string;
4
- /**
5
- * Filter the block types where the rule applies.
6
- */
7
- query?: QueryNodeOptions;
8
- }
9
- export interface SoftBreakPlugin {
10
- rules?: SoftBreakRule[];
11
- }
@@ -1,11 +0,0 @@
1
- import { type PlateEditor, type TElement } from '@udecode/plate-common';
2
- import React from 'react';
3
- export declare const CodeBlock: ({ attributes, editor, element, language: restrictLanguage, onChangeCallback, defaultValue, ...props }: {
4
- attributes: Record<string, unknown>;
5
- element: TElement;
6
- editor: PlateEditor;
7
- language?: string;
8
- children: React.ReactNode;
9
- defaultValue?: unknown;
10
- onChangeCallback?: (value: string) => void;
11
- }) => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import { type PlateEditor } from '@udecode/plate-common';
2
- export declare const insertEmptyCodeBlock: (editor: PlateEditor) => void;
@@ -1,135 +0,0 @@
1
- export default class Datetime extends React.Component<any, any, any> {
2
- static propTypes: {
3
- value: PropTypes.Requireable<NonNullable<string | Date>>;
4
- initialValue: PropTypes.Requireable<NonNullable<string | Date>>;
5
- initialViewDate: PropTypes.Requireable<NonNullable<string | Date>>;
6
- initialViewMode: PropTypes.Requireable<string>;
7
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
8
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
9
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
10
- onNavigate: PropTypes.Requireable<(...args: any[]) => any>;
11
- onBeforeNavigate: PropTypes.Requireable<(...args: any[]) => any>;
12
- onNavigateBack: PropTypes.Requireable<(...args: any[]) => any>;
13
- onNavigateForward: PropTypes.Requireable<(...args: any[]) => any>;
14
- updateOnView: PropTypes.Requireable<string>;
15
- locale: PropTypes.Requireable<string>;
16
- utc: PropTypes.Requireable<boolean>;
17
- displayTimeZone: PropTypes.Requireable<string>;
18
- input: PropTypes.Requireable<boolean>;
19
- dateFormat: PropTypes.Requireable<NonNullable<string | boolean>>;
20
- timeFormat: PropTypes.Requireable<NonNullable<string | boolean>>;
21
- inputProps: PropTypes.Requireable<object>;
22
- timeConstraints: PropTypes.Requireable<object>;
23
- isValidDate: PropTypes.Requireable<(...args: any[]) => any>;
24
- open: PropTypes.Requireable<boolean>;
25
- strictParsing: PropTypes.Requireable<boolean>;
26
- closeOnSelect: PropTypes.Requireable<boolean>;
27
- closeOnTab: PropTypes.Requireable<boolean>;
28
- renderView: PropTypes.Requireable<(...args: any[]) => any>;
29
- renderInput: PropTypes.Requireable<(...args: any[]) => any>;
30
- renderDay: PropTypes.Requireable<(...args: any[]) => any>;
31
- renderMonth: PropTypes.Requireable<(...args: any[]) => any>;
32
- renderYear: PropTypes.Requireable<(...args: any[]) => any>;
33
- };
34
- static defaultProps: {
35
- onOpen: () => void;
36
- onClose: () => void;
37
- onCalendarOpen: () => void;
38
- onCalendarClose: () => void;
39
- onChange: () => void;
40
- onNavigate: () => void;
41
- onBeforeNavigate: (next: any) => any;
42
- onNavigateBack: () => void;
43
- onNavigateForward: () => void;
44
- dateFormat: boolean;
45
- timeFormat: boolean;
46
- utc: boolean;
47
- className: string;
48
- input: boolean;
49
- inputProps: {};
50
- timeConstraints: {};
51
- isValidDate: () => boolean;
52
- strictParsing: boolean;
53
- closeOnSelect: boolean;
54
- closeOnTab: boolean;
55
- closeOnClickOutside: boolean;
56
- renderView: (_: any, renderFunc: any) => any;
57
- };
58
- static moment: typeof moment;
59
- constructor(props: any);
60
- state: {
61
- open: boolean;
62
- currentView: any;
63
- viewDate: any;
64
- selectedDate: any;
65
- inputValue: any;
66
- };
67
- render(): React.JSX.Element;
68
- renderInput(): React.JSX.Element;
69
- renderView(): any;
70
- _renderCalendar: () => React.JSX.Element;
71
- getInitialState(): {
72
- open: boolean;
73
- currentView: any;
74
- viewDate: any;
75
- selectedDate: any;
76
- inputValue: any;
77
- };
78
- getInitialViewDate(selectedDate: any): any;
79
- getInitialDate(): any;
80
- getInitialView(): any;
81
- parseDate(date: any, dateFormat: any): any;
82
- getClassName(): string;
83
- isOpen(): any;
84
- getUpdateOn(dateFormat: any): any;
85
- getLocaleData(): any;
86
- getDateFormat(): any;
87
- getTimeFormat(): any;
88
- getFormat(type: any): any;
89
- _showView: (view: any, date: any) => void;
90
- updateTime(op: any, amount: any, type: any, toSelected: any): void;
91
- viewToMethod: {
92
- days: string;
93
- months: string;
94
- years: string;
95
- };
96
- nextView: {
97
- days: string;
98
- months: string;
99
- years: string;
100
- };
101
- _updateDate: (e: any) => void;
102
- _viewNavigate: (modifier: any, unit: any) => void;
103
- _setTime: (type: any, value: any) => void;
104
- _openCalendar: () => void;
105
- _closeCalendar: () => void;
106
- _handleClickOutside: () => void;
107
- localMoment(date: any, format: any, props: any): any;
108
- checkTZ(): void;
109
- tzWarning: boolean;
110
- componentDidUpdate(prevProps: any): void;
111
- regenerateDates(): void;
112
- getSelectedDate(): any;
113
- getInitialInputValue(selectedDate: any): any;
114
- getInputValue(): any;
115
- /**
116
- * Set the date that is currently shown in the calendar.
117
- * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.
118
- * @param dateType date
119
- * @public
120
- */
121
- public setViewDate(date: any): void;
122
- /**
123
- * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.
124
- * @param TYPES.string mode
125
- */
126
- navigate(mode: any): void;
127
- _onInputFocus: (e: any) => void;
128
- _onInputChange: (e: any) => void;
129
- _onInputKeyDown: (e: any) => void;
130
- _onInputClick: (e: any) => void;
131
- callHandler(method: any, e: any): boolean;
132
- }
133
- import React from 'react';
134
- import PropTypes from 'prop-types';
135
- import moment from 'moment';
@@ -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;