diff --git a/fastn-resolved-to-js/src/html.rs b/fastn-resolved-to-js/src/html.rs
index ff42fab79..10b31de39 100644
--- a/fastn-resolved-to-js/src/html.rs
+++ b/fastn-resolved-to-js/src/html.rs
@@ -1,9 +1,11 @@
-use fastn_resolved_to_js::extensions::{FunctionExt, VariableExt};
+use fastn_resolved_to_js::extensions::*;
pub struct HtmlInput {
package: Package,
js: String,
+ #[expect(unused)]
css_files: Vec,
+ #[expect(unused)]
js_files: Vec,
doc: dyn fastn_resolved::tdoc::TDoc,
}
@@ -57,7 +59,7 @@ impl HtmlInput {
}
}
-pub fn generate_hash(content: impl AsRef<[u8]>) -> String {
+fn generate_hash(content: impl AsRef<[u8]>) -> String {
use sha2::digest::FixedOutput;
use sha2::Digest;
let mut hasher = sha2::Sha256::new();
@@ -69,7 +71,7 @@ static PRISM_JS_HASH: once_cell::sync::Lazy = once_cell::sync::Lazy::new
format!("prism-{}.js", generate_hash(fastn_js::prism_js().as_str()),)
});
-pub fn hashed_prism_js() -> &'static str {
+fn hashed_prism_js() -> &'static str {
&PRISM_JS_HASH
}
@@ -77,7 +79,7 @@ static MARKDOWN_HASH: once_cell::sync::Lazy = once_cell::sync::Lazy::new
format!("markdown-{}.js", generate_hash(fastn_js::markdown_js()),)
});
-pub fn hashed_markdown_js() -> &'static str {
+fn hashed_markdown_js() -> &'static str {
&MARKDOWN_HASH
}
@@ -88,16 +90,13 @@ static PRISM_CSS_HASH: once_cell::sync::Lazy = once_cell::sync::Lazy::ne
)
});
-pub fn hashed_prism_css() -> &'static str {
+fn hashed_prism_css() -> &'static str {
&PRISM_CSS_HASH
}
static FTD_JS_HASH: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new();
-pub fn hashed_default_ftd_js(
- package_name: &str,
- doc: &dyn fastn_resolved::tdoc::TDoc,
-) -> &'static str {
+fn hashed_default_ftd_js(package_name: &str, doc: &dyn fastn_resolved::tdoc::TDoc) -> &'static str {
FTD_JS_HASH.get_or_init(|| {
format!(
"default-{}.js",
@@ -106,13 +105,13 @@ pub fn hashed_default_ftd_js(
})
}
-pub fn all_js_without_test(package_name: &str, doc: &dyn fastn_resolved::tdoc::TDoc) -> String {
+fn all_js_without_test(package_name: &str, doc: &dyn fastn_resolved::tdoc::TDoc) -> String {
let all_js = fastn_js::all_js_without_test();
let default_bag_js = fastn_js::to_js(default_bag_into_js_ast(doc).as_slice(), package_name);
format!("{all_js}\n{default_bag_js}")
}
-pub fn default_bag_into_js_ast(doc: &dyn fastn_resolved::tdoc::TDoc) -> Vec {
+fn default_bag_into_js_ast(doc: &dyn fastn_resolved::tdoc::TDoc) -> Vec {
let mut ftd_asts = vec![];
let mut export_asts = vec![];
for thing in fastn_builtins::builtins().values() {
@@ -187,7 +186,7 @@ impl Favicon {
}
}
-pub fn available_code_themes() -> String {
+fn available_code_themes() -> String {
// TODO Move code from fastn_core::utils::available_code_themes()
"".to_string()
}
diff --git a/fastn-resolved-to-js/src/lib.rs b/fastn-resolved-to-js/src/lib.rs
index be1f1d8dc..d806fc540 100644
--- a/fastn-resolved-to-js/src/lib.rs
+++ b/fastn-resolved-to-js/src/lib.rs
@@ -1,20 +1,19 @@
extern crate self as fastn_resolved_to_js;
mod resolver;
-pub use resolver::ResolverData;
-
-mod value;
-pub use value::Value;
mod element;
-use element::Element;
-
pub mod extensions;
-use extensions::*;
-
mod fastn_type_functions;
mod html;
pub mod utils;
+mod value;
+
+use element::Element;
+use extensions::*;
+pub use html::{Favicon, HtmlInput, Package};
+pub use resolver::ResolverData;
+pub use value::Value;
pub const CODE_DEFAULT_THEME: &str = "fastn-theme.dark";
pub const REFERENCE: &str = "$";
diff --git a/fastn-resolved-to-js/src/main.rs b/fastn-resolved-to-js/src/main.rs
index ffcf7f14f..08334bf3f 100644
--- a/fastn-resolved-to-js/src/main.rs
+++ b/fastn-resolved-to-js/src/main.rs
@@ -1,5 +1,5 @@
fn main() {
- let c = fastn_resolved::ComponentInvocation {
+ let _c = fastn_resolved::ComponentInvocation {
id: None,
name: "ftd#text".to_string(),
properties: vec![], // add hello-world caption etc.