@instructure/platform-block-content-editor 0.3.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.
- package/dist/components/MediaPlaceholder/MediaPlaceholder.d.ts +25 -0
- package/dist/components/MediaPlaceholder/MediaPlaceholder.d.ts.map +1 -0
- package/dist/components/MediaPlaceholder/index.d.ts +3 -0
- package/dist/components/MediaPlaceholder/index.d.ts.map +1 -0
- package/dist/components/blocks/Accordion/Accordion.d.ts +4 -0
- package/dist/components/blocks/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/blocks/Accordion/accordionPropsSchema.d.ts +109 -0
- package/dist/components/blocks/Accordion/accordionPropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/Accordion/getAccordionViewProps.d.ts +66 -0
- package/dist/components/blocks/Accordion/getAccordionViewProps.d.ts.map +1 -0
- package/dist/components/blocks/Accordion/index.d.ts +4 -0
- package/dist/components/blocks/Accordion/index.d.ts.map +1 -0
- package/dist/components/blocks/Banner/Banner.d.ts +4 -0
- package/dist/components/blocks/Banner/Banner.d.ts.map +1 -0
- package/dist/components/blocks/Banner/bannerPropsSchema.d.ts +36 -0
- package/dist/components/blocks/Banner/bannerPropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/Banner/getBannerViewProps.d.ts +5 -0
- package/dist/components/blocks/Banner/getBannerViewProps.d.ts.map +1 -0
- package/dist/components/blocks/Banner/index.d.ts +3 -0
- package/dist/components/blocks/Banner/index.d.ts.map +1 -0
- package/dist/components/blocks/CodeBlock/CodeBlock.d.ts +4 -0
- package/dist/components/blocks/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/blocks/CodeBlock/codeBlockPropsSchema.d.ts +28 -0
- package/dist/components/blocks/CodeBlock/codeBlockPropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/CodeBlock/getCodeBlockViewProps.d.ts +13 -0
- package/dist/components/blocks/CodeBlock/getCodeBlockViewProps.d.ts.map +1 -0
- package/dist/components/blocks/CodeBlock/index.d.ts +3 -0
- package/dist/components/blocks/CodeBlock/index.d.ts.map +1 -0
- package/dist/components/blocks/ImageBlock/ImageBlock.d.ts +4 -0
- package/dist/components/blocks/ImageBlock/ImageBlock.d.ts.map +1 -0
- package/dist/components/blocks/ImageBlock/getImageBlockViewProps.d.ts +7 -0
- package/dist/components/blocks/ImageBlock/getImageBlockViewProps.d.ts.map +1 -0
- package/dist/components/blocks/ImageBlock/imageBlockPropsSchema.d.ts +40 -0
- package/dist/components/blocks/ImageBlock/imageBlockPropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/ImageBlock/index.d.ts +3 -0
- package/dist/components/blocks/ImageBlock/index.d.ts.map +1 -0
- package/dist/components/blocks/Quote/Quote.d.ts +4 -0
- package/dist/components/blocks/Quote/Quote.d.ts.map +1 -0
- package/dist/components/blocks/Quote/getQuoteViewProps.d.ts +5 -0
- package/dist/components/blocks/Quote/getQuoteViewProps.d.ts.map +1 -0
- package/dist/components/blocks/Quote/index.d.ts +3 -0
- package/dist/components/blocks/Quote/index.d.ts.map +1 -0
- package/dist/components/blocks/Quote/quotePropsSchema.d.ts +28 -0
- package/dist/components/blocks/Quote/quotePropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/Text/Text.d.ts +4 -0
- package/dist/components/blocks/Text/Text.d.ts.map +1 -0
- package/dist/components/blocks/Text/getTextViewProps.d.ts +5 -0
- package/dist/components/blocks/Text/getTextViewProps.d.ts.map +1 -0
- package/dist/components/blocks/Text/index.d.ts +3 -0
- package/dist/components/blocks/Text/index.d.ts.map +1 -0
- package/dist/components/blocks/Text/textPropsSchema.d.ts +28 -0
- package/dist/components/blocks/Text/textPropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/VideoBlock/VideoBlock.d.ts +16 -0
- package/dist/components/blocks/VideoBlock/VideoBlock.d.ts.map +1 -0
- package/dist/components/blocks/VideoBlock/getVideoBlockViewProps.d.ts +5 -0
- package/dist/components/blocks/VideoBlock/getVideoBlockViewProps.d.ts.map +1 -0
- package/dist/components/blocks/VideoBlock/index.d.ts +3 -0
- package/dist/components/blocks/VideoBlock/index.d.ts.map +1 -0
- package/dist/components/blocks/VideoBlock/videoBlockPropsSchema.d.ts +40 -0
- package/dist/components/blocks/VideoBlock/videoBlockPropsSchema.d.ts.map +1 -0
- package/dist/components/blocks/brandTheming.d.ts +87 -0
- package/dist/components/blocks/brandTheming.d.ts.map +1 -0
- package/dist/components/blocks/commonSchemas.d.ts +17 -0
- package/dist/components/blocks/commonSchemas.d.ts.map +1 -0
- package/dist/components/blocks/commonViewProps.d.ts +19 -0
- package/dist/components/blocks/commonViewProps.d.ts.map +1 -0
- package/dist/contexts/BlockEditorApiContext.d.ts +63 -0
- package/dist/contexts/BlockEditorApiContext.d.ts.map +1 -0
- package/dist/contexts/BrandColorContext.d.ts +10 -0
- package/dist/contexts/BrandColorContext.d.ts.map +1 -0
- package/dist/contexts/DesignerModeContext.d.ts +8 -0
- package/dist/contexts/DesignerModeContext.d.ts.map +1 -0
- package/dist/contexts/TranslationsContext.d.ts +70 -0
- package/dist/contexts/TranslationsContext.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1385 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/registeredSchema.d.ts +47 -0
- package/dist/schema/registeredSchema.d.ts.map +1 -0
- package/dist/schema/schemaValidator.d.ts +40 -0
- package/dist/schema/schemaValidator.d.ts.map +1 -0
- package/dist/schema/zodExtensions.d.ts +137 -0
- package/dist/schema/zodExtensions.d.ts.map +1 -0
- package/dist/schema/zodUtils.d.ts +90 -0
- package/dist/schema/zodUtils.d.ts.map +1 -0
- package/dist/schema/zodUtils.test.d.ts +2 -0
- package/dist/schema/zodUtils.test.d.ts.map +1 -0
- package/dist/utils/colorVariants/brandColorVariants.d.ts +25 -0
- package/dist/utils/colorVariants/brandColorVariants.d.ts.map +1 -0
- package/dist/utils/colorVariants/brandColorVariants.test.d.ts +2 -0
- package/dist/utils/colorVariants/brandColorVariants.test.d.ts.map +1 -0
- package/dist/utils/colorVariants/color.d.ts +21 -0
- package/dist/utils/colorVariants/color.d.ts.map +1 -0
- package/dist/utils/colorVariants/color.test.d.ts +2 -0
- package/dist/utils/colorVariants/color.test.d.ts.map +1 -0
- package/dist/utils/colorVariants/deriveColorVariants.d.ts +41 -0
- package/dist/utils/colorVariants/deriveColorVariants.d.ts.map +1 -0
- package/dist/utils/colorVariants/deriveColorVariants.test.d.ts +2 -0
- package/dist/utils/colorVariants/deriveColorVariants.test.d.ts.map +1 -0
- package/dist/utils/colorVariants/index.d.ts +3 -0
- package/dist/utils/colorVariants/index.d.ts.map +1 -0
- package/dist/utils/colorVariants/types.d.ts +21 -0
- package/dist/utils/colorVariants/types.d.ts.map +1 -0
- package/dist/utils/colorVariants/wcag.d.ts +10 -0
- package/dist/utils/colorVariants/wcag.d.ts.map +1 -0
- package/dist/utils/safeMediaUrl.d.ts +10 -0
- package/dist/utils/safeMediaUrl.d.ts.map +1 -0
- package/dist/utils/safeMediaUrl.test.d.ts +2 -0
- package/dist/utils/safeMediaUrl.test.d.ts.map +1 -0
- package/dist/utils/wordWrap.d.ts +16 -0
- package/dist/utils/wordWrap.d.ts.map +1 -0
- package/locales/en.json +21 -0
- package/package.json +73 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { View } from '@instructure/ui-view';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
type ViewProps = ComponentProps<typeof View>;
|
|
4
|
+
export type MediaPlaceholderVariant = 'empty' | 'loading' | 'error' | 'processing';
|
|
5
|
+
export interface MediaPlaceholderProps {
|
|
6
|
+
/**
|
|
7
|
+
* Message shown to the author (empty/error/processing) or announced (loading).
|
|
8
|
+
* Required: every variant needs a label, and a `loading` spinner without one is
|
|
9
|
+
* unannounced.
|
|
10
|
+
*/
|
|
11
|
+
text: string;
|
|
12
|
+
/** Secondary line under `text`, used by the `processing` variant. */
|
|
13
|
+
subtitle?: string;
|
|
14
|
+
variant?: MediaPlaceholderVariant;
|
|
15
|
+
/** InstUI border-radius token, matched to the media it stands in for. */
|
|
16
|
+
borderRadius?: ViewProps['borderRadius'];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Neutral stand-in for media that is empty, loading, failed, or still
|
|
20
|
+
* processing. Shared across media blocks (Image/Video); not part of the
|
|
21
|
+
* package's public surface.
|
|
22
|
+
*/
|
|
23
|
+
export declare function MediaPlaceholder({ text, subtitle, variant, borderRadius, }: MediaPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=MediaPlaceholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/MediaPlaceholder/MediaPlaceholder.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,KAAK,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAE5C,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAA;AAElF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,uBAAuB,CAAA;IACjC,yEAAyE;IACzE,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAA;CACzC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,OAAiB,EACjB,YAAuB,GACxB,EAAE,qBAAqB,2CAsCvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MediaPlaceholder/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AccordionProps } from './accordionPropsSchema';
|
|
2
|
+
/** Expandable sections with an optional heading; any number of sections may be open at once. */
|
|
3
|
+
export declare function Accordion({ title, variant, supportingText, items, accordionStyle, colorTheme, connection, cornerStyle, dropdownPlacement, dropdownDirection, editingItemId, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Accordion/Accordion.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAe5D,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAc,EACd,cAAc,EACd,KAAU,EACV,cAA0B,EAC1B,UAAoB,EACpB,UAAwB,EACxB,WAAuB,EACvB,iBAA0B,EAC1B,iBAA0B,EAC1B,aAAa,GACd,EAAE,cAAc,2CAsLhB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AccordionStyleSchema: z.ZodEnum<["outline", "solid"]>;
|
|
3
|
+
export declare const AccordionConnectionSchema: z.ZodEnum<["connected", "separated"]>;
|
|
4
|
+
export declare const AccordionDropdownPlacementSchema: z.ZodEnum<["left", "right"]>;
|
|
5
|
+
export declare const AccordionDropdownDirectionSchema: z.ZodEnum<["down", "center"]>;
|
|
6
|
+
export declare const AccordionItemSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
content: string;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
content: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const AccordionPropsSchema: z.ZodObject<{
|
|
20
|
+
title: z.ZodOptional<z.ZodString>;
|
|
21
|
+
variant: z.ZodOptional<z.ZodDefault<z.ZodEnum<["h2", "h3", "h4"]>>>;
|
|
22
|
+
supportingText: z.ZodOptional<z.ZodString>;
|
|
23
|
+
items: z.ZodArray<z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
title: z.ZodString;
|
|
26
|
+
content: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
content: string;
|
|
31
|
+
}, {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
content: string;
|
|
35
|
+
}>, "many">;
|
|
36
|
+
accordionStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["outline", "solid"]>>>;
|
|
37
|
+
colorTheme: z.ZodOptional<z.ZodDefault<z.ZodEnum<["light", "dark", "neutral"]>>>;
|
|
38
|
+
connection: z.ZodOptional<z.ZodDefault<z.ZodEnum<["connected", "separated"]>>>;
|
|
39
|
+
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
40
|
+
dropdownPlacement: z.ZodOptional<z.ZodDefault<z.ZodEnum<["left", "right"]>>>;
|
|
41
|
+
dropdownDirection: z.ZodOptional<z.ZodDefault<z.ZodEnum<["down", "center"]>>>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
items: {
|
|
44
|
+
id: string;
|
|
45
|
+
title: string;
|
|
46
|
+
content: string;
|
|
47
|
+
}[];
|
|
48
|
+
title?: string | undefined;
|
|
49
|
+
variant?: "h2" | "h3" | "h4" | undefined;
|
|
50
|
+
supportingText?: string | undefined;
|
|
51
|
+
accordionStyle?: "outline" | "solid" | undefined;
|
|
52
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
53
|
+
connection?: "connected" | "separated" | undefined;
|
|
54
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
55
|
+
dropdownPlacement?: "left" | "right" | undefined;
|
|
56
|
+
dropdownDirection?: "center" | "down" | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
items: {
|
|
59
|
+
id: string;
|
|
60
|
+
title: string;
|
|
61
|
+
content: string;
|
|
62
|
+
}[];
|
|
63
|
+
title?: string | undefined;
|
|
64
|
+
variant?: "h2" | "h3" | "h4" | undefined;
|
|
65
|
+
supportingText?: string | undefined;
|
|
66
|
+
accordionStyle?: "outline" | "solid" | undefined;
|
|
67
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
68
|
+
connection?: "connected" | "separated" | undefined;
|
|
69
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
70
|
+
dropdownPlacement?: "left" | "right" | undefined;
|
|
71
|
+
dropdownDirection?: "center" | "down" | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* `editingItemId` is a designer-only runtime prop injected by the host when this
|
|
75
|
+
* block is the selected one, telling it which section the author is editing. It is
|
|
76
|
+
* deliberately outside the schema so it never reaches persisted template data.
|
|
77
|
+
*/
|
|
78
|
+
export type AccordionProps = z.infer<typeof AccordionPropsSchema> & {
|
|
79
|
+
editingItemId?: string;
|
|
80
|
+
};
|
|
81
|
+
export type AccordionItem = z.infer<typeof AccordionItemSchema>;
|
|
82
|
+
export type AccordionStyle = z.infer<typeof AccordionStyleSchema>;
|
|
83
|
+
export type AccordionConnection = z.infer<typeof AccordionConnectionSchema>;
|
|
84
|
+
export type AccordionDropdownPlacement = z.infer<typeof AccordionDropdownPlacementSchema>;
|
|
85
|
+
export type AccordionDropdownDirection = z.infer<typeof AccordionDropdownDirectionSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* The first block defaults holding a reference value, so unlike the other blocks' these
|
|
88
|
+
* are shared: a host inserts a block by shallow-spreading them, which hands every
|
|
89
|
+
* Accordion created from these defaults the *same* `items` array and item objects. The
|
|
90
|
+
* ids are seeds too — unique within a block, not across them.
|
|
91
|
+
*/
|
|
92
|
+
export declare const AccordionDefaultProps: AccordionProps;
|
|
93
|
+
export declare const RegisteredAccordionPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
94
|
+
items: {
|
|
95
|
+
id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
content: string;
|
|
98
|
+
}[];
|
|
99
|
+
title?: string | undefined;
|
|
100
|
+
variant?: "h2" | "h3" | "h4" | undefined;
|
|
101
|
+
supportingText?: string | undefined;
|
|
102
|
+
accordionStyle?: "outline" | "solid" | undefined;
|
|
103
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
104
|
+
connection?: "connected" | "separated" | undefined;
|
|
105
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
106
|
+
dropdownPlacement?: "left" | "right" | undefined;
|
|
107
|
+
dropdownDirection?: "center" | "down" | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
//# sourceMappingURL=accordionPropsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordionPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Accordion/accordionPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,oBAAoB,iCAA+B,CAAA;AAChE,eAAO,MAAM,yBAAyB,uCAAqC,CAAA;AAC3E,eAAO,MAAM,gCAAgC,8BAA4B,CAAA;AACzE,eAAO,MAAM,gCAAgC,+BAA6B,CAAA;AAU1E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAU9B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4D/B,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAAG;IAClE,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AACD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC3E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAanC,CAAA;AAWD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;EAG1C,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Flex } from '@instructure/ui-flex';
|
|
2
|
+
import { ToggleDetails } from '@instructure/ui-toggle-details';
|
|
3
|
+
import { View } from '@instructure/ui-view';
|
|
4
|
+
import { ComponentProps, ComponentType } from 'react';
|
|
5
|
+
import { ColorTheme, CornerStyle } from '../commonSchemas';
|
|
6
|
+
import { AccordionConnection, AccordionDropdownDirection, AccordionDropdownPlacement, AccordionStyle } from './accordionPropsSchema';
|
|
7
|
+
type ViewProps = ComponentProps<typeof View>;
|
|
8
|
+
type ToggleDetailsProps = ComponentProps<typeof ToggleDetails>;
|
|
9
|
+
type ToggleDetailsThemeOverride = ToggleDetailsProps['themeOverride'];
|
|
10
|
+
/**
|
|
11
|
+
* Colors for one accordion item. Border sides and radii come from
|
|
12
|
+
* `getAccordionItemLayout`.
|
|
13
|
+
*
|
|
14
|
+
* Padding sits on the header and panel rather than the item, so both span the item's
|
|
15
|
+
* full width: the panel's top border can then meet the item's side borders, and a
|
|
16
|
+
* filled panel reaches the item's rounded edges instead of floating inside them.
|
|
17
|
+
*/
|
|
18
|
+
export interface AccordionViewProps {
|
|
19
|
+
item: Pick<ViewProps, 'background' | 'borderColor' | 'themeOverride'>;
|
|
20
|
+
/**
|
|
21
|
+
* Wraps the header row rendered inside the toggle button, and draws the focus ring
|
|
22
|
+
* (see `TOGGLE_RESET`). Its color is picked against the surface behind it, because
|
|
23
|
+
* InstUI's default `info` ring and `background="brand"` are the *same* theme variable
|
|
24
|
+
* — `ic-brand-primary` in the canvas theme — so on a filled header the default ring is
|
|
25
|
+
* invisible for every host, whatever brand color they set, and for the tints derived
|
|
26
|
+
* from it. A filled surface therefore rings with `focusColor="inverse"`, which the
|
|
27
|
+
* canvas theme leaves alone, or with the accessible color already paired with that
|
|
28
|
+
* surface once a host brand color applies.
|
|
29
|
+
*/
|
|
30
|
+
header: Pick<ViewProps, 'padding' | 'focusColor' | 'themeOverride'>;
|
|
31
|
+
content: Pick<ViewProps, 'background' | 'borderColor' | 'borderWidth' | 'padding' | 'themeOverride'>;
|
|
32
|
+
toggle: ToggleDetailsThemeOverride;
|
|
33
|
+
}
|
|
34
|
+
export declare function getAccordionViewProps(accordionStyle: AccordionStyle, colorTheme: ColorTheme, brandColor?: string): AccordionViewProps;
|
|
35
|
+
/** Border sides and radii for one item, given where it sits in the list. */
|
|
36
|
+
export interface AccordionItemLayout {
|
|
37
|
+
borderWidth: NonNullable<ViewProps['borderWidth']>;
|
|
38
|
+
borderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
39
|
+
margin: ViewProps['margin'];
|
|
40
|
+
/** Keeps a filled panel from squaring off the item's rounded bottom. */
|
|
41
|
+
contentBorderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
42
|
+
/**
|
|
43
|
+
* The item's top corners. Applied to the header row while its panel is open so the
|
|
44
|
+
* focus ring follows them — a CSS outline traces its element's `border-radius`, and
|
|
45
|
+
* `View`'s own `focusRingBorderRadius` is declared but unimplemented in InstUI 11.6.
|
|
46
|
+
*/
|
|
47
|
+
headerBorderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
48
|
+
}
|
|
49
|
+
export declare function getAccordionItemLayout({ index, count, connection, cornerStyle, }: {
|
|
50
|
+
index: number;
|
|
51
|
+
count: number;
|
|
52
|
+
connection: AccordionConnection;
|
|
53
|
+
cornerStyle: CornerStyle;
|
|
54
|
+
}): AccordionItemLayout;
|
|
55
|
+
/**
|
|
56
|
+
* Chevron pair for the collapsed/expanded states. The original rotated one icon with
|
|
57
|
+
* CSS; swapping InstUI icons gets the same result with no raw CSS.
|
|
58
|
+
*/
|
|
59
|
+
export declare function getAccordionIcons(direction: AccordionDropdownDirection): {
|
|
60
|
+
closedIcon: ComponentType;
|
|
61
|
+
openIcon: ComponentType;
|
|
62
|
+
};
|
|
63
|
+
/** Row order for the header: the chevron trails the title, or leads it. */
|
|
64
|
+
export declare function getAccordionHeaderDirection(placement: AccordionDropdownPlacement): NonNullable<ComponentProps<typeof Flex>['direction']>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=getAccordionViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAccordionViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Accordion/getAccordionViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACf,MAAM,wBAAwB,CAAA;AAE/B,KAAK,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAC5C,KAAK,kBAAkB,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,CAAA;AAC9D,KAAK,0BAA0B,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAA;AAErE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,aAAa,GAAG,eAAe,CAAC,CAAA;IACrE;;;;;;;;;OASG;IACH,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,YAAY,GAAG,eAAe,CAAC,CAAA;IACnE,OAAO,EAAE,IAAI,CACX,SAAS,EACT,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,SAAS,GAAG,eAAe,CAC3E,CAAA;IACD,MAAM,EAAE,0BAA0B,CAAA;CACnC;AAmDD,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,kBAAkB,CAqDpB;AAED,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IAClD,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;IACpD,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAA;IAC3B,wEAAwE;IACxE,mBAAmB,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;IAC3D;;;;OAIG;IACH,kBAAkB,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;CAC3D;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,KAAK,EACL,UAAU,EACV,WAAW,GACZ,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,mBAAmB,CAAA;IAC/B,WAAW,EAAE,WAAW,CAAA;CACzB,GAAG,mBAAmB,CAiCtB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,0BAA0B,GAAG;IACxE,UAAU,EAAE,aAAa,CAAA;IACzB,QAAQ,EAAE,aAAa,CAAA;CACxB,CAIA;AAED,2EAA2E;AAC3E,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,0BAA0B,GACpC,WAAW,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Accordion/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAO9F,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BannerProps } from './bannerPropsSchema';
|
|
2
|
+
/** Presentational banner: optional eyebrow, a semantic h2-h4 heading, optional supporting text. */
|
|
3
|
+
export declare function Banner({ title, variant, subtitle, content, headerStyle, cornerStyle, }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/Banner.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,mGAAmG;AACnG,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAAoB,EACpB,WAAuB,GACxB,EAAE,WAAW,2CA0Cb"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BannerStyleSchema: z.ZodEnum<["none", "light", "dark"]>;
|
|
3
|
+
export declare const BannerPropsSchema: z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
variant: z.ZodDefault<z.ZodEnum<["h2", "h3", "h4"]>>;
|
|
6
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
7
|
+
content: z.ZodOptional<z.ZodString>;
|
|
8
|
+
headerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "light", "dark"]>>>;
|
|
9
|
+
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
title: string;
|
|
12
|
+
variant: "h2" | "h3" | "h4";
|
|
13
|
+
content?: string | undefined;
|
|
14
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
15
|
+
subtitle?: string | undefined;
|
|
16
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
title: string;
|
|
19
|
+
content?: string | undefined;
|
|
20
|
+
variant?: "h2" | "h3" | "h4" | undefined;
|
|
21
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
22
|
+
subtitle?: string | undefined;
|
|
23
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export type BannerProps = z.infer<typeof BannerPropsSchema>;
|
|
26
|
+
export type BannerStyle = z.infer<typeof BannerStyleSchema>;
|
|
27
|
+
export declare const BannerDefaultProps: BannerProps;
|
|
28
|
+
export declare const RegisteredBannerPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
29
|
+
title: string;
|
|
30
|
+
variant: "h2" | "h3" | "h4";
|
|
31
|
+
content?: string | undefined;
|
|
32
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
33
|
+
subtitle?: string | undefined;
|
|
34
|
+
headerStyle?: "light" | "dark" | "none" | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=bannerPropsSchema.d.ts.map
|
|
@@ -0,0 +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;AAIvB,eAAO,MAAM,iBAAiB,sCAAoC,CAAA;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;EAyC5B,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;AAE3D,eAAO,MAAM,kBAAkB,EAAE,WAKhC,CAAA;AAED,eAAO,MAAM,2BAA2B;;;;;;;EAAuD,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BlockRenderProps } from '../brandTheming';
|
|
2
|
+
import { CornerStyle } from '../commonSchemas';
|
|
3
|
+
import { BannerStyle } from './bannerPropsSchema';
|
|
4
|
+
export declare function getBannerViewProps(headerStyle: BannerStyle, cornerStyle: CornerStyle, brandColor?: string): BlockRenderProps;
|
|
5
|
+
//# sourceMappingURL=getBannerViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBannerViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/getBannerViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAetD,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAelB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Banner/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CodeBlockProps } from './codeBlockPropsSchema';
|
|
2
|
+
/** Presentational code block; the language is shown as a label, not syntax-highlighted. */
|
|
3
|
+
export declare function CodeBlock({ code, language, header, cornerStyle }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAG5D,2FAA2F;AAC3F,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAuB,EAAE,EAAE,cAAc,2CAkC5F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CodeLanguageSchema: z.ZodEnum<["javascript", "json", "html", "css", "bash", "yaml", "text"]>;
|
|
3
|
+
export declare const CodeBlockPropsSchema: z.ZodObject<{
|
|
4
|
+
code: z.ZodString;
|
|
5
|
+
language: z.ZodDefault<z.ZodOptional<z.ZodCatch<z.ZodEnum<["javascript", "json", "html", "css", "bash", "yaml", "text"]>>>>;
|
|
6
|
+
header: z.ZodOptional<z.ZodString>;
|
|
7
|
+
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
code: string;
|
|
10
|
+
language: "text" | "html" | "javascript" | "json" | "css" | "bash" | "yaml";
|
|
11
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
12
|
+
header?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
code: string;
|
|
15
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
16
|
+
header?: string | undefined;
|
|
17
|
+
language?: unknown;
|
|
18
|
+
}>;
|
|
19
|
+
export type CodeBlockProps = z.infer<typeof CodeBlockPropsSchema>;
|
|
20
|
+
export type CodeLanguage = z.infer<typeof CodeLanguageSchema>;
|
|
21
|
+
export declare const CodeBlockDefaultProps: CodeBlockProps;
|
|
22
|
+
export declare const RegisteredCodeBlockPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
23
|
+
code: string;
|
|
24
|
+
language: "text" | "html" | "javascript" | "json" | "css" | "bash" | "yaml";
|
|
25
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
26
|
+
header?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=codeBlockPropsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeBlockPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/CodeBlock/codeBlockPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,kBAAkB,0EAQ7B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EA2B/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,qBAAqB,EAAE,cAInC,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;EAG1C,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { View } from '@instructure/ui-view';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { CornerStyle } from '../commonSchemas';
|
|
4
|
+
type ViewProps = ComponentProps<typeof View>;
|
|
5
|
+
/** Maps the corner option to InstUI `View` tokens for the code surface. */
|
|
6
|
+
export interface CodeBlockViewProps {
|
|
7
|
+
background: NonNullable<ViewProps['background']>;
|
|
8
|
+
borderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
9
|
+
padding: ViewProps['padding'];
|
|
10
|
+
}
|
|
11
|
+
export declare function getCodeBlockViewProps(cornerStyle: CornerStyle): CodeBlockViewProps;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=getCodeBlockViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCodeBlockViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/CodeBlock/getCodeBlockViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,KAAK,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAE5C,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;IAChD,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;IACpD,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC9B;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,kBAAkB,CAMlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/CodeBlock/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ImageBlockProps } from './imageBlockPropsSchema';
|
|
2
|
+
/** Presentational image block; the host resolves `asset_id` to a URL via the asset context. */
|
|
3
|
+
export declare function ImageBlock({ asset_id, isDecorative, alt, size, ratio, align, cornerStyle, }: ImageBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=ImageBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/ImageBlock/ImageBlock.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAE9D,+FAA+F;AAC/F,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,YAAoB,EACpB,GAAG,EACH,IAAU,EACV,KAAgB,EAChB,KAAc,EACd,WAAuB,GACxB,EAAE,eAAe,2CAoEjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Align, CornerStyle } from '../commonSchemas';
|
|
2
|
+
import { MediaBlockViewProps } from '../commonViewProps';
|
|
3
|
+
import { ImageRatio } from './imageBlockPropsSchema';
|
|
4
|
+
export type ImageBlockViewProps = MediaBlockViewProps;
|
|
5
|
+
/** A `circle` ratio forces a round crop regardless of corner style. */
|
|
6
|
+
export declare function getImageBlockViewProps(ratio: ImageRatio, align: Align, size: number, cornerStyle: CornerStyle): ImageBlockViewProps;
|
|
7
|
+
//# sourceMappingURL=getImageBlockViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getImageBlockViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/ImageBlock/getImageBlockViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AASzD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAA;AAErD,uEAAuE;AACvE,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,WAAW,GACvB,mBAAmB,CAOrB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ImageRatioSchema: z.ZodEnum<["square", "circle", "landscape", "portrait"]>;
|
|
3
|
+
export declare const ImageBlockPropsSchema: z.ZodObject<{
|
|
4
|
+
asset_id: z.ZodString;
|
|
5
|
+
isDecorative: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
alt: z.ZodString;
|
|
7
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
ratio: z.ZodDefault<z.ZodEnum<["square", "circle", "landscape", "portrait"]>>;
|
|
9
|
+
align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
|
|
10
|
+
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
alt: string;
|
|
13
|
+
size: number;
|
|
14
|
+
align: "left" | "center" | "right";
|
|
15
|
+
asset_id: string;
|
|
16
|
+
isDecorative: boolean;
|
|
17
|
+
ratio: "square" | "circle" | "landscape" | "portrait";
|
|
18
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
alt: string;
|
|
21
|
+
asset_id: string;
|
|
22
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
23
|
+
size?: number | undefined;
|
|
24
|
+
align?: "left" | "center" | "right" | undefined;
|
|
25
|
+
isDecorative?: boolean | undefined;
|
|
26
|
+
ratio?: "square" | "circle" | "landscape" | "portrait" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export type ImageBlockProps = z.infer<typeof ImageBlockPropsSchema>;
|
|
29
|
+
export type ImageRatio = z.infer<typeof ImageRatioSchema>;
|
|
30
|
+
export declare const ImageBlockDefaultProps: ImageBlockProps;
|
|
31
|
+
export declare const RegisteredImageBlockPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
32
|
+
alt: string;
|
|
33
|
+
size: number;
|
|
34
|
+
align: "left" | "center" | "right";
|
|
35
|
+
asset_id: string;
|
|
36
|
+
isDecorative: boolean;
|
|
37
|
+
ratio: "square" | "circle" | "landscape" | "portrait";
|
|
38
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
//# sourceMappingURL=imageBlockPropsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageBlockPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/ImageBlock/imageBlockPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,gBAAgB,0DAAwD,CAAA;AAErF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EAkChC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACnE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,sBAAsB,EAAE,eAQpC,CAAA;AAED,eAAO,MAAM,+BAA+B;;;;;;;;EAG3C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/ImageBlock/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { QuoteProps } from './quotePropsSchema';
|
|
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;
|
|
4
|
+
//# sourceMappingURL=Quote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Quote.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/Quote.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,+FAA+F;AAC/F,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,MAAM,EACN,eAAwC,EACxC,WAAuB,GACxB,EAAE,UAAU,2CAsCZ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BlockRenderProps } from '../brandTheming';
|
|
2
|
+
import { CornerStyle } from '../commonSchemas';
|
|
3
|
+
import { QuoteDecorationStyle } from './quotePropsSchema';
|
|
4
|
+
export declare function getQuoteViewProps(decorationStyle: QuoteDecorationStyle, cornerStyle: CornerStyle, brandColor?: string): BlockRenderProps;
|
|
5
|
+
//# sourceMappingURL=getQuoteViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getQuoteViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/getQuoteViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAW9D,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,oBAAoB,EACrC,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAwBlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Quote/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const QuoteDecorationStyleSchema: z.ZodEnum<["none", "background-secondary", "background-grey", "border-primary"]>;
|
|
3
|
+
export declare const QuotePropsSchema: z.ZodObject<{
|
|
4
|
+
content: z.ZodString;
|
|
5
|
+
author: z.ZodOptional<z.ZodString>;
|
|
6
|
+
decorationStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "background-secondary", "background-grey", "border-primary"]>>>;
|
|
7
|
+
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
content: string;
|
|
10
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
11
|
+
author?: string | undefined;
|
|
12
|
+
decorationStyle?: "none" | "background-secondary" | "background-grey" | "border-primary" | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
content: string;
|
|
15
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
16
|
+
author?: string | undefined;
|
|
17
|
+
decorationStyle?: "none" | "background-secondary" | "background-grey" | "border-primary" | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type QuoteProps = z.infer<typeof QuotePropsSchema>;
|
|
20
|
+
export type QuoteDecorationStyle = z.infer<typeof QuoteDecorationStyleSchema>;
|
|
21
|
+
export declare const QuoteDefaultProps: QuoteProps;
|
|
22
|
+
export declare const RegisteredQuotePropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
23
|
+
content: string;
|
|
24
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
25
|
+
author?: string | undefined;
|
|
26
|
+
decorationStyle?: "none" | "background-secondary" | "background-grey" | "border-primary" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=quotePropsSchema.d.ts.map
|
|
@@ -0,0 +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;AAOvB,eAAO,MAAM,0BAA0B,kFAKrC,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAqB3B,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,UAI/B,CAAA;AAED,eAAO,MAAM,0BAA0B;;;;;EAAqD,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TextProps } from './textPropsSchema';
|
|
2
|
+
/** Presentational rich-text block; shows a placeholder in empty designer mode. */
|
|
3
|
+
export declare function Text({ content, textStyle, colorTheme, cornerStyle, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Text/Text.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,kFAAkF;AAClF,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,SAAqB,EACrB,UAAoB,EACpB,WAAuB,GACxB,EAAE,SAAS,2CAkCX"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BlockRenderProps } from '../brandTheming';
|
|
2
|
+
import { ColorTheme, CornerStyle } from '../commonSchemas';
|
|
3
|
+
import { TextStyle } from './textPropsSchema';
|
|
4
|
+
export declare function getTextViewProps(textStyle: TextStyle, colorTheme: ColorTheme, cornerStyle: CornerStyle, brandColor?: string): BlockRenderProps;
|
|
5
|
+
//# sourceMappingURL=getTextViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTextViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Text/getTextViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AA6ClD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAkBlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Text/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TextStyleSchema: z.ZodEnum<["none", "outline", "fill"]>;
|
|
3
|
+
export declare const TextPropsSchema: z.ZodObject<{
|
|
4
|
+
content: z.ZodString;
|
|
5
|
+
textStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "outline", "fill"]>>>;
|
|
6
|
+
colorTheme: z.ZodOptional<z.ZodDefault<z.ZodEnum<["light", "dark", "neutral"]>>>;
|
|
7
|
+
cornerStyle: z.ZodOptional<z.ZodDefault<z.ZodEnum<["rounded", "square"]>>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
content: string;
|
|
10
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
11
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
12
|
+
textStyle?: "fill" | "outline" | "none" | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
content: string;
|
|
15
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
16
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
17
|
+
textStyle?: "fill" | "outline" | "none" | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type TextProps = z.infer<typeof TextPropsSchema>;
|
|
20
|
+
export type TextStyle = z.infer<typeof TextStyleSchema>;
|
|
21
|
+
export declare const TextDefaultProps: TextProps;
|
|
22
|
+
export declare const RegisteredTextPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
23
|
+
content: string;
|
|
24
|
+
colorTheme?: "light" | "dark" | "neutral" | undefined;
|
|
25
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
26
|
+
textStyle?: "fill" | "outline" | "none" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=textPropsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/Text/textPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,eAAe,wCAAsC,CAAA;AAElE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAwB1B,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,eAAO,MAAM,gBAAgB,EAAE,SAK9B,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;EAAmD,CAAA"}
|