* Chore: remove random old test fixture from CLI
* nuke oidc
* remove weird useless desktop example
* remove lua globals vscode setting for cli
* remove cli testcase
* hoist deps in core-macro
* we dont need prettyplease
* add hoisted dependencies
* hoist more despt
* rename rsx_rosetta to dioxus_rsx_rosetta
* drop cache thrashing when listening for features
* drop flag from mobile dep
* drop cli-config warning
* hoist more deps
* clippy...
* we dont use the tools module...
* bump lock
* hoist example projects, remove oidc
* move over example projects from the separate repo
* Update ecommerce site to the latest version of dioxus
* update wifi scanner to 0.5
* drop the chatbot example; might be restored in a separate PR
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Fixes scrolling on vscode using simple fix
Adds scroll modifier, scroll at 5 lines per scroll while holding shift key.
Adds error handling for manganis failure that still lets the build run.
Revises TUI rendering code.
Move TUI "info bars" to the bottom of the terminal.
Revised logging system with tracing
Working [c] clear keybind. This has been removed.
Removal of [h] hide keybind text (it does nothing)
Some opinionated cleanups and renames to make tui logic easier to understand.
Rolling log file & maybe add some more "internal" logging. Closes CLI Rolling Log File #2764
Removes log tabs. Closes CLI: Color-code logs and get rid of tabs #2857
Combines info bars.
Working and good text selection.
Print launch URL in console.
Handle log lines properly and add formatting.
Move MessageSource to a more reasonable location.
Add some background styling to powerline (info bar) - Tried this and it doesn't look the greatest.
Log Filtering
Final Cleaning & Changes - I could do this forever
Test Linux
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Allow hooks in the expression of a match statement and if statement
* Don't allow hooks in spawn and detect hooks in initialization closures
* Point to DX check when hooks are called conditionally
* Fix hot reloading components with keys
* include component formatted segment keys, but not dynamic component value
* Fix component_literal_dyn_idx index
* add a new test for hot reloading components with keys
* Even more tests
* make clippy happy
* fix typo
* Expose a generic lazy type
* Switch to generic lazy globals
* simplify global lazy context a bit
* rename LazyGlobal to Global
* use Memo::global in more examples
* Fix soundness issue with deref_impl. It relies on the size of self, so it cannot be safe
* add a comment about safety
* Make clippy happy
* fix formatting
* Restore changes to signal impl
* Add helper methods for global signal and global memo to make getting the inner value easier
* Add the capability to handle resize event for web target
* Add the capability to handle resize event for desktop target
* Return all the sizes, not just the first one
* Fix conversion from platform to generic ResizedData for liveview
* Update the generated interpreter js code base
* Fix clippy warnings
* Fix inconsistent use of block_size and inline_size
* Rename `onresized` event to `onresize`
* Remove the the special-casing logic from the binding logic
* Propagating the resize events using CustomEvent
* Fix case convention in core ts
* revert changes to unified bindings
* Cleanup as suggested
* add a resize example
* Fix desktop resize events
* remove tracing from resize example
* use the raw resize entry so we can downcast on web
* remove unused ResizeEventDetail
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* Fix hot reloading component properties out of order
* ignore signal write warnings in hot reloading
* Fix hot reloading components with only some literal properties
* Add a test for hot reloading component properties
* got a repro, but no solution :(
* hmmmmm 🤔
* awyayayayayayya
* omg it's because we dont create in rev
* Make nodes rev
* fix tests compile
* Clean up PR
* revert changes to native
* Clean up PR, add test
* remove clone mounted; mounted nodes should never leak into components?
* Remove the mount from vnodes after unmounting them
* Fix use after removal in iterator diffing
* remove logs
* Re-fix keyed list diffing
* Use new.len for diffing keyed lens and remove redundant check
* simplify core list diffing logic a bit
* remove println
* add proper asserts for new tests
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* add prevent default methods to the event
* sync prevent default almost working
* sync prevent default working
* Move event handling into the runtime
* update core tests
* restore desktop file dialog
* implement prevent default on web
* add a hint about the new prevent default method
* fix web prevent default
* Fix CTRL+click on links
* fix values memorize in place test
* Fix a few more tests
* Add a playwright test for sync prevent default
* Fix core doc tests
* create a deprecated VirtualDom::handle_event
* fix macos imports in desktop
* Fix onmounted event
* Fix liveview support
* switch to RefCell for metadata
* Remove println
* remove prevent default attribute
* remove web specific link behavior
* Fix liveview links
* more liveview fixes for link
* Fix merge conflicts
* Fix clippy
* use the new prevent default in the file upload example
* Fix nested rsx expansion by not using template titles
* fix writers with nameless templates
* fix clippy
* dont commit vscode fix
* fix release mode, pull out __template_name
* fix axum_desktop
* Fix core tests
* Make most fields of HotReloadedTemplate public for testing
* wip: formatting, compare all diff cases
* slightly smarter diffing for dynamic nodes
* add a comment about generic node diffing
* clean up mutations a bit
* fix load template
* simplify maybe_rebuild
* Restore write mutations flag in web
* write_mutations -> skip_mutations
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* Add new crate to workspace members
* Replace DioxusCrate with cargo metadata
* Skip initializing git repo in already existing workspace
* Fix init in workspace
* Fix naming issues with new packages
Changes how we parse names so `dx new packages/blah`creates a subdirectory instead
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* add liveview cli support
* Fix TUI fullstack deadlock
* look for fullstack assets in the public directory
* Fix fullstack with the CLI
* Fix static generation server
* progress: add test
* feat: optional read signals
* revision: doc
* fix: fmt
* revision: imports
* fix: return type only if option
* add a few more compile tests for optional props
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* CI: add docsrs to ci
* add env vars
* no need for tokio things
* whoops, wrong rust nightly
* add swc
* bump crate versions to 0.6.0-alpha.0
* hoist up warnings and shuffle cargo.toml
* update cargos and disable warnings from ci
* attempt fix of aws
* attempt disabling aws_lc_sys globally
* pull in lc-sys
* add fips feature to fix docs
* turn on features for aws-lc-sys on cargo-doc-all
* pass along more args
* fix cfg docs
* fix: flakey gen box test
* fix: doc_cfg in static gen
* dont include readme
* fix error on static gen
* remove random line
* temporarily disable warnings
* simplify axum desktop so it doesnt count as a lib
* fix binstall link
* bump locks
* lock fixes
* revert axum desktop
* dont publish some crates
* add new autofmt sample
* Feat: implement rustfmt::skip support for rsx
* generally improve error handling with better expect messages
* wip: nested rsx formatting and expression formatting
* nested rsx formatting works
* collapse autofmt crate
* cast indent through macros
* use proper whitespace
* no more eating comments!
* Use proper error handling
* create the dynamic value pool
* assign ids to dynamic formatted segments
* separate the rendering and literal pools
* rsx output compiles again
* more examples compiling with new rsx expansion
* update template body explanation
* all workspace examples compile
* fix formatted segments in keys
* start hot reload diffing
* fix component literal hot reloading
* start integrate new hot reloading with the CLI
* simple hot reloads working
* Fix hot reloading blocks with components
* implement hot reloading for if chains
* Fix hot reloading after a template requires a full rebuild
* Fix hot reloading any attribute values
* remove unsafe from hot reload utils
* Fix hot reloading empty rsx
* add more hot reloading tests
* reorganize hot reload module
* fix web hydration
* fix empty rsx nodes in autoformatting
* fix tests
* remove path sorting logic from core
* make template names more consistent in debug mode
* fix quote_as_hot_reload_literal for explicitly typed literals
* fix can_be_shorthand for string literals
* fix formatted single dynamic expression
* Fix usize component properties and playwright tests
* remove default implementation for TemplateBody
* add a bunch more comments for diffing, scoring and why this scoring system is optimal
* Clear builds logs on clear screen key event and fix keybinds rendering
* Clear the currently selected build logs
* Add placeholder for / screen
* Change tabs to be 1-indexed
* Redirect build errors to build tab
* Open the running app with 'o'
* Fix#2612: adjust readable trait to allow try_peek
Our implementation for Readable was inconsistent.
We had a try_unchecked variant for read but not for peek.
This resolves that by making a breaking change to the
Readable interface.
* fix doctests too
* use head elements and new manganis syntax in examples
* only enable desktop workspace example scraping during a dioxus release
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* fix formatting and merging if chains in attributes
* fix autoformat if attribute chains
* Fix IfAttributeValue ToTokens implementation
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Add a deprecation warning for the resource option in dioxus.toml
* fix name of resource config
* fix tab spacing issue
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* unify the warning system
* fix VirtualDom::new warning with a component
* move warnings to dioxuslabs
* also allow writes in the component body when converting from T -> ReadOnlySignal<T>
* fix clippy from merge conflict
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Replace expect error messages
* Change message
* Create RuntimeError struct
* Pass error through core methods
* Fix use of Runtime::current in signals package
* Fix tests
* Add #[track_caller] for better error output and fix maybe_with_rt
* provide a help message along with RuntimeError
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* fix rsx autocomplete and diagnostics in the root; provide better completions after attributes are finished
* clean up pr to use internal child parsing
* Fix peek_lowercase name
* fix comma diagnostics in the root
* Fix parsing components with a path
* remove simple routes trailing comma
* Fix incomplete_root_elements test
* Remove trailing commas from root body node in tests
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* feat: don't use function pointer to allow capturing context
* fix: make virtualdom factory take a function of type ComponentFunction with empty props
* fix: remove redundant generic arg
* fix: bruh
* fix: bruh
* fix issue with AWS-LC-SYS
* after mergo of manganis revert back to original
---------
Co-authored-by: Oliver Schnabl <oliver.schnabl@drei.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Fix generation race condition with sync storage
* Document GenerationalPointer
* check generation before recycling generational box
* fix clippy
* make race_condition_regression test panic if it fails
* Moves index.html creation until after wasm creation so the webserver doesn't prematurely serve the page
* sets up nasm for windows builds (to be superseded by Remove Dioxus CLI NASM dependency #2666#2682)
* puts magnanis-cli-support in a blocking task to prevent threadlocking during sequential builds
* changes order of client/server builds such that the client is built before the server so the webserver doesn't prematurely serve invalid client code
* declobbers "serve" such that each project gets a different dir in the target folder
* uses nest_service instead of fallback so the router doesn't respond with fallback codes
* reincorporates doge's fix from Fix hot-reloading on Windows #2544
* Handle deserialize errors rather than panic
* don't clone event data for deserialization in debug or release mode
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Hotreload the contents of for loops, if chains, component bodies, props, attributes, and any literals discovered in rsx!
Add a TUI renderer to the CLI.
Improve the CLI build system to be async and parallel.
Refactor RSX to allow partial expansion of expressions.
Merge autofmt implementations for consistency.
Merge the representation of elements and components under the hood.
Add a diagnostics system for rsx for improved error messages.
Drop interprocess and move to websockets for communication between the CLI and the server.
Assign IDs to nodes and attributes in a stable way to be used in non compiler contexts.
Add hotreloading to any body of component/for loop/if chain/etc.
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Liam Mitchell <liamkarlmitchell@gmail.com>
* switch to a Document trait and introduce Script/Head/Style/Meta components
* Fix desktop title
* Insert special elements into the head during the inital SSR render
* Make all head component attributes optional
* hydrate head elements
* improve the server streaming head warning
* Document fullstack head hydration approach
* deduplicate head elements by href
* move Link into head::Link
* document head components
* add meta and title examples
* Fix a few doc examples
* fix formatting
* Add title to playwright tests
* serde is optional on web, but it is enabled by hydrate
* remove leftover console log
* fix: template names
* fix: hot reload "resets" after reload
* revision: ensure all paths are split by `/`
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* feat: cli settings
* revision: lower msrv
* add previous line about hotreload settings just in case
* Fix issue with open
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>