reflex-reactbits 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/PKG-INFO +8 -5
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/README.md +7 -4
- reflex_reactbits-0.2.1/custom_components/reflex_reactbits/__init__.py +12 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/catalog.json +159 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/cli.py +2 -1
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/micro.py +71 -1
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/micro.pyi +59 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/source.py +16 -2
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits.egg-info/PKG-INFO +8 -5
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/pyproject.toml +1 -1
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/tests/test_wrappers.py +23 -1
- reflex_reactbits-0.2.0/custom_components/reflex_reactbits/__init__.py +0 -12
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/LICENSE +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/animations.py +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/animations.pyi +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/backgrounds.py +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/backgrounds.pyi +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/base.py +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/base.pyi +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/catalog.py +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/components.py +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/components.pyi +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/py.typed +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/text_animations.py +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/text_animations.pyi +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits.egg-info/SOURCES.txt +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits.egg-info/dependency_links.txt +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits.egg-info/entry_points.txt +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits.egg-info/requires.txt +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits.egg-info/top_level.txt +0 -0
- {reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reflex-reactbits
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Reflex wrappers for React Bits: 200+ animated text effects, backgrounds, UI components and micro interactions.
|
|
5
5
|
Author-email: Ernesto Crespo <ecrespo@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -35,7 +35,7 @@ Dynamic: license-file
|
|
|
35
35
|
|
|
36
36
|
[Reflex](https://reflex.dev) wrappers for **[React Bits](https://reactbits.dev)** — the
|
|
37
37
|
open-source collection of animated, interactive and customizable React components by
|
|
38
|
-
David Haz. Every one of the **
|
|
38
|
+
David Haz. Every one of the **218 React Bits 2.0 components** (plus 5 sub-components) is
|
|
39
39
|
available as a typed Python component: text animations, animations, UI components,
|
|
40
40
|
animated WebGL backgrounds and the new *Micro* interactions.
|
|
41
41
|
|
|
@@ -172,7 +172,7 @@ docs URL, npm deps) at runtime.
|
|
|
172
172
|
|
|
173
173
|
**Backgrounds (64):** `acid_squares`, `aero_shards`, `antigravity`, `aurora`, `balatro`, `ballpit`, `beams`, `color_bends`, `crt_warp`, `dark_veil`, `dither`, `dot_field`, `dot_grid`, `evil_eye`, `faulty_terminal`, `ferrofluid`, `floating_lines`, `flux_lines`, `galaxy`, `ghost_fibers`, `gradient_ascii`, `gradient_blinds`, `gradient_waves`, `grainient`, `grid_distortion`, `grid_motion`, `grid_scan`, `hyperspeed`, `iridescence`, `letter_glitch`, `light_pillar`, `light_rays`, `light_tunnel`, `lightfall`, `lightning`, `line_waves`, `liquid_chrome`, `liquid_ether`, `magic_rings`, `magnet_lines`, `micro_slats`, `molten_metal`, `orb`, `particles`, `pattern_waves`, `pixel_blast`, `pixel_snow`, `plasma`, `plasma_wave`, `prism`, `prismatic_burst`, `radar`, `ripple_grid`, `scanner`, `shape_grid`, `shape_waves`, `side_rays`, `silk`, `sliced_waves`, `soft_aurora`, `threads`, `topography`, `waves`, `web_threads`
|
|
174
174
|
|
|
175
|
-
**Micro interactions (
|
|
175
|
+
**Micro interactions (35 + 1 sub-component):** `bell_toggle`, `branched_menu`, `call_chip`, `code_slots`, `comet_dial`, `dodge_field`, `flip_card`, `flying_button`, `folder_float`, `fuse_button`, `glide_select`, `hold_button`, `jelly_radio`, `lattice_loader`, `paper_crumple`, `peek_rating`, `prompt_bar`, `pulse_heart`, `refine_frame`, `rubber_segment`, `scrub_field`, `shredder`, `slide_commit`, `sling_button`, `slosh_gauge`, `spring_check`, `squish_switch`, `status_mark`, `swipe_row`, `swipe_toast`, `tear_ticket`, `thought_line`, `voice_pill`, `wake_slider`, `warm_tooltip`, `warm_tooltip_group`
|
|
176
176
|
|
|
177
177
|
Full docs, previews and prop descriptions for each component live at
|
|
178
178
|
[reactbits.dev](https://reactbits.dev).
|
|
@@ -203,6 +203,9 @@ python scripts/generate_wrappers.py scripts/components.json /tmp/react-bits
|
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
Update `PINNED_REF` in `custom_components/reflex_reactbits/source.py` to the new commit.
|
|
206
|
+
If `git diff --stat <old> <new> -- src/content` only adds files (new components), add the
|
|
207
|
+
old commit to `COMPATIBLE_REFS` next to it, so copies apps already vendored from it are not
|
|
208
|
+
reported as stale; if any existing component changed, empty that set instead.
|
|
206
209
|
|
|
207
210
|
## Development
|
|
208
211
|
|
|
@@ -235,10 +238,10 @@ given pull request introduces.
|
|
|
235
238
|
|
|
236
239
|
```bash
|
|
237
240
|
# 1. bump the version
|
|
238
|
-
$EDITOR pyproject.toml # [project] version = "0.2.
|
|
241
|
+
$EDITOR pyproject.toml # [project] version = "0.2.1"
|
|
239
242
|
|
|
240
243
|
# 2. tag it; the tag must match that version or release.yml stops
|
|
241
|
-
git tag v0.2.
|
|
244
|
+
git tag v0.2.1 && git push origin v0.2.1
|
|
242
245
|
```
|
|
243
246
|
|
|
244
247
|
The tag triggers `release.yml`, which builds, creates the GitHub release with the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[Reflex](https://reflex.dev) wrappers for **[React Bits](https://reactbits.dev)** — the
|
|
4
4
|
open-source collection of animated, interactive and customizable React components by
|
|
5
|
-
David Haz. Every one of the **
|
|
5
|
+
David Haz. Every one of the **218 React Bits 2.0 components** (plus 5 sub-components) is
|
|
6
6
|
available as a typed Python component: text animations, animations, UI components,
|
|
7
7
|
animated WebGL backgrounds and the new *Micro* interactions.
|
|
8
8
|
|
|
@@ -139,7 +139,7 @@ docs URL, npm deps) at runtime.
|
|
|
139
139
|
|
|
140
140
|
**Backgrounds (64):** `acid_squares`, `aero_shards`, `antigravity`, `aurora`, `balatro`, `ballpit`, `beams`, `color_bends`, `crt_warp`, `dark_veil`, `dither`, `dot_field`, `dot_grid`, `evil_eye`, `faulty_terminal`, `ferrofluid`, `floating_lines`, `flux_lines`, `galaxy`, `ghost_fibers`, `gradient_ascii`, `gradient_blinds`, `gradient_waves`, `grainient`, `grid_distortion`, `grid_motion`, `grid_scan`, `hyperspeed`, `iridescence`, `letter_glitch`, `light_pillar`, `light_rays`, `light_tunnel`, `lightfall`, `lightning`, `line_waves`, `liquid_chrome`, `liquid_ether`, `magic_rings`, `magnet_lines`, `micro_slats`, `molten_metal`, `orb`, `particles`, `pattern_waves`, `pixel_blast`, `pixel_snow`, `plasma`, `plasma_wave`, `prism`, `prismatic_burst`, `radar`, `ripple_grid`, `scanner`, `shape_grid`, `shape_waves`, `side_rays`, `silk`, `sliced_waves`, `soft_aurora`, `threads`, `topography`, `waves`, `web_threads`
|
|
141
141
|
|
|
142
|
-
**Micro interactions (
|
|
142
|
+
**Micro interactions (35 + 1 sub-component):** `bell_toggle`, `branched_menu`, `call_chip`, `code_slots`, `comet_dial`, `dodge_field`, `flip_card`, `flying_button`, `folder_float`, `fuse_button`, `glide_select`, `hold_button`, `jelly_radio`, `lattice_loader`, `paper_crumple`, `peek_rating`, `prompt_bar`, `pulse_heart`, `refine_frame`, `rubber_segment`, `scrub_field`, `shredder`, `slide_commit`, `sling_button`, `slosh_gauge`, `spring_check`, `squish_switch`, `status_mark`, `swipe_row`, `swipe_toast`, `tear_ticket`, `thought_line`, `voice_pill`, `wake_slider`, `warm_tooltip`, `warm_tooltip_group`
|
|
143
143
|
|
|
144
144
|
Full docs, previews and prop descriptions for each component live at
|
|
145
145
|
[reactbits.dev](https://reactbits.dev).
|
|
@@ -170,6 +170,9 @@ python scripts/generate_wrappers.py scripts/components.json /tmp/react-bits
|
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
Update `PINNED_REF` in `custom_components/reflex_reactbits/source.py` to the new commit.
|
|
173
|
+
If `git diff --stat <old> <new> -- src/content` only adds files (new components), add the
|
|
174
|
+
old commit to `COMPATIBLE_REFS` next to it, so copies apps already vendored from it are not
|
|
175
|
+
reported as stale; if any existing component changed, empty that set instead.
|
|
173
176
|
|
|
174
177
|
## Development
|
|
175
178
|
|
|
@@ -202,10 +205,10 @@ given pull request introduces.
|
|
|
202
205
|
|
|
203
206
|
```bash
|
|
204
207
|
# 1. bump the version
|
|
205
|
-
$EDITOR pyproject.toml # [project] version = "0.2.
|
|
208
|
+
$EDITOR pyproject.toml # [project] version = "0.2.1"
|
|
206
209
|
|
|
207
210
|
# 2. tag it; the tag must match that version or release.yml stops
|
|
208
|
-
git tag v0.2.
|
|
211
|
+
git tag v0.2.1 && git push origin v0.2.1
|
|
209
212
|
```
|
|
210
213
|
|
|
211
214
|
The tag triggers `release.yml`, which builds, creates the GitHub release with the
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Reflex wrappers for React Bits (https://reactbits.dev)."""
|
|
2
|
+
|
|
3
|
+
from .animations import *
|
|
4
|
+
from .backgrounds import *
|
|
5
|
+
from .base import ReactBitsComponent
|
|
6
|
+
from .catalog import CATALOG, find_component
|
|
7
|
+
from .components import *
|
|
8
|
+
from .micro import *
|
|
9
|
+
from .source import ensure_component_source
|
|
10
|
+
from .text_animations import *
|
|
11
|
+
|
|
12
|
+
__all__ = ['CATALOG', 'ASCIIText', 'AccordionGallery', 'AcidSquares', 'AeroShards', 'AnimatedContent', 'AnimatedList', 'Antigravity', 'Aurora', 'Balatro', 'Ballpit', 'Beams', 'BellToggle', 'BlobCursor', 'BlurText', 'BorderGlow', 'BounceCards', 'BranchedMenu', 'BubbleMenu', 'CRTWarp', 'CallChip', 'CardNav', 'CardSwap', 'CardSwapCard', 'Carousel', 'ChromaGrid', 'CircularCarousel', 'CircularGallery', 'CircularText', 'ClickSpark', 'CodeSlots', 'ColorBends', 'CometDial', 'CountUp', 'Counter', 'Crosshair', 'CrystalizedBall', 'Cubes', 'CursorGrid', 'CurvedInput', 'CurvedLoop', 'DarkVeil', 'DecayCard', 'DecryptedText', 'DepthCarousel', 'DepthText', 'Dither', 'DitherVeil', 'Dock', 'DodgeField', 'DomeGallery', 'DotField', 'DotGrid', 'DriftWall', 'EchoText', 'ElasticMesh', 'ElasticSlider', 'ElectricBorder', 'ElectricLogo', 'EvilEye', 'FadeContent', 'FallingText', 'FaultyTerminal', 'Ferrofluid', 'FlexCarousel', 'FlipCard', 'FloatingLines', 'FlowingMenu', 'FluidGlass', 'FluxLines', 'FlyingButton', 'FlyingPosters', 'FoldText', 'Folder', 'FolderFloat', 'FuseButton', 'FuzzyText', 'Galaxy', 'GhostCursor', 'GhostFibers', 'GlareHover', 'GlassIcons', 'GlassSurface', 'GlideSelect', 'GlitchText', 'GlowCursor', 'GooeyNav', 'GradientASCII', 'GradientBlinds', 'GradientText', 'GradientWaves', 'GradualBlur', 'Grainient', 'GridDistortion', 'GridMotion', 'GridScan', 'HalftoneReveal', 'HoldButton', 'HoloCard', 'Hyperspeed', 'ImageTrail', 'InfiniteMenu', 'InfiniteSpiral', 'Iridescence', 'JellyRadio', 'Lanyard', 'LaserFlow', 'LatticeLoader', 'LetterGlitch', 'LightPillar', 'LightRays', 'LightTunnel', 'Lightfall', 'Lightning', 'LineSidebar', 'LineWaves', 'LiquidChrome', 'LiquidEther', 'LogoLoop', 'MagicBento', 'MagicRings', 'Magnet', 'MagnetLines', 'MaskedHeading', 'Masonry', 'MetaBalls', 'MetallicPaint', 'MicroSlats', 'ModelViewer', 'MoltenMetal', 'MorphSlider', 'Noise', 'OptionWheel', 'Orb', 'OrbitImages', 'PaperCrumple', 'ParticleText', 'Particles', 'PatternWaves', 'PeekRating', 'PillNav', 'PixelBlast', 'PixelCard', 'PixelSnow', 'PixelSwap', 'PixelTrail', 'PixelTransition', 'Plasma', 'PlasmaWave', 'Prism', 'PrismaticBurst', 'ProfileCard', 'PromptBar', 'PulseHeart', 'Radar', 'ReactBitsComponent', 'RefineFrame', 'ReflectiveCard', 'Ribbons', 'RippleDistortion', 'RippleGrid', 'RotatingText', 'RubberSegment', 'Scanner', 'ScrambledText', 'ScrollExpand', 'ScrollFloat', 'ScrollReveal', 'ScrollStack', 'ScrollStackItem', 'ScrollVelocity', 'ScrubField', 'ShapeBlur', 'ShapeGrid', 'ShapeWaves', 'ShinyText', 'Shredder', 'Shuffle', 'SideRays', 'Silk', 'SlicedWaves', 'SlideCommit', 'SlingButton', 'SloshGauge', 'SoftAurora', 'SpecularButton', 'SplashCursor', 'SplitFlapText', 'SplitText', 'SpotlightCard', 'SpringCheck', 'SquishSwitch', 'Stack', 'StaggeredMenu', 'StarBorder', 'StatusMark', 'Step', 'Stepper', 'StickerPeel', 'Strands', 'StrokeText', 'SwarmCursor', 'SwipeRow', 'SwipeToast', 'TargetCursor', 'TearTicket', 'TechText', 'TextCursor', 'TextLoop', 'TextPressure', 'TextType', 'ThoughtLine', 'Threads', 'TiltedCard', 'TiltedCardLayer', 'Topography', 'TrueFocus', 'VariableProximity', 'VoicePill', 'WakeSlider', 'WarmTooltip', 'WarmTooltipGroup', 'WarpText', 'Waves', 'WebThreads', 'accordion_gallery', 'acid_squares', 'aero_shards', 'animated_content', 'animated_list', 'antigravity', 'ascii_text', 'aurora', 'balatro', 'ballpit', 'beams', 'bell_toggle', 'blob_cursor', 'blur_text', 'border_glow', 'bounce_cards', 'branched_menu', 'bubble_menu', 'call_chip', 'card_nav', 'card_swap', 'card_swap_card', 'carousel', 'chroma_grid', 'circular_carousel', 'circular_gallery', 'circular_text', 'click_spark', 'code_slots', 'color_bends', 'comet_dial', 'count_up', 'counter', 'crosshair', 'crt_warp', 'crystalized_ball', 'cubes', 'cursor_grid', 'curved_input', 'curved_loop', 'dark_veil', 'decay_card', 'decrypted_text', 'depth_carousel', 'depth_text', 'dither', 'dither_veil', 'dock', 'dodge_field', 'dome_gallery', 'dot_field', 'dot_grid', 'drift_wall', 'echo_text', 'elastic_mesh', 'elastic_slider', 'electric_border', 'electric_logo', 'ensure_component_source', 'evil_eye', 'fade_content', 'falling_text', 'faulty_terminal', 'ferrofluid', 'find_component', 'flex_carousel', 'flip_card', 'floating_lines', 'flowing_menu', 'fluid_glass', 'flux_lines', 'flying_button', 'flying_posters', 'fold_text', 'folder', 'folder_float', 'fuse_button', 'fuzzy_text', 'galaxy', 'ghost_cursor', 'ghost_fibers', 'glare_hover', 'glass_icons', 'glass_surface', 'glide_select', 'glitch_text', 'glow_cursor', 'gooey_nav', 'gradient_ascii', 'gradient_blinds', 'gradient_text', 'gradient_waves', 'gradual_blur', 'grainient', 'grid_distortion', 'grid_motion', 'grid_scan', 'halftone_reveal', 'hold_button', 'holo_card', 'hyperspeed', 'image_trail', 'infinite_menu', 'infinite_spiral', 'iridescence', 'jelly_radio', 'lanyard', 'laser_flow', 'lattice_loader', 'letter_glitch', 'light_pillar', 'light_rays', 'light_tunnel', 'lightfall', 'lightning', 'line_sidebar', 'line_waves', 'liquid_chrome', 'liquid_ether', 'logo_loop', 'magic_bento', 'magic_rings', 'magnet', 'magnet_lines', 'masked_heading', 'masonry', 'meta_balls', 'metallic_paint', 'micro_slats', 'model_viewer', 'molten_metal', 'morph_slider', 'noise', 'option_wheel', 'orb', 'orbit_images', 'paper_crumple', 'particle_text', 'particles', 'pattern_waves', 'peek_rating', 'pill_nav', 'pixel_blast', 'pixel_card', 'pixel_snow', 'pixel_swap', 'pixel_trail', 'pixel_transition', 'plasma', 'plasma_wave', 'prism', 'prismatic_burst', 'profile_card', 'prompt_bar', 'pulse_heart', 'radar', 'refine_frame', 'reflective_card', 'ribbons', 'ripple_distortion', 'ripple_grid', 'rotating_text', 'rubber_segment', 'scanner', 'scrambled_text', 'scroll_expand', 'scroll_float', 'scroll_reveal', 'scroll_stack', 'scroll_stack_item', 'scroll_velocity', 'scrub_field', 'shape_blur', 'shape_grid', 'shape_waves', 'shiny_text', 'shredder', 'shuffle', 'side_rays', 'silk', 'sliced_waves', 'slide_commit', 'sling_button', 'slosh_gauge', 'soft_aurora', 'specular_button', 'splash_cursor', 'split_flap_text', 'split_text', 'spotlight_card', 'spring_check', 'squish_switch', 'stack', 'staggered_menu', 'star_border', 'status_mark', 'step', 'stepper', 'sticker_peel', 'strands', 'stroke_text', 'swarm_cursor', 'swipe_row', 'swipe_toast', 'target_cursor', 'tear_ticket', 'tech_text', 'text_cursor', 'text_loop', 'text_pressure', 'text_type', 'thought_line', 'threads', 'tilted_card', 'tilted_card_layer', 'topography', 'true_focus', 'variable_proximity', 'voice_pill', 'wake_slider', 'warm_tooltip', 'warm_tooltip_group', 'warp_text', 'waves', 'web_threads']
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/catalog.json
RENAMED
|
@@ -34693,6 +34693,165 @@
|
|
|
34693
34693
|
},
|
|
34694
34694
|
"module": "micro"
|
|
34695
34695
|
},
|
|
34696
|
+
{
|
|
34697
|
+
"class": "FlyingButton",
|
|
34698
|
+
"factory": "flying_button",
|
|
34699
|
+
"category": "Micro",
|
|
34700
|
+
"name": "FlyingButton",
|
|
34701
|
+
"description": "Button that fires its thrusters on hover, lifts off on a WebGL smoke plume and lands back in its own cloud.",
|
|
34702
|
+
"docs_url": "https://reactbits.dev/micro/flying-button",
|
|
34703
|
+
"npm": [],
|
|
34704
|
+
"props": [
|
|
34705
|
+
{
|
|
34706
|
+
"name": "theme",
|
|
34707
|
+
"js": "theme",
|
|
34708
|
+
"type": "Literal[\"dark\", \"light\"]",
|
|
34709
|
+
"default": "'dark'",
|
|
34710
|
+
"description": "Shades the smoke for a dark or a light page and picks the matching default colours."
|
|
34711
|
+
},
|
|
34712
|
+
{
|
|
34713
|
+
"name": "size",
|
|
34714
|
+
"js": "size",
|
|
34715
|
+
"type": "Literal[\"small\", \"medium\", \"large\", \"extra-large\"]",
|
|
34716
|
+
"default": "'medium'",
|
|
34717
|
+
"description": "Button size. The pods, jets, flames and smoke scale with it."
|
|
34718
|
+
},
|
|
34719
|
+
{
|
|
34720
|
+
"name": "radius",
|
|
34721
|
+
"js": "radius",
|
|
34722
|
+
"type": "int | float",
|
|
34723
|
+
"default": "undefined",
|
|
34724
|
+
"description": "Corner radius in pixels. Fully rounded when unset."
|
|
34725
|
+
},
|
|
34726
|
+
{
|
|
34727
|
+
"name": "altitude",
|
|
34728
|
+
"js": "altitude",
|
|
34729
|
+
"type": "int | float",
|
|
34730
|
+
"default": "170",
|
|
34731
|
+
"description": "How high the button climbs, in pixels. Capped by the container height."
|
|
34732
|
+
},
|
|
34733
|
+
{
|
|
34734
|
+
"name": "hover_time",
|
|
34735
|
+
"js": "hoverTime",
|
|
34736
|
+
"type": "int | float",
|
|
34737
|
+
"default": "2.4",
|
|
34738
|
+
"description": "Seconds it hovers at altitude before it comes back down and lands."
|
|
34739
|
+
},
|
|
34740
|
+
{
|
|
34741
|
+
"name": "jets",
|
|
34742
|
+
"js": "jets",
|
|
34743
|
+
"type": "int | float",
|
|
34744
|
+
"default": "2",
|
|
34745
|
+
"description": "Number of exhaust jets under the button, from 1 to 4."
|
|
34746
|
+
},
|
|
34747
|
+
{
|
|
34748
|
+
"name": "thrusters",
|
|
34749
|
+
"js": "thrusters",
|
|
34750
|
+
"type": "bool",
|
|
34751
|
+
"default": "true",
|
|
34752
|
+
"description": "Shows thruster pods under the button. Off, the jets fire straight out of its underside."
|
|
34753
|
+
},
|
|
34754
|
+
{
|
|
34755
|
+
"name": "trigger",
|
|
34756
|
+
"js": "trigger",
|
|
34757
|
+
"type": "Literal[\"hover\", \"click\"]",
|
|
34758
|
+
"default": "'hover'",
|
|
34759
|
+
"description": "Whether hovering or clicking starts the flight. Touch always starts it on tap. With the ramp on, a click starts the ride instead."
|
|
34760
|
+
},
|
|
34761
|
+
{
|
|
34762
|
+
"name": "carry_cursor",
|
|
34763
|
+
"js": "carryCursor",
|
|
34764
|
+
"type": "bool",
|
|
34765
|
+
"default": "true",
|
|
34766
|
+
"description": "Carries the cursor up with the button while you hover it, and sets it back down on landing."
|
|
34767
|
+
},
|
|
34768
|
+
{
|
|
34769
|
+
"name": "ramp",
|
|
34770
|
+
"js": "ramp",
|
|
34771
|
+
"type": "bool",
|
|
34772
|
+
"default": "false",
|
|
34773
|
+
"description": "Adds a loop ramp on the right. A click drives the button up the wall and along the ceiling, then it flips off the end, lands and rolls back."
|
|
34774
|
+
},
|
|
34775
|
+
{
|
|
34776
|
+
"name": "ramp_color",
|
|
34777
|
+
"js": "rampColor",
|
|
34778
|
+
"type": "str",
|
|
34779
|
+
"default": "undefined",
|
|
34780
|
+
"description": "Ramp colour. Defaults to a raised surface for the theme."
|
|
34781
|
+
},
|
|
34782
|
+
{
|
|
34783
|
+
"name": "smoke",
|
|
34784
|
+
"js": "smoke",
|
|
34785
|
+
"type": "int | float",
|
|
34786
|
+
"default": "1",
|
|
34787
|
+
"description": "How much smoke the jets and the ground blast put out."
|
|
34788
|
+
},
|
|
34789
|
+
{
|
|
34790
|
+
"name": "turbulence",
|
|
34791
|
+
"js": "turbulence",
|
|
34792
|
+
"type": "int | float",
|
|
34793
|
+
"default": "1",
|
|
34794
|
+
"description": "How much the smoke curls and billows."
|
|
34795
|
+
},
|
|
34796
|
+
{
|
|
34797
|
+
"name": "wobble",
|
|
34798
|
+
"js": "wobble",
|
|
34799
|
+
"type": "int | float",
|
|
34800
|
+
"default": "1",
|
|
34801
|
+
"description": "Strength of the gusts the flight controller fights while it hovers. 0 flies dead steady."
|
|
34802
|
+
},
|
|
34803
|
+
{
|
|
34804
|
+
"name": "thrust_color",
|
|
34805
|
+
"js": "thrustColor",
|
|
34806
|
+
"type": "str",
|
|
34807
|
+
"default": "undefined",
|
|
34808
|
+
"description": "Colour of the jet flames and the light they cast. Defaults to a pale blue for the theme."
|
|
34809
|
+
},
|
|
34810
|
+
{
|
|
34811
|
+
"name": "smoke_color",
|
|
34812
|
+
"js": "smokeColor",
|
|
34813
|
+
"type": "str",
|
|
34814
|
+
"default": "undefined",
|
|
34815
|
+
"description": "Base colour of the smoke. Its shadows are derived from it."
|
|
34816
|
+
},
|
|
34817
|
+
{
|
|
34818
|
+
"name": "button_color",
|
|
34819
|
+
"js": "buttonColor",
|
|
34820
|
+
"type": "str",
|
|
34821
|
+
"default": "undefined",
|
|
34822
|
+
"description": "Button fill. Defaults to dark grey on dark pages and near black on light ones."
|
|
34823
|
+
},
|
|
34824
|
+
{
|
|
34825
|
+
"name": "text_color",
|
|
34826
|
+
"js": "textColor",
|
|
34827
|
+
"type": "str",
|
|
34828
|
+
"default": "undefined",
|
|
34829
|
+
"description": "Label colour."
|
|
34830
|
+
}
|
|
34831
|
+
],
|
|
34832
|
+
"example": {
|
|
34833
|
+
"props": {
|
|
34834
|
+
"theme": "dark",
|
|
34835
|
+
"size": "medium",
|
|
34836
|
+
"altitude": 170,
|
|
34837
|
+
"hover_time": 2.4,
|
|
34838
|
+
"jets": 2,
|
|
34839
|
+
"thrusters": true,
|
|
34840
|
+
"trigger": "hover",
|
|
34841
|
+
"carry_cursor": true,
|
|
34842
|
+
"smoke": 1,
|
|
34843
|
+
"turbulence": 1,
|
|
34844
|
+
"wobble": 1,
|
|
34845
|
+
"ramp": false,
|
|
34846
|
+
"thrust_color": "#8ec5ff",
|
|
34847
|
+
"smoke_color": "#eef1f6"
|
|
34848
|
+
},
|
|
34849
|
+
"children": [
|
|
34850
|
+
"Take off"
|
|
34851
|
+
]
|
|
34852
|
+
},
|
|
34853
|
+
"module": "micro"
|
|
34854
|
+
},
|
|
34696
34855
|
{
|
|
34697
34856
|
"class": "FolderFloat",
|
|
34698
34857
|
"factory": "folder_float",
|
|
@@ -20,6 +20,7 @@ from .source import (
|
|
|
20
20
|
PINNED_REF,
|
|
21
21
|
component_dir,
|
|
22
22
|
ensure_component_source,
|
|
23
|
+
is_current_ref,
|
|
23
24
|
remove_component_source,
|
|
24
25
|
resolve_ref,
|
|
25
26
|
vendored_ref,
|
|
@@ -85,7 +86,7 @@ def cmd_add(args: argparse.Namespace) -> int:
|
|
|
85
86
|
)
|
|
86
87
|
where = component_dir(e["category"], e["name"], assets)
|
|
87
88
|
state = "added" if written else "present"
|
|
88
|
-
if vendored_ref(e["category"], e["name"], assets)
|
|
89
|
+
if not is_current_ref(vendored_ref(e["category"], e["name"], assets), resolve_ref(args.ref)):
|
|
89
90
|
state = "stale" # copied from another React Bits ref; --force replaces it
|
|
90
91
|
print(f"{e['name']:<24} {state:<11} {where}")
|
|
91
92
|
return 0
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/micro.py
RENAMED
|
@@ -14,7 +14,7 @@ from reflex_base.components.component import Component, field
|
|
|
14
14
|
|
|
15
15
|
from .base import ReactBitsComponent, safe
|
|
16
16
|
|
|
17
|
-
__all__ = ['BellToggle', 'BranchedMenu', 'CallChip', 'CodeSlots', 'CometDial', 'DodgeField', 'FlipCard', 'FolderFloat', 'FuseButton', 'GlideSelect', 'HoldButton', 'JellyRadio', 'LatticeLoader', 'PaperCrumple', 'PeekRating', 'PromptBar', 'PulseHeart', 'RefineFrame', 'RubberSegment', 'ScrubField', 'Shredder', 'SlideCommit', 'SlingButton', 'SloshGauge', 'SpringCheck', 'SquishSwitch', 'StatusMark', 'SwipeRow', 'SwipeToast', 'TearTicket', 'ThoughtLine', 'VoicePill', 'WakeSlider', 'WarmTooltip', 'WarmTooltipGroup', 'bell_toggle', 'branched_menu', 'call_chip', 'code_slots', 'comet_dial', 'dodge_field', 'flip_card', 'folder_float', 'fuse_button', 'glide_select', 'hold_button', 'jelly_radio', 'lattice_loader', 'paper_crumple', 'peek_rating', 'prompt_bar', 'pulse_heart', 'refine_frame', 'rubber_segment', 'scrub_field', 'shredder', 'slide_commit', 'sling_button', 'slosh_gauge', 'spring_check', 'squish_switch', 'status_mark', 'swipe_row', 'swipe_toast', 'tear_ticket', 'thought_line', 'voice_pill', 'wake_slider', 'warm_tooltip', 'warm_tooltip_group']
|
|
17
|
+
__all__ = ['BellToggle', 'BranchedMenu', 'CallChip', 'CodeSlots', 'CometDial', 'DodgeField', 'FlipCard', 'FlyingButton', 'FolderFloat', 'FuseButton', 'GlideSelect', 'HoldButton', 'JellyRadio', 'LatticeLoader', 'PaperCrumple', 'PeekRating', 'PromptBar', 'PulseHeart', 'RefineFrame', 'RubberSegment', 'ScrubField', 'Shredder', 'SlideCommit', 'SlingButton', 'SloshGauge', 'SpringCheck', 'SquishSwitch', 'StatusMark', 'SwipeRow', 'SwipeToast', 'TearTicket', 'ThoughtLine', 'VoicePill', 'WakeSlider', 'WarmTooltip', 'WarmTooltipGroup', 'bell_toggle', 'branched_menu', 'call_chip', 'code_slots', 'comet_dial', 'dodge_field', 'flip_card', 'flying_button', 'folder_float', 'fuse_button', 'glide_select', 'hold_button', 'jelly_radio', 'lattice_loader', 'paper_crumple', 'peek_rating', 'prompt_bar', 'pulse_heart', 'refine_frame', 'rubber_segment', 'scrub_field', 'shredder', 'slide_commit', 'sling_button', 'slosh_gauge', 'spring_check', 'squish_switch', 'status_mark', 'swipe_row', 'swipe_toast', 'tear_ticket', 'thought_line', 'voice_pill', 'wake_slider', 'warm_tooltip', 'warm_tooltip_group']
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class BellToggle(ReactBitsComponent):
|
|
@@ -579,6 +579,75 @@ class FlipCard(ReactBitsComponent):
|
|
|
579
579
|
)
|
|
580
580
|
|
|
581
581
|
|
|
582
|
+
class FlyingButton(ReactBitsComponent):
|
|
583
|
+
"""Button that fires its thrusters on hover, lifts off on a WebGL smoke plume and lands back in its own cloud.
|
|
584
|
+
|
|
585
|
+
Docs: https://reactbits.dev/micro/flying-button
|
|
586
|
+
"""
|
|
587
|
+
|
|
588
|
+
tag = "FlyingButton"
|
|
589
|
+
alias = "ReactBitsFlyingButton"
|
|
590
|
+
is_default = True
|
|
591
|
+
_rb_category = "Micro"
|
|
592
|
+
_rb_name = "FlyingButton"
|
|
593
|
+
_rb_files = ('FlyingButton.css', 'FlyingButton.jsx')
|
|
594
|
+
|
|
595
|
+
theme: rx.Var[Literal["dark", "light"]] = field(
|
|
596
|
+
doc="Shades the smoke for a dark or a light page and picks the matching default colours. Default: 'dark'."
|
|
597
|
+
)
|
|
598
|
+
size: rx.Var[Literal["small", "medium", "large", "extra-large"]] = field(
|
|
599
|
+
doc="Button size. The pods, jets, flames and smoke scale with it. Default: 'medium'."
|
|
600
|
+
)
|
|
601
|
+
radius: rx.Var[int | float] = field(
|
|
602
|
+
doc="Corner radius in pixels. Fully rounded when unset."
|
|
603
|
+
)
|
|
604
|
+
altitude: rx.Var[int | float] = field(
|
|
605
|
+
doc="How high the button climbs, in pixels. Capped by the container height. Default: 170."
|
|
606
|
+
)
|
|
607
|
+
hover_time: rx.Var[int | float] = field(
|
|
608
|
+
doc="Seconds it hovers at altitude before it comes back down and lands. Default: 2.4."
|
|
609
|
+
)
|
|
610
|
+
jets: rx.Var[int | float] = field(
|
|
611
|
+
doc="Number of exhaust jets under the button, from 1 to 4. Default: 2."
|
|
612
|
+
)
|
|
613
|
+
thrusters: rx.Var[bool] = field(
|
|
614
|
+
doc="Shows thruster pods under the button. Off, the jets fire straight out of its underside. Default: true."
|
|
615
|
+
)
|
|
616
|
+
trigger: rx.Var[Literal["hover", "click"]] = field(
|
|
617
|
+
doc="Whether hovering or clicking starts the flight. Touch always starts it on tap. With the ramp on, a click starts the ride instead. Default: 'hover'."
|
|
618
|
+
)
|
|
619
|
+
carry_cursor: rx.Var[bool] = field(
|
|
620
|
+
doc="Carries the cursor up with the button while you hover it, and sets it back down on landing. Default: true."
|
|
621
|
+
)
|
|
622
|
+
ramp: rx.Var[bool] = field(
|
|
623
|
+
doc="Adds a loop ramp on the right. A click drives the button up the wall and along the ceiling, then it flips off the end, lands and rolls back. Default: false."
|
|
624
|
+
)
|
|
625
|
+
ramp_color: rx.Var[str] = field(
|
|
626
|
+
doc="Ramp colour. Defaults to a raised surface for the theme."
|
|
627
|
+
)
|
|
628
|
+
smoke: rx.Var[int | float] = field(
|
|
629
|
+
doc="How much smoke the jets and the ground blast put out. Default: 1."
|
|
630
|
+
)
|
|
631
|
+
turbulence: rx.Var[int | float] = field(
|
|
632
|
+
doc="How much the smoke curls and billows. Default: 1."
|
|
633
|
+
)
|
|
634
|
+
wobble: rx.Var[int | float] = field(
|
|
635
|
+
doc="Strength of the gusts the flight controller fights while it hovers. 0 flies dead steady. Default: 1."
|
|
636
|
+
)
|
|
637
|
+
thrust_color: rx.Var[str] = field(
|
|
638
|
+
doc="Colour of the jet flames and the light they cast. Defaults to a pale blue for the theme."
|
|
639
|
+
)
|
|
640
|
+
smoke_color: rx.Var[str] = field(
|
|
641
|
+
doc="Base colour of the smoke. Its shadows are derived from it."
|
|
642
|
+
)
|
|
643
|
+
button_color: rx.Var[str] = field(
|
|
644
|
+
doc="Button fill. Defaults to dark grey on dark pages and near black on light ones."
|
|
645
|
+
)
|
|
646
|
+
text_color: rx.Var[str] = field(
|
|
647
|
+
doc="Label colour."
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
|
|
582
651
|
class FolderFloat(ReactBitsComponent):
|
|
583
652
|
"""Folder whose notes spring out into a floating cloud when it opens on hover or press.
|
|
584
653
|
|
|
@@ -2736,6 +2805,7 @@ code_slots = CodeSlots.create
|
|
|
2736
2805
|
comet_dial = CometDial.create
|
|
2737
2806
|
dodge_field = DodgeField.create
|
|
2738
2807
|
flip_card = FlipCard.create
|
|
2808
|
+
flying_button = FlyingButton.create
|
|
2739
2809
|
folder_float = FolderFloat.create
|
|
2740
2810
|
fuse_button = FuseButton.create
|
|
2741
2811
|
glide_select = GlideSelect.create
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/micro.pyi
RENAMED
|
@@ -22,6 +22,7 @@ __all__ = [
|
|
|
22
22
|
"CometDial",
|
|
23
23
|
"DodgeField",
|
|
24
24
|
"FlipCard",
|
|
25
|
+
"FlyingButton",
|
|
25
26
|
"FolderFloat",
|
|
26
27
|
"FuseButton",
|
|
27
28
|
"GlideSelect",
|
|
@@ -57,6 +58,7 @@ __all__ = [
|
|
|
57
58
|
"comet_dial",
|
|
58
59
|
"dodge_field",
|
|
59
60
|
"flip_card",
|
|
61
|
+
"flying_button",
|
|
60
62
|
"folder_float",
|
|
61
63
|
"fuse_button",
|
|
62
64
|
"glide_select",
|
|
@@ -497,6 +499,62 @@ class FlipCard(ReactBitsComponent):
|
|
|
497
499
|
"""Copy the component source into the app (once) and create the component."""
|
|
498
500
|
...
|
|
499
501
|
|
|
502
|
+
class FlyingButton(ReactBitsComponent):
|
|
503
|
+
@classmethod
|
|
504
|
+
def create(
|
|
505
|
+
cls,
|
|
506
|
+
*children,
|
|
507
|
+
theme: Literal["dark", "light"] | Var[Literal["dark", "light"]] | None = None,
|
|
508
|
+
size: Literal["extra-large", "large", "medium", "small"]
|
|
509
|
+
| Var[Literal["extra-large", "large", "medium", "small"]]
|
|
510
|
+
| None = None,
|
|
511
|
+
radius: Var[float | int] | float | int | None = None,
|
|
512
|
+
altitude: Var[float | int] | float | int | None = None,
|
|
513
|
+
hover_time: Var[float | int] | float | int | None = None,
|
|
514
|
+
jets: Var[float | int] | float | int | None = None,
|
|
515
|
+
thrusters: Var[bool] | bool | None = None,
|
|
516
|
+
trigger: Literal["click", "hover"] | Var[Literal["click", "hover"]] | None = None,
|
|
517
|
+
carry_cursor: Var[bool] | bool | None = None,
|
|
518
|
+
ramp: Var[bool] | bool | None = None,
|
|
519
|
+
ramp_color: Var[str] | str | None = None,
|
|
520
|
+
smoke: Var[float | int] | float | int | None = None,
|
|
521
|
+
turbulence: Var[float | int] | float | int | None = None,
|
|
522
|
+
wobble: Var[float | int] | float | int | None = None,
|
|
523
|
+
thrust_color: Var[str] | str | None = None,
|
|
524
|
+
smoke_color: Var[str] | str | None = None,
|
|
525
|
+
button_color: Var[str] | str | None = None,
|
|
526
|
+
text_color: Var[str] | str | None = None,
|
|
527
|
+
style: Sequence[Mapping[str, Any]]
|
|
528
|
+
| Mapping[str, Any]
|
|
529
|
+
| Var[Mapping[str, Any]]
|
|
530
|
+
| Breakpoints
|
|
531
|
+
| None = None,
|
|
532
|
+
key: Any | None = None,
|
|
533
|
+
id: Any | None = None,
|
|
534
|
+
ref: Var | None = None,
|
|
535
|
+
class_name: Any | None = None,
|
|
536
|
+
custom_attrs: dict[str, Any | Var] | None = None,
|
|
537
|
+
on_blur: Optional[EventType[()]] = None,
|
|
538
|
+
on_click: Optional[EventType[()] | EventType[PointerEventInfo]] = None,
|
|
539
|
+
on_context_menu: Optional[EventType[()] | EventType[PointerEventInfo]] = None,
|
|
540
|
+
on_double_click: Optional[EventType[()] | EventType[PointerEventInfo]] = None,
|
|
541
|
+
on_focus: Optional[EventType[()]] = None,
|
|
542
|
+
on_mount: Optional[EventType[()]] = None,
|
|
543
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
544
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
545
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
546
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
547
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
548
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
549
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
550
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
551
|
+
on_scroll_end: Optional[EventType[()]] = None,
|
|
552
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
553
|
+
**props,
|
|
554
|
+
) -> "FlyingButton":
|
|
555
|
+
"""Copy the component source into the app (once) and create the component."""
|
|
556
|
+
...
|
|
557
|
+
|
|
500
558
|
class FolderFloat(ReactBitsComponent):
|
|
501
559
|
@classmethod
|
|
502
560
|
def create(
|
|
@@ -2109,6 +2167,7 @@ code_slots = CodeSlots.create
|
|
|
2109
2167
|
comet_dial = CometDial.create
|
|
2110
2168
|
dodge_field = DodgeField.create
|
|
2111
2169
|
flip_card = FlipCard.create
|
|
2170
|
+
flying_button = FlyingButton.create
|
|
2112
2171
|
folder_float = FolderFloat.create
|
|
2113
2172
|
fuse_button = FuseButton.create
|
|
2114
2173
|
glide_select = GlideSelect.create
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/source.py
RENAMED
|
@@ -29,7 +29,16 @@ from pathlib import Path
|
|
|
29
29
|
logger = logging.getLogger("reflex_reactbits")
|
|
30
30
|
|
|
31
31
|
#: Commit of DavidHDev/react-bits the wrappers were generated from.
|
|
32
|
-
PINNED_REF = "
|
|
32
|
+
PINNED_REF = "310fc737fadcaa149a4e06fb088fc95332dc8bfb" # React Bits 2.0 + FlyingButton (2026-10-16)
|
|
33
|
+
|
|
34
|
+
#: Earlier refs whose sources are byte-identical to PINNED_REF for every component
|
|
35
|
+
#: they contain (``git diff --stat <ref> PINNED_REF -- src/content`` only adds
|
|
36
|
+
#: files). Copies made from them are current, so bumping the pin for a new
|
|
37
|
+
#: component does not flag every vendored one as stale. Empty this set when a new
|
|
38
|
+
#: pin changes the source of a component that already existed.
|
|
39
|
+
COMPATIBLE_REFS = frozenset({
|
|
40
|
+
"963f4d21dca65326a470956c42b7b467804f3c14", # React Bits 2.0
|
|
41
|
+
})
|
|
33
42
|
|
|
34
43
|
#: Directory (inside the app's ``assets/``) that receives the component sources.
|
|
35
44
|
ASSETS_SUBDIR = "reactbits"
|
|
@@ -155,6 +164,11 @@ def resolve_ref(ref: str | None = None) -> str:
|
|
|
155
164
|
return ref or os.environ.get("REACTBITS_REF") or PINNED_REF
|
|
156
165
|
|
|
157
166
|
|
|
167
|
+
def is_current_ref(vendored: str | None, ref: str) -> bool:
|
|
168
|
+
"""Whether a copy made from ``vendored`` matches the sources at ``ref``."""
|
|
169
|
+
return vendored == ref or (ref == PINNED_REF and vendored in COMPATIBLE_REFS)
|
|
170
|
+
|
|
171
|
+
|
|
158
172
|
def vendored_ref(category: str, name: str, assets_dir: Path | None = None) -> str | None:
|
|
159
173
|
"""Return the React Bits ref a component's copied source came from, if recorded."""
|
|
160
174
|
marker = component_dir(category, name, assets_dir) / REF_MARKER
|
|
@@ -211,7 +225,7 @@ def ensure_component_source(
|
|
|
211
225
|
written.append(dest)
|
|
212
226
|
if not kept:
|
|
213
227
|
(target / REF_MARKER).write_text(ref + "\n")
|
|
214
|
-
elif previous
|
|
228
|
+
elif not is_current_ref(previous, ref) and (category, name) not in _warned_stale:
|
|
215
229
|
_warned_stale.add((category, name))
|
|
216
230
|
logger.warning(
|
|
217
231
|
"reflex-reactbits: %s keeps the React Bits source it copied earlier (%s), but "
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reflex-reactbits
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Reflex wrappers for React Bits: 200+ animated text effects, backgrounds, UI components and micro interactions.
|
|
5
5
|
Author-email: Ernesto Crespo <ecrespo@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -35,7 +35,7 @@ Dynamic: license-file
|
|
|
35
35
|
|
|
36
36
|
[Reflex](https://reflex.dev) wrappers for **[React Bits](https://reactbits.dev)** — the
|
|
37
37
|
open-source collection of animated, interactive and customizable React components by
|
|
38
|
-
David Haz. Every one of the **
|
|
38
|
+
David Haz. Every one of the **218 React Bits 2.0 components** (plus 5 sub-components) is
|
|
39
39
|
available as a typed Python component: text animations, animations, UI components,
|
|
40
40
|
animated WebGL backgrounds and the new *Micro* interactions.
|
|
41
41
|
|
|
@@ -172,7 +172,7 @@ docs URL, npm deps) at runtime.
|
|
|
172
172
|
|
|
173
173
|
**Backgrounds (64):** `acid_squares`, `aero_shards`, `antigravity`, `aurora`, `balatro`, `ballpit`, `beams`, `color_bends`, `crt_warp`, `dark_veil`, `dither`, `dot_field`, `dot_grid`, `evil_eye`, `faulty_terminal`, `ferrofluid`, `floating_lines`, `flux_lines`, `galaxy`, `ghost_fibers`, `gradient_ascii`, `gradient_blinds`, `gradient_waves`, `grainient`, `grid_distortion`, `grid_motion`, `grid_scan`, `hyperspeed`, `iridescence`, `letter_glitch`, `light_pillar`, `light_rays`, `light_tunnel`, `lightfall`, `lightning`, `line_waves`, `liquid_chrome`, `liquid_ether`, `magic_rings`, `magnet_lines`, `micro_slats`, `molten_metal`, `orb`, `particles`, `pattern_waves`, `pixel_blast`, `pixel_snow`, `plasma`, `plasma_wave`, `prism`, `prismatic_burst`, `radar`, `ripple_grid`, `scanner`, `shape_grid`, `shape_waves`, `side_rays`, `silk`, `sliced_waves`, `soft_aurora`, `threads`, `topography`, `waves`, `web_threads`
|
|
174
174
|
|
|
175
|
-
**Micro interactions (
|
|
175
|
+
**Micro interactions (35 + 1 sub-component):** `bell_toggle`, `branched_menu`, `call_chip`, `code_slots`, `comet_dial`, `dodge_field`, `flip_card`, `flying_button`, `folder_float`, `fuse_button`, `glide_select`, `hold_button`, `jelly_radio`, `lattice_loader`, `paper_crumple`, `peek_rating`, `prompt_bar`, `pulse_heart`, `refine_frame`, `rubber_segment`, `scrub_field`, `shredder`, `slide_commit`, `sling_button`, `slosh_gauge`, `spring_check`, `squish_switch`, `status_mark`, `swipe_row`, `swipe_toast`, `tear_ticket`, `thought_line`, `voice_pill`, `wake_slider`, `warm_tooltip`, `warm_tooltip_group`
|
|
176
176
|
|
|
177
177
|
Full docs, previews and prop descriptions for each component live at
|
|
178
178
|
[reactbits.dev](https://reactbits.dev).
|
|
@@ -203,6 +203,9 @@ python scripts/generate_wrappers.py scripts/components.json /tmp/react-bits
|
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
Update `PINNED_REF` in `custom_components/reflex_reactbits/source.py` to the new commit.
|
|
206
|
+
If `git diff --stat <old> <new> -- src/content` only adds files (new components), add the
|
|
207
|
+
old commit to `COMPATIBLE_REFS` next to it, so copies apps already vendored from it are not
|
|
208
|
+
reported as stale; if any existing component changed, empty that set instead.
|
|
206
209
|
|
|
207
210
|
## Development
|
|
208
211
|
|
|
@@ -235,10 +238,10 @@ given pull request introduces.
|
|
|
235
238
|
|
|
236
239
|
```bash
|
|
237
240
|
# 1. bump the version
|
|
238
|
-
$EDITOR pyproject.toml # [project] version = "0.2.
|
|
241
|
+
$EDITOR pyproject.toml # [project] version = "0.2.1"
|
|
239
242
|
|
|
240
243
|
# 2. tag it; the tag must match that version or release.yml stops
|
|
241
|
-
git tag v0.2.
|
|
244
|
+
git tag v0.2.1 && git push origin v0.2.1
|
|
242
245
|
```
|
|
243
246
|
|
|
244
247
|
The tag triggers `release.yml`, which builds, creates the GitHub release with the
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "reflex-reactbits"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "Reflex wrappers for React Bits: 200+ animated text effects, backgrounds, UI components and micro interactions."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -30,7 +30,7 @@ def test_every_component_renders(entry):
|
|
|
30
30
|
|
|
31
31
|
def test_catalog_counts():
|
|
32
32
|
main = [e for e in rb.CATALOG if not e.get("sub")]
|
|
33
|
-
assert len(main) ==
|
|
33
|
+
assert len(main) == 218
|
|
34
34
|
assert {e["category"] for e in main} == {"TextAnimations", "Animations", "Components", "Backgrounds", "Micro"}
|
|
35
35
|
|
|
36
36
|
|
|
@@ -264,6 +264,28 @@ def test_cli_add_reports_stale_copies(tmp_path, monkeypatch, capsys):
|
|
|
264
264
|
assert "added" in capsys.readouterr().out
|
|
265
265
|
|
|
266
266
|
|
|
267
|
+
|
|
268
|
+
def test_copies_from_a_compatible_ref_are_current(tmp_path, monkeypatch, caplog, capsys):
|
|
269
|
+
"""Bumping PINNED_REF for a new component must not flag the untouched ones as stale."""
|
|
270
|
+
from reflex_reactbits import cli
|
|
271
|
+
|
|
272
|
+
assets = _fake_repo(tmp_path, monkeypatch)
|
|
273
|
+
old_ref = next(iter(source.COMPATIBLE_REFS))
|
|
274
|
+
copy = assets / "reactbits" / "Backgrounds" / "Silk"
|
|
275
|
+
copy.mkdir(parents=True)
|
|
276
|
+
(copy / "Silk.jsx").write_text("export default () => null;\n")
|
|
277
|
+
(copy / "Silk.css").write_text(".silk{}")
|
|
278
|
+
(copy / source.REF_MARKER).write_text(old_ref + "\n")
|
|
279
|
+
with caplog.at_level("WARNING", logger="reflex_reactbits"):
|
|
280
|
+
assert source.ensure_component_source("Backgrounds", "Silk", ("Silk.css", "Silk.jsx"), assets_dir=assets) == []
|
|
281
|
+
assert "--force" not in caplog.text
|
|
282
|
+
assert cli.main(["add", "Silk", "--assets-dir", str(assets)]) == 0
|
|
283
|
+
out = capsys.readouterr().out
|
|
284
|
+
assert "present" in out and "stale" not in out
|
|
285
|
+
# Asking for another ref explicitly still reports the copy as stale.
|
|
286
|
+
assert cli.main(["add", "Silk", "--ref", "main", "--assets-dir", str(assets)]) == 0
|
|
287
|
+
assert "stale" in capsys.readouterr().out
|
|
288
|
+
|
|
267
289
|
def _plain(value):
|
|
268
290
|
"""Docs examples mark JSX values as {"$jsx": ...}; a string is a valid ReactNode."""
|
|
269
291
|
if isinstance(value, dict) and value.get("$jsx"):
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"""Reflex wrappers for React Bits (https://reactbits.dev)."""
|
|
2
|
-
|
|
3
|
-
from .animations import *
|
|
4
|
-
from .backgrounds import *
|
|
5
|
-
from .base import ReactBitsComponent
|
|
6
|
-
from .catalog import CATALOG, find_component
|
|
7
|
-
from .components import *
|
|
8
|
-
from .micro import *
|
|
9
|
-
from .source import ensure_component_source
|
|
10
|
-
from .text_animations import *
|
|
11
|
-
|
|
12
|
-
__all__ = ['CATALOG', 'ASCIIText', 'AccordionGallery', 'AcidSquares', 'AeroShards', 'AnimatedContent', 'AnimatedList', 'Antigravity', 'Aurora', 'Balatro', 'Ballpit', 'Beams', 'BellToggle', 'BlobCursor', 'BlurText', 'BorderGlow', 'BounceCards', 'BranchedMenu', 'BubbleMenu', 'CRTWarp', 'CallChip', 'CardNav', 'CardSwap', 'CardSwapCard', 'Carousel', 'ChromaGrid', 'CircularCarousel', 'CircularGallery', 'CircularText', 'ClickSpark', 'CodeSlots', 'ColorBends', 'CometDial', 'CountUp', 'Counter', 'Crosshair', 'CrystalizedBall', 'Cubes', 'CursorGrid', 'CurvedInput', 'CurvedLoop', 'DarkVeil', 'DecayCard', 'DecryptedText', 'DepthCarousel', 'DepthText', 'Dither', 'DitherVeil', 'Dock', 'DodgeField', 'DomeGallery', 'DotField', 'DotGrid', 'DriftWall', 'EchoText', 'ElasticMesh', 'ElasticSlider', 'ElectricBorder', 'ElectricLogo', 'EvilEye', 'FadeContent', 'FallingText', 'FaultyTerminal', 'Ferrofluid', 'FlexCarousel', 'FlipCard', 'FloatingLines', 'FlowingMenu', 'FluidGlass', 'FluxLines', 'FlyingPosters', 'FoldText', 'Folder', 'FolderFloat', 'FuseButton', 'FuzzyText', 'Galaxy', 'GhostCursor', 'GhostFibers', 'GlareHover', 'GlassIcons', 'GlassSurface', 'GlideSelect', 'GlitchText', 'GlowCursor', 'GooeyNav', 'GradientASCII', 'GradientBlinds', 'GradientText', 'GradientWaves', 'GradualBlur', 'Grainient', 'GridDistortion', 'GridMotion', 'GridScan', 'HalftoneReveal', 'HoldButton', 'HoloCard', 'Hyperspeed', 'ImageTrail', 'InfiniteMenu', 'InfiniteSpiral', 'Iridescence', 'JellyRadio', 'Lanyard', 'LaserFlow', 'LatticeLoader', 'LetterGlitch', 'LightPillar', 'LightRays', 'LightTunnel', 'Lightfall', 'Lightning', 'LineSidebar', 'LineWaves', 'LiquidChrome', 'LiquidEther', 'LogoLoop', 'MagicBento', 'MagicRings', 'Magnet', 'MagnetLines', 'MaskedHeading', 'Masonry', 'MetaBalls', 'MetallicPaint', 'MicroSlats', 'ModelViewer', 'MoltenMetal', 'MorphSlider', 'Noise', 'OptionWheel', 'Orb', 'OrbitImages', 'PaperCrumple', 'ParticleText', 'Particles', 'PatternWaves', 'PeekRating', 'PillNav', 'PixelBlast', 'PixelCard', 'PixelSnow', 'PixelSwap', 'PixelTrail', 'PixelTransition', 'Plasma', 'PlasmaWave', 'Prism', 'PrismaticBurst', 'ProfileCard', 'PromptBar', 'PulseHeart', 'Radar', 'ReactBitsComponent', 'RefineFrame', 'ReflectiveCard', 'Ribbons', 'RippleDistortion', 'RippleGrid', 'RotatingText', 'RubberSegment', 'Scanner', 'ScrambledText', 'ScrollExpand', 'ScrollFloat', 'ScrollReveal', 'ScrollStack', 'ScrollStackItem', 'ScrollVelocity', 'ScrubField', 'ShapeBlur', 'ShapeGrid', 'ShapeWaves', 'ShinyText', 'Shredder', 'Shuffle', 'SideRays', 'Silk', 'SlicedWaves', 'SlideCommit', 'SlingButton', 'SloshGauge', 'SoftAurora', 'SpecularButton', 'SplashCursor', 'SplitFlapText', 'SplitText', 'SpotlightCard', 'SpringCheck', 'SquishSwitch', 'Stack', 'StaggeredMenu', 'StarBorder', 'StatusMark', 'Step', 'Stepper', 'StickerPeel', 'Strands', 'StrokeText', 'SwarmCursor', 'SwipeRow', 'SwipeToast', 'TargetCursor', 'TearTicket', 'TechText', 'TextCursor', 'TextLoop', 'TextPressure', 'TextType', 'ThoughtLine', 'Threads', 'TiltedCard', 'TiltedCardLayer', 'Topography', 'TrueFocus', 'VariableProximity', 'VoicePill', 'WakeSlider', 'WarmTooltip', 'WarmTooltipGroup', 'WarpText', 'Waves', 'WebThreads', 'accordion_gallery', 'acid_squares', 'aero_shards', 'animated_content', 'animated_list', 'antigravity', 'ascii_text', 'aurora', 'balatro', 'ballpit', 'beams', 'bell_toggle', 'blob_cursor', 'blur_text', 'border_glow', 'bounce_cards', 'branched_menu', 'bubble_menu', 'call_chip', 'card_nav', 'card_swap', 'card_swap_card', 'carousel', 'chroma_grid', 'circular_carousel', 'circular_gallery', 'circular_text', 'click_spark', 'code_slots', 'color_bends', 'comet_dial', 'count_up', 'counter', 'crosshair', 'crt_warp', 'crystalized_ball', 'cubes', 'cursor_grid', 'curved_input', 'curved_loop', 'dark_veil', 'decay_card', 'decrypted_text', 'depth_carousel', 'depth_text', 'dither', 'dither_veil', 'dock', 'dodge_field', 'dome_gallery', 'dot_field', 'dot_grid', 'drift_wall', 'echo_text', 'elastic_mesh', 'elastic_slider', 'electric_border', 'electric_logo', 'ensure_component_source', 'evil_eye', 'fade_content', 'falling_text', 'faulty_terminal', 'ferrofluid', 'find_component', 'flex_carousel', 'flip_card', 'floating_lines', 'flowing_menu', 'fluid_glass', 'flux_lines', 'flying_posters', 'fold_text', 'folder', 'folder_float', 'fuse_button', 'fuzzy_text', 'galaxy', 'ghost_cursor', 'ghost_fibers', 'glare_hover', 'glass_icons', 'glass_surface', 'glide_select', 'glitch_text', 'glow_cursor', 'gooey_nav', 'gradient_ascii', 'gradient_blinds', 'gradient_text', 'gradient_waves', 'gradual_blur', 'grainient', 'grid_distortion', 'grid_motion', 'grid_scan', 'halftone_reveal', 'hold_button', 'holo_card', 'hyperspeed', 'image_trail', 'infinite_menu', 'infinite_spiral', 'iridescence', 'jelly_radio', 'lanyard', 'laser_flow', 'lattice_loader', 'letter_glitch', 'light_pillar', 'light_rays', 'light_tunnel', 'lightfall', 'lightning', 'line_sidebar', 'line_waves', 'liquid_chrome', 'liquid_ether', 'logo_loop', 'magic_bento', 'magic_rings', 'magnet', 'magnet_lines', 'masked_heading', 'masonry', 'meta_balls', 'metallic_paint', 'micro_slats', 'model_viewer', 'molten_metal', 'morph_slider', 'noise', 'option_wheel', 'orb', 'orbit_images', 'paper_crumple', 'particle_text', 'particles', 'pattern_waves', 'peek_rating', 'pill_nav', 'pixel_blast', 'pixel_card', 'pixel_snow', 'pixel_swap', 'pixel_trail', 'pixel_transition', 'plasma', 'plasma_wave', 'prism', 'prismatic_burst', 'profile_card', 'prompt_bar', 'pulse_heart', 'radar', 'refine_frame', 'reflective_card', 'ribbons', 'ripple_distortion', 'ripple_grid', 'rotating_text', 'rubber_segment', 'scanner', 'scrambled_text', 'scroll_expand', 'scroll_float', 'scroll_reveal', 'scroll_stack', 'scroll_stack_item', 'scroll_velocity', 'scrub_field', 'shape_blur', 'shape_grid', 'shape_waves', 'shiny_text', 'shredder', 'shuffle', 'side_rays', 'silk', 'sliced_waves', 'slide_commit', 'sling_button', 'slosh_gauge', 'soft_aurora', 'specular_button', 'splash_cursor', 'split_flap_text', 'split_text', 'spotlight_card', 'spring_check', 'squish_switch', 'stack', 'staggered_menu', 'star_border', 'status_mark', 'step', 'stepper', 'sticker_peel', 'strands', 'stroke_text', 'swarm_cursor', 'swipe_row', 'swipe_toast', 'target_cursor', 'tear_ticket', 'tech_text', 'text_cursor', 'text_loop', 'text_pressure', 'text_type', 'thought_line', 'threads', 'tilted_card', 'tilted_card_layer', 'topography', 'true_focus', 'variable_proximity', 'voice_pill', 'wake_slider', 'warm_tooltip', 'warm_tooltip_group', 'warp_text', 'waves', 'web_threads']
|
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/animations.py
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/animations.pyi
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/backgrounds.py
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/backgrounds.pyi
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/base.py
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/base.pyi
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/catalog.py
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/components.py
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/components.pyi
RENAMED
|
File without changes
|
{reflex_reactbits-0.2.0 → reflex_reactbits-0.2.1}/custom_components/reflex_reactbits/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|