Commit Graph

59 Commits

Author SHA1 Message Date
Kaur Kuut 294bb441b0
Prepare `Cargo.toml` files for release. (#249)
* Rename classic `xilem` to `xilem_classic` and the new `xilem_masonry`
to `xilem`.
No directory structure changes yet to avoid merge conflicts before
RustNL.
* Base common dependencies on workspace dependencies.
* Bump `masonry` version to `0.2.0`.
* Remove some legacy docs.rs configuration inherited from Druid/Glazier
that is no longer needed.
* Unify ordering of properties.
2024-05-03 20:07:12 +00:00
Kaur Kuut 205a9a28a4
Revert to `vello` v0.1.0. (#248)
As discussed at office hours we're going with Vello v0.1.0 for now, as
using the git dependency blocks publishing and Vello 0.2 isn't ready.
2024-05-03 15:43:42 +00:00
Bruce Mitchener d25d624d79
deps: Use workspace vello, release parley. (#238)
`xilem` now uses the same `vello` as others (git for now) and everyone
uses the new released version of `parley`.
2024-05-01 15:52:42 +00:00
Aaron Muir Hamilton 30c838b400
Port Xilem and Masonry to winit 0.30.0 (#237) 2024-05-01 11:58:21 +00:00
Bruce Mitchener d513e33a6d
deps: Use `raw-window-handle` 0.6.0 (#227)
We don't need to force the usage of 0.5.0.
2024-04-28 02:46:50 +00:00
Bruce Mitchener 571c20d73e
deps: Update parley. (#221)
This version of parley has fontique as a separate crate and has updated
dependencies (as well as a removal of clap as a transitive dep).
2024-04-26 14:41:02 +00:00
Bruce Mitchener ebb4d55f12
parley: Use via workspace dependency. (#210)
This will help us keep everyone using the same version. This also
makes both `xilem` and `masonry` use the same version now.
2024-04-26 00:23:57 +00:00
Daniel McNab 69ac0807b9
Create a minimal xilem_masonry (#205)
* Create a minimal xilem_masonry

* Add a first draft of view sequences

* Implement a flex view

* Fix clippy

Some of these suggestions are kind of bad
but that's by-the-by

* Update CI to 1.77

* Skip masonry docs in CI

* Clippy, again

* Fix clippy

* Skip render snapshot tests

* Skip testing which needs rendering on CI

* Add tuple sequences

* Address review comments and clippy
2024-04-25 12:27:37 +00:00
Bruce Mitchener 041ea0df9f
Remove `test-log` and `env_logger`. (#201)
`test-log` is used with logging to set up `env_logger` for each
test and was only used in the box constraints code. This code
doesn't actually use logging, so this wasn't doing much.
2024-04-16 08:35:46 +00:00
Chad Brokaw 24423aa8f7
Update parley dependency to bring in new font fallback support (#196)
* testing fontique integration

* new text to test font fallback

* restore wgpu patch

* update to new parley git rev

* update rev again
2024-04-02 22:19:51 +00:00
Daniel McNab 072358e293
Use released versions of Vello and wgpu (#190)
* Use released versions of Vello and wgpu

Partially reverts #177

Fixes #189

* Revert auto format of comment
2024-03-19 14:20:03 +00:00
Bruce Mitchener fbe553f9de
clippy: Configure via `lints` table in `Cargo.toml` (#185)
As of Rust 1.74, lints can be configured within the `Cargo.toml`
which allows us to not have to configure them in the source code
as well as simplifying having a single configuration across an
entire workspace.

This is documented at: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-lints-section
2024-03-09 16:26:02 +00:00
Aaron Muir Hamilton 21a84d6973
Bump vello and remove wgpu override. (#179) 2024-03-02 22:09:27 +00:00
Aaron Muir Hamilton 6500c5058b
Handle scroll events and use winit Modifiers and MouseButton (#178) 2024-02-29 18:45:26 +00:00
Philipp Mildenberger f2454ebe77
Updated dependencies (notably wgpu and vello) (#177) 2024-02-24 11:09:33 +00:00
Aaron Muir Hamilton 21771ef71b
basic winit port (#176)
* Remove menu bar.

* Add PointerCrusher

* Implement basic winit event handling.

* Remove now-inert accessibility and idle code.
2024-02-23 15:47:10 +00:00
Aaron Muir Hamilton 9db9497420
Bump kurbo and related dependencies. (#173) 2024-02-14 23:29:46 +00:00
Aaron Muir Hamilton 09d3656c3a
Bump Taffy to 0.4.0. (#172)
Bump Taffy.
2024-02-14 21:34:19 +00:00
Aaron Muir Hamilton 93480bc98d
Upgrade Vello and ditch SceneBuilder/SceneFragment. (#170) 2024-02-13 23:36:33 +00:00
Chad Brokaw d800c22399
Update vello and parley deps... (#165)
* Update vello and parley deps...

... and everything else, apparently. This pushes the new font code changes through the ecosystem.

Brings everything into sync and should put us in a good place to start releasing.

This works as is but depends on a vello commit that is still under review: linebender/vello#425 should land first and this should be updated with the new git rev before merging.

* fmt :(

* update git revs
2024-01-26 17:22:18 +00:00
Philipp Mildenberger ea45b9f8c1
Merge `xilem_html` and `xilem_svg` as `xilem_web` (#142)
* Merged xilem_svg into xilem_html

* Renamed xilem_html to xilem_web and removed xilem_svg

* xilem_web: factor pointer to root, as it can be used for all Elements and refactor slightly

* Rename example

* xilem_web: Make BoxedView public

* Rename cx.add_new_attribute_to_current_element -> add_attr_to_element and IntoAttributeValue::into_attribute_value -> IntoAttributeValue::into_attr_value

* Add the `fill` and `stroke` attribute to the `g` element
2024-01-04 16:17:13 +00:00
Nico Burns c439885866
Implement `TaffyLayout` widget (#140)
* Fix text widget layout invalidation

* Gitignore .DS_Store files

* Add downcast_ref method to Pod

* Add compute_max_intrinsic method to Pod

Implement compute_max_intrinsic for Box<dyn AnyWidget>

* Add TaffyLayout view and widget

* Add background_color support to TaffyLayout

* Add taffy example
2023-11-28 15:26:48 +00:00
Philipp Mildenberger 5b3de313c7
xilem_html: Add MathML and SVG elements/DOM interface traits (#153)
* Added all MathML elements

* xilem_html: Add all SVG elements and DOM interfaces, and an example using MathML and raw SVG

* Cargo fmt

* xilem_html: Reduce boilerplate in elements, by adding a new macro match arm

* xilem_html mathml_svg example: Remove unnecessary stuff in index.html

* xilem_html: Use `mod`s for each element namespace (html, mathml, svg)
2023-11-28 13:28:18 +00:00
Philipp Mildenberger d40a94fa8a
xilem_html: Significant refactor and introduce DOM interface traits (#141)
* xilem_html: Introduce DOM interface traits to make per DOM element typing possible and flexible

* Cleanup a little bit (remove artifacts from refactor)

* Use separate sealed interfaces to avoid blanket trait impl collisions

* Add generic params T and A to event views and Attr via PhantomData, to avoid inference issues with composed types

* xilem_html: Refactor DOM interface macros

* Add ancestor *and* descendent composable macros
* Added a macro to correctly and conveniently implement dom interfaces for interface restricted Views, this is used currently for the Attr view and the event views

* xilem_html: Add namespace to element generation and refactor element/attribute logic into separate functions

* xilem_html: Remove unnecessary features

* xilem_html: Implement DOM interface traits for Adapt and AdaptState

* xilem_html: Refactor OneOf views
* Eliminate associated trait bound for the View, for easier use
* Add additional OneSeqOf view sequences, to avoid removing the ViewMarker super trait bound on Element
* implement all dom interfaces for the OneOf views

* xilem_html: Reorder generic type parameters in composing views such as `Attr`
2023-11-23 16:25:42 +00:00
Raph Levien 71d1db04dc
Dust off xilem_svg (#139)
* Make xilem_svg into a library

Instead of having the demo app hardcoded, make it a library with a web_examples folder, just like its xilem_html sibling. This patch doesn't change the example or any functionality.

* Migrate KurboShape to ViewExt

Exports a `ViewExt` trait, and wires up types so that type inference can flow through the methods on this trait. That removes the hacky `KurboShape` workaround.

* clippy

* Add fill and stroke

Supports very basic fill and stroke (solid colors, stroke width but no other style parameters).

* rustfmt

* Address review feedback

Fix some cut'n'paste errors, and update README slightly.
2023-11-05 17:26:39 +00:00
Kaur Kuut 3465ddefaa
Migrate to the generic Linebender CI script. (#135) 2023-09-12 17:50:50 +03:00
Bruce Mitchener e26914301b Update to current-ish glazier.
The change to `app_main.rs` matches a similar change made in the
Glazier examples.

Also, since we now have both x11 and wayland backends on some
platforms, we need to make sure that we create the application
prior to creating the menu. This will be improved in future
versions of Glazier.

This minimally updates to the PointerEvent API within Glazier
as that has replaced the MouseEvent API.
2023-09-11 07:21:10 +07:00
Chad Brokaw 089d04e020
Bump vello version for CFF fixes (#123)
* Bump vello (and wgpu versions)

Updates xilem to the latest vello. Also bumps wgpu to 0.17.0.

This should enable CFF/CFF2 support.

* rev vello (again)

* fix deps

* update rev for merged vello PR
2023-08-07 17:15:13 -04:00
Chad Brokaw 2f9f5b6a48
Bump vello (and wgpu versions) (#122)
Updates xilem to the latest vello. Also bumps wgpu to 0.17.0.

This should enable CFF/CFF2 support.
2023-08-07 10:03:01 -04:00
Kaur Kuut 1ecaafe33c
Fill out and clean up all the `Cargo.toml` files. (#117) 2023-07-30 21:14:59 +03:00
Kaur Kuut 4a77511587
Convert the main binary target into an example. (#116) 2023-07-30 00:09:30 +03:00
Bruce Mitchener 8f10d3f539 Remove `gtk` feature.
Since this is going away in the underlying glazier, we can remove
it now to make sure that everyone is aware. The default is `x11`,
so this should have little impact.
2023-07-19 11:37:42 +07:00
Bruce Mitchener a2e0089f6f deps: Update bitflags from 1.x to most recent 2.x. 2023-07-14 00:26:58 +07:00
Bruce Mitchener d244f1a6c3 deps: Remove unused, move 2 to dev-dependencies.
`test-log` and `env_logger` are dev dependencies, so should be marked
as such.

Other dependencies weren't used directly and have been removed from
being direct dependencies of `xilem`:

* `bytemuck`
* `png`
* `rand`
* `raw-window-handle`
* `roxmltree`
2023-07-13 15:13:28 +07:00
Bruce Mitchener 15a981bf55 xilem, xilem_core: State the license in Cargo.toml. 2023-07-12 23:58:33 +07:00
Raph Levien 1fd1ce7885 Add wasm DOM implementation for xilem.
I'm doing all the work in a single commit so it's easier to rebase.

Below is a list of the individual changes I did

 - Squash prev commits
 - Remove top-level action handler (use Adapt instead).
 - Type events in the same way as elements (could also do attributes the
   same)
 - Allow users to avoid compiling the typed html/attributes/events
 - Use more specific types for mouse events from web_sys
 - change "click" from PointerEvent to MouseEvent (PointerEvent caused a
   panic on `dyn_into().unwrap()`)
2023-06-25 19:42:02 +01:00
Raph Levien 4b403d3f53
Merge pull request #61 from linebender/macro_core
Macro based implementation of xilem_core
2023-05-15 09:09:17 -07:00
Chad Brokaw d2e409c284 remove unused swash dependency 2023-05-11 12:14:23 -04:00
Chad Brokaw 420918879f Update vello to latest
Updates dependencies so we're on the latest version of vello.
2023-05-10 14:04:51 -04:00
Raph Levien d729039f13 Macro based implementation of xilem_core
Experimenting with macros to make the View traits more generic.
2023-04-24 21:43:50 -07:00
Christoph 7d2a90c5df
Merge pull request #40 from xarvic/sequence
Draft for a simple container view
2023-03-01 19:32:39 +00:00
Chad Brokaw ed1565d471 Update parley
Parley now pulls in @jneem's version of fount so the patch is no longer needed.
2023-02-28 16:46:05 -05:00
xarvic 7aae58ecf2 implemented LifeCycle::TreeUpdate
added hot state logic in ViewContextChanged
added RequestFlags::TREE
2023-02-24 08:04:36 +01:00
Kaur Kuut 89f487ed1f
Update `glazier`, `vello`, `wgpu`, and `accesskit`. (#43) 2023-02-22 19:11:17 +02:00
Chad Brokaw b9ce8053b2 fix gradients and pin vello 2023-01-18 12:06:42 -05:00
Raph Levien 47785e609a Enable AccessKit and update dependencies
Turn on the AccessKit dependency and also update to more recent glazier and Vello versions.

Also follow new policy of pinning git dependencies to avoid future breakage.
2023-01-13 20:59:48 -08:00
Chad Brokaw ab8d959b80 change repo name for vello git dependency 2022-12-13 13:20:07 -05:00
Chad Brokaw ecfc08efea Update for the piet-wgsl -> vello name change
Removes the `piet-scene` dependency and adds `vello`. Updates all imports for the new crate name. This leaves the git reference as linebender/piet-gpu for now. We can change that to vello in this PR (after the repo is renamed) or in a subsequent one.
2022-12-12 17:21:45 -05:00
Chad Brokaw b008364c85 add crates.io patch for naga 2022-11-26 17:18:13 -05:00
Chad Brokaw d72b94fed4 Move to piet-wgsl for rendering
Removes the piet-gpu and piet-gpu-hal dependencies and updates the rendering code to use piet-wgsl.
2022-11-26 16:53:40 -05:00