feat(editor): show tooltip when the editor is read-only (#34)
This commit is contained in:
@@ -21,6 +21,8 @@ export type ArtifactUpdateState = Pick<ArtifactState, 'title' | 'closed'>;
|
||||
|
||||
type Artifacts = MapStore<Record<string, ArtifactState>>;
|
||||
|
||||
export type WorkbenchViewType = 'code' | 'preview';
|
||||
|
||||
export class WorkbenchStore {
|
||||
#previewsStore = new PreviewsStore(webcontainer);
|
||||
#filesStore = new FilesStore(webcontainer);
|
||||
@@ -30,6 +32,7 @@ export class WorkbenchStore {
|
||||
artifacts: Artifacts = import.meta.hot?.data.artifacts ?? map({});
|
||||
|
||||
showWorkbench: WritableAtom<boolean> = import.meta.hot?.data.showWorkbench ?? atom(false);
|
||||
currentView: WritableAtom<WorkbenchViewType> = import.meta.hot?.data.currentView ?? atom('code');
|
||||
unsavedFiles: WritableAtom<Set<string>> = import.meta.hot?.data.unsavedFiles ?? atom(new Set<string>());
|
||||
modifiedFiles = new Set<string>();
|
||||
artifactIdList: string[] = [];
|
||||
@@ -39,6 +42,7 @@ export class WorkbenchStore {
|
||||
import.meta.hot.data.artifacts = this.artifacts;
|
||||
import.meta.hot.data.unsavedFiles = this.unsavedFiles;
|
||||
import.meta.hot.data.showWorkbench = this.showWorkbench;
|
||||
import.meta.hot.data.currentView = this.currentView;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6
packages/bolt/app/lib/webcontainer/auth.client.ts
Normal file
6
packages/bolt/app/lib/webcontainer/auth.client.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* This client-only module that contains everything related to auth and is used
|
||||
* to avoid importing `@webcontainer/api` in the server bundle.
|
||||
*/
|
||||
|
||||
export { auth, type AuthAPI } from '@webcontainer/api';
|
||||
Reference in New Issue
Block a user