ITADN
solidjs-community/solid-primitives
solidjs-community/solid-primitives · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

Solid Primitives

Solid Primitives

pnpm combined-downloads

一个致力于开发高质量、由社区贡献的 Solid 原语的项目。所有工具均经过充分测试并持续维护。对仓库的每次贡献都会进行质量检查,并以最高标准进行维护。最终目标是通过一组三级原语来扩展 Solid 的一级和二级原语。

尽管 Solid Primitives 并非由 SolidJS 核心团队官方维护,但它由 SolidJS 核心团队和生态系统团队的成员管理。这种分离使得核心库能够独立迭代,同时允许 Solid Primitives 与未来计划保持同步。

理念

Solid Primitives 的目标是封装客户端和服务器端功能,以提供完全响应式的 API 层。归根结底,我们的三级原语越深入根基,它们在 Solid 基础生态系统中就越能充当基石。凭借构建良好且可复用的基础,应用程序整体上可以更小(聚合树摇优化带来的好处)、更简洁(可读性)且更稳定(一致且受管理的测试 + 维护)。

原语

名称阶段原语大小NPM

输入

active-elementSTAGEcreateActiveElement
createFocusSignal
SIZEVERSION
autofocusSTAGEautofocus
createAutofocus
SIZEVERSION
input-maskSTAGEcreateInputMask
createMaskPattern
SIZEVERSION
keyboardSTAGEuseKeyDownList
useCurrentlyHeldKey
useKeyDownSequence
createKeyHold
createShortcut
SIZEVERSION
mouseSTAGEcreateMousePosition
createPositionToElement
SIZEVERSION
pointerSTAGEcreatePointerListeners
createPerPointerListeners
createPointerPosition
createPointerList
SIZEVERSION
scrollSTAGEcreateScrollPosition
useWindowScrollPosition
SIZEVERSION
selectionSTAGEcreateSelectionSIZEVERSION

显示与媒体

audioSTAGEmakeAudio
makeAudioPlayer
createAudio
SIZEVERSION
boundsSTAGEcreateElementBoundsSIZEVERSION
devicesSTAGEcreateDevices
createMicrophones
createSpeakers
createCameras
createAccelerometer
createGyroscope
SIZEVERSION
filesystemSTAGEcreateFileSystem
createSyncFileSystem
createAsyncFileSystem
makeNoFileSystem
makeNoAsyncFileSystem
makeVirtualFileSystem
makeWebAccessFileSystem
makeNodeFileSystem
makeTauriFileSystem
makeChokidarWatcher
rsync
SIZEVERSION
idleSTAGEcreateIdleTimerSIZEVERSION
intersection-observerSTAGEcreateIntersectionObserver
createViewportObserver
createVisibilityObserver
SIZEVERSION
mediaSTAGEmakeMediaQueryListener
createMediaQuery
createBreakpoints
usePrefersDark
SIZEVERSION
page-visibilitySTAGEcreatePageVisibilitySIZEVERSION
resize-observerSTAGEcreateResizeObserver
createWindowSize
createElementSize
SIZEVERSION
stylesSTAGEcreateRemSizeSIZEVERSION

浏览器 API

broadcast-channelSTAGEmakeBroadcastChannel
createBroadcastChannel
SIZEVERSION
clipboardSTAGEcopyClipboard
writeClipboard
createClipboard
SIZEVERSION
event-listenerSTAGEcreateEventListener
createEventSignal
createEventListenerMap
WindowEventListener
DocumentEventListener
SIZEVERSION
event-propsSTAGEcreateEventPropsSIZEVERSION
fullscreenSTAGEcreateFullscreenSIZEVERSION
geolocationSTAGEcreateGeolocation
createGeolocationWatcher
SIZEVERSION
mutation-observerSTAGEcreateMutationObserverSIZEVERSION
permissionSTAGEcreatePermissionSIZEVERSION
storageSTAGEmakePersisted
cookieStorage
tauriStorage
multiplexStorage
storageSync
messageSync
wsSync
multiplexSync
addClearMethod
addWithOptionsMethod
makeObjectStorage
SIZEVERSION
timerSTAGEmakeTimer
createTimer
createTimeoutLoop
createPolled
createIntervalCounter
SIZEVERSION
uploadSTAGEcreateFileUploader
createDropzone
SIZEVERSION
workersSTAGEcreateWorker
createWorkerPool
createSignaledWorker
SIZEVERSION

