@frontlit/page-builder 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/alignment-dZDzN96G.d.ts +5 -0
- package/dist/blocks/index.d.ts +255 -0
- package/dist/blocks/index.js +6 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/builder/index.d.ts +240 -0
- package/dist/builder/index.js +8 -0
- package/dist/builder/index.js.map +1 -0
- package/dist/button-C3VrMJkr.d.ts +20 -0
- package/dist/chunk-7KIX4WAO.js +4229 -0
- package/dist/chunk-7KIX4WAO.js.map +1 -0
- package/dist/chunk-7W6Q4WA7.js +515 -0
- package/dist/chunk-7W6Q4WA7.js.map +1 -0
- package/dist/chunk-GTY75HW2.js +22 -0
- package/dist/chunk-GTY75HW2.js.map +1 -0
- package/dist/chunk-MO76KZY2.js +3580 -0
- package/dist/chunk-MO76KZY2.js.map +1 -0
- package/dist/chunk-RBJBODQP.js +2011 -0
- package/dist/chunk-RBJBODQP.js.map +1 -0
- package/dist/chunk-RUYOL7JZ.js +4 -0
- package/dist/chunk-RUYOL7JZ.js.map +1 -0
- package/dist/chunk-SSQWYMQR.js +393 -0
- package/dist/chunk-SSQWYMQR.js.map +1 -0
- package/dist/color-mode-DIEEt9WP.d.ts +3 -0
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -0
- package/dist/data-slots.d.ts +25 -0
- package/dist/data-slots.js +3 -0
- package/dist/data-slots.js.map +1 -0
- package/dist/fonts/alegreya/alegreya-latin-variable.woff2 +0 -0
- package/dist/fonts/bebas-neue/bebas-neue-latin-400-normal.woff2 +0 -0
- package/dist/fonts/inter/inter-latin-variable.woff2 +0 -0
- package/dist/fonts/lato/lato-latin-100-normal.woff2 +0 -0
- package/dist/fonts/lato/lato-latin-300-normal.woff2 +0 -0
- package/dist/fonts/lato/lato-latin-400-normal.woff2 +0 -0
- package/dist/fonts/lato/lato-latin-700-normal.woff2 +0 -0
- package/dist/fonts/lato/lato-latin-900-normal.woff2 +0 -0
- package/dist/fonts/merriweather/merriweather-latin-variable.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-100-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-200-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-300-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-400-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-500-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-600-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-700-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-800-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-900-normal.woff2 +0 -0
- package/dist/fonts/montserrat/montserrat-latin-variable.woff2 +0 -0
- package/dist/fonts/mulish/mulish-latin-variable.woff2 +0 -0
- package/dist/fonts/noto-sans/noto-sans-latin-variable.woff2 +0 -0
- package/dist/fonts/nunito/nunito-latin-variable.woff2 +0 -0
- package/dist/fonts/open-sans/open-sans-latin-variable.woff2 +0 -0
- package/dist/fonts/oswald/oswald-latin-variable.woff2 +0 -0
- package/dist/fonts/playfair-display/playfair-display-latin-variable.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-100-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-200-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-300-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-400-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-500-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-600-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-700-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-800-normal.woff2 +0 -0
- package/dist/fonts/poppins/poppins-latin-900-normal.woff2 +0 -0
- package/dist/fonts/pt-sans/pt-sans-latin-400-normal.woff2 +0 -0
- package/dist/fonts/pt-sans/pt-sans-latin-700-normal.woff2 +0 -0
- package/dist/fonts/quicksand/quicksand-latin-variable.woff2 +0 -0
- package/dist/fonts/raleway/raleway-latin-variable.woff2 +0 -0
- package/dist/fonts/roboto/roboto-latin-variable.woff2 +0 -0
- package/dist/fonts/roboto-slab/roboto-slab-latin-variable.woff2 +0 -0
- package/dist/fonts/rubik/rubik-latin-variable.woff2 +0 -0
- package/dist/fonts/source-sans-3/source-sans-3-latin-400-normal.woff2 +0 -0
- package/dist/fonts/source-sans-3/source-sans-3-latin-variable.woff2 +0 -0
- package/dist/fonts/source-serif-4/source-serif-4-latin-variable.woff2 +0 -0
- package/dist/fonts/work-sans/work-sans-latin-variable.woff2 +0 -0
- package/dist/image-D7GlnOio.d.ts +30 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/media-Njv378j7.d.ts +13 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +4 -0
- package/dist/models/index.js.map +1 -0
- package/dist/nav-link-BfxvQ1s6.d.ts +37 -0
- package/dist/page-DfVl_aHX.d.ts +26 -0
- package/dist/primitives/index.d.ts +140 -0
- package/dist/primitives/index.js +4 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/renderer/index.d.ts +81 -0
- package/dist/renderer/index.js +7 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/section-background-BgOCp5l3.d.ts +50 -0
- package/dist/styles.css +15322 -0
- package/dist/theme-style-39nxXQy0.d.ts +141 -0
- package/dist/theme.css +242 -0
- package/dist/widget--uEOpdq3.d.ts +105 -0
- package/package.json +142 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type AspectRatio = "16/9" | "4/3" | "1/1" | "21/9" | "9/16" | "2/1" | "3/2" | string;
|
|
4
|
+
interface VideoThumbnailProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
thumbnailUrl?: string;
|
|
7
|
+
videoUrl: string;
|
|
8
|
+
aspectRatio?: AspectRatio;
|
|
9
|
+
modal?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function VideoWithPreview({ title, thumbnailUrl, videoUrl, aspectRatio, modal, }: VideoThumbnailProps): React.JSX.Element;
|
|
12
|
+
|
|
13
|
+
type ImageObjectFit = "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
14
|
+
interface ImgProps {
|
|
15
|
+
src: string;
|
|
16
|
+
classes?: string;
|
|
17
|
+
alt?: string;
|
|
18
|
+
defaultImage?: string;
|
|
19
|
+
loading?: "eager" | "lazy";
|
|
20
|
+
height?: string;
|
|
21
|
+
sizes?: `${string}vw`;
|
|
22
|
+
width?: string;
|
|
23
|
+
borderRadius?: number;
|
|
24
|
+
noDefaultImage?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
objectFit?: ImageObjectFit;
|
|
27
|
+
}
|
|
28
|
+
declare const Image: (props: ImgProps) => React.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { type AspectRatio as A, Image as I, type VideoThumbnailProps as V, type ImageObjectFit as a, VideoWithPreview as b };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { T as Theme } from './section-background-BgOCp5l3.js';
|
|
2
|
+
export { B as BackgroundAttachment, a as BackgroundRepeat, b as BlendMode, S as SectionBackground, c as SectionBackgroundOverlay } from './section-background-BgOCp5l3.js';
|
|
3
|
+
export { B as Border, C as Colors, a as CustomStyle, D as DisabledStyle, P as Padding, S as Shadow, T as ThemeStyle, b as Typography } from './theme-style-39nxXQy0.js';
|
|
4
|
+
import { W as Widget, d as WidgetInstance } from './widget--uEOpdq3.js';
|
|
5
|
+
export { B as BlockLayout, P as PageData, a as PageType, b as WidgetDefaultSettings, c as WidgetEditorProps, e as WidgetMetadata, f as WidgetProps } from './widget--uEOpdq3.js';
|
|
6
|
+
export { M as Media } from './media-Njv378j7.js';
|
|
7
|
+
export { P as Page, a as PageSeo } from './page-DfVl_aHX.js';
|
|
8
|
+
export { A as Alignment, H as HorizontalAlignment, V as VerticalAlignment } from './alignment-dZDzN96G.js';
|
|
9
|
+
export { TextEditorContent } from '@frontlit/text-editor';
|
|
10
|
+
export { EditableBlock, EditableBlockProps, PageRenderer, PageRendererProps, generateThemeStyles } from './renderer/index.js';
|
|
11
|
+
export { P as PageBuilderLinkComponent, a as PageBuilderLinkProps, b as PageBuilderLinkProvider } from './nav-link-BfxvQ1s6.js';
|
|
12
|
+
export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderProps, PageBuilderSlider, PageBuilderState, PatternPreset, PatternPresetCategory, PreviewDevice, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, ThemeEditorProps, VerticalPaddingSelector, getMaxWidthTWClass, getVerticalPaddingTWClass } from './builder/index.js';
|
|
13
|
+
export { DataSlotLoadRequest, DataSlotLoader, DataSlotLoaders, loadDataSlots } from './data-slots.js';
|
|
14
|
+
import 'react';
|
|
15
|
+
import 'lucide-react';
|
|
16
|
+
import './color-mode-DIEEt9WP.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Every block available to the page builder, keyed by its
|
|
20
|
+
* `metadata.name`. `header` and `footer` are singleton, layout-level
|
|
21
|
+
* blocks placed outside the normal flow by the renderer.
|
|
22
|
+
*/
|
|
23
|
+
declare const blockRegistry: Record<string, Widget<any>>;
|
|
24
|
+
declare const LAYOUT_BLOCK_NAMES: string[];
|
|
25
|
+
declare const NON_ADDABLE_BLOCK_NAMES: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Adds a host application's block to the shared renderer and builder
|
|
28
|
+
* registry. Register blocks while the application module initializes, before
|
|
29
|
+
* rendering either `PageBuilder` or `PageRenderer`.
|
|
30
|
+
*
|
|
31
|
+
* Built-in names are intentionally protected: a persisted page must always
|
|
32
|
+
* have one stable implementation for a block name. Give host blocks a
|
|
33
|
+
* namespaced name such as `acme-event-list`.
|
|
34
|
+
*/
|
|
35
|
+
declare function registerBlock(widget: Widget<any>): void;
|
|
36
|
+
declare function getWidget(name: string): Widget<any> | undefined;
|
|
37
|
+
/** Blocks a user can add to the body of a page. */
|
|
38
|
+
declare function getAddableBlocks(): Widget<any>[];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new widget instance for the given block name, seeded with that
|
|
42
|
+
* block's default settings.
|
|
43
|
+
*/
|
|
44
|
+
declare function createWidgetInstance(name: string, overrides?: Record<string, unknown>): WidgetInstance;
|
|
45
|
+
/** Ensures a builder layout always has one locked header and footer.
|
|
46
|
+
* API validation remains the hard boundary; this repair keeps legacy/empty
|
|
47
|
+
* initial layouts usable and prevents the UI from ever presenting a page
|
|
48
|
+
* without its shared navigation shell. */
|
|
49
|
+
declare function ensureRequiredSharedWidgets(layout: WidgetInstance[]): WidgetInstance[];
|
|
50
|
+
/** The default theme new pages start out with. */
|
|
51
|
+
declare function getDefaultTheme(): Theme;
|
|
52
|
+
/**
|
|
53
|
+
* A complete, ready-to-render landing page layout showcasing every
|
|
54
|
+
* available block — used both as the FrontLit marketing landing page and
|
|
55
|
+
* as the page builder demo's starting point.
|
|
56
|
+
*/
|
|
57
|
+
declare function createDefaultLayout(): WidgetInstance[];
|
|
58
|
+
|
|
59
|
+
export { LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, Theme, Widget, WidgetInstance, blockRegistry, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getAddableBlocks, getDefaultTheme, getWidget, registerBlock };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './chunk-RUYOL7JZ.js';
|
|
3
|
+
export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderSlider, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, VerticalPaddingSelector, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getDefaultTheme, getMaxWidthTWClass, getVerticalPaddingTWClass } from './chunk-MO76KZY2.js';
|
|
4
|
+
export { EditableBlock, LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, PageRenderer, blockRegistry, generateThemeStyles, getAddableBlocks, getWidget, registerBlock } from './chunk-SSQWYMQR.js';
|
|
5
|
+
import './chunk-7KIX4WAO.js';
|
|
6
|
+
export { PageBuilderLinkProvider } from './chunk-7W6Q4WA7.js';
|
|
7
|
+
import './chunk-RBJBODQP.js';
|
|
8
|
+
export { loadDataSlots } from './chunk-GTY75HW2.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Media {
|
|
2
|
+
mediaId: string;
|
|
3
|
+
originalFileName?: string;
|
|
4
|
+
mimeType?: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
caption?: string;
|
|
7
|
+
/** Public URL of the asset. */
|
|
8
|
+
file?: string;
|
|
9
|
+
/** Thumbnail URL, falls back to `file` when absent. */
|
|
10
|
+
thumbnail?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type { Media as M };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { B as BackgroundAttachment, a as BackgroundRepeat, b as BlendMode, S as SectionBackground, c as SectionBackgroundOverlay, T as Theme } from '../section-background-BgOCp5l3.js';
|
|
2
|
+
export { B as Border, C as Colors, a as CustomStyle, D as DisabledStyle, P as Padding, S as Shadow, T as ThemeStyle, b as Typography } from '../theme-style-39nxXQy0.js';
|
|
3
|
+
export { B as BlockLayout, P as PageData, a as PageType, W as Widget, b as WidgetDefaultSettings, c as WidgetEditorProps, d as WidgetInstance, e as WidgetMetadata, f as WidgetProps } from '../widget--uEOpdq3.js';
|
|
4
|
+
export { M as Media } from '../media-Njv378j7.js';
|
|
5
|
+
export { P as Page, a as PageSeo } from '../page-DfVl_aHX.js';
|
|
6
|
+
export { A as Alignment, H as HorizontalAlignment, V as VerticalAlignment } from '../alignment-dZDzN96G.js';
|
|
7
|
+
export { TextEditorContent } from '@frontlit/text-editor';
|
|
8
|
+
import 'react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface PageBuilderLinkProps {
|
|
4
|
+
href: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
9
|
+
target?: string;
|
|
10
|
+
rel?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Optional host-supplied link. Next.js apps can pass `next/link`; Vite / Remix
|
|
14
|
+
* / plain React hosts can omit it and NavLink will render a native `<a>`.
|
|
15
|
+
*/
|
|
16
|
+
type PageBuilderLinkComponent = React.ComponentType<PageBuilderLinkProps>;
|
|
17
|
+
declare function PageBuilderLinkProvider({ component, children, }: {
|
|
18
|
+
component?: PageBuilderLinkComponent | null;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
declare function usePageBuilderLinkComponent(): PageBuilderLinkComponent;
|
|
22
|
+
interface NavLinkProps {
|
|
23
|
+
href: string;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
openInSameTab?: boolean;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
className?: string;
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A navigation-aware link used inside block widgets. In-page anchors scroll
|
|
32
|
+
* to the target. Internal paths (`/...`) use the host `linkComponent` when
|
|
33
|
+
* one is provided (e.g. Next.js `Link`); everything else is a native `<a>`.
|
|
34
|
+
*/
|
|
35
|
+
declare function NavLink({ href, children, openInSameTab, style, className, onClick, }: NavLinkProps): React.JSX.Element;
|
|
36
|
+
|
|
37
|
+
export { NavLink as N, type PageBuilderLinkComponent as P, type PageBuilderLinkProps as a, PageBuilderLinkProvider as b, usePageBuilderLinkComponent as u };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { a as PageType, d as WidgetInstance } from './widget--uEOpdq3.js';
|
|
2
|
+
import { M as Media } from './media-Njv378j7.js';
|
|
3
|
+
|
|
4
|
+
/** Page-level SEO settings, editable from the builder's SEO panel. */
|
|
5
|
+
interface PageSeo {
|
|
6
|
+
/** Page title for search results and the browser tab. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Short summary shown in search results and link previews. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Social card (Open Graph) image shown when the page is shared. */
|
|
11
|
+
socialImage?: Media;
|
|
12
|
+
/** When false, the page asks search engines not to index it. */
|
|
13
|
+
robotsAllowed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface Page {
|
|
16
|
+
pageId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: PageType;
|
|
19
|
+
layout: WidgetInstance[];
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
socialImage?: Media;
|
|
23
|
+
robotsAllowed?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type { Page as P, PageSeo as a };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import { T as ThemeStyle } from '../theme-style-39nxXQy0.js';
|
|
4
|
+
export { a as Button, B as ButtonProps } from '../button-C3VrMJkr.js';
|
|
5
|
+
import { S as SectionBackground, T as Theme } from '../section-background-BgOCp5l3.js';
|
|
6
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
9
|
+
|
|
10
|
+
interface TypographyProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
11
|
+
children: React__default.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
theme?: ThemeStyle;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const Preheader: React__default.FC<TypographyProps>;
|
|
17
|
+
|
|
18
|
+
declare const Header1: React__default.FC<TypographyProps>;
|
|
19
|
+
|
|
20
|
+
declare const Header2: React__default.FC<TypographyProps>;
|
|
21
|
+
|
|
22
|
+
declare const Header3: React__default.FC<TypographyProps>;
|
|
23
|
+
|
|
24
|
+
declare const Header4: React__default.FC<TypographyProps>;
|
|
25
|
+
|
|
26
|
+
declare const Subheader1: React__default.FC<TypographyProps & {
|
|
27
|
+
component?: "h5" | "span";
|
|
28
|
+
}>;
|
|
29
|
+
|
|
30
|
+
declare const Subheader2: React__default.FC<TypographyProps>;
|
|
31
|
+
|
|
32
|
+
declare const Text1: React__default.FC<TypographyProps & {
|
|
33
|
+
component?: "p" | "span";
|
|
34
|
+
}>;
|
|
35
|
+
|
|
36
|
+
declare const Text2: React__default.FC<TypographyProps & {
|
|
37
|
+
component?: "p" | "span";
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
41
|
+
children: React__default.ReactNode;
|
|
42
|
+
className?: string;
|
|
43
|
+
theme?: ThemeStyle;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
style?: React__default.CSSProperties;
|
|
46
|
+
}
|
|
47
|
+
declare const Link: React__default.FC<LinkProps>;
|
|
48
|
+
|
|
49
|
+
interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
50
|
+
theme?: ThemeStyle;
|
|
51
|
+
error?: boolean;
|
|
52
|
+
}
|
|
53
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
54
|
+
|
|
55
|
+
interface TextareaProps extends React__default.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
56
|
+
theme?: ThemeStyle;
|
|
57
|
+
error?: boolean;
|
|
58
|
+
}
|
|
59
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
60
|
+
|
|
61
|
+
declare const Caption: React__default.FC<TypographyProps>;
|
|
62
|
+
|
|
63
|
+
interface PageCardProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
64
|
+
isLink?: boolean;
|
|
65
|
+
children: React__default.ReactNode;
|
|
66
|
+
className?: string;
|
|
67
|
+
theme?: ThemeStyle;
|
|
68
|
+
}
|
|
69
|
+
interface PageCardImageProps extends React__default.ImgHTMLAttributes<HTMLImageElement> {
|
|
70
|
+
src: string;
|
|
71
|
+
alt: string;
|
|
72
|
+
className?: string;
|
|
73
|
+
theme?: ThemeStyle;
|
|
74
|
+
}
|
|
75
|
+
interface PageCardContentProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
76
|
+
children: React__default.ReactNode;
|
|
77
|
+
className?: string;
|
|
78
|
+
theme?: ThemeStyle;
|
|
79
|
+
}
|
|
80
|
+
interface PageCardHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
81
|
+
children: React__default.ReactNode;
|
|
82
|
+
className?: string;
|
|
83
|
+
theme?: ThemeStyle;
|
|
84
|
+
}
|
|
85
|
+
declare const PageCard: React__default.FC<PageCardProps>;
|
|
86
|
+
declare const PageCardImage: React__default.FC<PageCardImageProps>;
|
|
87
|
+
declare const PageCardContent: React__default.FC<PageCardContentProps>;
|
|
88
|
+
declare const PageCardHeader: React__default.FC<PageCardHeaderProps>;
|
|
89
|
+
|
|
90
|
+
interface LabelProps extends React__default.LabelHTMLAttributes<HTMLLabelElement> {
|
|
91
|
+
theme?: ThemeStyle;
|
|
92
|
+
error?: boolean;
|
|
93
|
+
}
|
|
94
|
+
declare const Label: React__default.ForwardRefExoticComponent<LabelProps & React__default.RefAttributes<HTMLLabelElement>>;
|
|
95
|
+
|
|
96
|
+
interface SectionProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
97
|
+
children: React__default.ReactNode;
|
|
98
|
+
className?: string;
|
|
99
|
+
theme?: ThemeStyle;
|
|
100
|
+
component?: "header" | "footer" | "section";
|
|
101
|
+
background?: SectionBackground;
|
|
102
|
+
nextTheme?: "dark" | "light";
|
|
103
|
+
}
|
|
104
|
+
declare const Section: React__default.FC<SectionProps>;
|
|
105
|
+
|
|
106
|
+
declare const badgeVariants: (props?: {
|
|
107
|
+
variant?: "default" | "destructive" | "outline" | "secondary";
|
|
108
|
+
} & class_variance_authority_types.ClassProp) => string;
|
|
109
|
+
interface BadgeProps$1 extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface BadgeProps extends Omit<BadgeProps$1, "variant"> {
|
|
113
|
+
theme?: ThemeStyle;
|
|
114
|
+
style?: Record<string, string>;
|
|
115
|
+
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
116
|
+
}
|
|
117
|
+
declare const Badge: React__default.FC<BadgeProps>;
|
|
118
|
+
|
|
119
|
+
declare const Switch$1: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
120
|
+
|
|
121
|
+
interface SwitchProps extends React__default.ComponentPropsWithoutRef<typeof Switch$1> {
|
|
122
|
+
theme?: ThemeStyle;
|
|
123
|
+
}
|
|
124
|
+
declare const Switch: React__default.ForwardRefExoticComponent<SwitchProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
125
|
+
|
|
126
|
+
declare const themes: Theme[];
|
|
127
|
+
|
|
128
|
+
interface DrawerProps {
|
|
129
|
+
trigger: ReactNode;
|
|
130
|
+
children: ReactNode;
|
|
131
|
+
side?: "left" | "right" | "top" | "bottom";
|
|
132
|
+
open: boolean;
|
|
133
|
+
setOpen: (open: boolean) => void;
|
|
134
|
+
style?: React.CSSProperties;
|
|
135
|
+
className?: string;
|
|
136
|
+
theme?: ThemeStyle;
|
|
137
|
+
}
|
|
138
|
+
declare function Drawer({ trigger, children, side, open, setOpen, style, className, theme: _theme, }: DrawerProps): React$1.JSX.Element;
|
|
139
|
+
|
|
140
|
+
export { Badge, type BadgeProps, Caption, Drawer, Header1, Header2, Header3, Header4, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, PageCard, PageCardContent, type PageCardContentProps, PageCardHeader, type PageCardHeaderProps, PageCardImage, type PageCardImageProps, type PageCardProps, Preheader, Section, Subheader1, Subheader2, Switch, type SwitchProps, Text1, Text2, Textarea, type TextareaProps, themes };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { Badge, Button2 as Button, Caption, Drawer, Header1, Header2, Header3, Header4, Input, Label, Link, PageCard, PageCardContent, PageCardHeader, PageCardImage, Preheader, Section, Subheader1, Subheader2, Switch2 as Switch, Text1, Text2, Textarea, themes } from '../chunk-RBJBODQP.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { T as Theme } from '../section-background-BgOCp5l3.js';
|
|
3
|
+
import { d as WidgetInstance, P as PageData } from '../widget--uEOpdq3.js';
|
|
4
|
+
import { P as PageBuilderLinkComponent } from '../nav-link-BfxvQ1s6.js';
|
|
5
|
+
export { a as PageBuilderLinkProps, b as PageBuilderLinkProvider } from '../nav-link-BfxvQ1s6.js';
|
|
6
|
+
import '../theme-style-39nxXQy0.js';
|
|
7
|
+
|
|
8
|
+
interface PageRendererProps {
|
|
9
|
+
layout: WidgetInstance[];
|
|
10
|
+
theme: Theme;
|
|
11
|
+
pageData?: PageData;
|
|
12
|
+
/** Optional content rendered between the shared header and footer. */
|
|
13
|
+
children?: React__default.ReactNode;
|
|
14
|
+
/** Host-resolved data keyed by a generic data-slot's configured name. */
|
|
15
|
+
dataSlots?: Record<string, React__default.ReactNode>;
|
|
16
|
+
/** Resolved palette currently painted (`system` is already applied). */
|
|
17
|
+
nextTheme?: "light" | "dark";
|
|
18
|
+
/** Visitor or preview preference, including follow-the-OS. */
|
|
19
|
+
themeMode?: "light" | "dark" | "system";
|
|
20
|
+
onThemeModeChange?: (mode: "light" | "dark" | "system") => void;
|
|
21
|
+
/** When true, renders hover controls (edit/move/delete/add) for use inside the builder canvas. */
|
|
22
|
+
editing?: boolean;
|
|
23
|
+
selectedWidgetId?: string;
|
|
24
|
+
/** Widget to briefly highlight, e.g. right after it was moved. */
|
|
25
|
+
highlightedWidgetId?: string;
|
|
26
|
+
onSelectWidget?: (widgetId: string) => void;
|
|
27
|
+
onMoveWidgetUp?: (widgetId: string) => void;
|
|
28
|
+
onMoveWidgetDown?: (widgetId: string) => void;
|
|
29
|
+
onDeleteWidget?: (widgetId: string) => void;
|
|
30
|
+
onAddWidgetBelow?: (widgetId: string) => void;
|
|
31
|
+
/** Injects the theme's generated CSS custom properties as a `<style>` tag. Disable if the host app renders it elsewhere. */
|
|
32
|
+
injectThemeStyles?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Optional host link (e.g. Next.js `Link`) used for internal `/...` paths
|
|
35
|
+
* inside block widgets. Omit it to render native `<a>` tags — no
|
|
36
|
+
* framework dependency.
|
|
37
|
+
*/
|
|
38
|
+
linkComponent?: PageBuilderLinkComponent;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Renders a page's widget layout using the block registry. Used both for
|
|
43
|
+
* plain (non-editable) display and, with `editing`, as the live canvas
|
|
44
|
+
* inside the page builder.
|
|
45
|
+
*/
|
|
46
|
+
declare function PageRenderer({ layout, theme, pageData, children, dataSlots, nextTheme, themeMode, onThemeModeChange, editing, selectedWidgetId, highlightedWidgetId, onSelectWidget, onMoveWidgetUp, onMoveWidgetDown, onDeleteWidget, onAddWidgetBelow, injectThemeStyles, linkComponent, className, }: PageRendererProps): React__default.JSX.Element;
|
|
47
|
+
|
|
48
|
+
interface EditableBlockProps {
|
|
49
|
+
children: React__default.ReactNode;
|
|
50
|
+
editing: boolean;
|
|
51
|
+
/** Ref to the wrapper element so the canvas can scroll the block into view. */
|
|
52
|
+
containerRef?: React__default.Ref<HTMLDivElement>;
|
|
53
|
+
selected?: boolean;
|
|
54
|
+
/** Draws a temporary attention flash, e.g. right after the block was moved. */
|
|
55
|
+
highlighted?: boolean;
|
|
56
|
+
label?: string;
|
|
57
|
+
onSelect?: () => void;
|
|
58
|
+
onMoveUp?: () => void;
|
|
59
|
+
onMoveDown?: () => void;
|
|
60
|
+
onDelete?: () => void;
|
|
61
|
+
onAddBelow?: () => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Wraps a rendered block with hover/selection affordances when the page
|
|
65
|
+
* builder is in editing mode. In non-editing (plain display) mode it's a
|
|
66
|
+
* transparent passthrough.
|
|
67
|
+
*/
|
|
68
|
+
declare function EditableBlock({ children, editing, containerRef, selected, highlighted, label, onSelect, onMoveUp, onMoveDown, onDelete, onAddBelow, }: EditableBlockProps): React__default.JSX.Element;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Generates full CSS color values for the custom properties every primitive
|
|
72
|
+
* reads. Full colors (rather than bare HSL channels) let the renderer coexist
|
|
73
|
+
* with Tailwind v4 hosts whose semantic utilities use `var(--primary)` while
|
|
74
|
+
* still accepting CourseLit-derived hex theme data.
|
|
75
|
+
*
|
|
76
|
+
* Callers rendering more than one theme in a document should pass a unique
|
|
77
|
+
* selector so one renderer cannot overwrite another renderer's variables.
|
|
78
|
+
*/
|
|
79
|
+
declare function generateThemeStyles(theme: Theme, selector?: string): string;
|
|
80
|
+
|
|
81
|
+
export { EditableBlock, type EditableBlockProps, PageBuilderLinkComponent, PageRenderer, type PageRendererProps, generateThemeStyles };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { EditableBlock, PageRenderer, generateThemeStyles } from '../chunk-SSQWYMQR.js';
|
|
3
|
+
import '../chunk-7KIX4WAO.js';
|
|
4
|
+
export { PageBuilderLinkProvider } from '../chunk-7W6Q4WA7.js';
|
|
5
|
+
import '../chunk-RBJBODQP.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { T as ThemeStyle } from './theme-style-39nxXQy0.js';
|
|
2
|
+
|
|
3
|
+
interface Theme {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
theme: ThemeStyle;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
10
|
+
type BackgroundRepeat = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "space" | "round";
|
|
11
|
+
/**
|
|
12
|
+
* CSS `background-attachment`.
|
|
13
|
+
* - `scroll` (default): background moves with the section / page
|
|
14
|
+
* - `fixed`: background is pinned to the viewport so content scrolls
|
|
15
|
+
* over a static surface (classic parallax / “hero still” look)
|
|
16
|
+
* - `local`: background scrolls with the element’s own overflow
|
|
17
|
+
*/
|
|
18
|
+
type BackgroundAttachment = "scroll" | "fixed" | "local";
|
|
19
|
+
interface SectionBackgroundOverlay {
|
|
20
|
+
color: string;
|
|
21
|
+
colorDark?: string;
|
|
22
|
+
blendMode: BlendMode;
|
|
23
|
+
opacity: number;
|
|
24
|
+
}
|
|
25
|
+
type SectionBackground = {
|
|
26
|
+
type: "color" | "image" | "gradient";
|
|
27
|
+
backgroundColor?: string;
|
|
28
|
+
backgroundColorDark?: string;
|
|
29
|
+
backgroundImage?: string;
|
|
30
|
+
backgroundImageDark?: string;
|
|
31
|
+
backgroundSize?: string;
|
|
32
|
+
backgroundPosition?: string;
|
|
33
|
+
backgroundRepeat?: BackgroundRepeat;
|
|
34
|
+
/**
|
|
35
|
+
* When `"fixed"`, the image/pattern stays still relative to the
|
|
36
|
+
* viewport while the page scrolls. Most useful on image and pattern
|
|
37
|
+
* (gradient) backgrounds; ignored for solid color fills.
|
|
38
|
+
*/
|
|
39
|
+
backgroundAttachment?: BackgroundAttachment;
|
|
40
|
+
maskImage?: string;
|
|
41
|
+
gradientBackgroundSize?: string;
|
|
42
|
+
gradientBackgroundPosition?: string;
|
|
43
|
+
gradientBackgroundRepeat?: BackgroundRepeat;
|
|
44
|
+
gradientMaskImage?: string;
|
|
45
|
+
blur?: number;
|
|
46
|
+
overlay?: SectionBackgroundOverlay;
|
|
47
|
+
media?: Record<string, unknown>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type { BackgroundAttachment as B, SectionBackground as S, Theme as T, BackgroundRepeat as a, BlendMode as b, SectionBackgroundOverlay as c };
|