@instructure/platform-block-content-editor 0.3.1 → 1.1.0

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 (380) hide show
  1. package/README.md +187 -0
  2. package/dist/components/MediaPlaceholder/MediaPlaceholder.d.ts.map +1 -1
  3. package/dist/components/RichText/RichText.d.ts +20 -0
  4. package/dist/components/RichText/RichText.d.ts.map +1 -0
  5. package/dist/components/RichText/index.d.ts +2 -0
  6. package/dist/components/RichText/index.d.ts.map +1 -0
  7. package/dist/components/blocks/Accordion/Accordion.d.ts.map +1 -1
  8. package/dist/components/blocks/Accordion/accordionTranslations.d.ts +15 -0
  9. package/dist/components/blocks/Accordion/accordionTranslations.d.ts.map +1 -0
  10. package/dist/components/blocks/Accordion/createAccordionBlock.d.ts +22 -0
  11. package/dist/components/blocks/Accordion/createAccordionBlock.d.ts.map +1 -0
  12. package/dist/components/blocks/Accordion/index.d.ts +2 -0
  13. package/dist/components/blocks/Accordion/index.d.ts.map +1 -1
  14. package/dist/components/blocks/Banner/Banner.d.ts.map +1 -1
  15. package/dist/components/blocks/Banner/bannerPropsSchema.d.ts +0 -2
  16. package/dist/components/blocks/Banner/bannerPropsSchema.d.ts.map +1 -1
  17. package/dist/components/blocks/Banner/bannerTranslations.d.ts +13 -0
  18. package/dist/components/blocks/Banner/bannerTranslations.d.ts.map +1 -0
  19. package/dist/components/blocks/Banner/createBannerBlock.d.ts +14 -0
  20. package/dist/components/blocks/Banner/createBannerBlock.d.ts.map +1 -0
  21. package/dist/components/blocks/Banner/getBannerViewProps.d.ts +2 -3
  22. package/dist/components/blocks/Banner/getBannerViewProps.d.ts.map +1 -1
  23. package/dist/components/blocks/Banner/index.d.ts +2 -0
  24. package/dist/components/blocks/Banner/index.d.ts.map +1 -1
  25. package/dist/components/blocks/CodeBlock/CodeBlock.d.ts.map +1 -1
  26. package/dist/components/blocks/CodeBlock/codeBlockPropsSchema.d.ts +2 -2
  27. package/dist/components/blocks/CodeBlock/codeBlockTranslations.d.ts +11 -0
  28. package/dist/components/blocks/CodeBlock/codeBlockTranslations.d.ts.map +1 -0
  29. package/dist/components/blocks/CodeBlock/createCodeBlock.d.ts +12 -0
  30. package/dist/components/blocks/CodeBlock/createCodeBlock.d.ts.map +1 -0
  31. package/dist/components/blocks/CodeBlock/index.d.ts +2 -0
  32. package/dist/components/blocks/CodeBlock/index.d.ts.map +1 -1
  33. package/dist/components/blocks/FlashCards/FlashCard.d.ts +21 -0
  34. package/dist/components/blocks/FlashCards/FlashCard.d.ts.map +1 -0
  35. package/dist/components/blocks/FlashCards/FlashCards.d.ts +4 -0
  36. package/dist/components/blocks/FlashCards/FlashCards.d.ts.map +1 -0
  37. package/dist/components/blocks/FlashCards/createFlashCardsBlock.d.ts +15 -0
  38. package/dist/components/blocks/FlashCards/createFlashCardsBlock.d.ts.map +1 -0
  39. package/dist/components/blocks/FlashCards/flashCardsPropsSchema.d.ts +60 -0
  40. package/dist/components/blocks/FlashCards/flashCardsPropsSchema.d.ts.map +1 -0
  41. package/dist/components/blocks/FlashCards/flashCardsStyles.d.ts +43 -0
  42. package/dist/components/blocks/FlashCards/flashCardsStyles.d.ts.map +1 -0
  43. package/dist/components/blocks/FlashCards/flashCardsTranslations.d.ts +34 -0
  44. package/dist/components/blocks/FlashCards/flashCardsTranslations.d.ts.map +1 -0
  45. package/dist/components/blocks/FlashCards/getFlashCardsViewProps.d.ts +23 -0
  46. package/dist/components/blocks/FlashCards/getFlashCardsViewProps.d.ts.map +1 -0
  47. package/dist/components/blocks/FlashCards/index.d.ts +5 -0
  48. package/dist/components/blocks/FlashCards/index.d.ts.map +1 -0
  49. package/dist/components/blocks/ImageBlock/ImageBlock.d.ts.map +1 -1
  50. package/dist/components/blocks/ImageBlock/createImageBlock.d.ts +15 -0
  51. package/dist/components/blocks/ImageBlock/createImageBlock.d.ts.map +1 -0
  52. package/dist/components/blocks/ImageBlock/getImageBlockViewProps.d.ts +3 -1
  53. package/dist/components/blocks/ImageBlock/getImageBlockViewProps.d.ts.map +1 -1
  54. package/dist/components/blocks/ImageBlock/imageBlockTranslations.d.ts +15 -0
  55. package/dist/components/blocks/ImageBlock/imageBlockTranslations.d.ts.map +1 -0
  56. package/dist/components/blocks/ImageBlock/index.d.ts +2 -0
  57. package/dist/components/blocks/ImageBlock/index.d.ts.map +1 -1
  58. package/dist/components/blocks/KnowledgeCheck/AnswerCard.d.ts +19 -0
  59. package/dist/components/blocks/KnowledgeCheck/AnswerCard.d.ts.map +1 -0
  60. package/dist/components/blocks/KnowledgeCheck/KnowledgeCheck.d.ts +4 -0
  61. package/dist/components/blocks/KnowledgeCheck/KnowledgeCheck.d.ts.map +1 -0
  62. package/dist/components/blocks/KnowledgeCheck/createKnowledgeCheckBlock.d.ts +18 -0
  63. package/dist/components/blocks/KnowledgeCheck/createKnowledgeCheckBlock.d.ts.map +1 -0
  64. package/dist/components/blocks/KnowledgeCheck/getKnowledgeCheckViewProps.d.ts +34 -0
  65. package/dist/components/blocks/KnowledgeCheck/getKnowledgeCheckViewProps.d.ts.map +1 -0
  66. package/dist/components/blocks/KnowledgeCheck/index.d.ts +5 -0
  67. package/dist/components/blocks/KnowledgeCheck/index.d.ts.map +1 -0
  68. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckPropsSchema.d.ts +87 -0
  69. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckPropsSchema.d.ts.map +1 -0
  70. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckTranslations.d.ts +35 -0
  71. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckTranslations.d.ts.map +1 -0
  72. package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts +3 -0
  73. package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts.map +1 -0
  74. package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts +22 -0
  75. package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts.map +1 -0
  76. package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts +32 -0
  77. package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts.map +1 -0
  78. package/dist/components/blocks/LayoutContainer/index.d.ts +5 -0
  79. package/dist/components/blocks/LayoutContainer/index.d.ts.map +1 -0
  80. package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts +118 -0
  81. package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts.map +1 -0
  82. package/dist/components/blocks/MixAndMatch/MatchCard.d.ts +21 -0
  83. package/dist/components/blocks/MixAndMatch/MatchCard.d.ts.map +1 -0
  84. package/dist/components/blocks/MixAndMatch/MixAndMatch.d.ts +4 -0
  85. package/dist/components/blocks/MixAndMatch/MixAndMatch.d.ts.map +1 -0
  86. package/dist/components/blocks/MixAndMatch/createMixAndMatchBlock.d.ts +15 -0
  87. package/dist/components/blocks/MixAndMatch/createMixAndMatchBlock.d.ts.map +1 -0
  88. package/dist/components/blocks/MixAndMatch/getMixAndMatchViewProps.d.ts +43 -0
  89. package/dist/components/blocks/MixAndMatch/getMixAndMatchViewProps.d.ts.map +1 -0
  90. package/dist/components/blocks/MixAndMatch/index.d.ts +5 -0
  91. package/dist/components/blocks/MixAndMatch/index.d.ts.map +1 -0
  92. package/dist/components/blocks/MixAndMatch/mixAndMatchPropsSchema.d.ts +74 -0
  93. package/dist/components/blocks/MixAndMatch/mixAndMatchPropsSchema.d.ts.map +1 -0
  94. package/dist/components/blocks/MixAndMatch/mixAndMatchStyles.d.ts +21 -0
  95. package/dist/components/blocks/MixAndMatch/mixAndMatchStyles.d.ts.map +1 -0
  96. package/dist/components/blocks/MixAndMatch/mixAndMatchTranslations.d.ts +37 -0
  97. package/dist/components/blocks/MixAndMatch/mixAndMatchTranslations.d.ts.map +1 -0
  98. package/dist/components/blocks/Quote/Quote.d.ts.map +1 -1
  99. package/dist/components/blocks/Quote/createQuoteBlock.d.ts +12 -0
  100. package/dist/components/blocks/Quote/createQuoteBlock.d.ts.map +1 -0
  101. package/dist/components/blocks/Quote/index.d.ts +2 -0
  102. package/dist/components/blocks/Quote/index.d.ts.map +1 -1
  103. package/dist/components/blocks/Quote/quoteTranslations.d.ts +13 -0
  104. package/dist/components/blocks/Quote/quoteTranslations.d.ts.map +1 -0
  105. package/dist/components/blocks/TabsBlock/TabsBlock.d.ts +4 -0
  106. package/dist/components/blocks/TabsBlock/TabsBlock.d.ts.map +1 -0
  107. package/dist/components/blocks/TabsBlock/createTabsBlock.d.ts +25 -0
  108. package/dist/components/blocks/TabsBlock/createTabsBlock.d.ts.map +1 -0
  109. package/dist/components/blocks/TabsBlock/getTabsBlockViewProps.d.ts +55 -0
  110. package/dist/components/blocks/TabsBlock/getTabsBlockViewProps.d.ts.map +1 -0
  111. package/dist/components/blocks/TabsBlock/index.d.ts +6 -0
  112. package/dist/components/blocks/TabsBlock/index.d.ts.map +1 -0
  113. package/dist/components/blocks/TabsBlock/tabsBlockPropsSchema.d.ts +127 -0
  114. package/dist/components/blocks/TabsBlock/tabsBlockPropsSchema.d.ts.map +1 -0
  115. package/dist/components/blocks/TabsBlock/tabsBlockTranslations.d.ts +13 -0
  116. package/dist/components/blocks/TabsBlock/tabsBlockTranslations.d.ts.map +1 -0
  117. package/dist/components/blocks/TabsBlock/useRovingTabIndex.d.ts +20 -0
  118. package/dist/components/blocks/TabsBlock/useRovingTabIndex.d.ts.map +1 -0
  119. package/dist/components/blocks/Text/Text.d.ts.map +1 -1
  120. package/dist/components/blocks/Text/createTextBlock.d.ts +12 -0
  121. package/dist/components/blocks/Text/createTextBlock.d.ts.map +1 -0
  122. package/dist/components/blocks/Text/index.d.ts +2 -0
  123. package/dist/components/blocks/Text/index.d.ts.map +1 -1
  124. package/dist/components/blocks/Text/textPropsSchema.d.ts +3 -3
  125. package/dist/components/blocks/Text/textTranslations.d.ts +11 -0
  126. package/dist/components/blocks/Text/textTranslations.d.ts.map +1 -0
  127. package/dist/components/blocks/TwoColumn/TwoColumn.d.ts +3 -0
  128. package/dist/components/blocks/TwoColumn/TwoColumn.d.ts.map +1 -0
  129. package/dist/components/blocks/TwoColumn/createTwoColumnBlock.d.ts +14 -0
  130. package/dist/components/blocks/TwoColumn/createTwoColumnBlock.d.ts.map +1 -0
  131. package/dist/components/blocks/TwoColumn/getTwoColumnViewProps.d.ts +17 -0
  132. package/dist/components/blocks/TwoColumn/getTwoColumnViewProps.d.ts.map +1 -0
  133. package/dist/components/blocks/TwoColumn/index.d.ts +5 -0
  134. package/dist/components/blocks/TwoColumn/index.d.ts.map +1 -0
  135. package/dist/components/blocks/TwoColumn/twoColumnPropsSchema.d.ts +60 -0
  136. package/dist/components/blocks/TwoColumn/twoColumnPropsSchema.d.ts.map +1 -0
  137. package/dist/components/blocks/TwoColumn/twoColumnStyles.d.ts +13 -0
  138. package/dist/components/blocks/TwoColumn/twoColumnStyles.d.ts.map +1 -0
  139. package/dist/components/blocks/VideoBlock/VideoBlock.d.ts.map +1 -1
  140. package/dist/components/blocks/VideoBlock/createVideoBlock.d.ts +15 -0
  141. package/dist/components/blocks/VideoBlock/createVideoBlock.d.ts.map +1 -0
  142. package/dist/components/blocks/VideoBlock/index.d.ts +3 -1
  143. package/dist/components/blocks/VideoBlock/index.d.ts.map +1 -1
  144. package/dist/components/blocks/VideoBlock/videoBlockTranslations.d.ts +23 -0
  145. package/dist/components/blocks/VideoBlock/videoBlockTranslations.d.ts.map +1 -0
  146. package/dist/components/blocks/WidgetBlock/WidgetBlock.d.ts +8 -0
  147. package/dist/components/blocks/WidgetBlock/WidgetBlock.d.ts.map +1 -0
  148. package/dist/components/blocks/WidgetBlock/WidgetErrorBoundary.d.ts +36 -0
  149. package/dist/components/blocks/WidgetBlock/WidgetErrorBoundary.d.ts.map +1 -0
  150. package/dist/components/blocks/WidgetBlock/createWidgetBlock.d.ts +14 -0
  151. package/dist/components/blocks/WidgetBlock/createWidgetBlock.d.ts.map +1 -0
  152. package/dist/components/blocks/WidgetBlock/index.d.ts +5 -0
  153. package/dist/components/blocks/WidgetBlock/index.d.ts.map +1 -0
  154. package/dist/components/blocks/WidgetBlock/widgetBlockPropsSchema.d.ts +26 -0
  155. package/dist/components/blocks/WidgetBlock/widgetBlockPropsSchema.d.ts.map +1 -0
  156. package/dist/components/blocks/WidgetBlock/widgetBlockTranslations.d.ts +18 -0
  157. package/dist/components/blocks/WidgetBlock/widgetBlockTranslations.d.ts.map +1 -0
  158. package/dist/components/blocks/commonSchemas.d.ts +13 -0
  159. package/dist/components/blocks/commonSchemas.d.ts.map +1 -1
  160. package/dist/components/blocks/commonViewProps.d.ts +23 -1
  161. package/dist/components/blocks/commonViewProps.d.ts.map +1 -1
  162. package/dist/components/blocks/richTextTableStyles.d.ts +10 -0
  163. package/dist/components/blocks/richTextTableStyles.d.ts.map +1 -0
  164. package/dist/contexts/AIActionContext.d.ts +38 -0
  165. package/dist/contexts/AIActionContext.d.ts.map +1 -0
  166. package/dist/contexts/BlockEditorApiContext.d.ts +139 -4
  167. package/dist/contexts/BlockEditorApiContext.d.ts.map +1 -1
  168. package/dist/contexts/BlockTranslationsContext.d.ts +47 -0
  169. package/dist/contexts/BlockTranslationsContext.d.ts.map +1 -0
  170. package/dist/contexts/RichTextEditorContext.d.ts +28 -0
  171. package/dist/contexts/RichTextEditorContext.d.ts.map +1 -0
  172. package/dist/contexts/RichTextRendererContext.d.ts +21 -0
  173. package/dist/contexts/RichTextRendererContext.d.ts.map +1 -0
  174. package/dist/editor/BlockContentEditor.d.ts +40 -0
  175. package/dist/editor/BlockContentEditor.d.ts.map +1 -0
  176. package/dist/editor/ai/BlockAIMenu.d.ts +17 -0
  177. package/dist/editor/ai/BlockAIMenu.d.ts.map +1 -0
  178. package/dist/editor/ai/BlockAIMenuContent.d.ts +17 -0
  179. package/dist/editor/ai/BlockAIMenuContent.d.ts.map +1 -0
  180. package/dist/editor/ai/PreviewBlockModal.d.ts +29 -0
  181. package/dist/editor/ai/PreviewBlockModal.d.ts.map +1 -0
  182. package/dist/editor/ai/aiMenuStyles.d.ts +23 -0
  183. package/dist/editor/ai/aiMenuStyles.d.ts.map +1 -0
  184. package/dist/editor/ai/aiTranslations.d.ts +79 -0
  185. package/dist/editor/ai/aiTranslations.d.ts.map +1 -0
  186. package/dist/editor/ai/aiTypes.d.ts +13 -0
  187. package/dist/editor/ai/aiTypes.d.ts.map +1 -0
  188. package/dist/editor/ai/constants.d.ts +8 -0
  189. package/dist/editor/ai/constants.d.ts.map +1 -0
  190. package/dist/editor/ai/index.d.ts +7 -0
  191. package/dist/editor/ai/index.d.ts.map +1 -0
  192. package/dist/editor/ai/useBlockAIPopover.d.ts +30 -0
  193. package/dist/editor/ai/useBlockAIPopover.d.ts.map +1 -0
  194. package/dist/editor/ai/useGenerateAltText.d.ts +11 -0
  195. package/dist/editor/ai/useGenerateAltText.d.ts.map +1 -0
  196. package/dist/editor/canvas/DesignerArea.d.ts +38 -0
  197. package/dist/editor/canvas/DesignerArea.d.ts.map +1 -0
  198. package/dist/editor/canvas/DesignerCanvas.d.ts +35 -0
  199. package/dist/editor/canvas/DesignerCanvas.d.ts.map +1 -0
  200. package/dist/editor/canvas/DropGridOverlay.d.ts +24 -0
  201. package/dist/editor/canvas/DropGridOverlay.d.ts.map +1 -0
  202. package/dist/editor/canvas/GridDndContext.d.ts +11 -0
  203. package/dist/editor/canvas/GridDndContext.d.ts.map +1 -0
  204. package/dist/editor/canvas/GridDndProvider.d.ts +17 -0
  205. package/dist/editor/canvas/GridDndProvider.d.ts.map +1 -0
  206. package/dist/editor/canvas/GridItemChild.d.ts +44 -0
  207. package/dist/editor/canvas/GridItemChild.d.ts.map +1 -0
  208. package/dist/editor/canvas/GridItemContainer.d.ts +49 -0
  209. package/dist/editor/canvas/GridItemContainer.d.ts.map +1 -0
  210. package/dist/editor/canvas/GridViewer.d.ts +114 -0
  211. package/dist/editor/canvas/GridViewer.d.ts.map +1 -0
  212. package/dist/editor/canvas/TwoColumnDesigner.d.ts +34 -0
  213. package/dist/editor/canvas/TwoColumnDesigner.d.ts.map +1 -0
  214. package/dist/editor/canvas/canvasStyles.d.ts +36 -0
  215. package/dist/editor/canvas/canvasStyles.d.ts.map +1 -0
  216. package/dist/editor/canvas/canvasTranslations.d.ts +64 -0
  217. package/dist/editor/canvas/canvasTranslations.d.ts.map +1 -0
  218. package/dist/editor/canvas/index.d.ts +5 -0
  219. package/dist/editor/canvas/index.d.ts.map +1 -0
  220. package/dist/editor/document/constants.d.ts +23 -0
  221. package/dist/editor/document/constants.d.ts.map +1 -0
  222. package/dist/editor/document/designerItemAction.d.ts +16 -0
  223. package/dist/editor/document/designerItemAction.d.ts.map +1 -0
  224. package/dist/editor/document/utils.d.ts +172 -0
  225. package/dist/editor/document/utils.d.ts.map +1 -0
  226. package/dist/editor/document/utils.test.d.ts +2 -0
  227. package/dist/editor/document/utils.test.d.ts.map +1 -0
  228. package/dist/editor/history/types.d.ts +25 -0
  229. package/dist/editor/history/types.d.ts.map +1 -0
  230. package/dist/editor/history/undoRedoManager.d.ts +3 -0
  231. package/dist/editor/history/undoRedoManager.d.ts.map +1 -0
  232. package/dist/editor/history/undoRedoManager.test.d.ts +2 -0
  233. package/dist/editor/history/undoRedoManager.test.d.ts.map +1 -0
  234. package/dist/editor/history/useUndoRedo.d.ts +11 -0
  235. package/dist/editor/history/useUndoRedo.d.ts.map +1 -0
  236. package/dist/editor/history/useUndoRedo.test.d.ts +2 -0
  237. package/dist/editor/history/useUndoRedo.test.d.ts.map +1 -0
  238. package/dist/editor/index.d.ts +16 -0
  239. package/dist/editor/index.d.ts.map +1 -0
  240. package/dist/editor/preview/PreviewArea.d.ts +31 -0
  241. package/dist/editor/preview/PreviewArea.d.ts.map +1 -0
  242. package/dist/editor/preview/constants.d.ts +9 -0
  243. package/dist/editor/preview/constants.d.ts.map +1 -0
  244. package/dist/editor/preview/index.d.ts +4 -0
  245. package/dist/editor/preview/index.d.ts.map +1 -0
  246. package/dist/editor/preview/previewStyles.d.ts +20 -0
  247. package/dist/editor/preview/previewStyles.d.ts.map +1 -0
  248. package/dist/editor/preview/previewTranslations.d.ts +18 -0
  249. package/dist/editor/preview/previewTranslations.d.ts.map +1 -0
  250. package/dist/editor/sidebar/DesignerNav.d.ts +28 -0
  251. package/dist/editor/sidebar/DesignerNav.d.ts.map +1 -0
  252. package/dist/editor/sidebar/form/ComponentEditorForm.d.ts +12 -0
  253. package/dist/editor/sidebar/form/ComponentEditorForm.d.ts.map +1 -0
  254. package/dist/editor/sidebar/form/FormFieldWrapper.d.ts +13 -0
  255. package/dist/editor/sidebar/form/FormFieldWrapper.d.ts.map +1 -0
  256. package/dist/editor/sidebar/form/fieldRendererUtils.d.ts +24 -0
  257. package/dist/editor/sidebar/form/fieldRendererUtils.d.ts.map +1 -0
  258. package/dist/editor/sidebar/form/fieldRenderers.d.ts +6 -0
  259. package/dist/editor/sidebar/form/fieldRenderers.d.ts.map +1 -0
  260. package/dist/editor/sidebar/form/formTranslations.d.ts +92 -0
  261. package/dist/editor/sidebar/form/formTranslations.d.ts.map +1 -0
  262. package/dist/editor/sidebar/form/formUtils.d.ts +7 -0
  263. package/dist/editor/sidebar/form/formUtils.d.ts.map +1 -0
  264. package/dist/editor/sidebar/form/index.d.ts +7 -0
  265. package/dist/editor/sidebar/form/index.d.ts.map +1 -0
  266. package/dist/editor/sidebar/form/knowledgeCheckEditor.d.ts +10 -0
  267. package/dist/editor/sidebar/form/knowledgeCheckEditor.d.ts.map +1 -0
  268. package/dist/editor/sidebar/form/renderers/AltTextFieldRenderer.d.ts +4 -0
  269. package/dist/editor/sidebar/form/renderers/AltTextFieldRenderer.d.ts.map +1 -0
  270. package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts +4 -0
  271. package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts.map +1 -0
  272. package/dist/editor/sidebar/form/renderers/ObjectArrayFieldRenderer.d.ts +4 -0
  273. package/dist/editor/sidebar/form/renderers/ObjectArrayFieldRenderer.d.ts.map +1 -0
  274. package/dist/editor/sidebar/form/uploaders/FileUploader.d.ts +24 -0
  275. package/dist/editor/sidebar/form/uploaders/FileUploader.d.ts.map +1 -0
  276. package/dist/editor/sidebar/form/uploaders/ImageUploader.d.ts +8 -0
  277. package/dist/editor/sidebar/form/uploaders/ImageUploader.d.ts.map +1 -0
  278. package/dist/editor/sidebar/form/uploaders/VideoUploader.d.ts +8 -0
  279. package/dist/editor/sidebar/form/uploaders/VideoUploader.d.ts.map +1 -0
  280. package/dist/editor/sidebar/panel/DesignerSideBar.d.ts +18 -0
  281. package/dist/editor/sidebar/panel/DesignerSideBar.d.ts.map +1 -0
  282. package/dist/editor/sidebar/panel/MobileToolOverlay.d.ts +13 -0
  283. package/dist/editor/sidebar/panel/MobileToolOverlay.d.ts.map +1 -0
  284. package/dist/editor/sidebar/panel/MobileToolbar.d.ts +10 -0
  285. package/dist/editor/sidebar/panel/MobileToolbar.d.ts.map +1 -0
  286. package/dist/editor/sidebar/panel/ToolBody.d.ts +11 -0
  287. package/dist/editor/sidebar/panel/ToolBody.d.ts.map +1 -0
  288. package/dist/editor/sidebar/panel/ToolContentContainer.d.ts +27 -0
  289. package/dist/editor/sidebar/panel/ToolContentContainer.d.ts.map +1 -0
  290. package/dist/editor/sidebar/panel/ToolHeader.d.ts +24 -0
  291. package/dist/editor/sidebar/panel/ToolHeader.d.ts.map +1 -0
  292. package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts +8 -0
  293. package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts.map +1 -0
  294. package/dist/editor/sidebar/panel/ToolIconButtons.d.ts +19 -0
  295. package/dist/editor/sidebar/panel/ToolIconButtons.d.ts.map +1 -0
  296. package/dist/editor/sidebar/panel/ToolWrapper.d.ts +16 -0
  297. package/dist/editor/sidebar/panel/ToolWrapper.d.ts.map +1 -0
  298. package/dist/editor/sidebar/panel/constants.d.ts +23 -0
  299. package/dist/editor/sidebar/panel/constants.d.ts.map +1 -0
  300. package/dist/editor/sidebar/panel/index.d.ts +5 -0
  301. package/dist/editor/sidebar/panel/index.d.ts.map +1 -0
  302. package/dist/editor/sidebar/panel/panelStyles.d.ts +29 -0
  303. package/dist/editor/sidebar/panel/panelStyles.d.ts.map +1 -0
  304. package/dist/editor/sidebar/panel/types.d.ts +80 -0
  305. package/dist/editor/sidebar/panel/types.d.ts.map +1 -0
  306. package/dist/editor/sidebar/panel/useFocusReturn.d.ts +8 -0
  307. package/dist/editor/sidebar/panel/useFocusReturn.d.ts.map +1 -0
  308. package/dist/editor/sidebar/sidebarTranslations.d.ts +53 -0
  309. package/dist/editor/sidebar/sidebarTranslations.d.ts.map +1 -0
  310. package/dist/editor/sidebar/tray/BlockTray.d.ts +30 -0
  311. package/dist/editor/sidebar/tray/BlockTray.d.ts.map +1 -0
  312. package/dist/editor/sidebar/tray/ComponentsTray.d.ts +4 -0
  313. package/dist/editor/sidebar/tray/ComponentsTray.d.ts.map +1 -0
  314. package/dist/editor/sidebar/tray/InteractiveTray.d.ts +4 -0
  315. package/dist/editor/sidebar/tray/InteractiveTray.d.ts.map +1 -0
  316. package/dist/editor/sidebar/tray/LayoutTray.d.ts +4 -0
  317. package/dist/editor/sidebar/tray/LayoutTray.d.ts.map +1 -0
  318. package/dist/editor/sidebar/tray/SharedTrayComponents.d.ts +64 -0
  319. package/dist/editor/sidebar/tray/SharedTrayComponents.d.ts.map +1 -0
  320. package/dist/editor/sidebar/tray/TemplatesPanel.d.ts +4 -0
  321. package/dist/editor/sidebar/tray/TemplatesPanel.d.ts.map +1 -0
  322. package/dist/editor/sidebar/tray/TrayDragLayer.d.ts +14 -0
  323. package/dist/editor/sidebar/tray/TrayDragLayer.d.ts.map +1 -0
  324. package/dist/editor/sidebar/tray/blockDefinitions.d.ts +11 -0
  325. package/dist/editor/sidebar/tray/blockDefinitions.d.ts.map +1 -0
  326. package/dist/editor/sidebar/tray/index.d.ts +9 -0
  327. package/dist/editor/sidebar/tray/index.d.ts.map +1 -0
  328. package/dist/editor/sidebar/tray/trayStyles.d.ts +20 -0
  329. package/dist/editor/sidebar/tray/trayStyles.d.ts.map +1 -0
  330. package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts +51 -0
  331. package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts.map +1 -0
  332. package/dist/editor/state/applyTemplatePatch.d.ts +46 -0
  333. package/dist/editor/state/applyTemplatePatch.d.ts.map +1 -0
  334. package/dist/editor/state/applyTemplatePatch.test.d.ts +2 -0
  335. package/dist/editor/state/applyTemplatePatch.test.d.ts.map +1 -0
  336. package/dist/editor/state/useBlockEditorState.d.ts +57 -0
  337. package/dist/editor/state/useBlockEditorState.d.ts.map +1 -0
  338. package/dist/editor/state/useBlockEditorState.test.d.ts +2 -0
  339. package/dist/editor/state/useBlockEditorState.test.d.ts.map +1 -0
  340. package/dist/editor/validation/templateDataValidator.d.ts +48 -0
  341. package/dist/editor/validation/templateDataValidator.d.ts.map +1 -0
  342. package/dist/editor/validation/templateDataValidator.test.d.ts +2 -0
  343. package/dist/editor/validation/templateDataValidator.test.d.ts.map +1 -0
  344. package/dist/index.d.ts +16 -2
  345. package/dist/index.d.ts.map +1 -1
  346. package/dist/index.js +15561 -767
  347. package/dist/registry/blockCatalogue.d.ts +108 -0
  348. package/dist/registry/blockCatalogue.d.ts.map +1 -0
  349. package/dist/registry/blockRegistry.d.ts +75 -0
  350. package/dist/registry/blockRegistry.d.ts.map +1 -0
  351. package/dist/registry/defineBlock.d.ts +60 -0
  352. package/dist/registry/defineBlock.d.ts.map +1 -0
  353. package/dist/registry/getMergedProps.d.ts +18 -0
  354. package/dist/registry/getMergedProps.d.ts.map +1 -0
  355. package/dist/registry/index.d.ts +7 -0
  356. package/dist/registry/index.d.ts.map +1 -0
  357. package/dist/registry/registryTypes.test.d.ts +1 -0
  358. package/dist/registry/registryTypes.test.d.ts.map +1 -0
  359. package/dist/registry/resolveBlockEntry.d.ts +16 -0
  360. package/dist/registry/resolveBlockEntry.d.ts.map +1 -0
  361. package/dist/registry/templateTypes.d.ts +61 -0
  362. package/dist/registry/templateTypes.d.ts.map +1 -0
  363. package/dist/schema/index.d.ts +1 -1
  364. package/dist/schema/index.d.ts.map +1 -1
  365. package/dist/schema/zodExtensions.d.ts +17 -0
  366. package/dist/schema/zodExtensions.d.ts.map +1 -1
  367. package/dist/utils/shuffleCards.d.ts +6 -0
  368. package/dist/utils/shuffleCards.d.ts.map +1 -0
  369. package/dist/utils/useMediaQuery.d.ts +7 -0
  370. package/dist/utils/useMediaQuery.d.ts.map +1 -0
  371. package/dist/utils/useMotionEnabled.d.ts +11 -0
  372. package/dist/utils/useMotionEnabled.d.ts.map +1 -0
  373. package/dist/viewer/Viewer.d.ts +27 -0
  374. package/dist/viewer/Viewer.d.ts.map +1 -0
  375. package/dist/viewer/index.d.ts +2 -0
  376. package/dist/viewer/index.d.ts.map +1 -0
  377. package/locales/en.json +169 -1
  378. package/package.json +72 -24
  379. package/dist/contexts/TranslationsContext.d.ts +0 -70
  380. package/dist/contexts/TranslationsContext.d.ts.map +0 -1
