Commit graph

118 commits

Author SHA1 Message Date
PalmDevs
5d379b1652
fix(lib/discord/modules/settings): correct filter for SettingListRenderer on 319203+ 2026-02-26 17:11:20 +07:00
PalmDevs
8f87048695
fix(lib/discord/common): correct Constants filter 2026-02-25 22:09:31 +07:00
PalmDevs
df60eb5272
fix: update generated API types 2026-01-25 11:04:52 +07:00
PalmDevs
c1a7ddbd44
fix(lib/discord): correct AppStartPerformance filter 2026-01-24 18:01:48 +07:00
PalmDevs
d8897d8c4d
feat(lib/discord/common): expose and switch filters to use ImportTrackerModuleId 2026-01-17 20:54:14 +07:00
PalmDevs
a87d4ced5c
fix(lib/modules)!: decouple discord-specific helpers to lib/discord 2026-01-17 20:41:14 +07:00
PalmDevs
b5b3033171
fix(lib/discord/design): update FormSwitch filter for 307201+ 2025-11-21 14:13:26 +07:00
PalmDevs
6c63ba5a31
fix: settings patches and definitions for 306203+ 2025-11-13 16:55:23 +07:00
PalmDevs
1a8704fae6
fix(lib/discord): module filters for 304203+ 2025-11-01 20:09:44 +07:00
PalmDevs
772bd2a283
fix(lib): use new nested withDependencies filters everywhere 2025-10-29 19:34:38 +07:00
PalmDevs
b6d1cff9f5
feat(lib/modules)!: filter scopes + fixes and improvements
# Features

- Filters now control what types of modules they see.
- Filters can be reinstantiated via `.new()`
- Added the `Not` type in @revenge-mod/utils/types

# Fixes

