@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.
- 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/Quote/Quote.d.ts +1 -1
- package/dist/components/blocks/Quote/Quote.d.ts.map +1 -1
- package/dist/components/blocks/Quote/createQuoteBlock.d.ts +4 -1
- package/dist/components/blocks/Quote/createQuoteBlock.d.ts.map +1 -1
- package/dist/components/blocks/Quote/getQuoteViewProps.d.ts +16 -2
- package/dist/components/blocks/Quote/getQuoteViewProps.d.ts.map +1 -1
- package/dist/components/blocks/Quote/quotePropsSchema.d.ts +25 -5
- package/dist/components/blocks/Quote/quotePropsSchema.d.ts.map +1 -1
- package/dist/components/blocks/Text/getTextViewProps.d.ts.map +1 -1
- package/dist/components/blocks/TwoColumn/createTwoColumnBlock.d.ts.map +1 -1
- package/dist/components/blocks/TwoColumn/twoColumnStyles.d.ts.map +1 -1
- package/dist/components/blocks/brandTheming.d.ts +11 -0
- package/dist/components/blocks/brandTheming.d.ts.map +1 -1
- package/dist/components/blocks/commonSchemas.d.ts +2 -2
- package/dist/components/blocks/commonSchemas.d.ts.map +1 -1
- package/dist/components/blocks/commonViewProps.d.ts +19 -1
- package/dist/components/blocks/commonViewProps.d.ts.map +1 -1
- package/dist/editor/BlockContentEditor.d.ts.map +1 -1
- package/dist/editor/ai/BlockAIMenu.d.ts +25 -1
- package/dist/editor/ai/BlockAIMenu.d.ts.map +1 -1
- package/dist/editor/ai/BlockAIMenuContent.d.ts +5 -1
- package/dist/editor/ai/BlockAIMenuContent.d.ts.map +1 -1
- package/dist/editor/ai/PanelAIMenu.d.ts +30 -0
- package/dist/editor/ai/PanelAIMenu.d.ts.map +1 -0
- package/dist/editor/ai/PreviewBlockModal.d.ts.map +1 -1
- package/dist/editor/ai/aiMenuStyles.d.ts +39 -2
- package/dist/editor/ai/aiMenuStyles.d.ts.map +1 -1
- package/dist/editor/ai/aiTranslations.d.ts +6 -2
- package/dist/editor/ai/aiTranslations.d.ts.map +1 -1
- package/dist/editor/ai/constants.d.ts +17 -0
- package/dist/editor/ai/constants.d.ts.map +1 -1
- package/dist/editor/ai/isBlockEmpty.d.ts +10 -0
- package/dist/editor/ai/isBlockEmpty.d.ts.map +1 -0
- package/dist/editor/ai/isBlockEmpty.test.d.ts +2 -0
- package/dist/editor/ai/isBlockEmpty.test.d.ts.map +1 -0
- package/dist/editor/ai/isItemEmpty.d.ts +18 -0
- package/dist/editor/ai/isItemEmpty.d.ts.map +1 -0
- package/dist/editor/ai/isItemEmpty.test.d.ts +2 -0
- package/dist/editor/ai/isItemEmpty.test.d.ts.map +1 -0
- package/dist/editor/ai/useBlockAIPopover.d.ts +7 -1
- package/dist/editor/ai/useBlockAIPopover.d.ts.map +1 -1
- package/dist/editor/canvas/GridItemChild.d.ts +2 -2
- package/dist/editor/canvas/GridItemChild.d.ts.map +1 -1
- package/dist/editor/canvas/canvasTranslations.d.ts +1 -5
- package/dist/editor/canvas/canvasTranslations.d.ts.map +1 -1
- package/dist/editor/sidebar/form/ComponentEditorForm.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts +2 -0
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/ToolContentContainer.d.ts +5 -3
- package/dist/editor/sidebar/panel/ToolContentContainer.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/ToolHeader.d.ts +2 -1
- package/dist/editor/sidebar/panel/ToolHeader.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts +6 -0
- package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts.map +1 -1
- package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts.map +1 -1
- package/dist/index.js +6738 -6172
- package/dist/registry/blockRegistry.d.ts +11 -7
- package/dist/registry/blockRegistry.d.ts.map +1 -1
- package/dist/registry/defineBlock.d.ts +1 -1
- package/dist/registry/defineBlock.d.ts.map +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/schemaRegistry.d.ts +176 -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/utils/colorVariants/index.d.ts +1 -1
- package/dist/utils/colorVariants/index.d.ts.map +1 -1
- package/dist/viewer/Viewer.d.ts.map +1 -1
- package/locales/en.json +6 -4
- package/package.json +4 -3
|
@@ -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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CAAC,EAAE,oBAAoB,CAAA;IAC5B,yFAAyF;IACzF,KAAK,CAAC,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;KACrD,CAAA;CACF;AAED,uFAAuF;AACvF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,UAAU,CAAA;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,kBAAkB,CAAA;IAChC,cAAc,EAAE,oBAAoB,CAAA;IACpC,kFAAkF;IAClF,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAoCD,wBAAgB,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,4 +1,4 @@
|
|
|
1
1
|
import { QuoteProps } from './quotePropsSchema';
|
|
2
2
|
/** Presentational blockquote with optional attribution; placeholder in empty designer mode. */
|
|
3
|
-
export declare function Quote({ content, author, decorationStyle, cornerStyle, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function Quote({ content, author, decorationStyle, cornerStyle, colorTheme, align, quoteSize, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=Quote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Quote.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/Quote.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Quote.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/Quote.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAsC,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAcxF,+FAA+F;AAC/F,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,MAAM,EACN,eAAwB,EACxB,WAAuB,EACvB,UAAoB,EACpB,KAAc,EACd,SAA8B,GAC/B,EAAE,UAAU,2CA0DZ"}
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const createQuoteBlock: (options: import('../../..').BlockFactoryOptions<import('./quoteTranslations').QuoteTranslations>) => import('../../..').BlockRegistryEntry<{
|
|
7
7
|
content: string;
|
|
8
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
8
9
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
10
|
+
align?: "left" | "center" | "right" | undefined;
|
|
9
11
|
author?: string | undefined;
|
|
10
|
-
|
|
12
|
+
quoteSize?: number | undefined;
|
|
13
|
+
decorationStyle?: "fill" | "none" | "sidebar" | undefined;
|
|
11
14
|
}>;
|
|
12
15
|
//# sourceMappingURL=createQuoteBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createQuoteBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/createQuoteBlock.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"createQuoteBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/createQuoteBlock.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;EAM3B,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { BlockRenderProps } from '../brandTheming';
|
|
2
|
-
import { CornerStyle } from '../commonSchemas';
|
|
2
|
+
import { Align, ColorTheme, CornerStyle } from '../commonSchemas';
|
|
3
3
|
import { QuoteDecorationStyle } from './quotePropsSchema';
|
|
4
|
-
export declare function getQuoteViewProps(decorationStyle: QuoteDecorationStyle, cornerStyle: CornerStyle, brandColor?: string): BlockRenderProps;
|
|
4
|
+
export declare function getQuoteViewProps(decorationStyle: QuoteDecorationStyle, cornerStyle: CornerStyle, colorTheme?: ColorTheme, brandColor?: string): BlockRenderProps;
|
|
5
|
+
export interface QuoteAlignmentProps {
|
|
6
|
+
quote: 'start' | 'center' | 'end';
|
|
7
|
+
author: 'center' | 'end';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The author trails the quote at the end of the line for both 'left' and 'right' —
|
|
11
|
+
* opposite the text when left-aligned, beside it when right-aligned — and only
|
|
12
|
+
* centers when the quote itself centers.
|
|
13
|
+
*
|
|
14
|
+
* 'sidebar' ignores `align` and pins left: its accent bar reads as the start of the
|
|
15
|
+
* line, and the host hides the Alignment control for it, so a value persisted under
|
|
16
|
+
* another style must not keep applying.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getQuoteAlignment(decorationStyle?: QuoteDecorationStyle, align?: Align): QuoteAlignmentProps;
|
|
5
19
|
//# sourceMappingURL=getQuoteViewProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getQuoteViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/getQuoteViewProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getQuoteViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/getQuoteViewProps.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,KAAK,gBAAgB,EAKtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAkC9D,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,oBAAoB,EACrC,WAAW,EAAE,WAAW,EACxB,UAAU,GAAE,UAAoB,EAChC,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAiClB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACjC,MAAM,EAAE,QAAQ,GAAG,KAAK,CAAA;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,eAAe,GAAE,oBAA6B,EAC9C,KAAK,GAAE,KAAc,GACpB,mBAAmB,CAMrB"}
|
|
@@ -1,28 +1,48 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const QuoteDecorationStyleSchema: z.ZodEnum<["none", "
|
|
2
|
+
export declare const QuoteDecorationStyleSchema: z.ZodEnum<["none", "fill", "sidebar"]>;
|
|
3
|
+
export declare const QUOTE_SIZE_MIN = 16;
|
|
4
|
+
export declare const QUOTE_SIZE_MAX = 32;
|
|
5
|
+
export declare const QUOTE_SIZE_STEP = 2;
|
|
6
|
+
/** InstUI's `fontSizeXLarge` (1.75rem), the size the quote rendered at before
|
|
7
|
+
* `quoteSize` existed — so the default leaves existing quotes unchanged. */
|
|
8
|
+
export declare const QUOTE_SIZE_DEFAULT = 28;
|
|
9
|
+
/** `.parse()` is not on the render path, so the schema's min/max never run. */
|
|
10
|
+
export declare function clampQuoteSize(size: number): number;
|
|
3
11
|
export declare const QuotePropsSchema: z.ZodObject<{
|
|
4
12
|
content: z.ZodString;
|
|
5
13
|
author: z.ZodOptional<z.ZodString>;
|
|
6
|
-
|
|
14
|
+
quoteSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
15
|
+
decorationStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "fill", "sidebar"]>>>;
|
|
16
|
+
colorTheme: z.ZodOptional<z.ZodDefault<z.ZodEnum<["light", "dark", "neutral"]>>>;
|
|
17
|
+
align: z.ZodOptional<z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>>;
|
|
7
18
|
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
8
19
|
}, "strip", z.ZodTypeAny, {
|
|
9
20
|
content: string;
|
|
21
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
10
22
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
23
|
+
align?: "left" | "center" | "right" | undefined;
|
|
11
24
|
author?: string | undefined;
|
|
12
|
-
|
|
25
|
+
quoteSize?: number | undefined;
|
|
26
|
+
decorationStyle?: "fill" | "none" | "sidebar" | undefined;
|
|
13
27
|
}, {
|
|
14
28
|
content: string;
|
|
29
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
15
30
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
31
|
+
align?: "left" | "center" | "right" | undefined;
|
|
16
32
|
author?: string | undefined;
|
|
17
|
-
|
|
33
|
+
quoteSize?: number | undefined;
|
|
34
|
+
decorationStyle?: "fill" | "none" | "sidebar" | undefined;
|
|
18
35
|
}>;
|
|
19
36
|
export type QuoteProps = z.infer<typeof QuotePropsSchema>;
|
|
20
37
|
export type QuoteDecorationStyle = z.infer<typeof QuoteDecorationStyleSchema>;
|
|
21
38
|
export declare const QuoteDefaultProps: QuoteProps;
|
|
22
39
|
export declare const RegisteredQuotePropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
23
40
|
content: string;
|
|
41
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
24
42
|
cornerStyle?: "rounded" | "square" | undefined;
|
|
43
|
+
align?: "left" | "center" | "right" | undefined;
|
|
25
44
|
author?: string | undefined;
|
|
26
|
-
|
|
45
|
+
quoteSize?: number | undefined;
|
|
46
|
+
decorationStyle?: "fill" | "none" | "sidebar" | undefined;
|
|
27
47
|
}>;
|
|
28
48
|
//# sourceMappingURL=quotePropsSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotePropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/quotePropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"quotePropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/quotePropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,0BAA0B,wCAAsC,CAAA;AAE7E,eAAO,MAAM,cAAc,KAAK,CAAA;AAChC,eAAO,MAAM,cAAc,KAAK,CAAA;AAChC,eAAO,MAAM,eAAe,IAAI,CAAA;AAChC;4EAC4E;AAC5E,eAAO,MAAM,kBAAkB,KAAK,CAAA;AAEpC,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKnD;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;EAwD3B,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,eAAO,MAAM,iBAAiB,EAAE,UAO/B,CAAA;AAED,eAAO,MAAM,0BAA0B;;;;;;;;EAAqD,CAAA"}
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTwoColumnBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/TwoColumn/createTwoColumnBlock.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"createTwoColumnBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/TwoColumn/createTwoColumnBlock.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;EAM/B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twoColumnStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/TwoColumn/twoColumnStyles.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"twoColumnStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/TwoColumn/twoColumnStyles.tsx"],"names":[],"mappings":"AAkCA,eAAO,MAAM,gBAAgB;IAC3B;;;;OAIG;;;;CAIK,CAAA;AAkEV,+EAA+E;AAC/E,wBAAgB,eAAe,4CAE9B"}
|
|
@@ -81,6 +81,17 @@ export declare function brandFillStyling(brand: BrandVariant): Styling;
|
|
|
81
81
|
* caller supplies the `borderWidth` (a full outline vs. a single-side accent).
|
|
82
82
|
*/
|
|
83
83
|
export declare function brandBorderStyling(brand: BrandVariant, borderWidth: NonNullable<ViewProps['borderWidth']>): Styling;
|
|
84
|
+
/**
|
|
85
|
+
* Text-only treatment: recolor the text over a surface that stays transparent.
|
|
86
|
+
* For styles with no fill or border, where a color choice can only reach the text.
|
|
87
|
+
*/
|
|
88
|
+
export declare function textStyling(color: string): Styling;
|
|
89
|
+
/**
|
|
90
|
+
* Accent treatment: one color drives both the border and the text, so an accent
|
|
91
|
+
* bar and the words beside it read as a pair. Unlike [[brandBorderStyling]], the
|
|
92
|
+
* text is recolored to match rather than left at its default.
|
|
93
|
+
*/
|
|
94
|
+
export declare function accentStyling(color: string, borderWidth: NonNullable<ViewProps['borderWidth']>): Styling;
|
|
84
95
|
/** Assemble the final render props from a resolved styling and layout. */
|
|
85
96
|
export declare function toRenderProps(styling: Styling, layout: Layout): BlockRenderProps;
|
|
86
97
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brandTheming.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/brandTheming.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,KAAK,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAC5C,KAAK,iBAAiB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAA;AAEnD;;;;GAIG;AACH,KAAK,sBAAsB,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AAE9F;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;QAChD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G;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,GACjD,OAAO,CAKT;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAUlD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,GACjD,OAAO,CAWT;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhF"}
|
|
@@ -2,11 +2,11 @@ import { z } from 'zod';
|
|
|
2
2
|
/** Corner rounding for a block's container. Used by every block. */
|
|
3
3
|
export declare const CornerStyleSchema: z.ZodEnum<["rounded", "square"]>;
|
|
4
4
|
export type CornerStyle = z.infer<typeof CornerStyleSchema>;
|
|
5
|
-
/** Horizontal alignment
|
|
5
|
+
/** Horizontal alignment. Used by Image, Video and Quote. */
|
|
6
6
|
export declare const AlignSchema: z.ZodEnum<["left", "center", "right"]>;
|
|
7
7
|
export type Align = z.infer<typeof AlignSchema>;
|
|
8
8
|
/**
|
|
9
|
-
* Emphasis a block's surface is decorated with. Used by Text and
|
|
9
|
+
* Emphasis a block's surface is decorated with. Used by Text, Accordion and Quote.
|
|
10
10
|
* `neutral` is deliberately never branded — see the block mappers.
|
|
11
11
|
*/
|
|
12
12
|
export declare const ColorThemeSchema: z.ZodEnum<["light", "dark", "neutral"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonSchemas.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/commonSchemas.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,kCAAgC,CAAA;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,
|
|
1
|
+
{"version":3,"file":"commonSchemas.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/commonSchemas.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,kCAAgC,CAAA;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,4DAA4D;AAC5D,eAAO,MAAM,WAAW,wCAAsC,CAAA;AAC9D,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,yCAAuC,CAAA;AACpE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,+BAA6B,CAAA;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sCAAoC,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gGAC4D,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from '@instructure/ui-view';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
import { Styling } from './brandTheming';
|
|
3
|
+
import { Decoration, Styling } from './brandTheming';
|
|
4
4
|
import { Align, ColorTheme, HeaderStyle } from './commonSchemas';
|
|
5
5
|
type ViewProps = ComponentProps<typeof View>;
|
|
6
6
|
/** Horizontal alignment as a `View` `textAlign` token. */
|
|
@@ -22,6 +22,24 @@ 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
|
+
* The undecorated surface: no fill, no border, text left to the theme. Exported for
|
|
32
|
+
* blocks that resolve their own text color and need only the bare surface under it
|
|
33
|
+
* (Quote's `none`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const SURFACE_NONE_DECORATION: Decoration;
|
|
36
|
+
/**
|
|
37
|
+
* Styling for a surface/color pair, where the surface treatment is an option of its own
|
|
38
|
+
* rather than implied by the color (as `getHeaderStyleStyling` has it). A brand color
|
|
39
|
+
* themes `light` and `dark`; `neutral` is intentionally never branded. Shared by Text and
|
|
40
|
+
* Banner so the two can't drift apart.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getSurfaceStyling(surface: SurfaceStyle, color: ColorTheme, brandColor?: string): Styling;
|
|
25
43
|
export interface ThemedContainer {
|
|
26
44
|
styling: Styling;
|
|
27
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonViewProps.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/commonViewProps.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"commonViewProps.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/commonViewProps.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,IAAI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AC,EAAE,MAAM,GAClB,eAAe,CAiBjB"}
|
|
@@ -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,WAAW,uBAAuB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK;IACxE;+FAC2F;IAC3F,MAAM,EAAE,yBAAyB,CAAA;IACjC,qGAAqG;IACrG,QAAQ,EAAE,aAAa,CAAA;IACvB;;;;wEAIoE;IACpE,KAAK,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAA;IAC1B;;sCAEkC;IAClC,cAAc,CAAC,EAAE,aAAa,EAAE,CAAA;IAChC;qDACiD;IACjD,aAAa,CAAC,EAAE,aAAa,GAAG,UAAU,CAAA;IAC1C,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,EAAE,EACpE,MAAM,EACN,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,cAAuC,EACvC,aAAa,EACb,MAAM,EACN,oBAAoB,GACrB,EAAE,uBAAuB,CAAC,UAAU,CAAC,
|
|
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,WAAW,uBAAuB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK;IACxE;+FAC2F;IAC3F,MAAM,EAAE,yBAAyB,CAAA;IACjC,qGAAqG;IACrG,QAAQ,EAAE,aAAa,CAAA;IACvB;;;;wEAIoE;IACpE,KAAK,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAA;IAC1B;;sCAEkC;IAClC,cAAc,CAAC,EAAE,aAAa,EAAE,CAAA;IAChC;qDACiD;IACjD,aAAa,CAAC,EAAE,aAAa,GAAG,UAAU,CAAA;IAC1C,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,EAAE,EACpE,MAAM,EACN,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,cAAuC,EACvC,aAAa,EACb,MAAM,EACN,oBAAoB,GACrB,EAAE,uBAAuB,CAAC,UAAU,CAAC,2CAoPrC"}
|
|
@@ -12,6 +12,30 @@ export interface BlockAIMenuProps {
|
|
|
12
12
|
componentRegistry: BlockRegistry;
|
|
13
13
|
/** Fires when the menu popover OR the preview modal is open, so the canvas can hold selection. */
|
|
14
14
|
onActiveChange?: (active: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Names the sub-block this menu was opened on (e.g. `Accordion 1`) when it is mounted on a
|
|
17
|
+
* sub-block panel. Scopes the instruction sent to the AI; the request still carries the whole
|
|
18
|
+
* block, and the reply is still applied whole, exactly as it is from the block's own menu.
|
|
19
|
+
*/
|
|
20
|
+
instructionScope?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Overrides which view the menu opens on. Supply this when the menu targets something
|
|
23
|
+
* `isBlockEmpty` cannot judge — a sub-block, whose content is one entry of an array field
|
|
24
|
+
* rather than the block's own props. Defaults to the block's own emptiness.
|
|
25
|
+
*/
|
|
26
|
+
isEmpty?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Human name for what the menu acts on, used in the trigger's accessible label — the block's
|
|
29
|
+
* host-translated label ("Banner"), or a sub-block's heading ("Accordion 1"). Defaults to the
|
|
30
|
+
* wire name, which is what the canvas item toolbar has always announced.
|
|
31
|
+
*/
|
|
32
|
+
targetLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Surface the trigger sits on. `dark` (the default) is the canvas item toolbar's bar; `light`
|
|
35
|
+
* is the sidebar panel header, which has no chrome of its own and so carries the open state
|
|
36
|
+
* as a tinted outline around the icon.
|
|
37
|
+
*/
|
|
38
|
+
triggerSurface?: 'dark' | 'light';
|
|
15
39
|
}
|
|
16
|
-
export declare const BlockAIMenu: ({ componentType, componentData, componentId, isOpen, onOpen, onApply, onClose, componentRegistry, onActiveChange, }: BlockAIMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
40
|
+
export declare const BlockAIMenu: ({ componentType, componentData, componentId, isOpen, onOpen, onApply, onClose, componentRegistry, onActiveChange, instructionScope, isEmpty, targetLabel, triggerSurface, }: BlockAIMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
41
|
//# sourceMappingURL=BlockAIMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockAIMenu.d.ts","sourceRoot":"","sources":["../../../src/editor/ai/BlockAIMenu.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockAIMenu.d.ts","sourceRoot":"","sources":["../../../src/editor/ai/BlockAIMenu.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,gBAAgB,CAAA;AAS7E,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACpD,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,iGAAiG;IACjG,iBAAiB,EAAE,aAAa,CAAA;IAChC,kGAAkG;IAClG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,GAAI,6KAczB,gBAAgB,mDAoLlB,CAAA"}
|
|
@@ -4,6 +4,10 @@ export interface BlockAIMenuContentProps {
|
|
|
4
4
|
onSetView: (view: MenuView) => void;
|
|
5
5
|
onQuickAction: (instruction: string) => void;
|
|
6
6
|
activeInstruction?: string | null;
|
|
7
|
+
/** False for an untouched block, which shows only the generate prompt and no root menu. */
|
|
8
|
+
hasContent: boolean;
|
|
9
|
+
/** Dismisses the menu from the prompt header, standing in for Back when there is no root. */
|
|
10
|
+
onClose: () => void;
|
|
7
11
|
prompt: string;
|
|
8
12
|
onPromptChange: (value: string) => void;
|
|
9
13
|
isThinking: boolean;
|
|
@@ -13,5 +17,5 @@ export interface BlockAIMenuContentProps {
|
|
|
13
17
|
onSend: () => void;
|
|
14
18
|
onStop: () => void;
|
|
15
19
|
}
|
|
16
|
-
export declare const BlockAIMenuContent: ({ view, onSetView, onQuickAction, activeInstruction, prompt, onPromptChange, isThinking, error, previewFirst, onPreviewFirstChange, onSend, onStop, }: BlockAIMenuContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const BlockAIMenuContent: ({ view, onSetView, onQuickAction, activeInstruction, hasContent, onClose, prompt, onPromptChange, isThinking, error, previewFirst, onPreviewFirstChange, onSend, onStop, }: BlockAIMenuContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
21
|
//# sourceMappingURL=BlockAIMenuContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockAIMenuContent.d.ts","sourceRoot":"","sources":["../../../src/editor/ai/BlockAIMenuContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BlockAIMenuContent.d.ts","sourceRoot":"","sources":["../../../src/editor/ai/BlockAIMenuContent.tsx"],"names":[],"mappings":"AA4CA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,eAAe,GAAG,sBAAsB,CAAA;AA4DnG,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IACnC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,2FAA2F;IAC3F,UAAU,EAAE,OAAO,CAAA;IACnB,6FAA6F;IAC7F,OAAO,EAAE,MAAM,IAAI,CAAA;IAEnB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,eAAO,MAAM,kBAAkB,GAAI,4KAehC,uBAAuB,4CAwOzB,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BlockRegistry } from '../../registry';
|
|
2
|
+
import { FormFieldMetadata } from '../../schema';
|
|
3
|
+
/** Identifies the one sub-block a panel is scoped to, when the panel is not the block's own. */
|
|
4
|
+
export interface PanelAIMenuScope {
|
|
5
|
+
/** Shown to the author and sent to the AI as the target's name, e.g. `Accordion 1`. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The object-array field holding the sub-blocks, e.g. `items`. */
|
|
8
|
+
fieldName: string;
|
|
9
|
+
index: number;
|
|
10
|
+
/** Property metadata for one entry of that field, used to judge whether it is untouched. */
|
|
11
|
+
itemProperties: Record<string, FormFieldMetadata>;
|
|
12
|
+
}
|
|
13
|
+
export interface PanelAIMenuProps {
|
|
14
|
+
componentType: string;
|
|
15
|
+
componentId?: string;
|
|
16
|
+
componentRegistry: BlockRegistry;
|
|
17
|
+
/** Reads the block's current form values. Must be stable across renders. */
|
|
18
|
+
getCurrentProps: () => Record<string, unknown>;
|
|
19
|
+
/** Applies the AI's props to the form and commits them. Must be stable across renders. */
|
|
20
|
+
onApply: (newProps: Record<string, unknown>) => void;
|
|
21
|
+
/**
|
|
22
|
+
* The block's host-translated label, announced when the panel is the block's own. A sub-block
|
|
23
|
+
* panel announces its own heading instead, from `scope.label`.
|
|
24
|
+
*/
|
|
25
|
+
blockLabel?: string;
|
|
26
|
+
/** Set when the panel is a sub-block's; omit for the block's own panel. */
|
|
27
|
+
scope?: PanelAIMenuScope;
|
|
28
|
+
}
|
|
29
|
+
export declare function PanelAIMenu({ componentType, componentId, componentRegistry, getCurrentProps, onApply, blockLabel, scope, }: PanelAIMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
//# sourceMappingURL=PanelAIMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelAIMenu.d.ts","sourceRoot":"","sources":["../../../src/editor/ai/PanelAIMenu.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAIrD,gGAAgG;AAChG,MAAM,WAAW,gBAAgB;IAC/B,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,4FAA4F;IAC5F,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAClD;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,aAAa,CAAA;IAChC,4EAA4E;IAC5E,eAAe,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9C,0FAA0F;IAC1F,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACpD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,gBAAgB,CAAA;CACzB;AAED,wBAAgB,WAAW,CAAC,EAC1B,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,UAAU,EACV,KAAK,GACN,EAAE,gBAAgB,kDAgDlB"}
|