网络

connectivitySTAGEcreateConnectivitySignalSIZEVERSION
cookiesSTAGEcreateServerCookie
createUserTheme
getCookiesString
SIZEVERSION
fetchSTAGEcreateFetchSIZEVERSION
graphqlSTAGEcreateGraphQLClientSIZEVERSION
sseSTAGEmakeSSE
createSSE
makeSSEWorker
SIZEVERSION
streamSTAGEcreateStream
createAmplitudeStream
createMediaPermissionRequest
createAmplitudeFromStream
createScreen
SIZEVERSION
websocketSTAGEmakeWS
createWS
createWSState
makeReconnectingWS
createReconnectingWS
makeHeartbeatWS
SIZEVERSION

控制流

contextSTAGEcreateContextProvider
MultiProvider
SIZEVERSION
jsx-tokenizerSTAGEcreateTokenizer
createToken
resolveTokens
isToken
SIZEVERSION
keyedSTAGEkeyArray
Key
Entries
MapEntries
SetValues
SIZEVERSION
listSTAGElistArray
List
SIZEVERSION
matchSTAGEMatchTag
MatchValue
SIZEVERSION
rangeSTAGErepeat
mapRange
indexRange
Repeat
Range
IndexRange
SIZEVERSION
refsSTAGEmergeRefs
resolveElements
resolveFirst
Ref
Refs
SIZEVERSION

工具

controlled-propsSTAGEcreateControlledPropSIZEVERSION
cursorSTAGEcreateElementCursor
createBodyCursor
SIZEVERSION
dateSTAGEcreateDate
createDateNow
createTimeDifference
createTimeDifferenceFromNow
createTimeAgo
createCountdown
createCountdownFromNow
SIZEVERSION
event-busSTAGEcreateEventBus
createEmitter
createEventHub
createEventStack
SIZEVERSION
event-dispatcherSTAGEcreateEventDispatcherSIZEVERSION
flux-storeSTAGEcreateFluxStore
createFluxFactory
createActions
createAction
SIZEVERSION
historySTAGEcreateUndoHistorySIZEVERSION
i18nSTAGEflatten
resolveTemplate
translator
scopedTranslator
chainedTranslator
SIZEVERSION
platformSTAGE变量列表SIZEVERSION
promiseSTAGEpromiseTimeout
raceTimeout
until
SIZEVERSION
propsSTAGEcombineProps
filterProps
SIZEVERSION
scheduledSTAGEdebounce
throttle
scheduleIdle
leading
createScheduled
leadingAndTrailing
SIZEVERSION
script-loaderSTAGEcreateScriptLoaderSIZEVERSION
shareSTAGEcreateSocialShare
createWebShare
SIZEVERSION

响应式

db-storeSTAGEcreateDbStore
supabaseAdapter
SIZEVERSION
deepSTAGEtrackDeep
trackStore
captureStoreUpdates
SIZEVERSION
destructureSTAGEdestructureSIZEVERSION
immutableSTAGEcreateImmutableSIZEVERSION
lifecycleSTAGEcreateIsMounted
isHydrated
onElementConnect
SIZEVERSION
mapSTAGEReactiveMap
ReactiveWeakMap
SIZEVERSION
memoSTAGEcreateLatest
createLatestMany
createWritableMemo
createLazyMemo
createRcMemo
createPureReaction
createMemoCache
createReducer
SIZEVERSION
mutableSTAGEcreateMutable
modifyMutable
SIZEVERSION
resourceSTAGEcreateAggregated
createDeepSignal
makeAbortable
createAbortable
makeCache
makeRetrying
SIZEVERSION
rootlessSTAGEcreateSubRoot
createCallback
createDisposable
createSharedRoot
createRootPool
SIZEVERSION
setSTAGEReactiveSet
ReactiveWeakSet
SIZEVERSION
signal-buildersSTAGEList of buildersSIZEVERSION
state-machineSTAGEcreateMachineSIZEVERSION
[static-store](https://github.com/solid