@sentropic/design-system-vue 0.1.0 → 0.3.0
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/dist/BackToTop.d.ts +79 -0
- package/dist/BackToTop.d.ts.map +1 -0
- package/dist/BackToTop.js +72 -0
- package/dist/BackToTop.js.map +1 -0
- package/dist/DisplaySettings.d.ts +90 -0
- package/dist/DisplaySettings.d.ts.map +1 -0
- package/dist/DisplaySettings.js +91 -0
- package/dist/DisplaySettings.js.map +1 -0
- package/dist/ForceGraph.d.ts +142 -13
- package/dist/ForceGraph.d.ts.map +1 -1
- package/dist/ForceGraph.js +574 -36
- package/dist/ForceGraph.js.map +1 -1
- package/dist/GraphLegend.d.ts +42 -0
- package/dist/GraphLegend.d.ts.map +1 -0
- package/dist/GraphLegend.js +71 -0
- package/dist/GraphLegend.js.map +1 -0
- package/dist/MediaContent.d.ts +130 -0
- package/dist/MediaContent.d.ts.map +1 -0
- package/dist/MediaContent.js +53 -0
- package/dist/MediaContent.js.map +1 -0
- package/dist/Notification.d.ts +71 -0
- package/dist/Notification.d.ts.map +1 -0
- package/dist/Notification.js +43 -0
- package/dist/Notification.js.map +1 -0
- package/dist/TableOfContents.d.ts +53 -0
- package/dist/TableOfContents.d.ts.map +1 -0
- package/dist/TableOfContents.js +39 -0
- package/dist/TableOfContents.js.map +1 -0
- package/dist/Transcription.d.ts +75 -0
- package/dist/Transcription.d.ts.map +1 -0
- package/dist/Transcription.js +59 -0
- package/dist/Transcription.js.map +1 -0
- package/dist/index.d.ts +16 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +415 -3
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type BackToTopProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
targetId?: string;
|
|
5
|
+
threshold?: number;
|
|
6
|
+
autoHide?: boolean;
|
|
7
|
+
smooth?: boolean;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const BackToTop: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
11
|
+
label: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
disabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
targetId: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
threshold: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
autoHide: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
smooth: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
class: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: undefined;
|
|
38
|
+
};
|
|
39
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
label: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
disabled: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
targetId: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
threshold: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
default: number;
|
|
57
|
+
};
|
|
58
|
+
autoHide: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
smooth: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
class: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{}>, {
|
|
71
|
+
class: string;
|
|
72
|
+
label: string;
|
|
73
|
+
disabled: boolean;
|
|
74
|
+
targetId: string;
|
|
75
|
+
threshold: number;
|
|
76
|
+
autoHide: boolean;
|
|
77
|
+
smooth: boolean;
|
|
78
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
79
|
+
//# sourceMappingURL=BackToTop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackToTop.d.ts","sourceRoot":"","sources":["../src/BackToTop.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAqFpB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent, h, onMounted, onUnmounted, ref } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
export const BackToTop = defineComponent({
|
|
4
|
+
name: "BackToTop",
|
|
5
|
+
props: {
|
|
6
|
+
label: { type: String, default: "Retour en haut" },
|
|
7
|
+
disabled: { type: Boolean, default: false },
|
|
8
|
+
targetId: { type: String, default: "top" },
|
|
9
|
+
threshold: { type: Number, default: 240 },
|
|
10
|
+
autoHide: { type: Boolean, default: true },
|
|
11
|
+
smooth: { type: Boolean, default: true },
|
|
12
|
+
class: { type: String, default: undefined },
|
|
13
|
+
},
|
|
14
|
+
setup(props, { attrs }) {
|
|
15
|
+
const visible = ref(!props.autoHide);
|
|
16
|
+
const updateVisibility = () => {
|
|
17
|
+
visible.value = window.scrollY > props.threshold;
|
|
18
|
+
};
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
if (!props.autoHide || typeof window === "undefined") {
|
|
21
|
+
visible.value = true;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
updateVisibility();
|
|
25
|
+
window.addEventListener("scroll", updateVisibility, { passive: true });
|
|
26
|
+
});
|
|
27
|
+
onUnmounted(() => {
|
|
28
|
+
if (typeof window !== "undefined") {
|
|
29
|
+
window.removeEventListener("scroll", updateVisibility);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const goTop = () => {
|
|
33
|
+
const target = props.targetId ? `#${props.targetId.replace(/^#/, "")}` : "#top";
|
|
34
|
+
const anchor = target.startsWith("#") ? target.slice(1) : target;
|
|
35
|
+
const element = anchor ? document.getElementById(anchor) : null;
|
|
36
|
+
if (element) {
|
|
37
|
+
element.scrollIntoView({ behavior: props.smooth ? "smooth" : "auto", block: "start" });
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
window.scrollTo({ top: 0, behavior: props.smooth ? "smooth" : "auto" });
|
|
41
|
+
};
|
|
42
|
+
return () => {
|
|
43
|
+
const hidden = props.autoHide && !visible.value;
|
|
44
|
+
return h("button", {
|
|
45
|
+
...attrs,
|
|
46
|
+
type: "button",
|
|
47
|
+
class: classNames("st-backToTop", props.class),
|
|
48
|
+
onClick: goTop,
|
|
49
|
+
"aria-label": props.label,
|
|
50
|
+
"aria-hidden": hidden ? "true" : undefined,
|
|
51
|
+
"aria-live": hidden ? "polite" : undefined,
|
|
52
|
+
tabindex: hidden ? -1 : undefined,
|
|
53
|
+
disabled: props.disabled,
|
|
54
|
+
}, [
|
|
55
|
+
h("span", { class: "st-backToTop__icon", "aria-hidden": "true" }, h("svg", {
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
+
width: 16,
|
|
58
|
+
height: 16,
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
fill: "none",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
"stroke-width": 2,
|
|
63
|
+
"stroke-linecap": "round",
|
|
64
|
+
"stroke-linejoin": "round",
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
}, [h("path", { d: "m5 12 7-7 7 7" }), h("path", { d: "M12 19V5" })])),
|
|
67
|
+
h("span", { class: "st-backToTop__label" }, props.label),
|
|
68
|
+
]);
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=BackToTop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackToTop.js","sourceRoot":"","sources":["../src/BackToTop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAY7C,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE;QAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE;QAC1C,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;QACzC,QAA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AAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,EAAE,EACtD,CAAC,CACC,KAAK,EACL;oBACE,KAAK,EAAE,4BAA4B;oBACnC,KAAK,EAAE,EAAE;oBACT,MAAM,EAAE,EAAE;oBACV,OAAO,EAAE,WAAW;oBACpB,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,cAAc;oBACtB,cAAc,EAAE,CAAC;oBACjB,gBAAgB,EAAE,OAAO;oBACzB,iBAAiB,EAAE,OAAO;oBAC1B,aAAa,EAAE,MAAM;iBACtB,EACD,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAClE,CACF;gBACD,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC;aACzD,CACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export type DisplayFontScale = "normal" | "large" | "extra-large";
|
|
2
|
+
export type DisplayContrast = "default" | "high";
|
|
3
|
+
export type DisplayLineSpacing = "normal" | "comfortable";
|
|
4
|
+
export interface DisplaySettingsState {
|
|
5
|
+
fontScale: DisplayFontScale;
|
|
6
|
+
contrast: DisplayContrast;
|
|
7
|
+
lineSpacing: DisplayLineSpacing;
|
|
8
|
+
reducedMotion: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type DisplaySettingsProps = {
|
|
11
|
+
title?: string;
|
|
12
|
+
values?: Partial<DisplaySettingsState>;
|
|
13
|
+
showFontScale?: boolean;
|
|
14
|
+
showContrast?: boolean;
|
|
15
|
+
showLineSpacing?: boolean;
|
|
16
|
+
showReducedMotion?: boolean;
|
|
17
|
+
class?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const DisplaySettings: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
|
+
title: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
values: {
|
|
25
|
+
type: () => Partial<DisplaySettingsState>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
showFontScale: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
showContrast: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
showLineSpacing: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
showReducedMotion: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
class: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
title: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
values: {
|
|
56
|
+
type: () => Partial<DisplaySettingsState>;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
showFontScale: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
showContrast: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
showLineSpacing: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
showReducedMotion: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
class: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{
|
|
80
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
}>, {
|
|
82
|
+
class: string;
|
|
83
|
+
values: Partial<DisplaySettingsState>;
|
|
84
|
+
title: string;
|
|
85
|
+
showFontScale: boolean;
|
|
86
|
+
showContrast: boolean;
|
|
87
|
+
showLineSpacing: boolean;
|
|
88
|
+
showReducedMotion: boolean;
|
|
89
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
90
|
+
//# sourceMappingURL=DisplaySettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisplaySettings.d.ts","sourceRoot":"","sources":["../src/DisplaySettings.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,CAAC;AACjD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AASF,eAAO,MAAM,eAAe;;;;;;cAIE,MAAM,OAAO,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAnC,MAAM,OAAO,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAsG/D,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent, h, ref, watch } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
const DEFAULT_SETTINGS = {
|
|
4
|
+
fontScale: "normal",
|
|
5
|
+
contrast: "default",
|
|
6
|
+
lineSpacing: "normal",
|
|
7
|
+
reducedMotion: false,
|
|
8
|
+
};
|
|
9
|
+
export const DisplaySettings = defineComponent({
|
|
10
|
+
name: "DisplaySettings",
|
|
11
|
+
props: {
|
|
12
|
+
title: { type: String, default: "Paramètres d’affichage" },
|
|
13
|
+
values: { type: Object, default: undefined },
|
|
14
|
+
showFontScale: { type: Boolean, default: true },
|
|
15
|
+
showContrast: { type: Boolean, default: true },
|
|
16
|
+
showLineSpacing: { type: Boolean, default: true },
|
|
17
|
+
showReducedMotion: { type: Boolean, default: true },
|
|
18
|
+
class: { type: String, default: undefined },
|
|
19
|
+
},
|
|
20
|
+
emits: ["change"],
|
|
21
|
+
setup(props, { emit, attrs }) {
|
|
22
|
+
const resolve = () => ({
|
|
23
|
+
fontScale: props.values?.fontScale ?? DEFAULT_SETTINGS.fontScale,
|
|
24
|
+
contrast: props.values?.contrast ?? DEFAULT_SETTINGS.contrast,
|
|
25
|
+
lineSpacing: props.values?.lineSpacing ?? DEFAULT_SETTINGS.lineSpacing,
|
|
26
|
+
reducedMotion: props.values?.reducedMotion ?? DEFAULT_SETTINGS.reducedMotion,
|
|
27
|
+
});
|
|
28
|
+
const state = ref(resolve());
|
|
29
|
+
watch(() => props.values, () => {
|
|
30
|
+
state.value = { ...state.value, ...resolve() };
|
|
31
|
+
}, { deep: true });
|
|
32
|
+
const update = (next) => {
|
|
33
|
+
state.value = { ...state.value, ...next };
|
|
34
|
+
emit("change", { ...state.value });
|
|
35
|
+
};
|
|
36
|
+
return () => h("div", { ...attrs, class: classNames("st-displaySettings", props.class) }, [
|
|
37
|
+
h("p", { class: "st-displaySettings__title" }, props.title),
|
|
38
|
+
h("div", { class: "st-displaySettings__grid" }, [
|
|
39
|
+
props.showFontScale
|
|
40
|
+
? h("label", { class: "st-displaySettings__field" }, [
|
|
41
|
+
h("span", { class: "st-displaySettings__label" }, "Taille de texte"),
|
|
42
|
+
h("select", {
|
|
43
|
+
value: state.value.fontScale,
|
|
44
|
+
onChange: (event) => update({ fontScale: event.target.value }),
|
|
45
|
+
}, [
|
|
46
|
+
h("option", { value: "normal" }, "Normale"),
|
|
47
|
+
h("option", { value: "large" }, "Grande"),
|
|
48
|
+
h("option", { value: "extra-large" }, "Très grande"),
|
|
49
|
+
]),
|
|
50
|
+
])
|
|
51
|
+
: null,
|
|
52
|
+
props.showContrast
|
|
53
|
+
? h("label", { class: "st-displaySettings__field" }, [
|
|
54
|
+
h("span", { class: "st-displaySettings__label" }, "Contraste"),
|
|
55
|
+
h("select", {
|
|
56
|
+
value: state.value.contrast,
|
|
57
|
+
onChange: (event) => update({ contrast: event.target.value }),
|
|
58
|
+
}, [
|
|
59
|
+
h("option", { value: "default" }, "Standard"),
|
|
60
|
+
h("option", { value: "high" }, "Élevé"),
|
|
61
|
+
]),
|
|
62
|
+
])
|
|
63
|
+
: null,
|
|
64
|
+
props.showLineSpacing
|
|
65
|
+
? h("label", { class: "st-displaySettings__field" }, [
|
|
66
|
+
h("span", { class: "st-displaySettings__label" }, "Interligne"),
|
|
67
|
+
h("select", {
|
|
68
|
+
value: state.value.lineSpacing,
|
|
69
|
+
onChange: (event) => update({ lineSpacing: event.target.value }),
|
|
70
|
+
}, [
|
|
71
|
+
h("option", { value: "normal" }, "Normal"),
|
|
72
|
+
h("option", { value: "comfortable" }, "Confortable"),
|
|
73
|
+
]),
|
|
74
|
+
])
|
|
75
|
+
: null,
|
|
76
|
+
props.showReducedMotion
|
|
77
|
+
? h("label", { class: "st-displaySettings__field st-displaySettings__field--switch" }, [
|
|
78
|
+
h("span", { class: "st-displaySettings__label" }, "Animations (réduction)"),
|
|
79
|
+
h("input", {
|
|
80
|
+
type: "checkbox",
|
|
81
|
+
role: "switch",
|
|
82
|
+
checked: state.value.reducedMotion,
|
|
83
|
+
onChange: (event) => update({ reducedMotion: event.target.checked }),
|
|
84
|
+
}),
|
|
85
|
+
])
|
|
86
|
+
: null,
|
|
87
|
+
]),
|
|
88
|
+
]);
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=DisplaySettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisplaySettings.js","sourceRoot":"","sources":["../src/DisplaySettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAuB7C,MAAM,gBAAgB,GAAyB;IAC7C,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,QAAQ;IACrB,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC7C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,EAAE;QAC1D,MAAM,EAAE,EAAE,IAAI,EAAE,MAA6C,EAAE,OAAO,EAAE,SAAS,EAAE;QACnF,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC/C,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC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AE;4BACT,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa;4BAClC,QAAQ,EAAE,CAAC,KAAY,EAAE,EAAE,CACzB,MAAM,CAAC,EAAE,aAAa,EAAG,KAAK,CAAC,MAA2B,CAAC,OAAO,EAAE,CAAC;yBACxE,CAAC;qBACH,CAAC;oBACJ,CAAC,CAAC,IAAI;aACT,CAAC;SACH,CAAC,CAAC;IACP,CAAC;CACF,CAAC,CAAC"}
|
package/dist/ForceGraph.d.ts
CHANGED
|
@@ -1,86 +1,215 @@
|
|
|
1
|
-
|
|
1
|
+
import { type PropType, type VNode } from "vue";
|
|
2
|
+
export type ForceGraphTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8";
|
|
3
|
+
export type ForceGraphNodeShape = "dot" | "circle" | "diamond" | "star" | "hexagon" | "box" | "square" | "triangle";
|
|
2
4
|
export type ForceGraphNode = {
|
|
5
|
+
/** Stable identifier; referenced by edges. */
|
|
3
6
|
id: string;
|
|
7
|
+
/** Visible label (falls back to id). */
|
|
4
8
|
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Grouping key (e.g. node type or community). Nodes sharing a group get
|
|
11
|
+
* the same tone when `tone` is not set explicitly.
|
|
12
|
+
*/
|
|
5
13
|
group?: string | number;
|
|
14
|
+
/** Explicit data-vis tone; overrides the group-derived tone. */
|
|
6
15
|
tone?: ForceGraphTone;
|
|
16
|
+
/** Relative node radius weight (defaults to 1). */
|
|
7
17
|
weight?: number;
|
|
18
|
+
/** Pin the node to a fixed position (ignored by the simulation). */
|
|
8
19
|
fx?: number;
|
|
9
20
|
fy?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Visual shape for the node. Defaults to 'dot' (circle).
|
|
23
|
+
* Supported: 'dot'|'circle', 'diamond', 'star', 'hexagon', 'box'|'square', 'triangle'.
|
|
24
|
+
*/
|
|
25
|
+
shape?: ForceGraphNodeShape;
|
|
10
26
|
};
|
|
11
27
|
export type ForceGraphEdge = {
|
|
28
|
+
/** Source node id. */
|
|
12
29
|
source: string;
|
|
30
|
+
/** Target node id. */
|
|
13
31
|
target: string;
|
|
32
|
+
/** Optional relation label, surfaced in the tooltip on hover/focus. */
|
|
14
33
|
relation?: string;
|
|
34
|
+
/**
|
|
35
|
+
* When true the link renders as a dashed/faded "weak" link. Lets callers
|
|
36
|
+
* map a confidence dimension onto link strength without extra props.
|
|
37
|
+
*/
|
|
38
|
+
weak?: boolean;
|
|
39
|
+
};
|
|
40
|
+
export type ForceGraphLegendEntry = {
|
|
41
|
+
/** Label shown in the legend. */
|
|
42
|
+
label: string;
|
|
43
|
+
/** Shape for this entry (node legend). Absent = line-style legend entry. */
|
|
44
|
+
shape?: ForceGraphNodeShape;
|
|
45
|
+
/** Tone for this entry. Defaults to category1. */
|
|
46
|
+
tone?: ForceGraphTone;
|
|
47
|
+
/** When true, renders as a dashed line (edge legend). */
|
|
15
48
|
weak?: boolean;
|
|
16
49
|
};
|
|
17
50
|
export type ForceGraphProps = {
|
|
18
51
|
nodes: ForceGraphNode[];
|
|
19
52
|
edges: ForceGraphEdge[];
|
|
20
53
|
label?: string;
|
|
54
|
+
width?: number;
|
|
55
|
+
height?: number;
|
|
56
|
+
nodeRadius?: number;
|
|
57
|
+
showLabels?: boolean;
|
|
58
|
+
iterations?: number;
|
|
21
59
|
selectedIds?: string[];
|
|
22
60
|
focusId?: string | null;
|
|
61
|
+
legend?: ForceGraphLegendEntry[];
|
|
62
|
+
onSelect?: (id: string) => void;
|
|
63
|
+
onOpenEntity?: (id: string) => void;
|
|
64
|
+
onEdgeHover?: (edge: ForceGraphEdge) => void;
|
|
23
65
|
class?: string;
|
|
24
66
|
};
|
|
67
|
+
export declare function nodeShapePath(shape: ForceGraphNodeShape | undefined, r: number): string | null;
|
|
25
68
|
export declare const ForceGraph: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
26
69
|
nodes: {
|
|
27
|
-
type:
|
|
70
|
+
type: PropType<ForceGraphNode[]>;
|
|
28
71
|
required: true;
|
|
29
72
|
};
|
|
30
73
|
edges: {
|
|
31
|
-
type:
|
|
74
|
+
type: PropType<ForceGraphEdge[]>;
|
|
32
75
|
required: true;
|
|
33
76
|
};
|
|
34
77
|
label: {
|
|
35
78
|
type: StringConstructor;
|
|
36
79
|
default: string;
|
|
37
80
|
};
|
|
81
|
+
width: {
|
|
82
|
+
type: NumberConstructor;
|
|
83
|
+
default: number;
|
|
84
|
+
};
|
|
85
|
+
height: {
|
|
86
|
+
type: NumberConstructor;
|
|
87
|
+
default: number;
|
|
88
|
+
};
|
|
89
|
+
nodeRadius: {
|
|
90
|
+
type: NumberConstructor;
|
|
91
|
+
default: number;
|
|
92
|
+
};
|
|
93
|
+
showLabels: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
iterations: {
|
|
98
|
+
type: NumberConstructor;
|
|
99
|
+
default: number;
|
|
100
|
+
};
|
|
38
101
|
selectedIds: {
|
|
39
|
-
type:
|
|
102
|
+
type: PropType<string[]>;
|
|
40
103
|
default: () => never[];
|
|
41
104
|
};
|
|
42
105
|
focusId: {
|
|
43
|
-
type:
|
|
106
|
+
type: PropType<string | null>;
|
|
44
107
|
default: null;
|
|
45
108
|
};
|
|
109
|
+
legend: {
|
|
110
|
+
type: PropType<ForceGraphLegendEntry[]>;
|
|
111
|
+
default: undefined;
|
|
112
|
+
};
|
|
113
|
+
onSelect: {
|
|
114
|
+
type: PropType<(id: string) => void>;
|
|
115
|
+
default: undefined;
|
|
116
|
+
};
|
|
117
|
+
onOpenEntity: {
|
|
118
|
+
type: PropType<(id: string) => void>;
|
|
119
|
+
default: undefined;
|
|
120
|
+
};
|
|
121
|
+
onEdgeHover: {
|
|
122
|
+
type: PropType<(edge: ForceGraphEdge) => void>;
|
|
123
|
+
default: undefined;
|
|
124
|
+
};
|
|
46
125
|
class: {
|
|
47
126
|
type: StringConstructor;
|
|
48
127
|
default: undefined;
|
|
49
128
|
};
|
|
50
|
-
}>, () =>
|
|
129
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
51
130
|
[key: string]: any;
|
|
52
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
131
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
132
|
+
select: (_id: string) => true;
|
|
133
|
+
openEntity: (_id: string) => true;
|
|
134
|
+
edgeHover: (_edge: ForceGraphEdge) => true;
|
|
135
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
136
|
nodes: {
|
|
54
|
-
type:
|
|
137
|
+
type: PropType<ForceGraphNode[]>;
|
|
55
138
|
required: true;
|
|
56
139
|
};
|
|
57
140
|
edges: {
|
|
58
|
-
type:
|
|
141
|
+
type: PropType<ForceGraphEdge[]>;
|
|
59
142
|
required: true;
|
|
60
143
|
};
|
|
61
144
|
label: {
|
|
62
145
|
type: StringConstructor;
|
|
63
146
|
default: string;
|
|
64
147
|
};
|
|
148
|
+
width: {
|
|
149
|
+
type: NumberConstructor;
|
|
150
|
+
default: number;
|
|
151
|
+
};
|
|
152
|
+
height: {
|
|
153
|
+
type: NumberConstructor;
|
|
154
|
+
default: number;
|
|
155
|
+
};
|
|
156
|
+
nodeRadius: {
|
|
157
|
+
type: NumberConstructor;
|
|
158
|
+
default: number;
|
|
159
|
+
};
|
|
160
|
+
showLabels: {
|
|
161
|
+
type: BooleanConstructor;
|
|
162
|
+
default: boolean;
|
|
163
|
+
};
|
|
164
|
+
iterations: {
|
|
165
|
+
type: NumberConstructor;
|
|
166
|
+
default: number;
|
|
167
|
+
};
|
|
65
168
|
selectedIds: {
|
|
66
|
-
type:
|
|
169
|
+
type: PropType<string[]>;
|
|
67
170
|
default: () => never[];
|
|
68
171
|
};
|
|
69
172
|
focusId: {
|
|
70
|
-
type:
|
|
173
|
+
type: PropType<string | null>;
|
|
71
174
|
default: null;
|
|
72
175
|
};
|
|
176
|
+
legend: {
|
|
177
|
+
type: PropType<ForceGraphLegendEntry[]>;
|
|
178
|
+
default: undefined;
|
|
179
|
+
};
|
|
180
|
+
onSelect: {
|
|
181
|
+
type: PropType<(id: string) => void>;
|
|
182
|
+
default: undefined;
|
|
183
|
+
};
|
|
184
|
+
onOpenEntity: {
|
|
185
|
+
type: PropType<(id: string) => void>;
|
|
186
|
+
default: undefined;
|
|
187
|
+
};
|
|
188
|
+
onEdgeHover: {
|
|
189
|
+
type: PropType<(edge: ForceGraphEdge) => void>;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
73
192
|
class: {
|
|
74
193
|
type: StringConstructor;
|
|
75
194
|
default: undefined;
|
|
76
195
|
};
|
|
77
196
|
}>> & Readonly<{
|
|
78
|
-
onSelect?: ((
|
|
79
|
-
onOpenEntity?: ((
|
|
197
|
+
onSelect?: ((_id: string) => any) | undefined;
|
|
198
|
+
onOpenEntity?: ((_id: string) => any) | undefined;
|
|
199
|
+
onEdgeHover?: ((_edge: ForceGraphEdge) => any) | undefined;
|
|
80
200
|
}>, {
|
|
81
201
|
class: string;
|
|
82
202
|
label: string;
|
|
203
|
+
legend: ForceGraphLegendEntry[];
|
|
204
|
+
onSelect: (id: string) => void;
|
|
205
|
+
width: number;
|
|
206
|
+
height: number;
|
|
207
|
+
nodeRadius: number;
|
|
208
|
+
showLabels: boolean;
|
|
209
|
+
iterations: number;
|
|
83
210
|
selectedIds: string[];
|
|
84
211
|
focusId: string | null;
|
|
212
|
+
onOpenEntity: (id: string) => void;
|
|
213
|
+
onEdgeHover: (edge: ForceGraphEdge) => void;
|
|
85
214
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
86
215
|
//# sourceMappingURL=ForceGraph.d.ts.map
|
package/dist/ForceGraph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForceGraph.d.ts","sourceRoot":"","sources":["../src/ForceGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ForceGraph.d.ts","sourceRoot":"","sources":["../src/ForceGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,QAAQ,EACb,KAAK,KAAK,EACX,MAAM,KAAK,CAAC;AAMb,MAAM,MAAM,cAAc,GACtB,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GAAG,QAAQ,GAChB,SAAS,GACT,MAAM,GACN,SAAS,GACT,KAAK,GAAG,QAAQ,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,cAAc,GAAG;IAC3B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,gEAAgE;IAChE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,4E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