meow
This commit is contained in:
5
frontend/index.tsx
Normal file
5
frontend/index.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { definePlugin } from '@steambrew/client';
|
||||
|
||||
export default definePlugin(() => {
|
||||
console.log('.rip Extension: Frontend plugin initializing...');
|
||||
});
|
||||
16
frontend/settings.tsx
Normal file
16
frontend/settings.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { BindPluginSettings } from '@steambrew/client';
|
||||
|
||||
type CheckBox = true | false;
|
||||
type EnumerateInternal<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : EnumerateInternal<N, [...Acc, Acc['length']]>;
|
||||
type Enumerate<Min extends number, Max extends number> = Exclude<EnumerateInternal<Max>, EnumerateInternal<Min>> | Max;
|
||||
type NumberTextInput<Min extends number, Max extends number> = Min | Enumerate<Min, Max>;
|
||||
type DropDown<T extends readonly any[]> = T[number];
|
||||
|
||||
interface SettingsProps {
|
||||
doFrontEndCall: CheckBox;
|
||||
overrideWebkitDocument: CheckBox;
|
||||
numberTextInput: NumberTextInput<1, 100>;
|
||||
frontEndMessage: DropDown<['hello', 'hi', 'hello again', false, 69]>;
|
||||
}
|
||||
|
||||
export let PluginSettings: SettingsProps = BindPluginSettings();
|
||||
9
frontend/tsconfig.json
Normal file
9
frontend/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"jsxFactory": "window.SP_REACT.createElement",
|
||||
"jsxFragmentFactory": "window.SP_REACT.Fragment"
|
||||
},
|
||||
"include": ["."],
|
||||
"exclude": ["node_modules", "../webkit"]
|
||||
}
|
||||
Reference in New Issue
Block a user