
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@apad/setting-panel
Advanced tools
out-of-the-box feature and ts hint support. design with signal pattern(like mobx), provide user interface and easy manage settings
out-of-the-box feature and ts hint support. design with signal pattern(like mobx), provide user interface and easy manage settings.
config.ts
import { config, initSetting } from '@apad/setting-panel'
import { mobx } from '@apad/setting-panel/react'
type FontSizeType = 'small' | 'middle' | 'big'
export const { configStore, openSettingPanel } = initSetting({
settings: {
bg: '#6cf',
isDark: false,
// support ts type check
type: 'style-a' as 'style-a' | 'style-b',
// arr type
arr: ['a', 'b', 'c'],
// complex config. add description, label
lineHeight: {
label: 'line height',
desc: 'set text line height',
defaultValue: 1,
},
// group select support
fontSize: config<FontSizeType>({
type: 'group',
group: [
'middle',
'small',
// complex config
{
value: 'big',
label: 'BIG FONT!',
desc: 'BIG BIG BIG',
},
],
defaultValue: 'middle',
}),
},
mobx,
})
App.tsx
import { configStore, openSettingPanel } from './config'
// make component auto update when configStore change
import { observer } from '@apad/setting-panel/react'
export default observer(() => {
return (
<div
style={{ background: configStore.bg }}
onClick={() => openSettingPanel()}
>
type:
{' '}
{configStore.type}
</div>
)
})
very good! You can replace my incomplete version mini-mobx to real mobx🤣
config.ts
// ...
import { makeAutoObservable, observe } from 'mobx'
import { observer } from 'mobx-react'
initSetting({
mobx: {
makeAutoObservable,
observer,
observe,
},
// ...
})
App.tsx
// use mobx-react
// import { observer } from '@apad/setting-panel/react'
import { observer } from 'mobx-react'
export default observer(() => {
// ...
})
[!WARNING] Unsupport now, only support in ^0.2 version
I recommend to use preact version, It is smaller than the full react version
// import { initSetting, config } from '@apad/setting-panel'
import { config, initSetting } from '@apad/setting-panel/preact'
// import { mobx } from '@apad/setting-panel/react'
// Only can use origin mobx
import { makeAutoObservable, observe } from 'mobx'
import { observer } from 'mobx-react'
// ...
FAQs
out-of-the-box feature and ts hint support. design with signal pattern(like mobx), provide user interface and easy manage settings
The npm package @apad/setting-panel receives a total of 33 weekly downloads. As such, @apad/setting-panel popularity was classified as not popular.
We found that @apad/setting-panel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.