2023-10-29 22:02:07 +03:00
|
|
|
import { HstVue } from '@histoire/plugin-vue'
|
|
|
|
import { defineConfig } from 'histoire'
|
|
|
|
|
|
|
|
const order = [
|
|
|
|
// Graph
|
|
|
|
'Editor',
|
|
|
|
'Widgets',
|
|
|
|
'Code Editor',
|
|
|
|
'Component Browser',
|
|
|
|
'Node',
|
|
|
|
'Top Bar',
|
|
|
|
'Circular Menu',
|
|
|
|
'Selection Brush',
|
|
|
|
// Miscellaneous
|
|
|
|
'SVG Icon',
|
|
|
|
'All SVG Icons',
|
|
|
|
// Visualizations
|
|
|
|
'Selector',
|
2023-11-03 23:09:45 +03:00
|
|
|
'User Defined',
|
2023-10-29 22:02:07 +03:00
|
|
|
'JSON',
|
|
|
|
'Table',
|
|
|
|
'Scatterplot',
|
|
|
|
'Histogram',
|
|
|
|
'Heatmap',
|
|
|
|
'SQL Query',
|
|
|
|
'Geo Map',
|
|
|
|
'Image',
|
|
|
|
'Warnings',
|
|
|
|
]
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
theme: {
|
|
|
|
title: 'Enso Demo Scenes',
|
|
|
|
},
|
|
|
|
setupFile: './stories/setup.ts',
|
|
|
|
plugins: [HstVue()],
|
|
|
|
tree: {
|
|
|
|
groups: [
|
|
|
|
{ id: 'graph', title: 'Graph' },
|
|
|
|
{ id: 'misc', title: 'Miscellaneous' },
|
|
|
|
{ id: 'visualizations', title: 'Visualizations' },
|
|
|
|
],
|
|
|
|
order(a, b) {
|
|
|
|
const aIndex = order.indexOf(a)
|
|
|
|
const bIndex = order.indexOf(b)
|
2024-03-06 18:34:07 +03:00
|
|
|
return (
|
|
|
|
aIndex != null ?
|
|
|
|
bIndex != null ?
|
|
|
|
aIndex - bIndex
|
2023-10-29 22:02:07 +03:00
|
|
|
: -1
|
2024-03-06 18:34:07 +03:00
|
|
|
: bIndex != null ? 1
|
2023-10-29 22:02:07 +03:00
|
|
|
: a.localeCompare(b)
|
2024-03-06 18:34:07 +03:00
|
|
|
)
|
2023-10-29 22:02:07 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
vite: {
|
|
|
|
server: {
|
|
|
|
fs: {
|
|
|
|
allow: ['../..'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|