tinacms 1.5.17 → 1.5.19

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 (279) hide show
  1. package/dist/admin/pages/CollectionListPage.d.ts +1 -1
  2. package/dist/auth/TinaCloudProvider.d.ts +3 -1
  3. package/dist/client.js +5 -3
  4. package/dist/client.mjs +5 -3
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.js +13065 -1820
  7. package/dist/index.mjs +27835 -16568
  8. package/dist/internalClient/index.d.ts +15 -3
  9. package/dist/tina-cms.d.ts +0 -3
  10. package/dist/toolkit/alerts/alerts.d.ts +34 -0
  11. package/dist/toolkit/alerts/index.d.ts +1 -0
  12. package/dist/toolkit/browser-storage/browser-storage-client.d.ts +12 -0
  13. package/dist/toolkit/browser-storage/get-flattened-form-values.d.ts +2 -0
  14. package/dist/toolkit/browser-storage/index.d.ts +2 -0
  15. package/dist/toolkit/browser-storage/use-form-browser-cache.d.ts +2 -0
  16. package/dist/toolkit/components/active-field-indicator.d.ts +2 -0
  17. package/dist/toolkit/components/media/breadcrumb.d.ts +7 -0
  18. package/dist/toolkit/components/media/copy-field.d.ts +8 -0
  19. package/dist/toolkit/components/media/index.d.ts +6 -0
  20. package/dist/toolkit/components/media/media-item.d.ts +12 -0
  21. package/dist/toolkit/components/media/media-manager.d.ts +10 -0
  22. package/dist/toolkit/components/media/modal.d.ts +13 -0
  23. package/dist/toolkit/components/media/pagination.d.ts +9 -0
  24. package/dist/toolkit/components/media/utils.d.ts +4 -0
  25. package/dist/toolkit/components/mutation-signal.d.ts +12 -0
  26. package/dist/toolkit/components/tina-cms-provider.d.ts +8 -0
  27. package/dist/toolkit/components/tina-provider.d.ts +14 -0
  28. package/dist/toolkit/components/tina-ui.d.ts +13 -0
  29. package/dist/toolkit/core/cms.d.ts +156 -0
  30. package/dist/toolkit/core/event.d.ts +17 -0
  31. package/dist/toolkit/core/flags.d.ts +13 -0
  32. package/dist/toolkit/core/index.d.ts +7 -0
  33. package/dist/toolkit/core/media-store.default.d.ts +45 -0
  34. package/dist/toolkit/core/media.d.ts +138 -0
  35. package/dist/toolkit/core/plugins.d.ts +249 -0
  36. package/dist/toolkit/core/subscribable.d.ts +72 -0
  37. package/dist/toolkit/fields/components/button-toggle.d.ts +23 -0
  38. package/dist/toolkit/fields/components/checkbox-group.d.ts +22 -0
  39. package/dist/toolkit/fields/components/color-picker/color-formatter.d.ts +20 -0
  40. package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +11 -0
  41. package/dist/toolkit/fields/components/color-picker/index.d.ts +1 -0
  42. package/dist/toolkit/fields/components/image-upload/image-upload.d.ts +23 -0
  43. package/dist/toolkit/fields/components/image-upload/index.d.ts +1 -0
  44. package/dist/toolkit/fields/components/index.d.ts +12 -0
  45. package/dist/toolkit/fields/components/input.d.ts +10 -0
  46. package/dist/toolkit/fields/components/number-input.d.ts +7 -0
  47. package/dist/toolkit/fields/components/radio-group.d.ts +21 -0
  48. package/dist/toolkit/fields/components/reference/index.d.ts +21 -0
  49. package/dist/toolkit/fields/components/reference/reference-link.d.ts +8 -0
  50. package/dist/toolkit/fields/components/reference/reference-select.d.ts +11 -0
  51. package/dist/toolkit/fields/components/select.d.ts +23 -0
  52. package/dist/toolkit/fields/components/text-field.d.ts +9 -0
  53. package/dist/toolkit/fields/components/textarea.d.ts +8 -0
  54. package/dist/toolkit/fields/components/toggle.d.ts +22 -0
  55. package/dist/toolkit/fields/field-events.d.ts +11 -0
  56. package/dist/toolkit/fields/index.d.ts +3 -0
  57. package/dist/toolkit/fields/plugins/blocks-field-plugin/block-selector-big.d.ts +9 -0
  58. package/dist/toolkit/fields/plugins/blocks-field-plugin/block-selector.d.ts +8 -0
  59. package/dist/toolkit/fields/plugins/blocks-field-plugin/index.d.ts +47 -0
  60. package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +6 -0
  61. package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +7 -0
  62. package/dist/toolkit/fields/plugins/color-field-plugin.d.ts +14 -0
  63. package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +14 -0
  64. package/dist/toolkit/fields/plugins/date-format.d.ts +5 -0
  65. package/dist/toolkit/fields/plugins/field-props.d.ts +6 -0
  66. package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +36 -0
  67. package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +57 -0
  68. package/dist/toolkit/fields/plugins/hidden-field-plugin.d.ts +7 -0
  69. package/dist/toolkit/fields/plugins/image-field-plugin.d.ts +15 -0
  70. package/dist/toolkit/fields/plugins/index.d.ts +19 -0
  71. package/dist/toolkit/fields/plugins/list-field-meta.d.ts +32 -0
  72. package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +44 -0
  73. package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +20 -0
  74. package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/error-message.d.ts +38 -0
  75. package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/index.d.ts +4 -0
  76. package/dist/toolkit/fields/plugins/mdx-field-plugin/monaco/use-debounce.d.ts +1 -0
  77. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/editor-context.d.ts +20 -0
  78. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/embed-hooks.d.ts +7 -0
  79. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-resize.d.ts +1 -0
  80. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +3 -0
  81. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/nested-form.d.ts +10 -0
  82. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +2 -0
  83. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +2 -0
  84. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +2 -0
  85. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-rules.d.ts +1 -0
  86. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +6 -0
  87. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +11 -0
  88. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +2 -0
  89. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +2 -0
  90. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +8 -0
  91. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +3 -0
  92. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/component.d.ts +9 -0
  93. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +5 -0
  94. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +6 -0
  95. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +14 -0
  96. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +15 -0
  97. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +9 -0
  98. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +7 -0
  99. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +6 -0
  100. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +5 -0
  101. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +11 -0
  102. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/autocomplete.d.ts +14 -0
  103. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +9 -0
  104. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +140 -0
  105. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/dropdown.d.ts +9 -0
  106. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/helpers.d.ts +2 -0
  107. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/icons.d.ts +24 -0
  108. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/floating-toolbar.d.ts +5 -0
  109. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/index.d.ts +10 -0
  110. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/overflow-menu.d.ts +6 -0
  111. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/toolbar/toolbar-item.d.ts +19 -0
  112. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +2 -0
  113. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/types.d.ts +9 -0
  114. package/dist/toolkit/fields/plugins/number-field-plugin.d.ts +15 -0
  115. package/dist/toolkit/fields/plugins/number-format.d.ts +1 -0
  116. package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +7 -0
  117. package/dist/toolkit/fields/plugins/reference-field-plugin.d.ts +9 -0
  118. package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +9 -0
  119. package/dist/toolkit/fields/plugins/tags-field-plugin.d.ts +12 -0
  120. package/dist/toolkit/fields/plugins/text-field-plugin.d.ts +14 -0
  121. package/dist/toolkit/fields/plugins/text-format.d.ts +1 -0
  122. package/dist/toolkit/fields/plugins/textarea-field-plugin.d.ts +13 -0
  123. package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +8 -0
  124. package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +36 -0
  125. package/dist/toolkit/form-builder/field-plugin.d.ts +14 -0
  126. package/dist/toolkit/form-builder/fields-builder.d.ts +13 -0
  127. package/dist/toolkit/form-builder/form-actions.d.ts +11 -0
  128. package/dist/toolkit/form-builder/form-builder.d.ts +32 -0
  129. package/dist/toolkit/form-builder/form-legacy.d.ts +8 -0
  130. package/dist/toolkit/form-builder/form-portal.d.ts +8 -0
  131. package/dist/toolkit/form-builder/form.d.ts +28 -0
  132. package/dist/toolkit/form-builder/index.d.ts +10 -0
  133. package/dist/toolkit/form-builder/loading-dots.d.ts +7 -0
  134. package/dist/toolkit/form-builder/reset-form.d.ts +10 -0
  135. package/dist/toolkit/forms/content-creator-plugin.d.ts +13 -0
  136. package/dist/toolkit/forms/field.d.ts +26 -0
  137. package/dist/toolkit/forms/form.d.ts +138 -0
  138. package/dist/toolkit/forms/index.d.ts +4 -0
  139. package/dist/toolkit/git-client/git-client.d.ts +92 -0
  140. package/dist/toolkit/git-client/git-file.d.ts +16 -0
  141. package/dist/toolkit/git-client/git-media-store.d.ts +11 -0
  142. package/dist/toolkit/git-client/index.d.ts +4 -0
  143. package/dist/toolkit/git-client/use-git-file.d.ts +2 -0
  144. package/dist/toolkit/hooks/use-field-reference.d.ts +12 -0
  145. package/dist/toolkit/hooks/use-local-storage.d.ts +1 -0
  146. package/dist/toolkit/icons/Add.d.ts +9 -0
  147. package/dist/toolkit/icons/Alert.d.ts +9 -0
  148. package/dist/toolkit/icons/AlignCenter.d.ts +9 -0
  149. package/dist/toolkit/icons/AlignLeft.d.ts +9 -0
  150. package/dist/toolkit/icons/AlignRight.d.ts +9 -0
  151. package/dist/toolkit/icons/Bold.d.ts +9 -0
  152. package/dist/toolkit/icons/ChevronDown.d.ts +9 -0
  153. package/dist/toolkit/icons/ChevronLeft.d.ts +9 -0
  154. package/dist/toolkit/icons/ChevronRight.d.ts +9 -0
  155. package/dist/toolkit/icons/ChevronUp.d.ts +9 -0
  156. package/dist/toolkit/icons/Circle.d.ts +9 -0
  157. package/dist/toolkit/icons/CircleCheck.d.ts +9 -0
  158. package/dist/toolkit/icons/Close.d.ts +9 -0
  159. package/dist/toolkit/icons/Code.d.ts +9 -0
  160. package/dist/toolkit/icons/Drag.d.ts +9 -0
  161. package/dist/toolkit/icons/Duplicate.d.ts +9 -0
  162. package/dist/toolkit/icons/Edit.d.ts +9 -0
  163. package/dist/toolkit/icons/EllipsisVertical.d.ts +9 -0
  164. package/dist/toolkit/icons/Error.d.ts +9 -0
  165. package/dist/toolkit/icons/Exit.d.ts +9 -0
  166. package/dist/toolkit/icons/File.d.ts +9 -0
  167. package/dist/toolkit/icons/Folder.d.ts +9 -0
  168. package/dist/toolkit/icons/Hamburger.d.ts +9 -0
  169. package/dist/toolkit/icons/Heading.d.ts +9 -0
  170. package/dist/toolkit/icons/Info.d.ts +9 -0
  171. package/dist/toolkit/icons/Italic.d.ts +9 -0
  172. package/dist/toolkit/icons/LeftArrow.d.ts +9 -0
  173. package/dist/toolkit/icons/Link.d.ts +9 -0
  174. package/dist/toolkit/icons/Lock.d.ts +9 -0
  175. package/dist/toolkit/icons/Markdown.d.ts +9 -0
  176. package/dist/toolkit/icons/Media.d.ts +9 -0
  177. package/dist/toolkit/icons/OrderedList.d.ts +9 -0
  178. package/dist/toolkit/icons/PullRequest.d.ts +9 -0
  179. package/dist/toolkit/icons/Quote.d.ts +9 -0
  180. package/dist/toolkit/icons/Redo.d.ts +9 -0
  181. package/dist/toolkit/icons/Reorder.d.ts +9 -0
  182. package/dist/toolkit/icons/ReorderRow.d.ts +9 -0
  183. package/dist/toolkit/icons/Reset.d.ts +9 -0
  184. package/dist/toolkit/icons/RightArrow.d.ts +9 -0
  185. package/dist/toolkit/icons/Settings.d.ts +9 -0
  186. package/dist/toolkit/icons/Strikethrough.d.ts +9 -0
  187. package/dist/toolkit/icons/Table.d.ts +9 -0
  188. package/dist/toolkit/icons/Tina.d.ts +9 -0
  189. package/dist/toolkit/icons/Trash.d.ts +9 -0
  190. package/dist/toolkit/icons/Underline.d.ts +9 -0
  191. package/dist/toolkit/icons/Undo.d.ts +9 -0
  192. package/dist/toolkit/icons/UnorderedList.d.ts +9 -0
  193. package/dist/toolkit/icons/Upload.d.ts +9 -0
  194. package/dist/toolkit/icons/Warning.d.ts +9 -0
  195. package/dist/toolkit/icons/index.d.ts +54 -0
  196. package/dist/toolkit/index.d.ts +40 -0
  197. package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +2 -0
  198. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +2 -0
  199. package/dist/toolkit/plugin-branch-switcher/branch-data.d.ts +11 -0
  200. package/dist/toolkit/plugin-branch-switcher/branch-modal.d.ts +6 -0
  201. package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +11 -0
  202. package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +6 -0
  203. package/dist/toolkit/plugin-branch-switcher/index.d.ts +6 -0
  204. package/dist/toolkit/plugin-branch-switcher/plugin.d.ts +14 -0
  205. package/dist/toolkit/plugin-branch-switcher/types.d.ts +30 -0
  206. package/dist/toolkit/plugin-fields/index.d.ts +1 -0
  207. package/dist/toolkit/plugin-fields/markdown.d.ts +11 -0
  208. package/dist/toolkit/plugin-form-meta/index.d.ts +7 -0
  209. package/dist/toolkit/plugin-screens/index.d.ts +16 -0
  210. package/dist/toolkit/plugin-screens/media-manager-screen.d.ts +3 -0
  211. package/dist/toolkit/react-alerts/alerts.d.ts +6 -0
  212. package/dist/toolkit/react-alerts/index.d.ts +1 -0
  213. package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +37 -0
  214. package/dist/toolkit/react-cloud-config/index.d.ts +2 -0
  215. package/dist/toolkit/react-cloud-config/use-cloud-config-plugin.d.ts +3 -0
  216. package/dist/toolkit/react-core/index.d.ts +7 -0
  217. package/dist/toolkit/react-core/tina-error-boundary.d.ts +21 -0
  218. package/dist/toolkit/react-core/use-cms-event.d.ts +8 -0
  219. package/dist/toolkit/react-core/use-cms.d.ts +10 -0
  220. package/dist/toolkit/react-core/use-form.d.ts +14 -0
  221. package/dist/toolkit/react-core/use-plugin.d.ts +12 -0
  222. package/dist/toolkit/react-core/use-subscribable.d.ts +10 -0
  223. package/dist/toolkit/react-core/use-watch-form-values.d.ts +6 -0
  224. package/dist/toolkit/react-core/with-plugin.d.ts +18 -0
  225. package/dist/toolkit/react-datetime/DateTime.d.ts +126 -0
  226. package/dist/toolkit/react-datetime/parts/ViewNavigation.d.ts +8 -0
  227. package/dist/toolkit/react-datetime/views/DaysView.d.ts +15 -0
  228. package/dist/toolkit/react-datetime/views/MonthsView.d.ts +11 -0
  229. package/dist/toolkit/react-datetime/views/TimeView.d.ts +23 -0
  230. package/dist/toolkit/react-datetime/views/YearsView.d.ts +16 -0
  231. package/dist/toolkit/react-dismissible/dismissible.d.ts +32 -0
  232. package/dist/toolkit/react-dismissible/index.d.ts +1 -0
  233. package/dist/toolkit/react-forms/form-modal.d.ts +2 -0
  234. package/dist/toolkit/react-forms/index.d.ts +1 -0
  235. package/dist/toolkit/react-modals/fullscreen-modal.d.ts +15 -0
  236. package/dist/toolkit/react-modals/index.d.ts +4 -0
  237. package/dist/toolkit/react-modals/modal/index.d.ts +5 -0
  238. package/dist/toolkit/react-modals/modal/modal-actions.d.ts +4 -0
  239. package/dist/toolkit/react-modals/modal/modal-body.d.ts +6 -0
  240. package/dist/toolkit/react-modals/modal/modal-header.d.ts +6 -0
  241. package/dist/toolkit/react-modals/modal/modal-overlay.d.ts +4 -0
  242. package/dist/toolkit/react-modals/modal/modal.d.ts +3 -0
  243. package/dist/toolkit/react-modals/modal-provider.d.ts +6 -0
  244. package/dist/toolkit/react-modals/popup-modal.d.ts +15 -0
  245. package/dist/toolkit/react-screens/components/screen-plugin-modal.d.ts +7 -0
  246. package/dist/toolkit/react-screens/index.d.ts +3 -0
  247. package/dist/toolkit/react-screens/screen-plugin.d.ts +42 -0
  248. package/dist/toolkit/react-screens/use-screen-plugin.d.ts +3 -0
  249. package/dist/toolkit/react-sidebar/components/form-list.d.ts +25 -0
  250. package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -0
  251. package/dist/toolkit/react-sidebar/components/nav.d.ts +34 -0
  252. package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +8 -0
  253. package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +7 -0
  254. package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +19 -0
  255. package/dist/toolkit/react-sidebar/components/sidebar.d.ts +26 -0
  256. package/dist/toolkit/react-sidebar/components/sync-status.d.ts +31 -0
  257. package/dist/toolkit/react-sidebar/index.d.ts +5 -0
  258. package/dist/toolkit/react-sidebar/sidebar.d.ts +34 -0
  259. package/dist/toolkit/react-tinacms/index.d.ts +10 -0
  260. package/dist/toolkit/react-tinacms/use-cms.d.ts +3 -0
  261. package/dist/toolkit/react-tinacms/use-form.d.ts +12 -0
  262. package/dist/toolkit/react-tinacms/use-plugin.d.ts +1 -0
  263. package/dist/toolkit/react-tinacms/use-subscribable.d.ts +1 -0
  264. package/dist/toolkit/react-tinacms/use-watch-form-values.d.ts +1 -0
  265. package/dist/toolkit/react-tinacms/with-plugin.d.ts +1 -0
  266. package/dist/toolkit/react-tinacms/with-tina.d.ts +3 -0
  267. package/dist/toolkit/styles/button.d.ts +15 -0
  268. package/dist/toolkit/styles/container.d.ts +7 -0
  269. package/dist/toolkit/styles/font-loader.d.ts +1 -0
  270. package/dist/toolkit/styles/index.d.ts +4 -0
  271. package/dist/toolkit/styles/message.d.ts +9 -0
  272. package/dist/toolkit/styles/overflow-menu.d.ts +6 -0
  273. package/dist/toolkit/tina-cms.d.ts +41 -0
  274. package/dist/toolkit/tina-state.d.ts +84 -0
  275. package/dist/types/cms.d.ts +2 -1
  276. package/dist/unifiedClient/index.d.ts +0 -3
  277. package/dist/utils/index.d.ts +1 -0
  278. package/package.json +60 -14
  279. package/dist/style.css +0 -1536
