@instructure/platform-block-content-editor 2.0.0 → 3.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 (87) hide show
  1. package/dist/components/blocks/Banner/Banner.d.ts +5 -2
  2. package/dist/components/blocks/Banner/Banner.d.ts.map +1 -1
  3. package/dist/components/blocks/Banner/bannerPropsSchema.d.ts +41 -4
  4. package/dist/components/blocks/Banner/bannerPropsSchema.d.ts.map +1 -1
  5. package/dist/components/blocks/Banner/bannerTranslations.d.ts +4 -0
  6. package/dist/components/blocks/Banner/bannerTranslations.d.ts.map +1 -1
  7. package/dist/components/blocks/Banner/createBannerBlock.d.ts +8 -1
  8. package/dist/components/blocks/Banner/createBannerBlock.d.ts.map +1 -1
  9. package/dist/components/blocks/Banner/getBannerViewProps.d.ts +48 -2
  10. package/dist/components/blocks/Banner/getBannerViewProps.d.ts.map +1 -1
  11. package/dist/components/blocks/KnowledgeCheck/createKnowledgeCheckBlock.d.ts +1 -1
  12. package/dist/components/blocks/KnowledgeCheck/knowledgeCheckPropsSchema.d.ts +3 -3
  13. package/dist/components/blocks/Quote/Quote.d.ts +1 -1
  14. package/dist/components/blocks/Quote/Quote.d.ts.map +1 -1
  15. package/dist/components/blocks/Quote/createQuoteBlock.d.ts +4 -1
  16. package/dist/components/blocks/Quote/createQuoteBlock.d.ts.map +1 -1
  17. package/dist/components/blocks/Quote/getQuoteViewProps.d.ts +16 -2
  18. package/dist/components/blocks/Quote/getQuoteViewProps.d.ts.map +1 -1
  19. package/dist/components/blocks/Quote/quotePropsSchema.d.ts +25 -5
  20. package/dist/components/blocks/Quote/quotePropsSchema.d.ts.map +1 -1
  21. package/dist/components/blocks/Text/getTextViewProps.d.ts.map +1 -1
  22. package/dist/components/blocks/TwoColumn/createTwoColumnBlock.d.ts.map +1 -1
  23. package/dist/components/blocks/TwoColumn/twoColumnStyles.d.ts.map +1 -1
  24. package/dist/components/blocks/brandTheming.d.ts +11 -0
  25. package/dist/components/blocks/brandTheming.d.ts.map +1 -1
  26. package/dist/components/blocks/commonSchemas.d.ts +2 -2
  27. package/dist/components/blocks/commonSchemas.d.ts.map +1 -1
  28. package/dist/components/blocks/commonViewProps.d.ts +19 -1
  29. package/dist/components/blocks/commonViewProps.d.ts.map +1 -1
  30. package/dist/editor/BlockContentEditor.d.ts.map +1 -1
  31. package/dist/editor/ai/BlockAIMenu.d.ts +25 -1
  32. package/dist/editor/ai/BlockAIMenu.d.ts.map +1 -1
  33. package/dist/editor/ai/BlockAIMenuContent.d.ts +5 -1
  34. package/dist/editor/ai/BlockAIMenuContent.d.ts.map +1 -1
  35. package/dist/editor/ai/PanelAIMenu.d.ts +30 -0
  36. package/dist/editor/ai/PanelAIMenu.d.ts.map +1 -0
  37. package/dist/editor/ai/PreviewBlockModal.d.ts.map +1 -1
  38. package/dist/editor/ai/aiMenuStyles.d.ts +39 -2
  39. package/dist/editor/ai/aiMenuStyles.d.ts.map +1 -1
  40. package/dist/editor/ai/aiTranslations.d.ts +6 -2
  41. package/dist/editor/ai/aiTranslations.d.ts.map +1 -1
  42. package/dist/editor/ai/constants.d.ts +17 -0
  43. package/dist/editor/ai/constants.d.ts.map +1 -1
  44. package/dist/editor/ai/isBlockEmpty.d.ts +10 -0
  45. package/dist/editor/ai/isBlockEmpty.d.ts.map +1 -0
  46. package/dist/editor/ai/isBlockEmpty.test.d.ts +2 -0
  47. package/dist/editor/ai/isBlockEmpty.test.d.ts.map +1 -0
  48. package/dist/editor/ai/isItemEmpty.d.ts +18 -0
  49. package/dist/editor/ai/isItemEmpty.d.ts.map +1 -0
  50. package/dist/editor/ai/isItemEmpty.test.d.ts +2 -0
  51. package/dist/editor/ai/isItemEmpty.test.d.ts.map +1 -0
  52. package/dist/editor/ai/useBlockAIPopover.d.ts +7 -1
  53. package/dist/editor/ai/useBlockAIPopover.d.ts.map +1 -1
  54. package/dist/editor/canvas/GridItemChild.d.ts +2 -2
  55. package/dist/editor/canvas/GridItemChild.d.ts.map +1 -1
  56. package/dist/editor/canvas/canvasTranslations.d.ts +1 -5
  57. package/dist/editor/canvas/canvasTranslations.d.ts.map +1 -1
  58. package/dist/editor/sidebar/form/ComponentEditorForm.d.ts.map +1 -1
  59. package/dist/editor/sidebar/panel/DesignerSideBar.d.ts +2 -0
  60. package/dist/editor/sidebar/panel/DesignerSideBar.d.ts.map +1 -1
  61. package/dist/editor/sidebar/panel/ToolContentContainer.d.ts +5 -3
  62. package/dist/editor/sidebar/panel/ToolContentContainer.d.ts.map +1 -1
  63. package/dist/editor/sidebar/panel/ToolHeader.d.ts +2 -1
  64. package/dist/editor/sidebar/panel/ToolHeader.d.ts.map +1 -1
  65. package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts +6 -0
  66. package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts.map +1 -1
  67. package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts.map +1 -1
  68. package/dist/index.js +6738 -6172
  69. package/dist/registry/blockRegistry.d.ts +11 -7
  70. package/dist/registry/blockRegistry.d.ts.map +1 -1
  71. package/dist/registry/defineBlock.d.ts +1 -1
  72. package/dist/registry/defineBlock.d.ts.map +1 -1
  73. package/dist/registry/index.d.ts +1 -1
  74. package/dist/registry/index.d.ts.map +1 -1
  75. package/dist/schema/index.d.ts +1 -0
  76. package/dist/schema/index.d.ts.map +1 -1
  77. package/dist/schema/schemaRegistry.d.ts +176 -0
  78. package/dist/schema/schemaRegistry.d.ts.map +1 -0
  79. package/dist/schema/schemaRegistry.test.d.ts +2 -0
  80. package/dist/schema/schemaRegistry.test.d.ts.map +1 -0
  81. package/dist/schema/zodUtils.d.ts +2 -1
  82. package/dist/schema/zodUtils.d.ts.map +1 -1
  83. package/dist/utils/colorVariants/index.d.ts +1 -1
  84. package/dist/utils/colorVariants/index.d.ts.map +1 -1
  85. package/dist/viewer/Viewer.d.ts.map +1 -1
  86. package/locales/en.json +6 -4
  87. package/package.json +4 -3
