artifactuse 0.1.25 → 0.1.28
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 +60 -1
- package/dist/core/detector.d.ts +5 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/{index-Bzk5VnG1.js → index-D56xsAnF.js} +1484 -1411
- package/dist/index.js +1 -1
- package/dist/react/ArtifactuseAgentMessage.d.ts +9 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +863 -803
- package/dist/styles/artifactuse.css +1 -0
- package/dist/styles/components/inline-preview.css +69 -0
- package/dist/styles/components/message.css +7 -1
- package/dist/styles/components/panel.css +18 -0
- package/dist/svelte/index.d.ts +6 -6
- package/dist/svelte/index.js +1909 -1868
- package/dist/vue/index.d.ts +4 -4
- package/dist/vue/index.js +1230 -1169
- package/dist/vue2/composables.d.ts +4 -4
- package/dist/vue2/index.js +265 -27
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* artifactuse/styles/components/inline-preview.css
|
|
2
|
+
* Inline preview for extracted code blocks
|
|
3
|
+
* Shows truncated code with click-to-open-panel behavior
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.artifactuse-inline-preview {
|
|
7
|
+
position: relative;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
margin: 1em 0;
|
|
12
|
+
transition: box-shadow 0.2s;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.artifactuse-inline-preview:hover {
|
|
16
|
+
box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.artifactuse-inline-preview pre {
|
|
20
|
+
margin: 0 !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.artifactuse-inline-preview__fade {
|
|
24
|
+
position: absolute;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
height: 72px;
|
|
29
|
+
background: linear-gradient(transparent, var(--artifactuse-code-bg, #2d2d2d));
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: flex-end;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
padding-bottom: 12px;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.artifactuse-inline-preview__action {
|
|
38
|
+
pointer-events: auto;
|
|
39
|
+
background: rgba(255, 255, 255, 0.08);
|
|
40
|
+
padding: 4px 14px;
|
|
41
|
+
border-radius: 4px;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
font-family: system-ui, sans-serif;
|
|
44
|
+
color: rgba(255, 255, 255, 0.5);
|
|
45
|
+
transition: all 0.15s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.artifactuse-inline-preview:hover .artifactuse-inline-preview__action {
|
|
49
|
+
background: rgba(99, 102, 241, 0.25);
|
|
50
|
+
color: #818cf8;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Smartdiff: deleted/inserted line backgrounds */
|
|
54
|
+
.artifactuse-inline-preview .token.deleted {
|
|
55
|
+
background: #503535;
|
|
56
|
+
display: block;
|
|
57
|
+
white-space: pre-wrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.artifactuse-inline-preview .token.inserted {
|
|
61
|
+
background: #303e11;
|
|
62
|
+
display: block;
|
|
63
|
+
white-space: pre-wrap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.artifactuse-inline-preview [data-smartdiff-processed] {
|
|
67
|
+
display: inline-table;
|
|
68
|
+
width: 100%;
|
|
69
|
+
}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
border-radius: 4px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.artifactuse-message-content pre {
|
|
67
|
+
.artifactuse-message-content pre:not(.artifactuse-inline-preview__pre) {
|
|
68
68
|
margin: 1em 0;
|
|
69
69
|
padding: 1em;
|
|
70
70
|
background: rgb(var(--artifactuse-surface));
|
|
@@ -75,6 +75,12 @@
|
|
|
75
75
|
overflow-x: auto;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/* Let Prism theme style language-tagged code blocks (used by inlineCode) */
|
|
79
|
+
.artifactuse-message-content pre[class*="language-"]:not(.artifactuse-inline-preview__pre) {
|
|
80
|
+
background: var(--artifactuse-code-bg, #2d2d2d);
|
|
81
|
+
color: #ccc;
|
|
82
|
+
}
|
|
83
|
+
|
|
78
84
|
.artifactuse-message-content pre code {
|
|
79
85
|
padding: 0;
|
|
80
86
|
background: none;
|
|
@@ -636,6 +636,24 @@
|
|
|
636
636
|
overflow: visible;
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
+
/* Smartdiff: deleted/inserted line backgrounds in code pane */
|
|
640
|
+
.artifactuse-panel__code-block .token.deleted {
|
|
641
|
+
background: #503535;
|
|
642
|
+
display: block;
|
|
643
|
+
white-space: pre-wrap;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.artifactuse-panel__code-block .token.inserted {
|
|
647
|
+
background: #303e11;
|
|
648
|
+
display: block;
|
|
649
|
+
white-space: pre-wrap;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.artifactuse-panel__code-block .language-smartdiff {
|
|
653
|
+
display: inline-table;
|
|
654
|
+
width: 100%;
|
|
655
|
+
}
|
|
656
|
+
|
|
639
657
|
/* Edit pane (CodeMirror) */
|
|
640
658
|
.artifactuse-panel__edit {
|
|
641
659
|
flex: 1;
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export function createArtifactuseStores(config?: {
|
|
|
66
66
|
isFullscreen: boolean;
|
|
67
67
|
};
|
|
68
68
|
subscribe: (callback: any) => () => void;
|
|
69
|
-
processMessage: (content: any, messageId: any) => {
|
|
69
|
+
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
70
70
|
html: string | Promise<string>;
|
|
71
71
|
artifacts: any[];
|
|
72
72
|
};
|
|
@@ -181,7 +181,7 @@ export function createArtifactuseStores(config?: {
|
|
|
181
181
|
hasArtifacts: import("svelte/store").Readable<boolean>;
|
|
182
182
|
panelTypes: import("svelte/store").Writable<any>;
|
|
183
183
|
activePanelUrl: import("svelte/store").Readable<any>;
|
|
184
|
-
processMessage: (content: any, messageId: any) => {
|
|
184
|
+
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
185
185
|
html: string | Promise<string>;
|
|
186
186
|
artifacts: any[];
|
|
187
187
|
};
|
|
@@ -284,7 +284,7 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
284
284
|
isFullscreen: boolean;
|
|
285
285
|
};
|
|
286
286
|
subscribe: (callback: any) => () => void;
|
|
287
|
-
processMessage: (content: any, messageId: any) => {
|
|
287
|
+
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
288
288
|
html: string | Promise<string>;
|
|
289
289
|
artifacts: any[];
|
|
290
290
|
};
|
|
@@ -399,7 +399,7 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
399
399
|
hasArtifacts: import("svelte/store").Readable<boolean>;
|
|
400
400
|
panelTypes: import("svelte/store").Writable<any>;
|
|
401
401
|
activePanelUrl: import("svelte/store").Readable<any>;
|
|
402
|
-
processMessage: (content: any, messageId: any) => {
|
|
402
|
+
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
403
403
|
html: string | Promise<string>;
|
|
404
404
|
artifacts: any[];
|
|
405
405
|
};
|
|
@@ -495,7 +495,7 @@ export function useArtifactuse(config?: {}): {
|
|
|
495
495
|
isFullscreen: boolean;
|
|
496
496
|
};
|
|
497
497
|
subscribe: (callback: any) => () => void;
|
|
498
|
-
processMessage: (content: any, messageId: any) => {
|
|
498
|
+
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
499
499
|
html: string | Promise<string>;
|
|
500
500
|
artifacts: any[];
|
|
501
501
|
};
|
|
@@ -610,7 +610,7 @@ export function useArtifactuse(config?: {}): {
|
|
|
610
610
|
hasArtifacts: import("svelte/store").Readable<boolean>;
|
|
611
611
|
panelTypes: import("svelte/store").Writable<any>;
|
|
612
612
|
activePanelUrl: import("svelte/store").Readable<any>;
|
|
613
|
-
processMessage: (content: any, messageId: any) => {
|
|
613
|
+
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
614
614
|
html: string | Promise<string>;
|
|
615
615
|
artifacts: any[];
|
|
616
616
|
};
|