refactor!: rename slhx to hemx
Rename the tracked product identity, crate/package names, Rust paths/macros, generated artifacts, runtime files, public attributes, examples, docs, requirements, and tests from slhx to hemx without compatibility shims. Verified with cargo run -p hemx-xtask -- test, cargo test -p hemx-derive --test compile_fail, cargo test -p hemx-js, cargo test -p hemx-axum, cargo test -p hemx-v0-examples, cargo check --workspace, redgate list, redgate refs, redgate health --strict, git diff --check, and git grep/ls-files legacy-name audits. req: misc/001 req: codegen/001 req: component/004 req: runtime/001
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#[slhx::surface]
|
||||
#[hemx::surface]
|
||||
pub mod ui {}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -6,8 +6,8 @@ mod tests {
|
||||
use super::ui::{board, board_card};
|
||||
use hemplate::Hemplate;
|
||||
use scraper::{Html, Selector};
|
||||
use slhx::IntoEffect;
|
||||
use slhx_test::inspect;
|
||||
use hemx::IntoEffect;
|
||||
use hemx_test::inspect;
|
||||
|
||||
#[derive(Hemplate)]
|
||||
#[hemplate = "partials"]
|
||||
@@ -17,7 +17,7 @@ mod tests {
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Debug)]
|
||||
#[slhx::form("create_card")]
|
||||
#[hemx::form("create_card")]
|
||||
struct CreateCard {
|
||||
title: String,
|
||||
column: String,
|
||||
@@ -56,8 +56,8 @@ mod tests {
|
||||
// req: examples/001 req: form/001 req: form/004 req: form/006 req: derive_handler/003
|
||||
#[test]
|
||||
fn kanban_form_handler_is_checked_against_hemplate_form() {
|
||||
#[slhx::handler]
|
||||
fn create_card(_form: slhx::Form<CreateCard>) -> impl IntoEffect {
|
||||
#[hemx::handler]
|
||||
fn create_card(_form: hemx::Form<CreateCard>) -> impl IntoEffect {
|
||||
board::notice.text("queued")
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -4,14 +4,14 @@ use axum::routing::get;
|
||||
use axum::Router;
|
||||
use futures_util::{stream, StreamExt};
|
||||
use hemplate::Hemplate;
|
||||
use slhx::{Html, IntoEffect};
|
||||
use slhx_axum::{
|
||||
use hemx::{Html, IntoEffect};
|
||||
use hemx_axum::{
|
||||
interactions, runtime_js, sse, DispatchRegistry, DispatchRejection, EffectResponse,
|
||||
InteractionRequest, PageRequest,
|
||||
};
|
||||
use slhx_kanban_example::ui::board::{self as board};
|
||||
use slhx_kanban_example::ui::board_card as card_board;
|
||||
use slhx_kanban_example::ui::{self, board as board_ui};
|
||||
use hemx_kanban_example::ui::board::{self as board};
|
||||
use hemx_kanban_example::ui::board_card as card_board;
|
||||
use hemx_kanban_example::ui::{self, board as board_ui};
|
||||
use std::collections::BTreeMap;
|
||||
use std::convert::Infallible;
|
||||
use std::net::SocketAddr;
|
||||
@@ -118,12 +118,12 @@ async fn main() {
|
||||
let app = Router::new()
|
||||
.route("/", get(home).post(interact))
|
||||
.route("/events", get(events))
|
||||
.route("/slhx.js", get(runtime))
|
||||
.route("/hemx.js", get(runtime))
|
||||
.with_state(state);
|
||||
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], 3001));
|
||||
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
|
||||
println!("slhx Kanban example: http://{addr}");
|
||||
println!("hemx Kanban example: http://{addr}");
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ async fn home(State(state): State<Arc<AppState>>, request: PageRequest) -> impl
|
||||
let board = state.board.lock().unwrap().clone();
|
||||
request
|
||||
.page_html(page_html(&board), shell)
|
||||
.title("slhx Kanban")
|
||||
.title("hemx Kanban")
|
||||
.fingerprint(ui::BUILD_FINGERPRINT)
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ fn page_html(board: &BoardState) -> Html {
|
||||
|
||||
fn shell(body: Html) -> Html {
|
||||
// req: html_safety/001 req: html_safety/002 req: axum_integration/001
|
||||
slhx::render(&AppShell { body })
|
||||
hemx::render(&AppShell { body })
|
||||
}
|
||||
|
||||
fn render_options() -> Html {
|
||||
@@ -333,7 +333,7 @@ fn render_card(card: &Card) -> BoardCard {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use scraper::{Html, Selector};
|
||||
use slhx_test::{
|
||||
use hemx_test::{
|
||||
class_child_selector, disabled_button_selector, element_class_selector,
|
||||
escaped_markup_selector, form_selector, keyed_selector, root_element_selector,
|
||||
select_options_selector, small_text_selector, strong_text_selector,
|
||||
|
||||
Reference in New Issue
Block a user