artifactuse 0.1.21 → 0.1.22
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 +90 -2
- package/dist/core/detector.d.ts +27 -0
- package/dist/core/editor.d.ts +13 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/{index-ZmmxlD3v.js → index-CQXV7Rft.js} +1552 -1185
- package/dist/index.js +89 -88
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +739 -699
- package/dist/styles/components/panel.css +30 -2
- package/dist/svelte/index.d.ts +171 -0
- package/dist/svelte/index.js +1844 -1761
- package/dist/vue/index.d.ts +114 -0
- package/dist/vue/index.js +1375 -1304
- package/dist/vue2/composables.d.ts +114 -0
- package/dist/vue2/index.js +817 -123
- package/package.json +33 -1
|
@@ -227,7 +227,8 @@
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
.artifactuse-panel__content--preview .artifactuse-panel__preview,
|
|
230
|
-
.artifactuse-panel__content--code .artifactuse-panel__code
|
|
230
|
+
.artifactuse-panel__content--code .artifactuse-panel__code,
|
|
231
|
+
.artifactuse-panel__content--edit .artifactuse-panel__edit {
|
|
231
232
|
width: 100%;
|
|
232
233
|
}
|
|
233
234
|
|
|
@@ -489,7 +490,8 @@
|
|
|
489
490
|
|
|
490
491
|
/* Hide content panes during transition to prevent visual glitch */
|
|
491
492
|
.artifactuse-panel__content--transitioning > .artifactuse-panel__preview,
|
|
492
|
-
.artifactuse-panel__content--transitioning > .artifactuse-panel__code
|
|
493
|
+
.artifactuse-panel__content--transitioning > .artifactuse-panel__code,
|
|
494
|
+
.artifactuse-panel__content--transitioning > .artifactuse-panel__edit {
|
|
493
495
|
visibility: hidden;
|
|
494
496
|
}
|
|
495
497
|
|
|
@@ -634,6 +636,32 @@
|
|
|
634
636
|
overflow: visible;
|
|
635
637
|
}
|
|
636
638
|
|
|
639
|
+
/* Edit pane (CodeMirror) */
|
|
640
|
+
.artifactuse-panel__edit {
|
|
641
|
+
flex: 1;
|
|
642
|
+
overflow: hidden;
|
|
643
|
+
display: flex;
|
|
644
|
+
flex-direction: column;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.artifactuse-panel__editor-container {
|
|
648
|
+
flex: 1;
|
|
649
|
+
overflow: auto;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.artifactuse-panel__editor-container .cm-editor {
|
|
653
|
+
height: 100%;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/* Save action button */
|
|
657
|
+
.artifactuse-panel__action--save {
|
|
658
|
+
color: rgb(var(--artifactuse-accent, 99, 102, 241));
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.artifactuse-panel__action--save:hover {
|
|
662
|
+
background: rgba(var(--artifactuse-accent, 99, 102, 241), 0.1);
|
|
663
|
+
}
|
|
664
|
+
|
|
637
665
|
/* Footer */
|
|
638
666
|
.artifactuse-panel__footer {
|
|
639
667
|
display: flex;
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -72,6 +72,34 @@ export function createArtifactuseStores(config?: {
|
|
|
72
72
|
};
|
|
73
73
|
initializeContent: (container?: Document) => Promise<void>;
|
|
74
74
|
openArtifact: (artifact: any) => void;
|
|
75
|
+
openFile: (filename: any, code: any, options?: {}) => {
|
|
76
|
+
id: string;
|
|
77
|
+
messageId: string;
|
|
78
|
+
type: string;
|
|
79
|
+
language: string;
|
|
80
|
+
title: any;
|
|
81
|
+
code: string;
|
|
82
|
+
isInline: boolean;
|
|
83
|
+
isPreviewable: boolean;
|
|
84
|
+
isPanelArtifact: boolean;
|
|
85
|
+
size: number;
|
|
86
|
+
lineCount: number;
|
|
87
|
+
createdAt: string;
|
|
88
|
+
};
|
|
89
|
+
openCode: (code: any, language: any, options?: {}) => {
|
|
90
|
+
id: string;
|
|
91
|
+
messageId: string;
|
|
92
|
+
type: string;
|
|
93
|
+
language: string;
|
|
94
|
+
title: any;
|
|
95
|
+
code: string;
|
|
96
|
+
isInline: boolean;
|
|
97
|
+
isPreviewable: boolean;
|
|
98
|
+
isPanelArtifact: boolean;
|
|
99
|
+
size: number;
|
|
100
|
+
lineCount: number;
|
|
101
|
+
createdAt: string;
|
|
102
|
+
};
|
|
75
103
|
closePanel: () => void;
|
|
76
104
|
togglePanel: () => void;
|
|
77
105
|
toggleFullscreen: () => void;
|
|
@@ -103,6 +131,7 @@ export function createArtifactuseStores(config?: {
|
|
|
103
131
|
on: (event: any, callback: any) => () => void;
|
|
104
132
|
off: (event: any, callback: any) => void;
|
|
105
133
|
emit: (event: any, data: any) => void;
|
|
134
|
+
editor: any;
|
|
106
135
|
bridge: {
|
|
107
136
|
setIframe: (iframe: any) => void;
|
|
108
137
|
send: (action: string, data: any, requestId?: string, targetOrigin?: string) => string;
|
|
@@ -157,6 +186,34 @@ export function createArtifactuseStores(config?: {
|
|
|
157
186
|
};
|
|
158
187
|
initializeContent: (container?: Document) => Promise<void>;
|
|
159
188
|
openArtifact: (artifact: any) => void;
|
|
189
|
+
openFile: (filename: any, code: any, options?: {}) => {
|
|
190
|
+
id: string;
|
|
191
|
+
messageId: string;
|
|
192
|
+
type: string;
|
|
193
|
+
language: string;
|
|
194
|
+
title: any;
|
|
195
|
+
code: string;
|
|
196
|
+
isInline: boolean;
|
|
197
|
+
isPreviewable: boolean;
|
|
198
|
+
isPanelArtifact: boolean;
|
|
199
|
+
size: number;
|
|
200
|
+
lineCount: number;
|
|
201
|
+
createdAt: string;
|
|
202
|
+
};
|
|
203
|
+
openCode: (code: any, language: any, options?: {}) => {
|
|
204
|
+
id: string;
|
|
205
|
+
messageId: string;
|
|
206
|
+
type: string;
|
|
207
|
+
language: string;
|
|
208
|
+
title: any;
|
|
209
|
+
code: string;
|
|
210
|
+
isInline: boolean;
|
|
211
|
+
isPreviewable: boolean;
|
|
212
|
+
isPanelArtifact: boolean;
|
|
213
|
+
size: number;
|
|
214
|
+
lineCount: number;
|
|
215
|
+
createdAt: string;
|
|
216
|
+
};
|
|
160
217
|
closePanel: () => void;
|
|
161
218
|
togglePanel: () => void;
|
|
162
219
|
toggleFullscreen: () => void;
|
|
@@ -231,6 +288,34 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
231
288
|
};
|
|
232
289
|
initializeContent: (container?: Document) => Promise<void>;
|
|
233
290
|
openArtifact: (artifact: any) => void;
|
|
291
|
+
openFile: (filename: any, code: any, options?: {}) => {
|
|
292
|
+
id: string;
|
|
293
|
+
messageId: string;
|
|
294
|
+
type: string;
|
|
295
|
+
language: string;
|
|
296
|
+
title: any;
|
|
297
|
+
code: string;
|
|
298
|
+
isInline: boolean;
|
|
299
|
+
isPreviewable: boolean;
|
|
300
|
+
isPanelArtifact: boolean;
|
|
301
|
+
size: number;
|
|
302
|
+
lineCount: number;
|
|
303
|
+
createdAt: string;
|
|
304
|
+
};
|
|
305
|
+
openCode: (code: any, language: any, options?: {}) => {
|
|
306
|
+
id: string;
|
|
307
|
+
messageId: string;
|
|
308
|
+
type: string;
|
|
309
|
+
language: string;
|
|
310
|
+
title: any;
|
|
311
|
+
code: string;
|
|
312
|
+
isInline: boolean;
|
|
313
|
+
isPreviewable: boolean;
|
|
314
|
+
isPanelArtifact: boolean;
|
|
315
|
+
size: number;
|
|
316
|
+
lineCount: number;
|
|
317
|
+
createdAt: string;
|
|
318
|
+
};
|
|
234
319
|
closePanel: () => void;
|
|
235
320
|
togglePanel: () => void;
|
|
236
321
|
toggleFullscreen: () => void;
|
|
@@ -262,6 +347,7 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
262
347
|
on: (event: any, callback: any) => () => void;
|
|
263
348
|
off: (event: any, callback: any) => void;
|
|
264
349
|
emit: (event: any, data: any) => void;
|
|
350
|
+
editor: any;
|
|
265
351
|
bridge: {
|
|
266
352
|
setIframe: (iframe: any) => void;
|
|
267
353
|
send: (action: string, data: any, requestId?: string, targetOrigin?: string) => string;
|
|
@@ -316,6 +402,34 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
316
402
|
};
|
|
317
403
|
initializeContent: (container?: Document) => Promise<void>;
|
|
318
404
|
openArtifact: (artifact: any) => void;
|
|
405
|
+
openFile: (filename: any, code: any, options?: {}) => {
|
|
406
|
+
id: string;
|
|
407
|
+
messageId: string;
|
|
408
|
+
type: string;
|
|
409
|
+
language: string;
|
|
410
|
+
title: any;
|
|
411
|
+
code: string;
|
|
412
|
+
isInline: boolean;
|
|
413
|
+
isPreviewable: boolean;
|
|
414
|
+
isPanelArtifact: boolean;
|
|
415
|
+
size: number;
|
|
416
|
+
lineCount: number;
|
|
417
|
+
createdAt: string;
|
|
418
|
+
};
|
|
419
|
+
openCode: (code: any, language: any, options?: {}) => {
|
|
420
|
+
id: string;
|
|
421
|
+
messageId: string;
|
|
422
|
+
type: string;
|
|
423
|
+
language: string;
|
|
424
|
+
title: any;
|
|
425
|
+
code: string;
|
|
426
|
+
isInline: boolean;
|
|
427
|
+
isPreviewable: boolean;
|
|
428
|
+
isPanelArtifact: boolean;
|
|
429
|
+
size: number;
|
|
430
|
+
lineCount: number;
|
|
431
|
+
createdAt: string;
|
|
432
|
+
};
|
|
319
433
|
closePanel: () => void;
|
|
320
434
|
togglePanel: () => void;
|
|
321
435
|
toggleFullscreen: () => void;
|
|
@@ -383,6 +497,34 @@ export function useArtifactuse(config?: {}): {
|
|
|
383
497
|
};
|
|
384
498
|
initializeContent: (container?: Document) => Promise<void>;
|
|
385
499
|
openArtifact: (artifact: any) => void;
|
|
500
|
+
openFile: (filename: any, code: any, options?: {}) => {
|
|
501
|
+
id: string;
|
|
502
|
+
messageId: string;
|
|
503
|
+
type: string;
|
|
504
|
+
language: string;
|
|
505
|
+
title: any;
|
|
506
|
+
code: string;
|
|
507
|
+
isInline: boolean;
|
|
508
|
+
isPreviewable: boolean;
|
|
509
|
+
isPanelArtifact: boolean;
|
|
510
|
+
size: number;
|
|
511
|
+
lineCount: number;
|
|
512
|
+
createdAt: string;
|
|
513
|
+
};
|
|
514
|
+
openCode: (code: any, language: any, options?: {}) => {
|
|
515
|
+
id: string;
|
|
516
|
+
messageId: string;
|
|
517
|
+
type: string;
|
|
518
|
+
language: string;
|
|
519
|
+
title: any;
|
|
520
|
+
code: string;
|
|
521
|
+
isInline: boolean;
|
|
522
|
+
isPreviewable: boolean;
|
|
523
|
+
isPanelArtifact: boolean;
|
|
524
|
+
size: number;
|
|
525
|
+
lineCount: number;
|
|
526
|
+
createdAt: string;
|
|
527
|
+
};
|
|
386
528
|
closePanel: () => void;
|
|
387
529
|
togglePanel: () => void;
|
|
388
530
|
toggleFullscreen: () => void;
|
|
@@ -414,6 +556,7 @@ export function useArtifactuse(config?: {}): {
|
|
|
414
556
|
on: (event: any, callback: any) => () => void;
|
|
415
557
|
off: (event: any, callback: any) => void;
|
|
416
558
|
emit: (event: any, data: any) => void;
|
|
559
|
+
editor: any;
|
|
417
560
|
bridge: {
|
|
418
561
|
setIframe: (iframe: any) => void;
|
|
419
562
|
send: (action: string, data: any, requestId?: string, targetOrigin?: string) => string;
|
|
@@ -468,6 +611,34 @@ export function useArtifactuse(config?: {}): {
|
|
|
468
611
|
};
|
|
469
612
|
initializeContent: (container?: Document) => Promise<void>;
|
|
470
613
|
openArtifact: (artifact: any) => void;
|
|
614
|
+
openFile: (filename: any, code: any, options?: {}) => {
|
|
615
|
+
id: string;
|
|
616
|
+
messageId: string;
|
|
617
|
+
type: string;
|
|
618
|
+
language: string;
|
|
619
|
+
title: any;
|
|
620
|
+
code: string;
|
|
621
|
+
isInline: boolean;
|
|
622
|
+
isPreviewable: boolean;
|
|
623
|
+
isPanelArtifact: boolean;
|
|
624
|
+
size: number;
|
|
625
|
+
lineCount: number;
|
|
626
|
+
createdAt: string;
|
|
627
|
+
};
|
|
628
|
+
openCode: (code: any, language: any, options?: {}) => {
|
|
629
|
+
id: string;
|
|
630
|
+
messageId: string;
|
|
631
|
+
type: string;
|
|
632
|
+
language: string;
|
|
633
|
+
title: any;
|
|
634
|
+
code: string;
|
|
635
|
+
isInline: boolean;
|
|
636
|
+
isPreviewable: boolean;
|
|
637
|
+
isPanelArtifact: boolean;
|
|
638
|
+
size: number;
|
|
639
|
+
lineCount: number;
|
|
640
|
+
createdAt: string;
|
|
641
|
+
};
|
|
471
642
|
closePanel: () => void;
|
|
472
643
|
togglePanel: () => void;
|
|
473
644
|
toggleFullscreen: () => void;
|