vibespot 1.1.1 → 1.3.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.
Files changed (56) hide show
  1. package/LICENSE +103 -33
  2. package/README.md +55 -6
  3. package/assets/blog-rules.md +251 -0
  4. package/assets/email-rules.md +390 -0
  5. package/assets/humanify-guide.md +300 -101
  6. package/assets/plan-templates/agency-services.md +42 -0
  7. package/assets/plan-templates/blog-content-hub.md +50 -0
  8. package/assets/plan-templates/ecommerce-product.md +42 -0
  9. package/assets/plan-templates/email-announcement.md +41 -0
  10. package/assets/plan-templates/email-event-invite.md +43 -0
  11. package/assets/plan-templates/email-newsletter.md +41 -0
  12. package/assets/plan-templates/email-re-engagement.md +42 -0
  13. package/assets/plan-templates/email-welcome.md +41 -0
  14. package/assets/plan-templates/event-registration.md +42 -0
  15. package/assets/plan-templates/portfolio.md +41 -0
  16. package/assets/plan-templates/restaurant.md +42 -0
  17. package/assets/plan-templates/saas-landing.md +42 -0
  18. package/dist/index.js +1485 -397
  19. package/dist/index.js.map +1 -1
  20. package/package.json +11 -7
  21. package/starters/01-saas-landing.json +43 -0
  22. package/starters/02-portfolio.json +39 -0
  23. package/starters/03-restaurant.json +39 -0
  24. package/starters/04-event.json +39 -0
  25. package/starters/05-coming-soon.json +32 -0
  26. package/starters/06-blog-content-hub.json +75 -0
  27. package/starters/06-email-welcome.json +60 -0
  28. package/starters/07-email-announcement.json +60 -0
  29. package/starters/08-email-newsletter.json +52 -0
  30. package/ui/chat.js +1604 -155
  31. package/ui/code-editor.js +49 -7
  32. package/ui/dashboard.js +551 -83
  33. package/ui/docs/docs.css +29 -0
  34. package/ui/docs/index.html +274 -117
  35. package/ui/docs/screenshots/brand-kit-preview.png +0 -0
  36. package/ui/docs/screenshots/content-type-dropdown.png +0 -0
  37. package/ui/docs/screenshots/editor-full-layout.png +0 -0
  38. package/ui/docs/screenshots/inline-wysiwyg-editing.png +0 -0
  39. package/ui/docs/screenshots/multi-page-tree.png +0 -0
  40. package/ui/docs/screenshots/onboarding-walkthrough.png +0 -0
  41. package/ui/docs/screenshots/split-pane-view.png +0 -0
  42. package/ui/docs/screenshots/visual-controls-toolbar.png +0 -0
  43. package/ui/docs/screenshots/workspace-tabs.png +0 -0
  44. package/ui/email-preview.js +109 -0
  45. package/ui/field-editor.js +71 -0
  46. package/ui/icons.js +120 -0
  47. package/ui/index.html +882 -515
  48. package/ui/inline-edit.js +710 -0
  49. package/ui/marketplace.js +218 -0
  50. package/ui/plan.js +0 -0
  51. package/ui/preview.js +219 -1
  52. package/ui/section-controls.js +628 -0
  53. package/ui/settings.js +84 -28
  54. package/ui/setup.js +1016 -118
  55. package/ui/styles.css +6119 -2456
  56. package/ui/upload-panel.js +47 -20
