@mintplayer/vue-bootstrap 3.16.0 → 3.18.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/code-snippet/index.mjs
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, ref as f, onMounted as d, watch as m, openBlock as g, createElementBlock as v, mergeProps as B, renderSlot as H } from "vue";
|
|
2
2
|
import "@mintplayer/web-components/code-snippet";
|
|
3
|
-
const
|
|
3
|
+
const y = /* @__PURE__ */ c({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "BsCodeSnippet",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
props: {
|
|
7
|
+
annotations: {},
|
|
8
|
+
lineHref: { type: [Function, null] }
|
|
9
|
+
},
|
|
10
|
+
emits: ["language-detected", "line-activate"],
|
|
11
|
+
setup(a, { expose: s, emit: p }) {
|
|
12
|
+
const n = a, l = p, t = f(null);
|
|
13
|
+
function r() {
|
|
14
|
+
const e = t.value;
|
|
15
|
+
e && (e.annotations = n.annotations ?? [], e.lineHref = n.lineHref ?? null);
|
|
16
|
+
}
|
|
17
|
+
d(r), m(() => [n.annotations, n.lineHref], r, { deep: !0 });
|
|
18
|
+
function u(e) {
|
|
19
|
+
t.value?.scrollToLine(e);
|
|
20
|
+
}
|
|
21
|
+
return s({ scrollToLine: u, element: t }), (e, o) => (g(), v("mp-code-snippet", B({
|
|
22
|
+
ref_key: "element",
|
|
23
|
+
ref: t
|
|
24
|
+
}, e.$attrs, {
|
|
25
|
+
onLanguageDetected: o[0] || (o[0] = (i) => l("language-detected", i.detail.language)),
|
|
26
|
+
onLineActivate: o[1] || (o[1] = (i) => l("line-activate", i))
|
|
27
|
+
}), [
|
|
28
|
+
H(e.$slots, "default")
|
|
9
29
|
], 16));
|
|
10
30
|
}
|
|
11
31
|
});
|
|
12
32
|
export {
|
|
13
|
-
|
|
33
|
+
y as BsCodeSnippet
|
|
14
34
|
};
|
|
@@ -1,13 +1,39 @@
|
|
|
1
|
+
import { CodeLineAnnotation, MpCodeSnippet } from '@mintplayer/web-components/code-snippet';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Sparse per-line markers. */
|
|
4
|
+
annotations?: CodeLineAnnotation[];
|
|
5
|
+
/** Turns each line number into a real link. */
|
|
6
|
+
lineHref?: ((line: number) => string) | null;
|
|
7
|
+
};
|
|
8
|
+
/** Scroll a line into view; delegated so re-requesting the current line still scrolls. */
|
|
9
|
+
declare function scrollToLine(line: number): void;
|
|
1
10
|
declare function __VLS_template(): {
|
|
2
11
|
attrs: Partial<{}>;
|
|
3
12
|
slots: {
|
|
4
13
|
default?(_: {}): any;
|
|
5
14
|
};
|
|
6
|
-
refs: {
|
|
15
|
+
refs: {
|
|
16
|
+
element: unknown;
|
|
17
|
+
};
|
|
7
18
|
rootEl: any;
|
|
8
19
|
};
|
|
9
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
22
|
+
scrollToLine: typeof scrollToLine;
|
|
23
|
+
element: import('vue').Ref<MpCodeSnippet | null, MpCodeSnippet | null>;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
25
|
+
"language-detected": (language: string) => any;
|
|
26
|
+
"line-activate": (event: CustomEvent<{
|
|
27
|
+
line: number;
|
|
28
|
+
}>) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
"onLanguage-detected"?: ((language: string) => any) | undefined;
|
|
31
|
+
"onLine-activate"?: ((event: CustomEvent<{
|
|
32
|
+
line: number;
|
|
33
|
+
}>) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
35
|
+
element: unknown;
|
|
36
|
+
}, any>;
|
|
11
37
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
38
|
export default _default;
|
|
13
39
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/vue-bootstrap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"description": "Vue 3.5 SFC adapters around @mintplayer/web-components. Each sub-entry maps one-to-one with a WC sub-entry and exposes typed Vue components with v-model support for input WCs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|