@instructure/platform-block-content-editor 3.6.0 → 4.0.1

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 (113) hide show
  1. package/README.md +72 -17
  2. package/dist/editor/BlockContentEditor.d.ts +16 -8
  3. package/dist/editor/BlockContentEditor.d.ts.map +1 -1
  4. package/dist/editor/ai/AIGenerationContext.d.ts +46 -0
  5. package/dist/editor/ai/AIGenerationContext.d.ts.map +1 -0
  6. package/dist/editor/ai/BlockAIMenu.d.ts.map +1 -1
  7. package/dist/editor/ai/BlockGenerationOverlay.d.ts +16 -0
  8. package/dist/editor/ai/BlockGenerationOverlay.d.ts.map +1 -0
  9. package/dist/editor/ai/PreviewBlockModal.d.ts +2 -7
  10. package/dist/editor/ai/PreviewBlockModal.d.ts.map +1 -1
  11. package/dist/editor/ai/aiTranslations.d.ts +17 -0
  12. package/dist/editor/ai/aiTranslations.d.ts.map +1 -1
  13. package/dist/editor/ai/aiTypes.d.ts +2 -0
  14. package/dist/editor/ai/aiTypes.d.ts.map +1 -1
  15. package/dist/editor/ai/generationOverlayStyles.d.ts +18 -0
  16. package/dist/editor/ai/generationOverlayStyles.d.ts.map +1 -0
  17. package/dist/editor/ai/index.d.ts +2 -1
  18. package/dist/editor/ai/index.d.ts.map +1 -1
  19. package/dist/editor/ai/previewBlockStyles.d.ts +17 -0
  20. package/dist/editor/ai/previewBlockStyles.d.ts.map +1 -0
  21. package/dist/editor/ai/previewDiff.d.ts +73 -0
  22. package/dist/editor/ai/previewDiff.d.ts.map +1 -0
  23. package/dist/editor/ai/previewDiff.test.d.ts +2 -0
  24. package/dist/editor/ai/previewDiff.test.d.ts.map +1 -0
  25. package/dist/editor/canvas/DesignerArea.d.ts +8 -6
  26. package/dist/editor/canvas/DesignerArea.d.ts.map +1 -1
  27. package/dist/editor/canvas/DesignerCanvas.d.ts +2 -6
  28. package/dist/editor/canvas/DesignerCanvas.d.ts.map +1 -1
  29. package/dist/editor/canvas/GridDndContext.d.ts +0 -1
  30. package/dist/editor/canvas/GridDndContext.d.ts.map +1 -1
  31. package/dist/editor/canvas/GridDndProvider.d.ts +8 -3
  32. package/dist/editor/canvas/GridDndProvider.d.ts.map +1 -1
  33. package/dist/editor/canvas/GridItemChild.d.ts.map +1 -1
  34. package/dist/editor/canvas/GridItemContainer.d.ts.map +1 -1
  35. package/dist/editor/canvas/GridViewer.d.ts +5 -16
  36. package/dist/editor/canvas/GridViewer.d.ts.map +1 -1
  37. package/dist/editor/canvas/TwoColumnDesigner.d.ts +1 -6
  38. package/dist/editor/canvas/TwoColumnDesigner.d.ts.map +1 -1
  39. package/dist/editor/canvas/canvasStyles.d.ts +3 -0
  40. package/dist/editor/canvas/canvasStyles.d.ts.map +1 -1
  41. package/dist/editor/canvas/index.d.ts +1 -0
  42. package/dist/editor/canvas/index.d.ts.map +1 -1
  43. package/dist/editor/history/types.d.ts +6 -0
  44. package/dist/editor/history/types.d.ts.map +1 -1
  45. package/dist/editor/history/undoRedoManager.d.ts.map +1 -1
  46. package/dist/editor/history/useUndoRedo.d.ts +3 -4
  47. package/dist/editor/history/useUndoRedo.d.ts.map +1 -1
  48. package/dist/editor/index.d.ts +9 -4
  49. package/dist/editor/index.d.ts.map +1 -1
  50. package/dist/editor/sidebar/form/ComponentEditorForm.d.ts +3 -2
  51. package/dist/editor/sidebar/form/ComponentEditorForm.d.ts.map +1 -1
  52. package/dist/editor/sidebar/form/fieldRendererUtils.d.ts +2 -1
  53. package/dist/editor/sidebar/form/fieldRendererUtils.d.ts.map +1 -1
  54. package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts +1 -1
  55. package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts.map +1 -1
  56. package/dist/editor/sidebar/panel/ToolContentContainer.d.ts.map +1 -1
  57. package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts.map +1 -1
  58. package/dist/editor/sidebar/panel/panelStyles.d.ts +1 -0
  59. package/dist/editor/sidebar/panel/panelStyles.d.ts.map +1 -1
  60. package/dist/editor/sidebar/panel/types.d.ts +3 -0
  61. package/dist/editor/sidebar/panel/types.d.ts.map +1 -1
  62. package/dist/editor/sidebar/sidebarTranslations.d.ts +0 -8
  63. package/dist/editor/sidebar/sidebarTranslations.d.ts.map +1 -1
  64. package/dist/editor/sidebar/tray/BlockTray.d.ts +3 -4
  65. package/dist/editor/sidebar/tray/BlockTray.d.ts.map +1 -1
  66. package/dist/editor/sidebar/tray/SharedTrayComponents.d.ts +1 -1
  67. package/dist/editor/sidebar/tray/blockDefinitions.d.ts.map +1 -1
  68. package/dist/editor/sidebar/tray/index.d.ts +0 -2
  69. package/dist/editor/sidebar/tray/index.d.ts.map +1 -1
  70. package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts +10 -1
  71. package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts.map +1 -1
  72. package/dist/editor/state/blockDataStore.d.ts +13 -0
  73. package/dist/editor/state/blockDataStore.d.ts.map +1 -0
  74. package/dist/editor/state/blockDataStore.test.d.ts +2 -0
  75. package/dist/editor/state/blockDataStore.test.d.ts.map +1 -0
  76. package/dist/editor/state/selectionContext.d.ts +5 -0
  77. package/dist/editor/state/selectionContext.d.ts.map +1 -0
  78. package/dist/editor/state/selectionStore.d.ts +11 -0
  79. package/dist/editor/state/selectionStore.d.ts.map +1 -0
  80. package/dist/editor/state/useBlockData.d.ts +13 -0
  81. package/dist/editor/state/useBlockData.d.ts.map +1 -0
  82. package/dist/editor/state/useBlockEditorState.d.ts +10 -5
  83. package/dist/editor/state/useBlockEditorState.d.ts.map +1 -1
  84. package/dist/editor/state/useUndoRedoState.d.ts +9 -0
  85. package/dist/editor/state/useUndoRedoState.d.ts.map +1 -0
  86. package/dist/editor/state/useUndoRedoState.test.d.ts +2 -0
  87. package/dist/editor/state/useUndoRedoState.test.d.ts.map +1 -0
  88. package/dist/index.d.ts +0 -1
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +8543 -7647
  91. package/dist/registry/blockCatalogue.d.ts +1 -6
  92. package/dist/registry/blockCatalogue.d.ts.map +1 -1
  93. package/dist/registry/templateTypes.d.ts +2 -2
  94. package/dist/schema/schemaRegistry.d.ts +0 -17
  95. package/dist/schema/schemaRegistry.d.ts.map +1 -1
  96. package/dist/viewer/viewerStyles.d.ts +0 -3
  97. package/dist/viewer/viewerStyles.d.ts.map +1 -1
  98. package/locales/en.json +11 -5
  99. package/package.json +4 -2
  100. package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts +0 -3
  101. package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts.map +0 -1
  102. package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts +0 -22
  103. package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts.map +0 -1
  104. package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts +0 -32
  105. package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts.map +0 -1
  106. package/dist/components/blocks/LayoutContainer/index.d.ts +0 -5
  107. package/dist/components/blocks/LayoutContainer/index.d.ts.map +0 -1
  108. package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts +0 -118
  109. package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts.map +0 -1
  110. package/dist/editor/sidebar/tray/LayoutTray.d.ts +0 -4
  111. package/dist/editor/sidebar/tray/LayoutTray.d.ts.map +0 -1
  112. package/dist/editor/sidebar/tray/TemplatesPanel.d.ts +0 -4
  113. package/dist/editor/sidebar/tray/TemplatesPanel.d.ts.map +0 -1
