tinacms 0.0.0-e024aec-20250526035050 → 0.0.0-e0bbd2e-20251203224419

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 (170) 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 +121825 -33798
  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 -224
  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} +99 -99
  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/password-field.d.ts +1 -1
  33. package/dist/toolkit/fields/components/reference/components/button.d.ts +2 -2
  34. package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
  35. package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
  36. package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
  37. package/dist/toolkit/fields/components/select.d.ts +2 -2
  38. package/dist/toolkit/fields/components/text-field.d.ts +1 -1
  39. package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +2 -2
  40. package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
  41. package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +0 -2
  42. package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
  43. package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
  44. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +3 -1
  45. package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
  46. package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -0
  47. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +2 -2
  48. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
  49. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
  50. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +5 -5
  51. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
  52. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
  53. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
  54. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
  55. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
  56. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
  57. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
  58. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
  59. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
  60. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
  61. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
  62. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
  63. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
  64. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -1
  65. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
  66. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -19
  67. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
  68. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
  69. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
  70. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
  71. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
  72. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
  73. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +3 -10
  74. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +6 -8
  75. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
  76. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
  77. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
  78. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
  79. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +24 -21
  80. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
  81. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
  82. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
  83. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
  84. 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
  85. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
  86. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
  87. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
  88. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
  89. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
  90. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
  91. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
  92. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
  93. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
  94. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
  95. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +11 -6
  96. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
  97. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
  98. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +6 -0
  99. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
  100. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
  101. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
  102. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
  103. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
  104. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +262 -207
  105. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
  106. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +1 -1
  107. package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +2 -2
  108. package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
  109. package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
  110. package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
  111. package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
  112. package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
  113. package/dist/toolkit/form-builder/form-builder.d.ts +4 -16
  114. package/dist/toolkit/form-builder/index.d.ts +1 -0
  115. package/dist/toolkit/forms/field.d.ts +3 -0
  116. package/dist/toolkit/forms/form.d.ts +22 -3
  117. package/dist/toolkit/git-client/git-client.d.ts +25 -2
  118. package/dist/toolkit/git-client/git-file.d.ts +18 -0
  119. package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
  120. package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
  121. package/dist/toolkit/icons/Tina.d.ts +0 -5
  122. package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
  123. package/dist/toolkit/icons/index.d.ts +1 -0
  124. package/dist/toolkit/index.d.ts +1 -1
  125. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +4 -1
  126. package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
  127. package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
  128. package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
  129. package/dist/toolkit/react-sidebar/components/NavMenuTrigger.d.ts +11 -0
  130. package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
  131. package/dist/toolkit/react-sidebar/components/badge.d.ts +6 -0
  132. package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
  133. package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
  134. package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
  135. package/dist/toolkit/react-sidebar/components/nav-components.d.ts +11 -0
  136. package/dist/toolkit/react-sidebar/components/nav-context.d.ts +15 -0
  137. package/dist/toolkit/react-sidebar/components/nav.d.ts +6 -3
  138. package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
  139. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +3 -7
  140. package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
  141. package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
  142. package/dist/toolkit/react-sidebar/index.d.ts +4 -1
  143. package/dist/toolkit/styles/button.d.ts +2 -2
  144. package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
  145. package/dist/toolkit/styles/index.d.ts +1 -0
  146. package/dist/toolkit/tina-state.d.ts +11 -0
  147. package/dist/utils/cn.d.ts +2 -0
  148. package/dist/utils/index.d.ts +1 -0
  149. package/package.json +52 -67
  150. package/dist/admin/pages/IndexingPage.d.ts +0 -2
  151. package/dist/client.mjs +0 -132
  152. package/dist/index.mjs +0 -35163
  153. package/dist/react.mjs +0 -246
  154. package/dist/rich-text/prism.mjs +0 -16
  155. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
  156. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +0 -27
  157. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +0 -14
  158. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +0 -13
  159. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
  160. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
  161. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
  162. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +0 -2
  163. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
  164. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
  165. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
  166. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
  167. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -11
  168. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
  169. package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
  170. package/dist/toolkit/react-datetime/DateTime.d.ts +0 -135