@@ -107,7 +107,7 @@ pollInterval?: number,
107
107
  *
108
108
  * Default 30 seconds.
109
109
  */
110
- pollTimeout?: number): ((() => void) | Promise<T>)[];
110
+ pollTimeout?: number): (Promise<T> | (() => void))[];
111
111
  export declare class Client {
112
112
  onLogin?: OnLoginFunc;
113
113
  onLogout?: () => Promise<void>;
@@ -133,7 +133,7 @@ export declare class Client {
133
133
  get isCustomContentApi(): boolean;
134
134
  setBranch(branchName: string): void;
135
135
  getBranch(): string;
136
- addPendingContent: (props: any) => Promise<unknown>;
136
+ addPendingContent: (props: any) => Promise<any>;
137
137
  getSchema: () => Promise<GraphQLSchema>;
138
138
  /**
139
139
  *
@@ -220,7 +220,19 @@ export declare class Client {
220
220
  }>;
221
221
  listBranches(args?: {
222
222
  includeIndexStatus?: boolean;
223
- }): Promise<{
223
+ }): Promise<[{
224
+ name?: string;
225
+ protected?: boolean;
226
+ githubPullRequestUrl?: string;
227
+ }, ...{
228
+ name?: string;
229
+ protected?: boolean;
230
+ githubPullRequestUrl?: string;
231
+ }[]] | {
232
+ indexStatus: {
233
+ status?: "unknown" | "complete" | "failed" | "inprogress";
234
+ timestamp?: number;
235
+ };
224
236
  name?: string;
225
237
  protected?: boolean;
226
238
  githubPullRequestUrl?: string;
@@ -1,6 +1,3 @@
1
- /**
2
-
3
- */
4
1
  /// <reference types="react" />
5
2
  import { useDocumentCreatorPlugin } from './hooks/use-content-creator';
6
3
  import { TinaCMSProviderDefaultProps } from './types/cms';
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { EventBus, Callback, CMSEvent } from '../core';
3
+ export interface EventsToAlerts {
4
+ [key: string]: ToAlert | AlertArgs;
5
+ }
6
+ export declare type ToAlert = (event: CMSEvent) => AlertArgs;
7
+ export interface AlertArgs {
8
+ level: AlertLevel;
9
+ message: string;
10
+ timeout?: number;
11
+ }
12
+ export declare class Alerts {
13
+ private events;
14
+ private map;
15
+ private alerts;
16
+ private mapEventToAlert;
17
+ constructor(events: EventBus, map?: EventsToAlerts);
18
+ setMap(eventsToAlerts: EventsToAlerts): void;
19
+ add(level: AlertLevel, message: string | React.FunctionComponent, timeout?: number): () => void;
20
+ dismiss(alert: Alert): void;
21
+ subscribe(cb: Callback): () => void;
22
+ get all(): Alert[];
23
+ info(message: string | React.FunctionComponent, timeout?: number): () => void;
24
+ success(message: string | React.FunctionComponent, timeout?: number): () => void;
25
+ warn(message: string | React.FunctionComponent, timeout?: number): () => void;
26
+ error(message: string | React.FunctionComponent, timeout?: number): () => void;
27
+ }
28
+ export declare type AlertLevel = 'info' | 'success' | 'warn' | 'error';
29
+ export interface Alert {
30
+ id: string;
31
+ level: AlertLevel;
32
+ message: string | React.FunctionComponent;
33
+ timeout: number;
34
+ }
@@ -0,0 +1 @@
1
+ export * from './alerts';
@@ -0,0 +1,12 @@
1
+ export declare class BrowserStorageClient {
2
+ data: any;
3
+ timeout: number | null;
4
+ namespace: string;
5
+ storage: Storage;
6
+ constructor(storage: Storage, namespace?: string | null);
7
+ save(id: string, content: any): void;
8
+ load(id: string): any;
9
+ clear(id: string): void;
10
+ private debouncePersist;
11
+ private persist;
12
+ }
@@ -0,0 +1,2 @@
1
+ import { Form } from '../forms';
2
+ export declare function getFlattenedFormValues(form: Form): any;
@@ -0,0 +1,2 @@
1
+ export * from './browser-storage-client';
2
+ export * from './use-form-browser-cache';
@@ -0,0 +1,2 @@
1
+ import { Form } from '../forms';
2
+ export declare function useFormBrowserCache(form: Form<any>, editing: boolean): void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ActiveFieldIndicator: () => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface BreadcrumbProps {
3
+ directory?: string;
4
+ setDirectory: (_directory: string) => void;
5
+ }
6
+ export declare function Breadcrumb({ directory, setDirectory }: BreadcrumbProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface CopyFieldProps {
3
+ label?: string;
4
+ description?: string;
5
+ value: any;
6
+ }
7
+ export declare const CopyField: ({ label, description, value }: CopyFieldProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './media-manager';
2
+ export { ListMediaItem, GridMediaItem } from './media-item';
3
+ export { Breadcrumb } from './breadcrumb';
4
+ export { CursorPaginator } from './pagination';
5
+ export type { MediaPaginatorProps } from './pagination';
6
+ export { DEFAULT_MEDIA_UPLOAD_TYPES } from './utils';
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { Media } from '../../core';
3
+ interface MediaItemProps {
4
+ item: Media & {
5
+ new?: boolean;
6
+ };
7
+ onClick(_item: Media | false): void;
8
+ active: boolean;
9
+ }
10
+ export declare function ListMediaItem({ item, onClick, active }: MediaItemProps): JSX.Element;
11
+ export declare function GridMediaItem({ item, active, onClick }: MediaItemProps): JSX.Element;
12
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Media } from '../../core';
3
+ export interface MediaRequest {
4
+ directory?: string;
5
+ onSelect?(_media: Media): void;
6
+ close?(): void;
7
+ allowDelete?: boolean;
8
+ }
9
+ export declare function MediaManager(): JSX.Element;
10
+ export declare function MediaPicker({ allowDelete, onSelect, close, ...props }: MediaRequest): JSX.Element;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ interface DeleteModalProps {
3
+ close(): void;
4
+ deleteFunc(): void;
5
+ filename: string;
6
+ }
7
+ interface NewFolderModalProps {
8
+ onSubmit(filename: string): void;
9
+ close(): void;
10
+ }
11
+ export declare const DeleteModal: ({ close, deleteFunc, filename, }: DeleteModalProps) => JSX.Element;
12
+ export declare const NewFolderModal: ({ onSubmit, close }: NewFolderModalProps) => JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface MediaPaginatorProps {
3
+ navigateNext: () => void;
4
+ navigatePrev: () => void;
5
+ hasNext: boolean;
6
+ hasPrev: boolean;
7
+ variant?: 'primary' | 'secondary' | 'white' | 'ghost';
8
+ }
9
+ export declare function CursorPaginator({ navigateNext, navigatePrev, hasNext, hasPrev, variant, }: MediaPaginatorProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const DEFAULT_MEDIA_UPLOAD_TYPES: string;
2
+ export declare const dropzoneAcceptFromString: (str: string) => any;
3
+ export declare const isImage: (filename: string) => boolean;
4
+ export declare const absoluteImgURL: (str: string) => string;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ export declare const MutationSignalContext: React.Context<number>;
3
+ /**
4
+ *
5
+ */
6
+ export declare const MutationSignalProvider: ({ children }: {
7
+ children: any;
8
+ }) => JSX.Element;
9
+ /**
10
+ * Returns a value that changes when elements within the parent MutationSignalProvider change
11
+ */
12
+ export declare const useMutationSignal: () => number;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { TinaCMS } from '../tina-cms';
3
+ export interface TinaCMSProviderProps {
4
+ cms: TinaCMS;
5
+ children?: React.ReactNode;
6
+ }
7
+ export declare const INVALID_CMS_ERROR = "The `cms` prop must be an instance of `TinaCMS`.";
8
+ export declare const TinaCMSProvider: React.FC<TinaCMSProviderProps>;
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { TinaCMSProviderProps } from './tina-cms-provider';
3
+ import { TinaUIProps } from './tina-ui';
4
+ export interface TinaProviderProps extends TinaCMSProviderProps, TinaUIProps {
5
+ }
6
+ export declare const TinaProvider: React.FC<TinaProviderProps>;
7
+ /**
8
+ * @deprecated This has been renamed to `TinaProvider`.
9
+ */
10
+ export declare const Tina: React.FC<TinaProviderProps>;
11
+ /**
12
+ * @deprecated This has been renamed to `TinaProviderProps`.
13
+ */
14
+ export declare type TinaProps = TinaProviderProps;
@@ -0,0 +1,13 @@
1
+ /**
2
+
3
+
4
+
5
+ */
6
+ import * as React from 'react';
7
+ import { SidebarPosition } from '../react-sidebar';
8
+ export interface TinaUIProps {
9
+ position?: SidebarPosition;
10
+ styled?: boolean;
11
+ children?: React.ReactNode;
12
+ }
13
+ export declare const TinaUI: React.FC<TinaUIProps>;
@@ -0,0 +1,156 @@
1
+ /**
2
+ * This package contains the [[CMS]] class which is the core
3
+ * piece of any content management system.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import { Plugin, PluginTypeManager } from './plugins';
8
+ import { EventBus } from './event';
9
+ import { MediaManager, MediaStore } from './media';
10
+ import { Flags } from './flags';
11
+ /**
12
+ * A [[CMS]] is the core object of any content management system.
13
+ *
14
+ * The responsibility of the [[CMS]] keeps track of two broad types of objects:
15
+ *
16
+ * - [[Plugin|Plugins]] which extend or change the behaviour of the content management system..
17
+ * - [[api|APIs]] which allow the CMS to integrate with third party services.
18
+ * - [[EventBus|events]] which provide a way to communicate information about events happening
19
+ * between decoupled parts of the CMS.
20
+ *
21
+ * The name [[CMS]] is a bit misleading. This object knows nothing of the user
22
+ * interface or the data storage layer. The purpose of a [[CMS]] instance is to
23
+ * provide a common connection point for the various aspects of a content
24
+ * management system. The [[CMS]] object effectively a vehicle for dependency injection.
25
+ *
26
+ * #### Creating a CMS
27
+ *
28
+ * ```ts
29
+ * import { CMS } from "@tinacms/core"
30
+ *
31
+ * const cms = new CMS()
32
+ * ```
33
+ *
34
+ * #### Extending the CMS
35
+ *
36
+ * The [[CMS]] class provides low-level interfaces for interacting with APIs and Plugins.
37
+ * Creating a subclass is great way to facilitate these interactions:
38
+ *
39
+ * ```ts
40
+ * import { CMS } from "@tinacms/core"
41
+ *
42
+ * class MyCMS extends CMS {
43
+ * get colors() {
44
+ * return this.plugins.findOrCreateMap("color")
45
+ * }
46
+ * }
47
+ *
48
+ * const cms = new MyCMS()
49
+ *
50
+ * cms.colors.all()
51
+ * ```
52
+ */
53
+ export interface CMSConfig {
54
+ enabled?: boolean;
55
+ plugins?: Array<Plugin>;
56
+ apis?: {
57
+ [key: string]: any;
58
+ };
59
+ media?: MediaStore;
60
+ /**
61
+ * Might potentially make more sense to consolidate both media.store and mediaOptions.pageSize
62
+ * under the 'media' config namespace, but that's a breaking change.
63
+ */
64
+ mediaOptions?: {
65
+ pageSize?: number;
66
+ };
67
+ }
68
+ export declare class CMS {
69
+ static ENABLED: {
70
+ type: string;
71
+ };
72
+ static DISABLED: {
73
+ type: string;
74
+ };
75
+ private _enabled;
76
+ /**
77
+ * An object for managing CMSs plugins.
78
+ *
79
+ * [[Plugin|Plugins]] are used to extend or modify the CMSs feature set.
80
+ *
81
+ */
82
+ plugins: PluginTypeManager;
83
+ /**
84
+ * The set of APIs registered with the CMS.
85
+ *
86
+ * API objects are the preferred way to interact with external APIs over a network.
87
+ *
88
+ * The preferred way to register new APIs is through the [[registerApi]] method.
89
+ *
90
+ * #### Example: Fetching Data Through an API
91
+ *
92
+ * ```ts
93
+ * import { CMS } from "@tinacms/core"
94
+ * import { CoolApi } from "cool-api"
95
+ *
96
+ * const cms = new CMS()
97
+ *
98
+ * cms.registerApi("coolApi", new CoolApi())
99
+ *
100
+ * cms.api.coolApi.fetchCoolThings().then(coolThings => {
101
+ * console.log(coolThings)
102
+ * })
103
+ * ```
104
+ *
105
+ */
106
+ api: {
107
+ [key: string]: any;
108
+ };
109
+ private unsubscribeHooks;
110
+ events: EventBus;
111
+ media: MediaManager;
112
+ flags: Flags;
113
+ /**
114
+ * @hidden
115
+ */
116
+ constructor(config?: CMSConfig);
117
+ /**
118
+ * Registers a new external API with the CMS.
119
+ *
120
+ * #### Example
121
+ *
122
+ * ```ts
123
+ * import { CoolApi } from "cool-api"
124
+ *
125
+ * cms.registerApi("coolApi", new CoolApi())
126
+ * ```
127
+ *
128
+ * @param name The name used to lookup the external API.
129
+ * @param api An object for interacting with an external API.
130
+ *
131
+ * ### Additional Resources
132
+ *
133
+ * * https://github.com/tinacms/rfcs/blob/master/0010-api-events.md
134
+ */
135
+ registerApi(name: string, api: any): void;
136
+ /**
137
+ * When `true` the CMS is enabled and content can be edited.
138
+ */
139
+ get enabled(): boolean;
140
+ /**
141
+ * When `true` the CMS is disabled and content cannot be edited.
142
+ */
143
+ get disabled(): boolean;
144
+ /**
145
+ * Enable the CMS so content can be edited.
146
+ */
147
+ enable: () => void;
148
+ /**
149
+ * Disable the CMS so content can no longer be edited.
150
+ */
151
+ disable: () => void;
152
+ /**
153
+ * Toggles the enabled/disabled state of the CMS .
154
+ */
155
+ toggle: () => void;
156
+ }
@@ -0,0 +1,17 @@
1
+ export declare type Callback<E extends CMSEvent = CMSEvent> = (event: E) => void;
2
+ export interface CMSEvent {
3
+ type: string;
4
+ [key: string]: any;
5
+ }
6
+ export declare class EventBus {
7
+ private listeners;
8
+ subscribe<E extends CMSEvent = CMSEvent>(event: E['type'] | E['type'][], callback: Callback<E>): () => void;
9
+ dispatch<E extends CMSEvent = CMSEvent>(event: E): void;
10
+ }
11
+ export declare class Listener<E extends CMSEvent = CMSEvent> {
12
+ private eventPattern;
13
+ private callback;
14
+ constructor(eventPattern: E['type'], callback: Callback<E>);
15
+ handleEvent(event: E): boolean;
16
+ watchesEvent(currentEvent: E): boolean;
17
+ }
@@ -0,0 +1,13 @@
1
+ import { EventBus } from './event';
2
+ export interface SetFlagEvent {
3
+ type: 'flag:set';
4
+ key: string;
5
+ value: boolean;
6
+ }
7
+ export declare class Flags {
8
+ private events;
9
+ private _flags;
10
+ constructor(events: EventBus);
11
+ get(key: any): boolean;
12
+ set(key: any, value: any): void;
13
+ }
@@ -0,0 +1,7 @@
1
+ export * from './cms';
2
+ export * from './event';
3
+ export * from './subscribable';
4
+ export * from './plugins';
5
+ export * from './media';
6
+ export * from './media-store.default';
7
+ export * from './flags';
@@ -0,0 +1,45 @@
1
+ import { Media, MediaStore, MediaUploadOptions, MediaList, MediaListOptions } from './media';
2
+ import { CMS } from './cms';
3
+ export declare class DummyMediaStore implements MediaStore {
4
+ accept: string;
5
+ persist(files: MediaUploadOptions[]): Promise<Media[]>;
6
+ list(): Promise<MediaList>;
7
+ delete(): Promise<void>;
8
+ }
9
+ interface StaticMediaItem {
10
+ id: string;
11
+ filename: string;
12
+ src: string;
13
+ directory: string;
14
+ thumbnails: {
15
+ '75x75': string;
16
+ '400x400': string;
17
+ '1000x1000': string;
18
+ };
19
+ type: 'file' | 'dir';
20
+ children?: StaticMedia;
21
+ }
22
+ export interface StaticMedia {
23
+ [offset: string]: StaticMediaItem[];
24
+ }
25
+ export declare class TinaMediaStore implements MediaStore {
26
+ fetchFunction: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
27
+ private api;
28
+ private cms;
29
+ private isLocal;
30
+ private url;
31
+ private staticMedia;
32
+ isStatic?: boolean;
33
+ constructor(cms: CMS, staticMedia?: StaticMedia);
34
+ setup(): void;
35
+ isAuthenticated(): Promise<any>;
36
+ accept: string;
37
+ private persist_cloud;
38
+ private persist_local;
39
+ persist(media: MediaUploadOptions[]): Promise<Media[]>;
40
+ private genThumbnail;
41
+ list(options?: MediaListOptions): Promise<MediaList>;
42
+ parse: (img: any) => any;
43
+ delete(media: Media): Promise<void>;
44
+ }
45
+ export {};
@@ -0,0 +1,138 @@
1
+ import { EventBus } from './event';
2
+ /**
3
+ * Represents an individual file in the MediaStore
4
+ */
5
+ export interface Media {
6
+ type: 'file' | 'dir';
7
+ /**
8
+ * A unique identifier for this file.
9
+ */
10
+ id: string;
11
+ /**
12
+ * The name of the file.
13
+ */
14
+ filename: string;
15
+ /**
16
+ * The directory where the file is stored.
17
+ */
18
+ directory: string;
19
+ /**
20
+ * A url that provides an image of the media file
21
+ */
22
+ src?: string;
23
+ /**
24
+ * A url that provides a smaller image of the media file
25
+ */
26
+ thumbnails?: {
27
+ [name: string]: string;
28
+ };
29
+ }
30
+ export interface MediaUploadOptions {
31
+ /**
32
+ * The directory where the file should be stored.
33
+ */
34
+ directory: string;
35
+ /**
36
+ * The File to be uploaded.
37
+ */
38
+ file: File;
39
+ }
40
+ /**
41
+ * Represents some external service for storing and
42
+ * managing media.
43
+ */
44
+ export interface MediaStore {
45
+ /**
46
+ * The [input accept string](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)
47
+ * that describes what kind of files the Media Store will accept.
48
+ */
49
+ accept: string;
50
+ /**
51
+ * Uploads a set of files to the Media Store and
52
+ * returns a Promise containing the Media objects
53
+ * for those files.
54
+ */
55
+ persist(files: MediaUploadOptions[]): Promise<Media[]>;
56
+ /**
57
+ * Delete a media object from the store.
58
+ */
59
+ delete(media: Media): Promise<void>;
60
+ /**
61
+ * Lists all media in a specific directory.
62
+ */
63
+ list(options?: MediaListOptions): Promise<MediaList>;
64
+ /**
65
+ * Indicates that uploads and deletions are not supported
66
+ *
67
+ * @default false
68
+ */
69
+ isStatic?: boolean;
70
+ }
71
+ export declare type MediaListOffset = string | number;
72
+ /**
73
+ * The options available when listing media.
74
+ */
75
+ export interface MediaListOptions {
76
+ directory?: string;
77
+ limit?: number;
78
+ offset?: MediaListOffset;
79
+ thumbnailSizes?: {
80
+ w: number;
81
+ h: number;
82
+ }[];
83
+ }
84
+ /**
85
+ * The response returned from listing media.
86
+ */
87
+ export interface MediaList {
88
+ items: Media[];
89
+ nextOffset?: MediaListOffset;
90
+ }
91
+ /**
92
+ * The central object for all things media.
93
+ *
94
+ * Meant to be placed directly on the `cms`
95
+ *
96
+ * ```ts
97
+ * cms.media = new MediaManager({
98
+ * accept: '*',
99
+ * async persist(files) {
100
+ * // do something
101
+ * }
102
+ * })
103
+ * ```
104
+ */
105
+ export declare class MediaManager implements MediaStore {
106
+ store: MediaStore;
107
+ private events;
108
+ private _pageSize;
109
+ constructor(store: MediaStore, events: EventBus);
110
+ get isConfigured(): boolean;
111
+ get pageSize(): number;
112
+ set pageSize(pageSize: number);
113
+ open(options?: SelectMediaOptions): void;
114
+ get accept(): string;
115
+ persist(files: MediaUploadOptions[]): Promise<Media[]>;
116
+ delete(media: Media): Promise<void>;
117
+ list(options: MediaListOptions): Promise<MediaList>;
118
+ }
119
+ export interface SelectMediaOptions {
120
+ allowDelete?: boolean;
121
+ directory?: string;
122
+ onSelect?(media: Media): void;
123
+ }
124
+ interface MediaListErrorConfig {
125
+ title: string;
126
+ message: string;
127
+ docsLink: string;
128
+ }
129
+ export declare class MediaListError extends Error {
130
+ ERR_TYPE: string;
131
+ title: string;
132
+ docsLink: string;
133
+ constructor(config: MediaListErrorConfig);
134
+ }
135
+ export declare const E_UNAUTHORIZED: MediaListError;
136
+ export declare const E_BAD_ROUTE: MediaListError;
137
+ export declare const E_DEFAULT: MediaListError;
138
+ export {};