2023-11-27 18:48:37 +03:00
|
|
|
import 'enso-dashboard/src/tailwind.css'
|
|
|
|
import { createPinia } from 'pinia'
|
2024-02-14 12:42:37 +03:00
|
|
|
import { initializeFFI } from 'shared/ast/ffi'
|
2023-11-27 18:48:37 +03:00
|
|
|
import { createApp, ref } from 'vue'
|
2023-12-15 13:29:15 +03:00
|
|
|
import { mockDataHandler, mockLSHandler } from '../mock/engine'
|
2024-03-06 18:34:07 +03:00
|
|
|
import '../src/assets/main.css'
|
2023-11-27 18:48:37 +03:00
|
|
|
import { provideGuiConfig } from '../src/providers/guiConfig'
|
|
|
|
import { provideVisualizationConfig } from '../src/providers/visualizationConfig'
|
2023-12-14 01:27:31 +03:00
|
|
|
import { Vec2 } from '../src/util/data/vec2'
|
2023-11-27 18:48:37 +03:00
|
|
|
import { MockTransport, MockWebSocket } from '../src/util/net'
|
|
|
|
import MockApp from './MockApp.vue'
|
|
|
|
|
|
|
|
MockTransport.addMock('engine', mockLSHandler)
|
|
|
|
MockWebSocket.addMock('data', mockDataHandler)
|
|
|
|
|
|
|
|
const app = createApp(MockApp)
|
|
|
|
app.use(createPinia())
|
|
|
|
provideGuiConfig._mock(
|
|
|
|
ref({
|
|
|
|
startup: {
|
2024-01-18 16:45:18 +03:00
|
|
|
project: 'Mock',
|
2023-11-27 18:48:37 +03:00
|
|
|
displayedProjectName: 'Mock Project',
|
|
|
|
},
|
|
|
|
engine: { rpcUrl: 'mock://engine', dataUrl: 'mock://data' },
|
|
|
|
}),
|
|
|
|
app,
|
|
|
|
)
|
|
|
|
// Required for visualization stories.
|
|
|
|
provideVisualizationConfig._mock(
|
|
|
|
{
|
|
|
|
fullscreen: false,
|
|
|
|
width: 200,
|
|
|
|
height: 150,
|
|
|
|
hide() {},
|
|
|
|
isCircularMenuVisible: false,
|
|
|
|
nodeSize: new Vec2(200, 150),
|
|
|
|
currentType: {
|
|
|
|
module: { kind: 'Builtin' },
|
|
|
|
name: 'Current Type',
|
|
|
|
},
|
|
|
|
types: [
|
|
|
|
{
|
|
|
|
module: { kind: 'Builtin' },
|
|
|
|
name: 'Example',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
module: { kind: 'Builtin' },
|
|
|
|
name: 'Types',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
module: { kind: 'Builtin' },
|
|
|
|
name: 'Here',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
updateType() {},
|
|
|
|
},
|
|
|
|
app,
|
|
|
|
)
|
2024-02-14 12:42:37 +03:00
|
|
|
initializeFFI().then(() => app.mount('#app'))
|