@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/models/media.ts
|
|
3
|
+
function getMediaUrl(media) {
|
|
4
|
+
if (!media) return null;
|
|
5
|
+
if (typeof media === "string") return media.trim() || null;
|
|
6
|
+
if (typeof media === "object") {
|
|
7
|
+
const obj = media;
|
|
8
|
+
const url = obj.url ?? obj.file ?? obj.src;
|
|
9
|
+
return typeof url === "string" && url.trim() ? url.trim() : null;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
function getMediaAlt(media) {
|
|
14
|
+
if (!media || typeof media !== "object") return "";
|
|
15
|
+
const obj = media;
|
|
16
|
+
const alt = obj.alt ?? obj.caption ?? obj.title;
|
|
17
|
+
return typeof alt === "string" ? alt : "";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { getMediaAlt, getMediaUrl };
|
|
21
|
+
//# sourceMappingURL=chunk-XU7ALPGQ.js.map
|
|
22
|
+
//# sourceMappingURL=chunk-XU7ALPGQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/models/media.ts"],"names":[],"mappings":";AAkBO,SAAS,YAAY,KAAA,EAA+B;AACzD,EAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AACnB,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,EAAU,OAAO,KAAA,CAAM,MAAK,IAAK,IAAA;AACtD,EAAA,IAAI,OAAO,UAAU,QAAA,EAAU;AAC7B,IAAA,MAAM,GAAA,GAAM,KAAA;AACZ,IAAA,MAAM,GAAA,GAAM,GAAA,CAAI,GAAA,IAAO,GAAA,CAAI,QAAQ,GAAA,CAAI,GAAA;AACvC,IAAA,OAAO,OAAO,QAAQ,QAAA,IAAY,GAAA,CAAI,MAAK,GAAI,GAAA,CAAI,MAAK,GAAI,IAAA;AAAA,EAC9D;AACA,EAAA,OAAO,IAAA;AACT;AAEO,SAAS,YAAY,KAAA,EAAwB;AAClD,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,UAAU,OAAO,EAAA;AAChD,EAAA,MAAM,GAAA,GAAM,KAAA;AACZ,EAAA,MAAM,GAAA,GAAM,GAAA,CAAI,GAAA,IAAO,GAAA,CAAI,WAAW,GAAA,CAAI,KAAA;AAC1C,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAA,GAAW,GAAA,GAAM,EAAA;AACzC","file":"chunk-XU7ALPGQ.js","sourcesContent":["export interface Media {\n [key: string]: unknown;\n mediaId?: string;\n originalFileName?: string;\n fileName?: string;\n mimeType?: string;\n size?: number;\n caption?: string;\n alt?: string;\n /** Public URL of the asset (MediaLit format or generic URL format). */\n file?: string;\n url?: string;\n src?: string;\n /** Thumbnail URL, falls back to `file` or `url` when absent. */\n thumbnail?: string;\n thumbnailUrl?: string;\n}\n\nexport function getMediaUrl(media: unknown): string | null {\n if (!media) return null;\n if (typeof media === \"string\") return media.trim() || null;\n if (typeof media === \"object\") {\n const obj = media as Record<string, unknown>;\n const url = obj.url ?? obj.file ?? obj.src;\n return typeof url === \"string\" && url.trim() ? url.trim() : null;\n }\n return null;\n}\n\nexport function getMediaAlt(media: unknown): string {\n if (!media || typeof media !== \"object\") return \"\";\n const obj = media as Record<string, unknown>;\n const alt = obj.alt ?? obj.caption ?? obj.title;\n return typeof alt === \"string\" ? alt : \"\";\n}\n"]}
|
|
@@ -1,20 +1,45 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
export { A as AspectRatio, I as Image, a as ImageObjectFit, V as VideoThumbnailProps,
|
|
2
|
+
export { A as AspectRatio, I as Image, a as ImageAttributesInput, b as ImageAttributesResolver, c as ImageObjectFit, V as VideoThumbnailProps, d as VideoWithPreview, r as roundedMap, s as setImageAttributesResolver } from '../image-Bk8kPXwP.js';
|
|
3
3
|
export { N as NavLink, P as PageBuilderLinkComponent, a as PageBuilderLinkProps, b as PageBuilderLinkProvider, u as usePageBuilderLinkComponent } from '../nav-link-BfxvQ1s6.js';
|
|
4
|
-
import { T as ThemeStyle } from '../theme-style-
|
|
5
|
-
import { B as ButtonProps } from '../button-
|
|
4
|
+
import { T as ThemeStyle } from '../theme-style-BVd5tOsc.js';
|
|
5
|
+
import { B as ButtonProps } from '../button-OLKN3wPf.js';
|
|
6
6
|
import { R as ResolvedColorMode } from '../color-mode-DIEEt9WP.js';
|
|
7
|
-
export { TextRenderer
|
|
7
|
+
export { TextRenderer } from '@frontlit/text-editor/renderer';
|
|
8
|
+
export { truncateTextEditorContent } from '@frontlit/text-editor';
|
|
8
9
|
import 'class-variance-authority/types';
|
|
9
10
|
import 'class-variance-authority';
|
|
10
11
|
|
|
11
|
-
interface
|
|
12
|
+
interface InlineEmbedProps {
|
|
12
13
|
content: string;
|
|
13
14
|
className?: string;
|
|
14
15
|
style?: React__default.CSSProperties;
|
|
15
|
-
id?: string;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Snippets are usually written as a standalone document (they used to live in
|
|
19
|
+
* an iframe). Recreate that inside the shadow root: the host plays `html` and
|
|
20
|
+
* is a size container, a wrapper plays `body`, and viewport units and width
|
|
21
|
+
* media queries are rewritten to measure the embed (as they measured the
|
|
22
|
+
* iframe) instead of the browser window. "Fill the frame" heights are dropped,
|
|
23
|
+
* as are scripts that only synced state with `window.parent`, which the shadow
|
|
24
|
+
* host handles itself.
|
|
25
|
+
*/
|
|
26
|
+
declare function prepareEmbed(content: string): {
|
|
27
|
+
links: string;
|
|
28
|
+
body: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Renders a raw HTML snippet inline, inside a declarative shadow root. The
|
|
32
|
+
* markup is part of the server-rendered page (so crawlers index it) while its
|
|
33
|
+
* styles stay isolated from the site's in both directions.
|
|
34
|
+
*/
|
|
35
|
+
declare const InlineEmbed: ({ content, className, style }: InlineEmbedProps) => React__default.JSX.Element;
|
|
36
|
+
|
|
37
|
+
/** The FrontLit petal mark. Header and footer fall back to it, with the
|
|
38
|
+
* "FrontLit" name, until a site sets its own branding. */
|
|
39
|
+
declare function FrontLitLogo({ className }: {
|
|
40
|
+
className?: string;
|
|
41
|
+
}): React__default.JSX.Element;
|
|
42
|
+
declare const FRONTLIT_NAME = "FrontLit";
|
|
18
43
|
|
|
19
44
|
/**
|
|
20
45
|
* Light / dark toggle. Public sites pass `theme` so the button uses
|
|
@@ -33,4 +58,4 @@ declare function ThemeModeSwitcher({ resolved, onToggle, theme, className, size,
|
|
|
33
58
|
variant?: ButtonProps["variant"];
|
|
34
59
|
}): React__default.JSX.Element;
|
|
35
60
|
|
|
36
|
-
export {
|
|
61
|
+
export { FRONTLIT_NAME, FrontLitLogo, InlineEmbed, ThemeModeSwitcher, prepareEmbed };
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export {
|
|
3
|
-
|
|
2
|
+
export { ThemeModeSwitcher } from '../chunk-BBI7UHOA.js';
|
|
3
|
+
export { Image, InlineEmbed, NavLink, PageBuilderLinkProvider, TextRenderer, VideoWithPreview, prepareEmbed, roundedMap, setImageAttributesResolver, usePageBuilderLinkComponent } from '../chunk-36QHCIPM.js';
|
|
4
|
+
import '../chunk-J7Z4UW45.js';
|
|
5
|
+
import '../chunk-XU7ALPGQ.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
export { truncateTextEditorContent } from '@frontlit/text-editor';
|
|
8
|
+
|
|
9
|
+
function FrontLitLogo({ className }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
"svg",
|
|
12
|
+
{
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 64 64",
|
|
15
|
+
className,
|
|
16
|
+
"aria-hidden": true,
|
|
17
|
+
children: /* @__PURE__ */ jsx(
|
|
18
|
+
"g",
|
|
19
|
+
{
|
|
20
|
+
fill: "oklch(0.62 0.16 230 / 0.15)",
|
|
21
|
+
stroke: "oklch(0.62 0.16 230)",
|
|
22
|
+
strokeWidth: "2.4",
|
|
23
|
+
strokeLinejoin: "round",
|
|
24
|
+
children: [
|
|
25
|
+
[41.19, 22.81, 45],
|
|
26
|
+
[41.19, 41.19, 135],
|
|
27
|
+
[22.81, 41.19, 225],
|
|
28
|
+
[22.81, 22.81, 315]
|
|
29
|
+
].map(([x, y, angle]) => /* @__PURE__ */ jsx(
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
d: "M0,-11 C5.5,-5.5 5.5,5.5 0,11 C-5.5,5.5 -5.5,-5.5 0,-11 Z",
|
|
33
|
+
transform: `translate(${x},${y}) rotate(${angle})`
|
|
34
|
+
},
|
|
35
|
+
angle
|
|
36
|
+
))
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
var FRONTLIT_NAME = "FrontLit";
|
|
43
|
+
|
|
44
|
+
export { FRONTLIT_NAME, FrontLitLogo };
|
|
4
45
|
//# sourceMappingURL=index.js.map
|
|
5
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/components/frontlit-logo.tsx"],"names":[],"mappings":";;;;;;;AAIO,SAAS,YAAA,CAAa,EAAE,SAAA,EAAU,EAA2B;AAClE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAM,4BAAA;AAAA,MACN,OAAA,EAAQ,WAAA;AAAA,MACR,SAAA;AAAA,MACA,aAAA,EAAW,IAAA;AAAA,MAEX,QAAA,kBAAA,GAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAK,6BAAA;AAAA,UACL,MAAA,EAAO,sBAAA;AAAA,UACP,WAAA,EAAY,KAAA;AAAA,UACZ,cAAA,EAAe,OAAA;AAAA,UAEd,QAAA,EAAA;AAAA,YACC,CAAC,KAAA,EAAO,KAAA,EAAO,EAAE,CAAA;AAAA,YACjB,CAAC,KAAA,EAAO,KAAA,EAAO,GAAG,CAAA;AAAA,YAClB,CAAC,KAAA,EAAO,KAAA,EAAO,GAAG,CAAA;AAAA,YAClB,CAAC,KAAA,EAAO,KAAA,EAAO,GAAG;AAAA,YAClB,GAAA,CAAI,CAAC,CAAC,CAAA,EAAG,CAAA,EAAG,KAAK,CAAA,qBACjB,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cAEC,CAAA,EAAE,2DAAA;AAAA,cACF,WAAW,CAAA,UAAA,EAAa,CAAC,CAAA,CAAA,EAAI,CAAC,YAAY,KAAK,CAAA,CAAA;AAAA,aAAA;AAAA,YAF1C;AAAA,WAIR;AAAA;AAAA;AACH;AAAA,GACF;AAEJ;AAEO,IAAM,aAAA,GAAgB","file":"index.js","sourcesContent":["import React from \"react\";\n\n/** The FrontLit petal mark. Header and footer fall back to it, with the\n * \"FrontLit\" name, until a site sets its own branding. */\nexport function FrontLitLogo({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n className={className}\n aria-hidden\n >\n <g\n fill=\"oklch(0.62 0.16 230 / 0.15)\"\n stroke=\"oklch(0.62 0.16 230)\"\n strokeWidth=\"2.4\"\n strokeLinejoin=\"round\"\n >\n {[\n [41.19, 22.81, 45],\n [41.19, 41.19, 135],\n [22.81, 41.19, 225],\n [22.81, 22.81, 315],\n ].map(([x, y, angle]) => (\n <path\n key={angle}\n d=\"M0,-11 C5.5,-5.5 5.5,5.5 0,11 C-5.5,5.5 -5.5,-5.5 0,-11 Z\"\n transform={`translate(${x},${y}) rotate(${angle})`}\n />\n ))}\n </g>\n </svg>\n );\n}\n\nexport const FRONTLIT_NAME = \"FrontLit\";\n"]}
|
package/dist/data-slots.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import './section-background-
|
|
4
|
-
import './theme-style-
|
|
2
|
+
import { c as WidgetInstance, P as PageData } from './widget-CpE2HdgU.js';
|
|
3
|
+
import './section-background-6V_LCi5e.js';
|
|
4
|
+
import './theme-style-BVd5tOsc.js';
|
|
5
5
|
|
|
6
6
|
/** Context supplied to a host application's data-slot loader. */
|
|
7
7
|
interface DataSlotLoadRequest {
|
package/dist/data-slots.js
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type HorizontalAlignment = "center" | "left" | "right";
|
|
2
|
+
type VerticalAlignment = "top" | "bottom";
|
|
3
|
+
type Alignment = HorizontalAlignment | VerticalAlignment;
|
|
4
|
+
|
|
5
|
+
/** Heading element a block renders its title as. */
|
|
6
|
+
type HeadingLevel = "h1" | "h2" | "h3";
|
|
7
|
+
/** Per-breakpoint text size in px; unset breakpoints keep the theme size. */
|
|
8
|
+
interface ResponsiveTextSize {
|
|
9
|
+
mobile?: number;
|
|
10
|
+
tablet?: number;
|
|
11
|
+
desktop?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Title options shared by every block with a title. */
|
|
14
|
+
interface TitleSettings {
|
|
15
|
+
/** Defaults to H1 for the Hero and H2 everywhere else. */
|
|
16
|
+
titleLevel?: HeadingLevel;
|
|
17
|
+
titleSize?: ResponsiveTextSize;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type { Alignment as A, HeadingLevel as H, ResponsiveTextSize as R, TitleSettings as T, VerticalAlignment as V, HorizontalAlignment as a };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type AspectRatio = "16/9" | "4/3" | "1/1" | "21/9" | "9/16" | "2/1" | "3/2" | string;
|
|
5
|
+
interface VideoThumbnailProps {
|
|
6
|
+
title?: string;
|
|
7
|
+
thumbnailUrl?: string;
|
|
8
|
+
videoUrl: string;
|
|
9
|
+
aspectRatio?: AspectRatio;
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function VideoWithPreview({ title, thumbnailUrl, videoUrl, aspectRatio, modal, }: VideoThumbnailProps): React.JSX.Element;
|
|
13
|
+
|
|
14
|
+
interface ImageAttributesInput {
|
|
15
|
+
src: string;
|
|
16
|
+
alt: string;
|
|
17
|
+
sizes?: string;
|
|
18
|
+
/** Above-the-fold image (e.g. LCP): fetched eagerly at high priority. */
|
|
19
|
+
priority: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Lets a host swap an image's `src`/`srcSet` for its own optimizer's URLs
|
|
23
|
+
* (e.g. Next.js's `getImageProps`) without this package depending on the
|
|
24
|
+
* host framework. Return `null` to keep the original URL.
|
|
25
|
+
*/
|
|
26
|
+
type ImageAttributesResolver = (input: ImageAttributesInput) => React__default.ImgHTMLAttributes<HTMLImageElement> | null;
|
|
27
|
+
/**
|
|
28
|
+
* Registers the host's resolver. Call once at server start-up; renders that
|
|
29
|
+
* run without one emit the original URL.
|
|
30
|
+
*/
|
|
31
|
+
declare function setImageAttributesResolver(resolver: ImageAttributesResolver | null): void;
|
|
32
|
+
type ImageObjectFit = "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
33
|
+
declare const roundedMap: Record<number, string>;
|
|
34
|
+
interface ImgProps {
|
|
35
|
+
src: string;
|
|
36
|
+
classes?: string;
|
|
37
|
+
alt?: string;
|
|
38
|
+
defaultImage?: string;
|
|
39
|
+
loading?: "eager" | "lazy";
|
|
40
|
+
/** Marks the image as likely LCP: eager load with high fetch priority. */
|
|
41
|
+
priority?: boolean;
|
|
42
|
+
height?: string;
|
|
43
|
+
sizes?: string;
|
|
44
|
+
width?: string;
|
|
45
|
+
borderRadius?: number | string;
|
|
46
|
+
noDefaultImage?: boolean;
|
|
47
|
+
className?: string;
|
|
48
|
+
objectFit?: ImageObjectFit;
|
|
49
|
+
}
|
|
50
|
+
declare const Image: (props: ImgProps) => React__default.JSX.Element;
|
|
51
|
+
|
|
52
|
+
export { type AspectRatio as A, Image as I, type VideoThumbnailProps as V, type ImageAttributesInput as a, type ImageAttributesResolver as b, type ImageObjectFit as c, VideoWithPreview as d, roundedMap as r, setImageAttributesResolver as s };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { T as Theme } from './section-background-
|
|
2
|
-
export { B as BackgroundAttachment, a as BackgroundRepeat, b as BlendMode, S as SectionBackground, c as SectionBackgroundOverlay } from './section-background-
|
|
3
|
-
export { B as Border, C as Colors, a as CustomStyle, D as DisabledStyle, P as Padding, S as Shadow, T as ThemeStyle,
|
|
4
|
-
import { W as Widget,
|
|
5
|
-
export { B as BlockLayout, P as PageData, a as
|
|
6
|
-
export { M as Media } from './media-
|
|
7
|
-
export { P as Page, a as PageSeo } from './page-
|
|
8
|
-
export { A as Alignment, H as HorizontalAlignment, V as VerticalAlignment } from './
|
|
1
|
+
import { T as Theme } from './section-background-6V_LCi5e.js';
|
|
2
|
+
export { B as BackgroundAttachment, a as BackgroundRepeat, b as BlendMode, S as SectionBackground, c as SectionBackgroundOverlay } from './section-background-6V_LCi5e.js';
|
|
3
|
+
export { B as Border, C as Colors, a as CustomStyle, D as DisabledStyle, M as MenuItemStyle, b as MenuStyle, P as Padding, S as Shadow, c as SurfaceStyle, T as ThemeStyle, d as Typography } from './theme-style-BVd5tOsc.js';
|
|
4
|
+
import { W as Widget, c as WidgetInstance } from './widget-CpE2HdgU.js';
|
|
5
|
+
export { B as BlockLayout, P as PageData, a as WidgetDefaultSettings, b as WidgetEditorProps, d as WidgetMetadata, e as WidgetProps } from './widget-CpE2HdgU.js';
|
|
6
|
+
export { M as Media, g as getMediaAlt, a as getMediaUrl } from './media-CnLImjVC.js';
|
|
7
|
+
export { P as Page, a as PageSeo } from './page-B5Gmm-Ys.js';
|
|
8
|
+
export { A as Alignment, H as HeadingLevel, a as HorizontalAlignment, R as ResponsiveTextSize, T as TitleSettings, V as VerticalAlignment } from './heading-DQCxQt38.js';
|
|
9
9
|
export { TextEditorContent } from '@frontlit/text-editor';
|
|
10
|
-
export { EditableBlock, EditableBlockProps, PageRenderer, PageRendererProps, generateThemeStyles } from './renderer/index.js';
|
|
10
|
+
export { EditableBlock, EditableBlockProps, PageRenderer, PageRendererProps, generateThemeStyles, resolveThemeColor } from './renderer/index.js';
|
|
11
11
|
export { P as PageBuilderLinkComponent, a as PageBuilderLinkProps, b as PageBuilderLinkProvider } from './nav-link-BfxvQ1s6.js';
|
|
12
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
13
|
export { DataSlotLoadRequest, DataSlotLoader, DataSlotLoaders, loadDataSlots } from './data-slots.js';
|
|
@@ -15,13 +15,16 @@ import 'react';
|
|
|
15
15
|
import 'lucide-react';
|
|
16
16
|
import './color-mode-DIEEt9WP.js';
|
|
17
17
|
|
|
18
|
+
/** Blocks placed outside the normal flow by the renderer. */
|
|
19
|
+
declare const LAYOUT_BLOCK_NAMES: string[];
|
|
20
|
+
|
|
18
21
|
/**
|
|
19
22
|
* Every block available to the page builder, keyed by its
|
|
20
23
|
* `metadata.name`. `header` and `footer` are singleton, layout-level
|
|
21
24
|
* blocks placed outside the normal flow by the renderer.
|
|
22
25
|
*/
|
|
23
26
|
declare const blockRegistry: Record<string, Widget<any>>;
|
|
24
|
-
|
|
27
|
+
|
|
25
28
|
declare const NON_ADDABLE_BLOCK_NAMES: string[];
|
|
26
29
|
/**
|
|
27
30
|
* Adds a host application's block to the shared renderer and builder
|
|
@@ -42,6 +45,10 @@ declare function getAddableBlocks(): Widget<any>[];
|
|
|
42
45
|
* block's default settings.
|
|
43
46
|
*/
|
|
44
47
|
declare function createWidgetInstance(name: string, overrides?: Record<string, unknown>): WidgetInstance;
|
|
48
|
+
/** Fills each block's unset settings with its defaults. Saved layouts omit
|
|
49
|
+
* settings equal to a default (the renderer merges them back), so the
|
|
50
|
+
* builder's panels need them filled in to show what's on the canvas. */
|
|
51
|
+
declare function withDefaultSettings(layout: WidgetInstance[]): WidgetInstance[];
|
|
45
52
|
/** Ensures a builder layout always has one locked header and footer.
|
|
46
53
|
* API validation remains the hard boundary; this repair keeps legacy/empty
|
|
47
54
|
* initial layouts usable and prevents the UI from ever presenting a page
|
|
@@ -56,4 +63,4 @@ declare function getDefaultTheme(): Theme;
|
|
|
56
63
|
*/
|
|
57
64
|
declare function createDefaultLayout(): WidgetInstance[];
|
|
58
65
|
|
|
59
|
-
export { LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, Theme, Widget, WidgetInstance, blockRegistry, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getAddableBlocks, getDefaultTheme, getWidget, registerBlock };
|
|
66
|
+
export { LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, Theme, Widget, WidgetInstance, blockRegistry, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getAddableBlocks, getDefaultTheme, getWidget, registerBlock, withDefaultSettings };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import './chunk-
|
|
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-
|
|
4
|
-
export { EditableBlock, LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, PageRenderer, blockRegistry, generateThemeStyles, getAddableBlocks, getWidget, registerBlock } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import './chunk-HWOVSHIW.js';
|
|
3
|
+
export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderSlider, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, VerticalPaddingSelector, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getDefaultTheme, getMaxWidthTWClass, getVerticalPaddingTWClass, withDefaultSettings } from './chunk-GIKTOAQS.js';
|
|
4
|
+
export { EditableBlock, LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, PageRenderer, blockRegistry, generateThemeStyles, getAddableBlocks, getWidget, registerBlock, resolveThemeColor } from './chunk-IU4KATI2.js';
|
|
5
|
+
import './chunk-BBI7UHOA.js';
|
|
6
|
+
import './chunk-K4WCLHMS.js';
|
|
7
|
+
export { PageBuilderLinkProvider } from './chunk-36QHCIPM.js';
|
|
8
|
+
import './chunk-J7Z4UW45.js';
|
|
9
|
+
export { getMediaAlt, getMediaUrl } from './chunk-XU7ALPGQ.js';
|
|
10
|
+
export { loadDataSlots } from './chunk-ATNM5JHI.js';
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Media {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
mediaId?: string;
|
|
4
|
+
originalFileName?: string;
|
|
5
|
+
fileName?: string;
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
caption?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
/** Public URL of the asset (MediaLit format or generic URL format). */
|
|
11
|
+
file?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
src?: string;
|
|
14
|
+
/** Thumbnail URL, falls back to `file` or `url` when absent. */
|
|
15
|
+
thumbnail?: string;
|
|
16
|
+
thumbnailUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function getMediaUrl(media: unknown): string | null;
|
|
19
|
+
declare function getMediaAlt(media: unknown): string;
|
|
20
|
+
|
|
21
|
+
export { type Media as M, getMediaUrl as a, getMediaAlt as g };
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,8 +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-
|
|
2
|
-
export { B as Border, C as Colors, a as CustomStyle, D as DisabledStyle, P as Padding, S as Shadow, T as ThemeStyle,
|
|
3
|
-
export { B as BlockLayout, P as PageData,
|
|
4
|
-
export { M as Media } from '../media-
|
|
5
|
-
export { P as Page, a as PageSeo } from '../page-
|
|
6
|
-
export { A as Alignment, H as HorizontalAlignment, V as VerticalAlignment } from '../
|
|
1
|
+
export { B as BackgroundAttachment, a as BackgroundRepeat, b as BlendMode, S as SectionBackground, c as SectionBackgroundOverlay, T as Theme } from '../section-background-6V_LCi5e.js';
|
|
2
|
+
export { B as Border, C as Colors, a as CustomStyle, D as DisabledStyle, M as MenuItemStyle, b as MenuStyle, P as Padding, S as Shadow, c as SurfaceStyle, T as ThemeStyle, d as Typography } from '../theme-style-BVd5tOsc.js';
|
|
3
|
+
export { B as BlockLayout, P as PageData, W as Widget, a as WidgetDefaultSettings, b as WidgetEditorProps, c as WidgetInstance, d as WidgetMetadata, e as WidgetProps } from '../widget-CpE2HdgU.js';
|
|
4
|
+
export { M as Media, g as getMediaAlt, a as getMediaUrl } from '../media-CnLImjVC.js';
|
|
5
|
+
export { P as Page, a as PageSeo } from '../page-B5Gmm-Ys.js';
|
|
6
|
+
export { A as Alignment, H as HeadingLevel, a as HorizontalAlignment, R as ResponsiveTextSize, T as TitleSettings, V as VerticalAlignment } from '../heading-DQCxQt38.js';
|
|
7
7
|
export { TextEditorContent } from '@frontlit/text-editor';
|
|
8
8
|
import 'react';
|
package/dist/models/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as Media } from './media-
|
|
1
|
+
import { c as WidgetInstance } from './widget-CpE2HdgU.js';
|
|
2
|
+
import { M as Media } from './media-CnLImjVC.js';
|
|
3
3
|
|
|
4
4
|
/** Page-level SEO settings, editable from the builder's SEO panel. */
|
|
5
5
|
interface PageSeo {
|
|
@@ -15,7 +15,6 @@ interface PageSeo {
|
|
|
15
15
|
interface Page {
|
|
16
16
|
pageId: string;
|
|
17
17
|
name: string;
|
|
18
|
-
type: PageType;
|
|
19
18
|
layout: WidgetInstance[];
|
|
20
19
|
title?: string;
|
|
21
20
|
description?: string;
|