buncord-transcript 1.0.4 → 1.0.6

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 CHANGED
@@ -1,9 +1,6 @@
1
- # Buncord-Transcript
1
+ # **Buncord-Transcript**
2
2
 
3
- [![Sponsor](https://img.shields.io/github/sponsors/LuigiColantuono?style=social)](https://github.com/sponsors/LuigiColantuono)
4
- [![PayPal](https://img.shields.io/badge/💖-Support-ff69b4)](https://paypal.me/l0g4n7)
5
- [![npm](https://img.shields.io/npm/v/buncord-transcript?style=flat-square)](https://www.npmjs.com/package/buncord-transcript)
6
- ![Github Stars](https://img.shields.io/github/stars/LuigiColantuono/Buncord-Transcript?style=flat-square)
3
+ <p align="center"><a href="https://github.com/sponsors/LuigiColantuono"><img src="https://img.shields.io/github/sponsors/LuigiColantuono?style=social"></a> <a href="https://paypal.me/l0g4n7"><img src="https://img.shields.io/badge/💖-Support-ff69b4"></a> <img src="https://img.shields.io/npm/v/buncord-transcript"> <img src="https://img.shields.io/npm/dm/buncord-transcript?label=downloads"> <img src="https://img.shields.io/npm/l/buncord-transcript"> <img src="https://img.shields.io/github/repo-size/LuigiColantuono/Buncord-Transcript"> <a href="https://github.com/LuigiColantuono/Buncord-Transcript"><img src="https://img.shields.io/badge/Bun-Networking-black?logo=bun"></a></p>
7
4
 
8
5
  <div align="center">
9
6
  <img src="https://github.com/user-attachments/assets/70e8758e-f363-478a-a013-fd46ca3cf3ec" alt="Buncord Logo" width="180"/>
@@ -15,35 +12,35 @@
15
12
 
16
13
  Stop simulating browsers to generate simple text logs. **Buncord-Transcript** purges the bloat of JSDOM and React, replacing them with a high-performance, string-based rendering engine powered by Bun and a specialized fork of Mustache.
17
14
 
18
- ## Blazingly Fast
15
+ ## **Blazingly Fast**
19
16
 
20
17
  * **Zero Node Dependencies**: No `ws`, no `http` legacy, no `JSDOM`. Pure Bun-native execution.
21
18
  * **Mustache Powered**: Generates complex transcripts in milliseconds using optimized string templates instead of heavy, recursive DOM manipulation.
22
19
  * **Zero Memory Overhead**: While other libraries require hundreds of MBs to "render" a virtual DOM, Buncord processes messages through a stream-like logic that keeps your RAM footprint invisible.
23
20
 
24
- ## 🎨 Absolute Cinema UI
21
+ ## **Absolute Cinema UI**
25
22
 
26
23
  * **Discord v2 Native**: First-class support for modern components: **Buttons**, **Select Menus**, and the new **Containers**.
27
24
  * **1:1 Visual Fidelity**: Unlike libraries with hardcoded styles, Buncord uses a dynamic CSS variable system mirrored directly from the official Discord client.
28
25
  * **Media-First**: Native support for **Multi-image Media Galleries**, high-res avatars, and custom emoji rendering.
29
26
  * **Smart Mentions**: Intelligently resolves user mentions and relative timestamps within the transcript context.
30
27
 
31
- ### 📦 Bundle Size Comparison: Transcripts
28
+ ### **📦 Bundle Size Comparison: Transcripts**
32
29
 
33
30
  | Package | Size (Unpacked) | Total Files | Dependencies | Install Weight (est.) |
34
31
  | :--- | :--- | :--- | :--- | :--- |
35
32
  | **discord-html-transcripts** | 170 kB | 87 | React, JSDOM, etc. | **~25.000 kB (25MB)** |
36
33
  | **buncord-transcript** | 33.8 kB | 8 | **NONE** (Native) | **~34 kB** |
37
34
 
38
- ### 🚀 Result: 99.8% savings on total installation weight!
35
+ > **Result: 99.8% savings on total installation weight!**
39
36
 
40
- ## 📦 Installation
37
+ ## **Installation**
41
38
 
42
39
  ```bash
43
40
  bun add buncord-transcript
44
41
  ```
45
42
 
46
- ## 🚀 Quick Start
43
+ ## **Quick Start**
47
44
 
48
45
  ```typescript
49
46
  import { createTranscript } from 'buncord-transcript';
@@ -59,7 +56,7 @@ const html = await createTranscript(messages, channel);
59
56
  <img width="400" height="500" alt="Buncord-Transcript" src="https://github.com/user-attachments/assets/a63256bd-c22e-465a-a667-74d747526dfb" />
60
57
  </div>
61
58
 
62
- ## 🛠️ The Philosophy
59
+ ## **The Philosophy**
63
60
 
64
61
  Built out of frustration with outdated, bloated libraries that fail to render modern Discord components. Buncord-Transcript is a **"Performance Tier 1"** tool for developers who prioritize speed, code purity, and production stability.
65
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buncord-transcript",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "High-performance, Bun-native Discord HTML transcripts with 1:1 visual fidelity.",
5
5
  "module": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -29,13 +29,18 @@
29
29
  "zero-dependency",
30
30
  "discord-v2"
31
31
  ],
32
- "devDependencies": {
33
- "@types/bun": "latest"
32
+ "scripts": {
33
+ "lint": "eslint .",
34
+ "typecheck": "tsc --noEmit"
34
35
  },
35
- "peerDependencies": {
36
- "typescript": "5.9.3"
36
+ "devDependencies": {
37
+ "@types/bun": "latest",
38
+ "eslint": "^9.39.2",
39
+ "globals": "^15.14.0",
40
+ "typescript": "^5.9.3",
41
+ "typescript-eslint": "^8.54.0"
37
42
  },
38
43
  "dependencies": {
39
- "mustache": "github:LuigiColantuono/mustache"
44
+ "mustache-bun": "^4.2.1"
40
45
  }
41
46
  }
package/src/generator.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import mustache from 'mustache/mustache.js';
2
- import { htmlTemplate, css } from './template';
3
- import type { Message, TranscriptOptions, ChannelInfo, Embed, Button, SelectMenu, AnyComponent, ContainerComponent, TextDisplayComponent, SeparatorComponent, ActionRow } from './types';
2
+ import { htmlTemplate, css } from './template.ts';
3
+ import type { Message, TranscriptOptions, ChannelInfo, Button, SelectMenu, AnyComponent, ContainerComponent, TextDisplayComponent, SeparatorComponent, ActionRow } from './types.ts';
4
4
  // Helper to format Date
5
5
  function formatDate(dateString: string): string {
6
6
  const date = new Date(dateString);
@@ -62,7 +62,7 @@ function formatContent(content: string, userMap?: Map<string, string>): string {
62
62
  // Mentions (Role) <@&123456>
63
63
  html = html.replace(/&lt;@&(\d+)&gt;/g, '<span class="mention">@role</span>');
64
64
  // Timestamps <t:123456:R>
65
- html = html.replace(/&lt;t:(\d+):?([A-Z])?&gt;/g, (match, timestamp, style) => {
65
+ html = html.replace(/&lt;t:(\d+):?([A-Z])?&gt;/g, (match, timestamp, _style) => {
66
66
  const date = new Date(parseInt(timestamp) * 1000);
67
67
  return `<span class="timestamp">${date.toLocaleString()}</span>`;
68
68
  });
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
- import { generateTranscript } from './generator';
3
- export * from './types';
2
+ import { generateTranscript } from './generator.ts';
3
+ export * from './types.ts';
4
4
 
5
5
  // Facade for the user
6
6
  export const createTranscript = generateTranscript;
package/src/template.ts CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  export const css = `
2
3
  @import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');
3
4