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,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArtifactuseAgentMessage Component
|
|
3
|
+
* Renders AI agent message content with inline artifacts
|
|
4
|
+
*/
|
|
5
|
+
declare function ArtifactuseAgentMessage({ content, messageId, inlineCards, typing, isLastMessage, onArtifactDetected, onArtifactOpen, onArtifactCopy, onArtifactDownload, onFormSubmit, onFormCancel, onFormButtonClick, onSocialCopy, onMediaOpen, className, }: {
|
|
6
|
+
content: any;
|
|
7
|
+
messageId?: string;
|
|
8
|
+
inlineCards?: boolean;
|
|
9
|
+
typing?: boolean;
|
|
10
|
+
isLastMessage?: boolean;
|
|
11
|
+
onArtifactDetected: any;
|
|
12
|
+
onArtifactOpen: any;
|
|
13
|
+
onArtifactCopy: any;
|
|
14
|
+
onArtifactDownload: any;
|
|
15
|
+
onFormSubmit: any;
|
|
16
|
+
onFormCancel: any;
|
|
17
|
+
onFormButtonClick: any;
|
|
18
|
+
onSocialCopy: any;
|
|
19
|
+
onMediaOpen: any;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): any;
|
|
22
|
+
declare namespace ArtifactuseAgentMessage {
|
|
23
|
+
namespace propTypes {
|
|
24
|
+
function content(props: any, propName: any): Error;
|
|
25
|
+
function messageId(props: any, propName: any): Error;
|
|
26
|
+
function inlineCards(props: any, propName: any): Error;
|
|
27
|
+
function typing(props: any, propName: any): Error;
|
|
28
|
+
function isLastMessage(props: any, propName: any): Error;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export default ArtifactuseAgentMessage;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArtifactuseCard Component
|
|
3
|
+
*
|
|
4
|
+
* Displays an artifact as a sleek, compact card
|
|
5
|
+
*/
|
|
6
|
+
export default function ArtifactuseCard({ artifact, isActive, onOpen, onCopy, onDownload, className, }: {
|
|
7
|
+
artifact: any;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
onOpen: any;
|
|
10
|
+
onCopy: any;
|
|
11
|
+
onDownload: any;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline Form Component
|
|
3
|
+
* Renders buttons or simple field forms inline in the chat
|
|
4
|
+
*/
|
|
5
|
+
export function ArtifactuseInlineForm({ artifact, onSubmit, onCancel, onReset, onButtonClick, className, theme, accent, initialState, }: {
|
|
6
|
+
artifact: any;
|
|
7
|
+
onSubmit: any;
|
|
8
|
+
onCancel: any;
|
|
9
|
+
onReset: any;
|
|
10
|
+
onButtonClick: any;
|
|
11
|
+
className?: string;
|
|
12
|
+
theme?: string;
|
|
13
|
+
accent?: any;
|
|
14
|
+
initialState?: string;
|
|
15
|
+
}): any;
|
|
16
|
+
export default ArtifactuseInlineForm;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArtifactusePanel Component
|
|
3
|
+
*
|
|
4
|
+
* Side panel for viewing artifact previews and code
|
|
5
|
+
* Flex-based layout - should be a sibling to main content area
|
|
6
|
+
*/
|
|
7
|
+
export default function ArtifactusePanel({ onAIRequest, onSave, onExport, className, }: {
|
|
8
|
+
onAIRequest: any;
|
|
9
|
+
onSave: any;
|
|
10
|
+
onExport: any;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArtifactuseViewer Component
|
|
3
|
+
*
|
|
4
|
+
* Fullscreen viewer for images and PDFs with zoom and download
|
|
5
|
+
*/
|
|
6
|
+
export default function ArtifactuseViewer({ isOpen, type, src, alt, caption, onClose, className, }: {
|
|
7
|
+
isOpen?: boolean;
|
|
8
|
+
type?: string;
|
|
9
|
+
src?: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
caption?: string;
|
|
12
|
+
onClose: any;
|
|
13
|
+
className?: string;
|
|
14
|
+
}): any;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifactuse Provider Component
|
|
3
|
+
*
|
|
4
|
+
* @param {object} props
|
|
5
|
+
* @param {React.ReactNode} props.children - Child components
|
|
6
|
+
* @param {object} props.config - Configuration options
|
|
7
|
+
* @param {string} props.config.cdnUrl - Base CDN URL for panels
|
|
8
|
+
* @param {object} props.config.panels - Panel configuration (add/override/disable)
|
|
9
|
+
* @param {string} props.config.theme - Theme: 'dark' | 'light' | 'auto'
|
|
10
|
+
* @param {object} props.config.colors - Custom theme colors
|
|
11
|
+
* @param {object} props.config.processors - Enable/disable processors
|
|
12
|
+
* @param {boolean} props.config.branding - Show branding
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // Basic usage
|
|
16
|
+
* <ArtifactuseProvider>
|
|
17
|
+
* <App />
|
|
18
|
+
* </ArtifactuseProvider>
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // With custom panels
|
|
22
|
+
* <ArtifactuseProvider config={{
|
|
23
|
+
* panels: {
|
|
24
|
+
* 'chart': 'chart-panel',
|
|
25
|
+
* 'video': 'https://my-cdn.com/video-panel',
|
|
26
|
+
* 'canvas': null, // disable
|
|
27
|
+
* }
|
|
28
|
+
* }}>
|
|
29
|
+
* <App />
|
|
30
|
+
* </ArtifactuseProvider>
|
|
31
|
+
*/
|
|
32
|
+
export function ArtifactuseProvider({ children, config }: {
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
config: {
|
|
35
|
+
cdnUrl: string;
|
|
36
|
+
panels: object;
|
|
37
|
+
theme: string;
|
|
38
|
+
colors: object;
|
|
39
|
+
processors: object;
|
|
40
|
+
branding: boolean;
|
|
41
|
+
};
|
|
42
|
+
}): any;
|
|
43
|
+
/**
|
|
44
|
+
* useArtifactuse Hook
|
|
45
|
+
*/
|
|
46
|
+
export function useArtifactuse(): any;
|
|
47
|
+
/**
|
|
48
|
+
* Custom hook for event subscription
|
|
49
|
+
*/
|
|
50
|
+
export function useArtifactuseEvent(event: any, callback: any): void;
|
|
51
|
+
/**
|
|
52
|
+
* Custom hook for panel management
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* const { register, unregister, isRegistered, types } = usePanelRegistry();
|
|
56
|
+
*
|
|
57
|
+
* // Register a custom panel
|
|
58
|
+
* register('chart', 'https://charts.example.com/panel');
|
|
59
|
+
*/
|
|
60
|
+
export function usePanelRegistry(): {
|
|
61
|
+
register: any;
|
|
62
|
+
unregister: any;
|
|
63
|
+
isRegistered: any;
|
|
64
|
+
getPanelUrl: any;
|
|
65
|
+
types: any;
|
|
66
|
+
defaults: {
|
|
67
|
+
form: string;
|
|
68
|
+
video: string;
|
|
69
|
+
videoeditor: string;
|
|
70
|
+
timeline: string;
|
|
71
|
+
canvas: string;
|
|
72
|
+
whiteboard: string;
|
|
73
|
+
drawing: string;
|
|
74
|
+
json: string;
|
|
75
|
+
svg: string;
|
|
76
|
+
diff: string;
|
|
77
|
+
patch: string;
|
|
78
|
+
javascript: string;
|
|
79
|
+
js: string;
|
|
80
|
+
python: string;
|
|
81
|
+
py: string;
|
|
82
|
+
jsx: string;
|
|
83
|
+
react: string;
|
|
84
|
+
vue: string;
|
|
85
|
+
html: string;
|
|
86
|
+
htm: string;
|
|
87
|
+
markdown: string;
|
|
88
|
+
md: string;
|
|
89
|
+
mermaid: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export { DEFAULT_PANELS };
|
|
93
|
+
export { default as ArtifactuseAgentMessage } from "./ArtifactuseAgentMessage.jsx";
|
|
94
|
+
export { default as ArtifactusePanel } from "./ArtifactusePanel.jsx";
|
|
95
|
+
export { default as ArtifactusePanelToggle } from "./ArtifactusePanelToggle.jsx";
|
|
96
|
+
export { default as ArtifactuseCard } from "./ArtifactuseCard.jsx";
|
|
97
|
+
export { default as ArtifactuseViewer } from "./ArtifactuseViewer.jsx";
|
|
98
|
+
export { default as ArtifactuseInlineForm } from "./ArtifactuseInlineForm.jsx";
|
|
99
|
+
export { default as ArtifactuseSocialPreview } from "./ArtifactuseSocialPreview.jsx";
|
|
100
|
+
declare namespace _default {
|
|
101
|
+
export { ArtifactuseProvider };
|
|
102
|
+
export { useArtifactuse };
|
|
103
|
+
export { useArtifactuseEvent };
|
|
104
|
+
export { usePanelRegistry };
|
|
105
|
+
export { DEFAULT_PANELS };
|
|
106
|
+
}
|
|
107
|
+
export default _default;
|
|
108
|
+
import { DEFAULT_PANELS } from '../core/index.js';
|