package/locales/en.json CHANGED
@@ -17,5 +17,173 @@
17
17
  "videoBlockTitle": "Video",
18
18
  "accordionPlaceholder": "Add accordion...",
19
19
  "accordionItemPlaceholderTitle": "Accordion %{index}",
20
- "accordionItemPlaceholderContent": "Your content here..."
20
+ "accordionItemPlaceholderContent": "Your content here...",
21
+ "tabsBlockItemPlaceholderTitle": "Tab %{index}",
22
+ "tabsBlockItemPlaceholderContent": "Your content here...",
23
+ "flashCardsTitle": "Flashcards",
24
+ "flashCardsPlaceholder": "Add flashcards...",
25
+ "flashCardsFrontLabel": "Front",
26
+ "flashCardsBackLabel": "Back",
27
+ "flashCardsFlipHint": "Click to flip",
28
+ "flashCardsCounter": "%{current} of %{total}",
29
+ "flashCardsCardAnnouncement": "Card %{current} of %{total}: %{question}",
30
+ "flashCardsPreviousCard": "Previous card",
31
+ "flashCardsNextCard": "Next card",
32
+ "flashCardsFrontAriaLabel": "Front: %{question}. Click to see answer.",
33
+ "flashCardsBackAriaLabel": "Back: %{answer}. Click to see question.",
34
+ "mixAndMatchTitle": "Mix and match",
35
+ "mixAndMatchPlaceholder": "Add mix and match...",
36
+ "mixAndMatchInstructions": "Click a card from the left and then right to pair.",
37
+ "mixAndMatchCompleteTitle": "Nice work!",
38
+ "mixAndMatchCompleteSubtitle": "You matched all the cards.",
39
+ "mixAndMatchPracticeAgain": "Practice again",
40
+ "mixAndMatchReset": "Reset",
41
+ "mixAndMatchCorrect": "Correct match!",
42
+ "mixAndMatchIncorrect": "Incorrect match, try again.",
43
+ "mixAndMatchCloseFeedback": "Close match feedback message",
44
+ "mixAndMatchTermAriaLabel": "Term: %{text}",
45
+ "mixAndMatchDefinitionAriaLabel": "Definition: %{text}",
46
+ "mixAndMatchProgress": "%{matched} of %{total} matched",
47
+ "mixAndMatchProgressShort": "%{matched}/%{total}",
48
+ "knowledgeCheckTitle": "Knowledge check",
49
+ "knowledgeCheckPlaceholder": "Add knowledge check...",
50
+ "knowledgeCheckQuestionPlaceholder": "Your question here",
51
+ "knowledgeCheckAnswerPlaceholder": "Answer %{index}",
52
+ "knowledgeCheckSelectOne": "Select one answer.",
53
+ "knowledgeCheckSelectAll": "Select all that apply.",
54
+ "knowledgeCheckCheckAnswer": "Check answer",
55
+ "knowledgeCheckTryAgain": "Try again",
56
+ "knowledgeCheckPracticeAgain": "Practice again",
57
+ "knowledgeCheckCorrect": "Nice work! You got the correct answer!",
58
+ "knowledgeCheckIncorrect": "Oops, that's incorrect.",
59
+ "knowledgeCheckAnswerCorrectLabel": "Correct",
60
+ "knowledgeCheckAnswerIncorrectLabel": "Incorrect",
61
+ "widgetBlockPlaceholder": "Add widget...",
62
+ "widgetBlockLoading": "Loading widget...",
63
+ "widgetBlockError": "Failed to load widget",
64
+ "item": "item",
65
+ "pickedUp": "Picked up %{label}. Use arrow keys to move, Space to drop, Escape to cancel.",
66
+ "notOverDropArea": "%{label} is not over a drop area.",
67
+ "leftColumn": "left column",
68
+ "rightColumn": "right column",
69
+ "isOverColumn": "%{label} is over %{columnName}.",
70
+ "isOver": "%{label} is over %{overLabel}.",
71
+ "wasDropped": "%{label} was dropped.",
72
+ "wasDroppedIntoColumn": "%{label} was dropped into %{columnName}.",
73
+ "dragCancelled": "Dragging was cancelled. %{label} was returned to its original position.",
74
+ "dragInstructions": "To pick up this component, press Space or Enter. Use arrow keys to move it up, down, or between columns. Press Space or Enter to drop, or Escape to cancel.",
75
+ "componentActions": "Component actions",
76
+ "dragToReorder": "Drag to reorder",
77
+ "dragAndDrop": "Drag and Drop",
78
+ "duplicateComponent": "Duplicate %{component}",
79
+ "duplicate": "Duplicate",
80
+ "deleteComponent": "Delete %{component}",
81
+ "delete": "Delete",
82
+ "deleteConfirmation": "Are you sure you want to delete this?",
83
+ "cancel": "Cancel",
84
+ "editComponent": "Edit %{component} component",
85
+ "componentGroup": "%{component} component",
86
+ "leftColumnLabel": "Left column",
87
+ "rightColumnLabel": "Right column",
88
+ "dropBlocksHere": "Drop blocks here",
89
+ "templatesComingSoon": "Coming soon: ready-made templates from your organization.",
90
+ "previous": "Previous",
91
+ "next": "Next",
92
+ "itemSubtitle": "%{itemName} %{number}",
93
+ "defaultItemName": "Item",
94
+ "dragToReorderItem": "Drag to reorder %{item}",
95
+ "editItem": "Edit %{item}",
96
+ "removeItem": "Remove %{item}",
97
+ "manageLabel": "Manage %{pluralLabel}",
98
+ "countLabel": "%{count} %{pluralLabel}",
99
+ "noItemsYet": "No items yet",
100
+ "addItem": "Add %{componentType}",
101
+ "answerTrue": "True",
102
+ "answerFalse": "False",
103
+ "optionLabel": "Option %{option}",
104
+ "removeOption": "Remove option %{option}",
105
+ "addOption": "Add option",
106
+ "arrayItemLabel": "Item %{index}",
107
+ "remove": "Remove",
108
+ "addPrimitiveItem": "Add item",
109
+ "dragAndDropOrBrowse": "Drag and drop or click to browse",
110
+ "chooseFile": "Choose file",
111
+ "loadingPreview": "Loading preview...",
112
+ "uploadFailed": "Upload failed",
113
+ "uploadImage": "Upload image",
114
+ "imageAcceptedTypes": "Accepted file types: PNG, JPG, GIF, WebP",
115
+ "imageMaxSize": "Max file size: 5MB",
116
+ "replaceImage": "Replace image",
117
+ "uploadingImage": "Uploading image...",
118
+ "imageSizeError": "File size must be less than 5MB",
119
+ "uploadVideo": "Upload video",
120
+ "videoAcceptedTypes": "Accepted file types: MP4, WebM, MOV, AVI",
121
+ "videoMaxSize": "Max file size: 500MB",
122
+ "replaceVideo": "Replace video",
123
+ "uploadingVideo": "Uploading video...",
124
+ "videoSizeError": "File size must be less than 500MB",
125
+ "videoSource": "Video source",
126
+ "sourceFile": "File",
127
+ "sourceLink": "Link",
128
+ "videoLink": "Video link",
129
+ "videoLinkPlaceholder": "https://...",
130
+ "loading": "Loading...",
131
+ "collapse": "Collapse",
132
+ "expand": "Expand",
133
+ "minimize": "Minimize",
134
+ "expandPanel": "Expand panel",
135
+ "minimizePanel": "Minimize panel",
136
+ "back": "Back",
137
+ "closePanel": "Close %{panelName}",
138
+ "resizeToolPanel": "Resize tool panel",
139
+ "basicBlocksTool": "Basic blocks",
140
+ "interactiveBlocksTool": "Interactive blocks",
141
+ "layoutBlocksTool": "Layout blocks",
142
+ "templatesTool": "Templates",
143
+ "basicBlocksIntro": "Format content with these basic blocks.",
144
+ "layoutBlocksIntro": "Organize your content into columns.",
145
+ "interactiveBlocksIntro": "Engage learners with interactive non-scored activities.",
146
+ "addBlock": "Add %{name}",
147
+ "skipToSelectedComponent": "Skip to selected component",
148
+ "desktop": "Desktop",
149
+ "mobile": "Mobile",
150
+ "viewportLabel": "Preview viewport",
151
+ "aiAssistFor": "AI assist for %{componentType}",
152
+ "aiActions": "AI Actions",
153
+ "backToMenu": "Back to menu",
154
+ "regenerateWithPrompt": "Regenerate with prompt",
155
+ "changeTone": "Change tone",
156
+ "changeLength": "Change length",
157
+ "changeReadingLevel": "Change reading level",
158
+ "toneMoreFormal": "More formal",
159
+ "toneMoreFun": "More fun",
160
+ "toneMoreCasual": "More casual",
161
+ "toneMoreTechnical": "More technical",
162
+ "lengthShorter": "Shorter",
163
+ "lengthLonger": "Longer",
164
+ "readingBeginning": "Beginning reader (0L - 760L)",
165
+ "readingNovice": "Novice reader (635L - 1160L)",
166
+ "readingIntermediate": "Intermediate reader (925L - 1295L)",
167
+ "readingAdvanced": "Advanced reader (1040L - 1440L)",
168
+ "promptPlaceholder": "What would you like to change?",
169
+ "previewFirst": "Preview first",
170
+ "send": "Send",
171
+ "thinking": "Thinking…",
172
+ "stop": "Stop",
173
+ "generationFailed": "Failed to generate. Please try again.",
174
+ "previewBlock": "Preview block",
175
+ "compareLabel": "Compare versions",
176
+ "both": "Both",
177
+ "before": "Before",
178
+ "after": "After",
179
+ "previewCancel": "Cancel",
180
+ "acceptAndReplace": "Accept and replace",
181
+ "refinementPlaceholder": "What changes would you like to make?",
182
+ "regenerate": "Regenerate",
183
+ "regenerating": "Regenerating...",
184
+ "generateAltText": "Generate alt text",
185
+ "generating": "Generating...",
186
+ "failedToLoadImage": "Failed to load image",
187
+ "failedToGenerate": "Failed to generate alt text",
188
+ "noDescription": "No description was returned"
21
189
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/platform-block-content-editor",
3
- "version": "0.3.1",
3
+ "version": "1.1.0",
4
+ "description": "Host-agnostic block content editor for Canvas activities — the blocks, the read-path viewer, and the write-path editor, all on native InstUI.",
4
5
  "type": "module",
