refactor: Overhaul Plugin Architecture & Playground UI (#1846)

* refactor: Move Plugins Out and Consolidate with Multisrc

* feat: Overhaul Playground UI

* feat: Add Filters to New UI

* feat: Persist Selected Plugin

* feat: Add Direct Parse Novel/Chapter Options and Feedback Toasts

[skip ci]

* feat: UX Improvements

* chore: Update Plugin Path in Publish Workflow

* fix: Add Backward Compatibility

* chore: Update Plugin Publishing Script
This commit is contained in:
Rajarshee Chatterjee
2025-10-20 22:54:08 +05:30
committed by GitHub
parent 252beff0bf
commit 20c2b75b01
363 changed files with 6848 additions and 3007 deletions
+25 -24
View File
@@ -11,7 +11,7 @@
Most of the Plugin/Novel type definitions accessed using the `Plugin` namespace imported via
```ts
import { Plugin } from "@typings/plugin";
import { Plugin } from '@/types/plugin';
```
### PluginBase
@@ -349,23 +349,24 @@ It is an object representing information how to store/access the novel
You can use the default `Cover not available` cover by importing
```ts
import { defaultCover } from "@libs/defaultCover";
import { defaultCover } from '@libs/defaultCover';
```
---
### SourceNovel
| Field | Type | Required | Desciption |
| ----- | ------ | -------- | ---------- |
| url | string | yes | |
| name | string | no | string |
|cover|`string`|no||
|genres|`string`|no||
|summary|`string`|no||
|author|`string`|no||
|artist|`string`|no||
|status|[NovelStatus] or `string`|no||
| Field | Type | Required | Desciption |
| ------- | ------------------------- | -------- | ---------- |
| url | string | yes | |
| name | string | no | string |
| cover | `string` | no | |
| genres | `string` | no | |
| summary | `string` | no | |
| author | `string` | no | |
| artist | `string` | no | |
| status | [NovelStatus] or `string` | no | |
chapters?: ChapterItem[];
---
@@ -379,7 +380,7 @@ import { defaultCover } from "@libs/defaultCover";
`Filters` and `FilterTypes` are not in the `Plugin` namespace and are from `@libs/filterInputs` file:
```ts
import { FilterTypes, Filters } from "@libs/filterInputs";
import { FilterTypes, Filters } from '@libs/filterInputs';
```
There are 2 main objects when using filters:
@@ -418,11 +419,11 @@ options.filters.order
filters = {
genre: {
type: FilterTypes.CheckboxGroup,
label: "Genres",
label: 'Genres',
value: [],
options: [
{ label: "Isekai", value: "isekai" },
{ label: "Romance", value: "romans" },
{ label: 'Isekai', value: 'isekai' },
{ label: 'Romance', value: 'romans' },
],
},
} satisfies Filters;
@@ -445,12 +446,12 @@ Types of filters supported
```ts
options: [
{
label: "default", // in-app label
value: "", // in-code value
label: 'default', // in-app label
value: '', // in-code value
},
{
label: "Value ABC",
value: "abc",
label: 'Value ABC',
value: 'abc',
},
];
```
@@ -460,12 +461,12 @@ options: [
```ts
options: [
{
label: "Value ABC", // in-app label
value: "abc", // in-code value
label: 'Value ABC', // in-app label
value: 'abc', // in-code value
},
{
label: "Value DEF",
value: "def",
label: 'Value DEF',
value: 'def',
},
];
```
+3 -3
View File
@@ -1,11 +1,11 @@
import { fetchApi, fetchProto, fetchText } from '@libs/fetch';
import { Plugin } from '@typings/plugin';
import { fetchApi, fetchProto, fetchText } from '@/lib/fetch';
import { Plugin } from '@/types/plugin';
import { Filters } from '@libs/filterInputs';
import { load as loadCheerio } from 'cheerio';
import { defaultCover } from '@libs/defaultCover';
import { NovelStatus } from '@libs/novelStatus';
// import { isUrlAbsolute } from '@libs/isAbsoluteUrl';
// import { storage, localStorage, sessionStorage } from '@libs/storage';
// import { storage, localStorage, sessionStorage } from '@/lib/storage';
// import { encode, decode } from 'urlencode';
// import dayjs from 'dayjs';
// import { Parser } from 'htmlparser2';