rumtk_web/utils/
defaults.rs1use crate::utils::ConstTextMap;
22use crate::{rumtk_web_params_map, NestedNestedTextMap, NestedTextMap, RUMWebDataProxy, TextMap};
23use phf_macros::phf_ordered_map;
24use rumtk_core::strings::RUMString;
25use std::sync::LazyLock;
26pub static DEFAULT_TEXT_MAP: ConstTextMap = phf_ordered_map!();
30
31pub const DEFAULT_LOCAL_LISTENING_ADDRESS: &str = "127.0.0.1";
35pub const DEFAULT_LOCAL_LISTENING_ADDRESS_PORT: &str = "127.0.0.1:3000";
36pub const DEFAULT_OUTBOUND_LISTENING_ADDRESS: &str = "0.0.0.0";
37pub const DEFAULT_OUTBOUND_LISTENING_ADDRESS_PORT: &str = "0.0.0.0:3000";
38pub const DEFAULT_LISTENING_PORT: &str = "3000";
39
40pub const DEFAULT_TEXT_ITEM: &str = "default";
44pub const DEFAULT_ALT_ITEM: &str = "";
45pub const DEFAULT_CONTACT_ITEM: &str = "company";
46pub const DEFAULT_CONTACT_TYPE: &str = "contact";
47pub const DEFAULT_CONTACT_FUNCTION: &str = "goto_contact";
48pub const DEFAULT_GOTO_FUNCTION: &str = "goto";
49pub const DEFAULT_CONTACT_CSS: &str = "centered";
50pub const DEFAULT_NO_TEXT: &str = "";
51pub const DEFAULT_JOB_LOADER_NAME: &str = "job_loader";
52pub const DEFAULT_HTMX_SWAP_MODE: &str = "outerHTML";
53pub const DEFAULT_PROGRESS_MODE: &str = "hidden";
54pub const DEFAULT_THEME_ITEM: &str = "light";
55pub const DEFAULT_LANG_ITEM: &str = "en";
56pub const DEFAULT_HOME_PAGE: &str = "Home";
57pub const DEFAULT_HOME_PAGE_URL: &str = "./";
58
59pub const OPT_INVERTED_DIRECTION: &str = "inverted";
63
64pub const PARAMS_ID: &str = "id";
68pub const PARAMS_TITLE: &str = "title";
69pub const PARAMS_SUMMARY: &str = "summary";
70pub const PARAMS_TYPE: &str = "type";
71pub const PARAMS_CSS_CLASS: &str = "class";
72pub const PARAMS_SOCIAL_LIST: &str = "social_list";
73pub const PARAMS_ITEM: &str = "item";
74pub const PARAMS_INVERTED: &str = "inverted";
75pub const PARAMS_SECTION: &str = "section";
76pub const PARAMS_FUNCTION: &str = "function";
77pub const PARAMS_SOURCE_URL: &str = "source";
78pub const PARAMS_TARGET: &str = "target";
79pub const PARAMS_SIZE: &str = "size";
80pub const PARAMS_CONTENTS: &str = "contents";
81pub const PARAMS_MODULE: &str = "module";
82pub const PARAMS_ENDPOINT: &str = "endpoint";
83pub const PARAMS_ELEMENT: &str = "element";
84pub const PARAMS_TICKS: &str = "ticks";
85pub const PARAMS_SWAP_MODE: &str = "swap_mode";
86pub const PARAMS_PROGRESS_MODE: &str = "progress_mode";
87pub const PARAMS_ALT: &str = "alt";
88
89pub const SECTION_TEXT: &str = "text";
93pub const SECTION_PERSONNEL: &str = "personnel";
94pub const SECTION_CONTACT: &str = "contact";
95pub const SECTION_TITLES: &str = "titles";
96pub const SECTION_API: &str = "api";
97pub const SECTION_SOCIALS: &str = "socials";
98pub const SECTION_SERVICES: &str = "services";
99pub const SECTION_PRODUCTS: &str = "products";
100pub const SECTION_LINKS: &str = "links";
101pub const SECTION_MODULES: &str = "modules";
102pub const SECTION_ENDPOINTS: &str = "endpoints";
103pub const SECTION_ALT: &str = "alt";
104pub const SECTION_DEFAULT: &str = "default";
105
106pub const CONTENT_TYPE_PDF: &str = "application/pdf";
110pub const CONTENT_TYPE_HTML: &str = "text/html";
111
112pub const FORM_DATA_TYPE_PDF: &str = "pdf";
116pub const FORM_DATA_TYPE_HTML: &str = "html";
117pub const FORM_DATA_TYPE_MARKDOWN: &str = "markdown";
118pub const FORM_DATA_TYPE_DEFAULT: &str = "text";
119
120pub const LANG_EN: &str = "en";
124pub const LANG_ES: &str = "es";
125
126pub const DEFAULT_ICON_STYLE: &str = "fa-solid";
130
131pub const DEFAULT_ROBOT_TXT: &str = r"
135User-agent: *
136Disallow: /static/
137";
138
139pub const DEFAULT_SCRIPT: &str = "default";
143pub const DEFAULT_SCRIPT_MODULE: &str = "module";
144pub const DEFAULT_SCRIPT_IMPORT: &str = "import";
145
146pub const DEFAULT_APP_CONFIG: &str = "./app.json";
150pub const DEFAULT_LOGO_SOURCE: &str = "/static/img/logo.svg";
151pub const DEFAULT_ICON_SOURCE: &str = "/static/img/logo.svg";
152pub const DEFAULT_ICON_TYPE: &str = "image/svg+xml";
153
154pub static DEFAULT_EMPTY_PARAMS: LazyLock<RUMWebDataProxy> = LazyLock::new( || rumtk_web_params_map!([("", "")]));
158
159pub const ELEMENT_INPUT: &str = "input";
163pub const ELEMENT_LABEL: &str = "label";
164pub const ELEMENT_SELECT: &str = "select";
165pub const ELEMENT_TEXTAREA: &str = "textarea";
166
167pub static DEFAULT_TEXT: RUMString = RUMString::new();
171pub static DEFAULT_TEXTMAP: LazyLock<TextMap> = LazyLock::new(|| TextMap::default());
172pub static DEFAULT_NESTEDTEXTMAP: LazyLock<NestedTextMap> = LazyLock::new(|| NestedTextMap::default());
173pub static DEFAULT_NESTEDNESTEDTEXTMAP: LazyLock<NestedNestedTextMap> =
174 LazyLock::new(|| NestedNestedTextMap::default());
175
176pub const DEFAULT_HTMX_CHECK_TICKS: &str = "2s";