@@ -10,7 +10,6 @@
10
10
  */
11
11
  /** Grouping used by an authoring UI's block tray. */
12
12
  export declare const BlockCategory: {
13
- readonly LAYOUT: "layout";
14
13
  readonly ACTIVITY_CONTENT: "activityContent";
15
14
  readonly INTERACTIVE_CONTENT: "interactiveContent";
16
15
  readonly WIDGET: "widget";
@@ -38,12 +37,8 @@ export interface BlockCatalogueEntry {
38
37
  * label by definition.
39
38
  */
40
39
  export declare const BLOCK_CATALOGUE: readonly [{
41
- readonly wireName: "LayoutContainer";
42
- readonly category: "layout";
43
- readonly acceptsChildren: true;
44
- }, {
45
40
  readonly wireName: "TwoColumn";
46
- readonly category: "layout";
41
+ readonly category: "activityContent";
47
42
  readonly acceptsChildren: true;
48
43
  }, {
49
44
  readonly wireName: "Header";
@@ -1 +1 @@
1
- {"version":3,"file":"blockCatalogue.d.ts","sourceRoot":"","sources":["../../src/registry/blockCatalogue.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;GASG;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;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,aAAa,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBuB,CAAA;AAEnD,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;AAWpE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,SAAS,CAI5D;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAEnF;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"}
1
+ {"version":3,"file":"blockCatalogue.d.ts","sourceRoot":"","sources":["../../src/registry/blockCatalogue.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;GASG;AAEH,qDAAqD;AACrD,eAAO,MAAM,aAAa;;;;CAIhB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE9E,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,aAAa,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBuB,CAAA;AAEnD,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;AAWpE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,SAAS,CAI5D;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAEnF;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"}
@@ -9,15 +9,15 @@ declare const GridPositionPropsSchema: z.ZodObject<{
9
9
  }, "strict", z.ZodTypeAny, {
10
10
  rowSpan?: number | undefined;
11
11
  order?: number | undefined;
12
- columnSpan?: number | undefined;
13
12
  gridColumn?: number | undefined;
14
13
  gridRow?: number | undefined;
14
+ columnSpan?: number | undefined;
15
15
  }, {
16
16
  rowSpan?: number | undefined;
17
17
  order?: number | undefined;
18
- columnSpan?: number | undefined;
19
18
  gridColumn?: number | undefined;
20
19
  gridRow?: number | undefined;
20
+ columnSpan?: number | undefined;
21
21
  }>;
22
22
  /**
23
23
  * Where a node sits in the designer's grid. Structure, never content — see the
@@ -68,23 +68,6 @@ declare const BLOCK_SCHEMAS: {
68
68
  answerOrder?: "set" | "random" | undefined;
69
69
  headerStyle?: "light" | "dark" | "none" | undefined;
70
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
71
  MixAndMatch: RegisteredComponentSchema<{
89
72
  pairs: {
90
73
  definition: string;
@@ -1 +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"}
1
+ {"version":3,"file":"schemaRegistry.d.ts","sourceRoot":"","sources":["../../src/schema/schemaRegistry.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,4BAA4B,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAGnE,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc8C,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"}
@@ -4,9 +4,6 @@
4
4
  * adjacent-sibling margin on the `.bce-block` class every block already carries reaches root
5
5
  * siblings and nested ones the same way, since it matches on the class, not on depth — and
6
6
  * naturally skips the first block in any list, sibling or not.
7
- *
8
- * A container that already gaps its own children (`LayoutContainer`'s `inner`) opts out via
9
- * `data-bce-block-gap="self"`, so its flex/grid gap and this margin never stack.
10
7
  */
11
8
  export declare function ViewerSpacingStyles(): import("react/jsx-runtime").JSX.Element;
12
9
  //# sourceMappingURL=viewerStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewerStyles.d.ts","sourceRoot":"","sources":["../../src/viewer/viewerStyles.tsx"],"names":[],"mappings":"AAsBA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,4CAUlC"}
1
+ {"version":3,"file":"viewerStyles.d.ts","sourceRoot":"","sources":["../../src/viewer/viewerStyles.tsx"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,4CAOlC"}
package/locales/en.json CHANGED
@@ -87,7 +87,6 @@
87
87
  "leftColumnLabel": "Left column",
88
88
  "rightColumnLabel": "Right column",
89
89
  "dropBlocksHere": "Drop blocks here",
90
- "templatesComingSoon": "Coming soon: ready-made templates from your organization.",
91
90
  "previous": "Previous",
92
91
  "next": "Next",
93
92
  "itemSubtitle": "%{itemName} %{number}",
@@ -139,10 +138,7 @@
139
138
  "resizeToolPanel": "Resize tool panel",
140
139
  "basicBlocksTool": "Basic blocks",
141
140
  "interactiveBlocksTool": "Interactive blocks",
142
- "layoutBlocksTool": "Layout blocks",
143
- "templatesTool": "Templates",
144
141
  "basicBlocksIntro": "Format content with these basic blocks.",
145
- "layoutBlocksIntro": "Organize your content into columns.",
146
142
  "interactiveBlocksIntro": "Engage learners with interactive non-scored activities.",
147
143
  "addBlock": "Add %{name}",
148
144
  "generateBlockWithAi": "Generate a %{name} with AI",
@@ -171,13 +167,23 @@
171
167
  "send": "Send",
172
168
  "thinking": "Thinking…",
173
169
  "stop": "Stop",
170
+ "previewReady": "Preview ready",
171
+ "openPreview": "Open",
172
+ "discardResult": "Discard",
173
+ "blockUpdated": "Block updated",
174
+ "blockUpdatedAlert": "Block has been updated",
174
175
  "generationFailed": "Failed to generate. Please try again.",
175
- "previewBlock": "Preview block",
176
+ "previewBlock": "Preview",
176
177
  "compareLabel": "Compare versions",
177
178
  "both": "Both",
178
179
  "before": "Before",
179
180
  "after": "After",
181
+ "showChanges": "Show changes",
182
+ "diffRemoved": "Removed",
183
+ "diffAdded": "Added",
184
+ "diffChanged": "Changed",
180
185
  "previewCancel": "Cancel",
186
+ "rejectAndClose": "Reject and close",
181
187
  "acceptAndReplace": "Accept and replace",
182
188
  "refinementPlaceholder": "What changes would you like to make?",
183
189
  "regenerate": "Regenerate",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/platform-block-content-editor",
3
- "version": "3.6.0",
3
+ "version": "4.0.1",
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",
@@ -69,9 +69,9 @@
69
69
  "@instructure/platform-sanitize": "^0.7.1"
70
70
  },
71
71
  "devDependencies": {
72
+ "@emotion/cache": "11.14.0",
72
73
  "@emotion/react": "11.14.0",
73
74
  "@instructure/emotion": "11.7.4",
74
- "@types/lodash": "^4.17.24",
75
75
  "@instructure/ui-a11y-content": "11.7.4",
76
76
  "@instructure/ui-alerts": "11.7.4",
77
77
  "@instructure/ui-buttons": "11.7.4",
@@ -83,6 +83,7 @@
83
83
  "@instructure/ui-icons": "11.7.4",
84
84
  "@instructure/ui-img": "11.7.4",
85
85
  "@instructure/ui-instructure": "11.7.4",
86
+ "@instructure/ui-menu": "11.7.4",
86
87
  "@instructure/ui-modal": "11.7.4",
87
88
  "@instructure/ui-number-input": "11.7.4",
88
89
  "@instructure/ui-popover": "11.7.4",
@@ -103,6 +104,7 @@
103
104
  "@testing-library/jest-dom": "^6.9.1",
104
105
  "@testing-library/react": "^16.3.0",
105
106
  "@testing-library/user-event": "^14.5.0",
107
+ "@types/lodash": "^4.17.24",
106
108
  "@types/react": "^18.3.0",
107
109
  "@types/react-dom": "^18.3.0",
108
110
  "@vitejs/plugin-react": "^4.2.0",
@@ -1,3 +0,0 @@
1
- import { LayoutContainerProps } from './layoutContainerPropsSchema';
2
- export declare function LayoutContainer({ children, horizontalPosition, verticalPosition, margin, backgroundStyle, columnSpan, rowSpan, gridColumn, gridRow, order, }: LayoutContainerProps): import("react/jsx-runtime").JSX.Element | null;
3
- //# sourceMappingURL=LayoutContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/LayoutContainer/LayoutContainer.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAExE,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EAMR,kBAA6B,EAC7B,gBAA2B,EAC3B,MAAM,EACN,eAAwB,EACxB,UAAU,EACV,OAAO,EACP,UAAU,EACV,OAAO,EACP,KAAK,GACN,EAAE,oBAAoB,kDAwDtB"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Registry entry factory for LayoutContainer, registered under the wire name `LayoutContainer` — that string is
3
- * what stored documents contain, and renaming it orphans them. It owns no strings, so none are asked for.
4
- */
5
- export declare const createLayoutContainerBlock: (options: import('../../..').UntranslatedBlockFactoryOptions) => import('../../..').BlockRegistryEntry<{
6
- children?: any;
7
- rowSpan?: number | undefined;
8
- margin?: {
9
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
10
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
11
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
12
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
13
- } | undefined;
14
- order?: number | undefined;
15
- columnSpan?: number | undefined;
16
- gridColumn?: number | undefined;
17
- gridRow?: number | undefined;
18
- horizontalPosition?: "left" | "center" | "right" | undefined;
19
- verticalPosition?: "normal" | "middle" | "bottom" | "top" | undefined;
20
- backgroundStyle?: "none" | "primary" | "secondary" | undefined;
21
- }>;
22
- //# sourceMappingURL=createLayoutContainerBlock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createLayoutContainerBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/LayoutContainer/createLayoutContainerBlock.ts"],"names":[],"mappings":"AAyBA;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAKrC,CAAA"}
@@ -1,32 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- import { BlockRenderProps } from '../brandTheming';
3
- import { BackgroundStyle, HorizontalPosition, Margin, VerticalPosition } from './layoutContainerPropsSchema';
4
- export interface GridPosition {
5
- columnSpan?: number;
6
- rowSpan?: number;
7
- gridColumn?: number;
8
- gridRow?: number;
9
- order?: number;
10
- }
11
- /**
12
- * Carries no paired text color, unlike a content block's view props. This block holds other
13
- * blocks, and each of those resolves its own colors from the theme — an ancestor's color
14
- * never reaches them, because every block paints its own `View`, and InstUI pins a `color`
15
- * for each background variant including `transparent`.
16
- */
17
- export interface LayoutContainerViewProps {
18
- container: BlockRenderProps['view'];
19
- /** An InstUI shorthand, not CSS: one spacing token per edge, in CSS order. */
20
- margin: string;
21
- /**
22
- * Where the block sits in the parent grid — and itself a single-cell grid, so the surface
23
- * it holds is a grid item: the box type that both takes `horizontalPosition` as an
24
- * alignment and stretches to *cell minus margins* rather than overflowing the cell by
25
- * them, as `height: 100%` would.
26
- */
27
- outer: CSSProperties;
28
- /** The column the nested blocks are stacked in. */
29
- inner: CSSProperties;
30
- }
31
- export declare function getLayoutContainerViewProps(backgroundStyle: BackgroundStyle, gridPosition: GridPosition, brandColor?: string, horizontalPosition?: HorizontalPosition, verticalPosition?: VerticalPosition, margin?: Margin): LayoutContainerViewProps;
32
- //# sourceMappingURL=getLayoutContainerViewProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLayoutContainerViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/LayoutContainer/getLayoutContainerViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EACL,KAAK,gBAAgB,EAOtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,MAAM,EAEN,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAgIrC,MAAM,WAAW,YAAY;IAC3B,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;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACnC,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,KAAK,EAAE,aAAa,CAAA;IACpB,mDAAmD;IACnD,KAAK,EAAE,aAAa,CAAA;CACrB;AAED,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,UAAU,CAAC,EAAE,MAAM,EACnB,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,MAAM,CAAC,EAAE,MAAM,GACd,wBAAwB,CA6B1B"}
@@ -1,5 +0,0 @@
1
- export { LayoutContainer } from './LayoutContainer';
2
- export { LayoutContainerDefaultProps, RegisteredLayoutContainerPropsSchema, } from './layoutContainerPropsSchema';
3
- export type { LayoutContainerProps } from './layoutContainerPropsSchema';
4
- export { createLayoutContainerBlock } from './createLayoutContainerBlock';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/LayoutContainer/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,GACrC,MAAM,8BAA8B,CAAA;AAIrC,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAGxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,118 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { z } from 'zod';
3
- /**
4
- * Wire format, so the names stay even though they no longer describe the rendered size —
5
- * see `MARGIN_SPACING` for what each resolves to.
6
- */
7
- export declare const SpacingSchema: z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>;
8
- export type Spacing = z.infer<typeof SpacingSchema>;
9
- export declare const BackgroundStyleSchema: z.ZodEnum<["none", "primary", "secondary"]>;
10
- export type BackgroundStyle = z.infer<typeof BackgroundStyleSchema>;
11
- export declare const HorizontalPositionSchema: z.ZodEnum<["center", "left", "right"]>;
12
- export type HorizontalPosition = z.infer<typeof HorizontalPositionSchema>;
13
- export declare const VerticalPositionSchema: z.ZodEnum<["normal", "middle", "top", "bottom"]>;
14
- export type VerticalPosition = z.infer<typeof VerticalPositionSchema>;
15
- declare const MarginSchema: z.ZodOptional<z.ZodObject<{
16
- top: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
17
- right: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
18
- bottom: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
19
- left: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
20
- }, "strip", z.ZodTypeAny, {
21
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
22
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
23
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
24
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
25
- }, {
26
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
27
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
28
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
29
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
30
- }>>;
31
- export type Margin = z.infer<typeof MarginSchema>;
32
- export declare const LayoutContainerPropsSchema: z.ZodObject<{
33
- children: z.ZodAny;
34
- horizontalPosition: z.ZodOptional<z.ZodDefault<z.ZodEnum<["center", "left", "right"]>>>;
35
- verticalPosition: z.ZodOptional<z.ZodDefault<z.ZodEnum<["normal", "middle", "top", "bottom"]>>>;
36
- margin: z.ZodOptional<z.ZodObject<{
37
- top: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
38
- right: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
39
- bottom: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
40
- left: z.ZodOptional<z.ZodEnum<["none", "xsmall", "small", "medium", "large", "xlarge", "xxlarge"]>>;
41
- }, "strip", z.ZodTypeAny, {
42
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
43
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
44
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
45
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
46
- }, {
47
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
48
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
49
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
50
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
51
- }>>;
52
- backgroundStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "primary", "secondary"]>>>;
53
- } & {
54
- columnSpan: z.ZodOptional<z.ZodNumber>;
55
- rowSpan: z.ZodOptional<z.ZodNumber>;
56
- gridColumn: z.ZodOptional<z.ZodNumber>;
57
- gridRow: z.ZodOptional<z.ZodNumber>;
58
- order: z.ZodOptional<z.ZodNumber>;
59
- }, "strip", z.ZodTypeAny, {
60
- children?: any;
61
- rowSpan?: number | undefined;
62
- margin?: {
63
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
64
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
65
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
66
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
67
- } | undefined;
68
- order?: number | undefined;
69
- columnSpan?: number | undefined;
70
- gridColumn?: number | undefined;
71
- gridRow?: number | undefined;
72
- horizontalPosition?: "left" | "center" | "right" | undefined;
73
- verticalPosition?: "normal" | "middle" | "bottom" | "top" | undefined;
74
- backgroundStyle?: "none" | "primary" | "secondary" | undefined;
75
- }, {
76
- children?: any;
77
- rowSpan?: number | undefined;
78
- margin?: {
79
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
80
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
81
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
82
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
83
- } | undefined;
84
- order?: number | undefined;
85
- columnSpan?: number | undefined;
86
- gridColumn?: number | undefined;
87
- gridRow?: number | undefined;
88
- horizontalPosition?: "left" | "center" | "right" | undefined;
89
- verticalPosition?: "normal" | "middle" | "bottom" | "top" | undefined;
90
- backgroundStyle?: "none" | "primary" | "secondary" | undefined;
91
- }>;
92
- /**
93
- * `children` is retyped off the schema's `z.any()`: the host passes React nodes, and the
94
- * declaration emitter needs a public name for the resulting intersection.
95
- */
96
- export type LayoutContainerProps = Omit<z.infer<typeof LayoutContainerPropsSchema>, 'children'> & {
97
- children?: ReactNode;
98
- };
99
- export declare const LayoutContainerDefaultProps: Omit<LayoutContainerProps, 'children'>;
100
- export declare const RegisteredLayoutContainerPropsSchema: import('../../..').RegisteredComponentSchema<{
101
- children?: any;
102
- rowSpan?: number | undefined;
103
- margin?: {
104
- left?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
105
- right?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
106
- bottom?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
107
- top?: "small" | "none" | "medium" | "large" | "xsmall" | "xlarge" | "xxlarge" | undefined;
108
- } | undefined;
109
- order?: number | undefined;
110
- columnSpan?: number | undefined;
111
- gridColumn?: number | undefined;
112
- gridRow?: number | undefined;
113
- horizontalPosition?: "left" | "center" | "right" | undefined;
114
- verticalPosition?: "normal" | "middle" | "bottom" | "top" | undefined;
115
- backgroundStyle?: "none" | "primary" | "secondary" | undefined;
116
- }>;
117
- export {};
118
- //# sourceMappingURL=layoutContainerPropsSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutContainerPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/LayoutContainer/layoutContainerPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;GAGG;AACH,eAAO,MAAM,aAAa,gFAQxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEnD,eAAO,MAAM,qBAAqB,6CAA2C,CAAA;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,wBAAwB,wCAAsC,CAAA;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,eAAO,MAAM,sBAAsB,kDAAgD,CAAA;AACnF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;GAOL,CAAA;AAEb,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAejD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BN,CAAA;AAEjC;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,EAAE,UAAU,CAAC,GAAG;IAChG,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAI9E,CAAA;AAID,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;EAGhD,CAAA"}
@@ -1,4 +0,0 @@
1
- import { BlockTrayProps } from './BlockTray';
2
- /** The layout blocks tray (LayoutContainer, TwoColumn). */
3
- export declare function LayoutTray(props: BlockTrayProps): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=LayoutTray.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutTray.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/LayoutTray.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5D,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAG/C"}
@@ -1,4 +0,0 @@
1
- /** Placeholder tray panel for organization templates, which are not yet available. */
2
- export declare function TemplatesPanel(): import("react/jsx-runtime").JSX.Element;
3
- export default TemplatesPanel;
4
- //# sourceMappingURL=TemplatesPanel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TemplatesPanel.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/TemplatesPanel.tsx"],"names":[],"mappings":"AAuBA,sFAAsF;AACtF,wBAAgB,cAAc,4CAU7B;AAED,eAAe,cAAc,CAAA"}