Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to sycamore #109

Merged
merged 1 commit into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Environment**
- Maple: [e.g. 0.1.0, master]
- Sycamore: [e.g. 0.1.0, master]
- Browser: [e.g. chrome, safari, if applicable]
- OS: [e.g. Windows, if applicable]

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: always()

- name: Run headless browser tests
run: wasm-pack test maple-core --firefox --chrome --headless
run: wasm-pack test sycamore --firefox --chrome --headless
if: always()

clippy:
Expand Down Expand Up @@ -83,5 +83,5 @@ jobs:

- name: Run tests
run: |
cd maple-core
cd sycamore
cargo miri test
66 changes: 33 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,126 +12,126 @@
button(aria-hidden="true")
}
```
[[@lukechu10], [#79](https://github.com/lukechu10/maple/pull/79)]
[[@lukechu10], [#79](https://github.com/lukechu10/sycamore/pull/79)]

- #### 🛠 Fixes

- Delete removed nodes in `Keyed` first before adding new nodes and moving existing nodes [[@lukechu10], [#77](https://github.com/lukechu10/maple/pull/77)]
- Delete removed nodes in `Keyed` first before adding new nodes and moving existing nodes [[@lukechu10], [#77](https://github.com/lukechu10/sycamore/pull/77)]

## ✨ **0.4.2** _(2021-03-31)_

#### Changelog

- #### 🛠 Fixes

- Fix `Keyed` iteration (hopefully for the last time) when moving nodes already inserted [[@lukechu10], [#75](https://github.com/lukechu10/maple/pull/75)]
- Fix `Keyed` iteration (hopefully for the last time) when moving nodes already inserted [[@lukechu10], [#75](https://github.com/lukechu10/sycamore/pull/75)]

## ✨ **0.4.1** _(2021-03-31)_

#### Changelog

- #### 🛠 Fixes

- Fix `Keyed` iteration (swapping and inserting not at the end) [[@lukechu10], [#73](https://github.com/lukechu10/maple/pull/73)]
- Fix `Keyed` iteration (swapping and inserting not at the end) [[@lukechu10], [#73](https://github.com/lukechu10/sycamore/pull/73)]

- #### 📃 Documentation Fixes

- Fix typo in `README.md` [[@iwburns], [#64](https://github.com/lukechu10/maple/pull/64)]]
- Add discord server link to issue template [[@lukechu10], [#68](https://github.com/lukechu10/maple/pull/68)]
- Fix typo in `README.md` [[@iwburns], [#64](https://github.com/lukechu10/sycamore/pull/64)]]
- Add discord server link to issue template [[@lukechu10], [#68](https://github.com/lukechu10/sycamore/pull/68)]

- #### 🎁 Example Fixes

- Fix filter links in TodoMVC example [[@lukechu10], [#65](https://github.com/lukechu10/maple/pull/65)]
- Fix filter links in TodoMVC example [[@lukechu10], [#65](https://github.com/lukechu10/sycamore/pull/65)]

## ✨ **0.4.0** _(2021-03-25)_

#### Changelog

- #### ⚡️ Features

- Iteration using `SignalVec`. This is more of an experiment and there are some bugs. This will most likely be removed in a future version [[@lukechu10], [#49](https://github.com/lukechu10/maple/pull/49)]
- Keyed iteration using `Keyed` and non-keyed iteration using `Indexed` which can iterate over a `Signal<Vec>`. This is the recommended way to iterate over a list of values [[@lukechu10], [#51](https://github.com/lukechu10/maple/pull/51), [#53](https://github.com/lukechu10/maple/pull/53) and [#54](https://github.com/lukechu10/maple/pull/54)]
- Node references. Use the `ref` attribute to bind an HTML element to a `NodeRef` [[@lukechu10], [#57](https://github.com/lukechu10/maple/pull/57)]
- Iteration using `SignalVec`. This is more of an experiment and there are some bugs. This will most likely be removed in a future version [[@lukechu10], [#49](https://github.com/lukechu10/sycamore/pull/49)]
- Keyed iteration using `Keyed` and non-keyed iteration using `Indexed` which can iterate over a `Signal<Vec>`. This is the recommended way to iterate over a list of values [[@lukechu10], [#51](https://github.com/lukechu10/sycamore/pull/51), [#53](https://github.com/lukechu10/sycamore/pull/53) and [#54](https://github.com/lukechu10/sycamore/pull/54)]
- Node references. Use the `ref` attribute to bind an HTML element to a `NodeRef` [[@lukechu10], [#57](https://github.com/lukechu10/sycamore/pull/57)]

- #### 🛠 Fixes

- Fix debug assertions in `Keyed` [[@lukechu10], [#53](https://github.com/lukechu10/maple/pull/53)]
- Fix debug assertions in `Keyed` [[@lukechu10], [#53](https://github.com/lukechu10/sycamore/pull/53)]

- #### 🛠 Internal Fixes and Improvements

- Setup integration tests [[@lukechu10], [#51](https://github.com/lukechu10/maple/pull/51)]
- Setup integration tests [[@lukechu10], [#51](https://github.com/lukechu10/sycamore/pull/51)]

- #### 🎁 Examples

- Complete spec conforming TodoMVC implementation [[@lukechu10], [#60](https://github.com/lukechu10/maple/pull/60)]
- Complete spec conforming TodoMVC implementation [[@lukechu10], [#60](https://github.com/lukechu10/sycamore/pull/60)]

## ✨ **0.3.1** _(2021-03-16)_

#### Changelog

- #### ⚡️ Features

- More types in `template!` macro. `template!` can now be nested [[@lukechu10], [#45](https://github.com/lukechu10/maple/pull/45)]
- Component lifecycle using `on_cleanup` [[@lukechu10], [#24](https://github.com/lukechu10/maple/pull/24)]
- More types in `template!` macro. `template!` can now be nested [[@lukechu10], [#45](https://github.com/lukechu10/sycamore/pull/45)]
- Component lifecycle using `on_cleanup` [[@lukechu10], [#24](https://github.com/lukechu10/sycamore/pull/24)]

- #### 🛠 Fixes

- Add some badges to `README.md` [[@lukechu10], [#44](https://github.com/lukechu10/maple/pull/44) and [#48](https://github.com/lukechu10/maple/pull/48)]
- Add some badges to `README.md` [[@lukechu10], [#44](https://github.com/lukechu10/sycamore/pull/44) and [#48](https://github.com/lukechu10/sycamore/pull/48)]

## ✨ **0.3.0** _(2021-03-13)_

#### Changelog

- #### ⚡️ Features

- Nested effects. Inner effects are destroyed and recreated when outer effects re-run [[@lukechu10], [#29](https://github.com/lukechu10/maple/pull/29)]
- `cloned!` macro for making it easier to clone items into a new scope [[@lukechu10], [#34](https://github.com/lukechu10/maple/pull/34)]
- Effects are created inside a reactivity root (using `create_root`). When the root `Owner` is dropped, all effects are also destroyed [[@lukechu10], [37](https://github.com/lukechu10/maple/pull/37)]
- Nested templates. Using this, it is also possible to build simple `if`/`else` control flow although there will be a more polished version [[@lukechu10], [#41](https://github.com/lukechu10/maple/pull/41)]
- Nested effects. Inner effects are destroyed and recreated when outer effects re-run [[@lukechu10], [#29](https://github.com/lukechu10/sycamore/pull/29)]
- `cloned!` macro for making it easier to clone items into a new scope [[@lukechu10], [#34](https://github.com/lukechu10/sycamore/pull/34)]
- Effects are created inside a reactivity root (using `create_root`). When the root `Owner` is dropped, all effects are also destroyed [[@lukechu10], [37](https://github.com/lukechu10/sycamore/pull/37)]
- Nested templates. Using this, it is also possible to build simple `if`/`else` control flow although there will be a more polished version [[@lukechu10], [#41](https://github.com/lukechu10/sycamore/pull/41)]

- #### 🛠 Fixes

- Parse html root as an `HtmlTree` [[@lukechu10], [#25](https://github.com/lukechu10/maple/pull/25)]
- Recreate effect dependencies on each re-run [[@lukechu10], [#29](https://github.com/lukechu10/maple/pull/29)]
- Parse html root as an `HtmlTree` [[@lukechu10], [#25](https://github.com/lukechu10/sycamore/pull/25)]
- Recreate effect dependencies on each re-run [[@lukechu10], [#29](https://github.com/lukechu10/sycamore/pull/29)]

- #### 🛠 Internal Fixes and Improvements

- Remove double boxing of `Computation` [[@Kestrer], [#31](https://github.com/lukechu10/maple/pull/31)]
- Create `CODE_OF_CONDUCT.md` [[@lukechu10], [#33](https://github.com/lukechu10/maple/pull/33)]
- Add some preliminary benchmarks for signals and effects [[@lukechu10], [#35](https://github.com/lukechu10/maple/pull/35)]
- Add clippy to CI workflow [[@Kestrer], [#42](https://github.com/lukechu10/maple/pull/42)]
- Remove double boxing of `Computation` [[@Kestrer], [#31](https://github.com/lukechu10/sycamore/pull/31)]
- Create `CODE_OF_CONDUCT.md` [[@lukechu10], [#33](https://github.com/lukechu10/sycamore/pull/33)]
- Add some preliminary benchmarks for signals and effects [[@lukechu10], [#35](https://github.com/lukechu10/sycamore/pull/35)]
- Add clippy to CI workflow [[@Kestrer], [#42](https://github.com/lukechu10/sycamore/pull/42)]

- #### ⚠ **BREAKING CHANGES**

- Replaced `create_signal` with `Signal::new(...)` and return `Signal` instead of getter/setter functions for increased type safety [[@Kestrer], [#20](https://github.com/lukechu10/maple/pull/20)]
- Replaced `create_signal` with `Signal::new(...)` and return `Signal` instead of getter/setter functions for increased type safety [[@Kestrer], [#20](https://github.com/lukechu10/sycamore/pull/20)]

- #### 📢 Announcements

- New documentation website: https://maple-rs.netlify.app/ [[@lukechu10], [#26](https://github.com/lukechu10/maple/pull/26) and [#40](https://github.com/lukechu10/maple/pull/40)]
- New documentation website: https://sycamore-rs.netlify.app/ [[@lukechu10], [#26](https://github.com/lukechu10/sycamore/pull/26) and [#40](https://github.com/lukechu10/sycamore/pull/40)]

## ✨ **0.2.0** _(2021-03-07)_

#### Changelog

- #### ⚡️ Features

- Components! In `maple` they are simply plain old functions that take their props via their parameters [[#9](https://github.com/lukechu10/maple/pull/9)]
- Event listeners now have access to the `Event` object [[#16](https://github.com/lukechu10/maple/pull/16)]
- Components! In `sycamore` they are simply plain old functions that take their props via their parameters [[#9](https://github.com/lukechu10/sycamore/pull/9)]
- Event listeners now have access to the `Event` object [[#16](https://github.com/lukechu10/sycamore/pull/16)]

- #### 🛠 Changes

- The `template!` macro now returns a `TemplateResult` instead of raw DOM nodes for increased type safety [[#10](https://github.com/lukechu10/maple/pull/10)]
- The `template!` macro now returns a `TemplateResult` instead of raw DOM nodes for increased type safety [[#10](https://github.com/lukechu10/sycamore/pull/10)]

## ✨ **0.1.1** _(2021-03-07)_

#### Changelog

- #### ⚡️ Features

- New `untracked` utility for explicitly opting out of automatic dependency detection in reactive contexts [[#8](https://github.com/lukechu10/maple/pull/8)]
- New `untracked` utility for explicitly opting out of automatic dependency detection in reactive contexts [[#8](https://github.com/lukechu10/sycamore/pull/8)]

- #### 🛠 Fixes
- Only subscribe to a dependency once in an effect, even if it is called multiple times [[#7](https://github.com/lukechu10/maple/pull/7)]
- Only subscribe to a dependency once in an effect, even if it is called multiple times [[#7](https://github.com/lukechu10/sycamore/pull/7)]

## ✨ **0.1.0** _(2021-03-06)_

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
members = [
"maple-core",
"maple-core-macro",
"packages/sycamore",
"packages/sycamore-macro",
"examples/components",
"examples/counter",
"examples/hello",
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Maple
# Sycamore

[![Crates.io](https://img.shields.io/crates/v/maple-core)](https://crates.io/crates/maple-core)
[![docs.rs](https://img.shields.io/docsrs/maple-core?color=blue&label=docs.rs)](https://docs.rs/maple-core)
[![GitHub contributors](https://img.shields.io/github/contributors/lukechu10/maple)](https://github.com/lukechu10/maple/graphs/contributors)
[![Crates.io](https://img.shields.io/crates/v/sycamore)](https://crates.io/crates/sycamore)
[![docs.rs](https://img.shields.io/docsrs/sycamore?color=blue&label=docs.rs)](https://docs.rs/sycamore)
[![GitHub contributors](https://img.shields.io/github/contributors/lukechu10/sycamore)](https://github.com/lukechu10/sycamore/graphs/contributors)
[![Discord](https://img.shields.io/discord/820400041332179004?label=discord)](https://discord.gg/vDwFUmm6mU)

## What is Maple?
## What is Sycamore?

Maple is a modern VDOM-less web library with fine-grained reactivity in [Rust](https://www.rust-lang.org/) and [WebAssembly](https://webassembly.org/).
Sycamore is a modern VDOM-less web library with fine-grained reactivity in [Rust](https://www.rust-lang.org/) and [WebAssembly](https://webassembly.org/).

Learn more at the [Maple website](https://maple-rs.netlify.app), or stop by the [Discord server](https://discord.gg/vDwFUmm6mU).
Learn more at the [Sycamore website](https://sycamore-rs.netlify.app), or stop by the [Discord server](https://discord.gg/vDwFUmm6mU).

## Contributing

Issue reports and Pull Requests are always welcome!
Check out the [section on contributing](https://maple-rs.netlify.app/contribute/architecture) in the docs.
Check out the [section on contributing](https://sycamore-rs.netlify.app/contribute/architecture) in the docs.

## Contributors

Maple would not have been possible without the wonderful work of all the people who contributed. Thank you!
Sycamore would not have been possible without the wonderful work of all the people who contributed. Thank you!

<a href="https://github.com/lukechu10/maple/graphs/contributors">
<img src="https://contrib.rocks/image?repo=lukechu10/maple" />
<a href="https://github.com/lukechu10/sycamore/graphs/contributors">
<img src="https://contrib.rocks/image?repo=lukechu10/sycamore" />
</a>
2 changes: 1 addition & 1 deletion docs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ console_error_panic_hook = "0.1.6"
console_log = "0.2.0"
js-sys = "0.3"
log = "0.4.14"
maple-core = {path = "../maple-core"}
sycamore = {path = "../packages/sycamore"}
pulldown-cmark = "0.8"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/>
<meta name="keywords" content="rust wasm web reactive" />

<title>Maple</title>
<title>Sycamore</title>

<link data-trunk data-inline rel="scss" href="index.scss" />
<link data-trunk rel="copy-dir" href="markdown" />
Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/advanced/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

TODO

CSS in Maple needs more design before anything can be implemented.
CSS in Sycamore needs more design before anything can be implemented.
2 changes: 1 addition & 1 deletion docs/markdown/advanced/routing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Routing

Routing is still work-in-progress. Visit [#85](https://github.com/lukechu10/maple/issues/85) for more details.
Routing is still work-in-progress. Visit [#85](https://github.com/lukechu10/sycamore/issues/85) for more details.
2 changes: 1 addition & 1 deletion docs/markdown/advanced/ssr.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Server Side Rendering

Server Side Rendering is still work-in-progress. Visit [#47](https://github.com/lukechu10/maple/issues/47) for more details.
Server Side Rendering is still work-in-progress. Visit [#47](https://github.com/lukechu10/sycamore/issues/47) for more details.
2 changes: 1 addition & 1 deletion docs/markdown/advanced/testing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Testing

A testing story is still work-in-progress. Visit [#55](https://github.com/lukechu10/maple/issues/55) for more details.
A testing story is still work-in-progress. Visit [#55](https://github.com/lukechu10/sycamore/issues/55) for more details.
6 changes: 3 additions & 3 deletions docs/markdown/advanced/tweened.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ For example, the following code snippet interpolates a value from 0 to 100 over
```rust
use std::time::Duration;

