@instructure/platform-block-content-editor 0.3.1 → 1.0.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 (201) hide show
  1. package/dist/components/MediaPlaceholder/MediaPlaceholder.d.ts.map +1 -1
  2. package/dist/components/RichText/RichText.d.ts +20 -0
  3. package/dist/components/RichText/RichText.d.ts.map +1 -0
  4. package/dist/components/RichText/index.d.ts +2 -0
  5. package/dist/components/RichText/index.d.ts.map +1 -0
  6. package/dist/components/blocks/Accordion/Accordion.d.ts.map +1 -1
  7. package/dist/components/blocks/Accordion/accordionTranslations.d.ts +15 -0
  8. package/dist/components/blocks/Accordion/accordionTranslations.d.ts.map +1 -0
  9. package/dist/components/blocks/Accordion/createAccordionBlock.d.ts +22 -0
  10. package/dist/components/blocks/Accordion/createAccordionBlock.d.ts.map +1 -0
  11. package/dist/components/blocks/Accordion/index.d.ts +2 -0
  12. package/dist/components/blocks/Accordion/index.d.ts.map +1 -1
  13. package/dist/components/blocks/Banner/Banner.d.ts.map +1 -1
  14. package/dist/components/blocks/Banner/bannerPropsSchema.d.ts +0 -2
  15. package/dist/components/blocks/Banner/bannerPropsSchema.d.ts.map +1 -1
  16. package/dist/components/blocks/Banner/bannerTranslations.d.ts +13 -0
  17. package/dist/components/blocks/Banner/bannerTranslations.d.ts.map +1 -0
  18. package/dist/components/blocks/Banner/createBannerBlock.d.ts +14 -0
  19. package/dist/components/blocks/Banner/createBannerBlock.d.ts.map +1 -0
  20. package/dist/components/blocks/Banner/getBannerViewProps.d.ts +2 -3
  21. package/dist/components/blocks/Banner/getBannerViewProps.d.ts.map +1 -1
  22. package/dist/components/blocks/Banner/index.d.ts +2 -0
  23. package/dist/components/blocks/Banner/index.d.ts.map +1 -1
  24. package/dist/components/blocks/CodeBlock/CodeBlock.d.ts.map +1 -1
  25. package/dist/components/blocks/CodeBlock/codeBlockPropsSchema.d.ts +2 -2
  26. package/dist/components/blocks/CodeBlock/codeBlockTranslations.d.ts +11 -0
  27. package/dist/components/blocks/CodeBlock/codeBlockTranslations.d.ts.map +1 -0
  28. package/dist/components/blocks/CodeBlock/createCodeBlock.d.ts +12 -0
  29. package/dist/components/blocks/CodeBlock/createCodeBlock.d.ts.map +1 -0
  30. package/dist/components/blocks/CodeBlock/index.d.ts +2 -0
  31. package/dist/components/blocks/CodeBlock/index.d.ts.map +1 -1
  32. package/dist/components/blocks/FlashCards/FlashCard.d.ts +21 -0
  33. package/dist/components/blocks/FlashCards/FlashCard.d.ts.map +1 -0
  34. package/dist/components/blocks/FlashCards/FlashCards.d.ts +4 -0
  35. package/dist/components/blocks/FlashCards/FlashCards.d.ts.map +1 -0
  36. package/dist/components/blocks/FlashCards/createFlashCardsBlock.d.ts +15 -0
  37. package/dist/components/blocks/FlashCards/createFlashCardsBlock.d.ts.map +1 -0
  38. package/dist/components/blocks/FlashCards/flashCardsPropsSchema.d.ts +60 -0
  39. package/dist/components/blocks/FlashCards/flashCardsPropsSchema.d.ts.map +1 -0
  40. package/dist/components/blocks/FlashCards/flashCardsStyles.d.ts +43 -0
  41. package/dist/components/blocks/FlashCards/flashCardsStyles.d.ts.map +1 -0
  42. package/dist/components/blocks/FlashCards/flashCardsTranslations.d.ts +34 -0
  43. package/dist/components/blocks/FlashCards/flashCardsTranslations.d.ts.map +1 -0
  44. package/dist/components/blocks/FlashCards/getFlashCardsViewProps.d.ts +23 -0
  45. package/dist/components/blocks/FlashCards/getFlashCardsViewProps.d.ts.map +1 -0
  46. package/dist/components/blocks/FlashCards/index.d.ts +5 -0
  47. package/dist/components/blocks/FlashCards/index.d.ts.map +1 -0
  48. package/dist/components/blocks/ImageBlock/ImageBlock.d.ts.map +1 -1
  49. package/dist/components/blocks/ImageBlock/createImageBlock.d.ts +15 -0
  50. package/dist/components/blocks/ImageBlock/createImageBlock.d.ts.map +1 -0
  51. package/dist/components/blocks/ImageBlock/getImageBlockViewProps.d.ts +3 -1
  52. package/dist/components/blocks/ImageBlock/getImageBlockViewProps.d.ts.map +1 -1
  53. package/dist/components/blocks/ImageBlock/imageBlockTranslations.d.ts +15 -0
  54. package/dist/components/blocks/ImageBlock/imageBlockTranslations.d.ts.map +1 -0
  55. package/dist/components/blocks/ImageBlock/index.d.ts +2 -0
  56. package/dist/components/blocks/ImageBlock/index.d.ts.map +1 -1
  57. package/dist/components/blocks/KnowledgeCheck/AnswerCard.d.ts +19 -0
  58. package/dist/components/blocks/KnowledgeCheck/AnswerCard.d.ts.map +1 -0
  59. package/dist/components/blocks/KnowledgeCheck/KnowledgeCheck.d.ts +4 -0
  60. package/dist/components/blocks/KnowledgeCheck/KnowledgeCheck.d.ts.map +1 -0
  61. package/dist/components/blocks/KnowledgeCheck/createKnowledgeCheckBlock.d.ts +18 -0
  62. package/dist/components/blocks/KnowledgeCheck/createKnowledgeCheckBlock.d.ts.map +1 -0
  63. package/dist/components/blocks/KnowledgeCheck/getKnowledgeCheckViewProps.d.ts +34 -0
  64. package/dist/components/blocks/KnowledgeCheck/getKnowledgeCheckViewProps.d.ts.map +1 -0
  65. package/dist/components/blocks/KnowledgeCheck/index.d.ts +5 -0
  66. package/dist/components/blocks/KnowledgeCheck/index.d.ts.map +1 -0
  67. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckPropsSchema.d.ts +87 -0
  68. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckPropsSchema.d.ts.map +1 -0
  69. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckTranslations.d.ts +35 -0
  70. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckTranslations.d.ts.map +1 -0
  71. package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts +3 -0
  72. package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts.map +1 -0
  73. package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts +22 -0
  74. package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts.map +1 -0
  75. package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts +32 -0
  76. package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts.map +1 -0
  77. package/dist/components/blocks/LayoutContainer/index.d.ts +5 -0
  78. package/dist/components/blocks/LayoutContainer/index.d.ts.map +1 -0
  79. package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts +118 -0
  80. package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts.map +1 -0
  81. package/dist/components/blocks/MixAndMatch/MatchCard.d.ts +21 -0
  82. package/dist/components/blocks/MixAndMatch/MatchCard.d.ts.map +1 -0
  83. package/dist/components/blocks/MixAndMatch/MixAndMatch.d.ts +4 -0
  84. package/dist/components/blocks/MixAndMatch/MixAndMatch.d.ts.map +1 -0
  85. package/dist/components/blocks/MixAndMatch/createMixAndMatchBlock.d.ts +15 -0
  86. package/dist/components/blocks/MixAndMatch/createMixAndMatchBlock.d.ts.map +1 -0
  87. package/dist/components/blocks/MixAndMatch/getMixAndMatchViewProps.d.ts +43 -0
  88. package/dist/components/blocks/MixAndMatch/getMixAndMatchViewProps.d.ts.map +1 -0
  89. package/dist/components/blocks/MixAndMatch/index.d.ts +5 -0
  90. package/dist/components/blocks/MixAndMatch/index.d.ts.map +1 -0
  91. package/dist/components/blocks/MixAndMatch/mixAndMatchPropsSchema.d.ts +74 -0
  92. package/dist/components/blocks/MixAndMatch/mixAndMatchPropsSchema.d.ts.map +1 -0
  93. package/dist/components/blocks/MixAndMatch/mixAndMatchStyles.d.ts +21 -0
  94. package/dist/components/blocks/MixAndMatch/mixAndMatchStyles.d.ts.map +1 -0
  95. package/dist/components/blocks/MixAndMatch/mixAndMatchTranslations.d.ts +37 -0
  96. package/dist/components/blocks/MixAndMatch/mixAndMatchTranslations.d.ts.map +1 -0
  97. package/dist/components/blocks/Quote/Quote.d.ts.map +1 -1
  98. package/dist/components/blocks/Quote/createQuoteBlock.d.ts +12 -0
  99. package/dist/components/blocks/Quote/createQuoteBlock.d.ts.map +1 -0
  100. package/dist/components/blocks/Quote/index.d.ts +2 -0
  101. package/dist/components/blocks/Quote/index.d.ts.map +1 -1
  102. package/dist/components/blocks/Quote/quoteTranslations.d.ts +13 -0
  103. package/dist/components/blocks/Quote/quoteTranslations.d.ts.map +1 -0
  104. package/dist/components/blocks/TabsBlock/TabsBlock.d.ts +4 -0
  105. package/dist/components/blocks/TabsBlock/TabsBlock.d.ts.map +1 -0
  106. package/dist/components/blocks/TabsBlock/createTabsBlock.d.ts +25 -0
  107. package/dist/components/blocks/TabsBlock/createTabsBlock.d.ts.map +1 -0
  108. package/dist/components/blocks/TabsBlock/getTabsBlockViewProps.d.ts +55 -0
  109. package/dist/components/blocks/TabsBlock/getTabsBlockViewProps.d.ts.map +1 -0
  110. package/dist/components/blocks/TabsBlock/index.d.ts +6 -0
  111. package/dist/components/blocks/TabsBlock/index.d.ts.map +1 -0
  112. package/dist/components/blocks/TabsBlock/tabsBlockPropsSchema.d.ts +127 -0
  113. package/dist/components/blocks/TabsBlock/tabsBlockPropsSchema.d.ts.map +1 -0
  114. package/dist/components/blocks/TabsBlock/tabsBlockTranslations.d.ts +13 -0
  115. package/dist/components/blocks/TabsBlock/tabsBlockTranslations.d.ts.map +1 -0
  116. package/dist/components/blocks/TabsBlock/useRovingTabIndex.d.ts +20 -0
  117. package/dist/components/blocks/TabsBlock/useRovingTabIndex.d.ts.map +1 -0
  118. package/dist/components/blocks/Text/Text.d.ts.map +1 -1
  119. package/dist/components/blocks/Text/createTextBlock.d.ts +12 -0
  120. package/dist/components/blocks/Text/createTextBlock.d.ts.map +1 -0
  121. package/dist/components/blocks/Text/index.d.ts +2 -0
  122. package/dist/components/blocks/Text/index.d.ts.map +1 -1
  123. package/dist/components/blocks/Text/textPropsSchema.d.ts +3 -3
  124. package/dist/components/blocks/Text/textTranslations.d.ts +11 -0
  125. package/dist/components/blocks/Text/textTranslations.d.ts.map +1 -0
  126. package/dist/components/blocks/TwoColumn/TwoColumn.d.ts +3 -0
  127. package/dist/components/blocks/TwoColumn/TwoColumn.d.ts.map +1 -0
  128. package/dist/components/blocks/TwoColumn/createTwoColumnBlock.d.ts +14 -0
  129. package/dist/components/blocks/TwoColumn/createTwoColumnBlock.d.ts.map +1 -0
  130. package/dist/components/blocks/TwoColumn/getTwoColumnViewProps.d.ts +17 -0
  131. package/dist/components/blocks/TwoColumn/getTwoColumnViewProps.d.ts.map +1 -0
  132. package/dist/components/blocks/TwoColumn/index.d.ts +5 -0
  133. package/dist/components/blocks/TwoColumn/index.d.ts.map +1 -0
  134. package/dist/components/blocks/TwoColumn/twoColumnPropsSchema.d.ts +60 -0
  135. package/dist/components/blocks/TwoColumn/twoColumnPropsSchema.d.ts.map +1 -0
  136. package/dist/components/blocks/TwoColumn/twoColumnStyles.d.ts +13 -0
  137. package/dist/components/blocks/TwoColumn/twoColumnStyles.d.ts.map +1 -0
  138. package/dist/components/blocks/VideoBlock/VideoBlock.d.ts.map +1 -1
  139. package/dist/components/blocks/VideoBlock/createVideoBlock.d.ts +15 -0
  140. package/dist/components/blocks/VideoBlock/createVideoBlock.d.ts.map +1 -0
  141. package/dist/components/blocks/VideoBlock/index.d.ts +3 -1
  142. package/dist/components/blocks/VideoBlock/index.d.ts.map +1 -1
  143. package/dist/components/blocks/VideoBlock/videoBlockTranslations.d.ts +23 -0
  144. package/dist/components/blocks/VideoBlock/videoBlockTranslations.d.ts.map +1 -0
  145. package/dist/components/blocks/WidgetBlock/WidgetBlock.d.ts +8 -0
  146. package/dist/components/blocks/WidgetBlock/WidgetBlock.d.ts.map +1 -0
  147. package/dist/components/blocks/WidgetBlock/WidgetErrorBoundary.d.ts +36 -0
  148. package/dist/components/blocks/WidgetBlock/WidgetErrorBoundary.d.ts.map +1 -0
  149. package/dist/components/blocks/WidgetBlock/createWidgetBlock.d.ts +14 -0
  150. package/dist/components/blocks/WidgetBlock/createWidgetBlock.d.ts.map +1 -0
  151. package/dist/components/blocks/WidgetBlock/index.d.ts +5 -0
  152. package/dist/components/blocks/WidgetBlock/index.d.ts.map +1 -0
  153. package/dist/components/blocks/WidgetBlock/widgetBlockPropsSchema.d.ts +26 -0
  154. package/dist/components/blocks/WidgetBlock/widgetBlockPropsSchema.d.ts.map +1 -0
  155. package/dist/components/blocks/WidgetBlock/widgetBlockTranslations.d.ts +18 -0
  156. package/dist/components/blocks/WidgetBlock/widgetBlockTranslations.d.ts.map +1 -0
  157. package/dist/components/blocks/commonSchemas.d.ts +13 -0
  158. package/dist/components/blocks/commonSchemas.d.ts.map +1 -1
  159. package/dist/components/blocks/commonViewProps.d.ts +23 -1
  160. package/dist/components/blocks/commonViewProps.d.ts.map +1 -1
  161. package/dist/components/blocks/richTextTableStyles.d.ts +10 -0
  162. package/dist/components/blocks/richTextTableStyles.d.ts.map +1 -0
  163. package/dist/contexts/BlockEditorApiContext.d.ts +61 -4
  164. package/dist/contexts/BlockEditorApiContext.d.ts.map +1 -1
  165. package/dist/contexts/BlockTranslationsContext.d.ts +47 -0
  166. package/dist/contexts/BlockTranslationsContext.d.ts.map +1 -0
  167. package/dist/contexts/RichTextRendererContext.d.ts +21 -0
  168. package/dist/contexts/RichTextRendererContext.d.ts.map +1 -0
  169. package/dist/index.d.ts +13 -2
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +3139 -758
  172. package/dist/registry/blockCatalogue.d.ts +108 -0
  173. package/dist/registry/blockCatalogue.d.ts.map +1 -0
  174. package/dist/registry/blockRegistry.d.ts +67 -0
  175. package/dist/registry/blockRegistry.d.ts.map +1 -0
  176. package/dist/registry/defineBlock.d.ts +55 -0
  177. package/dist/registry/defineBlock.d.ts.map +1 -0
  178. package/dist/registry/getMergedProps.d.ts +18 -0
  179. package/dist/registry/getMergedProps.d.ts.map +1 -0
  180. package/dist/registry/index.d.ts +7 -0
  181. package/dist/registry/index.d.ts.map +1 -0
  182. package/dist/registry/registryTypes.test.d.ts +1 -0
  183. package/dist/registry/registryTypes.test.d.ts.map +1 -0
  184. package/dist/registry/resolveBlockEntry.d.ts +16 -0
  185. package/dist/registry/resolveBlockEntry.d.ts.map +1 -0
  186. package/dist/registry/templateTypes.d.ts +61 -0
  187. package/dist/registry/templateTypes.d.ts.map +1 -0
  188. package/dist/schema/zodExtensions.d.ts +15 -0
  189. package/dist/schema/zodExtensions.d.ts.map +1 -1
  190. package/dist/utils/shuffleCards.d.ts +6 -0
  191. package/dist/utils/shuffleCards.d.ts.map +1 -0
  192. package/dist/utils/useMotionEnabled.d.ts +11 -0
  193. package/dist/utils/useMotionEnabled.d.ts.map +1 -0
  194. package/dist/viewer/Viewer.d.ts +27 -0
  195. package/dist/viewer/Viewer.d.ts.map +1 -0
  196. package/dist/viewer/index.d.ts +2 -0
  197. package/dist/viewer/index.d.ts.map +1 -0
  198. package/locales/en.json +44 -1
  199. package/package.json +39 -24
  200. package/dist/contexts/TranslationsContext.d.ts +0 -70
  201. package/dist/contexts/TranslationsContext.d.ts.map +0 -1
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Every block name this version of the package knows about — strings only, no component
3
+ * references, so a renderer can consult it without reaching for a block's implementation.
4
+ *
5
+ * Its job is to tell two failure modes apart when a saved document names a block the
6
+ * registry can't resolve: one the host deliberately left out, versus one nothing here has
7
+ * ever heard of (version skew, or corrupt content). A renderer reports those differently;
8
+ * see `UnresolvedBlockReason`.
9
+ */
10
+ /** Grouping used by an authoring UI's block tray. */
11
+ export declare const BlockCategory: {
12
+ readonly LAYOUT: "layout";
13
+ readonly ACTIVITY_CONTENT: "activityContent";
14
+ readonly INTERACTIVE_CONTENT: "interactiveContent";
15
+ readonly WIDGET: "widget";
16
+ };
17
+ export type BlockCategory = (typeof BlockCategory)[keyof typeof BlockCategory];
18
+ export interface BlockCatalogueEntry {
19
+ category: BlockCategory;
20
+ acceptsChildren: boolean;
21
+ }
22
+ /**
23
+ * Keys are **wire format** — the `component` string in stored `TemplateLayout` — and are
24
+ * not always the component's name. `Header` renders `Banner`, `QuoteBlock` renders
25
+ * `Quote`, `KnowledgeCheckBlock` renders `KnowledgeCheck`. Renaming a key orphans every
26
+ * document that used it.
27
+ *
28
+ * No labels here: a label is user-facing text, so it arrives already translated when the
29
+ * host registers the block (`create<Name>Block({ label })`). An unresolved block has no
30
+ * label by definition.
31
+ */
32
+ export declare const BLOCK_CATALOGUE: {
33
+ readonly LayoutContainer: {
34
+ readonly category: "layout";
35
+ readonly acceptsChildren: true;
36
+ };
37
+ readonly TwoColumn: {
38
+ readonly category: "layout";
39
+ readonly acceptsChildren: true;
40
+ };
41
+ readonly Header: {
42
+ readonly category: "activityContent";
43
+ readonly acceptsChildren: false;
44
+ };
45
+ readonly Text: {
46
+ readonly category: "activityContent";
47
+ readonly acceptsChildren: false;
48
+ };
49
+ readonly QuoteBlock: {
50
+ readonly category: "activityContent";
51
+ readonly acceptsChildren: false;
52
+ };
53
+ readonly CodeBlock: {
54
+ readonly category: "activityContent";
55
+ readonly acceptsChildren: false;
56
+ };
57
+ readonly ImageBlock: {
58
+ readonly category: "activityContent";
59
+ readonly acceptsChildren: false;
60
+ };
61
+ readonly VideoBlock: {
62
+ readonly category: "activityContent";
63
+ readonly acceptsChildren: false;
64
+ };
65
+ readonly Accordion: {
66
+ readonly category: "interactiveContent";
67
+ readonly acceptsChildren: false;
68
+ };
69
+ readonly TabsBlock: {
70
+ readonly category: "interactiveContent";
71
+ readonly acceptsChildren: false;
72
+ };
73
+ readonly KnowledgeCheckBlock: {
74
+ readonly category: "interactiveContent";
75
+ readonly acceptsChildren: false;
76
+ };
77
+ readonly FlashCards: {
78
+ readonly category: "interactiveContent";
79
+ readonly acceptsChildren: false;
80
+ };
81
+ readonly MixAndMatch: {
82
+ readonly category: "interactiveContent";
83
+ readonly acceptsChildren: false;
84
+ };
85
+ readonly WidgetBlock: {
86
+ readonly category: "widget";
87
+ readonly acceptsChildren: false;
88
+ };
89
+ };
90
+ /** Wire names of the blocks this package ships. */
91
+ export type BlockName = keyof typeof BLOCK_CATALOGUE;
92
+ export declare function isKnownBlock(name: string): name is BlockName;
93
+ /**
94
+ * Why a renderer could not resolve a node.
95
+ *
96
+ * `not-registered` is a host configuration choice; `unknown` is closer to an incident.
97
+ * Neither ever mutates the document — the node and its content are left exactly as saved.
98
+ */
99
+ export type UnresolvedBlockReason = 'not-registered' | 'unknown';
100
+ export interface UnresolvedBlock {
101
+ /** Node id from the layout. */
102
+ id: string;
103
+ /** The unresolvable `component` string, verbatim. */
104
+ component: string;
105
+ reason: UnresolvedBlockReason;
106
+ }
107
+ export declare function unresolvedReason(component: string): UnresolvedBlockReason;
108
+ //# sourceMappingURL=blockCatalogue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockCatalogue.d.ts","sourceRoot":"","sources":["../../src/registry/blockCatalogue.ts"],"names":[],"mappings":"AAkBA;;;;;;;;GAQG;AAEH,qDAAqD;AACrD,eAAO,MAAM,aAAa;;;;;CAKhB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE9E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,aAAa,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB4B,CAAA;AAExD,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,eAAe,CAAA;AAEpD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,SAAS,CAI5D;AAED;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,SAAS,CAAA;AAEhE,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,qBAAqB,CAAA;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,CAEzE"}
@@ -0,0 +1,67 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { RegisteredComponentSchema } from '../schema/registeredSchema';
3
+ /**
4
+ * Everything a renderer needs to resolve one block.
5
+ *
6
+ * The host composes the registry itself — this package ships entry *factories*
7
+ * (`create<Name>Block`) rather than a default registry, so which blocks a document may
8
+ * contain is the host's decision, and no host is asked for the strings or the label of a
9
+ * block it does not offer.
10
+ */
11
+ export interface BlockRegistryEntry<TProps = unknown> {
12
+ component: ComponentType<TProps>;
13
+ schema: RegisteredComponentSchema<TProps>;
14
+ defaultProps: Partial<TProps>;
15
+ /** Already translated by the host — see `create<Name>Block`. */
16
+ label: string;
17
+ /**
18
+ * Whether a `TemplateLayout` node of this block may carry `children`. Read by the
19
+ * renderers instead of a hardcoded name list, which is what makes a host-defined
20
+ * container possible at all.
21
+ */
22
+ acceptsChildren?: boolean;
23
+ /**
24
+ * Wrap each child in its own div positioned by `gridColumn`, rather than rendering
25
+ * children straight into the block.
26
+ *
27
+ * TwoColumn needs this: its stylesheet collapses and reorders the columns via `> *` and
28
+ * `> div:nth-of-type(1|2)`, so the per-child div is load-bearing. Expressed as a flag on
29
+ * the entry rather than a block name hardcoded in the renderer, so the wire name stays
30
+ * the host's choice and a host's own two-column block can opt in.
31
+ */
32
+ wrapsChildrenInGridCells?: boolean;
33
+ /** Lightweight stand-in for drag operations, where mounting the real block is too costly. */
34
+ renderDragPreview?: (props: Partial<TProps>) => ReactNode;
35
+ }
36
+ /**
37
+ * A host-composed map of wire name → entry.
38
+ *
39
+ * This is the **constraint**, not an annotation to write on a registry — see
40
+ * `defineRegistry`.
41
+ *
42
+ * `any` rather than `unknown` is deliberate: entries are heterogeneous, and a
43
+ * `BlockRegistryEntry<unknown>` constraint would reject every concretely-typed entry
44
+ * because `ComponentType<TProps>` is contravariant in its props.
45
+ */
46
+ export type BlockRegistry = Record<string, BlockRegistryEntry<any>>;
47
+ /**
48
+ * Identity at runtime; its whole job is to check a registry against `BlockRegistry`
49
+ * **without widening it**.
50
+ *
51
+ * `const registry: BlockRegistry = {…}` type-checks and then silently destroys every
52
+ * derived type: `keyof R & string` becomes `string` and `PropsOf` becomes `any`, so
53
+ * `TemplateLayoutFor` accepts any `component` and any `props` — with no diagnostic
54
+ * anywhere, in the annotated file or in the host code downstream. `satisfies` avoids that,
55
+ * but nothing stops a host reaching for the annotation, and the failure is invisible.
56
+ *
57
+ * Inferring `R` from the argument makes the widening unrepresentable:
58
+ *
59
+ * ```ts
60
+ * const registry = defineRegistry({ Text: createTextBlock({ … }) })
61
+ * type AppLayout = TemplateLayoutFor<typeof registry> // component: 'Text'
62
+ * ```
63
+ */
64
+ export declare function defineRegistry<R extends BlockRegistry>(registry: R): R;
65
+ /** Recovers a block's props type from its registry entry. */
66
+ export type PropsOf<E> = E extends BlockRegistryEntry<infer P> ? P : never;
67
+ //# sourceMappingURL=blockRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/blockRegistry.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB,CAAC,MAAM,GAAG,OAAO;IAClD,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,MAAM,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACzC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;;;;OAQG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,CAAA;CAC1D;AAED;;;;;;;;;GASG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAA;AAEnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,aAAa,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAEtE;AAED,6DAA6D;AAC7D,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA"}
@@ -0,0 +1,55 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { AllStringValues } from '../contexts/BlockTranslationsContext';
3
+ import { RegisteredComponentSchema } from '../schema/registeredSchema';
4
+ import { BlockName } from './blockCatalogue';
5
+ import { BlockRegistryEntry } from './blockRegistry';
6
+ /** The parts of an entry that are fixed by the block itself. */
7
+ export interface BlockDefinition<TProps> {
8
+ /**
9
+ * The `component` string stored documents use for this block — not always the component's
10
+ * name (`Header` is Banner).
11
+ *
12
+ * Any string is accepted so a host can define its own blocks with this helper; the
13
+ * `BlockName` union is there for autocomplete on the ones this package ships. For those,
14
+ * `acceptsChildren` is taken from `BLOCK_CATALOGUE` so the two can't drift, and the
15
+ * option below is ignored.
16
+ */
17
+ wireName: BlockName | (string & {});
18
+ component: ComponentType<TProps>;
19
+ schema: RegisteredComponentSchema<TProps>;
20
+ defaultProps: Partial<TProps>;
21
+ /** Host blocks only — catalogued blocks take this from `BLOCK_CATALOGUE`. */
22
+ acceptsChildren?: boolean;
23
+ renderDragPreview?: (props: Partial<TProps>) => ReactNode;
24
+ wrapsChildrenInGridCells?: boolean;
25
+ }
26
+ /** What the host supplies for a block that owns strings. */
27
+ export interface BlockFactoryOptions<TTranslations> {
28
+ /** Already translated. Shown wherever an authoring UI lists this block. */
29
+ label: string;
30
+ /** Already translated. `<Name>English` holds the source strings. */
31
+ translations: TTranslations;
32
+ }
33
+ /** What the host supplies for a block with no strings of its own. */
34
+ export interface UntranslatedBlockFactoryOptions {
35
+ /** Already translated. Shown wherever an authoring UI lists this block. */
36
+ label: string;
37
+ }
38
+ /**
39
+ * Builds a block's `create<Name>Block` factory.
40
+ *
41
+ * `english` is the type witness: passing a block's English slice is what pins the
42
+ * `translations` the resulting factory demands, so a host gets exactly that block's keys —
43
+ * no more, none missing. Omit it and the factory takes only a `label`.
44
+ *
45
+ * **Build the registry once.** Each call returns a fresh component identity, so a registry
46
+ * rebuilt on every render remounts every block — a flipped flashcard, an answered quiz or
47
+ * an open accordion all reset. Hoist it to module scope, or memoise it.
48
+ */
49
+ export declare function defineBlock<TProps, TEnglish extends AllStringValues<TEnglish>>(definition: BlockDefinition<TProps> & {
50
+ english: TEnglish;
51
+ }): (options: BlockFactoryOptions<TEnglish>) => BlockRegistryEntry<TProps>;
52
+ export declare function defineBlock<TProps>(definition: BlockDefinition<TProps> & {
53
+ english?: never;
54
+ }): (options: UntranslatedBlockFactoryOptions) => BlockRegistryEntry<TProps>;
55
+ //# sourceMappingURL=defineBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineBlock.d.ts","sourceRoot":"","sources":["../../src/registry/defineBlock.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,aAAa,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACzE,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAmB,KAAK,SAAS,EAAgB,MAAM,kBAAkB,CAAA;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAYzD,gEAAgE;AAChE,MAAM,WAAW,eAAe,CAAC,MAAM;IACrC;;;;;;;;OAQG;IACH,QAAQ,EAAE,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACnC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,MAAM,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACzC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7B,6EAA6E;IAC7E,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,CAAA;IACzD,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC;AAED,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB,CAAC,aAAa;IAChD,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED,qEAAqE;AACrE,MAAM,WAAW,+BAA+B;IAC9C,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,SAAS,eAAe,CAAC,QAAQ,CAAC,EAC5E,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,GAC1D,CAAC,OAAO,EAAE,mBAAmB,CAAC,QAAQ,CAAC,KAAK,kBAAkB,CAAC,MAAM,CAAC,CAAA;AACzE,wBAAgB,WAAW,CAAC,MAAM,EAChC,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,GACxD,CAAC,OAAO,EAAE,+BAA+B,KAAK,kBAAkB,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { LayoutNode, TemplateData } from './templateTypes';
2
+ /**
3
+ * Resolves the props one node renders with: **layout props, then template data**. That
4
+ * ordering is what lets content be revised (data) without touching structure (layout).
5
+ *
6
+ * Registry `defaultProps` are deliberately **not** layered underneath. They are the seed
7
+ * an editor writes into a *new* block — for several blocks that means three or four blank
8
+ * items (`KnowledgeCheckDefaultProps.answers`, `FlashCardsDefaultProps.cards`, …), not
9
+ * value defaults. Merging them here would turn a node with missing or partial content into
10
+ * a rendered blank activity: a learner would get three unlabelled checkboxes and a working
11
+ * "Check answer" button where the block should render nothing. Blocks default their own
12
+ * scalar props at the parameter list, which is the right mechanism for that.
13
+ *
14
+ * Layout props pass through as-is, grid positioning included; blocks ignore props they
15
+ * don't declare.
16
+ */
17
+ export declare function getMergedProps(node: Pick<LayoutNode, 'id' | 'props'>, templateData?: TemplateData): Record<string, unknown>;
18
+ //# sourceMappingURL=getMergedProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMergedProps.d.ts","sourceRoot":"","sources":["../../src/registry/getMergedProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,OAAO,CAAC,EACtC,YAAY,CAAC,EAAE,YAAY,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzB"}
@@ -0,0 +1,7 @@
1
+ export { type BlockRegistry, type BlockRegistryEntry, defineRegistry, type PropsOf, } from './blockRegistry';
2
+ export { BLOCK_CATALOGUE, BlockCategory, type BlockCatalogueEntry, type BlockName, isKnownBlock, type UnresolvedBlock, type UnresolvedBlockReason, unresolvedReason, } from './blockCatalogue';
3
+ export { type BlockDefinition, type BlockFactoryOptions, defineBlock, type UntranslatedBlockFactoryOptions, } from './defineBlock';
4
+ export { getMergedProps } from './getMergedProps';
5
+ export { resolveBlockEntry } from './resolveBlockEntry';
6
+ export type { GridPositionProps, LayoutNode, TemplateData, TemplateDataFor, TemplateLayoutFor, } from './templateTypes';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,cAAc,EACd,KAAK,OAAO,GACb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,gBAAgB,GACjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,WAAW,EACX,KAAK,+BAA+B,GACrC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,YAAY,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=registryTypes.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registryTypes.test.d.ts","sourceRoot":"","sources":["../../src/registry/registryTypes.test.ts"],"names":[],"mappings":"AAuCA,OAAO,yBAAyB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { BlockRegistry } from './blockRegistry';
2
+ /**
3
+ * Looks up the entry for a node's `component`. **Use this rather than
4
+ * `registry[node.component]`** — anywhere, including a host's own editor renderer.
5
+ *
6
+ * A bare index reads through `Object.prototype`, so a `component` of `toString`,
7
+ * `constructor` or `valueOf` resolves to a function and reads as *registered*. The caller
8
+ * then hands React `entry.component` — `undefined` — and React throws, taking down the
9
+ * whole tree rather than skipping one block. Stored documents are the least trusted input
10
+ * this package has, so that is a real path, and it is the one failure mode here that costs
11
+ * a reader their entire page.
12
+ *
13
+ * `hasOwnProperty.call` rather than `Object.hasOwn`, which needs the ES2022 lib.
14
+ */
15
+ export declare function resolveBlockEntry<R extends BlockRegistry>(registry: R, component: string): R[keyof R] | undefined;
16
+ //# sourceMappingURL=resolveBlockEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveBlockEntry.d.ts","sourceRoot":"","sources":["../../src/registry/resolveBlockEntry.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,aAAa,EACvD,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,MAAM,GAChB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAMxB"}
@@ -0,0 +1,61 @@
1
+ import { BlockRegistry, PropsOf } from './blockRegistry';
2
+ /**
3
+ * Where a node sits in the designer's grid. Structure, never content — see the
4
+ * TemplateLayout/TemplateData split below.
5
+ */
6
+ export interface GridPositionProps {
7
+ gridColumn?: number;
8
+ gridRow?: number;
9
+ columnSpan?: number;
10
+ rowSpan?: number;
11
+ order?: number;
12
+ }
13
+ /**
14
+ * The structural minimum every layout node satisfies, and what this package's own code
15
+ * works against.
16
+ *
17
+ * `props?: object`, not `Record<string, unknown>`: a host block whose props are declared
18
+ * as an `interface` gets no implicit index signature and would fail to assign, while a
19
+ * `z.infer`'d type alias would pass — an arbitrary distinction to inflict on a host.
20
+ */
21
+ export interface LayoutNode {
22
+ component: string;
23
+ id: string;
24
+ props?: object;
25
+ children?: LayoutNode[];
26
+ }
27
+ /**
28
+ * Content props keyed by node id: `{ 'text-1': { content: '…' } }`.
29
+ *
30
+ * A map, not the array-of-single-key-objects the canvas-horizon viewer took. Callers
31
+ * holding the old shape flatten at their own boundary.
32
+ */
33
+ export type TemplateData = Record<string, object>;
34
+ /**
35
+ * A layout tree typed against a specific registry: `component` is narrowed to that
36
+ * registry's keys and `props` to the matching block's props.
37
+ *
38
+ * Instantiate once per host and alias it — the tree helpers are generic over
39
+ * `T extends LayoutNode`, so inference carries this type through a call without anyone
40
+ * writing a type argument:
41
+ *
42
+ * ```ts
43
+ * const registry = { Text: createTextBlock({ … }) } satisfies BlockRegistry
44
+ * type AppLayout = TemplateLayoutFor<typeof registry>
45
+ * ```
46
+ */
47
+ export type TemplateLayoutFor<R extends BlockRegistry> = {
48
+ [K in keyof R & string]: {
49
+ component: K;
50
+ id: string;
51
+ props?: Partial<PropsOf<R[K]>> & GridPositionProps;
52
+ children?: TemplateLayoutFor<R>[];
53
+ };
54
+ }[keyof R & string];
55
+ /** `TemplateData` narrowed to the props of the blocks in `R`. */
56
+ export type TemplateDataFor<R extends BlockRegistry> = {
57
+ [instanceId: string]: {
58
+ [K in keyof R]: Partial<PropsOf<R[K]>>;
59
+ }[keyof R];
60
+ };
61
+ //# sourceMappingURL=templateTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateTypes.d.ts","sourceRoot":"","sources":["../../src/registry/templateTypes.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE7D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,aAAa,IAAI;KACtD,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,GAAG;QACvB,SAAS,EAAE,CAAC,CAAA;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAA;QAClD,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAA;KAClC;CACF,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAA;AAEnB,iEAAiE;AACjE,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,aAAa,IAAI;IACrD,CAAC,UAAU,EAAE,MAAM,GAAG;SAAG,CAAC,IAAI,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC,MAAM,CAAC,CAAC,CAAA;CAC1E,CAAA"}
@@ -7,6 +7,20 @@ export interface ZodRangeConfig {
7
7
  max: number;
8
8
  step?: number;
9
9
  formatValue?: string;
10
+ /**
11
+ * Label for the value itself. Set alongside `complementLabel` when the slider
12
+ * splits a whole between two named sides (a column-width ratio), so the host can
13
+ * render both ends rather than a single number.
14
+ */
15
+ valueLabel?: string;
16
+ /**
17
+ * Label for the *remainder of the whole* the slider divides — for a percentage range,
18
+ * `100 - value`, not `max - value`: `min`/`max` bound how lopsided the split may get,
19
+ * they do not shrink what is being split. A host computing `max + min - value` agrees
20
+ * only where the bounds are symmetric about the whole, as TwoColumn's 20–80 are.
21
+ * Only meaningful together with `valueLabel`.
22
+ */
23
+ complementLabel?: string;
10
24
  }