@@ -1,6 +1,12 @@
1
1
  import { ComponentType, ReactNode } from 'react';
2
2
  import { DesignerItemAction } from '../editor/document/designerItemAction';
3
3
  import { RegisteredComponentSchema } from '../schema/registeredSchema';
4
+ /**
5
+ * Carries a column stack's 0-based index. A block styles its columns through this and
6
+ * never through `> div`: a host's editor wraps children in scaffolding of its own, which a
7
+ * type selector would hit and override.
8
+ */
9
+ export declare const COLUMN_STACK_ATTR = "data-bce-column";
4
10
  /**
5
11
  * Everything a renderer needs to resolve one block.
6
12
  *
@@ -22,15 +28,13 @@ export interface BlockRegistryEntry<TProps = unknown> {
22
28
  */
23
29
  acceptsChildren?: boolean;
24
30
  /**
25
- * Wrap each child in its own div positioned by `gridColumn`, rather than rendering
26
- * children straight into the block.
31
+ * Each stack is marked with `COLUMN_STACK_ATTR` and pinned to its `grid-column`.
32
+ * TwoColumn sets `2`.
27
33
  *
28
- * TwoColumn needs this: its stylesheet collapses and reorders the columns via `> *` and
29
- * `> div:nth-of-type(1|2)`, so the per-child div is load-bearing. Expressed as a flag on
30
- * the entry rather than a block name hardcoded in the renderer, so the wire name stays
31
- * the host's choice and a host's own two-column block can opt in.
34
+ * Per column rather than per child so each column's flow stays independent otherwise
35
+ * children auto-place into rows, where the tallest sets the height.
32
36
  */
