@brimsites/brimjs 0.0.0-stage → 1.0.0
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 +110 -0
- package/README.md +22 -2
- package/bin/brim.js +5 -0
- package/dist/cli.js +3802 -0
- package/editor-dist/editor.css +1 -0
- package/editor-dist/editor.js +91 -0
- package/package.json +71 -3
- package/skills/brim-convert/SKILL.md +256 -0
- package/skills/brim-hosting/SKILL.md +221 -0
- package/src/astro-shim.d.ts +5 -0
- package/src/auth/accounts.ts +341 -0
- package/src/auth/password.ts +34 -0
- package/src/auth/permissions.ts +44 -0
- package/src/blocks/accordion/Accordion.astro +48 -0
- package/src/blocks/accordion/accordion.css +63 -0
- package/src/blocks/analytics/Analytics.astro +45 -0
- package/src/blocks/analytics/ConsentBanner.astro +41 -0
- package/src/blocks/analytics/analytics.client.ts +125 -0
- package/src/blocks/analytics/analytics.css +51 -0
- package/src/blocks/analytics/consent.ts +51 -0
- package/src/blocks/button/Button.astro +64 -0
- package/src/blocks/button/button.css +100 -0
- package/src/blocks/carousel/Carousel.astro +140 -0
- package/src/blocks/carousel/carousel.client.ts +153 -0
- package/src/blocks/carousel/carousel.css +181 -0
- package/src/blocks/data/icons.ts +285 -0
- package/src/blocks/data/image-shapes.ts +91 -0
- package/src/blocks/data/social-icons.ts +41 -0
- package/src/blocks/data/social-networks.ts +256 -0
- package/src/blocks/divider/Divider.astro +27 -0
- package/src/blocks/divider/divider.css +17 -0
- package/src/blocks/form/Captcha.astro +27 -0
- package/src/blocks/form/Form.astro +250 -0
- package/src/blocks/form/FormField.astro +138 -0
- package/src/blocks/form/Newsletter.astro +80 -0
- package/src/blocks/form/form.client.ts +339 -0
- package/src/blocks/form/form.css +271 -0
- package/src/blocks/gallery/ImageGallery.astro +126 -0
- package/src/blocks/gallery/gallery.css +43 -0
- package/src/blocks/gallery/lightbox.client.ts +178 -0
- package/src/blocks/gallery/lightbox.css +134 -0
- package/src/blocks/icon/Icon.astro +41 -0
- package/src/blocks/icon/icon.css +16 -0
- package/src/blocks/image/Image.astro +158 -0
- package/src/blocks/image/image.css +42 -0
- package/src/blocks/images.ts +64 -0
- package/src/blocks/in-editor.client.ts +8 -0
- package/src/blocks/listing/Listing.astro +288 -0
- package/src/blocks/listing/ListingCards.astro +48 -0
- package/src/blocks/listing/listing.css +136 -0
- package/src/blocks/listing/query.ts +363 -0
- package/src/blocks/map/Map.astro +75 -0
- package/src/blocks/map/map.css +32 -0
- package/src/blocks/schemas/accordion.ts +118 -0
- package/src/blocks/schemas/button.ts +78 -0
- package/src/blocks/schemas/carousel.ts +133 -0
- package/src/blocks/schemas/divider.ts +29 -0
- package/src/blocks/schemas/form-field-types.ts +29 -0
- package/src/blocks/schemas/form.ts +350 -0
- package/src/blocks/schemas/icon.ts +24 -0
- package/src/blocks/schemas/image-gallery.ts +54 -0
- package/src/blocks/schemas/image.ts +87 -0
- package/src/blocks/schemas/index.ts +33 -0
- package/src/blocks/schemas/listing.ts +14 -0
- package/src/blocks/schemas/map.ts +81 -0
- package/src/blocks/schemas/newsletter.ts +324 -0
- package/src/blocks/schemas/social-media.ts +348 -0
- package/src/blocks/schemas/text.ts +151 -0
- package/src/blocks/schemas/video.ts +57 -0
- package/src/blocks/search/Search.astro +147 -0
- package/src/blocks/search/search.css +69 -0
- package/src/blocks/search/state.ts +28 -0
- package/src/blocks/settings.ts +94 -0
- package/src/blocks/social/SocialMedia.astro +102 -0
- package/src/blocks/social/social-links.ts +16 -0
- package/src/blocks/social/social.css +31 -0
- package/src/blocks/theme.ts +35 -0
- package/src/blocks/types.ts +52 -0
- package/src/blocks/video/Video.astro +90 -0
- package/src/blocks/video/video-source.ts +77 -0
- package/src/blocks/video/video.client.ts +43 -0
- package/src/blocks/video/video.css +29 -0
- package/src/check.ts +1119 -0
- package/src/cli.ts +493 -0
- package/src/components/Blocks.astro +68 -0
- package/src/components/Field.astro +61 -0
- package/src/components/Footer.astro +36 -0
- package/src/components/Link.astro +18 -0
- package/src/components/MobileMenu.astro +77 -0
- package/src/components/Navbar.astro +42 -0
- package/src/components/RichText.astro +32 -0
- package/src/components/Seo.astro +202 -0
- package/src/components/Setting.astro +46 -0
- package/src/components/Shared.astro +17 -0
- package/src/components/Text.astro +91 -0
- package/src/components/blocks.css +86 -0
- package/src/components/index.ts +27 -0
- package/src/components/mobile-menu.client.ts +21 -0
- package/src/components/mobile-menu.css +52 -0
- package/src/components/text.css +48 -0
- package/src/config.ts +413 -0
- package/src/content/block-layout.ts +63 -0
- package/src/content/block-values.ts +48 -0
- package/src/content/content-check.ts +174 -0
- package/src/content/content-types.ts +408 -0
- package/src/content/drafts.ts +115 -0
- package/src/content/feed.ts +237 -0
- package/src/content/field-types.ts +107 -0
- package/src/content/history.ts +140 -0
- package/src/content/ids.ts +50 -0
- package/src/content/image-size.ts +212 -0
- package/src/content/image-sizes.ts +126 -0
- package/src/content/item-fields.ts +110 -0
- package/src/content/item-head.ts +126 -0
- package/src/content/item-image.ts +26 -0
- package/src/content/item-path.ts +122 -0
- package/src/content/items.ts +580 -0
- package/src/content/language-scopes.ts +40 -0
- package/src/content/media.ts +271 -0
- package/src/content/menus.ts +51 -0
- package/src/content/page-templates.ts +52 -0
- package/src/content/redirects.ts +112 -0
- package/src/content/references.ts +165 -0
- package/src/content/rich-text.ts +63 -0
- package/src/content/search.ts +167 -0
- package/src/content/seed.ts +229 -0
- package/src/content/site-settings.ts +111 -0
- package/src/content/sitemap.ts +143 -0
- package/src/content/store.ts +225 -0
- package/src/content/tags.ts +67 -0
- package/src/content/text-default.ts +139 -0
- package/src/content/types.ts +137 -0
- package/src/content/validate.ts +253 -0
- package/src/content/validation-error.ts +2 -0
- package/src/db/cached.ts +140 -0
- package/src/db/database.ts +15 -0
- package/src/db/libsql.ts +29 -0
- package/src/db/schema.ts +189 -0
- package/src/db/url.ts +44 -0
- package/src/editor/client/BlockSettings.tsx +1063 -0
- package/src/editor/client/Chrome.tsx +284 -0
- package/src/editor/client/ContentBrowser.tsx +1299 -0
- package/src/editor/client/Editor.tsx +1756 -0
- package/src/editor/client/HistoryPanel.tsx +114 -0
- package/src/editor/client/ImagesWidget.tsx +113 -0
- package/src/editor/client/Inspector.tsx +127 -0
- package/src/editor/client/ItemForm.tsx +535 -0
- package/src/editor/client/LinkWidget.tsx +440 -0
- package/src/editor/client/ListingPanel.tsx +99 -0
- package/src/editor/client/Login.tsx +338 -0
- package/src/editor/client/Menu.tsx +64 -0
- package/src/editor/client/PageSettings.tsx +270 -0
- package/src/editor/client/RedirectsSettings.tsx +130 -0
- package/src/editor/client/Resize.tsx +204 -0
- package/src/editor/client/Sidebar.tsx +51 -0
- package/src/editor/client/SiteMap.tsx +568 -0
- package/src/editor/client/SiteSettings.tsx +409 -0
- package/src/editor/client/TextTools.tsx +391 -0
- package/src/editor/client/Toolbar.tsx +449 -0
- package/src/editor/client/VideoUpload.tsx +251 -0
- package/src/editor/client/api.ts +417 -0
- package/src/editor/client/brand.ts +20 -0
- package/src/editor/client/connection.ts +98 -0
- package/src/editor/client/context.ts +19 -0
- package/src/editor/client/css.d.ts +2 -0
- package/src/editor/client/editor.css +4656 -0
- package/src/editor/client/fields.tsx +812 -0
- package/src/editor/client/icons.tsx +174 -0
- package/src/editor/client/keys.ts +15 -0
- package/src/editor/client/kinds.ts +289 -0
- package/src/editor/client/languages.ts +32 -0
- package/src/editor/client/main.tsx +100 -0
- package/src/editor/client/responses.ts +26 -0
- package/src/editor/client/rich-text.ts +326 -0
- package/src/editor/client/site-tree.ts +239 -0
- package/src/editor/client/theme.ts +55 -0
- package/src/editor/client/tsconfig.json +18 -0
- package/src/editor/client/tus.ts +137 -0
- package/src/editor/client/use-rect.ts +50 -0
- package/src/editor/client/widgets.tsx +1218 -0
- package/src/forms/captcha.ts +83 -0
- package/src/forms/define.ts +166 -0
- package/src/forms/fields.ts +197 -0
- package/src/forms/file-types.ts +108 -0
- package/src/forms/files.ts +216 -0
- package/src/forms/form-page.ts +9 -0
- package/src/forms/handler.ts +622 -0
- package/src/forms/spec.ts +89 -0
- package/src/forms/store.ts +96 -0
- package/src/forms/work.ts +50 -0
- package/src/icons/library.ts +144 -0
- package/src/icons/load.ts +63 -0
- package/src/index.ts +99 -0
- package/src/init.ts +257 -0
- package/src/integration.ts +469 -0
- package/src/mail/mailer.ts +197 -0
- package/src/mail/notify.ts +272 -0
- package/src/mail/settings.ts +173 -0
- package/src/mail/templates.ts +191 -0
- package/src/mcp/page-nodes.ts +209 -0
- package/src/mcp/server.ts +111 -0
- package/src/mcp/tools.ts +637 -0
- package/src/runtime/TemplatePage.astro +39 -0
- package/src/runtime/TemplatePageStatic.astro +13 -0
- package/src/runtime/admin-route.ts +80 -0
- package/src/runtime/connect.ts +53 -0
- package/src/runtime/content.ts +188 -0
- package/src/runtime/context.ts +131 -0
- package/src/runtime/form-files.ts +18 -0
- package/src/runtime/forms-route.ts +33 -0
- package/src/runtime/forms.ts +28 -0
- package/src/runtime/icons.ts +5 -0
- package/src/runtime/media.ts +175 -0
- package/src/runtime/middleware.ts +186 -0
- package/src/runtime/nav.ts +13 -0
- package/src/runtime/query-reads.ts +49 -0
- package/src/runtime/query-store.ts +16 -0
- package/src/runtime/request-state.ts +69 -0
- package/src/runtime/robots.ts +29 -0
- package/src/runtime/rss-static.ts +16 -0
- package/src/runtime/rss.ts +29 -0
- package/src/runtime/server.ts +29 -0
- package/src/runtime/sitemap.ts +34 -0
- package/src/runtime/template-paths.ts +34 -0
- package/src/runtime/uploads-route.ts +13 -0
- package/src/seed-cli.ts +253 -0
- package/src/server/auth.ts +31 -0
- package/src/server/fetch-image.ts +219 -0
- package/src/server/handler.ts +2106 -0
- package/src/server/http.ts +162 -0
- package/src/server/locales.ts +73 -0
- package/src/server/node.ts +57 -0
- package/src/server/query-params.ts +249 -0
- package/src/server/rate-limit.ts +72 -0
- package/src/server/video-host.ts +162 -0
- package/src/starter.ts +70 -0
- package/src/version.ts +4 -0
- package/src/virtual.d.ts +65 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Settings of the "image" block: the picture, its description, caption and link, and the part that stays in
|
|
2
|
+
// sight when the site crops it. Its size, shape, rotation, tint and fades are the site's CSS.
|
|
3
|
+
import type { BlockDefinition } from "../types.ts";
|
|
4
|
+
|
|
5
|
+
export const image: BlockDefinition = {
|
|
6
|
+
type: "image",
|
|
7
|
+
label: "Image",
|
|
8
|
+
description: "A picture the owner replaces; the site sizes and shapes it",
|
|
9
|
+
schema: {
|
|
10
|
+
fieldsets: [
|
|
11
|
+
{ id: "default", title: "Default", fields: ["url", "alt", "showCaption", "caption", "link"] },
|
|
12
|
+
{ id: "image_layout", title: "Crop", fields: ["imageFocus"] },
|
|
13
|
+
],
|
|
14
|
+
properties: {
|
|
15
|
+
url: {
|
|
16
|
+
title: "Image",
|
|
17
|
+
type: "string",
|
|
18
|
+
widget: "image",
|
|
19
|
+
description: "Upload or select an image",
|
|
20
|
+
},
|
|
21
|
+
imageFocus: {
|
|
22
|
+
title: "Crop Position",
|
|
23
|
+
type: "string",
|
|
24
|
+
widget: "image-focus",
|
|
25
|
+
default: "",
|
|
26
|
+
description: "The part of the image that stays in sight when the site crops it.",
|
|
27
|
+
editContext: "grid",
|
|
28
|
+
imageField: "url",
|
|
29
|
+
xField: "focalPointX",
|
|
30
|
+
yField: "focalPointY",
|
|
31
|
+
},
|
|
32
|
+
focalPointX: {
|
|
33
|
+
title: "Focal Point X",
|
|
34
|
+
type: "number",
|
|
35
|
+
widget: "hidden",
|
|
36
|
+
default: 50,
|
|
37
|
+
},
|
|
38
|
+
focalPointY: {
|
|
39
|
+
title: "Focal Point Y",
|
|
40
|
+
type: "number",
|
|
41
|
+
widget: "hidden",
|
|
42
|
+
default: 50,
|
|
43
|
+
},
|
|
44
|
+
link: {
|
|
45
|
+
title: "Link",
|
|
46
|
+
type: "string",
|
|
47
|
+
widget: "url",
|
|
48
|
+
placeholder: "https://example.com",
|
|
49
|
+
default: "",
|
|
50
|
+
newTabField: "openInNewTab",
|
|
51
|
+
},
|
|
52
|
+
showCaption: {
|
|
53
|
+
title: "Caption",
|
|
54
|
+
type: "boolean",
|
|
55
|
+
widget: "checkbox",
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
caption: {
|
|
59
|
+
title: "Caption Text",
|
|
60
|
+
type: "string",
|
|
61
|
+
widget: "text",
|
|
62
|
+
default: "Type caption here",
|
|
63
|
+
showWhen: { showCaption: true },
|
|
64
|
+
},
|
|
65
|
+
alt: {
|
|
66
|
+
title: "Alt Text (SEO)",
|
|
67
|
+
type: "string",
|
|
68
|
+
widget: "text",
|
|
69
|
+
placeholder: "Describe the image",
|
|
70
|
+
description:
|
|
71
|
+
"Important for SEO and accessibility. Helps search engines understand the image content and improves page ranking.",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
defaults: {
|
|
76
|
+
"@type": "image",
|
|
77
|
+
presetId: "default-theme",
|
|
78
|
+
url: "",
|
|
79
|
+
alt: "",
|
|
80
|
+
showCaption: false,
|
|
81
|
+
caption: "",
|
|
82
|
+
focalPointX: 50,
|
|
83
|
+
focalPointY: 50,
|
|
84
|
+
link: "",
|
|
85
|
+
openInNewTab: false,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Blocks whose settings were carried over from BrimCMS.
|
|
2
|
+
import type { BlockDefinition } from "../types.ts";
|
|
3
|
+
import { accordion } from "./accordion.ts";
|
|
4
|
+
import { button } from "./button.ts";
|
|
5
|
+
import { carousel } from "./carousel.ts";
|
|
6
|
+
import { divider } from "./divider.ts";
|
|
7
|
+
import { form } from "./form.ts";
|
|
8
|
+
import { icon } from "./icon.ts";
|
|
9
|
+
import { image } from "./image.ts";
|
|
10
|
+
import { imageGallery } from "./image-gallery.ts";
|
|
11
|
+
import { listing } from "./listing.ts";
|
|
12
|
+
import { map } from "./map.ts";
|
|
13
|
+
import { newsletter } from "./newsletter.ts";
|
|
14
|
+
import { socialMedia } from "./social-media.ts";
|
|
15
|
+
import { text } from "./text.ts";
|
|
16
|
+
import { video } from "./video.ts";
|
|
17
|
+
|
|
18
|
+
export const blockDefinitions: Record<string, BlockDefinition> = {
|
|
19
|
+
accordion,
|
|
20
|
+
button,
|
|
21
|
+
carousel,
|
|
22
|
+
divider,
|
|
23
|
+
form,
|
|
24
|
+
icon,
|
|
25
|
+
image,
|
|
26
|
+
"image-gallery": imageGallery,
|
|
27
|
+
listing,
|
|
28
|
+
map,
|
|
29
|
+
newsletter,
|
|
30
|
+
"social-media": socialMedia,
|
|
31
|
+
text,
|
|
32
|
+
video,
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BlockDefinition } from "../types.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The "listing" block. Which items it shows, in what order and how, is the site's code (`<Listing>`'s props): it has
|
|
5
|
+
* no settings for the owner, who changes what is listed by editing the items. The editor offers to open them, or to
|
|
6
|
+
* add one, from the listing.
|
|
7
|
+
*/
|
|
8
|
+
export const listing: BlockDefinition = {
|
|
9
|
+
type: "listing",
|
|
10
|
+
label: "Listing",
|
|
11
|
+
description: "The items of a content type, as the site's code lists them.",
|
|
12
|
+
schema: { fieldsets: [], properties: {} },
|
|
13
|
+
defaults: {},
|
|
14
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Settings of the "map" block, carried over from BrimCMS.
|
|
2
|
+
// The sections list only what the embedded map can show: marker icons and map styles are left out.
|
|
3
|
+
import type { BlockDefinition } from "../types.ts";
|
|
4
|
+
|
|
5
|
+
export const map: BlockDefinition = {
|
|
6
|
+
type: "map",
|
|
7
|
+
label: "Map",
|
|
8
|
+
description: "Interactive map with customizable styling",
|
|
9
|
+
schema: {
|
|
10
|
+
fieldsets: [{ id: "map_markers", title: "Markers", fields: ["showMarker", "points"] }],
|
|
11
|
+
properties: {
|
|
12
|
+
showMarker: {
|
|
13
|
+
title: "Show Markers",
|
|
14
|
+
type: "boolean",
|
|
15
|
+
widget: "checkbox",
|
|
16
|
+
default: true,
|
|
17
|
+
description: "Display markers on the map",
|
|
18
|
+
},
|
|
19
|
+
points: {
|
|
20
|
+
title: "Map Points",
|
|
21
|
+
type: "array",
|
|
22
|
+
widget: "map-points",
|
|
23
|
+
description: "Add and manage map markers. Each point has its own location, details, and sidebar info.",
|
|
24
|
+
showWhen: { showMarker: true },
|
|
25
|
+
},
|
|
26
|
+
markerIcon: {
|
|
27
|
+
title: "Point Icon",
|
|
28
|
+
type: "string",
|
|
29
|
+
widget: "icon-picker",
|
|
30
|
+
default: "none",
|
|
31
|
+
showWhen: { showMarker: true },
|
|
32
|
+
description: "Icon shown inside each marker",
|
|
33
|
+
},
|
|
34
|
+
mapStyle: {
|
|
35
|
+
title: "Map Style",
|
|
36
|
+
type: "string",
|
|
37
|
+
widget: "select",
|
|
38
|
+
options: [
|
|
39
|
+
{ value: "standard", label: "Bright / Standard" },
|
|
40
|
+
{ value: "light", label: "Positron Light" },
|
|
41
|
+
{ value: "dark", label: "Dark" },
|
|
42
|
+
{ value: "voyager", label: "Liberty" },
|
|
43
|
+
{ value: "positron", label: "Minimal Light (No Labels)" },
|
|
44
|
+
{ value: "darkMatter", label: "Minimal Dark (No Labels)" },
|
|
45
|
+
{ value: "fiord", label: "Fiord" },
|
|
46
|
+
{ value: "monochrome", label: "Monochrome" },
|
|
47
|
+
{ value: "humanitarian", label: "Humanitarian" },
|
|
48
|
+
{ value: "cycling", label: "Cycling" },
|
|
49
|
+
{ value: "terrain", label: "Terrain" },
|
|
50
|
+
{ value: "satellite", label: "Satellite" },
|
|
51
|
+
],
|
|
52
|
+
default: "standard",
|
|
53
|
+
description: "Visual style of the map tiles",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
defaults: {
|
|
58
|
+
"@type": "map",
|
|
59
|
+
lat: 45.9432,
|
|
60
|
+
lng: 24.9668,
|
|
61
|
+
zoom: 13,
|
|
62
|
+
mapStyle: "standard",
|
|
63
|
+
showMarker: true,
|
|
64
|
+
markerIcon: "none",
|
|
65
|
+
markerTitle: "",
|
|
66
|
+
points: [
|
|
67
|
+
{
|
|
68
|
+
id: "point-1",
|
|
69
|
+
lat: 45.9432,
|
|
70
|
+
lng: 24.9668,
|
|
71
|
+
title: "Location",
|
|
72
|
+
address: "",
|
|
73
|
+
details: "",
|
|
74
|
+
hours: "",
|
|
75
|
+
phone: "",
|
|
76
|
+
directionsUrl: "",
|
|
77
|
+
imageUrl: "",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
};
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
// Settings of the "newsletter" block, carried over from BrimCMS.
|
|
2
|
+
// The sections list what the sign-up does here: confirmation e-mails and outside services are left out.
|
|
3
|
+
import type { BlockDefinition } from "../types.ts";
|
|
4
|
+
|
|
5
|
+
export const newsletter: BlockDefinition = {
|
|
6
|
+
type: "newsletter",
|
|
7
|
+
label: "Newsletter",
|
|
8
|
+
description: "Email signup form with theme-aware styles",
|
|
9
|
+
schema: {
|
|
10
|
+
fieldsets: [
|
|
11
|
+
{
|
|
12
|
+
id: "newsletter_content",
|
|
13
|
+
title: "Content",
|
|
14
|
+
fields: ["title", "description", "disclaimer", "formName", "placeholder", "buttonText"],
|
|
15
|
+
},
|
|
16
|
+
{ id: "newsletter_after", title: "After Submission", fields: ["successMessage", "errorMessage"] },
|
|
17
|
+
],
|
|
18
|
+
properties: {
|
|
19
|
+
title: {
|
|
20
|
+
title: "Title",
|
|
21
|
+
type: "string",
|
|
22
|
+
widget: "text",
|
|
23
|
+
default: "Subscribe to our newsletter",
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
title: "Description",
|
|
27
|
+
type: "string",
|
|
28
|
+
widget: "richtext",
|
|
29
|
+
default: "<p>Get product updates, practical guides, and release notes directly in your inbox.</p>",
|
|
30
|
+
},
|
|
31
|
+
disclaimer: {
|
|
32
|
+
title: "Disclaimer",
|
|
33
|
+
type: "string",
|
|
34
|
+
widget: "richtext",
|
|
35
|
+
default: "<p>No spam. Unsubscribe anytime.</p>",
|
|
36
|
+
},
|
|
37
|
+
successMessage: {
|
|
38
|
+
title: "Success Message",
|
|
39
|
+
type: "string",
|
|
40
|
+
widget: "text",
|
|
41
|
+
default: "Thanks for subscribing.",
|
|
42
|
+
},
|
|
43
|
+
errorMessage: {
|
|
44
|
+
title: "Error Message",
|
|
45
|
+
type: "string",
|
|
46
|
+
widget: "text",
|
|
47
|
+
default: "Something went wrong. Please try again.",
|
|
48
|
+
},
|
|
49
|
+
sendConfirmationEmail: {
|
|
50
|
+
title: "Send Confirmation Email",
|
|
51
|
+
type: "boolean",
|
|
52
|
+
widget: "checkbox",
|
|
53
|
+
default: false,
|
|
54
|
+
description: "Send email to the subscriber after signup",
|
|
55
|
+
},
|
|
56
|
+
confirmationEmailSubject: {
|
|
57
|
+
title: "Email Subject",
|
|
58
|
+
type: "string",
|
|
59
|
+
widget: "text",
|
|
60
|
+
default: "Thanks for subscribing",
|
|
61
|
+
showWhen: { sendConfirmationEmail: true },
|
|
62
|
+
description: "Use {name}, {email} etc. for subscriber values",
|
|
63
|
+
},
|
|
64
|
+
confirmationEmailBody: {
|
|
65
|
+
title: "Email Body",
|
|
66
|
+
type: "string",
|
|
67
|
+
widget: "email-template",
|
|
68
|
+
default:
|
|
69
|
+
"<p>Hello {name},</p><p>Thanks for subscribing. You are now on the list and will receive our next update at {email}.</p>",
|
|
70
|
+
showWhen: { sendConfirmationEmail: true },
|
|
71
|
+
description: "Use {name}, {email} etc. for subscriber values. Supports rich text, HTML, and inline styles.",
|
|
72
|
+
docsUrl: "https://brimsites.io/docs/emails/template-email",
|
|
73
|
+
},
|
|
74
|
+
formName: {
|
|
75
|
+
title: "Form Name",
|
|
76
|
+
type: "string",
|
|
77
|
+
widget: "text",
|
|
78
|
+
placeholder: "Newsletter Signup",
|
|
79
|
+
default: "",
|
|
80
|
+
description: "Name shown in stored submissions",
|
|
81
|
+
},
|
|
82
|
+
placeholder: {
|
|
83
|
+
title: "Email Placeholder",
|
|
84
|
+
type: "string",
|
|
85
|
+
widget: "text",
|
|
86
|
+
default: "you@example.com",
|
|
87
|
+
},
|
|
88
|
+
buttonText: {
|
|
89
|
+
title: "Button Text",
|
|
90
|
+
type: "string",
|
|
91
|
+
widget: "text",
|
|
92
|
+
default: "Subscribe",
|
|
93
|
+
},
|
|
94
|
+
submitUrl: {
|
|
95
|
+
title: "Submit URL",
|
|
96
|
+
type: "string",
|
|
97
|
+
widget: "url",
|
|
98
|
+
default: "",
|
|
99
|
+
description: "Optional endpoint. If empty, the published form shows a local success message.",
|
|
100
|
+
},
|
|
101
|
+
variant: {
|
|
102
|
+
title: "Container Style",
|
|
103
|
+
type: "string",
|
|
104
|
+
widget: "select",
|
|
105
|
+
options: [
|
|
106
|
+
{ value: "card", label: "Card" },
|
|
107
|
+
{ value: "outline", label: "Outline" },
|
|
108
|
+
{ value: "soft", label: "Soft" },
|
|
109
|
+
{ value: "plain", label: "Plain" },
|
|
110
|
+
],
|
|
111
|
+
default: "card",
|
|
112
|
+
},
|
|
113
|
+
surfaceColor: {
|
|
114
|
+
title: "Surface Color",
|
|
115
|
+
type: "string",
|
|
116
|
+
widget: "color-select",
|
|
117
|
+
options: [
|
|
118
|
+
{ value: "background", label: "Background" },
|
|
119
|
+
{ value: "light1", label: "Light 1" },
|
|
120
|
+
{ value: "light2", label: "Light 2" },
|
|
121
|
+
{ value: "accent", label: "Accent" },
|
|
122
|
+
{ value: "primary", label: "Primary" },
|
|
123
|
+
{ value: "dark1", label: "Dark 1" },
|
|
124
|
+
{ value: "dark2", label: "Dark 2" },
|
|
125
|
+
],
|
|
126
|
+
default: "background",
|
|
127
|
+
allowCustomColor: true,
|
|
128
|
+
allowGradients: true,
|
|
129
|
+
},
|
|
130
|
+
accentColor: {
|
|
131
|
+
title: "Color",
|
|
132
|
+
type: "string",
|
|
133
|
+
widget: "color-select",
|
|
134
|
+
options: [
|
|
135
|
+
{ value: "background", label: "Background" },
|
|
136
|
+
{ value: "light1", label: "Light 1" },
|
|
137
|
+
{ value: "light2", label: "Light 2" },
|
|
138
|
+
{ value: "accent", label: "Accent" },
|
|
139
|
+
{ value: "primary", label: "Primary" },
|
|
140
|
+
{ value: "dark1", label: "Dark 1" },
|
|
141
|
+
{ value: "dark2", label: "Dark 2" },
|
|
142
|
+
],
|
|
143
|
+
default: "primary",
|
|
144
|
+
},
|
|
145
|
+
layout: {
|
|
146
|
+
title: "Layout",
|
|
147
|
+
type: "string",
|
|
148
|
+
widget: "select",
|
|
149
|
+
options: [
|
|
150
|
+
{ value: "inline", label: "Inline" },
|
|
151
|
+
{ value: "stacked", label: "Stacked" },
|
|
152
|
+
],
|
|
153
|
+
default: "inline",
|
|
154
|
+
},
|
|
155
|
+
align: {
|
|
156
|
+
title: "Alignment",
|
|
157
|
+
type: "string",
|
|
158
|
+
widget: "alignment",
|
|
159
|
+
default: "left",
|
|
160
|
+
},
|
|
161
|
+
inputStyle: {
|
|
162
|
+
title: "Input Style",
|
|
163
|
+
type: "string",
|
|
164
|
+
widget: "select",
|
|
165
|
+
options: [
|
|
166
|
+
{ value: "outline", label: "Outline" },
|
|
167
|
+
{ value: "filled", label: "Filled" },
|
|
168
|
+
{ value: "underline", label: "Underline" },
|
|
169
|
+
],
|
|
170
|
+
default: "outline",
|
|
171
|
+
},
|
|
172
|
+
inputSize: {
|
|
173
|
+
title: "Input Spacing",
|
|
174
|
+
type: "string",
|
|
175
|
+
widget: "select",
|
|
176
|
+
options: [
|
|
177
|
+
{ value: "sm", label: "Small" },
|
|
178
|
+
{ value: "md", label: "Medium" },
|
|
179
|
+
{ value: "lg", label: "Large" },
|
|
180
|
+
],
|
|
181
|
+
default: "md",
|
|
182
|
+
},
|
|
183
|
+
titleTypographyStyle: {
|
|
184
|
+
title: "Title Text Style",
|
|
185
|
+
type: "string",
|
|
186
|
+
default: "h4",
|
|
187
|
+
description: "Semantic heading or paragraph style: h1, h2, h3, h4, p1, p2, p3, or custom:<substyle-id>",
|
|
188
|
+
},
|
|
189
|
+
labelTypographyStyle: {
|
|
190
|
+
title: "Label Text Style",
|
|
191
|
+
type: "string",
|
|
192
|
+
default: "p2",
|
|
193
|
+
description: "Semantic paragraph style: p1, p2, p3, or custom:<substyle-id>",
|
|
194
|
+
},
|
|
195
|
+
inputTypographyStyle: {
|
|
196
|
+
title: "Input Text Style",
|
|
197
|
+
type: "string",
|
|
198
|
+
default: "p1",
|
|
199
|
+
description: "Semantic paragraph style: p1, p2, p3, or custom:<substyle-id>",
|
|
200
|
+
},
|
|
201
|
+
buttonTypographyStyle: {
|
|
202
|
+
title: "Button Text Style",
|
|
203
|
+
type: "string",
|
|
204
|
+
default: "p1",
|
|
205
|
+
description: "Semantic paragraph style: p1, p2, p3, or custom:<substyle-id>",
|
|
206
|
+
},
|
|
207
|
+
successTypographyStyle: {
|
|
208
|
+
title: "Success Text Style",
|
|
209
|
+
type: "string",
|
|
210
|
+
default: "p1",
|
|
211
|
+
description: "Semantic paragraph style: p1, p2, p3, or custom:<substyle-id>",
|
|
212
|
+
},
|
|
213
|
+
errorTypographyStyle: {
|
|
214
|
+
title: "Error Text Style",
|
|
215
|
+
type: "string",
|
|
216
|
+
default: "p2",
|
|
217
|
+
description: "Semantic paragraph style: p1, p2, p3, or custom:<substyle-id>",
|
|
218
|
+
},
|
|
219
|
+
shadow: {
|
|
220
|
+
title: "Shadow",
|
|
221
|
+
type: "string",
|
|
222
|
+
widget: "select",
|
|
223
|
+
options: [
|
|
224
|
+
{ value: "none", label: "None" },
|
|
225
|
+
{ value: "sm", label: "Small" },
|
|
226
|
+
{ value: "md", label: "Medium" },
|
|
227
|
+
{ value: "lg", label: "Large" },
|
|
228
|
+
],
|
|
229
|
+
default: "md",
|
|
230
|
+
},
|
|
231
|
+
padding: {
|
|
232
|
+
title: "Padding",
|
|
233
|
+
type: "number",
|
|
234
|
+
widget: "range",
|
|
235
|
+
min: 0,
|
|
236
|
+
max: 48,
|
|
237
|
+
step: 4,
|
|
238
|
+
default: 24,
|
|
239
|
+
},
|
|
240
|
+
fieldGap: {
|
|
241
|
+
title: "Field Gap",
|
|
242
|
+
type: "number",
|
|
243
|
+
widget: "range",
|
|
244
|
+
min: 8,
|
|
245
|
+
max: 32,
|
|
246
|
+
step: 4,
|
|
247
|
+
default: 12,
|
|
248
|
+
},
|
|
249
|
+
buttonVariant: {
|
|
250
|
+
title: "Button Style",
|
|
251
|
+
type: "string",
|
|
252
|
+
widget: "select",
|
|
253
|
+
options: [
|
|
254
|
+
{ value: "primary", label: "Primary" },
|
|
255
|
+
{ value: "light2", label: "Light 2" },
|
|
256
|
+
{ value: "ghost", label: "Ghost" },
|
|
257
|
+
],
|
|
258
|
+
default: "primary",
|
|
259
|
+
},
|
|
260
|
+
buttonSize: {
|
|
261
|
+
title: "Button Size",
|
|
262
|
+
type: "string",
|
|
263
|
+
widget: "select",
|
|
264
|
+
options: [
|
|
265
|
+
{ value: "sm", label: "Small" },
|
|
266
|
+
{ value: "md", label: "Medium" },
|
|
267
|
+
{ value: "lg", label: "Large" },
|
|
268
|
+
],
|
|
269
|
+
default: "md",
|
|
270
|
+
},
|
|
271
|
+
radius: {
|
|
272
|
+
title: "Corner Radius",
|
|
273
|
+
type: "number",
|
|
274
|
+
widget: "range",
|
|
275
|
+
min: 0,
|
|
276
|
+
max: 32,
|
|
277
|
+
step: 2,
|
|
278
|
+
default: 16,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
defaults: {
|
|
283
|
+
"@type": "newsletter",
|
|
284
|
+
presetId: "default-theme",
|
|
285
|
+
title: "Subscribe to our newsletter",
|
|
286
|
+
description: "<p>Get product updates, practical guides, and release notes directly in your inbox.</p>",
|
|
287
|
+
disclaimer: "<p>No spam. Unsubscribe anytime.</p>",
|
|
288
|
+
successMessage: "Thanks for subscribing.",
|
|
289
|
+
errorMessage: "Something went wrong. Please try again.",
|
|
290
|
+
sendConfirmationEmail: false,
|
|
291
|
+
confirmationEmailSubject: "Thanks for subscribing",
|
|
292
|
+
confirmationEmailBody:
|
|
293
|
+
"<p>Hello {name},</p><p>Thanks for subscribing. You are now on the list and will receive our next update at {email}.</p>",
|
|
294
|
+
formName: "",
|
|
295
|
+
placeholder: "you@example.com",
|
|
296
|
+
buttonText: "Subscribe",
|
|
297
|
+
submitUrl: "",
|
|
298
|
+
responses: [],
|
|
299
|
+
variant: "card",
|
|
300
|
+
surfaceColor: "background",
|
|
301
|
+
accentColor: "primary",
|
|
302
|
+
layout: "inline",
|
|
303
|
+
align: "left",
|
|
304
|
+
inputStyle: "outline",
|
|
305
|
+
inputSize: "md",
|
|
306
|
+
titleTypographyStyle: "h4",
|
|
307
|
+
labelTypographyStyle: "p2",
|
|
308
|
+
inputTypographyStyle: "p1",
|
|
309
|
+
buttonTypographyStyle: "p1",
|
|
310
|
+
successTypographyStyle: "p1",
|
|
311
|
+
errorTypographyStyle: "p2",
|
|
312
|
+
shadow: "md",
|
|
313
|
+
padding: 24,
|
|
314
|
+
fieldGap: 12,
|
|
315
|
+
buttonVariant: "primary",
|
|
316
|
+
buttonSize: "md",
|
|
317
|
+
radius: 16,
|
|
318
|
+
partStyles: {
|
|
319
|
+
body: {
|
|
320
|
+
desktop: { verticalAlign: "top" },
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
};
|