vibespot 1.0.8 → 1.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibespot",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "AI-powered HubSpot CMS landing page builder — vibe coding & React converter",
5
5
  "type": "module",
6
6
  "bin": {
package/ui/chat.js CHANGED
@@ -542,17 +542,26 @@ const DOC_TYPES = new Set([
542
542
  "text/markdown", "text/plain",
543
543
  ]);
544
544
  const SUPPORTED_TYPES = new Set([...IMAGE_TYPES, ...DOC_TYPES]);
545
+ // Browsers often report .md files as application/octet-stream or empty string
546
+ const EXT_MIME_MAP = { ".md": "text/markdown", ".txt": "text/plain", ".markdown": "text/markdown" };
545
547
 
546
548
  function addPendingFile(file) {
547
- if (!SUPPORTED_TYPES.has(file.type)) {
548
- showToast(`Unsupported file type: ${file.name}`);
549
- return;
549
+ let f = file;
550
+ if (!SUPPORTED_TYPES.has(f.type)) {
551
+ const ext = f.name.slice(f.name.lastIndexOf(".")).toLowerCase();
552
+ const mapped = EXT_MIME_MAP[ext];
553
+ if (mapped) {
554
+ f = new File([f], f.name, { type: mapped });
555
+ } else {
556
+ showToast(`Unsupported file type: ${f.name}`);
557
+ return;
558
+ }
550
559
  }
551
- if (file.size > MAX_FILE_SIZE) {
552
- showToast(`File too large (>10MB): ${file.name}`);
560
+ if (f.size > MAX_FILE_SIZE) {
561
+ showToast(`File too large (>10MB): ${f.name}`);
553
562
  return;
554
563
  }
555
- pendingFiles.push(file);
564
+ pendingFiles.push(f);
556
565
  renderFileChips();
557
566
  }
558
567
 
package/ui/index.html CHANGED
@@ -430,7 +430,7 @@
430
430
  <button class="chat__input-icon" id="btn-attach-file" title="Attach files (images, PDFs, docs)">
431
431
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"/></svg>
432
432
  </button>
433
- <input type="file" id="file-input" multiple accept="image/png,image/jpeg,image/svg+xml,image/webp,image/gif,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/markdown,text/plain" style="display:none">
433
+ <input type="file" id="file-input" multiple accept="image/png,image/jpeg,image/svg+xml,image/webp,image/gif,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/markdown,text/plain,.md,.markdown,.txt" style="display:none">
434
434
  <button class="chat__input-icon" id="btn-starter-templates" title="Templates">
435
435
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/></svg>
436
436
  </button>