artifactuse 0.1.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 +21 -0
- package/README.md +771 -0
- package/dist/core/bridge.d.ts +37 -0
- package/dist/core/detector.d.ts +134 -0
- package/dist/core/highlight.d.ts +53 -0
- package/dist/core/index.d.ts +124 -0
- package/dist/core/processors/audio.d.ts +36 -0
- package/dist/core/processors/audioPlayer.d.ts +39 -0
- package/dist/core/processors/codeEmbed.d.ts +58 -0
- package/dist/core/processors/dataViz.d.ts +28 -0
- package/dist/core/processors/design.d.ts +50 -0
- package/dist/core/processors/document.d.ts +38 -0
- package/dist/core/processors/image.d.ts +23 -0
- package/dist/core/processors/index.d.ts +62 -0
- package/dist/core/processors/interactive.d.ts +57 -0
- package/dist/core/processors/map.d.ts +29 -0
- package/dist/core/processors/math.d.ts +75 -0
- package/dist/core/processors/mermaid.d.ts +72 -0
- package/dist/core/processors/social.d.ts +63 -0
- package/dist/core/processors/table.d.ts +43 -0
- package/dist/core/processors/video.d.ts +69 -0
- package/dist/core/state.d.ts +37 -0
- package/dist/core/theme.d.ts +109 -0
- package/dist/index-_nD5FZzs.js +4300 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +115 -0
- package/dist/jszip.min-CdmYyw5L.js +2324 -0
- package/dist/react/ArtifactuseAgentMessage.d.ts +31 -0
- package/dist/react/ArtifactuseCard.d.ts +13 -0
- package/dist/react/ArtifactuseInlineForm.d.ts +16 -0
- package/dist/react/ArtifactusePanel.d.ts +12 -0
- package/dist/react/ArtifactusePanelToggle.d.ts +8 -0
- package/dist/react/ArtifactuseSocialPreview.d.ts +6 -0
- package/dist/react/ArtifactuseViewer.d.ts +14 -0
- package/dist/react/index.d.ts +108 -0
- package/dist/react/index.js +1387 -0
- package/dist/svelte/index.d.ts +439 -0
- package/dist/svelte/index.js +2556 -0
- package/dist/vue/index.d.ts +296 -0
- package/dist/vue/index.js +2745 -0
- package/dist/vue2/composables.d.ts +291 -0
- package/dist/vue2/index.d.ts +10 -0
- package/dist/vue2/index.js +27979 -0
- package/package.json +127 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { imageProcessor as image };
|
|
3
|
+
export { videoProcessor as video };
|
|
4
|
+
export { audioProcessor as audio };
|
|
5
|
+
export { mapProcessor as map };
|
|
6
|
+
export { socialProcessor as social };
|
|
7
|
+
export { documentProcessor as document };
|
|
8
|
+
export { codeEmbedProcessor as codeEmbed };
|
|
9
|
+
export { dataVizProcessor as dataViz };
|
|
10
|
+
export { designProcessor as design };
|
|
11
|
+
export { interactiveProcessor as interactive };
|
|
12
|
+
export { mermaidProcessor as mermaid };
|
|
13
|
+
export { tableProcessor as table };
|
|
14
|
+
export { mathProcessor as math };
|
|
15
|
+
export let processImages: typeof import("./image.js").processImages;
|
|
16
|
+
export let processVideos: typeof import("./video.js").processVideos;
|
|
17
|
+
export let processAudio: typeof import("./audio.js").processAudio;
|
|
18
|
+
export let processMaps: typeof import("./map.js").processMaps;
|
|
19
|
+
export let processSocialEmbeds: typeof import("./social.js").processSocialEmbeds;
|
|
20
|
+
export let processPdfs: typeof import("./document.js").processPdfs;
|
|
21
|
+
export let processGoogleDocs: typeof import("./document.js").processGoogleDocs;
|
|
22
|
+
export let processOfficeDocuments: typeof import("./document.js").processOfficeDocuments;
|
|
23
|
+
export let processCodeEmbeds: typeof import("./codeEmbed.js").processCodeEmbeds;
|
|
24
|
+
export let processDataViz: typeof import("./dataViz.js").processDataViz;
|
|
25
|
+
export let process3DEmbeds: typeof import("./design.js").process3DEmbeds;
|
|
26
|
+
export let processInteractiveEmbeds: typeof import("./interactive.js").processInteractiveEmbeds;
|
|
27
|
+
export let processMermaid: typeof import("./mermaid.js").processMermaid;
|
|
28
|
+
export let processTables: typeof import("./table.js").processTables;
|
|
29
|
+
export let processMath: typeof import("./math.js").processMath;
|
|
30
|
+
export let initializeMermaid: typeof import("./mermaid.js").initializeMermaid;
|
|
31
|
+
export let initializeTables: typeof import("./table.js").initializeTables;
|
|
32
|
+
export let initializeMath: typeof import("./math.js").initializeMath;
|
|
33
|
+
export let renderImageHtml: typeof import("./image.js").renderImageHtml;
|
|
34
|
+
}
|
|
35
|
+
export default _default;
|
|
36
|
+
import imageProcessor from './image.js';
|
|
37
|
+
import videoProcessor from './video.js';
|
|
38
|
+
import audioProcessor from './audio.js';
|
|
39
|
+
import mapProcessor from './map.js';
|
|
40
|
+
import socialProcessor from './social.js';
|
|
41
|
+
import documentProcessor from './document.js';
|
|
42
|
+
import codeEmbedProcessor from './codeEmbed.js';
|
|
43
|
+
import dataVizProcessor from './dataViz.js';
|
|
44
|
+
import designProcessor from './design.js';
|
|
45
|
+
import interactiveProcessor from './interactive.js';
|
|
46
|
+
import mermaidProcessor from './mermaid.js';
|
|
47
|
+
import tableProcessor from './table.js';
|
|
48
|
+
import mathProcessor from './math.js';
|
|
49
|
+
export { processImages, renderImageHtml, processImageGalleries, createImageGallery } from "./image.js";
|
|
50
|
+
export { processVideos, isVideoUrl, renderVideoHtml, createVideoPlayer, processVideoGalleries, createVideoGallery, createVideoWithPreview, createYouTubeEmbed, createVimeoEmbed, createLoomEmbed, createDailymotionEmbed } from "./video.js";
|
|
51
|
+
export { processAudio, createAudioPlayer, createSoundCloudEmbed, createSpotifyEmbed, createAppleMusicEmbed } from "./audio.js";
|
|
52
|
+
export { initializeAudioPlayers, destroyAllPlayers } from "./audioPlayer.js";
|
|
53
|
+
export { processMaps, createGoogleMapEmbed, createGoogleMapEmbedCoords, createOSMEmbed } from "./map.js";
|
|
54
|
+
export { processSocialEmbeds, createTwitterEmbed, createInstagramEmbed, createInstagramReelEmbed, createTikTokEmbed, createLinkedInEmbed, createRedditEmbed, createFacebookEmbed, createPinterestEmbed } from "./social.js";
|
|
55
|
+
export { processPdfs, createPdfEmbed, processGoogleDocs, createGoogleDocEmbed, createGoogleFormEmbed, processOfficeDocuments, createOfficeEmbed } from "./document.js";
|
|
56
|
+
export { processCodeEmbeds, createGistEmbed, createCodePenEmbed, createCodeSandboxEmbed, createJSFiddleEmbed, createStackBlitzEmbed, createReplitEmbed } from "./codeEmbed.js";
|
|
57
|
+
export { processDataViz, createTableauEmbed, createFlourishEmbed, createDatawrapperEmbed, createInfogramEmbed } from "./dataViz.js";
|
|
58
|
+
export { process3DEmbeds, createSketchfabEmbed, createFigmaEmbed, createFigmaPrototypeEmbed, createCanvaEmbed, createDribbbleEmbed, createBehanceEmbed } from "./design.js";
|
|
59
|
+
export { processInteractiveEmbeds, createTypeformEmbed, createCalendlyEmbed, createGoogleCalendarEmbed, createCalcomEmbed, createNotionEmbed, createAirtableEmbed, createMiroEmbed } from "./interactive.js";
|
|
60
|
+
export { processMermaid, createMermaidBlock, initializeMermaid, loadMermaid, resetMermaidLoadState, isMermaidAvailable, hasMermaidLoadFailed, processMermaidInElement, rerenderMermaid, updateMermaidDiagram } from "./mermaid.js";
|
|
61
|
+
export { processTables, createEnhancedTable, tableToCSV, downloadCSV, copyTableToClipboard, sortTable, filterTable, initializeTables } from "./table.js";
|
|
62
|
+
export { processMath, createMathBlock, initializeMath, loadKaTeX, resetKaTeXLoadState, isKaTeXAvailable, hasKaTeXLoadFailed, processMathInElement, mathPatterns } from "./math.js";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process all interactive tool URLs in HTML
|
|
3
|
+
* @param {string} html - HTML content to process
|
|
4
|
+
* @param {object} options - Processing options
|
|
5
|
+
* @param {string} options.theme - Theme: 'dark' | 'light'
|
|
6
|
+
*/
|
|
7
|
+
export function processInteractiveEmbeds(html: string, options?: {
|
|
8
|
+
theme: string;
|
|
9
|
+
}): string;
|
|
10
|
+
/**
|
|
11
|
+
* Create Typeform embed
|
|
12
|
+
* Note: Typeform embed doesn't support theme parameter via URL
|
|
13
|
+
*/
|
|
14
|
+
export function createTypeformEmbed(formId: any): string;
|
|
15
|
+
/**
|
|
16
|
+
* Create Calendly embed
|
|
17
|
+
* Note: Calendly embed doesn't support theme parameter via URL
|
|
18
|
+
*/
|
|
19
|
+
export function createCalendlyEmbed(username: any, eventType?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Create Google Calendar Appointments embed
|
|
22
|
+
* Note: Google Calendar embed doesn't support theme parameter
|
|
23
|
+
*/
|
|
24
|
+
export function createGoogleCalendarEmbed(scheduleId: any): string;
|
|
25
|
+
/**
|
|
26
|
+
* Create Cal.com embed
|
|
27
|
+
* @param {string} username - Cal.com username
|
|
28
|
+
* @param {string} eventType - Event type (optional)
|
|
29
|
+
* @param {string} theme - 'dark' | 'light'
|
|
30
|
+
*/
|
|
31
|
+
export function createCalcomEmbed(username: string, eventType?: string, theme?: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Create Notion embed
|
|
34
|
+
* Note: Notion embed doesn't support theme parameter
|
|
35
|
+
*/
|
|
36
|
+
export function createNotionEmbed(pageId: any): string;
|
|
37
|
+
/**
|
|
38
|
+
* Create Airtable embed
|
|
39
|
+
* Note: Airtable embed doesn't support theme parameter
|
|
40
|
+
*/
|
|
41
|
+
export function createAirtableEmbed(baseId: any, viewId: any): string;
|
|
42
|
+
/**
|
|
43
|
+
* Create Miro embed
|
|
44
|
+
* Note: Miro embed doesn't support theme parameter
|
|
45
|
+
*/
|
|
46
|
+
export function createMiroEmbed(boardId: any): string;
|
|
47
|
+
declare namespace _default {
|
|
48
|
+
export { processInteractiveEmbeds };
|
|
49
|
+
export { createTypeformEmbed };
|
|
50
|
+
export { createCalendlyEmbed };
|
|
51
|
+
export { createGoogleCalendarEmbed };
|
|
52
|
+
export { createCalcomEmbed };
|
|
53
|
+
export { createNotionEmbed };
|
|
54
|
+
export { createAirtableEmbed };
|
|
55
|
+
export { createMiroEmbed };
|
|
56
|
+
}
|
|
57
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process all map URLs in HTML
|
|
3
|
+
*/
|
|
4
|
+
export function processMaps(html: any): any;
|
|
5
|
+
/**
|
|
6
|
+
* Create Google Maps embed from direct embed URL
|
|
7
|
+
* Extracts coordinates from the pb parameter and creates a standard embed
|
|
8
|
+
*/
|
|
9
|
+
export function createGoogleMapEmbedDirect(embedUrl: any): string;
|
|
10
|
+
/**
|
|
11
|
+
* Create Google Maps embed from place name/query
|
|
12
|
+
*/
|
|
13
|
+
export function createGoogleMapEmbed(query: any): string;
|
|
14
|
+
/**
|
|
15
|
+
* Create Google Maps embed from coordinates
|
|
16
|
+
*/
|
|
17
|
+
export function createGoogleMapEmbedCoords(lat: any, lng: any, zoom: any): string;
|
|
18
|
+
/**
|
|
19
|
+
* Create OpenStreetMap embed
|
|
20
|
+
*/
|
|
21
|
+
export function createOSMEmbed(lat: any, lon: any, zoom?: number): string;
|
|
22
|
+
declare namespace _default {
|
|
23
|
+
export { processMaps };
|
|
24
|
+
export { createGoogleMapEmbedDirect };
|
|
25
|
+
export { createGoogleMapEmbed };
|
|
26
|
+
export { createGoogleMapEmbedCoords };
|
|
27
|
+
export { createOSMEmbed };
|
|
28
|
+
}
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process all math expressions in HTML
|
|
3
|
+
* Supports:
|
|
4
|
+
* - Display math: $$ ... $$ or \[ ... \]
|
|
5
|
+
* - Inline math: $ ... $ or \( ... \)
|
|
6
|
+
* - Code blocks with language "math" or "latex"
|
|
7
|
+
*/
|
|
8
|
+
export function processMath(html: any): any;
|
|
9
|
+
/**
|
|
10
|
+
* Create math block HTML with KaTeX rendering
|
|
11
|
+
*/
|
|
12
|
+
export function createMathBlock(tex: any, isDisplay?: boolean): string;
|
|
13
|
+
/**
|
|
14
|
+
* Initialize KaTeX rendering (call after DOM is ready)
|
|
15
|
+
* Requires KaTeX library to be loaded
|
|
16
|
+
*/
|
|
17
|
+
export function initializeMath(): any;
|
|
18
|
+
/**
|
|
19
|
+
* Dynamically load KaTeX library
|
|
20
|
+
*/
|
|
21
|
+
export function loadKaTeX(): any;
|
|
22
|
+
/**
|
|
23
|
+
* Reset the KaTeX loading state (useful for testing)
|
|
24
|
+
*/
|
|
25
|
+
export function resetKaTeXLoadState(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Check if KaTeX is currently available
|
|
28
|
+
*/
|
|
29
|
+
export function isKaTeXAvailable(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Check if KaTeX loading has failed
|
|
32
|
+
*/
|
|
33
|
+
export function hasKaTeXLoadFailed(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Process and render math in a specific element
|
|
36
|
+
*/
|
|
37
|
+
export function processMathInElement(element: any): any;
|
|
38
|
+
export namespace mathPatterns {
|
|
39
|
+
function fraction(num: any, den: any): string;
|
|
40
|
+
function sqrt(expr: any, n?: any): string;
|
|
41
|
+
function power(base: any, exp: any): string;
|
|
42
|
+
function subscript(base: any, sub: any): string;
|
|
43
|
+
let alpha: string;
|
|
44
|
+
let beta: string;
|
|
45
|
+
let gamma: string;
|
|
46
|
+
let delta: string;
|
|
47
|
+
let theta: string;
|
|
48
|
+
let lambda: string;
|
|
49
|
+
let pi: string;
|
|
50
|
+
let sigma: string;
|
|
51
|
+
let omega: string;
|
|
52
|
+
function sum(lower: any, upper: any, expr: any): string;
|
|
53
|
+
function product(lower: any, upper: any, expr: any): string;
|
|
54
|
+
function integral(lower: any, upper: any, expr: any): string;
|
|
55
|
+
function limit(variable: any, to: any, expr: any): string;
|
|
56
|
+
function matrix(rows: any): string;
|
|
57
|
+
function determinant(rows: any): string;
|
|
58
|
+
let quadratic: string;
|
|
59
|
+
let pythagorean: string;
|
|
60
|
+
let euler: string;
|
|
61
|
+
function derivative(f: any, x: any): string;
|
|
62
|
+
function partialDerivative(f: any, x: any): string;
|
|
63
|
+
}
|
|
64
|
+
declare namespace _default {
|
|
65
|
+
export { processMath };
|
|
66
|
+
export { createMathBlock };
|
|
67
|
+
export { initializeMath };
|
|
68
|
+
export { loadKaTeX };
|
|
69
|
+
export { resetKaTeXLoadState };
|
|
70
|
+
export { isKaTeXAvailable };
|
|
71
|
+
export { hasKaTeXLoadFailed };
|
|
72
|
+
export { processMathInElement };
|
|
73
|
+
export { mathPatterns };
|
|
74
|
+
}
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process mermaid code blocks in HTML
|
|
3
|
+
*/
|
|
4
|
+
export function processMermaid(html: any): any;
|
|
5
|
+
/**
|
|
6
|
+
* Create mermaid diagram placeholder
|
|
7
|
+
*/
|
|
8
|
+
export function createMermaidBlock(diagram: any): string;
|
|
9
|
+
/**
|
|
10
|
+
* Initialize Mermaid rendering (call after DOM is ready)
|
|
11
|
+
* @param {object} config - Mermaid configuration options
|
|
12
|
+
* @param {string} config.theme - Theme: 'dark' | 'light'
|
|
13
|
+
*/
|
|
14
|
+
export function initializeMermaid(config?: {
|
|
15
|
+
theme: string;
|
|
16
|
+
}): any;
|
|
17
|
+
/**
|
|
18
|
+
* Dynamically load Mermaid library
|
|
19
|
+
*/
|
|
20
|
+
export function loadMermaid(): any;
|
|
21
|
+
/**
|
|
22
|
+
* Reset the Mermaid loading state (useful for testing)
|
|
23
|
+
*/
|
|
24
|
+
export function resetMermaidLoadState(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Check if Mermaid is currently available
|
|
27
|
+
*/
|
|
28
|
+
export function isMermaidAvailable(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Check if Mermaid loading has failed
|
|
31
|
+
*/
|
|
32
|
+
export function hasMermaidLoadFailed(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Process and render mermaid in a specific element
|
|
35
|
+
* @param {HTMLElement} element - Element to process
|
|
36
|
+
* @param {object} config - Mermaid configuration options
|
|
37
|
+
* @param {string} config.theme - Theme: 'dark' | 'light'
|
|
38
|
+
*/
|
|
39
|
+
export function processMermaidInElement(element: HTMLElement, config?: {
|
|
40
|
+
theme: string;
|
|
41
|
+
}): any;
|
|
42
|
+
/**
|
|
43
|
+
* Re-render a specific mermaid container
|
|
44
|
+
*/
|
|
45
|
+
export function rerenderMermaid(containerId: any): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Update diagram content and re-render
|
|
48
|
+
*/
|
|
49
|
+
export function updateMermaidDiagram(containerId: any, newDiagram: any): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Re-initialize Mermaid with new theme
|
|
52
|
+
* Call this when theme changes to re-render diagrams
|
|
53
|
+
* @param {object} config - Configuration options
|
|
54
|
+
* @param {string} config.theme - Theme: 'dark' | 'light'
|
|
55
|
+
*/
|
|
56
|
+
export function reinitializeMermaid(config?: {
|
|
57
|
+
theme: string;
|
|
58
|
+
}): Promise<any>;
|
|
59
|
+
declare namespace _default {
|
|
60
|
+
export { processMermaid };
|
|
61
|
+
export { createMermaidBlock };
|
|
62
|
+
export { initializeMermaid };
|
|
63
|
+
export { loadMermaid };
|
|
64
|
+
export { resetMermaidLoadState };
|
|
65
|
+
export { isMermaidAvailable };
|
|
66
|
+
export { hasMermaidLoadFailed };
|
|
67
|
+
export { processMermaidInElement };
|
|
68
|
+
export { rerenderMermaid };
|
|
69
|
+
export { updateMermaidDiagram };
|
|
70
|
+
export { reinitializeMermaid };
|
|
71
|
+
}
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process all social media URLs in HTML
|
|
3
|
+
* @param {string} html - HTML content to process
|
|
4
|
+
* @param {object} options - Processing options
|
|
5
|
+
* @param {string} options.theme - Theme: 'dark' | 'light'
|
|
6
|
+
*/
|
|
7
|
+
export function processSocialEmbeds(html: string, options?: {
|
|
8
|
+
theme: string;
|
|
9
|
+
}): string;
|
|
10
|
+
/**
|
|
11
|
+
* Create Twitter/X embed
|
|
12
|
+
* @param {string} username - Twitter username
|
|
13
|
+
* @param {string} tweetId - Tweet ID
|
|
14
|
+
* @param {string} theme - 'dark' | 'light'
|
|
15
|
+
*/
|
|
16
|
+
export function createTwitterEmbed(username: string, tweetId: string, theme?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Create Instagram post embed
|
|
19
|
+
* Note: Instagram embed doesn't support theme parameter
|
|
20
|
+
*/
|
|
21
|
+
export function createInstagramEmbed(postId: any): string;
|
|
22
|
+
/**
|
|
23
|
+
* Create Instagram reel embed
|
|
24
|
+
* Note: Instagram embed doesn't support theme parameter
|
|
25
|
+
*/
|
|
26
|
+
export function createInstagramReelEmbed(reelId: any): string;
|
|
27
|
+
/**
|
|
28
|
+
* Create TikTok embed
|
|
29
|
+
* Note: TikTok embed doesn't support theme parameter
|
|
30
|
+
*/
|
|
31
|
+
export function createTikTokEmbed(videoId: any): string;
|
|
32
|
+
/**
|
|
33
|
+
* Create LinkedIn embed
|
|
34
|
+
* Note: LinkedIn embed doesn't support theme parameter
|
|
35
|
+
*/
|
|
36
|
+
export function createLinkedInEmbed(postId: any, originalUrl: any): string;
|
|
37
|
+
/**
|
|
38
|
+
* Create Reddit embed
|
|
39
|
+
* Note: Reddit embed doesn't support theme parameter
|
|
40
|
+
*/
|
|
41
|
+
export function createRedditEmbed(subreddit: any, postId: any, originalUrl: any): string;
|
|
42
|
+
/**
|
|
43
|
+
* Create Facebook embed
|
|
44
|
+
* Note: Facebook embed doesn't support theme parameter
|
|
45
|
+
*/
|
|
46
|
+
export function createFacebookEmbed(url: any): string;
|
|
47
|
+
/**
|
|
48
|
+
* Create Pinterest embed
|
|
49
|
+
* Note: Pinterest embed doesn't support theme parameter
|
|
50
|
+
*/
|
|
51
|
+
export function createPinterestEmbed(pinId: any): string;
|
|
52
|
+
declare namespace _default {
|
|
53
|
+
export { processSocialEmbeds };
|
|
54
|
+
export { createTwitterEmbed };
|
|
55
|
+
export { createInstagramEmbed };
|
|
56
|
+
export { createInstagramReelEmbed };
|
|
57
|
+
export { createTikTokEmbed };
|
|
58
|
+
export { createLinkedInEmbed };
|
|
59
|
+
export { createRedditEmbed };
|
|
60
|
+
export { createFacebookEmbed };
|
|
61
|
+
export { createPinterestEmbed };
|
|
62
|
+
}
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process all tables in HTML to add enhanced functionality
|
|
3
|
+
*/
|
|
4
|
+
export function processTables(html: any): any;
|
|
5
|
+
/**
|
|
6
|
+
* Create enhanced table wrapper with controls
|
|
7
|
+
*/
|
|
8
|
+
export function createEnhancedTable(tableId: any, attrs: any, content: any): string;
|
|
9
|
+
/**
|
|
10
|
+
* Generate CSV from table data
|
|
11
|
+
*/
|
|
12
|
+
export function tableToCSV(tableElement: any): string;
|
|
13
|
+
/**
|
|
14
|
+
* Download CSV file
|
|
15
|
+
*/
|
|
16
|
+
export function downloadCSV(csv: any, filename?: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Copy table data to clipboard as tab-separated values
|
|
19
|
+
*/
|
|
20
|
+
export function copyTableToClipboard(tableElement: any): string;
|
|
21
|
+
/**
|
|
22
|
+
* Sort table by column
|
|
23
|
+
*/
|
|
24
|
+
export function sortTable(tableElement: any, colIndex: any, ascending?: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Filter table rows by search term
|
|
27
|
+
*/
|
|
28
|
+
export function filterTable(tableElement: any, searchTerm: any): number;
|
|
29
|
+
/**
|
|
30
|
+
* Initialize table interactivity (call this after DOM is ready)
|
|
31
|
+
*/
|
|
32
|
+
export function initializeTables(): void;
|
|
33
|
+
declare namespace _default {
|
|
34
|
+
export { processTables };
|
|
35
|
+
export { createEnhancedTable };
|
|
36
|
+
export { tableToCSV };
|
|
37
|
+
export { downloadCSV };
|
|
38
|
+
export { copyTableToClipboard };
|
|
39
|
+
export { sortTable };
|
|
40
|
+
export { filterTable };
|
|
41
|
+
export { initializeTables };
|
|
42
|
+
}
|
|
43
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a URL is a video URL (direct file or platform embed)
|
|
3
|
+
* @param {string} url - URL to check
|
|
4
|
+
* @returns {boolean} - True if URL is a video
|
|
5
|
+
*/
|
|
6
|
+
export function isVideoUrl(url: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Render video HTML from URL (used by marked renderer)
|
|
9
|
+
* Similar to renderImageHtml for images
|
|
10
|
+
* @param {string} url - Video URL
|
|
11
|
+
* @returns {string} - HTML string
|
|
12
|
+
*/
|
|
13
|
+
export function renderVideoHtml(url: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Process all video URLs in HTML
|
|
16
|
+
*/
|
|
17
|
+
export function processVideos(html: any): any;
|
|
18
|
+
/**
|
|
19
|
+
* Create HTML5 video player
|
|
20
|
+
*/
|
|
21
|
+
export function createVideoPlayer(videoUrl: any): string;
|
|
22
|
+
/**
|
|
23
|
+
* Create video with preview image (Pexels style)
|
|
24
|
+
*/
|
|
25
|
+
export function createVideoWithPreview(title: any, videoUrl: any, previewImage: any, alt: any): string;
|
|
26
|
+
/**
|
|
27
|
+
* Create lazy-loaded YouTube embed with thumbnail preview
|
|
28
|
+
*/
|
|
29
|
+
export function createYouTubeEmbed(videoId: any): string;
|
|
30
|
+
/**
|
|
31
|
+
* Create lazy-loaded Vimeo embed with thumbnail preview
|
|
32
|
+
*/
|
|
33
|
+
export function createVimeoEmbed(videoId: any): string;
|
|
34
|
+
/**
|
|
35
|
+
* Create lazy-loaded Loom embed with thumbnail preview
|
|
36
|
+
*/
|
|
37
|
+
export function createLoomEmbed(videoId: any): string;
|
|
38
|
+
/**
|
|
39
|
+
* Create lazy-loaded Dailymotion embed with thumbnail preview
|
|
40
|
+
*/
|
|
41
|
+
export function createDailymotionEmbed(videoId: any): string;
|
|
42
|
+
/**
|
|
43
|
+
* Process HTML to group consecutive videos into galleries
|
|
44
|
+
* Uses regex-based approach to handle single-line HTML
|
|
45
|
+
*/
|
|
46
|
+
export function processVideoGalleries(html: any): any;
|
|
47
|
+
/**
|
|
48
|
+
* Create a gallery wrapper for multiple videos with captions
|
|
49
|
+
*/
|
|
50
|
+
export function createVideoGallery(videoDataArray: any): string;
|
|
51
|
+
/**
|
|
52
|
+
* Initialize video facades - attach click handlers for lazy loading
|
|
53
|
+
*/
|
|
54
|
+
export function initializeVideoFacades(container?: Document): void;
|
|
55
|
+
declare namespace _default {
|
|
56
|
+
export { isVideoUrl };
|
|
57
|
+
export { renderVideoHtml };
|
|
58
|
+
export { processVideos };
|
|
59
|
+
export { processVideoGalleries };
|
|
60
|
+
export { createVideoPlayer };
|
|
61
|
+
export { createVideoWithPreview };
|
|
62
|
+
export { createVideoGallery };
|
|
63
|
+
export { createYouTubeEmbed };
|
|
64
|
+
export { createVimeoEmbed };
|
|
65
|
+
export { createLoomEmbed };
|
|
66
|
+
export { createDailymotionEmbed };
|
|
67
|
+
export { initializeVideoFacades };
|
|
68
|
+
}
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create state manager
|
|
3
|
+
*/
|
|
4
|
+
export function createState(): {
|
|
5
|
+
getState: () => {
|
|
6
|
+
artifacts: any[];
|
|
7
|
+
activeArtifactId: any;
|
|
8
|
+
isPanelOpen: boolean;
|
|
9
|
+
viewMode: string;
|
|
10
|
+
isFullscreen: boolean;
|
|
11
|
+
};
|
|
12
|
+
subscribe: (callback: any) => () => void;
|
|
13
|
+
addArtifact: (artifact: any) => void;
|
|
14
|
+
addArtifacts: (artifacts: any) => void;
|
|
15
|
+
removeArtifact: (artifactId: any) => void;
|
|
16
|
+
getArtifact: (artifactId: any) => any;
|
|
17
|
+
getActiveArtifact: () => any;
|
|
18
|
+
getArtifactsByMessageId: (messageId: any) => any[];
|
|
19
|
+
getArtifactsByType: (type: any) => any[];
|
|
20
|
+
getArtifactCount: () => number;
|
|
21
|
+
setActiveArtifact: (artifactId: any) => void;
|
|
22
|
+
clearActiveArtifact: () => void;
|
|
23
|
+
setPanelOpen: (isOpen: any) => void;
|
|
24
|
+
setViewMode: (mode: any) => void;
|
|
25
|
+
setFullscreen: (isFullscreen: any) => void;
|
|
26
|
+
clear: () => void;
|
|
27
|
+
batch: (updateFn: any) => void;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Create a reactive state (for frameworks that need reactivity)
|
|
31
|
+
*/
|
|
32
|
+
export function createReactiveState(reactivityFn: any): any;
|
|
33
|
+
declare namespace _default {
|
|
34
|
+
export { createState };
|
|
35
|
+
export { createReactiveState };
|
|
36
|
+
}
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert hex color to RGB string
|
|
3
|
+
* Accepts: '#rgb', '#rrggbb', 'rgb', 'rrggbb'
|
|
4
|
+
* Returns: 'r, g, b' string for CSS variables
|
|
5
|
+
*/
|
|
6
|
+
export function hexToRgb(hex: any): string;
|
|
7
|
+
/**
|
|
8
|
+
* Convert RGB string to hex
|
|
9
|
+
* Accepts: 'r, g, b' or 'r,g,b'
|
|
10
|
+
* Returns: '#rrggbb'
|
|
11
|
+
*/
|
|
12
|
+
export function rgbToHex(rgb: any): string;
|
|
13
|
+
/**
|
|
14
|
+
* Normalize color to RGB string
|
|
15
|
+
* Accepts hex or RGB, returns RGB string
|
|
16
|
+
*/
|
|
17
|
+
export function normalizeColor(color: any): string;
|
|
18
|
+
/**
|
|
19
|
+
* Create theme manager
|
|
20
|
+
*
|
|
21
|
+
* @param {string} initialTheme - 'dark' | 'light' | 'auto'
|
|
22
|
+
* @param {object} customColors - Custom colors (hex or RGB format accepted)
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Both formats work:
|
|
26
|
+
* createTheme('dark', { primary: '#6366f1' })
|
|
27
|
+
* createTheme('dark', { primary: '99, 102, 241' })
|
|
28
|
+
*/
|
|
29
|
+
export function createTheme(initialTheme?: string, customColors?: object): {
|
|
30
|
+
readonly current: string;
|
|
31
|
+
readonly resolved: string;
|
|
32
|
+
readonly colors: any;
|
|
33
|
+
getResolvedTheme: () => string;
|
|
34
|
+
getColors: () => any;
|
|
35
|
+
getCSSVariables: () => string;
|
|
36
|
+
getCSS: () => string;
|
|
37
|
+
apply: (container?: HTMLElement) => void;
|
|
38
|
+
set: (theme: any) => void;
|
|
39
|
+
toggle: () => void;
|
|
40
|
+
setColors: (newColors: any, theme?: any) => void;
|
|
41
|
+
watchSystemTheme: (callback: any) => () => void;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Inject theme CSS into document
|
|
45
|
+
*/
|
|
46
|
+
export function injectThemeCSS(theme: any): void;
|
|
47
|
+
export namespace DEFAULT_COLORS {
|
|
48
|
+
namespace dark {
|
|
49
|
+
let primary: string;
|
|
50
|
+
let primaryHover: string;
|
|
51
|
+
let background: string;
|
|
52
|
+
let surface: string;
|
|
53
|
+
let surfaceHover: string;
|
|
54
|
+
let text: string;
|
|
55
|
+
let textSecondary: string;
|
|
56
|
+
let textMuted: string;
|
|
57
|
+
let border: string;
|
|
58
|
+
let borderLight: string;
|
|
59
|
+
let success: string;
|
|
60
|
+
let warning: string;
|
|
61
|
+
let error: string;
|
|
62
|
+
let info: string;
|
|
63
|
+
let gradient: string;
|
|
64
|
+
let gradientOpacity: string;
|
|
65
|
+
}
|
|
66
|
+
namespace light {
|
|
67
|
+
let primary_1: string;
|
|
68
|
+
export { primary_1 as primary };
|
|
69
|
+
let primaryHover_1: string;
|
|
70
|
+
export { primaryHover_1 as primaryHover };
|
|
71
|
+
let background_1: string;
|
|
72
|
+
export { background_1 as background };
|
|
73
|
+
let surface_1: string;
|
|
74
|
+
export { surface_1 as surface };
|
|
75
|
+
let surfaceHover_1: string;
|
|
76
|
+
export { surfaceHover_1 as surfaceHover };
|
|
77
|
+
let text_1: string;
|
|
78
|
+
export { text_1 as text };
|
|
79
|
+
let textSecondary_1: string;
|
|
80
|
+
export { textSecondary_1 as textSecondary };
|
|
81
|
+
let textMuted_1: string;
|
|
82
|
+
export { textMuted_1 as textMuted };
|
|
83
|
+
let border_1: string;
|
|
84
|
+
export { border_1 as border };
|
|
85
|
+
let borderLight_1: string;
|
|
86
|
+
export { borderLight_1 as borderLight };
|
|
87
|
+
let success_1: string;
|
|
88
|
+
export { success_1 as success };
|
|
89
|
+
let warning_1: string;
|
|
90
|
+
export { warning_1 as warning };
|
|
91
|
+
let error_1: string;
|
|
92
|
+
export { error_1 as error };
|
|
93
|
+
let info_1: string;
|
|
94
|
+
export { info_1 as info };
|
|
95
|
+
let gradient_1: string;
|
|
96
|
+
export { gradient_1 as gradient };
|
|
97
|
+
let gradientOpacity_1: string;
|
|
98
|
+
export { gradientOpacity_1 as gradientOpacity };
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
declare namespace _default {
|
|
102
|
+
export { DEFAULT_COLORS };
|
|
103
|
+
export { createTheme };
|
|
104
|
+
export { injectThemeCSS };
|
|
105
|
+
export { hexToRgb };
|
|
106
|
+
export { rgbToHex };
|
|
107
|
+
export { normalizeColor };
|
|
108
|
+
}
|
|
109
|
+
export default _default;
|