33
- wrapsChildrenInGridCells?: boolean;
37
+ stacksChildrenIntoColumns?: number;
34
38
  /** Lightweight stand-in for drag operations, where mounting the real block is too costly. */
35
39
  renderDragPreview?: (props: Partial<TProps>) => ReactNode;
36
40
  /**
@@ -1 +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;AAIrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E;;;;;;;GAOG;AACH,MAAM,WAAW,kB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B,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;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,CAAA;IACzD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACrC;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"}
@@ -22,7 +22,7 @@ export interface BlockDefinition<TProps> {
22
22
  /** Host blocks only — catalogued blocks take this from `BLOCK_CATALOGUE`. */
23
23
  acceptsChildren?: boolean;
24
24
  renderDragPreview?: (props: Partial<TProps>) => ReactNode;
25
- wrapsChildrenInGridCells?: boolean;
25
+ stacksChildrenIntoColumns?: number;
26
26
  }
27
27
  /** What the host supplies for a block that owns strings. */
28
28
  export interface BlockFactoryOptions<TTranslations> {
@@ -1 +1 @@
1
- {"version":3,"file":"defineBlock.d.ts","sourceRoot":"","sources":["../../src/registry/defineBlock.tsx"],"names":[],"mappings":"AA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AiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,CAAA;IACzD,yBAAyB,CAAC,EAAE,MAAM,CAAA;CACnC;AAED,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB,CAAC,aAAa;IAChD,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,YAAY,EAAE,aAAa,CAAA;IAC3B,qGAAqG;IACrG,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACrC;AAED,qEAAqE;AACrE,MAAM,WAAW,+BAA+B;IAC9C,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,qGAAqG;IACrG,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACrC;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"}
@@ -1,4 +1,4 @@
1
- export { type BlockRegistry, type BlockRegistryEntry, defineRegistry, type PropsOf, } from './blockRegistry';
1
+ export { type BlockRegistry, type BlockRegistryEntry, COLUMN_STACK_ATTR, defineRegistry, type PropsOf, } from './blockRegistry';
2
2
  export { BLOCK_CATALOGUE, BlockCategory, type BlockCatalogueEntry, type BlockName, isKnownBlock, type UnresolvedBlock, type UnresolvedBlockReason, unresolvedReason, } from './blockCatalogue';
3
3
  export { type BlockDefinition, type BlockFactoryOptions, defineBlock, type UntranslatedBlockFactoryOptions, } from './defineBlock';
4
4
  export { getMergedProps } from './getMergedProps';
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,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"}
@@ -2,4 +2,5 @@ export { parseDescription, type ZodFormMetadata, type ZodRangeConfig, type ZodHi
2
2
  export { validateComponentSchema, type ValidationError, type ValidationIssue, type ValidationResult, } from './schemaValidator';
3
3
  export { registerComponentSchema, type RegisteredComponentSchema, } from './registeredSchema';
4
4
  export { FormFieldType, type FormFieldMetadata, extractFieldMetadata, extractFormMetadata, } from './zodUtils';
5
+ export { getBlockSchema, mapFieldsWithMetadata, type BlockSchema, type MetadataKey, } from './schemaRegistry';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAmBA,OAAO,iBAAiB,CAAA;AAExB,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,uBAAuB,EACvB,KAAK,yBAAyB,GAC/B,MAAM,oBAAoB,CAAA;AAK3B,OAAO,EACL,aAAa,EACb,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAmBA,OAAO,iBAAiB,CAAA;AAExB,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,uBAAuB,EACvB,KAAK,yBAAyB,GAC/B,MAAM,oBAAoB,CAAA;AAK3B,OAAO,EACL,aAAa,EACb,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,176 @@
1
+ import { BlockName } from '../registry/blockCatalogue';
2
+ import { RegisteredComponentSchema } from './registeredSchema';
3
+ declare const BLOCK_SCHEMAS: {
4
+ Accordion: RegisteredComponentSchema<{
5
+ items: {
6
+ id: string;
7
+ title: string;
8
+ content: string;
9
+ }[];
10
+ title?: string | undefined;
11
+ variant?: "h2" | "h3" | "h4" | undefined;
12
+ supportingText?: string | undefined;
13
+ accordionStyle?: "outline" | "solid" | undefined;
14
+ colorTheme?: "light" | "dark" | "neutral" | undefined;
15
+ connection?: "connected" | "separated" | undefined;
16
+ cornerStyle?: "rounded" | "square" | undefined;
17
+ dropdownPlacement?: "left" | "right" | undefined;
18
+ dropdownDirection?: "center" | "down" | undefined;
19
+ }>;
20
+ Header: RegisteredComponentSchema<{
21
+ title: string;
22
+ variant: "h2" | "h3" | "h4";
23
+ content?: string | undefined;
24
+ cornerStyle?: "rounded" | "square" | undefined;
25
+ alt?: string | undefined;
26
+ style?: "image" | "none" | "outline" | "solid" | undefined;
27
+ color?: "light" | "dark" | "neutral" | undefined;
28
+ align?: "left" | "center" | "right" | undefined;
29
+ subtitle?: string | undefined;
30
+ eyebrowStyle?: "all-caps" | "sentence-case" | "capitalized" | undefined;
31
+ imagePlacement?: "background" | "above" | "below" | undefined;
32
+ asset_id?: string | undefined;
33
+ isDecorative?: boolean | undefined;
34
+ }>;
35
+ CodeBlock: RegisteredComponentSchema<{
36
+ code: string;
37
+ language: "html" | "text" | "javascript" | "json" | "css" | "bash" | "yaml";
38
+ cornerStyle?: "rounded" | "square" | undefined;
39
+ header?: string | undefined;
40
+ }>;
41
+ FlashCards: RegisteredComponentSchema<{
42
+ cards: {
43
+ front: string;
44
+ back: string;
45
+ }[];
46
+ colorTheme?: "light" | "dark" | "neutral" | undefined;
47
+ cornerStyle?: "rounded" | "square" | undefined;
48
+ randomize?: boolean | undefined;
49
+ }>;
50
+ ImageBlock: RegisteredComponentSchema<{
51
+ alt: string;
52
+ size: number;
53
+ align: "left" | "center" | "right";
54
+ asset_id: string;
55
+ isDecorative: boolean;
56
+ ratio: "square" | "circle" | "landscape" | "portrait";
57
+ cornerStyle?: "rounded" | "square" | undefined;
58
+ }>;
59
+ KnowledgeCheckBlock: RegisteredComponentSchema<{
60
+ answers: {
61
+ id: string;
62
+ label: string;
63
+ isCorrect: boolean;
64
+ }[];
65
+ question: string;
66
+ cornerStyle?: "rounded" | "square" | undefined;
67
+ questionType?: "Multiple choice" | "True or false" | undefined;
68
+ answerOrder?: "set" | "random" | undefined;
69
+ headerStyle?: "light" | "dark" | "none" | undefined;
70
+ }>;
71
+ LayoutContainer: RegisteredComponentSchema<{
72
+ children?: any;
73
+ rowSpan?: number | undefined;
74
+ margin?: {
75
+ left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
76
+ right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
77
+ bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
78
+ top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
79
+ } | undefined;
80
+ order?: number | undefined;
81
+ columnSpan?: number | undefined;
82
+ gridColumn?: number | undefined;
83
+ gridRow?: number | undefined;
84
+ horizontalPosition?: "left" | "center" | "right" | undefined;
85
+ verticalPosition?: "normal" | "middle" | "bottom" | "top" | undefined;
86
+ backgroundStyle?: "none" | "primary" | "secondary" | undefined;
87
+ }>;
88
+ MixAndMatch: RegisteredComponentSchema<{
89
+ pairs: {
90
+ definition: string;
91
+ term: string;
92
+ }[];
93
+ colorTheme?: "light" | "dark" | "neutral" | undefined;
94
+ cornerStyle?: "rounded" | "square" | undefined;
95
+ randomizeCards?: "off" | "on" | undefined;
96
+ }>;
97
+ QuoteBlock: RegisteredComponentSchema<{
98
+ content: string;
99
+ colorTheme?: "light" | "dark" | "neutral" | undefined;
100
+ cornerStyle?: "rounded" | "square" | undefined;
101
+ align?: "left" | "center" | "right" | undefined;
102
+ author?: string | undefined;
103
+ quoteSize?: number | undefined;
104
+ decorationStyle?: "fill" | "none" | "sidebar" | undefined;
105
+ }>;
106
+ TabsBlock: RegisteredComponentSchema<{
107
+ tabs: {
108
+ id: string;
109
+ content: string;
110
+ label: string;
111
+ }[];
112
+ outline?: "none" | "outline" | undefined;
113
+ title?: string | undefined;
114
+ variant?: "h2" | "h3" | "h4" | undefined;
115
+ supportingText?: string | undefined;
116
+ cornerStyle?: "rounded" | "square" | undefined;
117
+ style?: "simple" | "folder" | "segments" | undefined;
118
+ color?: "light" | "dark" | "neutral" | undefined;
119
+ tabsRowBackground?: "none" | "filled" | undefined;
120
+ tabsWidth?: "relative" | "full-width" | undefined;
121
+ alignment?: "left" | "center" | undefined;
122
+ selectedTabStyle?: "outline" | "filled" | undefined;
123
+ selectedTabCorners?: "rounded" | "square" | "pill" | undefined;
124
+ }>;
125
+ Text: RegisteredComponentSchema<{
126
+ content: string;
127
+ colorTheme?: "light" | "dark" | "neutral" | undefined;
128
+ cornerStyle?: "rounded" | "square" | undefined;
129
+ textStyle?: "fill" | "none" | "outline" | undefined;
130
+ }>;
131
+ TwoColumn: RegisteredComponentSchema<{
132
+ children?: any;
133
+ cornerStyle?: "rounded" | "square" | undefined;
134
+ leftColumnWidth?: number | undefined;
135
+ mobileStackingOrder?: "left-first" | "right-first" | undefined;
136
+ gapSpacing?: "small" | "none" | "medium" | "large" | undefined;
137
+ containerStyle?: "none" | "outline" | "solid" | undefined;
138
+ backgroundColor?: "light" | "dark" | "neutral" | "none" | undefined;
139
+ }>;
140
+ VideoBlock: RegisteredComponentSchema<{
141
+ alt: string;
142
+ size: number;
143
+ source: "link" | "file";
144
+ align: "left" | "center" | "right";
145
+ asset_id: string;
146
+ cornerStyle?: "rounded" | "square" | undefined;
147
+ video_url?: string | undefined;
148
+ }>;
149
+ WidgetBlock: RegisteredComponentSchema<{
150
+ widgetType: string;
151
+ }>;
152
+ };
153
+ export type BlockSchema = (typeof BLOCK_SCHEMAS)[BlockName];
154
+ export declare function getBlockSchema(blockName: BlockName): BlockSchema | undefined;
155
+ /**
156
+ * The name of a boolean marker a prop's metadata can carry (e.g. `richtext`
157
+ * boolean marker from `.zodRichText()`).
158
+ */
159
+ export type MetadataKey = 'richtext' | 'attachmentIdField';
160
+ /**
161
+ * Apply `fn` to every value whose field metadata has `metadataKey` set in a block's props (nested
162
+ * fields included), and return a cloned, transformed props object (the input is not mutated). `fn`
163
+ * receives `{ key, value }` for each matching field and returns the new value.
164
+ *
165
+ * @example
166
+ * // sanitize every rich-text field's HTML in a stored block's props
167
+ * const clean = mapFieldsWithMetadata(schema, props, 'richtext', ({ value }) =>
168
+ * typeof value === 'string' ? sanitizeHtml(value) : value,
169
+ * )
170
+ */
171
+ export declare function mapFieldsWithMetadata<T extends object>(schema: BlockSchema, props: T, metadataKey: MetadataKey, fn: (field: {
172
+ key: string;
173
+ value: unknown;
174
+ }) => unknown): T;
175
+ export {};
176
+ //# sourceMappingURL=schemaRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaRegistry.d.ts","sourceRoot":"","sources":["../../src/schema/schemaRegistry.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,4BAA4B,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAGnE,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe8C,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,SAAS,CAAC,CAAA;AAE3D,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAE5E;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,mBAAmB,CAAA;AAoD1D;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EACpD,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,CAAC,EACR,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KAAK,OAAO,GACtD,CAAC,CAMH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schemaRegistry.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaRegistry.test.d.ts","sourceRoot":"","sources":["../../src/schema/schemaRegistry.test.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { RegisteredComponentSchema } from './registeredSchema';
2
3
  import { ZodFormMetadata } from './zodExtensions';
3
4
  /**
4
5
  * Unwraps ZodOptional, ZodDefault, ZodNullable wrappers to get the inner type
@@ -86,5 +87,5 @@ export declare function extractFieldMetadata(name: string, zodType: z.ZodTypeAny
86
87
  * This is the main function for generating forms from Zod schemas.
87
88
  * It returns metadata for each field that can be used to render form inputs.
88
89
  */
89
- export declare function extractFormMetadata(schema: z.ZodObject<z.ZodRawShape>): Record<string, FormFieldMetadata>;
90
+ export declare function extractFormMetadata(schema: z.ZodObject<z.ZodRawShape> | RegisteredComponentSchema<unknown>): Record<string, FormFieldMetadata>;
90
91
  //# sourceMappingURL=zodUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zodUtils.d.ts","sourceRoot":"","sources":["../../src/schema/zodUtils.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAC5B,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAExE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAajE;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC1D,UAAU,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,GAAG,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M,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAC/C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,GAAG,aAAa,CAyEpE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAsD7F;AA+FD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,GAAG,iBAAiB,CAmD3F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,yBAAyB,CAAC,OAAO,CAAC,GACtE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAWnC"}
@@ -1,3 +1,3 @@
1
- export { deriveBrandColorVariants } from './brandColorVariants';
1
+ export { BRAND_DARK_TEXT, deriveBrandColorVariants } from './brandColorVariants';
2
2
  export type { ColorVariant, ColorVariants } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/colorVariants/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/colorVariants/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAChF,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Viewer.d.ts","sourceRoot":"","sources":["../../src/viewer/Viewer.tsx"],"names":[],"mappings":"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Cb"}
package/locales/en.json CHANGED
@@ -2,6 +2,8 @@
2
2
  "placeholderContent": "Your content here...",
3
3
  "bannerPlaceholderTitle": "Your banner",
4
4
  "bannerPlaceholderSubtitle": "Your optional eyebrow text",
5
+ "bannerImageLoading": "Loading image...",
6
+ "bannerImageError": "Failed to load image",
5
7
  "quotePlaceholderContent": "Your quote here",
6
8
  "quotePlaceholderAuthor": "Author",
7
9
  "codeBlockPlaceholder": "// Your code here",
@@ -79,8 +81,6 @@
79
81
  "duplicate": "Duplicate",
80
82
  "deleteComponent": "Delete %{component}",
81
83
  "delete": "Delete",
82
- "deleteConfirmation": "Are you sure you want to delete this?",
83
- "cancel": "Cancel",
84
84
  "editComponent": "Edit %{component} component",
85
85
  "componentGroup": "%{component} component",
86
86
  "leftColumnLabel": "Left column",
@@ -148,7 +148,8 @@
148
148
  "aiAssistFor": "AI assist for %{componentType}",
149
149
  "aiActions": "AI Actions",
150
150
  "backToMenu": "Back to menu",
151
- "regenerateWithPrompt": "Regenerate with prompt",
151
+ "generateWithIdea": "Generate with an idea",
152
+ "closeAiActions": "Close AI actions",
152
153
  "changeTone": "Change tone",
153
154
  "changeLength": "Change length",
154
155
  "changeReadingLevel": "Change reading level",
@@ -162,7 +163,8 @@
162
163
  "readingNovice": "Novice reader (635L - 1160L)",
163
164
  "readingIntermediate": "Intermediate reader (925L - 1295L)",
164
165
  "readingAdvanced": "Advanced reader (1040L - 1440L)",
165
- "promptPlaceholder": "What would you like to change?",
166
+ "promptPlaceholder": "Describe your idea",
167
+ "promptCharacterCount": "%{count}/%{max}",
166
168
  "previewFirst": "Preview first",
167
169
  "send": "Send",
168
170
  "thinking": "Thinking…",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/platform-block-content-editor",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
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.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,7 +9,8 @@
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js"
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.js"
13
14
  },
14
15
  "./locales/en.json": "./locales/en.json"
15
16
  },
@@ -30,7 +31,7 @@
30
31
  "@instructure/ui-flex": "^11.0.0",
31
32
  "@instructure/ui-form-field": "^11.0.0",
32
33
  "@instructure/ui-heading": "^11.0.0",
33
- "@instructure/ui-icons": "^11.0.0",
34
+ "@instructure/ui-icons": "^11.7.0",
34
35
  "@instructure/ui-img": "^11.0.0",
35
36
  "@instructure/ui-modal": "^11.0.0",
36
37
  "@instructure/ui-number-input": "^11.0.0",