@instructure/platform-block-content-editor 1.1.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/dist/components/blocks/Banner/Banner.d.ts +5 -2
- package/dist/components/blocks/Banner/Banner.d.ts.map +1 -1
- package/dist/components/blocks/Banner/bannerPropsSchema.d.ts +41 -4
- package/dist/components/blocks/Banner/bannerPropsSchema.d.ts.map +1 -1
- package/dist/components/blocks/Banner/bannerTranslations.d.ts +4 -0
- package/dist/components/blocks/Banner/bannerTranslations.d.ts.map +1 -1
- package/dist/components/blocks/Banner/createBannerBlock.d.ts +8 -1
- package/dist/components/blocks/Banner/createBannerBlock.d.ts.map +1 -1
- package/dist/components/blocks/Banner/getBannerViewProps.d.ts +48 -2
- package/dist/components/blocks/Banner/getBannerViewProps.d.ts.map +1 -1
- package/dist/components/blocks/KnowledgeCheck/createKnowledgeCheckBlock.d.ts +1 -1
- package/dist/components/blocks/KnowledgeCheck/knowledgeCheckPropsSchema.d.ts +3 -3
- package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts.map +1 -1
- package/dist/components/blocks/Text/getTextViewProps.d.ts.map +1 -1
- package/dist/components/blocks/commonViewProps.d.ts +12 -0
- package/dist/components/blocks/commonViewProps.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 +3 -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 +5587 -5420
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/schemaRegistry.d.ts +173 -0
- package/dist/schema/schemaRegistry.d.ts.map +1 -0
- package/dist/schema/schemaRegistry.test.d.ts +2 -0
- package/dist/schema/schemaRegistry.test.d.ts.map +1 -0
- package/dist/schema/zodUtils.d.ts +2 -1
- package/dist/schema/zodUtils.d.ts.map +1 -1
- 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 +2 -3
- package/package.json +3 -2
- package/dist/editor/preview/previewTranslations.d.ts +0 -18
- package/dist/editor/preview/previewTranslations.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -105,15 +105,27 @@ block-level AI (`BlockAIMenu`, `useGenerateAltText`).
|
|
|
105
105
|
|
|
106
106
|
## Preview — the host presents it
|
|
107
107
|
|
|
108
|
-
`PreviewArea` is a framed student preview over the read-path `Viewer
|
|
109
|
-
|
|
110
|
-
the
|
|
108
|
+
`PreviewArea` is a framed student preview over the read-path `Viewer`, sized from a required,
|
|
109
|
+
controlled `viewport` prop (`'desktop' | 'mobile'`). It renders no switch of its own — the host
|
|
110
|
+
builds the Desktop/Mobile toggle and drives `viewport` from its own state. The package ships
|
|
111
|
+
**no modal**: how the preview is presented (modal, drawer, fullscreen, inline) is the host's choice.
|
|
111
112
|
|
|
112
113
|
```tsx
|
|
113
|
-
import { PreviewArea } from '@instructure/platform-block-content-editor'
|
|
114
|
+
import { PreviewArea, PREVIEW_VIEWPORTS, type PreviewViewport } from '@instructure/platform-block-content-editor'
|
|
115
|
+
|
|
116
|
+
const [viewport, setViewport] = useState<PreviewViewport>(PREVIEW_VIEWPORTS.DESKTOP)
|
|
114
117
|
|
|
115
118
|
<Modal open={previewing} onDismiss={…}>
|
|
116
|
-
<
|
|
119
|
+
<div role="group" aria-label="Preview viewport">
|
|
120
|
+
<Button onClick={() => setViewport(PREVIEW_VIEWPORTS.DESKTOP)}>Desktop</Button>
|
|
121
|
+
<Button onClick={() => setViewport(PREVIEW_VIEWPORTS.MOBILE)}>Mobile</Button>
|
|
122
|
+
</div>
|
|
123
|
+
<PreviewArea
|
|
124
|
+
templateLayout={engine.templateLayout}
|
|
125
|
+
templateData={engine.templateData}
|
|
126
|
+
componentRegistry={registry}
|
|
127
|
+
viewport={viewport}
|
|
128
|
+
/>
|
|
117
129
|
</Modal>
|
|
118
130
|
```
|
|
119
131
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BannerProps } from './bannerPropsSchema';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Presentational banner: optional eyebrow, a semantic h2-h4 heading, optional supporting text,
|
|
4
|
+
* and — for the `image` style — a host-resolved image behind or stacked with the text.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Banner({ title, variant, subtitle, content, color, cornerStyle, align, eyebrowStyle, style, imagePlacement, asset_id, isDecorative, alt, }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/Banner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/Banner.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAItD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAiB,EACjB,WAAuB,EACvB,KAAc,EACd,YAAyB,EACzB,KAAc,EACd,cAA6B,EAC7B,QAAQ,EACR,YAAoB,EACpB,GAAG,GACJ,EAAE,WAAW,2CAsJb"}
|
|
@@ -1,34 +1,71 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** Letter casing applied to the eyebrow text. */
|
|
3
|
+
export declare const BannerEyebrowStyleSchema: z.ZodEnum<["all-caps", "sentence-case", "capitalized"]>;
|
|
4
|
+
/** How the banner surface is decorated. `image` is the only value that reveals the image fields. */
|
|
5
|
+
export declare const BannerStyleSchema: z.ZodEnum<["none", "outline", "solid", "image"]>;
|
|
6
|
+
/** Where the image sits relative to the banner text. */
|
|
7
|
+
export declare const BannerImagePlacementSchema: z.ZodEnum<["background", "above", "below"]>;
|
|
2
8
|
export declare const BannerPropsSchema: z.ZodObject<{
|
|
3
9
|
title: z.ZodString;
|
|
4
10
|
variant: z.ZodDefault<z.ZodEnum<["h2", "h3", "h4"]>>;
|
|
5
11
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
12
|
+
eyebrowStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["all-caps", "sentence-case", "capitalized"]>>>;
|
|
6
13
|
content: z.ZodOptional<z.ZodString>;
|
|
7
|
-
|
|
14
|
+
align: z.ZodOptional<z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>>;
|
|
8
15
|
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
16
|
+
style: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "outline", "solid", "image"]>>>;
|
|
17
|
+
color: z.ZodOptional<z.ZodDefault<z.ZodEnum<["light", "dark", "neutral"]>>>;
|
|
18
|
+
imagePlacement: z.ZodOptional<z.ZodDefault<z.ZodEnum<["background", "above", "below"]>>>;
|
|
19
|
+
asset_id: z.ZodOptional<z.ZodString>;
|
|
20
|
+
isDecorative: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
21
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
9
22
|
}, "strip", z.ZodTypeAny, {
|
|
10
23
|
title: string;
|
|
11
24
|
variant: "h2" | "h3" | "h4";
|
|
12
25
|
content?: string | undefined;
|
|
13
26
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
27
|
+
alt?: string | undefined;
|
|
28
|
+
style?: "image" | "none" | "outline" | "solid" | undefined;
|
|
29
|
+
color?: "light" | "dark" | "neutral" | undefined;
|
|
30
|
+
align?: "left" | "center" | "right" | undefined;
|
|
14
31
|
subtitle?: string | undefined;
|
|
15
|
-
|
|
32
|
+
eyebrowStyle?: "all-caps" | "sentence-case" | "capitalized" | undefined;
|
|
33
|
+
imagePlacement?: "background" | "above" | "below" | undefined;
|
|
34
|
+
asset_id?: string | undefined;
|
|
35
|
+
isDecorative?: boolean | undefined;
|
|
16
36
|
}, {
|
|
17
37
|
title: string;
|
|
18
38
|
content?: string | undefined;
|
|
19
39
|
variant?: "h2" | "h3" | "h4" | undefined;
|
|
20
40
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
41
|
+
alt?: string | undefined;
|
|
42
|
+
style?: "image" | "none" | "outline" | "solid" | undefined;
|
|
43
|
+
color?: "light" | "dark" | "neutral" | undefined;
|
|
44
|
+
align?: "left" | "center" | "right" | undefined;
|
|
21
45
|
subtitle?: string | undefined;
|
|
22
|
-
|
|
46
|
+
eyebrowStyle?: "all-caps" | "sentence-case" | "capitalized" | undefined;
|
|
47
|
+
imagePlacement?: "background" | "above" | "below" | undefined;
|
|
48
|
+
asset_id?: string | undefined;
|
|
49
|
+
isDecorative?: boolean | undefined;
|
|
23
50
|
}>;
|
|
24
51
|
export type BannerProps = z.infer<typeof BannerPropsSchema>;
|
|
52
|
+
export type BannerStyle = z.infer<typeof BannerStyleSchema>;
|
|
53
|
+
export type BannerEyebrowStyle = z.infer<typeof BannerEyebrowStyleSchema>;
|
|
54
|
+
export type BannerImagePlacement = z.infer<typeof BannerImagePlacementSchema>;
|
|
25
55
|
export declare const BannerDefaultProps: BannerProps;
|
|
26
56
|
export declare const RegisteredBannerPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
27
57
|
title: string;
|
|
28
58
|
variant: "h2" | "h3" | "h4";
|
|
29
59
|
content?: string | undefined;
|
|
30
60
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
61
|
+
alt?: string | undefined;
|
|
62
|
+
style?: "image" | "none" | "outline" | "solid" | undefined;
|
|
63
|
+
color?: "light" | "dark" | "neutral" | undefined;
|
|
64
|
+
align?: "left" | "center" | "right" | undefined;
|
|
31
65
|
subtitle?: string | undefined;
|
|
32
|
-
|
|
66
|
+
eyebrowStyle?: "all-caps" | "sentence-case" | "capitalized" | undefined;
|
|
67
|
+
imagePlacement?: "background" | "above" | "below" | undefined;
|
|
68
|
+
asset_id?: string | undefined;
|
|
69
|
+
isDecorative?: boolean | undefined;
|
|
33
70
|
}>;
|
|
34
71
|
//# sourceMappingURL=bannerPropsSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bannerPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/bannerPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AASvB,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"bannerPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/bannerPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AASvB,iDAAiD;AACjD,eAAO,MAAM,wBAAwB,yDAAuD,CAAA;AAE5F,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,kDAAgD,CAAA;AAE9E,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,6CAA2C,CAAA;AAWlF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkF5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACzE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,EAAE,WAYhC,CAAA;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;EAAuD,CAAA"}
|
|
@@ -7,6 +7,10 @@ export interface BannerTranslations {
|
|
|
7
7
|
bannerPlaceholderTitle: string;
|
|
8
8
|
/** Placeholder eyebrow shown in the designer when a Banner block is empty. */
|
|
9
9
|
bannerPlaceholderSubtitle: string;
|
|
10
|
+
/** Announced while a Banner's image is loading. */
|
|
11
|
+
bannerImageLoading: string;
|
|
12
|
+
/** Shown when a Banner's image fails to load. */
|
|
13
|
+
bannerImageError: string;
|
|
10
14
|
}
|
|
11
15
|
/** English bundled with this package — also the source for `locales/en.json`. */
|
|
12
16
|
export declare const BannerEnglish: BannerTranslations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bannerTranslations.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/bannerTranslations.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,yBAAyB,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"bannerTranslations.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/bannerTranslations.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,yBAAyB,EAAE,MAAM,CAAA;IACjC,mDAAmD;IACnD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,iDAAiD;IACjD,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,iFAAiF;AACjF,eAAO,MAAM,aAAa,EAAE,kBAK3B,CAAA"}
|
|
@@ -8,7 +8,14 @@ export declare const createBannerBlock: (options: import('../../..').BlockFactor
|
|
|
8
8
|
variant: "h2" | "h3" | "h4";
|
|
9
9
|
content?: string | undefined;
|
|
10
10
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
11
|
+
alt?: string | undefined;
|
|
12
|
+
style?: "image" | "none" | "outline" | "solid" | undefined;
|
|
13
|
+
color?: "light" | "dark" | "neutral" | undefined;
|
|
14
|
+
align?: "left" | "center" | "right" | undefined;
|
|
11
15
|
subtitle?: string | undefined;
|
|
12
|
-
|
|
16
|
+
eyebrowStyle?: "all-caps" | "sentence-case" | "capitalized" | undefined;
|
|
17
|
+
imagePlacement?: "background" | "above" | "below" | undefined;
|
|
18
|
+
asset_id?: string | undefined;
|
|
19
|
+
isDecorative?: boolean | undefined;
|
|
13
20
|
}>;
|
|
14
21
|
//# sourceMappingURL=createBannerBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBannerBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/createBannerBlock.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"createBannerBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/createBannerBlock.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAM5B,CAAA"}
|
|
@@ -1,4 +1,50 @@
|
|
|
1
|
+
import { Text as UIText } from '@instructure/ui-text';
|
|
2
|
+
import { View } from '@instructure/ui-view';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
1
4
|
import { BlockRenderProps } from '../brandTheming';
|
|
2
|
-
import {
|
|
3
|
-
|
|
5
|
+
import { Align, ColorTheme, CornerStyle } from '../commonSchemas';
|
|
6
|
+
import { BannerEyebrowStyle, BannerImagePlacement, BannerStyle } from './bannerPropsSchema';
|
|
7
|
+
type ViewProps = ComponentProps<typeof View>;
|
|
8
|
+
type UITextProps = ComponentProps<typeof UIText>;
|
|
9
|
+
/** The eyebrow line's casing and tracking. */
|
|
10
|
+
export interface BannerEyebrowTypography {
|
|
11
|
+
transform: NonNullable<UITextProps['transform']>;
|
|
12
|
+
letterSpacing: NonNullable<UITextProps['letterSpacing']>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The filled box drawn around the text for the `image` style. `display` decides whether it
|
|
16
|
+
* hugs its text (over a background image) or spans the banner (stacked above/below one).
|
|
17
|
+
*/
|
|
18
|
+
export type BannerPanelViewProps = BlockRenderProps['view'] & {
|
|
19
|
+
display: Extract<NonNullable<ViewProps['display']>, 'block' | 'inline-block'>;
|
|
20
|
+
};
|
|
21
|
+
/** The shared container/text pair, plus the alignment and eyebrow tokens Banner adds. */
|
|
22
|
+
export interface BannerViewProps {
|
|
23
|
+
view: BlockRenderProps['view'] & {
|
|
24
|
+
textAlign: NonNullable<ViewProps['textAlign']>;
|
|
25
|
+
};
|
|
26
|
+
text: BlockRenderProps['text'];
|
|
27
|
+
eyebrow: BannerEyebrowTypography;
|
|
28
|
+
/** Set only for the `image` style, whose fill moves off the container onto this box. */
|
|
29
|
+
panel?: BannerPanelViewProps;
|
|
30
|
+
/** Set only for a stacked image; a background one is sized by the banner, not itself. */
|
|
31
|
+
image?: {
|
|
32
|
+
height: string;
|
|
33
|
+
borderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Named options rather than positionals, as in TabsBlock — the list keeps growing. */
|
|
37
|
+
export interface BannerStyleOptions {
|
|
38
|
+
style: BannerStyle;
|
|
39
|
+
color: ColorTheme;
|
|
40
|
+
cornerStyle: CornerStyle;
|
|
41
|
+
align: Align;
|
|
42
|
+
eyebrowStyle: BannerEyebrowStyle;
|
|
43
|
+
imagePlacement: BannerImagePlacement;
|
|
44
|
+
/** Whether a file is chosen — the `image` style only takes effect once one is. */
|
|
45
|
+
hasImage: boolean;
|
|
46
|
+
brandColor?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function getBannerViewProps(options: BannerStyleOptions): BannerViewProps;
|
|
49
|
+
export {};
|
|
4
50
|
//# sourceMappingURL=getBannerViewProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBannerViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/getBannerViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,iBAAiB,CAAA;AACtE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"getBannerViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/getBannerViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,iBAAiB,CAAA;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEhG,KAAK,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,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kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,eAAe,CAuC/E"}
|
|
@@ -11,8 +11,8 @@ export declare const createKnowledgeCheckBlock: (options: import('../../..').Blo
|
|
|
11
11
|
}[];
|
|
12
12
|
question: string;
|
|
13
13
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
14
|
-
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
15
14
|
questionType?: "Multiple choice" | "True or false" | undefined;
|
|
16
15
|
answerOrder?: "set" | "random" | undefined;
|
|
16
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
//# sourceMappingURL=createKnowledgeCheckBlock.d.ts.map
|
|
@@ -46,9 +46,9 @@ export declare const KnowledgeCheckPropsSchema: z.ZodObject<{
|
|
|
46
46
|
}[];
|
|
47
47
|
question: string;
|
|
48
48
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
49
|
-
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
50
49
|
questionType?: "Multiple choice" | "True or false" | undefined;
|
|
51
50
|
answerOrder?: "set" | "random" | undefined;
|
|
51
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
answers: {
|
|
54
54
|
id: string;
|
|
@@ -57,9 +57,9 @@ export declare const KnowledgeCheckPropsSchema: z.ZodObject<{
|
|
|
57
57
|
}[];
|
|
58
58
|
question: string;
|
|
59
59
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
60
|
-
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
61
60
|
questionType?: "Multiple choice" | "True or false" | undefined;
|
|
62
61
|
answerOrder?: "set" | "random" | undefined;
|
|
62
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
63
63
|
}>;
|
|
64
64
|
export type KnowledgeCheckProps = z.infer<typeof KnowledgeCheckPropsSchema>;
|
|
65
65
|
export type KnowledgeCheckAnswer = z.infer<typeof KnowledgeCheckAnswerSchema>;
|
|
@@ -80,8 +80,8 @@ export declare const RegisteredKnowledgeCheckPropsSchema: import('../../..').Reg
|
|
|
80
80
|
}[];
|
|
81
81
|
question: string;
|
|
82
82
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
83
|
-
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
84
83
|
questionType?: "Multiple choice" | "True or false" | undefined;
|
|
85
84
|
answerOrder?: "set" | "random" | undefined;
|
|
85
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
86
86
|
}>;
|
|
87
87
|
//# sourceMappingURL=knowledgeCheckPropsSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTextViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Text/getTextViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,
|
|
1
|
+
{"version":3,"file":"getTextViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Text/getTextViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,iBAAiB,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAOlB"}
|
|
@@ -22,6 +22,18 @@ export interface MediaBlockViewProps {
|
|
|
22
22
|
* text on whatever surface sits behind it.
|
|
23
23
|
*/
|
|
24
24
|
export declare function getHeaderStyleStyling(headerStyle: HeaderStyle, brandColor?: string): Styling;
|
|
25
|
+
/**
|
|
26
|
+
* How a block decorates its surface. Each block maps its own enum onto this — Text's
|
|
27
|
+
* `fill` and Banner's `solid` are the same treatment.
|
|
28
|
+
*/
|
|
29
|
+
export type SurfaceStyle = 'none' | 'outline' | 'fill';
|
|
30
|
+
/**
|
|
31
|
+
* Styling for a surface/color pair, where the surface treatment is an option of its own
|
|
32
|
+
* rather than implied by the color (as `getHeaderStyleStyling` has it). A brand color
|
|
33
|
+
* themes `light` and `dark`; `neutral` is intentionally never branded. Shared by Text and
|
|
34
|
+
* Banner so the two can't drift apart.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getSurfaceStyling(surface: SurfaceStyle, color: ColorTheme, brandColor?: string): Styling;
|
|
25
37
|
export interface ThemedContainer {
|
|
26
38
|
styling: Styling;
|
|
27
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonViewProps.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/commonViewProps.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,IAAI,EAAE,M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,CAAA;IAChB;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe,CAiBjB"}
|
|
@@ -10,8 +10,11 @@ export interface BlockContentEditorProps<HostToolId extends string = never> {
|
|
|
10
10
|
engine: UseBlockEditorStateReturn;
|
|
11
11
|
/** The registry the document's blocks resolve against (same one passed to `useBlockEditorState`). */
|
|
12
12
|
registry: BlockRegistry;
|
|
13
|
-
/** Host tools
|
|
14
|
-
*
|
|
13
|
+
/** Host tools — the host-tool slot (a widget tray, the IgniteAI Assistant). Rendered
|
|
14
|
+
* alongside the built-ins in one rail; the built-ins carry `priority` 0-3, so a host tool
|
|
15
|
+
* with no `priority` set renders after all four (e.g. a widget tray), while one that sets a
|
|
16
|
+
* lower `priority` renders before them (e.g. an Assistant docked at the top of the rail).
|
|
17
|
+
* Block-level AI is gated on the `AIAction` seam, not on a tool. */
|
|
15
18
|
tools?: Tool<HostToolId>[];
|
|
16
19
|
/** Which built-in trays to render, as a subset of `BUILT_IN_TOOL_IDS`; defaults to all four.
|
|
17
20
|
* Rendered in the canonical order regardless of the order given (e.g. a dashboard passes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockContentEditor.d.ts","sourceRoot":"","sources":["../../src/editor/BlockContentEditor.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,aAAa,CAAA;AAOnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAQjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,+DAAgE,CAAA;AAC9F,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAmC9D,MAAM,WA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,uBAAuB,CAAC,UAAU,CAAC,2CAoPrC"}
|
|
@@ -9,23 +9,20 @@ export interface PreviewAreaProps {
|
|
|
9
9
|
componentRegistry: BlockRegistry;
|
|
10
10
|
/** Shown as the page title above the rendered document. */
|
|
11
11
|
objectName?: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
* pass it — with `onViewportChange` — for the host to drive the switch instead.
|
|
15
|
-
*/
|
|
16
|
-
viewport?: PreviewViewport;
|
|
17
|
-
/** Called when the built-in switch changes viewport (fires in both modes). */
|
|
18
|
-
onViewportChange?: (viewport: PreviewViewport) => void;
|
|
12
|
+
/** Which device width the frame simulates. Controlled — the host owns the switch UI that drives it. */
|
|
13
|
+
viewport: PreviewViewport;
|
|
19
14
|
/** Forwarded to the `Viewer` — one call per node the registry could not resolve. */
|
|
20
15
|
onUnresolvedBlock?: (block: UnresolvedBlock) => void;
|
|
21
16
|
}
|
|
22
17
|
/**
|
|
23
18
|
* The learner-facing preview of an authored document: a shaded "student browser" frame around
|
|
24
|
-
* the read-path `Viewer`,
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
19
|
+
* the read-path `Viewer`, resized to the `viewport` prop. It renders no switch of its own — the
|
|
20
|
+
* host decides how to offer Desktop/Mobile (or any other) selection and drives `viewport`
|
|
21
|
+
* accordingly. It is an inline area — how it is presented (modal, drawer, fullscreen, inline) and
|
|
22
|
+
* any surrounding chrome is the host's choice. Brand color, translations and host data hooks come
|
|
23
|
+
* from the host's own providers above it, exactly as for the `Viewer`; no `theme`/`isEditMode` is
|
|
24
|
+
* injected. The `Viewer` runs with designer mode off so blocks render their student — not
|
|
25
|
+
* authoring — state.
|
|
29
26
|
*/
|
|
30
|
-
export declare function PreviewArea({ templateLayout, templateData, componentRegistry, objectName, viewport,
|
|
27
|
+
export declare function PreviewArea({ templateLayout, templateData, componentRegistry, objectName, viewport, onUnresolvedBlock, }: PreviewAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
31
28
|
//# sourceMappingURL=PreviewArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewArea.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/PreviewArea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PreviewArea.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/PreviewArea.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAE9F,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,aAAa,CAAA;AAGnE,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,cAAc,EAAE,UAAU,EAAE,CAAA;IAC5B,kEAAkE;IAClE,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,iFAAiF;IACjF,iBAAiB,EAAE,aAAa,CAAA;IAChC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uGAAuG;IACvG,QAAQ,EAAE,eAAe,CAAA;IACzB,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;CACrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,iBAAiB,GAClB,EAAE,gBAAgB,2CA2BlB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { PreviewArea, type PreviewAreaProps } from './PreviewArea';
|
|
2
2
|
export { PREVIEW_VIEWPORTS, type PreviewViewport, VIEWPORT_WIDTHS } from './constants';
|
|
3
|
-
export { type DesignerPreviewTranslations, DesignerPreviewEnglish, } from './previewTranslations';
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The student preview's chrome CSS: the outer column, the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
2
|
+
* The student preview's chrome CSS: the outer column, the shaded "student browser" frame whose
|
|
3
|
+
* width the host-driven `viewport` prop animates, and the white page surface that scrolls the
|
|
4
|
+
* rendered document. None of it is expressible in InstUI props — it needs a gradient background,
|
|
5
|
+
* an animated `max-width` and a media query — so, like the canvas and tool panel chrome, it is
|
|
6
|
+
* injected once as a global stylesheet keyed by stable class names. The per-viewport width varies
|
|
7
|
+
* at runtime and is fed in as the `FRAME_WIDTH_VAR` custom property (not an inline `max-width`,
|
|
8
|
+
* which would outrank the phone media query below).
|
|
9
9
|
*/
|
|
10
10
|
export declare const PREVIEW_CLASS: {
|
|
11
11
|
readonly root: "bce-preview";
|
|
12
|
-
readonly header: "bce-preview-header";
|
|
13
12
|
readonly frame: "bce-preview-frame";
|
|
14
13
|
readonly topNav: "bce-preview-top-nav";
|
|
15
14
|
readonly page: "bce-preview-page";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewStyles.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/previewStyles.tsx"],"names":[],"mappings":"AAoBA;;;;;;;;GAQG;AAEH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"previewStyles.d.ts","sourceRoot":"","sources":["../../../src/editor/preview/previewStyles.tsx"],"names":[],"mappings":"AAoBA;;;;;;;;GAQG;AAEH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAA;AAEV,eAAO,MAAM,eAAe,8BAA8B,CAAA;AAqB1D,yEAAyE;AACzE,wBAAgB,mBAAmB,4CAyDlC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { DesignerSideBarProps, ToolPanelHandle } from './types';
|
|
3
|
+
/** True when the viewport is below the medium breakpoint (mobile layout active). */
|
|
4
|
+
export declare function useIsCompactLayout(enabled?: boolean): boolean;
|
|
3
5
|
/**
|
|
4
6
|
* The designer sidebar: a collapsible tool panel on desktop (icon rail + resizable content)
|
|
5
7
|
* and a slide-up overlay + bottom toolbar on mobile. Built-in trays and any host tools are
|
|
6
8
|
* supplied through `tools`. Each open tool gets its own `DesignerNavProvider` (keyed by tool
|
|
7
9
|
* id, so switching tools resets navigation) and `ToolHeaderActionsProvider`.
|
|
8
10
|
*/
|
|
9
|
-
declare function DesignerSideBarInner<ID extends string>({ tools, initialSelectedToolId, height, toolStyle, isFullScreenMode, hasExpandPanelButton, onToolChange, onFullWidthChange, isPanelResizeEnabled, selectedToolId: controlledSelectedToolId, onSelectedToolIdChange, view, onViewChange, renderContentInActiveLayoutOnly, controlledExpandedWidth, contentKey, onBack, }: DesignerSideBarProps<ID>, ref: Ref<ToolPanelHandle<ID>>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DesignerSideBarInner<ID extends string>({ tools: unsortedTools, initialSelectedToolId, height, toolStyle, isFullScreenMode, hasExpandPanelButton, onToolChange, onFullWidthChange, isPanelResizeEnabled, selectedToolId: controlledSelectedToolId, onSelectedToolIdChange, view, onViewChange, renderContentInActiveLayoutOnly, controlledExpandedWidth, contentKey, onBack, }: DesignerSideBarProps<ID>, ref: Ref<ToolPanelHandle<ID>>): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
/**
|
|
11
13
|
* `forwardRef` erases the generic, so re-assert it on the exported component: callers keep
|
|
12
14
|
* `Tool<ID>` inference and a typed imperative handle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignerSideBar.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/panel/DesignerSideBar.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAIL,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"DesignerSideBar.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/panel/DesignerSideBar.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAIL,KAAK,GAAG,EAQT,MAAM,OAAO,CAAA;AAYd,OAAO,KAAK,EAAE,oBAAoB,EAAQ,eAAe,EAAE,MAAM,SAAS,CAAA;AAuB1E,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,OAAO,UAAO,GAAG,OAAO,CAmB1D;AAED;;;;;GAKG;AACH,iBAAS,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAC7C,EACE,KAAK,EAAE,aAAa,EACpB,qBAAqB,EACrB,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,oBAA2B,EAC3B,cAAc,EAAE,wBAAwB,EACxC,sBAAsB,EACtB,IAAI,EACJ,YAAY,EACZ,+BAAsC,EACtC,uBAAuB,EACvB,UAAU,EACV,MAAM,GACP,EAAE,oBAAoB,CAAC,EAAE,CAAC,EAC3B,GAAG,EAAE,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,2CA0W9B;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAuC,CAAC,EAAE,SAAS,MAAM,EACnF,KAAK,EAAE,oBAAoB,CAAC,EAAE,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,KACjE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -14,6 +14,9 @@ export interface Tool<ID extends string> {
|
|
|
14
14
|
id: ID;
|
|
15
15
|
/** Rail tooltip + header title, already translated. */
|
|
16
16
|
title: string;
|
|
17
|
+
/** Rail position, lowest first; ties keep the given array order. Omitted sorts after every
|
|
18
|
+
* tool that sets one, in the order given — a host tool with no `priority` renders last. */
|
|
19
|
+
priority?: number;
|
|
17
20
|
icon: ReactNode;
|
|
18
21
|
/** Shown in the rail while this tool is active; falls back to `icon`. */
|
|
19
22
|
activeIcon?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/panel/types.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE5E;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI,CAAC,EAAE,SAAS,MAAM;IACrC,EAAE,EAAE,EAAE,CAAA;IACN,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;IACf,yEAAyE;IACzE,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,qEAAqE;IACrE,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,sEAAsE;IACtE,WAAW,CAAC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,QAAQ,EACR,KAAK,GACN,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"BlockTray.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/BlockTray.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAMpE;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,QAAQ,EAAE,aAAa,CAAA;IACvB,8FAA8F;IAC9F,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,6FAA6F;IAC7F,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACtD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9E;AAED,UAAU,sBAAuB,SAAQ,cAAc;IACrD,QAAQ,EAAE,aAAa,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,sBAAsB,2CAoCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplatesPanel.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/TemplatesPanel.tsx"],"names":[],"mappings":"AAuBA,sFAAsF;AACtF,wBAAgB,cAAc,
|
|
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"}
|