@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,16 @@
|
|
|
1
|
+
import { VideoBlockProps } from './videoBlockPropsSchema';
|
|
2
|
+
/** Normalise a supported provider URL to its embeddable form, or `null` if unsupported. */
|
|
3
|
+
export declare function getEmbedUrl(url: string): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Presentational video block. A `file` source resolves `asset_id` to a playable
|
|
6
|
+
* URL via the asset context (the host owns the fetch and the Canvas media-embed
|
|
7
|
+
* URL); a `link` source embeds a supported provider (YouTube/Vimeo).
|
|
8
|
+
*/
|
|
9
|
+
export declare function VideoBlock({ source, asset_id, video_url, alt, size, align, cornerStyle, }: VideoBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Hookless, provider-free stand-in the host's drag-and-drop renders instead of
|
|
12
|
+
* the live iframe during a drag (re-mounting an iframe mid-drag is expensive).
|
|
13
|
+
* Copy is static because it renders outside the translations provider.
|
|
14
|
+
*/
|
|
15
|
+
export declare function VideoBlockDragPreview({ size, align, cornerStyle, }: Partial<Pick<VideoBlockProps, 'size' | 'align' | 'cornerStyle'>>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=VideoBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/VideoBlock/VideoBlock.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAY9D,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUtD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAe,EACf,QAAQ,EACR,SAAS,EACT,GAAG,EACH,IAAU,EACV,KAAgB,EAChB,WAAuB,GACxB,EAAE,eAAe,2CAoHjB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAU,EACV,KAAgB,EAChB,WAAuB,GACxB,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC,CAAC,2CA4BlE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Align, CornerStyle } from '../commonSchemas';
|
|
2
|
+
import { MediaBlockViewProps } from '../commonViewProps';
|
|
3
|
+
export type VideoBlockViewProps = MediaBlockViewProps;
|
|
4
|
+
export declare function getVideoBlockViewProps(align: Align, size: number, cornerStyle: CornerStyle): VideoBlockViewProps;
|
|
5
|
+
//# sourceMappingURL=getVideoBlockViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVideoBlockViewProps.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/VideoBlock/getVideoBlockViewProps.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAKzE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAA;AAErD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,WAAW,GACvB,mBAAmB,CAOrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/VideoBlock/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const VideoSourceSchema: z.ZodEnum<["file", "link"]>;
|
|
3
|
+
export declare const VideoBlockPropsSchema: z.ZodObject<{
|
|
4
|
+
source: z.ZodDefault<z.ZodEnum<["file", "link"]>>;
|
|
5
|
+
asset_id: z.ZodString;
|
|
6
|
+
video_url: z.ZodOptional<z.ZodString>;
|
|
7
|
+
alt: z.ZodString;
|
|
8
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
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
|
+
source: "link" | "file";
|
|
15
|
+
align: "left" | "center" | "right";
|
|
16
|
+
asset_id: string;
|
|
17
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
18
|
+
video_url?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
alt: string;
|
|
21
|
+
asset_id: string;
|
|
22
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
23
|
+
size?: number | undefined;
|
|
24
|
+
source?: "link" | "file" | undefined;
|
|
25
|
+
align?: "left" | "center" | "right" | undefined;
|
|
26
|
+
video_url?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export type VideoBlockProps = z.infer<typeof VideoBlockPropsSchema>;
|
|
29
|
+
export type VideoSource = z.infer<typeof VideoSourceSchema>;
|
|
30
|
+
export declare const VideoBlockDefaultProps: VideoBlockProps;
|
|
31
|
+
export declare const RegisteredVideoBlockPropsSchema: import('../../..').RegisteredComponentSchema<{
|
|
32
|
+
alt: string;
|
|
33
|
+
size: number;
|
|
34
|
+
source: "link" | "file";
|
|
35
|
+
align: "left" | "center" | "right";
|
|
36
|
+
asset_id: string;
|
|
37
|
+
cornerStyle?: "rounded" | "square" | undefined;
|
|
38
|
+
video_url?: string | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
//# sourceMappingURL=videoBlockPropsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoBlockPropsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/VideoBlock/videoBlockPropsSchema.ts"],"names":[],"mappings":"AAmBA,OAAO,+BAA+B,CAAA;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,iBAAiB,6BAA2B,CAAA;AAEzD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EAgChC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACnE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,sBAAsB,EAAE,eAQpC,CAAA;AAED,eAAO,MAAM,+BAA+B;;;;;;;;EAG3C,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { View } from '@instructure/ui-view';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
type ViewProps = ComponentProps<typeof View>;
|
|
4
|
+
type ViewThemeOverride = ViewProps['themeOverride'];
|
|
5
|
+
/**
|
|
6
|
+
* The text theme override a block applies. Only the primary text color is
|
|
7
|
+
* recolored, and `primaryColor` is a key both InstUI `Text` and `Heading` accept,
|
|
8
|
+
* so the same override works on either.
|
|
9
|
+
*/
|
|
10
|
+
type BlockTextThemeOverride = {
|
|
11
|
+
primaryColor: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Text color tokens accepted by both InstUI `Text` and `Heading`, so a block can
|
|
15
|
+
* apply one `text.color` to either. (`Text`'s `brand`/`ai-*` and `Heading`'s
|
|
16
|
+
* `inherit` are deliberately excluded — they're not shared.)
|
|
17
|
+
*/
|
|
18
|
+
export type BlockTextColor = 'primary' | 'secondary' | 'primary-inverse' | 'secondary-inverse';
|
|
19
|
+
/**
|
|
20
|
+
* Coherent InstUI props for a block's container and its text. Container and text
|
|
21
|
+
* colors are decided together so a themed surface always carries the matching
|
|
22
|
+
* accessible text color.
|
|
23
|
+
*/
|
|
24
|
+
export interface BlockRenderProps {
|
|
25
|
+
view: {
|
|
26
|
+
background: NonNullable<ViewProps['background']>;
|
|
27
|
+
borderWidth: NonNullable<ViewProps['borderWidth']>;
|
|
28
|
+
borderColor: ViewProps['borderColor'];
|
|
29
|
+
borderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
30
|
+
padding: ViewProps['padding'];
|
|
31
|
+
/** Set only when a brand color themes the container/border. */
|
|
32
|
+
themeOverride?: ViewThemeOverride;
|
|
33
|
+
};
|
|
34
|
+
text: {
|
|
35
|
+
/** Token accepted by Text and Heading; omitted when the default is fine. */
|
|
36
|
+
color?: BlockTextColor;
|
|
37
|
+
/** Set only when a brand color themes the text. */
|
|
38
|
+
themeOverride?: BlockTextThemeOverride;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** A block's own token colors for a style, before any brand override. */
|
|
42
|
+
export interface Decoration {
|
|
43
|
+
background: NonNullable<ViewProps['background']>;
|
|
44
|
+
borderWidth: NonNullable<ViewProps['borderWidth']>;
|
|
45
|
+
borderColor: ViewProps['borderColor'];
|
|
46
|
+
textColor?: BlockTextColor;
|
|
47
|
+
}
|
|
48
|
+
/** A base decoration plus the theme overrides that recolor it with a brand color. */
|
|
49
|
+
export interface Styling {
|
|
50
|
+
decoration: Decoration;
|
|
51
|
+
viewThemeOverride?: ViewThemeOverride;
|
|
52
|
+
textThemeOverride?: BlockTextThemeOverride;
|
|
53
|
+
}
|
|
54
|
+
/** How much of the block's surface a corner radius applies to. */
|
|
55
|
+
export interface Layout {
|
|
56
|
+
borderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
57
|
+
padding: ViewProps['padding'];
|
|
58
|
+
}
|
|
59
|
+
/** A brand variant's surface color paired with its accessible text color, as hex. */
|
|
60
|
+
export type BrandVariant = {
|
|
61
|
+
color: string;
|
|
62
|
+
textColor: string;
|
|
63
|
+
};
|
|
64
|
+
/** Which accessible variant of the brand color to use. */
|
|
65
|
+
export type BrandTone = 'light' | 'dark';
|
|
66
|
+
/**
|
|
67
|
+
* The brand variant for a tone, from `deriveColorVariants` (via
|
|
68
|
+
* `deriveBrandColorVariants`). Returns `undefined` when no brand color is set or
|
|
69
|
+
* it can't be parsed, so a bad host value never crashes a block.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveBrandVariant(brandColor: string | undefined, tone: BrandTone): BrandVariant | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Fill treatment: paint the container with the brand color and the text with its
|
|
74
|
+
* paired accessible color. Both reuse the `brand`/`primary` token slots and only
|
|
75
|
+
* override their values — the slot is just where the override attaches.
|
|
76
|
+
*/
|
|
77
|
+
export declare function brandFillStyling(brand: BrandVariant): Styling;
|
|
78
|
+
/**
|
|
79
|
+
* Border treatment: color a transparent surface's border with the brand color.
|
|
80
|
+
* Text keeps its default color (it sits on the page, not the brand surface). The
|
|
81
|
+
* caller supplies the `borderWidth` (a full outline vs. a single-side accent).
|
|
82
|
+
*/
|
|
83
|
+
export declare function brandBorderStyling(brand: BrandVariant, borderWidth: NonNullable<ViewProps['borderWidth']>): Styling;
|
|
84
|
+
/** Assemble the final render props from a resolved styling and layout. */
|
|
85
|
+
export declare function toRenderProps(styling: Styling, layout: Layout): BlockRenderProps;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=brandTheming.d.ts.map
|
|
@@ -0,0 +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,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;QAClD,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,CAAA;QACrC,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;QACpD,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;QAC7B,+DAA+D;QAC/D,aAAa,CAAC,EAAE,iBAAiB,CAAA;KAClC,CAAA;IACD,IAAI,EAAE;QACJ,4EAA4E;QAC5E,KAAK,CAAC,EAAE,cAAc,CAAA;QACtB,mDAAmD;QACnD,aAAa,CAAC,EAAE,sBAAsB,CAAA;KACvC,CAAA;CACF;AAED,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;IAChD,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IAClD,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,CAAA;IACrC,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B;AAED,qFAAqF;AACrF,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;CAC3C;AAED,kEAAkE;AAClE,MAAM,WAAW,MAAM;IACrB,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;IACpD,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC9B;AAED,qFAAqF;AACrF,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/D,0DAA0D;AAC1D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAExC;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,IAAI,EAAE,SAAS,GACd,YAAY,GAAG,SAAS,CAW1B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAW7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,GACjD,OAAO,CAKT;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Corner rounding for a block's container. Used by every block. */
|
|
3
|
+
export declare const CornerStyleSchema: z.ZodEnum<["rounded", "square"]>;
|
|
4
|
+
export type CornerStyle = z.infer<typeof CornerStyleSchema>;
|
|
5
|
+
/** Horizontal alignment for the media blocks (Image, Video). */
|
|
6
|
+
export declare const AlignSchema: z.ZodEnum<["left", "center", "right"]>;
|
|
7
|
+
export type Align = z.infer<typeof AlignSchema>;
|
|
8
|
+
/**
|
|
9
|
+
* Emphasis a block's surface is decorated with. Used by Text and Accordion.
|
|
10
|
+
* `neutral` is deliberately never branded — see the block mappers.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ColorThemeSchema: z.ZodEnum<["light", "dark", "neutral"]>;
|
|
13
|
+
export type ColorTheme = z.infer<typeof ColorThemeSchema>;
|
|
14
|
+
/** Semantic heading level for a block's heading region. Used by Banner and Accordion. */
|
|
15
|
+
export declare const HeadingLevelSchema: z.ZodEnum<["h2", "h3", "h4"]>;
|
|
16
|
+
export type HeadingLevel = z.infer<typeof HeadingLevelSchema>;
|
|
17
|
+
//# sourceMappingURL=commonSchemas.d.ts.map
|
|
@@ -0,0 +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,gEAAgE;AAChE,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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { View } from '@instructure/ui-view';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Align } from './commonSchemas';
|
|
4
|
+
type ViewProps = ComponentProps<typeof View>;
|
|
5
|
+
/** Horizontal alignment as a `View` `textAlign` token. */
|
|
6
|
+
export declare const ALIGN_TEXT: Record<Align, NonNullable<ViewProps['textAlign']>>;
|
|
7
|
+
/**
|
|
8
|
+
* What a media block's mapper returns: InstUI `View` tokens plus the two values
|
|
9
|
+
* InstUI has no token for — `width` (percentage) and `aspectRatio` — which the
|
|
10
|
+
* block applies as plain layout CSS.
|
|
11
|
+
*/
|
|
12
|
+
export interface MediaBlockViewProps {
|
|
13
|
+
textAlign: NonNullable<ViewProps['textAlign']>;
|
|
14
|
+
width: string;
|
|
15
|
+
aspectRatio: string;
|
|
16
|
+
borderRadius: NonNullable<ViewProps['borderRadius']>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=commonViewProps.d.ts.map
|
|
@@ -0,0 +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,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAE5C,0DAA0D;AAC1D,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAIzE,CAAA;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;CACrD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A resolved image asset. `url` is the direct, displayable file URL (rendered
|
|
3
|
+
* in `<img>`); `undefined` while loading or on error.
|
|
4
|
+
*/
|
|
5
|
+
export interface ResolvedImage {
|
|
6
|
+
url?: string;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A resolved video asset. `url` is the media-player embed URL — the host builds
|
|
12
|
+
* it (a block must not construct a host-specific URL), rendered in an
|
|
13
|
+
* `<iframe>`; `undefined` while loading, processing, or on error.
|
|
14
|
+
*
|
|
15
|
+
* The status flags `isLoading` / `isProcessing` / `isError` are mutually
|
|
16
|
+
* exclusive: the host reports at most one as `true` (all false/absent means
|
|
17
|
+
* "ready", with `url` populated). `mediaEntryId` is emitted as `data-media-id`
|
|
18
|
+
* so host scripts can target the iframe.
|
|
19
|
+
*/
|
|
20
|
+
export interface ResolvedVideo {
|
|
21
|
+
url?: string;
|
|
22
|
+
displayName?: string;
|
|
23
|
+
mediaEntryId?: string;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
isProcessing?: boolean;
|
|
26
|
+
isError: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type UseImageUrl = (assetId: string) => ResolvedImage;
|
|
29
|
+
export type UseVideoUrl = (assetId: string) => ResolvedVideo;
|
|
30
|
+
/**
|
|
31
|
+
* The host-injected data hooks the blocks call to resolve an opaque `asset_id`
|
|
32
|
+
* to the URL they render. The host owns the fetch (e.g. Canvas Files API via
|
|
33
|
+
* react-query) and any host-specific URL construction (e.g. the video
|
|
34
|
+
* media-embed iframe URL) — a block only ever renders a URL the host resolved,
|
|
35
|
+
* never builds a host route — so the package stays host-agnostic. One provider
|
|
36
|
+
* carries every host API the blocks need; add a hook here as new blocks need
|
|
37
|
+
* host data (e.g. `useAudioUrl`). Each hook is optional: a host wires only the
|
|
38
|
+
* hooks for the blocks it uses, and an unprovided hook falls back to an error
|
|
39
|
+
* result rather than crashing. Because they are hooks, blocks call them
|
|
40
|
+
* unconditionally once per render, so the host hooks must obey the rules of hooks
|
|
41
|
+
* — and the *set* of provided hooks must stay stable for a mounted provider:
|
|
42
|
+
* toggling a field between defined and undefined across renders flips which hook
|
|
43
|
+
* a block calls and breaks the rules of hooks (mount the provider once with a
|
|
44
|
+
* stable value).
|
|
45
|
+
*
|
|
46
|
+
* Calling unconditionally also means an unconfigured block passes an empty
|
|
47
|
+
* `assetId`, so a hook must treat `''` as "nothing to resolve": don't fetch, and
|
|
48
|
+
* report neither loading nor error (`{isLoading: false, isError: false}` with no
|
|
49
|
+
* `url` — with react-query, `enabled: !!assetId`). The block ignores that result:
|
|
50
|
+
* an unconfigured block renders the authoring placeholder inside the editor canvas
|
|
51
|
+
* and nothing outside it, so a hook that fetches for `''` only wastes a request.
|
|
52
|
+
*/
|
|
53
|
+
export interface BlockEditorApi {
|
|
54
|
+
useImageUrl?: UseImageUrl;
|
|
55
|
+
useVideoUrl?: UseVideoUrl;
|
|
56
|
+
}
|
|
57
|
+
export declare const BlockEditorApiContext: import('react').Context<BlockEditorApi>;
|
|
58
|
+
export declare const BlockEditorApiProvider: import('react').Provider<BlockEditorApi>;
|
|
59
|
+
/** Resolve an image asset id via the host-provided `useImageUrl` hook. */
|
|
60
|
+
export declare const useImageUrl: (assetId: string) => ResolvedImage;
|
|
61
|
+
/** Resolve a video asset id via the host-provided `useVideoUrl` hook. */
|
|
62
|
+
export declare const useVideoUrl: (assetId: string) => ResolvedVideo;
|
|
63
|
+
//# sourceMappingURL=BlockEditorApiContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockEditorApiContext.d.ts","sourceRoot":"","sources":["../../src/contexts/BlockEditorApiContext.tsx"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,aAAa,CAAA;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,aAAa,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAMD,eAAO,MAAM,qBAAqB,yCAAoC,CAAA;AAEtE,eAAO,MAAM,sBAAsB,0CAAiC,CAAA;AAEpE,0EAA0E;AAC1E,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,KAAG,aAG7C,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,KAAG,aAG7C,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host institution's brand color as a hex or `rgb()/rgba()` string, or
|
|
3
|
+
* `undefined` when the host provides none. Blocks derive accessible light/dark
|
|
4
|
+
* variants from it (see `deriveBrandColorVariants`) and apply them through
|
|
5
|
+
* InstUI's per-component `themeOverride`. The host (e.g. the editor) provides
|
|
6
|
+
* the value; consumers that don't theme leave the default `undefined`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BrandColorContext: import('react').Context<string | undefined>;
|
|
9
|
+
export declare const useBrandColor: () => string | undefined;
|
|
10
|
+
//# sourceMappingURL=BrandColorContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandColorContext.d.ts","sourceRoot":"","sources":["../../src/contexts/BrandColorContext.tsx"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,6CAA+C,CAAA;AAE7E,eAAO,MAAM,aAAa,QAAO,MAAM,GAAG,SAA0C,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when a block is rendered inside the editor/designer canvas, false when
|
|
3
|
+
* rendered for display. The host (e.g. the editor) provides `true`; consumers
|
|
4
|
+
* that just render content leave the default `false`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DesignerModeContext: import('react').Context<boolean>;
|
|
7
|
+
export declare const useDesignerMode: () => boolean;
|
|
8
|
+
//# sourceMappingURL=DesignerModeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignerModeContext.d.ts","sourceRoot":"","sources":["../../src/contexts/DesignerModeContext.tsx"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,kCAAuB,CAAA;AAEvD,eAAO,MAAM,eAAe,QAAO,OAA0C,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Translate function for dynamic interpolation. The consuming app provides this
|
|
4
|
+
* to handle i18n with variable substitution.
|
|
5
|
+
*
|
|
6
|
+
* `key` is a key of `BlockContentEditorTranslations`, not an English source string —
|
|
7
|
+
* the host resolves it against its own translations map, then substitutes `%{name}`
|
|
8
|
+
* placeholders in the resulting value.
|
|
9
|
+
*
|
|
10
|
+
* Example: with `accordionItemPlaceholderTitle: 'Accordion %{index}'`,
|
|
11
|
+
* translate('accordionItemPlaceholderTitle', { index: 2 }) => 'Accordion 2'
|
|
12
|
+
*/
|
|
13
|
+
export type TranslateFunction = (key: string, options?: Record<string, unknown>) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Translation keys used by the block content editor. The consuming app is
|
|
16
|
+
* responsible for providing translated strings (see `locales/en.json`).
|
|
17
|
+
*/
|
|
18
|
+
export interface BlockContentEditorTranslations {
|
|
19
|
+
/** Placeholder shown in the designer when a Text block has no content. */
|
|
20
|
+
placeholderContent: string;
|
|
21
|
+
/** Placeholder heading shown in the designer when a Banner block is empty. */
|
|
22
|
+
bannerPlaceholderTitle: string;
|
|
23
|
+
/** Placeholder eyebrow shown in the designer when a Banner block is empty. */
|
|
24
|
+
bannerPlaceholderSubtitle: string;
|
|
25
|
+
/** Placeholder quote shown in the designer when a Quote block has no content. */
|
|
26
|
+
quotePlaceholderContent: string;
|
|
27
|
+
/** Placeholder author shown in the designer when a Quote block has no content. */
|
|
28
|
+
quotePlaceholderAuthor: string;
|
|
29
|
+
/** Placeholder code shown in the designer when a CodeBlock has no content. */
|
|
30
|
+
codeBlockPlaceholder: string;
|
|
31
|
+
/** Placeholder shown in the designer when an ImageBlock has no image. */
|
|
32
|
+
imageBlockPlaceholder: string;
|
|
33
|
+
/** Announced while an ImageBlock's image is loading. */
|
|
34
|
+
imageBlockLoading: string;
|
|
35
|
+
/** Shown when an ImageBlock's image fails to load. */
|
|
36
|
+
imageBlockError: string;
|
|
37
|
+
/** Placeholder shown when a VideoBlock has no video (designer / empty link). */
|
|
38
|
+
videoBlockPlaceholder: string;
|
|
39
|
+
/** Announced while a VideoBlock's file is loading. */
|
|
40
|
+
videoBlockLoading: string;
|
|
41
|
+
/** Shown when a VideoBlock's video fails to load. */
|
|
42
|
+
videoBlockError: string;
|
|
43
|
+
/** Shown when a VideoBlock's link is not a supported provider. */
|
|
44
|
+
videoBlockUnsupportedProvider: string;
|
|
45
|
+
/** Heading shown while a VideoBlock's media is still processing. */
|
|
46
|
+
videoBlockProcessing: string;
|
|
47
|
+
/** Sub-message shown while a VideoBlock's media is still processing. */
|
|
48
|
+
videoBlockProcessingSubtitle: string;
|
|
49
|
+
/** Fallback iframe title when a VideoBlock has no alt text. */
|
|
50
|
+
videoBlockTitle: string;
|
|
51
|
+
/** Placeholder shown in the designer when an Accordion has no sections at all. */
|
|
52
|
+
accordionPlaceholder: string;
|
|
53
|
+
/** Placeholder title for an empty Accordion section; interpolates `%{index}` via `translate`. */
|
|
54
|
+
accordionItemPlaceholderTitle: string;
|
|
55
|
+
/** Placeholder body shown in the designer when an Accordion section has no content. */
|
|
56
|
+
accordionItemPlaceholderContent: string;
|
|
57
|
+
[key: string]: string;
|
|
58
|
+
}
|
|
59
|
+
export interface BlockContentEditorTranslationsContext {
|
|
60
|
+
translations: BlockContentEditorTranslations;
|
|
61
|
+
translate: TranslateFunction;
|
|
62
|
+
}
|
|
63
|
+
export interface TranslationsProviderProps {
|
|
64
|
+
translations: BlockContentEditorTranslations;
|
|
65
|
+
translate: TranslateFunction;
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
}
|
|
68
|
+
export declare function TranslationsProvider({ translations, translate, children, }: TranslationsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare function useTranslations(): BlockContentEditorTranslationsContext;
|
|
70
|
+
//# sourceMappingURL=TranslationsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslationsContext.d.ts","sourceRoot":"","sources":["../../src/contexts/TranslationsContext.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;AAE1F;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,0EAA0E;IAC1E,kBAAkB,EAAE,MAAM,CAAA;IAC1B,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,yBAAyB,EAAE,MAAM,CAAA;IACjC,iFAAiF;IACjF,uBAAuB,EAAE,MAAM,CAAA;IAC/B,kFAAkF;IAClF,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,oBAAoB,EAAE,MAAM,CAAA;IAC5B,yEAAyE;IACzE,qBAAqB,EAAE,MAAM,CAAA;IAC7B,wDAAwD;IACxD,iBAAiB,EAAE,MAAM,CAAA;IACzB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAA;IACvB,gFAAgF;IAChF,qBAAqB,EAAE,MAAM,CAAA;IAC7B,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAA;IACzB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAA;IACvB,kEAAkE;IAClE,6BAA6B,EAAE,MAAM,CAAA;IACrC,oEAAoE;IACpE,oBAAoB,EAAE,MAAM,CAAA;IAC5B,wEAAwE;IACxE,4BAA4B,EAAE,MAAM,CAAA;IACpC,+DAA+D;IAC/D,eAAe,EAAE,MAAM,CAAA;IACvB,kFAAkF;IAClF,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iGAAiG;IACjG,6BAA6B,EAAE,MAAM,CAAA;IACrC,uFAAuF;IACvF,+BAA+B,EAAE,MAAM,CAAA;IAEvC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,qCAAqC;IACpD,YAAY,EAAE,8BAA8B,CAAA;IAC5C,SAAS,EAAE,iBAAiB,CAAA;CAC7B;AAMD,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,8BAA8B,CAAA;IAC5C,SAAS,EAAE,iBAAiB,CAAA;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,SAAS,EACT,QAAQ,GACT,EAAE,yBAAyB,2CAG3B;AAED,wBAAgB,eAAe,IAAI,qCAAqC,CAMvE"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './components/blocks/Accordion';
|
|
2
|
+
export * from './components/blocks/Text';
|
|
3
|
+
export * from './components/blocks/Banner';
|
|
4
|
+
export * from './components/blocks/Quote';
|
|
5
|
+
export * from './components/blocks/CodeBlock';
|
|
6
|
+
export * from './components/blocks/ImageBlock';
|
|
7
|
+
export * from './components/blocks/VideoBlock';
|
|
8
|
+
export { BlockEditorApiContext, BlockEditorApiProvider, useImageUrl, useVideoUrl, type BlockEditorApi, type ResolvedImage, type ResolvedVideo, type UseImageUrl, type UseVideoUrl, } from './contexts/BlockEditorApiContext';
|
|
9
|
+
export { BrandColorContext, useBrandColor } from './contexts/BrandColorContext';
|
|
10
|
+
export { DesignerModeContext, useDesignerMode } from './contexts/DesignerModeContext';
|
|
11
|
+
export { TranslationsProvider, useTranslations, type BlockContentEditorTranslations, type BlockContentEditorTranslationsContext, type TranslateFunction, type TranslationsProviderProps, } from './contexts/TranslationsContext';
|
|
12
|
+
export * from './schema';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAG9C,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,KAAK,8BAA8B,EACnC,KAAK,qCAAqC,EAC1C,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,gCAAgC,CAAA;AAGvC,cAAc,UAAU,CAAA"}
|