@histoire/vue 0.0.0-stage → 1.0.0-beta.2
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/LICENSE +21 -0
- package/dist/components/controls/GenericControls.d.ts +30 -0
- package/dist/components/controls/GenericControls.d.ts.map +1 -0
- package/dist/components/controls/GenericControls.js +34 -0
- package/dist/components/controls/HistoireControls.d.ts +30 -0
- package/dist/components/controls/HistoireControls.d.ts.map +1 -0
- package/dist/components/controls/HistoireControls.js +176 -0
- package/dist/components/controls/PresetMenu.d.ts +63 -0
- package/dist/components/controls/PresetMenu.d.ts.map +1 -0
- package/dist/components/controls/PresetMenu.js +180 -0
- package/dist/components/controls/PropControl.d.ts +40 -0
- package/dist/components/controls/PropControl.d.ts.map +1 -0
- package/dist/components/controls/PropControl.js +66 -0
- package/dist/components/controls/StateControl.d.ts +15 -0
- package/dist/components/controls/StateControl.d.ts.map +1 -0
- package/dist/components/controls/StateControl.js +30 -0
- package/dist/components/controls/StatePresets.d.ts +37 -0
- package/dist/components/controls/StatePresets.d.ts.map +1 -0
- package/dist/components/controls/StatePresets.js +105 -0
- package/dist/components/controls/edit.d.ts +10 -0
- package/dist/components/controls/edit.d.ts.map +1 -0
- package/dist/components/controls/edit.js +82 -0
- package/dist/components/controls/editor.d.ts +9 -0
- package/dist/components/controls/editor.d.ts.map +1 -0
- package/dist/components/controls/editor.js +28 -0
- package/dist/components/docs/HistoireDocs.d.ts +44 -0
- package/dist/components/docs/HistoireDocs.d.ts.map +1 -0
- package/dist/components/docs/HistoireDocs.js +124 -0
- package/dist/components/docs/anchors.d.ts +3 -0
- package/dist/components/docs/anchors.d.ts.map +1 -0
- package/dist/components/docs/anchors.js +26 -0
- package/dist/components/docs/content.d.ts +11 -0
- package/dist/components/docs/content.d.ts.map +1 -0
- package/dist/components/docs/content.js +7 -0
- package/dist/components/docs/links.d.ts +20 -0
- package/dist/components/docs/links.d.ts.map +1 -0
- package/dist/components/docs/links.js +85 -0
- package/dist/components/docs/sanitize.d.ts +3 -0
- package/dist/components/docs/sanitize.d.ts.map +1 -0
- package/dist/components/docs/sanitize.js +16 -0
- package/dist/components/embed/EmbedPanels.d.ts +21 -0
- package/dist/components/embed/EmbedPanels.d.ts.map +1 -0
- package/dist/components/embed/EmbedPanels.js +49 -0
- package/dist/components/embed/HistoireEmbed.d.ts +36 -0
- package/dist/components/embed/HistoireEmbed.d.ts.map +1 -0
- package/dist/components/embed/HistoireEmbed.js +81 -0
- package/dist/components/embed/geometry.d.ts +5 -0
- package/dist/components/embed/geometry.d.ts.map +1 -0
- package/dist/components/embed/geometry.js +38 -0
- package/dist/components/events/HistoireEvents.d.ts +30 -0
- package/dist/components/events/HistoireEvents.d.ts.map +1 -0
- package/dist/components/events/HistoireEvents.js +88 -0
- package/dist/components/explorer/ExplorerNavigation.d.ts +20 -0
- package/dist/components/explorer/ExplorerNavigation.d.ts.map +1 -0
- package/dist/components/explorer/ExplorerNavigation.js +15 -0
- package/dist/components/explorer/ExplorerPanels.d.ts +42 -0
- package/dist/components/explorer/ExplorerPanels.d.ts.map +1 -0
- package/dist/components/explorer/ExplorerPanels.js +87 -0
- package/dist/components/explorer/ExplorerPreview.d.ts +29 -0
- package/dist/components/explorer/ExplorerPreview.d.ts.map +1 -0
- package/dist/components/explorer/ExplorerPreview.js +93 -0
- package/dist/components/explorer/HistoireExplorer.d.ts +47 -0
- package/dist/components/explorer/HistoireExplorer.d.ts.map +1 -0
- package/dist/components/explorer/HistoireExplorer.js +41 -0
- package/dist/components/explorer/panel-tabs.d.ts +48 -0
- package/dist/components/explorer/panel-tabs.d.ts.map +1 -0
- package/dist/components/explorer/panel-tabs.js +58 -0
- package/dist/components/extensions/HistoireExtensionOutlet.d.ts +47 -0
- package/dist/components/extensions/HistoireExtensionOutlet.d.ts.map +1 -0
- package/dist/components/extensions/HistoireExtensionOutlet.js +35 -0
- package/dist/components/extensions/HistoireExtensionView.d.ts +59 -0
- package/dist/components/extensions/HistoireExtensionView.d.ts.map +1 -0
- package/dist/components/extensions/HistoireExtensionView.js +58 -0
- package/dist/components/extensions/panel-action.d.ts +38 -0
- package/dist/components/extensions/panel-action.d.ts.map +1 -0
- package/dist/components/extensions/panel-action.js +19 -0
- package/dist/components/extensions/state-renderer.d.ts +17 -0
- package/dist/components/extensions/state-renderer.d.ts.map +1 -0
- package/dist/components/extensions/state-renderer.js +72 -0
- package/dist/components/extensions/view-lifecycle.d.ts +47 -0
- package/dist/components/extensions/view-lifecycle.d.ts.map +1 -0
- package/dist/components/extensions/view-lifecycle.js +108 -0
- package/dist/components/extensions/workbench-components.d.ts +9 -0
- package/dist/components/extensions/workbench-components.d.ts.map +1 -0
- package/dist/components/extensions/workbench-components.js +82 -0
- package/dist/components/preview/HistoirePreview.d.ts +11 -0
- package/dist/components/preview/HistoirePreview.d.ts.map +1 -0
- package/dist/components/preview/HistoirePreview.js +3 -0
- package/dist/components/preview/surface.d.ts +13 -0
- package/dist/components/preview/surface.d.ts.map +1 -0
- package/dist/components/preview/surface.js +129 -0
- package/dist/components/search/HistoireSearch.d.ts +9 -0
- package/dist/components/search/HistoireSearch.d.ts.map +1 -0
- package/dist/components/search/HistoireSearch.js +66 -0
- package/dist/components/source/HistoireSource.d.ts +58 -0
- package/dist/components/source/HistoireSource.d.ts.map +1 -0
- package/dist/components/source/HistoireSource.js +85 -0
- package/dist/components/source/content.d.ts +11 -0
- package/dist/components/source/content.d.ts.map +1 -0
- package/dist/components/source/content.js +7 -0
- package/dist/components/source/highlight.d.ts +3 -0
- package/dist/components/source/highlight.d.ts.map +1 -0
- package/dist/components/source/highlight.js +15 -0
- package/dist/components/source/render.d.ts +6 -0
- package/dist/components/source/render.d.ts.map +1 -0
- package/dist/components/source/render.js +11 -0
- package/dist/components/tests/HistoireTests.d.ts +66 -0
- package/dist/components/tests/HistoireTests.d.ts.map +1 -0
- package/dist/components/tests/HistoireTests.js +109 -0
- package/dist/components/tests/TestsRunActions.d.ts +54 -0
- package/dist/components/tests/TestsRunActions.d.ts.map +1 -0
- package/dist/components/tests/TestsRunActions.js +138 -0
- package/dist/components/tests/render.d.ts +33 -0
- package/dist/components/tests/render.d.ts.map +1 -0
- package/dist/components/tests/render.js +103 -0
- package/dist/components/toolbar/HistoireToolbar.d.ts +7 -0
- package/dist/components/toolbar/HistoireToolbar.d.ts.map +1 -0
- package/dist/components/toolbar/HistoireToolbar.js +66 -0
- package/dist/components/toolbar/ToolbarExtensions.d.ts +27 -0
- package/dist/components/toolbar/ToolbarExtensions.d.ts.map +1 -0
- package/dist/components/toolbar/ToolbarExtensions.js +79 -0
- package/dist/components/toolbar/groups.d.ts +19 -0
- package/dist/components/toolbar/groups.d.ts.map +1 -0
- package/dist/components/toolbar/groups.js +18 -0
- package/dist/components/tree/HistoireStoryTree.d.ts +40 -0
- package/dist/components/tree/HistoireStoryTree.d.ts.map +1 -0
- package/dist/components/tree/HistoireStoryTree.js +57 -0
- package/dist/composables/session.d.ts +4 -0
- package/dist/composables/session.d.ts.map +1 -0
- package/dist/composables/session.js +5 -0
- package/dist/composables/snapshot.d.ts +5 -0
- package/dist/composables/snapshot.d.ts.map +1 -0
- package/dist/composables/snapshot.js +9 -0
- package/dist/content/controller.d.ts +20 -0
- package/dist/content/controller.d.ts.map +1 -0
- package/dist/content/controller.js +54 -0
- package/dist/content.css +22 -0
- package/dist/controls.css +26 -0
- package/dist/embed.css +15 -0
- package/dist/explorer.css +67 -0
- package/dist/extensions.css +20 -0
- package/dist/foundation/VirtualList.d.ts +114 -0
- package/dist/foundation/VirtualList.d.ts.map +1 -0
- package/dist/foundation/VirtualList.js +126 -0
- package/dist/foundation/floating.d.ts +9 -0
- package/dist/foundation/floating.d.ts.map +1 -0
- package/dist/foundation/floating.js +90 -0
- package/dist/foundation/parts.d.ts +13 -0
- package/dist/foundation/parts.d.ts.map +1 -0
- package/dist/foundation/parts.js +13 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/internal.d.ts +31 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +26 -0
- package/dist/navigation.css +51 -0
- package/dist/overlays/OverlayHost.d.ts +21 -0
- package/dist/overlays/OverlayHost.d.ts.map +1 -0
- package/dist/overlays/OverlayHost.js +118 -0
- package/dist/overlays/geometry.d.ts +4 -0
- package/dist/overlays/geometry.d.ts.map +1 -0
- package/dist/overlays/geometry.js +7 -0
- package/dist/overlays/menu-bounds.d.ts +10 -0
- package/dist/overlays/menu-bounds.d.ts.map +1 -0
- package/dist/overlays/menu-bounds.js +52 -0
- package/dist/provider/HistoireProvider.d.ts +43 -0
- package/dist/provider/HistoireProvider.d.ts.map +1 -0
- package/dist/provider/HistoireProvider.js +183 -0
- package/dist/provider/context.d.ts +37 -0
- package/dist/provider/context.d.ts.map +1 -0
- package/dist/provider/context.js +16 -0
- package/dist/provider/extensions.d.ts +61 -0
- package/dist/provider/extensions.d.ts.map +1 -0
- package/dist/provider/extensions.js +139 -0
- package/dist/provider/panels.d.ts +33 -0
- package/dist/provider/panels.d.ts.map +1 -0
- package/dist/provider/panels.js +53 -0
- package/dist/provider/plugin-shortcuts.d.ts +22 -0
- package/dist/provider/plugin-shortcuts.d.ts.map +1 -0
- package/dist/provider/plugin-shortcuts.js +73 -0
- package/dist/provider/shortcuts.d.ts +16 -0
- package/dist/provider/shortcuts.d.ts.map +1 -0
- package/dist/provider/shortcuts.js +62 -0
- package/dist/provider/theme.d.ts +4 -0
- package/dist/provider/theme.d.ts.map +1 -0
- package/dist/provider/theme.js +25 -0
- package/dist/search/navigation.d.ts +27 -0
- package/dist/search/navigation.d.ts.map +1 -0
- package/dist/search/navigation.js +61 -0
- package/dist/style.css +88 -0
- package/dist/tests/collector.d.ts +16 -0
- package/dist/tests/collector.d.ts.map +1 -0
- package/dist/tests/collector.js +51 -0
- package/dist/tests/controller.d.ts +28 -0
- package/dist/tests/controller.d.ts.map +1 -0
- package/dist/tests/controller.js +79 -0
- package/dist/tests/model.d.ts +20 -0
- package/dist/tests/model.d.ts.map +1 -0
- package/dist/tests/model.js +18 -0
- package/dist/tests.css +59 -0
- package/dist/virtual-list.css +6 -0
- package/package.json +58 -3
- package/README.md +0 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { inject, provide, shallowRef } from 'vue';
|
|
2
|
+
/** Scoped injection keeps neighboring providers and independent searches separate. */
|
|
3
|
+
const navigationKey = Symbol('histoire-search-navigation');
|
|
4
|
+
/** Story results precede extension actions; one owner activates exactly one item. */
|
|
5
|
+
export function createHistoireSearchNavigation() {
|
|
6
|
+
const results = shallowRef([]);
|
|
7
|
+
const extensions = shallowRef([]);
|
|
8
|
+
const active = shallowRef(0);
|
|
9
|
+
return {
|
|
10
|
+
setResults(actions) {
|
|
11
|
+
results.value = actions;
|
|
12
|
+
active.value = 0;
|
|
13
|
+
},
|
|
14
|
+
setExtensions(actions) {
|
|
15
|
+
const highlighted = extensions.value[active.value - results.value.length];
|
|
16
|
+
extensions.value = actions;
|
|
17
|
+
if (highlighted) {
|
|
18
|
+
const index = actions.findIndex(action => action.id === highlighted.id);
|
|
19
|
+
// Removal retires keyboard intent instead of selecting a different action
|
|
20
|
+
// at the old position. The next arrow explicitly chooses a visible row.
|
|
21
|
+
active.value = index < 0 ? -1 : results.value.length + index;
|
|
22
|
+
}
|
|
23
|
+
else if (active.value >= results.value.length + actions.length) {
|
|
24
|
+
active.value = -1;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
focus(index, extension = false) {
|
|
28
|
+
active.value = index + (extension ? results.value.length : 0);
|
|
29
|
+
},
|
|
30
|
+
isActive(index, extension = false) {
|
|
31
|
+
return active.value === index + (extension ? results.value.length : 0);
|
|
32
|
+
},
|
|
33
|
+
keydown(event) {
|
|
34
|
+
if (event.defaultPrevented || !['ArrowDown', 'ArrowUp', 'Enter'].includes(event.key))
|
|
35
|
+
return;
|
|
36
|
+
const actions = [...results.value, ...extensions.value.map(action => action.activate)];
|
|
37
|
+
if (!actions.length) {
|
|
38
|
+
// Search Enter never implicitly submits an enclosing caller form,
|
|
39
|
+
// including while results are empty or still loading.
|
|
40
|
+
if (event.key === 'Enter')
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
if (event.key === 'Enter')
|
|
46
|
+
actions[active.value]?.();
|
|
47
|
+
else if (active.value < 0)
|
|
48
|
+
active.value = event.key === 'ArrowDown' ? 0 : actions.length - 1;
|
|
49
|
+
else
|
|
50
|
+
active.value = (active.value + (event.key === 'ArrowDown' ? 1 : -1) + actions.length) % actions.length;
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Only first-party command palette provides an extended navigation owner. */
|
|
55
|
+
export function provideHistoireSearchNavigation(navigation) {
|
|
56
|
+
provide(navigationKey, navigation);
|
|
57
|
+
}
|
|
58
|
+
/** Independent panels create local navigation, with no global active search. */
|
|
59
|
+
export function useHistoireSearchNavigation() {
|
|
60
|
+
return inject(navigationKey, undefined) ?? createHistoireSearchNavigation();
|
|
61
|
+
}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* Provider qualification scopes defaults without outranking consumer classes. */
|
|
2
|
+
@import '@histoire/controls/vue/style.css';
|
|
3
|
+
@import './tests.css';
|
|
4
|
+
@import './virtual-list.css';
|
|
5
|
+
@import './controls.css';
|
|
6
|
+
@import './content.css';
|
|
7
|
+
@import './navigation.css';
|
|
8
|
+
@import './explorer.css';
|
|
9
|
+
@import './embed.css';
|
|
10
|
+
@import './extensions.css';
|
|
11
|
+
|
|
12
|
+
.histoire-provider {
|
|
13
|
+
--histoire-background: #ffffff;
|
|
14
|
+
--histoire-foreground: #18181b;
|
|
15
|
+
--histoire-muted: #5f6370;
|
|
16
|
+
--histoire-border: #e4e4e7;
|
|
17
|
+
--histoire-accent: #059669;
|
|
18
|
+
--histoire-panel: #fafafa;
|
|
19
|
+
--histoire-surface: var(--histoire-background);
|
|
20
|
+
--histoire-input: var(--histoire-panel);
|
|
21
|
+
--histoire-text: var(--histoire-foreground);
|
|
22
|
+
--histoire-chip: #f4f4f5;
|
|
23
|
+
--histoire-accent-soft: #ecfdf5;
|
|
24
|
+
position: relative;
|
|
25
|
+
isolation: isolate;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
min-height: 0;
|
|
30
|
+
height: 100%;
|
|
31
|
+
color: var(--histoire-foreground);
|
|
32
|
+
background: var(--histoire-background);
|
|
33
|
+
font-family: var(--histoire-font-sans, "Manrope", system-ui, sans-serif);
|
|
34
|
+
font-size: 13px;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
container-type: inline-size;
|
|
37
|
+
}
|
|
38
|
+
.histoire-provider[data-histoire-appearance="dark"] {
|
|
39
|
+
--histoire-background: #16171b;
|
|
40
|
+
--histoire-foreground: #e6e7ea;
|
|
41
|
+
--histoire-muted: #8a8e97;
|
|
42
|
+
--histoire-border: #26282d;
|
|
43
|
+
--histoire-panel: #0f1013;
|
|
44
|
+
--histoire-chip: #202227;
|
|
45
|
+
--histoire-accent: #34d399;
|
|
46
|
+
--histoire-accent-soft: rgb(52 211 153 / .12);
|
|
47
|
+
color-scheme: dark;
|
|
48
|
+
}
|
|
49
|
+
.histoire-provider *, .histoire-provider *::before, .histoire-provider *::after {
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
:where(.histoire-provider) > .histoire-provider-content, :where(.histoire-provider) .histoire-primary, :where(.histoire-provider) .histoire-primary-frame {
|
|
53
|
+
flex: 1;
|
|
54
|
+
display: flex;
|
|
55
|
+
position: relative;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
min-height: 0;
|
|
58
|
+
height: 100%;
|
|
59
|
+
}
|
|
60
|
+
:where(.histoire-provider) .histoire-primary-frame > :where(iframe) {
|
|
61
|
+
flex: 1;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
border: 0;
|
|
66
|
+
}
|
|
67
|
+
:where(.histoire-provider) .histoire-primary-status {
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
display: grid;
|
|
71
|
+
place-items: center;
|
|
72
|
+
padding: 16px;
|
|
73
|
+
color: var(--histoire-muted);
|
|
74
|
+
}
|
|
75
|
+
:where(.histoire-provider) > .histoire-provider-overlays {
|
|
76
|
+
position: absolute;
|
|
77
|
+
inset: 0;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
z-index: 100;
|
|
80
|
+
}
|
|
81
|
+
:where(.histoire-provider) > .histoire-provider-overlays > * {
|
|
82
|
+
pointer-events: auto;
|
|
83
|
+
}
|
|
84
|
+
/* Shared controls use zero line-height for icon wrappers. Native overlay
|
|
85
|
+
triggers inherit provider typography so ordinary host buttons keep height. */
|
|
86
|
+
:where(.histoire-provider) .v-popper {
|
|
87
|
+
line-height: inherit;
|
|
88
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HistoireSession } from '@histoire/sdk';
|
|
2
|
+
import type { HistoireTestsModel } from './model.js';
|
|
3
|
+
/** Options of {@link createHistoireTestsCollector}. */
|
|
4
|
+
export interface HistoireTestsCollectorOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Schedules each automatic collection, e.g. after other startup work.
|
|
7
|
+
* Returns a cancel function, called when the target changes first.
|
|
8
|
+
*/
|
|
9
|
+
defer?: (run: () => void) => () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Owns automatic definition collection for one first-party Tests surface. */
|
|
12
|
+
export declare function createHistoireTestsCollector(session: HistoireSession, model: HistoireTestsModel, options?: HistoireTestsCollectorOptions): {
|
|
13
|
+
/** Stops observation and retires in-flight panel work exactly once. */
|
|
14
|
+
close(): void;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/tests/collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,uDAAuD;AACvD,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;CACxC;AAED,8EAA8E;AAC9E,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,GAAE,6BAAkC;IAyCzI,uEAAuE;IACvE,KAAK,IAAI,IAAI;EAQhB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Owns automatic definition collection for one first-party Tests surface. */
|
|
2
|
+
export function createHistoireTestsCollector(session, model, options = {}) {
|
|
3
|
+
let active = true;
|
|
4
|
+
let owner = null;
|
|
5
|
+
let cancelPending = () => { };
|
|
6
|
+
/** Starts the collection of the current target. */
|
|
7
|
+
function collect() {
|
|
8
|
+
void model.controller.collect().catch(() => {
|
|
9
|
+
// Controller publishes attributable collection failures. Navigation and
|
|
10
|
+
// retired runtime replies must never escape as unhandled rejections.
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/** Collects once for each exact ready source, target, and runtime identity. */
|
|
14
|
+
function synchronize() {
|
|
15
|
+
const snapshot = session.getSnapshot();
|
|
16
|
+
if (!active)
|
|
17
|
+
return;
|
|
18
|
+
if (snapshot.status !== 'ready' || snapshot.stale || snapshot.runtime.status !== 'ready' || !snapshot.selection?.variantId || !snapshot.capabilities.previewTests.available) {
|
|
19
|
+
owner = null;
|
|
20
|
+
cancelPending();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const current = JSON.stringify([snapshot.source, snapshot.selection, snapshot.runtime.runtimeId]);
|
|
24
|
+
if (current === owner)
|
|
25
|
+
return;
|
|
26
|
+
owner = current;
|
|
27
|
+
cancelPending();
|
|
28
|
+
if (!options.defer) {
|
|
29
|
+
collect();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
cancelPending = options.defer(() => {
|
|
33
|
+
cancelPending = () => { };
|
|
34
|
+
if (active && owner === current)
|
|
35
|
+
collect();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const stop = session.subscribe(synchronize);
|
|
39
|
+
synchronize();
|
|
40
|
+
return {
|
|
41
|
+
/** Stops observation and retires in-flight panel work exactly once. */
|
|
42
|
+
close() {
|
|
43
|
+
if (!active)
|
|
44
|
+
return;
|
|
45
|
+
active = false;
|
|
46
|
+
stop();
|
|
47
|
+
cancelPending();
|
|
48
|
+
model.controller.close();
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HistoireSourceIdentity, HistoireTarget, HistoireTestCollectionResult, HistoireTestRunSummary } from '@histoire/protocol';
|
|
2
|
+
import type { HistoireSession } from '@histoire/sdk';
|
|
3
|
+
/** Local test panel data never changes canonical session or executes during mount. */
|
|
4
|
+
export interface HistoireTestsState {
|
|
5
|
+
/** Explicit request lifecycle. */
|
|
6
|
+
status: 'idle' | 'collecting' | 'running' | 'cancelled' | 'completed' | 'failed';
|
|
7
|
+
/** Existing wire definitions. */
|
|
8
|
+
collection: HistoireTestCollectionResult | null;
|
|
9
|
+
/** Assertions complete even when summary.ok is false. */
|
|
10
|
+
summary: HistoireTestRunSummary | null;
|
|
11
|
+
/** Capability/transport/initialization failure. */
|
|
12
|
+
error: unknown;
|
|
13
|
+
/** Captured initiating target; reset states never acquire replacement selection. */
|
|
14
|
+
target?: HistoireTarget | null;
|
|
15
|
+
/** Captured source keeps host projections attributable across replacement publications. */
|
|
16
|
+
source?: HistoireSourceIdentity | null;
|
|
17
|
+
}
|
|
18
|
+
/** Panel owns operation cancellation and observer only; provider never owns caller's session. */
|
|
19
|
+
export declare function createHistoireTestsController(session: HistoireSession, publish: (state: HistoireTestsState) => void): {
|
|
20
|
+
/** Explicit collection requires ready preview. */
|
|
21
|
+
collect: () => Promise<HistoireTestCollectionResult | HistoireTestRunSummary>;
|
|
22
|
+
/** Explicit engine selected by caller. */
|
|
23
|
+
run: (mode: 'preview' | 'server') => Promise<HistoireTestCollectionResult | HistoireTestRunSummary>;
|
|
24
|
+
cancel: () => void;
|
|
25
|
+
/** Stops only panel observations and operations. */
|
|
26
|
+
close(): void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/tests/controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AACtI,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAGpD,sFAAsF;AACtF,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAA;IAChF,iCAAiC;IACjC,UAAU,EAAE,4BAA4B,GAAG,IAAI,CAAA;IAC/C,yDAAyD;IACzD,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAA;IACtC,mDAAmD;IACnD,KAAK,EAAE,OAAO,CAAA;IACd,oFAAoF;IACpF,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IAC9B,2FAA2F;IAC3F,MAAM,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;CACvC;AAED,iGAAiG;AACjG,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI;IAqDhH,kDAAkD;;IAElD,0CAA0C;gBAC9B,SAAS,GAAG,QAAQ;;IAEhC,oDAAoD;;EAQvD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { HistoireSdkError } from '@histoire/protocol';
|
|
2
|
+
/** Panel owns operation cancellation and observer only; provider never owns caller's session. */
|
|
3
|
+
export function createHistoireTestsController(session, publish) {
|
|
4
|
+
let state = { status: 'idle', collection: null, summary: null, error: null };
|
|
5
|
+
let active = true;
|
|
6
|
+
let generation = 0;
|
|
7
|
+
let abort;
|
|
8
|
+
/** Capture exact selection/source/document without parsing concatenated IDs. */
|
|
9
|
+
function identity() {
|
|
10
|
+
const value = session.getSnapshot();
|
|
11
|
+
return JSON.stringify([value.status, value.stale, value.source?.sourceId, value.source?.epoch, value.source?.revision, value.selection, value.runtime.status, value.runtime.runtimeId]);
|
|
12
|
+
}
|
|
13
|
+
let owner = identity();
|
|
14
|
+
/** Publish only current operation; late cancelled completions stay observed. */
|
|
15
|
+
function update(patch) {
|
|
16
|
+
state = { ...state, ...patch };
|
|
17
|
+
if (active)
|
|
18
|
+
publish(state);
|
|
19
|
+
}
|
|
20
|
+
/** Cancel publication immediately; engine retains actual teardown ownership. */
|
|
21
|
+
function cancel() {
|
|
22
|
+
generation++;
|
|
23
|
+
const previous = abort;
|
|
24
|
+
abort = undefined;
|
|
25
|
+
// Aborting preview execution may synchronously retire its document. Publish
|
|
26
|
+
// first so that retirement's idle reset cannot be overwritten on return.
|
|
27
|
+
update({ status: 'cancelled', summary: null });
|
|
28
|
+
previous?.abort(new HistoireSdkError('CANCELLED', 'Test panel cancelled'));
|
|
29
|
+
}
|
|
30
|
+
const unsubscribe = session.subscribe(() => {
|
|
31
|
+
const current = identity();
|
|
32
|
+
if (owner === current)
|
|
33
|
+
return;
|
|
34
|
+
owner = current;
|
|
35
|
+
cancel();
|
|
36
|
+
update({ status: 'idle', collection: null, summary: null, error: null, target: null, source: null });
|
|
37
|
+
});
|
|
38
|
+
/** One explicit panel operation; no automatic preview-to-server retry. */
|
|
39
|
+
async function perform(mode) {
|
|
40
|
+
if (!active)
|
|
41
|
+
throw new HistoireSdkError('DISPOSED', 'Tests panel closed');
|
|
42
|
+
if (abort)
|
|
43
|
+
throw new HistoireSdkError('RUNTIME_IN_USE', 'Tests panel already running');
|
|
44
|
+
const current = ++generation;
|
|
45
|
+
abort = new AbortController();
|
|
46
|
+
const snapshot = session.getSnapshot();
|
|
47
|
+
update({ status: mode ? 'running' : 'collecting', error: null, summary: null, target: snapshot.selection, source: snapshot.source });
|
|
48
|
+
try {
|
|
49
|
+
const result = mode ? await session.tests.run({ mode, signal: abort.signal }) : await session.tests.collect();
|
|
50
|
+
if (active && current === generation)
|
|
51
|
+
update(mode ? { summary: result, status: 'completed' } : { collection: result, status: 'idle' });
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
if (active && current === generation)
|
|
56
|
+
update({ error, status: error.code === 'CANCELLED' ? 'cancelled' : 'failed' });
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
if (current === generation)
|
|
61
|
+
abort = undefined;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
/** Explicit collection requires ready preview. */
|
|
66
|
+
collect: () => perform(),
|
|
67
|
+
/** Explicit engine selected by caller. */
|
|
68
|
+
run: (mode) => perform(mode),
|
|
69
|
+
cancel,
|
|
70
|
+
/** Stops only panel observations and operations. */
|
|
71
|
+
close() {
|
|
72
|
+
if (!active)
|
|
73
|
+
return;
|
|
74
|
+
cancel();
|
|
75
|
+
active = false;
|
|
76
|
+
unsubscribe();
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HistoireSession } from '@histoire/sdk';
|
|
2
|
+
import type { ShallowRef } from 'vue';
|
|
3
|
+
import type { HistoireTestsState } from './controller.js';
|
|
4
|
+
import { createHistoireTestsController } from './controller.js';
|
|
5
|
+
/** One shared panel controller/state, optionally owned by first-party standalone. */
|
|
6
|
+
export interface HistoireTestsModel {
|
|
7
|
+
/** Exact caller session prevents inheritance through independent nested provider. */
|
|
8
|
+
session: HistoireSession;
|
|
9
|
+
/** Collection/run state also supplies standalone tab count. */
|
|
10
|
+
state: ShallowRef<HistoireTestsState>;
|
|
11
|
+
/** Existing finite collection/run/cancellation implementation. */
|
|
12
|
+
controller: ReturnType<typeof createHistoireTestsController>;
|
|
13
|
+
}
|
|
14
|
+
/** Caller explicitly owns model lifecycle; creating model executes no story/tests. */
|
|
15
|
+
export declare function createHistoireTestsModel(session: HistoireSession): HistoireTestsModel;
|
|
16
|
+
/** First-party standalone shares one controller between badge and independent panel. */
|
|
17
|
+
export declare function provideHistoireTestsModel(model: HistoireTestsModel): void;
|
|
18
|
+
/** Native public components default to their own explicitly operated controller. */
|
|
19
|
+
export declare function useProvidedHistoireTestsModel(session: HistoireSession): HistoireTestsModel | undefined;
|
|
20
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/tests/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAgB,UAAU,EAAE,MAAM,KAAK,CAAA;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAA;AAE/D,qFAAqF;AACrF,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,OAAO,EAAE,eAAe,CAAA;IACxB,+DAA+D;IAC/D,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAA;IACrC,kEAAkE;IAClE,UAAU,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAA;CAC7D;AAKD,sFAAsF;AACtF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,CAGrF;AAED,wFAAwF;AACxF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAEzE;AAED,oFAAoF;AACpF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAGtG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { inject, provide, shallowRef } from 'vue';
|
|
2
|
+
import { createHistoireTestsController } from './controller.js';
|
|
3
|
+
/** Local Vue injection remains scoped to exact explicitly provided session. */
|
|
4
|
+
const key = Symbol('Histoire standalone tests');
|
|
5
|
+
/** Caller explicitly owns model lifecycle; creating model executes no story/tests. */
|
|
6
|
+
export function createHistoireTestsModel(session) {
|
|
7
|
+
const state = shallowRef({ status: 'idle', collection: null, summary: null, error: null });
|
|
8
|
+
return { session, state, controller: createHistoireTestsController(session, value => state.value = value) };
|
|
9
|
+
}
|
|
10
|
+
/** First-party standalone shares one controller between badge and independent panel. */
|
|
11
|
+
export function provideHistoireTestsModel(model) {
|
|
12
|
+
provide(key, model);
|
|
13
|
+
}
|
|
14
|
+
/** Native public components default to their own explicitly operated controller. */
|
|
15
|
+
export function useProvidedHistoireTestsModel(session) {
|
|
16
|
+
const model = inject(key, undefined);
|
|
17
|
+
return model?.session === session ? model : undefined;
|
|
18
|
+
}
|
package/dist/tests.css
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
:where(.histoire-provider) .histoire-tests{
|
|
2
|
+
--histoire-tests-passed:var(--histoire-accent);
|
|
3
|
+
--histoire-tests-failed:var(--histoire-danger,#dc2626);
|
|
4
|
+
--histoire-tests-failed-text:var(--histoire-danger-text,#b91c1c);
|
|
5
|
+
--histoire-tests-failed-soft:var(--histoire-danger-soft,rgb(220 38 38 / .08));
|
|
6
|
+
display:flex;flex-direction:column;gap:10px;height:100%;min-height:0;padding:12px;overflow:hidden;font:inherit
|
|
7
|
+
}
|
|
8
|
+
:where(.histoire-provider) .histoire-tests :where(ul){margin:0;padding:0;list-style:none}
|
|
9
|
+
:where(.histoire-provider) .histoire-tests :where(pre){margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.6 var(--histoire-font-mono,ui-monospace,monospace)}
|
|
10
|
+
|
|
11
|
+
/* Toolbar: split Run command, optional Cancel, status at inline end. */
|
|
12
|
+
:where(.histoire-provider) .histoire-tests-header{display:flex;align-items:center;gap:12px;min-width:0}
|
|
13
|
+
:where(.histoire-provider) .histoire-tests-actions{display:flex;align-items:center;gap:6px;flex:none}
|
|
14
|
+
:where(.histoire-provider) .histoire-tests-run-group{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--histoire-control-resolved-border,var(--histoire-border));border-radius:8px;background:var(--histoire-control-resolved-input,var(--histoire-chip))}
|
|
15
|
+
:where(.histoire-provider) .histoire-tests-run-group .histoire-button{border:0;border-radius:0;background:transparent}
|
|
16
|
+
:where(.histoire-provider) .histoire-tests-run-group .histoire-button:not(:disabled):hover{background:var(--histoire-control-resolved-chip,var(--histoire-chip))}
|
|
17
|
+
:where(.histoire-provider) .histoire-tests-actions .histoire-button:not(.histoire-icon-button){display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;font-weight:700}
|
|
18
|
+
:where(.histoire-provider) .histoire-tests-run:not(:disabled){color:var(--histoire-tests-passed)}
|
|
19
|
+
:where(.histoire-provider) .histoire-tests-run-trigger{--histoire-icon-button-size:30px;border-inline-start:1px solid var(--histoire-control-resolved-border,var(--histoire-border))!important;color:var(--histoire-muted)}
|
|
20
|
+
:where(.histoire-provider) .histoire-tests-cancel{color:var(--histoire-tests-failed-text)}
|
|
21
|
+
:where(.histoire-provider) .histoire-tests-run-menu{min-width:156px}
|
|
22
|
+
:where(.histoire-provider) .histoire-tests-run-menu .histoire-button{width:100%;justify-content:flex-start;padding:6px 10px;text-align:start}
|
|
23
|
+
:where(.histoire-provider) .histoire-tests-status{flex:1;min-width:0;overflow:hidden;color:var(--histoire-muted);font-size:12px;font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;text-overflow:ellipsis}
|
|
24
|
+
:where(.histoire-provider) .histoire-tests-status [data-state="passed"]{color:var(--histoire-tests-passed)}
|
|
25
|
+
:where(.histoire-provider) .histoire-tests-status [data-state="failed"]{color:var(--histoire-tests-failed-text)}
|
|
26
|
+
|
|
27
|
+
/* Result bar: proportional segments, or a sliding indeterminate stripe while running. */
|
|
28
|
+
:where(.histoire-provider) .histoire-tests-progress{display:flex;flex:none;gap:2px;height:4px;overflow:hidden;border-radius:4px;background:var(--histoire-chip)}
|
|
29
|
+
:where(.histoire-provider) .histoire-tests-progress :where(span){min-width:0}
|
|
30
|
+
:where(.histoire-provider) .histoire-tests-progress [data-state="passed"]{background:var(--histoire-tests-passed)}
|
|
31
|
+
:where(.histoire-provider) .histoire-tests-progress [data-state="failed"]{background:var(--histoire-tests-failed)}
|
|
32
|
+
:where(.histoire-provider) .histoire-tests-progress [data-state="skipped"]{background:var(--histoire-muted);opacity:.4}
|
|
33
|
+
:where(.histoire-provider) .histoire-tests-progress[data-running] :where(span){width:35%;border-radius:inherit;background:var(--histoire-muted);animation:histoire-tests-indeterminate 1.2s ease-in-out infinite}
|
|
34
|
+
@keyframes histoire-tests-indeterminate{from{transform:translateX(-100%)}to{transform:translateX(290%)}}
|
|
35
|
+
@media (prefers-reduced-motion:reduce){:where(.histoire-provider) .histoire-tests-progress[data-running] :where(span){width:100%;animation:none;opacity:.5}}
|
|
36
|
+
|
|
37
|
+
:where(.histoire-provider) .histoire-tests-alert{margin:0;padding:8px 10px;border-radius:8px;background:var(--histoire-tests-failed-soft);color:var(--histoire-tests-failed-text);font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
|
|
38
|
+
:where(.histoire-provider) .histoire-tests-empty{margin:0;padding:16px 0;color:var(--histoire-muted);text-align:center}
|
|
39
|
+
:where(.histoire-provider) .histoire-tests-list{flex:1;min-height:0}
|
|
40
|
+
|
|
41
|
+
/* Test rows: state glyph, muted suite path, wrapped name, failure details below. */
|
|
42
|
+
:where(.histoire-provider) .histoire-test-row{padding:7px 0;border-bottom:1px solid var(--histoire-border)}
|
|
43
|
+
:where(.histoire-provider) .histoire-test-row-main{display:flex;align-items:flex-start;gap:8px;line-height:18px}
|
|
44
|
+
:where(.histoire-provider) .histoire-test-state{display:inline-flex;flex:none;height:18px;align-items:center;color:var(--histoire-muted)}
|
|
45
|
+
:where(.histoire-provider) .histoire-test-state[data-state="passed"]{color:var(--histoire-tests-passed)}
|
|
46
|
+
:where(.histoire-provider) .histoire-test-state[data-state="failed"]{color:var(--histoire-tests-failed)}
|
|
47
|
+
:where(.histoire-provider) .histoire-test-state-disc{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin:1px;border-radius:50%;background:var(--histoire-muted);color:var(--histoire-surface,var(--histoire-background))}
|
|
48
|
+
:where(.histoire-provider) .histoire-test-state[data-state="running"]{width:16px;justify-content:center;color:var(--histoire-muted)}
|
|
49
|
+
:where(.histoire-provider) .histoire-test-name{flex:1;min-width:0;overflow-wrap:anywhere}
|
|
50
|
+
:where(.histoire-provider) .histoire-test-row:is([data-state="skipped"],[data-state="idle"]) .histoire-test-name{color:var(--histoire-muted)}
|
|
51
|
+
:where(.histoire-provider) .histoire-test-suite{color:var(--histoire-muted)}
|
|
52
|
+
:where(.histoire-provider) .histoire-test-errors{display:flex;flex-direction:column;gap:6px;margin:6px 0 2px 24px}
|
|
53
|
+
:where(.histoire-provider) .histoire-test-error{display:flex;flex-direction:column;gap:6px;padding:8px 10px;border-inline-start:2px solid var(--histoire-tests-failed);border-radius:0 6px 6px 0;background:var(--histoire-tests-failed-soft)}
|
|
54
|
+
:where(.histoire-provider) .histoire-test-error-message{margin:0;color:var(--histoire-tests-failed-text);font:11px/1.6 var(--histoire-font-mono,ui-monospace,monospace);white-space:pre-wrap;overflow-wrap:anywhere}
|
|
55
|
+
:where(.histoire-provider) .histoire-test-error-diff [data-diff="removed"]{color:var(--histoire-tests-failed-text)}
|
|
56
|
+
:where(.histoire-provider) .histoire-test-error-diff [data-diff="added"]{color:var(--histoire-tests-passed)}
|
|
57
|
+
:where(.histoire-provider) .histoire-test-error-stack :where(summary){width:fit-content;color:var(--histoire-muted);font-size:11px;cursor:pointer}
|
|
58
|
+
:where(.histoire-provider) .histoire-test-error-stack :where(summary):hover{color:var(--histoire-text,inherit)}
|
|
59
|
+
:where(.histoire-provider) .histoire-test-error-stack :where(pre){margin-top:4px;max-height:200px;overflow:auto;color:var(--histoire-muted)}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
@import 'vue-virtual-scroller/index.css';
|
|
2
|
+
.histoire-virtual-list { min-height: 0; min-width: 0; height: 100%; }
|
|
3
|
+
.histoire-virtual-list > .vue-recycle-scroller { height: 100%; }
|
|
4
|
+
.histoire-virtual-list-page, .histoire-virtual-list-page > .vue-recycle-scroller { height: auto; }
|
|
5
|
+
.histoire-virtual-list :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
|
|
6
|
+
.histoire-virtual-list .vue-recycle-scroller__item-view { min-width: 0; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/vue",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0-beta.2",
|
|
5
|
+
"description": "Native Vue components for Histoire sessions",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"**/*.css"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/style.css",
|
|
19
|
+
"./internal": {
|
|
20
|
+
"types": "./dist/internal.d.ts",
|
|
21
|
+
"default": "./dist/internal.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"vue": "^3.5.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@iconify/vue": "^4.1.2",
|
|
35
|
+
"dompurify": "^3.4.16",
|
|
36
|
+
"floating-vue": "5.2.2",
|
|
37
|
+
"shiki": "^3.0.0",
|
|
38
|
+
"vue-virtual-scroller": "^3.0.5",
|
|
39
|
+
"@histoire/controls": "^1.0.0-beta.2",
|
|
40
|
+
"@histoire/plugin-kit": "^1.0.0-beta.2",
|
|
41
|
+
"@histoire/protocol": "^1.0.0-beta.2",
|
|
42
|
+
"@histoire/sdk": "^1.0.0-beta.2"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@typescript/native": "npm:typescript@7.0.2",
|
|
46
|
+
"@vue/test-utils": "^2.4.6",
|
|
47
|
+
"concurrently": "^9.1.0",
|
|
48
|
+
"jsdom": "^27.4.0",
|
|
49
|
+
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
50
|
+
"vite": "^8.3.5",
|
|
51
|
+
"vitest": "5.1.1",
|
|
52
|
+
"vue": "^3.5.26",
|
|
53
|
+
"vue-router": "^4.5.0",
|
|
54
|
+
"@histoire/shared": "^1.0.0-beta.2"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "rimraf dist && tsc && node scripts/copy-styles.mjs",
|
|
58
|
+
"watch": "concurrently \"tsc -w --sourceMap\" \"node scripts/copy-styles.mjs --watch\"",
|
|
59
|
+
"test": "vitest run"
|
|
60
|
+
}
|
|
6
61
|
}
|
package/README.md
DELETED