@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,66 @@
|
|
|
1
|
+
import { getControlElement, HstButton, HstText } from '@histoire/controls/vue';
|
|
2
|
+
import { defineComponent, h, onMounted, shallowRef, watch } from 'vue';
|
|
3
|
+
import { createHistoireContentController } from '../../content/controller.js';
|
|
4
|
+
import { useHistoireContext, useHistoireResource } from '../../provider/context.js';
|
|
5
|
+
import { useHistoireSearchShortcut } from '../../provider/shortcuts.js';
|
|
6
|
+
import { useHistoireSearchNavigation } from '../../search/navigation.js';
|
|
7
|
+
/** Independent search reuses source Fuse ranking; superseded queries never render or activate. */
|
|
8
|
+
export const HistoireSearch = defineComponent({
|
|
9
|
+
name: 'HistoireSearch',
|
|
10
|
+
emits: ['select', 'query', 'error'],
|
|
11
|
+
setup(_props, { emit, expose }) {
|
|
12
|
+
const context = useHistoireContext();
|
|
13
|
+
const { session } = context;
|
|
14
|
+
let active = true;
|
|
15
|
+
const input = shallowRef(null);
|
|
16
|
+
const query = shallowRef('');
|
|
17
|
+
const navigation = useHistoireSearchNavigation();
|
|
18
|
+
const state = shallowRef({ status: 'idle', value: null, error: null });
|
|
19
|
+
const controller = createHistoireContentController(session, () => {
|
|
20
|
+
const value = session.getSnapshot();
|
|
21
|
+
return [query.value, value.source?.epoch, value.source?.revision, value.status, value.stale];
|
|
22
|
+
}, () => query.value.trim() ? session.catalog.search(query.value) : Promise.resolve(null), (value) => {
|
|
23
|
+
state.value = value;
|
|
24
|
+
navigation.setResults(value.status === 'ready' ? (value.value ?? []).map(result => () => select(result)) : []);
|
|
25
|
+
});
|
|
26
|
+
useHistoireResource(() => {
|
|
27
|
+
active = false;
|
|
28
|
+
controller.close();
|
|
29
|
+
});
|
|
30
|
+
useHistoireSearchShortcut(input);
|
|
31
|
+
onMounted(() => void controller.start());
|
|
32
|
+
watch(query, () => {
|
|
33
|
+
emit('query', query.value);
|
|
34
|
+
void controller.refresh();
|
|
35
|
+
}, { flush: 'sync' });
|
|
36
|
+
expose({ focus: () => input.value?.focus(), search: (value) => query.value = value });
|
|
37
|
+
/** Portable result activates session only; host URLs/titles remain caller-owned. */
|
|
38
|
+
function select(result) {
|
|
39
|
+
const source = session.getSnapshot().source;
|
|
40
|
+
void session.selection.select(result.target).then(() => {
|
|
41
|
+
// SDK acknowledgment can settle before another observer replaces source
|
|
42
|
+
// or target. Both local panel intent and emitted activation share guard.
|
|
43
|
+
if (!active || !context.panels.showDocs(result, source))
|
|
44
|
+
return;
|
|
45
|
+
emit('select', result);
|
|
46
|
+
}).catch((error) => {
|
|
47
|
+
if (active)
|
|
48
|
+
emit('error', error);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/** Result navigation remains scoped to this input, preserving unrelated host shortcuts. */
|
|
52
|
+
function keydown(event) {
|
|
53
|
+
if (event.key === 'Escape') {
|
|
54
|
+
query.value = '';
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
navigation.keydown(event);
|
|
58
|
+
}
|
|
59
|
+
return () => h('section', { 'class': 'histoire-search', 'aria-label': 'Histoire search', 'aria-busy': state.value.status === 'loading' }, [
|
|
60
|
+
h(HstText, { 'layout': 'inline', 'ref': (value) => { input.value = getControlElement(value); }, 'type': 'search', 'aria-label': 'Search stories and docs', 'modelValue': query.value, 'onUpdate:modelValue': (value) => query.value = value, 'onKeydown': keydown }),
|
|
61
|
+
state.value.error ? h('p', { role: 'alert' }, state.value.error.message ?? String(state.value.error)) : null,
|
|
62
|
+
state.value.status === 'ready' && !state.value.value?.length ? h('output', 'No matches') : null,
|
|
63
|
+
h('ul', (state.value.value ?? []).map((result, index) => h('li', { key: JSON.stringify([result.target.storyId, result.target.variantId, result.kind]) }, h(HstButton, { 'color': 'flat', 'type': 'button', 'aria-current': navigation.isActive(index) ? 'true' : undefined, 'onFocus': () => navigation.focus(index), 'onClick': () => select(result) }, { default: () => [result.title, result.excerpt ? h('small', result.excerpt) : null] })))),
|
|
64
|
+
]);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
/** Explicit raw/dynamic source modes; unavailable dynamic never creates preview or silently switches. */
|
|
3
|
+
export declare const HistoireSource: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
/** Host utilities for documented component parts; package markers remain intact. */
|
|
5
|
+
classes: {
|
|
6
|
+
type: PropType<Partial<Record<"alert" | "pre" | "root", string>>>;
|
|
7
|
+
default: undefined;
|
|
8
|
+
};
|
|
9
|
+
/** Hide built-in mode and copy actions when the host supplies its own. */
|
|
10
|
+
showActions: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Explicit source mode; never silently switches to another generation. */
|
|
15
|
+
mode: {
|
|
16
|
+
type: PropType<'raw' | 'dynamic'>;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
/** Code surface appearance can differ from surrounding provider. */
|
|
20
|
+
appearance: {
|
|
21
|
+
type: PropType<'auto' | 'light' | 'dark'>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("content" | "error" | "status" | "update:mode")[], "content" | "error" | "status" | "update:mode", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
/** Host utilities for documented component parts; package markers remain intact. */
|
|
28
|
+
classes: {
|
|
29
|
+
type: PropType<Partial<Record<"alert" | "pre" | "root", string>>>;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
/** Hide built-in mode and copy actions when the host supplies its own. */
|
|
33
|
+
showActions: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
/** Explicit source mode; never silently switches to another generation. */
|
|
38
|
+
mode: {
|
|
39
|
+
type: PropType<'raw' | 'dynamic'>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
/** Code surface appearance can differ from surrounding provider. */
|
|
43
|
+
appearance: {
|
|
44
|
+
type: PropType<'auto' | 'light' | 'dark'>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{
|
|
48
|
+
onContent?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onStatus?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
"onUpdate:mode"?: ((...args: any[]) => any) | undefined;
|
|
52
|
+
}>, {
|
|
53
|
+
classes: Partial<Record<"alert" | "pre" | "root", string>>;
|
|
54
|
+
showActions: boolean;
|
|
55
|
+
mode: "dynamic" | "raw";
|
|
56
|
+
appearance: "auto" | "dark" | "light";
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
58
|
+
//# sourceMappingURL=HistoireSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HistoireSource.d.ts","sourceRoot":"","sources":["../../../src/components/source/HistoireSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAanC,yGAAyG;AACzG,eAAO,MAAM,cAAc;IAGvB,oFAAoF;;;;;IAEpF,0EAA0E;;QAC3D,IAAI;QAAW,OAAO;;IACrC,2EAA2E;;QACnE,IAAI,EAAY,QAAQ,CAAC,KAAK,GAAG,SAAS,CAAC;QAAE,OAAO;;IAC5D,oEAAoE;;QACtD,IAAI,EAAY,QAAQ,CAAC,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;QAAE,OAAO;;;;;IAP1E,oFAAoF;;;;;IAEpF,0EAA0E;;;;;IAE1E,2EAA2E;;;;;IAE3E,oEAAoE;;;;;;;;;;;;;;;4EA4DtE,CAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { HstButton, useHistoireControls } from '@histoire/controls/vue';
|
|
2
|
+
import { HistoireSdkError } from '@histoire/protocol';
|
|
3
|
+
import { computed, defineComponent, h, onMounted, shallowRef, watch } from 'vue';
|
|
4
|
+
import { useHistoireSnapshot } from '../../composables/snapshot.js';
|
|
5
|
+
import { createHistoireContentController } from '../../content/controller.js';
|
|
6
|
+
import { mergePartClass, partClassesProp } from '../../foundation/parts.js';
|
|
7
|
+
import { useHistoireContext, useHistoireResource } from '../../provider/context.js';
|
|
8
|
+
import { prepareHistoireSource } from './content.js';
|
|
9
|
+
import { renderSourceContent } from './render.js';
|
|
10
|
+
/** Explicit raw/dynamic source modes; unavailable dynamic never creates preview or silently switches. */
|
|
11
|
+
export const HistoireSource = defineComponent({
|
|
12
|
+
name: 'HistoireSource',
|
|
13
|
+
props: {
|
|
14
|
+
/** Host utilities for documented component parts; package markers remain intact. */
|
|
15
|
+
classes: partClassesProp(),
|
|
16
|
+
/** Hide built-in mode and copy actions when the host supplies its own. */
|
|
17
|
+
showActions: { type: Boolean, default: true },
|
|
18
|
+
/** Explicit source mode; never silently switches to another generation. */
|
|
19
|
+
mode: { type: String, default: 'raw' },
|
|
20
|
+
/** Code surface appearance can differ from surrounding provider. */
|
|
21
|
+
appearance: { type: String, default: 'auto' },
|
|
22
|
+
},
|
|
23
|
+
emits: ['content', 'error', 'status', 'update:mode'],
|
|
24
|
+
setup(props, { emit, expose }) {
|
|
25
|
+
const { session } = useHistoireContext();
|
|
26
|
+
const snapshot = useHistoireSnapshot();
|
|
27
|
+
const providerDark = useHistoireControls().dark;
|
|
28
|
+
const dark = computed(() => props.appearance === 'auto' ? providerDark.value : props.appearance === 'dark');
|
|
29
|
+
const mode = shallowRef(props.mode);
|
|
30
|
+
const state = shallowRef({ status: 'idle', value: null, error: null });
|
|
31
|
+
const controller = createHistoireContentController(session, () => {
|
|
32
|
+
const value = session.getSnapshot();
|
|
33
|
+
return [value.status, value.stale, value.source?.epoch, value.source?.revision, value.selection?.storyId, dark.value, mode.value, ...(mode.value === 'dynamic' ? [value.selection?.variantId, value.runtime.status, value.runtime.runtimeId, value.state] : [])];
|
|
34
|
+
}, async () => {
|
|
35
|
+
const value = session.getSnapshot();
|
|
36
|
+
if (!value.selection)
|
|
37
|
+
return null;
|
|
38
|
+
if (mode.value === 'dynamic' && value.runtime.status !== 'ready')
|
|
39
|
+
throw new HistoireSdkError('PREVIEW_NOT_READY', 'Wait for the variant to finish loading before viewing its source.');
|
|
40
|
+
const content = await session.source.get({ storyId: value.selection.storyId, ...(mode.value === 'dynamic' && value.selection.variantId ? { variantId: value.selection.variantId } : {}), mode: mode.value });
|
|
41
|
+
return prepareHistoireSource(content, dark.value);
|
|
42
|
+
}, (value) => {
|
|
43
|
+
state.value = value;
|
|
44
|
+
emit('status', { status: value.status, empty: value.value?.content.body === '' });
|
|
45
|
+
if (value.status === 'ready')
|
|
46
|
+
emit('content', value.value.content);
|
|
47
|
+
if (value.status === 'error')
|
|
48
|
+
emit('error', value.error);
|
|
49
|
+
});
|
|
50
|
+
useHistoireResource(controller.close);
|
|
51
|
+
expose({ refresh: controller.refresh });
|
|
52
|
+
onMounted(() => void controller.start());
|
|
53
|
+
watch(() => props.mode, (value) => {
|
|
54
|
+
mode.value = value;
|
|
55
|
+
void controller.refresh();
|
|
56
|
+
});
|
|
57
|
+
watch(dark, () => void controller.refreshIfChanged());
|
|
58
|
+
/** Panel choice remains explicit and can be controlled by host's mode prop. */
|
|
59
|
+
function choose(value) {
|
|
60
|
+
mode.value = value;
|
|
61
|
+
emit('update:mode', value);
|
|
62
|
+
void controller.refresh();
|
|
63
|
+
}
|
|
64
|
+
/** Copy uses current captured text; failures stay panel-local and observed. */
|
|
65
|
+
function copy() {
|
|
66
|
+
const content = state.value.value?.content.body;
|
|
67
|
+
if (content !== undefined)
|
|
68
|
+
void globalThis.navigator?.clipboard?.writeText(content).catch(error => emit('error', error));
|
|
69
|
+
}
|
|
70
|
+
return () => {
|
|
71
|
+
const value = state.value.value;
|
|
72
|
+
return h('section', { 'class': mergePartClass('histoire-source', props.classes?.root), 'aria-label': 'Histoire source', 'aria-busy': state.value.status === 'loading' }, [
|
|
73
|
+
props.showActions
|
|
74
|
+
? h('div', { 'class': 'histoire-content-actions', 'role': 'group', 'aria-label': 'Source mode' }, [
|
|
75
|
+
h(HstButton, { 'color': 'flat', 'type': 'button', 'aria-pressed': mode.value === 'raw', 'disabled': !snapshot.value.capabilities.rawSource.available, 'onClick': () => choose('raw') }, { default: () => 'Raw' }),
|
|
76
|
+
h(HstButton, { 'color': 'flat', 'type': 'button', 'aria-pressed': mode.value === 'dynamic', 'onClick': () => choose('dynamic') }, { default: () => 'Dynamic' }),
|
|
77
|
+
h(HstButton, { color: 'flat', type: 'button', disabled: !value, onClick: copy }, { default: () => 'Copy' }),
|
|
78
|
+
])
|
|
79
|
+
: null,
|
|
80
|
+
state.value.error ? h('p', { role: 'alert', class: props.classes?.alert }, state.value.error.message ?? String(state.value.error)) : null,
|
|
81
|
+
value ? renderSourceContent(value, props.classes?.pre) : null,
|
|
82
|
+
]);
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HistoireSourceContent } from '@histoire/protocol';
|
|
2
|
+
/** Display preparation keeps source DTO separate from escaped generated syntax markup. */
|
|
3
|
+
export interface HistoirePreparedSource {
|
|
4
|
+
/** Captured raw/dynamic body and provenance. */
|
|
5
|
+
content: HistoireSourceContent;
|
|
6
|
+
/** Escaped highlighter output, or null for plain-text fallback. */
|
|
7
|
+
html: string | null;
|
|
8
|
+
}
|
|
9
|
+
/** Preserve original text; language hint never imports or evaluates story modules. */
|
|
10
|
+
export declare function prepareHistoireSource(content: HistoireSourceContent, dark: boolean): Promise<HistoirePreparedSource>;
|
|
11
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/components/source/content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAG/D,0FAA0F;AAC1F,MAAM,WAAW,sBAAsB;IACrC,gDAAgD;IAChD,OAAO,EAAE,qBAAqB,CAAA;IAC9B,mEAAmE;IACnE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED,sFAAsF;AACtF,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAI1H"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { highlightHistoireSource } from './highlight.js';
|
|
2
|
+
/** Preserve original text; language hint never imports or evaluates story modules. */
|
|
3
|
+
export async function prepareHistoireSource(content, dark) {
|
|
4
|
+
const extension = content.relativePath?.split('.').pop();
|
|
5
|
+
const language = content.language ?? ({ js: 'javascript', ts: 'typescript' }[extension ?? ''] ?? extension);
|
|
6
|
+
return { content, html: await highlightHistoireSource(content.body, language, dark) };
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../src/components/source/highlight.ts"],"names":[],"mappings":"AAKA,kFAAkF;AAClF,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAW/H"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Shared immutable highlighter; lazy UI-only dependency never enters SDK/protocol. */
|
|
2
|
+
let highlighter;
|
|
3
|
+
/** Highlighter escapes source text; failures retain plain safe source display. */
|
|
4
|
+
export async function highlightHistoireSource(body, language, dark) {
|
|
5
|
+
try {
|
|
6
|
+
highlighter ??= import('shiki').then(module => module.createHighlighter({ themes: ['github-light', 'github-dark'], langs: ['html', 'vue', 'svelte', 'javascript', 'typescript', 'jsx', 'tsx', 'json', 'css'] }));
|
|
7
|
+
const instance = await highlighter;
|
|
8
|
+
const lang = language && instance.getLoadedLanguages().includes(language) ? language : 'html';
|
|
9
|
+
return instance.codeToHtml(body, { lang, theme: dark ? 'github-dark' : 'github-light' });
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
highlighter = undefined;
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HistoirePreparedSource } from './content.js';
|
|
2
|
+
/** Render source safely while letting host classes reach Shiki's generated pre element. */
|
|
3
|
+
export declare function renderSourceContent(value: HistoirePreparedSource, preClass?: string): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/components/source/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,CAAC,EAAE,MAAM;;GAOnF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
/** Render source safely while letting host classes reach Shiki's generated pre element. */
|
|
3
|
+
export function renderSourceContent(value, preClass) {
|
|
4
|
+
if (value.html === null)
|
|
5
|
+
return h('div', { class: 'histoire-source-content' }, h('pre', { class: preClass }, value.content.body));
|
|
6
|
+
// Shiki owns this markup and always emits a quoted class on pre. Escape the
|
|
7
|
+
// host's attribute value, never alter the escaped source text inside code.
|
|
8
|
+
const escapedClass = preClass?.replace(/[&"<>]/g, character => ({ '&': '&', '"': '"', '<': '<', '>': '>' })[character]);
|
|
9
|
+
const html = escapedClass ? value.html.replace(/(<pre\s+class=")/, prefix => `${prefix}${escapedClass} `) : value.html;
|
|
10
|
+
return h('div', { class: 'histoire-source-content' }, h('div', { innerHTML: html }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { HistoireTestCollectionResult, HistoireTestRunSummary } from '@histoire/protocol';
|
|
2
|
+
import type { PropType, SlotsType, VNodeChild } from 'vue';
|
|
3
|
+
/** Independent native tests panel; mounting executes no story or test module. */
|
|
4
|
+
export declare const HistoireTests: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
/** Host utilities for documented component parts; package markers remain intact. */
|
|
6
|
+
classes: {
|
|
7
|
+
type: PropType<Partial<Record<"root" | "state", string>>>;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
/** Host may display an attributable cached result without replaying its run. */
|
|
11
|
+
summary: {
|
|
12
|
+
type: PropType<HistoireTestRunSummary>;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
/** Host may display collected definitions without replaying collection in preview. */
|
|
16
|
+
collection: {
|
|
17
|
+
type: PropType<HistoireTestCollectionResult>;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
/** Exact externally owned target execution blocks duplicate local actions. */
|
|
21
|
+
running: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("completed" | "error")[], "completed" | "error", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
/** Host utilities for documented component parts; package markers remain intact. */
|
|
29
|
+
classes: {
|
|
30
|
+
type: PropType<Partial<Record<"root" | "state", string>>>;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
33
|
+
/** Host may display an attributable cached result without replaying its run. */
|
|
34
|
+
summary: {
|
|
35
|
+
type: PropType<HistoireTestRunSummary>;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
/** Host may display collected definitions without replaying collection in preview. */
|
|
39
|
+
collection: {
|
|
40
|
+
type: PropType<HistoireTestCollectionResult>;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
43
|
+
/** Exact externally owned target execution blocks duplicate local actions. */
|
|
44
|
+
running: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
}>> & Readonly<{
|
|
49
|
+
onCompleted?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
classes: Partial<Record<"root" | "state", string>>;
|
|
53
|
+
summary: HistoireTestRunSummary;
|
|
54
|
+
collection: HistoireTestCollectionResult;
|
|
55
|
+
running: boolean;
|
|
56
|
+
}, SlotsType<{
|
|
57
|
+
/** Replaces default empty message; `collected` tells whether definitions were discovered. */
|
|
58
|
+
empty?: (props: {
|
|
59
|
+
collected: boolean;
|
|
60
|
+
}) => VNodeChild;
|
|
61
|
+
/** Shown while collecting or running before any test is known; status line covers it by default. */
|
|
62
|
+
loading?: (props: {
|
|
63
|
+
collecting: boolean;
|
|
64
|
+
}) => VNodeChild;
|
|
65
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
66
|
+
//# sourceMappingURL=HistoireTests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HistoireTests.d.ts","sourceRoot":"","sources":["../../../src/components/tests/HistoireTests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC9F,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAuB1D,iFAAiF;AACjF,eAAO,MAAM,aAAa;IAGtB,oFAAoF;;;;;IAEpF,gFAAgF;;QACrE,IAAI,EAAY,QAAQ,CAAC,sBAAsB,CAAC;QAAE,OAAO;;IACpE,sFAAsF;;QACxE,IAAI,EAAY,QAAQ,CAAC,4BAA4B,CAAC;QAAE,OAAO;;IAC7E,8EAA8E;;QACnE,IAAI;QAAW,OAAO;;;;;IAPjC,oFAAoF;;;;;IAEpF,gFAAgF;;;;;IAEhF,sFAAsF;;;;;IAEtF,8EAA8E;;;;;;;;;;;;;;IAK9E,6FAA6F;YACrF,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,UAAU;IACrD,oGAAoG;cAC1F,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,UAAU;yEAyE1D,CAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { LoadingDelayBoundary, useLoadingDelay } from '@histoire/controls/vue';
|
|
2
|
+
import { defineComponent, h, watch } from 'vue';
|
|
3
|
+
import { useHistoireSnapshot } from '../../composables/snapshot.js';
|
|
4
|
+
import { mergePartClass, partClassesProp, renderPartState } from '../../foundation/parts.js';
|
|
5
|
+
import { HistoireVirtualList } from '../../foundation/VirtualList.js';
|
|
6
|
+
import { useHistoireContext, useHistoireResource } from '../../provider/context.js';
|
|
7
|
+
import { createHistoireTestsModel, useProvidedHistoireTestsModel } from '../../tests/model.js';
|
|
8
|
+
import { projectTestRows, renderTestCounts, renderTestProgress, renderTestRow } from './render.js';
|
|
9
|
+
import { HistoireTestsRunActions } from './TestsRunActions.js';
|
|
10
|
+
/** Status line shown when neither results nor definitions exist. */
|
|
11
|
+
const STATUS_LABELS = {
|
|
12
|
+
idle: 'Not run',
|
|
13
|
+
collecting: 'Collecting…',
|
|
14
|
+
running: 'Running…',
|
|
15
|
+
cancelled: 'Cancelled',
|
|
16
|
+
completed: 'Not run',
|
|
17
|
+
failed: 'Failed',
|
|
18
|
+
};
|
|
19
|
+
/** Independent native tests panel; mounting executes no story or test module. */
|
|
20
|
+
export const HistoireTests = defineComponent({
|
|
21
|
+
name: 'HistoireTests',
|
|
22
|
+
props: {
|
|
23
|
+
/** Host utilities for documented component parts; package markers remain intact. */
|
|
24
|
+
classes: partClassesProp(),
|
|
25
|
+
/** Host may display an attributable cached result without replaying its run. */
|
|
26
|
+
summary: { type: Object, default: undefined },
|
|
27
|
+
/** Host may display collected definitions without replaying collection in preview. */
|
|
28
|
+
collection: { type: Object, default: undefined },
|
|
29
|
+
/** Exact externally owned target execution blocks duplicate local actions. */
|
|
30
|
+
running: { type: Boolean, default: false },
|
|
31
|
+
},
|
|
32
|
+
emits: ['completed', 'error'],
|
|
33
|
+
slots: Object,
|
|
34
|
+
setup(props, { emit, expose, slots }) {
|
|
35
|
+
const { session } = useHistoireContext();
|
|
36
|
+
const snapshot = useHistoireSnapshot();
|
|
37
|
+
const provided = useProvidedHistoireTestsModel(session);
|
|
38
|
+
const { state, controller } = provided ?? createHistoireTestsModel(session);
|
|
39
|
+
useHistoireResource(() => {
|
|
40
|
+
if (!provided)
|
|
41
|
+
controller.close();
|
|
42
|
+
});
|
|
43
|
+
expose(controller);
|
|
44
|
+
const busyVisible = useLoadingDelay(() => props.running || ['running', 'collecting'].includes(state.value.status));
|
|
45
|
+
let operated = false;
|
|
46
|
+
let cachedSummaryAtRun = props.summary;
|
|
47
|
+
let cachedCollectionAtRun = props.collection;
|
|
48
|
+
// A static host cache may predate explicit local execution. Only a changed
|
|
49
|
+
// host publication supersedes that local result or retires its failure.
|
|
50
|
+
watch(() => state.value.status, (status) => {
|
|
51
|
+
if (status !== 'running' && status !== 'collecting') {
|
|
52
|
+
if (status === 'idle' && !state.value.collection && !state.value.summary)
|
|
53
|
+
operated = false;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
operated = true;
|
|
57
|
+
cachedSummaryAtRun = props.summary;
|
|
58
|
+
cachedCollectionAtRun = props.collection;
|
|
59
|
+
}, { flush: 'sync' });
|
|
60
|
+
/** UI always observes errors; failed assertions still emit completed summary. */
|
|
61
|
+
function perform(mode) {
|
|
62
|
+
void (mode ? controller.run(mode) : controller.collect()).then((result) => {
|
|
63
|
+
if (mode && state.value.summary === result)
|
|
64
|
+
emit('completed', result);
|
|
65
|
+
}).catch((error) => {
|
|
66
|
+
if (state.value.error === error)
|
|
67
|
+
emit('error', error);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return () => {
|
|
71
|
+
const localBusy = ['running', 'collecting'].includes(state.value.status);
|
|
72
|
+
const busy = props.running || localBusy;
|
|
73
|
+
const preview = snapshot.value.runtime.status === 'ready' && snapshot.value.capabilities.previewTests.available;
|
|
74
|
+
const server = snapshot.value.source?.mode === 'dev' && snapshot.value.capabilities.serverTests.available && !!snapshot.value.selection?.variantId;
|
|
75
|
+
const summary = localBusy || (operated && state.value.status === 'completed' && props.summary === cachedSummaryAtRun) ? state.value.summary : props.summary ?? state.value.summary;
|
|
76
|
+
const collection = operated && state.value.collection && props.collection === cachedCollectionAtRun ? state.value.collection : props.collection ?? state.value.collection;
|
|
77
|
+
const definitions = collection?.definitions ?? [];
|
|
78
|
+
const rows = projectTestRows(summary, definitions, busy);
|
|
79
|
+
// A fresh host-owned result supersedes a retired local operation's failure.
|
|
80
|
+
const cacheChanged = (props.summary && props.summary !== cachedSummaryAtRun) || (props.collection && props.collection !== cachedCollectionAtRun);
|
|
81
|
+
const error = !localBusy && (cacheChanged || (!operated && (props.summary || props.collection))) ? null : state.value.error;
|
|
82
|
+
const status = busy
|
|
83
|
+
? !busyVisible.value ? '' : (state.value.status === 'collecting' ? 'Collecting…' : 'Running…')
|
|
84
|
+
: summary
|
|
85
|
+
? renderTestCounts(summary)
|
|
86
|
+
: collection ? `${definitions.length} ${definitions.length === 1 ? 'test' : 'tests'}` : STATUS_LABELS[state.value.status];
|
|
87
|
+
return h('section', { 'class': mergePartClass('histoire-tests', props.classes?.root), 'aria-label': 'Histoire tests', 'aria-busy': busy || undefined }, [
|
|
88
|
+
h('header', { class: 'histoire-tests-header' }, [
|
|
89
|
+
h(HistoireTestsRunActions, {
|
|
90
|
+
busy,
|
|
91
|
+
cancellable: localBusy,
|
|
92
|
+
canvasAvailable: preview,
|
|
93
|
+
serverAvailable: server,
|
|
94
|
+
onPerform: perform,
|
|
95
|
+
onCancel: controller.cancel,
|
|
96
|
+
}),
|
|
97
|
+
h('output', { 'class': 'histoire-tests-status', 'aria-live': 'polite' }, status),
|
|
98
|
+
]),
|
|
99
|
+
busy && !busyVisible.value ? null : renderTestProgress(summary, busy),
|
|
100
|
+
error ? h('p', { class: 'histoire-tests-alert', role: 'alert' }, error.message ?? String(error)) : null,
|
|
101
|
+
rows.length
|
|
102
|
+
? h(HistoireVirtualList, { class: 'histoire-tests-list', items: rows, minItemSize: 36, listTag: 'ul', itemTag: 'li' }, {
|
|
103
|
+
default: ({ index }) => renderTestRow(rows[index]),
|
|
104
|
+
})
|
|
105
|
+
: busy ? busyVisible.value ? h(LoadingDelayBoundary, null, () => renderPartState(slots.loading?.({ collecting: state.value.status === 'collecting' }), props.classes?.state)) : null : renderPartState(slots.empty?.({ collected: !!collection }) ?? h('p', { class: 'histoire-tests-empty' }, collection ? 'No tests' : 'Tests not collected'), props.classes?.state),
|
|
106
|
+
]);
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Split Run command with secondary actions menu and local cancellation. */
|
|
2
|
+
export declare const HistoireTestsRunActions: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
/** Any execution, local or host-owned, blocks new commands. */
|
|
4
|
+
busy: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
/** Only a local operation can be cancelled from this panel. */
|
|
9
|
+
cancellable: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
/** Ready runtime with in-canvas test capability. */
|
|
14
|
+
canvasAvailable: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
/** Dev source with server test capability and selected variant. */
|
|
19
|
+
serverAvailable: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
/** Omitted mode refreshes definitions without running assertions. */
|
|
27
|
+
perform: (_mode?: 'preview' | 'server') => true;
|
|
28
|
+
cancel: () => true;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
/** Any execution, local or host-owned, blocks new commands. */
|
|
31
|
+
busy: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
/** Only a local operation can be cancelled from this panel. */
|
|
36
|
+
cancellable: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
/** Ready runtime with in-canvas test capability. */
|
|
41
|
+
canvasAvailable: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
/** Dev source with server test capability and selected variant. */
|
|
46
|
+
serverAvailable: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
}>> & Readonly<{
|
|
51
|
+
onCancel?: (() => any) | undefined;
|
|
52
|
+
onPerform?: ((_mode?: "preview" | "server" | undefined) => any) | undefined;
|
|
53
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
//# sourceMappingURL=TestsRunActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestsRunActions.d.ts","sourceRoot":"","sources":["../../../src/components/tests/TestsRunActions.ts"],"names":[],"mappings":"AAKA,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB;IAGhC,+DAA+D;;;;;IAE/D,+DAA+D;;;;;IAE/D,oDAAoD;;;;;IAEpD,mEAAmE;;;;;;;;IAInE,qEAAqE;sBACnD,SAAS,GAAG,QAAQ;;;IAXtC,+DAA+D;;;;;IAE/D,+DAA+D;;;;;IAE/D,oDAAoD;;;;;IAEpD,mEAAmE;;;;;;;;iFAyHrE,CAAA"}
|