5
6
  "main": "./dist/index.js",
6
7
  "module": "./dist/index.js",
@@ -19,42 +20,77 @@
19
20
  "publishConfig": {
20
21
  "access": "public"
21
22
  },
22
- "scripts": {
23
- "build": "vite build",
24
- "dev": "vite build --watch",
25
- "test": "vitest run",
26
- "test:watch": "vitest",
27
- "test:coverage": "vitest run --coverage",
28
- "lint": "oxlint -c ../../oxlint.json && ast-grep scan . --report-style=short",
29
- "lint:fix": "oxlint -c ../../oxlint.json --fix && biome format --write .",
30
- "type-check": "tsc -p tsconfig.check.json",
31
- "pack:tarball": "pnpm build && pnpm pack"
32
- },
33
23
  "peerDependencies": {
24
+ "@instructure/emotion": "^11.0.0",
25
+ "@instructure/ui-a11y-content": "^11.0.0",
26
+ "@instructure/ui-alerts": "^11.0.0",
27
+ "@instructure/ui-buttons": "^11.0.0",
28
+ "@instructure/ui-checkbox": "^11.0.0",
29
+ "@instructure/ui-file-drop": "^11.0.0",
34
30
  "@instructure/ui-flex": "^11.0.0",
31
+ "@instructure/ui-form-field": "^11.0.0",
35
32
  "@instructure/ui-heading": "^11.0.0",
36
33
  "@instructure/ui-icons": "^11.0.0",
37
34
  "@instructure/ui-img": "^11.0.0",
35
+ "@instructure/ui-modal": "^11.0.0",
36
+ "@instructure/ui-number-input": "^11.0.0",
37
+ "@instructure/ui-popover": "^11.0.0",
38
+ "@instructure/ui-progress": "^11.0.0",
39
+ "@instructure/ui-radio-input": "^11.0.0",
40
+ "@instructure/ui-range-input": "^11.0.0",
41
+ "@instructure/ui-simple-select": "^11.0.0",
42
+ "@instructure/ui-source-code-editor": "^11.0.0",
38
43
  "@instructure/ui-spinner": "^11.0.0",
39
44
  "@instructure/ui-text": "^11.0.0",
45
+ "@instructure/ui-text-area": "^11.0.0",
46
+ "@instructure/ui-text-input": "^11.0.0",
40
47
  "@instructure/ui-toggle-details": "^11.0.0",
48
+ "@instructure/ui-tooltip": "^11.0.0",
41
49
  "@instructure/ui-view": "^11.0.0",
42
- "react": "^18.0.0",
43
- "react-dom": "^18.0.0",
50
+ "react": "^18.0.0 || ^19.0.0",
51
+ "react-dom": "^18.0.0 || ^19.0.0",
44
52
  "zod": "^3.23.8"
45
53
  },