- Pitfall with `lookupModules` and `withDependencies` without `uninitialize: true` fixed.
- Filter type-metadata is now stored in a single object instead of multiple parameters.
- Incorrect caching behavior for `lookupModules` where cache always reports not found if you finish the iterator.
- Also attempt to report not found when using `lookupModule`.
2025-10-28 01:01:17 +07:00
PalmDevs
f61661ac27
fix(lib/discord/design): correct types for Design and TableRow 2025-10-26 13:55:22 +07:00
PalmDevs
a2f330e7e2
chore: remove #lib syntax
Autocomplete is annoying.
2025-10-22 22:24:26 +07:00
PalmDevs
86cf81ca56
fix(lib/discord/types): add missing justify and align prop for Stack 2025-10-22 22:13:47 +07:00
PalmDevs
38becc38a1
fix(lib/discord/types): add missing props for SettingsListRenderer.SettingsList 2025-10-18 19:05:52 +07:00
PalmDevs
17fd1ec0bd
fix(plugins/settings): correct path for SettingsNavigator patch 2025-10-13 00:45:07 +07:00
PalmDevs
d0ee081ac5
fix(lib): update filters 2025-10-12 01:27:53 +07:00
PalmDevs
dba76a9f81
feat(lib): proper caching for assets and modules lib 2025-09-16 01:02:13 +07:00
PalmDevs
e389a6b61b
fix(lib/discord/patches/flux): bind function instead of using Reflect.apply
It may result in better performance.
2025-09-10 00:53:51 +07:00
PalmDevs
3a57fe820c
fix(lib): support filtering for 297202 2025-09-04 01:29:16 +07:00
Palm
5f5fc6f2b2
feat!: module finders refactor (#6)
- Renamed `byX` filters to `withX`.
  It is more correct. For example: You don't lookup, wait for, or get modules **BY** props. You lookup, wait for, and get modules **WITH** props.
- Renamed `*byImportedPath` to `*withImportedPath`
  For consistency with the above change.
- Renamed `getModule` to `getModules`.
  The API allows getting multiple modules and not just a single one. Types are renamed as well.
  `getModuleByImportedPath` remains the same as it only gets one single module with a unique imported path.
- `withX` filter **helpers** removed.
  They can now be replaced with the new capability-based `and` filter.
- `preferExports` and `moduleStateAware` filters removed.
  They can now be replaced with the new capability-based `and` filter.
- Composite finders renamed.
  `some` -> `or`, `every` -> `and`
- Composite finders takes a capability-based approach.
- Filter generators now need to attach runtime flag to let the system know whether the generated filter can be used to filter modules without proper exports or not.

## Misc.

- Removed useless unsub call in Profile Badges
- Use `queueMicrotask` with `asap`

# Features

## Capability-based approach to composite filters

```js
// Old
byProps(...).withDependencies(...)
// Old, same as: preferExports(byProps(...), byDependencies(...))
every(byDependencies(...), byProps(...))
// Old, ordering matters, this would fail unexpectedly!
every(byProps(...), byDependencies(...))

// New
withProps(...).and(withDependencies(...))
// New (as well), ordering doesn't matter, this has the same result as above
withDependencies(...).and(withProps(...))
```
2025-08-30 09:19:57 +07:00
PalmDevs
c33086435e
feat(lib/modules/finders/filters): deprecate undefined and allow null in byDependencies
`null` is more correct semantically (and also shorter to type). `undefined` should only be module IDs that cannot be found, in which case, a warning log has been added.
2025-08-25 21:22:06 +07:00
PalmDevs
04fccbb149
fix(lib/discord/design): update filter for Design on 295204+ 2025-08-20 20:20:49 +07:00
PalmDevs
c2d12321f6
chore(lib/modules): simplify imports 2025-08-13 01:27:49 +07:00
PalmDevs
ac3546a53d
chore: make internal library imports more readable 2025-08-13 00:51:28 +07:00
PalmDevs
7712b818f8
feat(lib/discord)!: flatten api structure 2025-08-11 17:21:12 +07:00
PalmDevs
3963db69b8
feat(lib/discord/flux): add optional generics 2025-08-11 17:00:44 +07:00
PalmDevs
28f8c02869
fix(lib/discord/flux): patch dispatch method instead of using interceptors
Previously patched events weren't being returned at all.
2025-08-11 16:47:59 +07:00
PalmDevs
05c0b093ea
fix(lib): remove and add exports 2025-08-09 01:02:44 +07:00
PalmDevs
e7b4413675
chore: format 2025-08-05 20:39:09 +07:00
PalmDevs
ce188950cd
feat(lib/discord): add flux APIs 2025-08-05 20:36:08 +07:00
PalmDevs
ed966a7772
feat(lib/discord/common): export module IDs from lookups 2025-08-04 09:43:00 +07:00
PalmDevs
1598a4940c
chore(lib): use asap function to queue tasks 2025-08-03 14:18:16 +07:00
PalmDevs
3bb2203ff9
fix: get native modules in bridgeless correctly 2025-08-02 17:25:07 +07:00
PalmDevs
578b78dd7e
feat(lib/modules/finders/waits): cached-only waits 2025-07-31 19:15:08 +07:00
PalmDevs
7d7d6a4358
feat(lib): small performance improvements 2025-07-27 17:07:50 +07:00
PalmDevs
8f4305e767
feat(lib/discord/types): type TableCheckboxRow TableRadioGroup TableRadioRow in Design 2025-07-26 20:01:30 +07:00
PalmDevs
a586c0cebd
feat(lib/discord/modules/settings): new method to refresh SettingsOverviewScreen and SettingsNavigator 2025-07-21 22:40:28 +07:00
PalmDevs
2e455cf2c5
feat: add ability to decorate plugin APIs, move private properties to WeakMap stores 2025-07-20 23:06:56 +07:00
PalmDevs
78614c1cc9
chore: move SettingRendererConfig patches to lib, refactor how lifecycles are run 2025-07-19 23:23:32 +07:00
PalmDevs
005931e338
fix(lib/discord/types): type props in RouteSettingsItem 2025-07-19 14:01:35 +07:00
PalmDevs
86e02202b6
feat(lib/discord/modules/settings): switch to objects for storage 2025-07-18 23:44:31 +07:00
PalmDevs
35ca73f531
fix(lib/discord/modules/settings): refactor and get updated state before replacing in refreshSettingsOverviewScreen 2025-07-18 18:26:17 +07:00
PalmDevs
75b026a46c
fix(lib/discord/modules/settings): get rehydrated navigation state in refreshSettingsOverviewScreen 2025-07-18 01:21:37 +07:00
PalmDevs
15499cbdab
fix(lib/discord/types): use StyleProp for component style properties 2025-07-18 01:15:39 +07:00
PalmDevs
ab8e2a5772
fix(lib/discord/modules/settings): fix edge case on renavigation in refreshSettingsOverviewScreen
If a route was replaced before renavigation, renavigation would fail. This commit fixes that issue.
2025-07-14 23:46:28 +07:00
PalmDevs
996e4f5994
fix(lib/utils/proxy)!: disallow passing type-strings to ProxifyOptions.hint 2025-07-13 19:18:41 +07:00
PalmDevs
96a8d576f4
fix(lib/discord/types): correct AlertModalProps['title'] type 2025-07-13 18:03:12 +07:00
PalmDevs
6a38136762
fix(lib)!: breaking changes
- Remove `noopFalse` from `@revenge-mod/utils/callback`
- Do not return result from unpatch/undo/unsub functions
- `onSettingsModulesLoaded` from `@revenge-mod/discord/modules/settings` now calls the callback immediately if settings modules are already loaded instead of throwing
2025-07-13 15:53:44 +07:00
PalmDevs
37a20160db
fix: do not use emitter to emit error event
Discord's EventEmitter handles the `error` event specially for some reason.
2025-07-13 00:26:22 +07:00