@mintplayer/react-bootstrap 19.15.0 → 19.17.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,11 +1,15 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import { createComponent as t } from "@lit/react";
|
|
3
3
|
import { MpCodeSnippet as o } from "@mintplayer/web-components/code-snippet";
|
|
4
|
-
const
|
|
4
|
+
const p = t({
|
|
5
5
|
react: e,
|
|
6
6
|
tagName: "mp-code-snippet",
|
|
7
|
-
elementClass: o
|
|
7
|
+
elementClass: o,
|
|
8
|
+
events: {
|
|
9
|
+
onLanguageDetected: "language-detected",
|
|
10
|
+
onLineActivate: "line-activate"
|
|
11
|
+
}
|
|
8
12
|
});
|
|
9
13
|
export {
|
|
10
|
-
|
|
14
|
+
p as BsCodeSnippet
|
|
11
15
|
};
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
import { EventName } from '@lit/react';
|
|
1
2
|
import { MpCodeSnippet } from '@mintplayer/web-components/code-snippet';
|
|
2
3
|
/**
|
|
3
|
-
* React wrapper for `<mp-code-snippet>`. Side-effect-registers the WC via
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* React wrapper for `<mp-code-snippet>`. Side-effect-registers the WC via the
|
|
5
|
+
* import above; props are typed off MpCodeSnippet, so `annotations` and
|
|
6
|
+
* `lineHref` (an object and a function) are assigned through the element ref
|
|
7
|
+
* by @lit/react rather than being stringified into attributes.
|
|
8
|
+
*
|
|
9
|
+
* The `events` map is what turns the element's CustomEvents into React props.
|
|
10
|
+
* Without it `language-detected` and `line-activate` are simply unreachable
|
|
11
|
+
* from React — there is no `on*` prop for an event @lit/react was not told
|
|
12
|
+
* about.
|
|
7
13
|
*/
|
|
8
|
-
export declare const BsCodeSnippet: import('@lit/react').ReactWebComponent<MpCodeSnippet, {
|
|
14
|
+
export declare const BsCodeSnippet: import('@lit/react').ReactWebComponent<MpCodeSnippet, {
|
|
15
|
+
onLanguageDetected: EventName<CustomEvent<{
|
|
16
|
+
language: string;
|
|
17
|
+
}>>;
|
|
18
|
+
onLineActivate: EventName<CustomEvent<{
|
|
19
|
+
line: number;
|
|
20
|
+
}>>;
|
|
21
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/react-bootstrap",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.17.0",
|
|
4
4
|
"description": "React 19 wrappers around @mintplayer/web-components. Each sub-entry maps one-to-one with a WC sub-entry and exposes typed React components via @lit/react's createComponent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|