mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
expose useful libs (#4489)
* expose useful libs * Update UIPluginApi.md
This commit is contained in:
@@ -12,6 +12,10 @@ An example using various aspects of `PluginApi` may be found in the source code
|
|||||||
|
|
||||||
An instance of the React library.
|
An instance of the React library.
|
||||||
|
|
||||||
|
### `ReactDOM`
|
||||||
|
|
||||||
|
An instance of the ReactDOM library.
|
||||||
|
|
||||||
### `GQL`
|
### `GQL`
|
||||||
|
|
||||||
This namespace contains the generated graphql client interface. This is a low-level interface. In many cases, `StashService` should be used instead.
|
This namespace contains the generated graphql client interface. This is a low-level interface. In many cases, `StashService` should be used instead.
|
||||||
@@ -25,6 +29,8 @@ This namespace contains the generated graphql client interface. This is a low-le
|
|||||||
- `Intl`
|
- `Intl`
|
||||||
- `FontAwesomeRegular`
|
- `FontAwesomeRegular`
|
||||||
- `FontAwesomeSolid`
|
- `FontAwesomeSolid`
|
||||||
|
- `Mousetrap`
|
||||||
|
- `MousetrapPause`
|
||||||
|
|
||||||
### `register`
|
### `register`
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
import ReactDOM from "react-dom";
|
||||||
import * as ReactRouterDOM from "react-router-dom";
|
import * as ReactRouterDOM from "react-router-dom";
|
||||||
|
import Mousetrap from "mousetrap";
|
||||||
|
import MousetrapPause from "mousetrap-pause";
|
||||||
import NavUtils from "./utils/navigation";
|
import NavUtils from "./utils/navigation";
|
||||||
import { HoverPopover } from "./components/Shared/HoverPopover";
|
import { HoverPopover } from "./components/Shared/HoverPopover";
|
||||||
import { TagLink } from "./components/Shared/TagLink";
|
import { TagLink } from "./components/Shared/TagLink";
|
||||||
@@ -97,6 +100,7 @@ export function RegisterComponent(component: string, fn: Function) {
|
|||||||
}
|
}
|
||||||
export const PluginApi = {
|
export const PluginApi = {
|
||||||
React,
|
React,
|
||||||
|
ReactDOM,
|
||||||
GQL,
|
GQL,
|
||||||
libraries: {
|
libraries: {
|
||||||
ReactRouterDOM,
|
ReactRouterDOM,
|
||||||
@@ -105,6 +109,8 @@ export const PluginApi = {
|
|||||||
Intl,
|
Intl,
|
||||||
FontAwesomeRegular,
|
FontAwesomeRegular,
|
||||||
FontAwesomeSolid,
|
FontAwesomeSolid,
|
||||||
|
Mousetrap,
|
||||||
|
MousetrapPause,
|
||||||
},
|
},
|
||||||
register: {
|
register: {
|
||||||
// register a route to be added to the main router
|
// register a route to be added to the main router
|
||||||
|
|||||||
Reference in New Issue
Block a user