use maple_core::reactive::Tweened;
use maple_core::{easing, prelude::*};
use sycamore::reactive::Tweened;
use sycamore::{easing, prelude::*};

let tweened = Tweened::new(0, Duration::from_millis(200), easing::linear);

tweened.set(100);
```

Different easing functions are provided in the `maple_core::easing` module.
Different easing functions are provided in the `sycamore::easing` module.
4 changes: 2 additions & 2 deletions docs/markdown/basics/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Components

Components in `maple` are structs that implement `Component`. A component can automatically be
Components in `sycamore` are structs that implement `Component`. A component can automatically be
created with the `#[component(ComponentName<G>)]` attribute on a function.

Components receive their props through function arguments.
Expand All @@ -13,7 +13,7 @@ Getting a `StateHandle<T>` from a `Signal<T>` is easy. Just call the `.handle()`
Here is an example of a simple component that displays the value of its prop:

```rust
use maple_core::prelude::*;
use sycamore::prelude::*;

#[component(MyComponent<G>)]
fn my_component(value: StateHandle<i32>) -> TemplateResult<G> {
Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/basics/data_binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You can bind your `Signal` to a DOM property with the `bind:` directive. When the DOM property is updated, so is your `Signal`. Here is an example.

```rust
use maple_core::prelude::*;
use sycamore::prelude::*;