package/dist/react.mjs DELETED
@@ -1,246 +0,0 @@
1
- import React from "react";
2
- function useTina(props) {
3
- const stringifiedQuery = JSON.stringify({
4
- query: props.query,
5
- variables: props.variables
6
- });
7
- const id = React.useMemo(
8
- () => hashFromQuery(stringifiedQuery),
9
- [stringifiedQuery]
10
- );
11
- const [data, setData] = React.useState(props.data);
12
- const [isClient, setIsClient] = React.useState(false);
13
- const [quickEditEnabled, setQuickEditEnabled] = React.useState(false);
14
- const [isInTinaIframe, setIsInTinaIframe] = React.useState(false);
15
- React.useEffect(() => {
16
- setIsClient(true);
17
- setData(props.data);
18
- parent.postMessage({
19
- type: "url-changed"
20
- });
21
- }, [id]);
22
- React.useEffect(() => {
23
- if (quickEditEnabled) {
24
- let mouseDownHandler = function(e) {
25
- const attributeNames = e.target.getAttributeNames();
26
- const tinaAttribute = attributeNames.find(
27
- (name) => name.startsWith("data-tina-field")
28
- );
29
- let fieldName;
30
- if (tinaAttribute) {
31
- e.preventDefault();
32
- e.stopPropagation();
33
- fieldName = e.target.getAttribute(tinaAttribute);
34
- } else {
35
- const ancestor = e.target.closest(
36
- "[data-tina-field], [data-tina-field-overlay]"
37
- );
38
- if (ancestor) {
39
- const attributeNames2 = ancestor.getAttributeNames();
40
- const tinaAttribute2 = attributeNames2.find(
41
- (name) => name.startsWith("data-tina-field")
42
- );
43
- if (tinaAttribute2) {
44
- e.preventDefault();
45
- e.stopPropagation();
46
- fieldName = ancestor.getAttribute(tinaAttribute2);
47
- }
48
- }
49
- }
50
- if (fieldName) {
51
- if (isInTinaIframe) {
52
- parent.postMessage(
53
- { type: "field:selected", fieldName },
54
- window.location.origin
55
- );
56
- }
57
- }
58
- };
59
- const style = document.createElement("style");
60
- style.type = "text/css";
61
- style.textContent = `
62
- [data-tina-field] {
63
- outline: 2px dashed rgba(34,150,254,0.5);
64
- transition: box-shadow ease-out 150ms;
65
- }
66
- [data-tina-field]:hover {
67
- box-shadow: inset 100vi 100vh rgba(34,150,254,0.3);
68
- outline: 2px solid rgba(34,150,254,1);
69
- cursor: pointer;
70
- }
71
- [data-tina-field-overlay] {
72
- outline: 2px dashed rgba(34,150,254,0.5);
73
- position: relative;
74
- }
75
- [data-tina-field-overlay]:hover {
76
- cursor: pointer;
77
- outline: 2px solid rgba(34,150,254,1);
78
- }
79
- [data-tina-field-overlay]::after {
80
- content: '';
81
- position: absolute;
82
- inset: 0;
83
- z-index: 20;
84
- transition: opacity ease-out 150ms;
85
- background-color: rgba(34,150,254,0.3);
86
- opacity: 0;
87
- }
88
- [data-tina-field-overlay]:hover::after {
89
- opacity: 1;
90
- }
91
- `;
92
- document.head.appendChild(style);
93
- document.body.classList.add("__tina-quick-editing-enabled");
94
- document.addEventListener("click", mouseDownHandler, true);
95
- return () => {
96
- document.removeEventListener("click", mouseDownHandler, true);
97
- document.body.classList.remove("__tina-quick-editing-enabled");
98
- style.remove();
99
- };
100
- }
101
- }, [quickEditEnabled, isInTinaIframe]);
102
- React.useEffect(() => {
103
- if (props == null ? void 0 : props.experimental___selectFormByFormId) {
104
- parent.postMessage({
105
- type: "user-select-form",
106
- formId: props.experimental___selectFormByFormId()
107
- });
108
- }
109
- }, [id]);
110
- React.useEffect(() => {
111
- const { experimental___selectFormByFormId, ...rest } = props;
112
- parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
113
- window.addEventListener("message", (event) => {
114
- if (event.data.type === "quickEditEnabled") {
115
- setQuickEditEnabled(event.data.value);
116
- }
117
- if (event.data.id === id && event.data.type === "updateData") {
118
- setData(event.data.data);
119
- setIsInTinaIframe(true);
120
- const anyTinaField = document.querySelector("[data-tina-field]");
121
- if (anyTinaField) {
122
- parent.postMessage(
123
- { type: "quick-edit", value: true },
124
- window.location.origin
125
- );
126
- } else {
127
- parent.postMessage(
128
- { type: "quick-edit", value: false },
129
- window.location.origin
130
- );
131
- }
132
- }
133
- });
134
- return () => {
135
- parent.postMessage({ type: "close", id }, window.location.origin);
136
- };
137
- }, [id, setQuickEditEnabled]);
138
- return { data, isClient };
139
- }
140
- function useEditState() {
141
- const [edit, setEdit] = React.useState(false);
142
- React.useEffect(() => {
143
- if (typeof window !== "undefined") {
144
- parent.postMessage({ type: "isEditMode" }, window.location.origin);
145
- window.addEventListener("message", (event) => {
146
- var _a;
147
- if (((_a = event.data) == null ? void 0 : _a.type) === "tina:editMode") {
148
- setEdit(true);
149
- }
150
- });
151
- }
152
- }, []);
153
- return { edit };
154
- }
155
- const tinaField = (object, property, index) => {
156
- var _a, _b, _c;
157
- if (!object) {
158
- return "";
159
- }
160
- if (object._content_source) {
161
- if (!property) {
162
- return [
163
- (_a = object._content_source) == null ? void 0 : _a.queryId,
164
- object._content_source.path.join(".")
165
- ].join("---");
166
- }
167
- if (typeof index === "number") {
168
- return [
169
- (_b = object._content_source) == null ? void 0 : _b.queryId,
170
- [...object._content_source.path, property, index].join(".")
171
- ].join("---");
172
- }
173
- return [
174
- (_c = object._content_source) == null ? void 0 : _c.queryId,
175
- [...object._content_source.path, property].join(".")
176
- ].join("---");
177
- }
178
- return "";
179
- };
180
- const addMetadata = (id, object, path) => {
181
- Object.entries(object).forEach(([key, value]) => {
182
- if (Array.isArray(value)) {
183
- value.forEach((item, index) => {
184
- if (isScalarOrUndefined(item)) {
185
- return;
186
- }
187
- if (Array.isArray(item)) {
188
- return;
189
- }
190
- const itemObject = item;
191
- addMetadata(id, itemObject, [...path, key, index]);
192
- });
193
- } else {
194
- if (isScalarOrUndefined(value)) {
195
- return;
196
- }
197
- const itemObject = value;
198
- addMetadata(id, itemObject, [...path, key]);
199
- }
200
- });
201
- if ((object == null ? void 0 : object.type) === "root") {
202
- return;
203
- }
204
- object._content_source = {
205
- queryId: id,
206
- path
207
- };
208
- return object;
209
- };
210
- function isScalarOrUndefined(value) {
211
- const type = typeof value;
212
- if (type === "string")
213
- return true;
214
- if (type === "number")
215
- return true;
216
- if (type === "boolean")
217
- return true;
218
- if (type === "undefined")
219
- return true;
220
- if (value == null)
221
- return true;
222
- if (value instanceof String)
223
- return true;
224
- if (value instanceof Number)
225
- return true;
226
- if (value instanceof Boolean)
227
- return true;
228
- return false;
229
- }
230
- const hashFromQuery = (input) => {
231
- let hash = 0;
232
- for (let i = 0; i < input.length; i++) {
233
- const char = input.charCodeAt(i);
234
- hash = (hash << 5) - hash + char & 4294967295;
235
- }
236
- const nonNegativeHash = Math.abs(hash);
237
- const alphanumericHash = nonNegativeHash.toString(36);
238
- return alphanumericHash;
239
- };
240
- export {
241
- addMetadata,
242
- hashFromQuery,
243
- tinaField,
244
- useEditState,
245
- useTina
246
- };
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import { Highlight, themes } from "prism-react-renderer";
3
- const Prism = (props) => {
4
- return /* @__PURE__ */ React.createElement(
5
- Highlight,
6
- {
7
- theme: themes[props.theme || "github"],
8
- code: props.value || "",
9
- language: props.lang || ""
10
- },
11
- ({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React.createElement("pre", { className, style }, tokens.map((line, i) => /* @__PURE__ */ React.createElement("div", { ...getLineProps({ line, key: i }) }, line.map((token, key) => /* @__PURE__ */ React.createElement("span", { ...getTokenProps({ token, key }) })))))
12
- );
13
- };
14
- export {
15
- Prism
16
- };
@@ -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,2 +0,0 @@
1
- import * as React from 'react';
2
- export declare const BranchBanner: () => React.JSX.Element;
@@ -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';