artifactuse 0.2.3 → 0.2.5
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 +5 -1
- package/dist/core/index.d.ts +1 -14
- package/dist/{index-B4BEvWtI.js → index-W575iBkm.js} +1106 -1106
- package/dist/index.js +1 -1
- package/dist/react/ArtifactusePanel.d.ts +2 -1
- package/dist/react/index.js +816 -802
- package/dist/svelte/index.d.ts +6 -84
- package/dist/svelte/index.js +1751 -1730
- package/dist/vue/index.d.ts +4 -56
- package/dist/vue/index.js +692 -666
- package/dist/vue2/composables.d.ts +4 -56
- package/dist/vue2/index.js +250 -137
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -664,6 +664,9 @@ provideArtifactuse({
|
|
|
664
664
|
languages: ['css', 'bash', 'sql'], // or true for all
|
|
665
665
|
},
|
|
666
666
|
|
|
667
|
+
// Show "Open in new tab" button in panel header (default: false)
|
|
668
|
+
externalPreview: false,
|
|
669
|
+
|
|
667
670
|
// Show clickable artifact cards inline (default: true)
|
|
668
671
|
inlineCards: true,
|
|
669
672
|
|
|
@@ -822,6 +825,7 @@ openFile('utils.py', code, {
|
|
|
822
825
|
| `options.viewMode` | `string` | No | Initial view mode |
|
|
823
826
|
| `options.language` | `string` | No | Override auto-detected language |
|
|
824
827
|
| `options.panelUrl` | `string` | No | Custom iframe URL (bypasses panel registry) |
|
|
828
|
+
| `options.externalPreview` | `boolean` | No | Show "Open in new tab" button in panel header |
|
|
825
829
|
|
|
826
830
|
### openCode
|
|
827
831
|
|
|
@@ -838,7 +842,7 @@ openCode(pythonCode, 'python', { title: 'My Script', tabs: ['code', 'edit'] });
|
|
|
838
842
|
|-----------|------|----------|-------------|
|
|
839
843
|
| `code` | `string` | Yes | The code content |
|
|
840
844
|
| `language` | `string` | Yes | Language identifier (e.g. `'javascript'`, `'python'`, `'html'`) |
|
|
841
|
-
| `options` | `object` | No | Same options as `openFile` |
|
|
845
|
+
| `options` | `object` | No | Same options as `openFile` (including `externalPreview`) |
|
|
842
846
|
|
|
843
847
|
> **Note:** If the language has no registered panel, it falls back to `txt` (plain text) in the code panel.
|
|
844
848
|
|
package/dist/core/index.d.ts
CHANGED
|
@@ -53,20 +53,7 @@ export function createArtifactuse(userConfig?: {}): {
|
|
|
53
53
|
};
|
|
54
54
|
initializeContent: (container?: Document) => Promise<void>;
|
|
55
55
|
openArtifact: (artifact: any) => void;
|
|
56
|
-
openFile: (filename: any, code: any, options?: {}) =>
|
|
57
|
-
id: string;
|
|
58
|
-
messageId: string;
|
|
59
|
-
type: string;
|
|
60
|
-
language: string;
|
|
61
|
-
title: any;
|
|
62
|
-
code: string;
|
|
63
|
-
isInline: boolean;
|
|
64
|
-
isPreviewable: boolean;
|
|
65
|
-
isPanelArtifact: boolean;
|
|
66
|
-
size: number;
|
|
67
|
-
lineCount: number;
|
|
68
|
-
createdAt: string;
|
|
69
|
-
};
|
|
56
|
+
openFile: (filename: any, code: any, options?: {}) => any;
|
|
70
57
|
openCode: (code: any, language: any, options?: {}) => {
|
|
71
58
|
id: string;
|
|
72
59
|
messageId: string;
|