46
54
  "dependencies": {
47
- "@instructure/platform-sanitize": "workspace:*"
55
+ "@dnd-kit/core": "^6.3.1",
56
+ "@dnd-kit/modifiers": "^9.0.0",
57
+ "@dnd-kit/sortable": "^10.0.0",
58
+ "@dnd-kit/utilities": "^3.2.2",
59
+ "@hookform/resolvers": "^5.2.2",
60
+ "lodash": "^4.17.21",
61
+ "react-hook-form": "^7.68.0",
62
+ "uuid": "^11.1.1",
63
+ "@instructure/platform-sanitize": "^0.7.0"
48
64
  },
49
65
  "devDependencies": {
50
- "@instructure/ui-flex": "11.6.0",
51
- "@instructure/ui-heading": "11.6.0",
52
- "@instructure/ui-icons": "11.6.0",
53
- "@instructure/ui-img": "11.6.0",
54
- "@instructure/ui-spinner": "11.6.0",
55
- "@instructure/ui-text": "11.6.0",
56
- "@instructure/ui-toggle-details": "11.6.0",
57
- "@instructure/ui-view": "11.6.0",
66
+ "@instructure/emotion": "11.7.4",
67
+ "@types/lodash": "^4.17.24",
68
+ "@instructure/ui-a11y-content": "11.7.4",
69
+ "@instructure/ui-alerts": "11.7.4",
70
+ "@instructure/ui-buttons": "11.7.4",
71
+ "@instructure/ui-checkbox": "11.7.4",
72
+ "@instructure/ui-file-drop": "11.7.4",
73
+ "@instructure/ui-flex": "11.7.4",
74
+ "@instructure/ui-form-field": "11.7.4",
75
+ "@instructure/ui-heading": "11.7.4",
76
+ "@instructure/ui-icons": "11.7.4",
77
+ "@instructure/ui-img": "11.7.4",
78
+ "@instructure/ui-modal": "11.7.4",
79
+ "@instructure/ui-number-input": "11.7.4",
80
+ "@instructure/ui-popover": "11.7.4",
81
+ "@instructure/ui-progress": "11.7.4",
82
+ "@instructure/ui-radio-input": "11.7.4",
83
+ "@instructure/ui-range-input": "11.7.4",
84
+ "@instructure/ui-simple-select": "11.7.4",
85
+ "@instructure/ui-source-code-editor": "11.7.4",
86
+ "@instructure/ui-spinner": "11.7.4",
87
+ "@instructure/ui-text": "11.7.4",
88
+ "@instructure/ui-text-area": "11.7.4",
89
+ "@instructure/ui-text-input": "11.7.4",
90
+ "@instructure/ui-themes": "11.7.4",
91
+ "@instructure/ui-toggle-details": "11.7.4",
92
+ "@instructure/ui-tooltip": "11.7.4",
93
+ "@instructure/ui-view": "11.7.4",
58
94
  "@storybook/react": "^10.0.8",
59
95
  "@testing-library/jest-dom": "^6.9.1",
60
96
  "@testing-library/react": "^16.3.0",
@@ -69,5 +105,17 @@
69
105
  "vite-plugin-dts": "^4.0.0",
70
106
  "vitest": "^4.0.0",
71
107
  "zod": "^3.23.8"
108
+ },
109
+ "scripts": {
110
+ "build": "vite build",
111
+ "dev": "vite build --watch",
112
+ "test": "vitest run",
113
+ "test:watch": "vitest",
114
+ "test:coverage": "vitest run --coverage",
115
+ "lint": "oxlint -c ../../oxlint.json && ast-grep scan . --report-style=short",
116
+ "lint:fix": "oxlint -c ../../oxlint.json --fix && biome format --write .",
117
+ "type-check": "tsc -p tsconfig.check.json",
118
+ "check:consumer": "pnpm build && tsc -p consumer/tsconfig.json",
119
+ "pack:tarball": "pnpm build && pnpm pack"
72
120
  }
