@one-million-lines/email-builder 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -7,24 +7,21 @@ This project adheres to [Semantic Versioning](https://semver.org/) and the
7
7
  ## [Unreleased]
8
8
 
9
9
  ### Added
10
- - **Gallery module** (`src/gallery/`) — pluggable packs of extra, ready-to-drop
11
- blocks that render on top of each category in the left sidebar (badged "New")
12
- and can be registered/removed at runtime with live UI updates. New exports:
13
- `galleryRegistry`, `galleryPlugin`, `sampleGallery`, types `GalleryDefinition`
14
- and `GalleryItem`. New `galleries` prop on `<EmailBuilder>` and a dedicated
15
- **Gallery** sidebar tab. See `src/gallery/README.md`.
16
10
  - **AI assistant module** (`src/ai/`) — optional chat-driven editing. When an AI
17
11
  provider is configured an **AI** tab appears in the left sidebar. The client
18
- sends a catalog of real modules (built-ins + gallery items) so the assistant
19
- only ever assembles valid, renderable emails; every response is validated with
20
- `documentSchema` and gets fresh ids before being applied. New exports:
21
- `aiAssistantPlugin`, `createHttpAIProvider`, `buildCatalog`, `applyAIResponse`,
22
- `mockAIProvider`, `applyAIActions`, `validateAIDocument`, and the related
23
- types. New `aiEndpoint` prop on `<EmailBuilder>`. See `src/ai/README.md`.
12
+ sends a catalog of real modules so the assistant only ever assembles valid,
13
+ renderable emails; every response is validated with `documentSchema` and gets
14
+ fresh ids before being applied. New exports: `aiAssistantPlugin`,
15
+ `createHttpAIProvider`, `buildCatalog`, `applyAIResponse`, `mockAIProvider`,
16
+ `applyAIActions`, `validateAIDocument`, and the related types. New `aiEndpoint`
17
+ prop on `<EmailBuilder>`. See `src/ai/README.md`.
24
18
  - **Python AI backend** (`backend/`) — a small Flask service (`app.py`,
25
19
  `ai_service.py`) exposing `GET /health` and `POST /ai/generate`. Works with any
26
20
  OpenAI-compatible endpoint and falls back to a deterministic offline planner
27
21
  when no API key is set. See `backend/README.md`.
22
+ - **Feature module additions** — five new blocks added to the Feature category:
23
+ `feature.gradient_hero` (launch CTA hero), `feature.pull_quote`,
24
+ `feature.stat_row`, `feature.single_product_spotlight`, `feature.pill_nav`.
28
25
 
29
26
 
30
27
  ## [0.1.4] — 2026-07-02
package/README.md CHANGED
@@ -15,8 +15,6 @@ Marketing teams often need a reusable editor that produces email-safe HTML witho
15
15
  - Visual editor with top bar, left sidebar, canvas, and right sidebar
16
16
  - JSON-first email document model
17
17
  - Built-in modules, templates, and themes
18
- - **Gallery module** — pluggable packs of extra blocks that appear on top of each
19
- category and can be loaded at runtime
20
18
  - **AI assistant module** — optional chat-driven editing backed by a simple
21
19
  Python service
22
20
  - Table-based HTML rendering for email output
@@ -49,7 +47,6 @@ src/
49
47
  core/ document types, renderer, validation, AI actions, plugins
50
48
  editor/ top bar, sidebars, canvas
51
49
  modules/ module registry and built-in modules
52
- gallery/ gallery registry + packs of extra blocks (see gallery/README.md)
53
50
  ai/ AI assistant module: provider, catalog, chat panel (see ai/README.md)
54
51
  recommendations/ recommendation and fallback logic
55
52
  store/ editor state and persistence
@@ -138,26 +135,6 @@ Vue and Angular mount the React-based editor through the framework-neutral
138
135
  `createEmailBuilder()` factory (`getDocument` / `exportHtml` / `exportJson` /
139
136
  `destroy`). React and ReactDOM remain peer dependencies in all cases.
140
137
 
141
- ### Gallery module
142
-
143
- Galleries are pluggable packs of extra, ready-to-drop blocks. Their items appear
144
- **on top of** each category in the left sidebar (badged "New") and can be loaded
145
- at runtime.
146
-
147
- ```tsx
148
- import { EmailBuilder, sampleGallery } from "@one-million-lines/email-builder";
149
-
150
- <EmailBuilder galleries={[sampleGallery]} />
151
- ```
152
-
153
- ```ts
154
- import { galleryRegistry } from "@one-million-lines/email-builder";
155
- // Load dynamically — the sidebar updates live.
156
- galleryRegistry.registerGallery(await fetch("/api/galleries").then((r) => r.json()));
157
- ```
158
-
159
- See [`src/gallery/README.md`](./src/gallery/README.md) for authoring galleries.
160
-
161
138
  ### AI assistant module
162
139
 
163
140
  Enable chat-driven editing by pointing the builder at the Python AI service in
@@ -5,13 +5,11 @@ export interface CatalogEntry {
5
5
  name: string;
6
6
  description: string;
7
7
  tags: string[];
8
- /** Whether the module comes from a gallery (vs a built-in pack). */
9
- source: "module" | "gallery";
8
+ source: "module";
10
9
  /** A concrete, renderable instance of the module (ids included). */
11
10
  sample: EmailModule;
12
11
  }
13
12
  /**
14
- * Build the catalog sent to the AI backend. Gallery items are listed first so
15
- * the model is nudged to prefer freshly added styles, mirroring the sidebar.
13
+ * Build the catalog sent to the AI backend.
16
14
  */
17
15
  export declare function buildCatalog(): CatalogEntry[];