11
25
  export interface ZodHiddenWhenConfig {
12
26
  field: string;
@@ -79,6 +93,7 @@ declare module 'zod' {
79
93
  /**
80
94
  * Mark number field as a range slider input
81
95
  * @example z.number().zodRange({ min: 0, max: 100, step: 25, formatValue: '%' }).zodLabel('Size')
96
+ * @example z.number().zodRange({ min: 20, max: 80, step: 5, formatValue: '%', valueLabel: 'Left', complementLabel: 'Right' })
82
97
  */
83
98
  zodRange(config: ZodRangeConfig): this;
84
99
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"zodExtensions.d.ts","sourceRoot":"","sources":["../../src/schema/zodExtensions.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"zodExtensions.d.ts","sourceRoot":"","sources":["../../src/schema/zodExtensions.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,EAAE,CAAA;IACxD,YAAY,CAAC,EAAE,qBAAqB,GAAG,qBAAqB,EAAE,CAAA;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,CAiBtE;AASD;;GAEG;AACH,OAAO,QAAQ,KAAK,CAAC;IACnB,UAAU,OAAO,CAEf,MAAM,GAAG,GAAG,EACZ,GAAG,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,EACvC,KAAK,GAAG,MAAM;QAEd;;;WAGG;QACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QAE7B;;;WAGG;QACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;QAEzC;;;WAGG;QACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QAE3B;;;;WAIG;QACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAEjC;;;WAGG;QACH,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAErC;;;WAGG;QACH,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAErC;;;;WAIG;QACH,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAA;QACtC;;;WAGG;QACH,aAAa,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAEzC;;;WAGG;QACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAE/B;;;WAGG;QACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAE/B;;;WAGG;QACH,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAA;QAEhD;;;WAGG;QACH,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAA;QAEpD;;;WAGG;QACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QAErC;;;WAGG;QACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QAE/B;;;;WAIG;QACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;QAEzC;;;WAGG;QACH,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;QAEnC;;;WAGG;QACH,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;KACpC;CACF"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Fisher–Yates over a copy: the input is a host-owned prop array, which a block must
3
+ * never reorder in place.
4
+ */
5
+ export declare function shuffleCards<T>(items: readonly T[]): T[];
6
+ //# sourceMappingURL=shuffleCards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffleCards.d.ts","sourceRoot":"","sources":["../../src/utils/shuffleCards.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAOxD"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Whether a block may animate. A host zeroing `transitions.duration` — the token that
3
+ * already means "no motion" to every InstUI component — switches the block's motion off.
4
+ * It is only a switch: the timings themselves belong to the block, a designed motion
5
+ * rather than the generic UI transition that token sizes.
6
+ *
7
+ * The reader's `prefers-reduced-motion` is the other switch, and belongs in each block's
8
+ * CSS as a media query, so it needs no listener here.
9
+ */
10
+ export declare function useMotionEnabled(): boolean;
11
+ //# sourceMappingURL=useMotionEnabled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMotionEnabled.d.ts","sourceRoot":"","sources":["../../src/utils/useMotionEnabled.ts"],"names":[],"mappings":"AA0BA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAG1C"}
@@ -0,0 +1,27 @@
1
+ import { BlockRegistry } from '../registry/blockRegistry';
2
+ import { UnresolvedBlock } from '../registry/blockCatalogue';
3
+ import { LayoutNode, TemplateData } from '../registry/templateTypes';
4
+ export interface ViewerProps {
5
+ /** Structure: which block, where, and what nests inside what. */
6
+ templateLayout: LayoutNode[];
7
+ /** Content, keyed by node id. Overrides matching layout props. */
8
+ templateData?: TemplateData;
9
+ /** Composed by the host — see `create<Name>Block`. */
10
+ componentRegistry: BlockRegistry;
11
+ /**
12
+ * Called once per node the registry could not resolve. The node is still left exactly
13
+ * as saved; this is for telemetry, not for repair. Nothing is shown to the reader —
14
+ * a diagnostic is not a learner's problem.
15
+ */
16
+ onUnresolvedBlock?: (block: UnresolvedBlock) => void;
17
+ }
18
+ /**
19
+ * Renders saved block content read-only.
20
+ *
21
+ * Emits no wrapper of its own — the blocks are direct layout children of whatever the
22
+ * host puts them in, so the host's own container keeps full control of layout, and any
23
+ * host-specific typography (Canvas, for one, needs rules to beat its own element-level
24
+ * heading styles) belongs on that container rather than in here.
25
+ */
26
+ export declare function Viewer({ templateLayout, templateData, componentRegistry, onUnresolvedBlock, }: ViewerProps): import("react/jsx-runtime").JSX.Element | null;
27
+ //# sourceMappingURL=Viewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Viewer.d.ts","sourceRoot":"","sources":["../../src/viewer/Viewer.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,4BAA4B,CAAA;AAGnF,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEzE,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,cAAc,EAAE,UAAU,EAAE,CAAA;IAC5B,kEAAkE;IAClE,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,sDAAsD;IACtD,iBAAiB,EAAE,aAAa,CAAA;IAChC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;CACrD;AAmID;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACrB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,WAAW,kDA6Bb"}
@@ -0,0 +1,2 @@
1
+ export { Viewer, type ViewerProps } from './Viewer';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/viewer/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA"}
package/locales/en.json CHANGED
@@ -17,5 +17,48 @@
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"
21
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/platform-block-content-editor",
3
- "version": "0.3.1",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -19,42 +19,46 @@
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
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
22
  "peerDependencies": {
23
+ "@instructure/emotion": "^11.0.0",
24
+ "@instructure/ui-a11y-content": "^11.0.0",
25
+ "@instructure/ui-alerts": "^11.0.0",
26
+ "@instructure/ui-buttons": "^11.0.0",
27
+ "@instructure/ui-checkbox": "^11.0.0",
34
28
  "@instructure/ui-flex": "^11.0.0",
35
29
  "@instructure/ui-heading": "^11.0.0",
36
30
  "@instructure/ui-icons": "^11.0.0",
37
31
  "@instructure/ui-img": "^11.0.0",
32
+ "@instructure/ui-progress": "^11.0.0",
33
+ "@instructure/ui-radio-input": "^11.0.0",
38
34
  "@instructure/ui-spinner": "^11.0.0",
39
35
  "@instructure/ui-text": "^11.0.0",
40
36
  "@instructure/ui-toggle-details": "^11.0.0",
41
37
  "@instructure/ui-view": "^11.0.0",
42
- "react": "^18.0.0",
43
- "react-dom": "^18.0.0",
38
+ "react": "^18.0.0 || ^19.0.0",
39
+ "react-dom": "^18.0.0 || ^19.0.0",
44
40
  "zod": "^3.23.8"
45
41
  },
46
42
  "dependencies": {
47
- "@instructure/platform-sanitize": "workspace:*"
43
+ "@instructure/platform-sanitize": "^0.7.0"
48
44
  },
49
45
  "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",
46
+ "@instructure/emotion": "11.7.4",
47
+ "@instructure/ui-a11y-content": "11.7.4",
48
+ "@instructure/ui-alerts": "11.7.4",
49
+ "@instructure/ui-buttons": "11.7.4",
50
+ "@instructure/ui-checkbox": "11.7.4",
51
+ "@instructure/ui-flex": "11.7.4",
52
+ "@instructure/ui-heading": "11.7.4",
53
+ "@instructure/ui-icons": "11.7.4",
54
+ "@instructure/ui-img": "11.7.4",
55
+ "@instructure/ui-progress": "11.7.4",
56
+ "@instructure/ui-radio-input": "11.7.4",
57
+ "@instructure/ui-spinner": "11.7.4",
58
+ "@instructure/ui-text": "11.7.4",
59
+ "@instructure/ui-themes": "11.7.4",
60
+ "@instructure/ui-toggle-details": "11.7.4",
61
+ "@instructure/ui-view": "11.7.4",
58
62
  "@storybook/react": "^10.0.8",
59
63
  "@testing-library/jest-dom": "^6.9.1",
60
64
  "@testing-library/react": "^16.3.0",
@@ -69,5 +73,16 @@
69
73
  "vite-plugin-dts": "^4.0.0",
70
74
  "vitest": "^4.0.0",
71
75
  "zod": "^3.23.8"
76
+ },
77
+ "scripts": {
78
+ "build": "vite build",
79
+ "dev": "vite build --watch",
80
+ "test": "vitest run",
81
+ "test:watch": "vitest",
82
+ "test:coverage": "vitest run --coverage",
83
+ "lint": "oxlint -c ../../oxlint.json && ast-grep scan . --report-style=short",
84
+ "lint:fix": "oxlint -c ../../oxlint.json --fix && biome format --write .",
85
+ "type-check": "tsc -p tsconfig.check.json",
86
+ "pack:tarball": "pnpm build && pnpm pack"
72
87
  }
73
- }
88
+ }