73
- }
121
+ }
@@ -1,70 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Translate function for dynamic interpolation. The consuming app provides this
4
- * to handle i18n with variable substitution.
5
- *
6
- * `key` is a key of `BlockContentEditorTranslations`, not an English source string —
7
- * the host resolves it against its own translations map, then substitutes `%{name}`
8
- * placeholders in the resulting value.
9
- *
10
- * Example: with `accordionItemPlaceholderTitle: 'Accordion %{index}'`,
11
- * translate('accordionItemPlaceholderTitle', { index: 2 }) => 'Accordion 2'
12
- */
13
- export type TranslateFunction = (key: string, options?: Record<string, unknown>) => string;
14
- /**
15
- * Translation keys used by the block content editor. The consuming app is
16
- * responsible for providing translated strings (see `locales/en.json`).
17
- */
18
- export interface BlockContentEditorTranslations {
19
- /** Placeholder shown in the designer when a Text block has no content. */
20
- placeholderContent: string;
21
- /** Placeholder heading shown in the designer when a Banner block is empty. */
22
- bannerPlaceholderTitle: string;
23
- /** Placeholder eyebrow shown in the designer when a Banner block is empty. */
24
- bannerPlaceholderSubtitle: string;
25
- /** Placeholder quote shown in the designer when a Quote block has no content. */
26
- quotePlaceholderContent: string;
27
- /** Placeholder author shown in the designer when a Quote block has no content. */
28
- quotePlaceholderAuthor: string;
29
- /** Placeholder code shown in the designer when a CodeBlock has no content. */
30
- codeBlockPlaceholder: string;
31
- /** Placeholder shown in the designer when an ImageBlock has no image. */
32
- imageBlockPlaceholder: string;
33
- /** Announced while an ImageBlock's image is loading. */
34
- imageBlockLoading: string;
35
- /** Shown when an ImageBlock's image fails to load. */
36
- imageBlockError: string;
37
- /** Placeholder shown when a VideoBlock has no video (designer / empty link). */
38
- videoBlockPlaceholder: string;
39
- /** Announced while a VideoBlock's file is loading. */
40
- videoBlockLoading: string;
41
- /** Shown when a VideoBlock's video fails to load. */
42
- videoBlockError: string;
43
- /** Shown when a VideoBlock's link is not a supported provider. */
44
- videoBlockUnsupportedProvider: string;
45
- /** Heading shown while a VideoBlock's media is still processing. */
46
- videoBlockProcessing: string;
47
- /** Sub-message shown while a VideoBlock's media is still processing. */
48
- videoBlockProcessingSubtitle: string;
49
- /** Fallback iframe title when a VideoBlock has no alt text. */
50
- videoBlockTitle: string;
51
- /** Placeholder shown in the designer when an Accordion has no sections at all. */
52
- accordionPlaceholder: string;
53
- /** Placeholder title for an empty Accordion section; interpolates `%{index}` via `translate`. */
54
- accordionItemPlaceholderTitle: string;
55
- /** Placeholder body shown in the designer when an Accordion section has no content. */
56
- accordionItemPlaceholderContent: string;
57
- [key: string]: string;
58
- }
59
- export interface BlockContentEditorTranslationsContext {
60
- translations: BlockContentEditorTranslations;
61
- translate: TranslateFunction;
62
- }
63
- export interface TranslationsProviderProps {
64
- translations: BlockContentEditorTranslations;
65
- translate: TranslateFunction;
66
- children: ReactNode;
67
- }
68
- export declare function TranslationsProvider({ translations, translate, children, }: TranslationsProviderProps): import("react/jsx-runtime").JSX.Element;
69
- export declare function useTranslations(): BlockContentEditorTranslationsContext;
70
- //# sourceMappingURL=TranslationsContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TranslationsContext.d.ts","sourceRoot":"","sources":["../../src/contexts/TranslationsContext.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;AAE1F;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,0EAA0E;IAC1E,kBAAkB,EAAE,MAAM,CAAA;IAC1B,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,yBAAyB,EAAE,MAAM,CAAA;IACjC,iFAAiF;IACjF,uBAAuB,EAAE,MAAM,CAAA;IAC/B,kFAAkF;IAClF,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,oBAAoB,EAAE,MAAM,CAAA;IAC5B,yEAAyE;IACzE,qBAAqB,EAAE,MAAM,CAAA;IAC7B,wDAAwD;IACxD,iBAAiB,EAAE,MAAM,CAAA;IACzB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAA;IACvB,gFAAgF;IAChF,qBAAqB,EAAE,MAAM,CAAA;IAC7B,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAA;IACzB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAA;IACvB,kEAAkE;IAClE,6BAA6B,EAAE,MAAM,CAAA;IACrC,oEAAoE;IACpE,oBAAoB,EAAE,MAAM,CAAA;IAC5B,wEAAwE;IACxE,4BAA4B,EAAE,MAAM,CAAA;IACpC,+DAA+D;IAC/D,eAAe,EAAE,MAAM,CAAA;IACvB,kFAAkF;IAClF,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iGAAiG;IACjG,6BAA6B,EAAE,MAAM,CAAA;IACrC,uFAAuF;IACvF,+BAA+B,EAAE,MAAM,CAAA;IAEvC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,qCAAqC;IACpD,YAAY,EAAE,8BAA8B,CAAA;IAC5C,SAAS,EAAE,iBAAiB,CAAA;CAC7B;AAMD,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,8BAA8B,CAAA;IAC5C,SAAS,EAAE,iBAAiB,CAAA;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,SAAS,EACT,QAAQ,GACT,EAAE,yBAAyB,2CAG3B;AAED,wBAAgB,eAAe,IAAI,qCAAqC,CAMvE"}