let value = Signal::new(String::new());

Expand Down
12 changes: 6 additions & 6 deletions docs/markdown/basics/reactivity.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Reactivity

Instead of relying on a Virtual DOM (VDOM), Maple uses fine-grained reactivity to keep the DOM and state in sync.
In fact, the reactivity part of Maple can be used on its own without the DOM rendering part.
Instead of relying on a Virtual DOM (VDOM), Sycamore uses fine-grained reactivity to keep the DOM and state in sync.
In fact, the reactivity part of Sycamore can be used on its own without the DOM rendering part.

Reactivity is based on reactive primitives. Here is an example:

```rust
use maple_core::prelude::*;
use sycamore::prelude::*;
let state = Signal::new(0); // create an atom with an initial value of 0
```

Expand Down Expand Up @@ -72,14 +72,14 @@ assert_eq!(*double.get(), 2);

`create_memo(...)` automatically recomputes the derived value when any of its dependencies change.

Now that you understand `maple`'s reactivity system, we can look at how to use this to update the DOM.
Now that you understand `sycamore`'s reactivity system, we can look at how to use this to update the DOM.

### Using reactivity with DOM updates

Reactivity is automatically built-in into the `template!` macro. Say we have the following code:

```rust
use maple_core::prelude::*;
use sycamore::prelude::*;

let state = Signal::new(0);

Expand All @@ -93,7 +93,7 @@ let root = template! {
This will expand to something approximately like:

```rust
use maple_core::prelude::*;
use sycamore::prelude::*;

let state = Signal::new(0);

Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/basics/template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `template!`

Maple uses the `template!` macro as an ergonomic way to create complex user interfaces. You might have already seen it in the _"Hello, World!"_ example.
Sycamore uses the `template!` macro as an ergonomic way to create complex user interfaces. You might have already seen it in the _"Hello, World!"_ example.

The `template!` macro is quite powerful. You can create nested nodes like so.

Expand Down
8 changes: 4 additions & 4 deletions docs/markdown/contribute/architecture.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Project architecture

All non proc-macro related code is in `/maple-core`.
Proc-macro related code is in `/maple-core-macro`.
All non proc-macro related code is in `/sycamore`.
Proc-macro related code is in `/sycamore-macro`.

## Concepts and where to find them

- #### Reactivity

- All the reactivity primitives are defined in `/maple-core/src/reactive.rs`.
- All the reactivity primitives are defined in `/sycamore/src/reactive.rs`.

- #### `template!`

- The template macro is defined in `/maple-core-macro/src/lib.rs`.
- The template macro is defined in `/sycamore-macro/src/lib.rs`.
- Different DOM node types are defined in separate files under the same directory.
- [`trybuild`](https://github.com/dtolnay/trybuild) is used for testing proc-macros.

Expand Down
Loading