@@ -0,0 +1,390 @@
1
+ # Email Template Rules — HubSpot CMS
2
+
3
+ Rules for generating HubSpot email templates that render correctly across Gmail, Outlook, and Apple Mail.
4
+
5
+ ## 1. Layout Rules — Table-Based Only
6
+
7
+ Email clients do NOT support modern CSS layout. Use HTML tables for all structure.
8
+
9
+ ```html
10
+ <!-- CORRECT: table-based layout -->
11
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%">
12
+ <tr>
13
+ <td align="center" style="padding: 0;">
14
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="600" style="max-width: 600px;">
15
+ <tr>
16
+ <td style="padding: 40px 30px;">
17
+ <!-- content here -->
18
+ </td>
19
+ </tr>
20
+ </table>
21
+ </td>
22
+ </tr>
23
+ </table>
24
+
25
+ <!-- WRONG: flexbox/grid -->
26
+ <div style="display: flex; gap: 20px;">...</div>
27
+ <div style="display: grid; grid-template-columns: 1fr 1fr;">...</div>
28
+ ```
29
+
30
+ ### Column layouts
31
+
32
+ Use nested tables with explicit widths for multi-column layouts:
33
+
34
+ ```html
35
+ <!-- Two columns (50/50) -->
36
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%">
37
+ <tr>
38
+ <td width="50%" valign="top" style="padding-right: 10px;">
39
+ <!-- Left column -->
40
+ </td>
41
+ <td width="50%" valign="top" style="padding-left: 10px;">
42
+ <!-- Right column -->
43
+ </td>
44
+ </tr>
45
+ </table>
46
+ ```
47
+
48
+ ### Fixed widths
49
+
50
+ - Email container: 600px (the universal safe width)
51
+ - Minimum touch target: 44px height for buttons
52
+ - Image max-width: 560px (600px minus 20px padding each side)
53
+
54
+ ## 2. CSS Rules — Inline Only
55
+
56
+ Email clients strip `<style>` blocks and ignore external stylesheets. ALL CSS must be inline.
57
+
58
+ ### Supported CSS properties
59
+
60
+ | Property | Gmail Web | Gmail App | Outlook Desktop | Outlook 365 | Apple Mail |
61
+ |----------|-----------|-----------|-----------------|-------------|------------|
62
+ | color | Yes | Yes | Yes | Yes | Yes |
63
+ | background-color | Yes | Yes | Yes | Yes | Yes |
64
+ | font-family | Yes | Yes | Yes | Yes | Yes |
65
+ | font-size | Yes | Yes | Yes | Yes | Yes |
66
+ | font-weight | Yes | Yes | Yes | Yes | Yes |
67
+ | line-height | Yes | Yes | Yes | Yes | Yes |
68
+ | text-align | Yes | Yes | Yes | Yes | Yes |
69
+ | padding | Yes | Yes | Yes | Yes | Yes |
70
+ | margin | Partial | Partial | Yes | Partial | Yes |
71
+ | border | Yes | Yes | Yes | Yes | Yes |
72
+ | border-radius | Yes | Yes | No | Yes | Yes |
73
+ | width/height | Yes | Yes | Yes | Yes | Yes |
74
+ | max-width | Yes | Yes | No | Yes | Yes |
75
+ | text-decoration | Yes | Yes | Yes | Yes | Yes |
76
+
77
+ ### NEVER use these CSS properties
78
+
79
+ - `display: flex` / `display: grid` — not supported anywhere
80
+ - `position: absolute/relative/fixed` — stripped in Gmail, broken in Outlook
81
+ - `overflow` — ignored or causes clipping
82
+ - `float` — unreliable, use table cells instead
83
+ - `box-shadow` — stripped in Gmail
84
+ - `text-shadow` — stripped in Gmail
85
+ - `transform` — not supported
86
+ - `animation` / `transition` — not supported
87
+ - `@media queries` — Gmail strips them; only use for progressive enhancement
88
+ - `calc()` — not supported in Outlook
89
+ - CSS custom properties (`var()`) — not supported
90
+ - `background-image` on `<div>` — use VML for Outlook (see MSO section)
91
+
92
+ ### Font stacks for email
93
+
94
+ ```
95
+ font-family: Arial, Helvetica, sans-serif;
96
+ font-family: Georgia, 'Times New Roman', Times, serif;
97
+ font-family: 'Courier New', Courier, monospace;
98
+ font-family: Verdana, Geneva, sans-serif;
99
+ font-family: Tahoma, Geneva, sans-serif;
100
+ ```
101
+
102
+ Do NOT use system-ui, -apple-system, or any modern font stacks. Stick to web-safe fonts.
103
+
104
+ ## 3. MSO Conditionals — Outlook Desktop
105
+
106
+ Outlook desktop (Windows) uses the Word rendering engine. Use MSO conditional comments for Outlook-specific fixes.
107
+
108
+ ```html
109
+ <!--[if mso]>
110
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="600">
111
+ <tr>
112
+ <td>
113
+ <![endif]-->
114
+
115
+ <!-- Your responsive/modern content here -->
116
+
117
+ <!--[if mso]>
118
+ </td>
119
+ </tr>
120
+ </table>
121
+ <![endif]-->
122
+ ```
123
+
124
+ ### Common MSO fixes
125
+
126
+ ```html
127
+ <!-- Force width in Outlook -->
128
+ <!--[if mso]>
129
+ <table role="presentation" width="600" cellpadding="0" cellspacing="0" border="0"><tr><td>
130
+ <![endif]-->
131
+ <div style="max-width: 600px; margin: 0 auto;">
132
+ <!-- content -->
133
+ </div>
134
+ <!--[if mso]>
135
+ </td></tr></table>
136
+ <![endif]-->
137
+
138
+ <!-- Outlook-specific button (VML) -->
139
+ <!--[if mso]>
140
+ <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"
141
+ href="https://example.com" style="height:44px;v-text-anchor:middle;width:200px;" arcsize="10%"
142
+ strokecolor="#e8613a" fillcolor="#e8613a">
143
+ <w:anchorlock/>
144
+ <center style="color:#ffffff;font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">
145
+ CTA Text
146
+ </center>
147
+ </v:roundrect>
148
+ <![endif]-->
149
+ <!--[if !mso]><!-->
150
+ <a href="https://example.com" style="background-color: #e8613a; border-radius: 4px; color: #ffffff; display: inline-block; font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; line-height: 44px; text-align: center; text-decoration: none; width: 200px;">
151
+ CTA Text
152
+ </a>
153
+ <!--<![endif]-->
154
+ ```
155
+
156
+ ## 4. Image Rules
157
+
158
+ ```html
159
+ <!-- Always include: width, height, alt, display:block, border:0 -->
160
+ <img src="{{ module.hero_image.src }}"
161
+ alt="{{ module.hero_image.alt }}"
162
+ width="560"
163
+ height="300"
164
+ style="display: block; border: 0; outline: none; text-decoration: none; max-width: 100%; height: auto;"
165
+ />
166
+ ```
167
+
168
+ - Always set explicit `width` and `height` attributes (not just CSS)
169
+ - Use `display: block` to prevent gaps below images
170
+ - Set `border: 0` to prevent blue link borders
171
+ - Use `height: auto` in CSS for responsive scaling
172
+ - Maximum recommended width: 560px (600px container minus padding)
173
+ - Use `alt` text for accessibility and image-off clients
174
+ - Outlook ignores `max-width` on images — set `width` attribute to the actual display size
175
+
176
+ ## 5. Button Rules
177
+
178
+ Bulletproof buttons that work everywhere:
179
+
180
+ ```html
181
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0">
182
+ <tr>
183
+ <td align="center" style="border-radius: 4px; background-color: #e8613a;">
184
+ <a href="{{ module.cta_link.url.href }}"
185
+ target="_blank"
186
+ style="display: inline-block; padding: 14px 32px; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; color: #ffffff; text-decoration: none; border-radius: 4px; background-color: #e8613a;">
187
+ {{ module.cta_text }}
188
+ </a>
189
+ </td>
190
+ </tr>
191
+ </table>
192
+ ```
193
+
194
+ - Duplicate `background-color` and `border-radius` on both `<td>` and `<a>`
195
+ - Use padding on the `<a>` tag (makes entire button clickable)
196
+ - Never use `<button>` elements
197
+ - Minimum touch target: 44px height
198
+ - Include VML fallback for Outlook when border-radius is important (see MSO section)
199
+
200
+ ## 6. Typography Rules
201
+
202
+ ```html
203
+ <!-- Headings -->
204
+ <h1 style="margin: 0 0 16px 0; font-family: Arial, Helvetica, sans-serif; font-size: 28px; font-weight: bold; line-height: 1.2; color: #1a1a2e;">
205
+ {{ module.heading }}
206
+ </h1>
207
+
208
+ <!-- Body text -->
209
+ <p style="margin: 0 0 16px 0; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.5; color: #4a4a4a;">
210
+ {{ module.body_text }}
211
+ </p>
212
+
213
+ <!-- Small/preheader text -->
214
+ <span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.4; color: #999999;">
215
+ {{ module.preheader }}
216
+ </span>
217
+ ```
218
+
219
+ - Always set `margin: 0` on headings/paragraphs (reset defaults)
220
+ - Re-declare `font-family` on every text element
221
+ - Use px units (not rem/em) — email clients handle relative units inconsistently
222
+ - Line-height: use unitless values (1.5) or px (24px), not em/rem
223
+ - Outlook ignores `line-height` on `<p>` — use `mso-line-height-rule: exactly` if needed
224
+
225
+ ## 7. Spacing & Dividers
226
+
227
+ ```html
228
+ <!-- Vertical spacer -->
229
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%">
230
+ <tr>
231
+ <td style="padding: 20px 0; font-size: 0; line-height: 0;">&nbsp;</td>
232
+ </tr>
233
+ </table>
234
+
235
+ <!-- Horizontal divider -->
236
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%">
237
+ <tr>
238
+ <td style="padding: 20px 0;">
239
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%">
240
+ <tr>
241
+ <td style="border-top: 1px solid #e0e0e0; font-size: 0; line-height: 0;">&nbsp;</td>
242
+ </tr>
243
+ </table>
244
+ </td>
245
+ </tr>
246
+ </table>
247
+ ```
248
+
249
+ - Use `padding` on `<td>` for spacing (not `margin`)
250
+ - Include `&nbsp;` in empty cells (Outlook collapses empty TDs)
251
+ - Use `font-size: 0; line-height: 0;` on spacer cells
252
+
253
+ ## 8. HubL for Email — Safe Subset
254
+
255
+ ### Supported HubL in email
256
+
257
+ ```html
258
+ <!-- Module fields (same as pages) -->
259
+ {{ module.field_name }}
260
+ {{ module.field_name|escape }}
261
+
262
+ <!-- Conditionals -->
263
+ {% if module.show_section %}
264
+ ...
265
+ {% endif %}
266
+
267
+ <!-- Loops (for repeater fields) -->
268
+ {% for item in module.items %}
269
+ {{ item.title }}
270
+ {% endfor %}
271
+
272
+ <!-- Color fields -->
273
+ {{ module.bg_color.color }}
274
+
275
+ <!-- Link fields -->
276
+ {{ module.cta_link.url.href }}
277
+
278
+ <!-- Image fields -->
279
+ {{ module.hero_image.src }}
280
+ {{ module.hero_image.alt }}
281
+
282
+ <!-- Email-specific variables -->
283
+ {{ site_settings.company_name }}
284
+ {{ site_settings.company_street_address_1 }}
285
+ {{ site_settings.company_city }}
286
+ {{ site_settings.company_state }}
287
+ {{ unsubscribe_link }}
288
+ {{ unsubscribe_link_all }}
289
+ {{ site_settings.company_name }}
290
+ ```
291
+
292
+ ### NOT supported in email
293
+
294
+ - `require_css()` / `require_js()` — no external asset loading
295
+ - `scope_css` tag — no style blocks to scope
296
+ - `get_asset_url()` — use absolute URLs or image fields instead
297
+ - `module.js` — no JavaScript execution in email
298
+ - `dnd_area` / `dnd_section` / `dnd_module` — use email DnD system instead
299
+ - Custom JavaScript or IntersectionObserver
300
+ - `now()` / `local_dt` — use `{{ content.publish_date }}` instead
301
+
302
+ ## 9. Email-Specific Required Elements
303
+
304
+ ### Preheader text
305
+
306
+ Hidden preview text shown in inbox previews:
307
+
308
+ ```html
309
+ <!-- Preheader: hidden preview text -->
310
+ <div style="display: none; max-height: 0; overflow: hidden; mso-hide: all;">
311
+ {{ module.preheader_text }}
312
+ <!-- Pad with invisible whitespace to prevent inbox from pulling body text -->
313
+ &zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
314
+ </div>
315
+ ```
316
+
317
+ ### Unsubscribe link (legally required)
318
+
319
+ ```html
320
+ <a href="{{ unsubscribe_link }}" style="color: #999999; font-size: 12px; text-decoration: underline;">
321
+ Unsubscribe
322
+ </a>
323
+ ```
324
+
325
+ ### Physical address (CAN-SPAM)
326
+
327
+ ```html
328
+ <p style="margin: 0; font-family: Arial, sans-serif; font-size: 12px; color: #999999; line-height: 1.4;">
329
+ {{ site_settings.company_name }}<br>
330
+ {{ site_settings.company_street_address_1 }}<br>
331
+ {{ site_settings.company_city }}, {{ site_settings.company_state }}
332
+ </p>
333
+ ```
334
+
335
+ ### View in browser
336
+
337
+ ```html
338
+ <a href="{{ view_as_page_url }}" style="color: #999999; font-size: 12px; text-decoration: underline;">
339
+ View in browser
340
+ </a>
341
+ ```
342
+
343
+ ## 10. Email meta.json
344
+
345
+ ```json
346
+ {
347
+ "host_template_types": ["EMAIL"],
348
+ "is_available_for_new_content": true
349
+ }
350
+ ```
351
+
352
+ Note: `host_template_types` is `["EMAIL"]`, not `["PAGE"]`.
353
+
354
+ ## 11. Dark Mode Considerations
355
+
356
+ Some email clients support dark mode. Use meta tags and inline styles to handle it gracefully:
357
+
358
+ ```html
359
+ <!-- In the <head> (HubSpot template level, not module level) -->
360
+ <meta name="color-scheme" content="light dark">
361
+ <meta name="supported-color-modes" content="light dark">
362
+ ```
363
+
364
+ For module content, use high-contrast colors that work in both modes:
365
+ - Avoid pure white (#ffffff) backgrounds — use #fafafa or #f5f5f5
366
+ - Avoid pure black (#000000) text — use #1a1a2e or #333333
367
+ - Use transparent backgrounds where possible
368
+ - Test both color schemes
369
+
370
+ ## 12. Pre-Send Checklist
371
+
372
+ - [ ] Container width is 600px
373
+ - [ ] All layout uses `<table role="presentation">`
374
+ - [ ] All CSS is inline (no `<style>` blocks)
375
+ - [ ] No flexbox, grid, float, or position
376
+ - [ ] No CSS custom properties (var())
377
+ - [ ] No calc(), transform, animation, transition
378
+ - [ ] All images have width, height, alt, display:block, border:0
379
+ - [ ] Buttons use table+anchor pattern (no `<button>` elements)
380
+ - [ ] All font sizes in px (not rem/em)
381
+ - [ ] Font stacks use web-safe fonts only
382
+ - [ ] MSO conditionals wrap the outer container
383
+ - [ ] Includes unsubscribe link
384
+ - [ ] Includes physical address
385
+ - [ ] Preheader text is present
386
+ - [ ] meta.json uses `host_template_types: ["EMAIL"]`
387
+ - [ ] No `require_css`, `require_js`, `scope_css`, or `get_asset_url`
388
+ - [ ] No module.js file
389
+ - [ ] All links have absolute URLs or HubL variables
390
+ - [ ] Touch targets are at least 44px