24 个仓库
Event systems that trigger specific functions when internal state reaches predefined thresholds.
Distinct from Event-Driven Hook Systems: Focuses on callbacks triggered by specific state thresholds (e.g., fully open) rather than general system hooks.
Explore 24 awesome GitHub repositories matching software engineering & architecture · State-Driven Callbacks. Refine with filters or upvote what's useful.
MJRefresh is a scroll view interaction library and a set of reusable UI components for implementing pull-to-refresh and infinite scrolling behaviors in mobile user interfaces. It provides customizable refresh indicators and controllers that manage reload callbacks and loading states within scrollable containers. The library allows for the replacement of standard loading indicators with custom images, GIF sequences, and status labels to match specific visual branding. It includes a global configuration store to handle dynamic UI localization and the translation of refresh content across an app
Decouples scroll interaction from data fetching by triggering callbacks when internal state thresholds are reached.
AndroidSwipeLayout is an Android UI library and custom view framework that enables the creation of layouts that reveal hidden action buttons when a user performs a swipe gesture. It functions as a gesture-based UI component that triggers callbacks based on the real-time position of the swipe. The framework is designed to support complex interaction patterns, specifically allowing for the nesting of multiple swipeable components within one another. The library covers mobile gesture interaction and custom view orchestration, providing tools to track swipe states and synchronize UI changes duri
Triggers specific events at predefined thresholds to notify the application when a view is fully open or closed.
react-native-swiper is a cross-platform mobile carousel component that provides a swipeable interface for cycling through content panels. It supports both horizontal and vertical transitions and includes a visual pagination system using customizable indicators like dots or numbers to track the user's position. The component features a lazy-loading mechanism that defers the rendering of off-screen content to reduce memory usage and improve initial load times. It supports infinite looping, automated slide transitions via a timer, and programmatic navigation control to move the slider to specifi
Provides callbacks that trigger when the carousel settles on a specific slide index.
RestKit is an iOS REST API integration framework used to connect Apple platform applications to web services. It centers on RESTful resource modeling, transforming remote API data structures into typed local objects and database entities. The framework provides capabilities for remote data persistence by caching web service resources in a local database to enable offline access. It also handles network data serialization, using pluggable parsers to convert JSON or XML responses into application data models. Additional functionality includes multipart file uploading for sending binary data an
Triggers specific event handlers automatically when the device network reachability status changes.
use-gesture is a JavaScript gesture manager and interaction tool designed to detect and process user input patterns. It functions as a React gesture hook library and a general utility for tracking screen coordinates and movement patterns to drive interactive component behaviors. The library specializes in capturing complex mouse and touch interactions, including dragging, pinching, swiping, and scrolling. It provides a system for implementing drag and drop functionality and pinch-to-zoom interactions. The tool covers the development of interactive UI components by normalizing diverse input e
Triggers user-defined callback functions when gestures reach specific phases or state thresholds.
Slideout is a touch-gesture UI component and navigation menu designed for mobile web applications. It provides a side panel that slides across the screen to reveal navigation options, utilizing CSS transitions to animate the movement of the viewport. The component manages the expanded or collapsed state of the navigation menu and includes logic to restrict gestures for specific interface elements to prevent interaction conflicts. It employs a system for executing custom logic triggered by menu state transitions and user drag gestures.
Provides callback functions triggered when the menu reaches specific state milestones like open or close.
Swipe is a JavaScript library for creating touch-based sliders and interactive carousels. It provides a gesture-based navigation tool for building swipeable content interfaces that support touch navigation on mobile and web browsers. The library distinguishes itself through the use of GPU-accelerated transitions and animation frames to ensure smooth motion. It implements a continuous looping effect, allowing content to wrap around seamlessly during navigation. The tool covers the synchronization of slide states with touch inputs and the execution of custom functions when transitions complete
Triggers external callbacks only when the internal active index changes after a transition completes.
Transitions is an object-oriented finite state machine library for Python. It provides a framework for managing valid states and the logic for moving between them, including implementations for asynchronous state machines and thread-safe state managers. The library supports hierarchical state machines that allow states to be nested to organize complex subtasks and logical contexts. It includes tools for generating visual diagrams of states and transitions to document machine logic. The project covers state management primitives such as lifecycle callbacks, conditional transition guarding, an
Executes registered functions automatically during specific transition phases like entry and exit.
jsmpeg is a JavaScript MPEG1 video decoder and canvas-based video renderer. It functions as a client-side media decoder that processes video frames in JavaScript, rendering them to an HTML5 canvas without relying on native browser video elements. The project provides a low-latency video player capable of receiving binary media data over WebSockets for real-time streaming. It also supports the progressive loading of static video files via Ajax to allow playback to begin before a file is fully downloaded. The system includes capabilities for playback state and event management, allowing for th
Triggers specific callbacks when playback transitions occur to synchronize application logic with the media player state.
Leva 是一个 React GUI 控制面板和实时参数编辑器,用于监控和调整应用程序状态及变量,而无需修改代码或重新加载页面。它作为一个动态状态调试器和可扩展输入库,提供了一个视觉界面,用于在运行中的 Web 应用程序内微调数值、布尔值和文本值。 该项目的独特之处在于其插件系统,允许创建自定义输入组件和专门的行为以支持独特的数据类型。它利用类型推断自动将数据映射到适当的视觉小部件,尽管这种映射可以被覆盖以强制指定输入类型。 该界面支持多种输入类别,包括数值范围、向量、颜色选择器和媒体上传字段。控件可以组织成层级文件夹,根据其他值有条件地显示,并与外部数据存储同步。该系统还监控编辑生命周期,在用户开始和结束交互时启用回调,以优化昂贵操作的性能。
Triggers callbacks when a user starts and finishes interacting with a control to optimize performance for expensive operations.
SideMenu 是一个用 Swift 编写的 iOS 导航菜单库和移动应用导航框架。它提供用于在 iOS 应用程序中实现动画侧滑菜单和导航抽屉的可重用组件。 该框架支持连续滑动导航,允许用户在单次动作中在屏幕两侧的菜单之间切换。它包括一个用于管理不同导航层级中多个菜单实例的协调系统,以及一个确保所有应用程序屏幕行为和外观一致的全局配置机制。 该库处理基于手势的视图平移和带有集成视差效果的滑动菜单渲染。它还提供状态驱动的可见性回调,以在菜单打开或关闭时通知视图控制器。
Provides callbacks that trigger when the menu reaches specific open or closed state thresholds.
This JavaScript smooth scrolling library is a frontend utility and viewport motion controller designed to animate transitions to anchor links. It intercepts standard link clicks to replace instant jumps with fluid movement toward target elements. The library provides configurable motion easing patterns and speed controls to manage acceleration and deceleration. It includes a mechanism to cancel active animations immediately and supports programmatic scroll triggering via direct function calls. The tool handles positioning offsets to prevent target content from being hidden behind fixed heade
Executes registered callbacks when scroll animations start or conclude to synchronize interface states.
This library provides a framework for defining finite state machines within Ruby classes to manage complex object lifecycles. It functions as a declarative workflow engine, allowing developers to model object states, events, and transitions through a readable domain-specific language. By integrating directly with database persistence layers, the framework ensures that state changes are synchronized with storage records while maintaining data integrity through transaction management and row locking. The library distinguishes itself by enforcing strict business rules through conditional transit
Triggers custom logic automatically before or after state transitions to perform lifecycle side effects.
SoundManager2 是一个 JavaScript 音频 API 和跨浏览器音频引擎,旨在提供跨不同 Web 浏览器和设备的统一播放体验。它作为一个 HTML5 音频封装器和播放管理器,将原生 API 抽象为统一接口,通过在可用音频后端和编解码器之间自动切换机制确保兼容性。 该库以其用于与媒体服务器进行网络通信的 RTMP 音频流媒体播放器,以及用于从音频文件中提取曲目名称、艺术家信息和流派标签的内置 ID3 元数据解析器而著称。它还实现了字节范围音频流,以小段加载文件,从而无需将整个文件下载到内存中即可实现搜索和播放。 该系统涵盖了音频操作的广泛能力,包括用于波形和频谱的实时信号分析,以及用于变调和均衡的音频效果处理。它管理声音对象的完整资源生命周期,提供具有事件驱动监控的播放状态管理,并包括用于验证音频格式支持和调试初始化错误的工具。
Uses a callback system to trigger application logic when audio enters or exits states like loading and completion.
MaterialDateTimePicker 是一个符合 Material Design 的 Android UI 组件库,提供用于选择日期、时间和组合时间值的标准化小部件。它实现了一组遵循 Material Design 系统的可自定义对话框,以确保一致的用户界面交互。 该库具有组合日期和时间选择器,可协调日历和时钟对话框的顺序显示。它为日期和时间选择提供了特定约束,允许限制可选范围、特定日期和所需时间间隔。 视觉配置通过主题驱动的样式系统处理,支持自定义强调色、深色模式切换和操作按钮文本自定义。这些组件作为对话框片段实现,以管理 Android 应用内的生命周期和屏幕覆盖层。
Implements callbacks to notify the host activity when the user selects a specific date or time.
Mixitup 是一个无依赖的 DOM 元素动画库和网格布局引擎。它作为客户端内容过滤器和数据驱动的 UI 控制器,旨在管理 HTML 元素在插入、移除和排序操作过程中的平滑视觉过渡。 该系统专注于创建交互式画廊界面和动态内容过滤。它允许使用自定义属性或随机序列重新组织元素,同时将界面元素的排列和可见性与底层数据模型同步。 除了过滤和排序,该库还涵盖了 DOM 元素管理,包括目标的动态插入和移除。它提供了动画化容器大小调整、定义自定义动画效果以及利用非线性交错效果来呈现元素的能力。
Triggers custom callback functions at specific stages such as start, end, failure, or busy states.
mescroll 是一个 JavaScript 无限滚动库和移动端 Web 滚动管理器,旨在实现下拉刷新和上拉加载模式。它提供了一个用于处理触摸滚动、管理分页状态以及在 Vue 应用程序中集成这些行为的系统。 该库的特色在于对聊天界面的专门支持,能够实现反向数据加载,并能够以反向注入数据来模拟消息历史。它还包括一个状态持久化的滚动缓存,以在用户在不同视图之间导航时保留垂直偏移量和列表数据。 该项目涵盖了广泛的交互和性能功能,包括抑制原生浏览器回弹效果、视口感知图像懒加载以及程序化滚动定位。它还提供了用于管理分页状态、自定义加载和空状态 UI 以及实现返回顶部导航的实用工具。
Triggers developer-defined callback functions when scroll offsets reach predefined thresholds for refreshing or loading.
该项目是一个响应式 CSS 库和元素尺寸监控器。它为 CSS 容器查询提供了 Polyfill,使得在原生浏览器支持不可用的环境中,能够根据元素的特定尺寸应用样式。 该库实时监控目标 DOM 元素的宽度和高度,并在尺寸发生变化时触发自定义回调。它通过根据预定义的尺寸阈值而不是整个浏览器窗口尺寸执行布局调整和样式更改来适配 UI 组件。 该工具通过多种机制管理这些适配,包括注入动态 CSS 变量、基于阈值的类切换,以及使用 ResizeObserver API 将元素尺寸与样式表同步。
Executes user-defined JavaScript functions when element dimensions cross specific size thresholds.
Trumbowyg 是一个轻量级的 JavaScript 所见即所得 (WYSIWYG) 编辑器,用于直接在 Web 浏览器中创建和格式化富文本和 HTML 内容。它作为一个客户端工具,用于生成语义化 HTML 标记和创作 Web 内容。 该项目具有模块化的插件架构,允许添加新的格式化命令和工具栏按钮。它提供了一个可配置的界面,其中工具栏布局可以通过预定义的数组进行自定义,标签可以通过本地化文件进行翻译。 该编辑器涵盖了广泛的内容操作功能,包括文本外观格式化、表格管理以及图像和音频的多媒体嵌入。它包括集成的 HTML 清洗功能,以根据允许标签的白名单过滤粘贴的标记,并提供通过撤销和重做功能管理编辑历史的工具。
Triggers specific callbacks when the editor's internal state changes, such as focus shifts or content modifications.
react-waypoint 是一个 React 组件和视口跟踪工具,根据 DOM 节点在可滚动区域内的可见性执行函数。它监控元素何时进入或离开浏览器视口或指定的滚动容器以触发回调。 该项目支持实现无限滚动、资源懒加载和滚动触发动画。它允许使用偏移量进行自定义滚动容器定义和视口边界配置,以确定事件触发的精确时机。 该工具为垂直和水平滚动提供元素位置跟踪和可见性监控。它包括触发灵敏度控制和事件节流,以管理快速滚动期间的回调执行。
Provides callbacks that execute automatically when elements enter or exit the viewport state.