@instructure/platform-block-content-editor 1.1.0 → 2.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.
- package/README.md +17 -5
- package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts.map +1 -1
- package/dist/editor/BlockContentEditor.d.ts +5 -2
- package/dist/editor/BlockContentEditor.d.ts.map +1 -1
- package/dist/editor/preview/PreviewArea.d.ts +10 -13
- package/dist/editor/preview/PreviewArea.d.ts.map +1 -1
- package/dist/editor/preview/index.d.ts +0 -1
- package/dist/editor/preview/index.d.ts.map +1 -1
- package/dist/editor/preview/previewStyles.d.ts +7 -8
- package/dist/editor/preview/previewStyles.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts +1 -1
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/types.d.ts +3 -0
- package/dist/editor/sidebar/panel/types.d.ts.map +1 -1
- package/dist/editor/sidebar/tray/BlockTray.d.ts.map +1 -1
- package/dist/editor/sidebar/tray/TemplatesPanel.d.ts.map +1 -1
- package/dist/index.js +4242 -4253
- package/dist/viewer/Viewer.d.ts +3 -1
- package/dist/viewer/Viewer.d.ts.map +1 -1
- package/dist/viewer/viewerStyles.d.ts +12 -0
- package/dist/viewer/viewerStyles.d.ts.map +1 -0
- package/locales/en.json +0 -3
- package/package.json +1 -1
- package/dist/editor/preview/previewTranslations.d.ts +0 -18
- package/dist/editor/preview/previewTranslations.d.ts.map +0 -1
package/dist/viewer/Viewer.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ export interface ViewerProps {
|
|
|
21
21
|
* Emits no wrapper of its own — the blocks are direct layout children of whatever the
|
|
22
22
|
* host puts them in, so the host's own container keeps full control of layout, and any
|
|
23
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.
|
|
24
|
+
* heading styles) belongs on that container rather than in here. It does mount one global
|
|
25
|
+
* stylesheet for inter-block spacing (see `viewerStyles`) — that gap is the package's own
|
|
26
|
+
* concern, not the host's, since it is what the designer canvas already shows an author.
|
|
25
27
|
*/
|
|
26
28
|
export declare function Viewer({ templateLayout, templateData, componentRegistry, onUnresolvedBlock, }: ViewerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
29
|
//# sourceMappingURL=Viewer.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAGzE,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;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,EACrB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,WAAW,kDAoCb"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inter-block spacing for the read path, where `Viewer` emits no wrapper to hang a `gap` on
|
|
3
|
+
* (a block is a direct layout child of whatever holds it — see `Viewer`'s docstring). An
|
|
4
|
+
* adjacent-sibling margin on the `.bce-block` class every block already carries reaches root
|
|
5
|
+
* siblings and nested ones the same way, since it matches on the class, not on depth — and
|
|
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
|
+
*/
|
|
11
|
+
export declare function ViewerSpacingStyles(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=viewerStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewerStyles.d.ts","sourceRoot":"","sources":["../../src/viewer/viewerStyles.tsx"],"names":[],"mappings":"AAsBA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,4CAUlC"}
|
package/locales/en.json
CHANGED
|
@@ -145,9 +145,6 @@
|
|
|
145
145
|
"interactiveBlocksIntro": "Engage learners with interactive non-scored activities.",
|
|
146
146
|
"addBlock": "Add %{name}",
|
|
147
147
|
"skipToSelectedComponent": "Skip to selected component",
|
|
148
|
-
"desktop": "Desktop",
|
|
149
|
-
"mobile": "Mobile",
|
|
150
|
-
"viewportLabel": "Preview viewport",
|
|
151
148
|
"aiAssistFor": "AI assist for %{componentType}",
|
|
152
149
|
"aiActions": "AI Actions",
|
|
153
150
|
"backToMenu": "Back to menu",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/platform-block-content-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.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",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Strings the package owns for the student preview chrome — the viewport switch that is not
|
|
3
|
-
* part of any one block. Consumed via `useBlockTranslations(DesignerPreviewEnglish)`, the same
|
|
4
|
-
* mechanism blocks use; there is deliberately no second translation context. The host overrides
|
|
5
|
-
* by placing a `BlockTranslationsProvider` above the preview; anything it omits falls back to
|
|
6
|
-
* the English below.
|
|
7
|
-
*/
|
|
8
|
-
export interface DesignerPreviewTranslations {
|
|
9
|
-
/** Label for the desktop option of the viewport switch. */
|
|
10
|
-
desktop: string;
|
|
11
|
-
/** Label for the mobile option of the viewport switch. */
|
|
12
|
-
mobile: string;
|
|
13
|
-
/** Accessible group label for the desktop/mobile viewport switch. */
|
|
14
|
-
viewportLabel: string;
|
|
15
|
-
}
|
|
16
|
-
/** English bundled with this package — also the source for `locales/en.json`. */
|
|
17
|
-
export declare const DesignerPreviewEnglish: DesignerPreviewTranslations;
|
|
18
|
-
//# sourceMappingURL=previewTranslations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"previewTranslations.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/previewTranslations.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IAC1C,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAA;IACf,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,2BAIpC,CAAA"}
|