@frontlit/page-builder 0.1.0-alpha.1 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -2
- package/dist/blocks/index.d.ts +35 -21
- package/dist/blocks/index.js +4 -3
- package/dist/builder/index.d.ts +8 -11
- package/dist/builder/index.js +7 -5
- package/dist/{button-C3VrMJkr.d.ts → button-OLKN3wPf.d.ts} +3 -3
- package/dist/{chunk-7W6Q4WA7.js → chunk-36QHCIPM.js} +252 -282
- package/dist/chunk-36QHCIPM.js.map +1 -0
- package/dist/{chunk-GTY75HW2.js → chunk-ATNM5JHI.js} +2 -2
- package/dist/chunk-ATNM5JHI.js.map +1 -0
- package/dist/chunk-BBI7UHOA.js +56 -0
- package/dist/chunk-BBI7UHOA.js.map +1 -0
- package/dist/{chunk-MO76KZY2.js → chunk-GIKTOAQS.js} +661 -423
- package/dist/chunk-GIKTOAQS.js.map +1 -0
- package/dist/chunk-HWOVSHIW.js +4 -0
- package/dist/{chunk-RUYOL7JZ.js.map → chunk-HWOVSHIW.js.map} +1 -1
- package/dist/{chunk-SSQWYMQR.js → chunk-IU4KATI2.js} +74 -129
- package/dist/chunk-IU4KATI2.js.map +1 -0
- package/dist/chunk-J7Z4UW45.js +3418 -0
- package/dist/chunk-J7Z4UW45.js.map +1 -0
- package/dist/{chunk-7KIX4WAO.js → chunk-K4WCLHMS.js} +1435 -1382
- package/dist/chunk-K4WCLHMS.js.map +1 -0
- package/dist/chunk-XU7ALPGQ.js +22 -0
- package/dist/chunk-XU7ALPGQ.js.map +1 -0
- package/dist/components/index.d.ts +33 -8
- package/dist/components/index.js +43 -2
- package/dist/components/index.js.map +1 -1
- package/dist/data-slots.d.ts +3 -3
- package/dist/data-slots.js +1 -1
- package/dist/fonts/archivo/archivo-latin-variable.woff2 +0 -0
- package/dist/fonts/hanken-grotesk/hanken-grotesk-latin-variable.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/jetbrains-mono-latin-variable.woff2 +0 -0
- package/dist/fonts/spline-sans-mono/spline-sans-mono-latin-variable.woff2 +0 -0
- package/dist/heading-DQCxQt38.d.ts +20 -0
- package/dist/image-Bk8kPXwP.d.ts +52 -0
- package/dist/index.d.ts +18 -11
- package/dist/index.js +9 -7
- package/dist/media-CnLImjVC.d.ts +21 -0
- package/dist/models/index.d.ts +6 -6
- package/dist/models/index.js +2 -1
- package/dist/{page-DfVl_aHX.d.ts → page-B5Gmm-Ys.d.ts} +2 -3
- package/dist/primitives/index.d.ts +287 -61
- package/dist/primitives/index.js +2 -1
- package/dist/renderer/index.d.ts +12 -8
- package/dist/renderer/index.js +6 -4
- package/dist/{section-background-BgOCp5l3.d.ts → section-background-6V_LCi5e.d.ts} +1 -1
- package/dist/server/index.d.ts +103 -0
- package/dist/server/index.js +2649 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/islands/code-snippet.d.ts +17 -0
- package/dist/server/islands/code-snippet.js +72 -0
- package/dist/server/islands/code-snippet.js.map +1 -0
- package/dist/server/islands/email-form.d.ts +50 -0
- package/dist/server/islands/email-form.js +406 -0
- package/dist/server/islands/email-form.js.map +1 -0
- package/dist/server/islands/header-mobile-menu.d.ts +22 -0
- package/dist/server/islands/header-mobile-menu.js +422 -0
- package/dist/server/islands/header-mobile-menu.js.map +1 -0
- package/dist/server/islands/inline-embed.d.ts +28 -0
- package/dist/server/islands/inline-embed.js +84 -0
- package/dist/server/islands/inline-embed.js.map +1 -0
- package/dist/server/islands/marquee-track.d.ts +18 -0
- package/dist/server/islands/marquee-track.js +67 -0
- package/dist/server/islands/marquee-track.js.map +1 -0
- package/dist/server/islands/nav-link.d.ts +37 -0
- package/dist/server/islands/nav-link.js +67 -0
- package/dist/server/islands/nav-link.js.map +1 -0
- package/dist/server/islands/support-form.d.ts +17 -0
- package/dist/server/islands/support-form.js +469 -0
- package/dist/server/islands/support-form.js.map +1 -0
- package/dist/server/islands/theme-mode-switcher.d.ts +38 -0
- package/dist/server/islands/theme-mode-switcher.js +169 -0
- package/dist/server/islands/theme-mode-switcher.js.map +1 -0
- package/dist/server/islands/video-with-preview.d.ts +13 -0
- package/dist/server/islands/video-with-preview.js +269 -0
- package/dist/server/islands/video-with-preview.js.map +1 -0
- package/dist/server/primitives.d.ts +200 -0
- package/dist/server/primitives.js +888 -0
- package/dist/server/primitives.js.map +1 -0
- package/dist/server/schema.d.ts +11308 -0
- package/dist/server/schema.js +6179 -0
- package/dist/server/schema.js.map +1 -0
- package/dist/server/theme-CF3fIKvw.d.ts +9 -0
- package/dist/{theme-style-39nxXQy0.d.ts → server/theme-style-5_AGy-4V.d.ts} +43 -1
- package/dist/server/theme-style-BPaMwk88.d.ts +183 -0
- package/dist/server/theme.d.ts +28 -0
- package/dist/{chunk-RBJBODQP.js → server/theme.js} +903 -1243
- package/dist/server/theme.js.map +1 -0
- package/dist/server/widget-YH9BrOwY.d.ts +77 -0
- package/dist/styles.css +4016 -8317
- package/dist/theme-style-BVd5tOsc.d.ts +183 -0
- package/dist/theme.css +186 -191
- package/dist/{widget--uEOpdq3.d.ts → widget-CpE2HdgU.d.ts} +25 -18
- package/package.json +71 -11
- package/schema/page.v1.json +3855 -0
- package/schema/site.v1.json +3811 -0
- package/dist/alignment-dZDzN96G.d.ts +0 -5
- package/dist/chunk-7KIX4WAO.js.map +0 -1
- package/dist/chunk-7W6Q4WA7.js.map +0 -1
- package/dist/chunk-GTY75HW2.js.map +0 -1
- package/dist/chunk-MO76KZY2.js.map +0 -1
- package/dist/chunk-RBJBODQP.js.map +0 -1
- package/dist/chunk-RUYOL7JZ.js +0 -4
- package/dist/chunk-SSQWYMQR.js.map +0 -1
- 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/source-sans-3/source-sans-3-latin-400-normal.woff2 +0 -0
- package/dist/image-D7GlnOio.d.ts +0 -30
- package/dist/media-Njv378j7.d.ts +0 -13
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Block-based page builder and renderer for React. Self-contained — no backend and no framework lock-in. Themes, blocks, and the WYSIWYG builder all run client-side.
|
|
4
4
|
|
|
5
|
+
**You and your agents can collaborate on the same pages.** People edit visually in the WYSIWYG builder. AI agents edit the same page data, which is plain JSON (blocks plus their settings), with no screenshots or browser automation involved. Both kinds of edit go through the same draft and publish flow, so you can review an agent's changes in the builder before they go live, and an agent can pick up where you left off.
|
|
6
|
+
|
|
7
|
+
- **In FrontLit**, agents use the MCP server's page and theme tools: `list_pages`, `get_page`, `create_page`, `update_page`, `publish_page`, `discard_page_draft`, `list_themes`, `create_theme`, `update_theme` and the matching delete tools.
|
|
8
|
+
- **To teach a coding agent to write good FrontLit pages**, install [frontlit-skills](https://github.com/codelitdev/frontlit-skills).
|
|
9
|
+
- **In your own app**, the layout the builder emits through `onChange` is the same JSON your agent reads and writes. See [`docs/ai-editing.md`](./docs/ai-editing.md) for the planned in-builder AI editing design.
|
|
10
|
+
|
|
5
11
|
Rich text editing and rendering live in [`@frontlit/text-editor`](https://www.npmjs.com/package/@frontlit/text-editor), which this package depends on and installs automatically.
|
|
6
12
|
|
|
7
13
|
## Installation
|
|
@@ -20,6 +26,8 @@ import "@frontlit/page-builder/styles.css";
|
|
|
20
26
|
|
|
21
27
|
That file includes the utilities, default tokens, the theme-picker fonts (Inter, Playfair, and the rest), and the TipTap prose styles from `@frontlit/text-editor`. Hosts that already inject those faces via `next/font` keep working: `--font-inter` on the document still wins.
|
|
22
28
|
|
|
29
|
+
**Future:** split the theme-picker faces out of `styles.css` into an opt-in `@frontlit/page-builder/fonts.css`. Hosts that already load Inter, Playfair, and the rest (for example via `next/font`) can skip that file; everyone else imports it next to `styles.css`. `--font-*` on the document and the system-font fallbacks in `theme.css` stay as they are.
|
|
30
|
+
|
|
23
31
|
If the host already runs Tailwind CSS v4, you can skip `styles.css` and scan the packages instead. Import the prose sheet so rich-text lists and code blocks survive Tailwind preflight:
|
|
24
32
|
|
|
25
33
|
```css
|
|
@@ -40,7 +48,6 @@ import {
|
|
|
40
48
|
} from "@frontlit/page-builder";
|
|
41
49
|
import "@frontlit/page-builder/styles.css";
|
|
42
50
|
|
|
43
|
-
|
|
44
51
|
// Read-only rendering (a published page, a marketing site, a preview):
|
|
45
52
|
<PageRenderer
|
|
46
53
|
layout={createDefaultLayout()}
|
|
@@ -64,7 +71,10 @@ Internal `/...` links render as native `<a>` tags by default, so the package wor
|
|
|
64
71
|
|
|
65
72
|
```tsx
|
|
66
73
|
import Link from "next/link";
|
|
67
|
-
import {
|
|
74
|
+
import {
|
|
75
|
+
PageRenderer,
|
|
76
|
+
type PageBuilderLinkProps,
|
|
77
|
+
} from "@frontlit/page-builder";
|
|
68
78
|
|
|
69
79
|
function AppLink(props: PageBuilderLinkProps) {
|
|
70
80
|
return <Link {...props} />;
|
|
@@ -75,6 +85,28 @@ function AppLink(props: PageBuilderLinkProps) {
|
|
|
75
85
|
|
|
76
86
|
`PageBuilder` accepts the same `linkComponent` prop and forwards it to the live preview.
|
|
77
87
|
|
|
88
|
+
### Server rendering (React Server Components)
|
|
89
|
+
|
|
90
|
+
`PageRenderer` is a client component. To render published pages on the server, use `ServerPageRenderer` from `@frontlit/page-builder/server`: static blocks render on the server and ship no JavaScript; only the interactive parts (mobile menu, marquee, email/support forms, copy buttons, links) are client islands.
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { ServerPageRenderer } from "@frontlit/page-builder/server";
|
|
94
|
+
import { resolveTheme } from "@frontlit/page-builder/theme";
|
|
95
|
+
|
|
96
|
+
const theme = resolveTheme(themeId, themeStyle);
|
|
97
|
+
|
|
98
|
+
<ServerPageRenderer layout={layout} theme={theme} pageData={pageData} />;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Because nothing crosses the server/client boundary as a function, it takes no callbacks. Instead:
|
|
102
|
+
|
|
103
|
+
- **Links** — wrap the page in a client component that renders `PageBuilderLinkProvider` (from `@frontlit/page-builder/islands/nav-link`) with your router's link.
|
|
104
|
+
- **Light/dark control** — pass a ready client element as `themeSwitcher` (e.g. one built on `@frontlit/page-builder/islands/theme-mode-switcher`); it is shown in the footer.
|
|
105
|
+
- **Images** — call `setImageAttributesResolver` once at start-up to swap an image's `src`/`srcSet` for your optimizer's URLs (the sites app uses Next's `getImageProps`).
|
|
106
|
+
- **Dark mode** — section backgrounds switch with the `dark` class on an ancestor, so the server needs no colour mode.
|
|
107
|
+
|
|
108
|
+
The server build is separate from the main bundle (`tsup.server.config.ts`): its client islands are listed in `tsup.islands.ts`, built on their own with a `"use client"` banner, and imported — not bundled — by the server entry. A block that needs state or effects must either live in that list or be split so only its interactive part does. The block lookup used by the server renderer is `src/server/registry.ts`; keep it in step with `src/registry.ts` when adding a block.
|
|
109
|
+
|
|
78
110
|
## What's inside
|
|
79
111
|
|
|
80
112
|
| Subpath | What it exports |
|
|
@@ -87,6 +119,10 @@ function AppLink(props: PageBuilderLinkProps) {
|
|
|
87
119
|
| `@frontlit/page-builder/renderer` | `PageRenderer` — renders a page's `WidgetInstance[]` layout, with an `editing` mode for use inside the builder |
|
|
88
120
|
| `@frontlit/page-builder/builder` | `PageBuilder` — the full WYSIWYG editor (add/remove/reorder blocks, edit settings, switch themes) |
|
|
89
121
|
| `@frontlit/page-builder/data-slots` | Server-safe helper for hosts to resolve named data slots before rendering |
|
|
122
|
+
| `@frontlit/page-builder/server` | `ServerPageRenderer`, `setImageAttributesResolver` — server-component page rendering (see above) |
|
|
123
|
+
| `@frontlit/page-builder/theme` | `resolveTheme`, `themes`, `generateThemeStyles` — server-callable and light enough for client components |
|
|
124
|
+
| `@frontlit/page-builder/primitives/server` | The hook-free primitives, callable from server components |
|
|
125
|
+
| `@frontlit/page-builder/islands/*` | Small client islands (`nav-link`, `theme-mode-switcher`) hosts can import without the full client bundle |
|
|
90
126
|
|
|
91
127
|
`createDefaultLayout()` / `getDefaultTheme()` (exported from the root) build a ready-to-render starter landing page.
|
|
92
128
|
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as Media } from '../media-
|
|
3
|
-
import { A as Alignment,
|
|
1
|
+
import { a as WidgetDefaultSettings, W as Widget } from '../widget-CpE2HdgU.js';
|
|
2
|
+
import { M as Media } from '../media-CnLImjVC.js';
|
|
3
|
+
import { T as TitleSettings, A as Alignment, a as HorizontalAlignment } from '../heading-DQCxQt38.js';
|
|
4
4
|
import { TextEditorContent } from '@frontlit/text-editor';
|
|
5
|
-
import { A as AspectRatio,
|
|
5
|
+
import { A as AspectRatio, c as ImageObjectFit } from '../image-Bk8kPXwP.js';
|
|
6
6
|
import 'react';
|
|
7
|
-
import '../section-background-
|
|
8
|
-
import '../theme-style-
|
|
7
|
+
import '../section-background-6V_LCi5e.js';
|
|
8
|
+
import '../theme-style-BVd5tOsc.js';
|
|
9
9
|
|
|
10
10
|
interface HeaderNavLink {
|
|
11
11
|
id: string;
|
|
@@ -14,20 +14,18 @@ interface HeaderNavLink {
|
|
|
14
14
|
isButton?: boolean;
|
|
15
15
|
}
|
|
16
16
|
interface HeaderSettings extends WidgetDefaultSettings {
|
|
17
|
-
|
|
18
|
-
logoImage?: string;
|
|
17
|
+
logoCorners?: number;
|
|
19
18
|
links?: HeaderNavLink[];
|
|
20
19
|
ctaLabel?: string;
|
|
21
20
|
ctaHref?: string;
|
|
22
21
|
linkAlignment?: "left" | "center" | "right";
|
|
23
22
|
layout?: "fixed" | "floating" | "centered";
|
|
24
23
|
backdropBlur?: boolean;
|
|
25
|
-
showThemeSwitcher?: boolean;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
declare const Header: Widget<HeaderSettings>;
|
|
29
27
|
|
|
30
|
-
interface HeroSettings extends WidgetDefaultSettings {
|
|
28
|
+
interface HeroSettings extends WidgetDefaultSettings, TitleSettings {
|
|
31
29
|
/** Small label rendered above the title, e.g. a section eyebrow like "Careers". */
|
|
32
30
|
preTitle?: string;
|
|
33
31
|
title?: string;
|
|
@@ -36,6 +34,10 @@ interface HeroSettings extends WidgetDefaultSettings {
|
|
|
36
34
|
buttonAction?: string;
|
|
37
35
|
secondaryButtonCaption?: string;
|
|
38
36
|
secondaryButtonAction?: string;
|
|
37
|
+
/** Optional line of small print under the buttons, e.g. "No credit card required". */
|
|
38
|
+
smallPrint?: string;
|
|
39
|
+
/** Optional install command shown in a copyable code box under the buttons. */
|
|
40
|
+
command?: string;
|
|
39
41
|
media?: Media;
|
|
40
42
|
youtubeLink?: string;
|
|
41
43
|
alignment?: Alignment | "right";
|
|
@@ -46,7 +48,7 @@ interface HeroSettings extends WidgetDefaultSettings {
|
|
|
46
48
|
|
|
47
49
|
declare const Hero: Widget<HeroSettings>;
|
|
48
50
|
|
|
49
|
-
interface ContentSettings extends WidgetDefaultSettings {
|
|
51
|
+
interface ContentSettings extends WidgetDefaultSettings, TitleSettings {
|
|
50
52
|
title?: string;
|
|
51
53
|
body?: TextEditorContent;
|
|
52
54
|
media?: Media;
|
|
@@ -64,7 +66,7 @@ interface FeatureItem {
|
|
|
64
66
|
/** Name of a lucide-react icon, e.g. "Globe" or "Mail". */
|
|
65
67
|
icon?: string;
|
|
66
68
|
}
|
|
67
|
-
interface FeaturedSettings extends WidgetDefaultSettings {
|
|
69
|
+
interface FeaturedSettings extends WidgetDefaultSettings, TitleSettings {
|
|
68
70
|
title?: string;
|
|
69
71
|
description?: TextEditorContent;
|
|
70
72
|
headerAlignment?: Alignment;
|
|
@@ -79,7 +81,7 @@ interface FaqItem {
|
|
|
79
81
|
question: string;
|
|
80
82
|
answer: string;
|
|
81
83
|
}
|
|
82
|
-
interface FaqSettings extends WidgetDefaultSettings {
|
|
84
|
+
interface FaqSettings extends WidgetDefaultSettings, TitleSettings {
|
|
83
85
|
title?: string;
|
|
84
86
|
headerAlignment?: Alignment;
|
|
85
87
|
items?: FaqItem[];
|
|
@@ -98,7 +100,7 @@ interface PricingTier {
|
|
|
98
100
|
buttonAction?: string;
|
|
99
101
|
highlighted?: boolean;
|
|
100
102
|
}
|
|
101
|
-
interface PricingSettings extends WidgetDefaultSettings {
|
|
103
|
+
interface PricingSettings extends WidgetDefaultSettings, TitleSettings {
|
|
102
104
|
title?: string;
|
|
103
105
|
description?: TextEditorContent;
|
|
104
106
|
headerAlignment?: Alignment;
|
|
@@ -108,7 +110,7 @@ interface PricingSettings extends WidgetDefaultSettings {
|
|
|
108
110
|
|
|
109
111
|
declare const Pricing: Widget<PricingSettings>;
|
|
110
112
|
|
|
111
|
-
interface BannerSettings extends WidgetDefaultSettings {
|
|
113
|
+
interface BannerSettings extends WidgetDefaultSettings, TitleSettings {
|
|
112
114
|
title?: string;
|
|
113
115
|
description?: TextEditorContent;
|
|
114
116
|
buttonCaption?: string;
|
|
@@ -121,7 +123,7 @@ interface BannerSettings extends WidgetDefaultSettings {
|
|
|
121
123
|
|
|
122
124
|
declare const Banner: Widget<BannerSettings>;
|
|
123
125
|
|
|
124
|
-
interface EmailFormSettings extends WidgetDefaultSettings {
|
|
126
|
+
interface EmailFormSettings extends WidgetDefaultSettings, TitleSettings {
|
|
125
127
|
title?: string;
|
|
126
128
|
description?: TextEditorContent;
|
|
127
129
|
buttonCaption?: string;
|
|
@@ -132,7 +134,7 @@ interface EmailFormSettings extends WidgetDefaultSettings {
|
|
|
132
134
|
|
|
133
135
|
declare const EmailForm: Widget<EmailFormSettings>;
|
|
134
136
|
|
|
135
|
-
interface SupportFormSettings extends WidgetDefaultSettings {
|
|
137
|
+
interface SupportFormSettings extends WidgetDefaultSettings, TitleSettings {
|
|
136
138
|
title?: string;
|
|
137
139
|
description?: TextEditorContent;
|
|
138
140
|
buttonCaption?: string;
|
|
@@ -153,11 +155,11 @@ interface FooterColumn {
|
|
|
153
155
|
links: FooterLink[];
|
|
154
156
|
}
|
|
155
157
|
interface FooterSettings extends WidgetDefaultSettings {
|
|
156
|
-
logoText?: string;
|
|
157
158
|
tagline?: string;
|
|
158
159
|
columns?: FooterColumn[];
|
|
159
160
|
copyrightText?: string;
|
|
160
161
|
layout?: "columns" | "centered" | "minimal";
|
|
162
|
+
showThemeSwitcher?: boolean;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
declare const Footer: Widget<FooterSettings>;
|
|
@@ -185,7 +187,7 @@ interface GridItem {
|
|
|
185
187
|
/** Card destination. In the "overlay" layout the whole card becomes a link when this is set, even without a caption. */
|
|
186
188
|
buttonAction?: string;
|
|
187
189
|
}
|
|
188
|
-
interface GridSettings extends WidgetDefaultSettings {
|
|
190
|
+
interface GridSettings extends WidgetDefaultSettings, TitleSettings {
|
|
189
191
|
title?: string;
|
|
190
192
|
description?: TextEditorContent;
|
|
191
193
|
headerAlignment?: Alignment;
|
|
@@ -239,12 +241,24 @@ interface EmbedSettings extends WidgetDefaultSettings {
|
|
|
239
241
|
content?: string;
|
|
240
242
|
/** Colon-separated, matching common video-embed aspect ratio labels. */
|
|
241
243
|
aspectRatio?: "16:9" | "4:3" | "1:1" | "default";
|
|
242
|
-
/** Fixed height in px, used only when `aspectRatio` is "default". */
|
|
244
|
+
/** Fixed height in px for URL embeds, used only when `aspectRatio` is "default". */
|
|
243
245
|
height?: number;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
declare const Embed: Widget<EmbedSettings>;
|
|
247
249
|
|
|
250
|
+
interface CodeSnippetSettings extends WidgetDefaultSettings {
|
|
251
|
+
/** The command or code to show and copy. */
|
|
252
|
+
code?: string;
|
|
253
|
+
/** Show a "$" prompt before the first line. */
|
|
254
|
+
showPrompt?: boolean;
|
|
255
|
+
/** Small line under the snippet, e.g. "macOS · Linux · Windows". */
|
|
256
|
+
caption?: string;
|
|
257
|
+
contentAlignment?: Alignment;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
declare const CodeSnippetBlock: Widget<CodeSnippetSettings>;
|
|
261
|
+
|
|
248
262
|
interface DataSlotSettings extends WidgetDefaultSettings {
|
|
249
263
|
/** Name matched against the host application's data-slot loaders. */
|
|
250
264
|
slot: string;
|
|
@@ -252,4 +266,4 @@ interface DataSlotSettings extends WidgetDefaultSettings {
|
|
|
252
266
|
|
|
253
267
|
declare const DataSlot: Widget<DataSlotSettings>;
|
|
254
268
|
|
|
255
|
-
export { Banner, type BannerSettings, Content, type ContentSettings, DataSlot, type DataSlotSettings, EmailForm, type EmailFormSettings, Embed, type EmbedSettings, Faq, type FaqItem, type FaqSettings, type FeatureItem, Featured, type FeaturedSettings, Footer, type FooterColumn, type FooterLink, type FooterSettings, Grid, type GridItem, type GridSettings, Header, type HeaderNavLink, type HeaderSettings, Hero, type HeroSettings, Marquee, type MarqueeItem, type MarqueeSettings, MediaBlock, type MediaSettings, Pricing, type PricingSettings, type PricingTier, RichText, type RichTextSettings, SupportForm, type SupportFormSettings };
|
|
269
|
+
export { Banner, type BannerSettings, CodeSnippetBlock, type CodeSnippetSettings, Content, type ContentSettings, DataSlot, type DataSlotSettings, EmailForm, type EmailFormSettings, Embed, type EmbedSettings, Faq, type FaqItem, type FaqSettings, type FeatureItem, Featured, type FeaturedSettings, Footer, type FooterColumn, type FooterLink, type FooterSettings, Grid, type GridItem, type GridSettings, Header, type HeaderNavLink, type HeaderSettings, Hero, type HeroSettings, Marquee, type MarqueeItem, type MarqueeSettings, MediaBlock, type MediaSettings, Pricing, type PricingSettings, type PricingTier, RichText, type RichTextSettings, SupportForm, type SupportFormSettings };
|
package/dist/blocks/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { Banner, Content, DataSlot, EmailForm, Embed, Faq, Featured, Footer, Grid, Header, Hero, Marquee, MediaBlock, Pricing, RichText, SupportForm } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { Banner, CodeSnippetBlock, Content, DataSlot, EmailForm, Embed, Faq, Featured, Footer, Grid, Header, Hero, Marquee, MediaBlock, Pricing, RichText, SupportForm } from '../chunk-K4WCLHMS.js';
|
|
3
|
+
import '../chunk-36QHCIPM.js';
|
|
4
|
+
import '../chunk-J7Z4UW45.js';
|
|
5
|
+
import '../chunk-XU7ALPGQ.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
package/dist/builder/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { T as Theme, S as SectionBackground } from '../section-background-
|
|
3
|
-
import {
|
|
4
|
-
import { a as PageSeo } from '../page-
|
|
2
|
+
import { T as Theme, S as SectionBackground } from '../section-background-6V_LCi5e.js';
|
|
3
|
+
import { c as WidgetInstance, P as PageData, W as Widget } from '../widget-CpE2HdgU.js';
|
|
4
|
+
import { a as PageSeo } from '../page-B5Gmm-Ys.js';
|
|
5
5
|
import { P as PageBuilderLinkComponent } from '../nav-link-BfxvQ1s6.js';
|
|
6
6
|
import { LucideIcon } from 'lucide-react';
|
|
7
7
|
import { R as ResolvedColorMode } from '../color-mode-DIEEt9WP.js';
|
|
8
|
-
import { T as ThemeStyle } from '../theme-style-
|
|
9
|
-
import '../media-
|
|
8
|
+
import { T as ThemeStyle } from '../theme-style-BVd5tOsc.js';
|
|
9
|
+
import '../media-CnLImjVC.js';
|
|
10
10
|
|
|
11
11
|
interface PageBuilderState {
|
|
12
12
|
layout: WidgetInstance[];
|
|
@@ -30,7 +30,7 @@ interface PageBuilderProps {
|
|
|
30
30
|
system?: Theme[];
|
|
31
31
|
custom?: Theme[];
|
|
32
32
|
};
|
|
33
|
-
pageData
|
|
33
|
+
pageData: PageData;
|
|
34
34
|
onChange?: (state: PageBuilderState) => void;
|
|
35
35
|
/** Whether the editor may alter team-wide theme data. */
|
|
36
36
|
allowThemeEditing?: boolean;
|
|
@@ -91,15 +91,14 @@ declare function PageBuilderPropertyHeader({ label, tooltip, }: {
|
|
|
91
91
|
* PageBuilderSlider. Uses a native range input instead of Radix Slider so it
|
|
92
92
|
* adds no dependencies.
|
|
93
93
|
*/
|
|
94
|
-
declare function PageBuilderSlider({ title, min, max, value, onChange, tooltip, className,
|
|
94
|
+
declare function PageBuilderSlider({ title, min, max, value, onChange, tooltip, className, unit, }: {
|
|
95
95
|
title: string;
|
|
96
96
|
min: number;
|
|
97
97
|
max: number;
|
|
98
98
|
value: number;
|
|
99
|
-
onChange: (value
|
|
99
|
+
onChange: (value: number) => void;
|
|
100
100
|
tooltip?: string;
|
|
101
101
|
className?: string;
|
|
102
|
-
allowsReset?: boolean;
|
|
103
102
|
unit?: string;
|
|
104
103
|
}): React__default.JSX.Element;
|
|
105
104
|
|
|
@@ -229,8 +228,6 @@ declare function ThemeEditor({ theme, appliedThemeId, systemThemes, customThemes
|
|
|
229
228
|
/**
|
|
230
229
|
* Page-level SEO settings panel. Like the block and theme editors, changes
|
|
231
230
|
* apply live — the host app persists them via the builder's `onChange`.
|
|
232
|
-
* Adapted from CourseLit's SeoEditor, minus the media library (images are
|
|
233
|
-
* referenced by URL, matching the rest of this package).
|
|
234
231
|
*/
|
|
235
232
|
declare function SeoEditor({ seo, onChange, }: {
|
|
236
233
|
seo: PageSeo;
|
package/dist/builder/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderSlider, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, VerticalPaddingSelector, getMaxWidthTWClass, getVerticalPaddingTWClass } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
2
|
+
export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderSlider, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, VerticalPaddingSelector, getMaxWidthTWClass, getVerticalPaddingTWClass } from '../chunk-GIKTOAQS.js';
|
|
3
|
+
import '../chunk-IU4KATI2.js';
|
|
4
|
+
import '../chunk-BBI7UHOA.js';
|
|
5
|
+
import '../chunk-K4WCLHMS.js';
|
|
6
|
+
import '../chunk-36QHCIPM.js';
|
|
7
|
+
import '../chunk-J7Z4UW45.js';
|
|
8
|
+
import '../chunk-XU7ALPGQ.js';
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
+
import { T as ThemeStyle } from './theme-style-BVd5tOsc.js';
|
|
3
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { T as ThemeStyle } from './theme-style-39nxXQy0.js';
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: (props?: {
|
|
8
|
-
variant?: "link" | "default" | "
|
|
9
|
-
size?: "default" | "
|
|
8
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost";
|
|
9
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
10
10
|
} & class_variance_authority_types.ClassProp) => string;
|
|
11
11
|
interface ButtonProps$1 extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
12
12
|
asChild?: boolean;
|