WIP
This commit is contained in:
parent
dcbb905ce9
commit
96258b500a
10 changed files with 2272 additions and 1801 deletions
2
darm_test/public/styles.min.css
vendored
2
darm_test/public/styles.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -18,7 +18,6 @@ where
|
|||
{
|
||||
fn into_response(self) -> Response<Body> {
|
||||
let path = self.0.into();
|
||||
tracing::debug!(?path);
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "public/"]
|
||||
struct EmbedAsset;
|
||||
|
@ -53,6 +52,7 @@ pub struct AssetsController;
|
|||
#[controller(state=AppState, path="/dist")]
|
||||
impl AssetsController {
|
||||
#[route(GET "/*path")]
|
||||
#[tracing::instrument]
|
||||
async fn static_handler(path: String, _: State<AppState>) -> impl IntoResponse {
|
||||
let path = path.trim_start_matches('/').to_string();
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ fn markup_405() -> impl Renderable {
|
|||
}
|
||||
}
|
||||
|
||||
// Finally, we use a fallback route for anything that didn't match.
|
||||
async fn handle_404(uri: Uri) -> impl IntoResponse {
|
||||
(
|
||||
StatusCode::NOT_FOUND,
|
||||
|
@ -49,6 +48,9 @@ async fn handle_405() -> impl IntoResponse {
|
|||
)
|
||||
.into_response()
|
||||
}
|
||||
|
||||
/// Initialize the application logger. This should be called once at the start of the application.
|
||||
/// This function is idempotent and will only initialize the logger once.
|
||||
pub fn initialize_logger() {
|
||||
static INIT: Once = Once::new();
|
||||
|
||||
|
@ -80,6 +82,8 @@ async fn main() {
|
|||
// TODO pick free port/config
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:8000").await.unwrap();
|
||||
|
||||
tracing::info!("Listening on http://0.0.0.0:8000");
|
||||
|
||||
let router: axum::Router = axum::Router::new()
|
||||
.merge(UiController::into_router(app_state.clone()))
|
||||
.merge(AssetsController::into_router(app_state.clone()))
|
||||
|
|
|
@ -4,10 +4,12 @@ use std::time::Duration;
|
|||
use axum::{extract::State, response::IntoResponse};
|
||||
use axum_controller::*;
|
||||
use datastar::{
|
||||
axum::ReadSignals,
|
||||
prelude::{FragmentMergeMode, MergeFragments},
|
||||
Sse,
|
||||
};
|
||||
use hypertext::{maud, GlobalAttributes, Renderable};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{ui::components::*, AppState};
|
||||
|
||||
|
@ -25,6 +27,11 @@ pub mod html_elements {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct Signals {
|
||||
msginput: String,
|
||||
}
|
||||
|
||||
pub struct UiController {}
|
||||
|
||||
#[controller(
|
||||
|
@ -32,42 +39,43 @@ pub struct UiController {}
|
|||
)]
|
||||
impl UiController {
|
||||
#[route(GET "/msg")]
|
||||
async fn message(State(_): State<AppState>) -> impl IntoResponse {
|
||||
tokio::time::sleep(Duration::from_millis(500)).await;
|
||||
#[tracing::instrument]
|
||||
async fn message(
|
||||
State(_): State<AppState>,
|
||||
ReadSignals(signals): ReadSignals<Signals>,
|
||||
) -> impl IntoResponse {
|
||||
tokio::time::sleep(Duration::from_millis(250)).await;
|
||||
|
||||
let sse_stream: Sse<_> = Sse(async_stream::stream! {
|
||||
yield MergeFragments::new(maud! { div #user-1 .mb-2 { strong { "You:" } "userInput" } }.render())
|
||||
// .id("chat")
|
||||
Sse(async_stream::stream! {
|
||||
yield MergeFragments::new(maud! { div #user-1 class="mb-2 animated animated-bounce" { strong { "You:" } (signals.msginput) } }.render())
|
||||
.selector("#chat")
|
||||
.merge_mode(FragmentMergeMode::Append)
|
||||
.into();
|
||||
|
||||
tokio::time::sleep(Duration::from_millis(500)).await;
|
||||
tokio::time::sleep(Duration::from_millis(250)).await;
|
||||
|
||||
yield MergeFragments::new(maud! { div #llm-1 class="mb-2" { strong { "LLM:" } "This is a mock response."} }.render())
|
||||
// .id("chat")
|
||||
yield MergeFragments::new(maud! { div #llm-1 class="mb-2 animated animated-bounce" { strong { "LLM:" } "This is a mock response."} }.render())
|
||||
.selector("#chat")
|
||||
.merge_mode(FragmentMergeMode::Append)
|
||||
.into();
|
||||
});
|
||||
|
||||
sse_stream
|
||||
})
|
||||
}
|
||||
|
||||
#[route(GET "/")]
|
||||
#[tracing::instrument]
|
||||
async fn index(State(_): State<AppState>) -> impl IntoResponse {
|
||||
main_page(maud! {
|
||||
div class="container p-4 mx-auto" {
|
||||
h1 class="mb-4 text-2xl font-bold" {
|
||||
"LLM Chat App"
|
||||
}
|
||||
div .bg-white .p-6 .rounded-lg .shadow-md {
|
||||
div #chat .mb-4 {
|
||||
div class="p-6 bg-white rounded-lg shadow-md" {
|
||||
div #chat class="mb-4" {
|
||||
// Chat messages will appear here
|
||||
}
|
||||
form id="chat-form" {
|
||||
textarea id="user-input" class="p-2 mb-2 w-full rounded-lg border" placeholder="Type your message..." {}
|
||||
button type="button" data-on-click="@get('/msg')" class="p-2 text-white bg-blue-500 rounded-lg" {
|
||||
textarea #user-input class="p-2 m-2 w-full rounded-lg border" data-bind-msginput placeholder="Type your message..." {}
|
||||
button #send-btn class="btn" type="button" data-on-click="@get('/msg')" {
|
||||
"Send"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
// @use '../../node_modules/@unocss/reset/normalize.css';
|
||||
@use '../../node_modules/@unocss/reset/tailwind-compat.css';
|
||||
// @use '../../node_modules/animate.css/animate.min.css';
|
||||
@use 'uno';
|
||||
|
||||
.btn {
|
||||
// p-2 text-white bg-blue-500 rounded-lg
|
||||
@extend .p-2, .text-white, .bg-blue-500, .rounded-lg;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,98 @@
|
|||
/* layer: preflights */
|
||||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}
|
||||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}
|
||||
[type='text'], input:where(:not([type])), [type='email'], [type='url'], [type='password'], [type='number'], [type='date'], [type='datetime-local'], [type='month'], [type='search'], [type='tel'], [type='time'], [type='week'], [multiple], textarea, select { appearance: none;
|
||||
background-color: #fff;
|
||||
border-color: #6b7280;
|
||||
border-width: 1px;
|
||||
border-radius: 0;
|
||||
padding-top: 0.5rem;
|
||||
padding-right: 0.75rem;
|
||||
padding-bottom: 0.5rem;
|
||||
padding-left: 0.75rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
--un-shadow: 0 0 #0000; }
|
||||
[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
--un-ring-inset: var(--un-empty,/*!*/ /*!*/);
|
||||
--un-ring-offset-width: 0px;
|
||||
--un-ring-offset-color: #fff;
|
||||
--un-ring-color: #2563eb;
|
||||
--un-ring-offset-shadow: var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);
|
||||
--un-ring-shadow: var(--un-ring-inset) 0 0 0 calc(1px + var(--un-ring-offset-width)) var(--un-ring-color);
|
||||
box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);
|
||||
border-color: #2563eb; }
|
||||
input::placeholder, textarea::placeholder { color: #6b7280;
|
||||
opacity: 1; }
|
||||
::-webkit-datetime-edit-fields-wrapper { padding: 0; }
|
||||
::-webkit-date-and-time-value { min-height: 1.5em; }
|
||||
::-webkit-date-and-time-value { text-align: inherit; }
|
||||
::-webkit-datetime-edit { display: inline-flex; }
|
||||
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { padding-top: 0;
|
||||
padding-bottom: 0; }
|
||||
select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
||||
background-position: right 0.5rem center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 1.5em 1.5em;
|
||||
padding-right: 2.5rem;
|
||||
print-color-adjust: exact; }
|
||||
[multiple] { background-image: initial;
|
||||
background-position: initial;
|
||||
background-repeat: unset;
|
||||
background-size: initial;
|
||||
padding-right: 0.75rem;
|
||||
print-color-adjust: unset; }
|
||||
[type='checkbox'], [type='radio'] { appearance: none;
|
||||
padding: 0;
|
||||
print-color-adjust: exact;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background-origin: border-box;
|
||||
user-select: none;
|
||||
flex-shrink: 0;
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
color: #2563eb;
|
||||
background-color: #fff;
|
||||
border-color: #6b7280;
|
||||
border-width: 1px;
|
||||
--un-shadow: 0 0 #0000; }
|
||||
[type='checkbox'] { border-radius: 0; }
|
||||
[type='radio'] { border-radius: 100%; }
|
||||
[type='checkbox']:focus, [type='radio']:focus { outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
--un-ring-inset: var(--un-empty,/*!*/ /*!*/);
|
||||
--un-ring-offset-width: 2px;
|
||||
--un-ring-offset-color: #fff;
|
||||
--un-ring-color: #2563eb;
|
||||
--un-ring-offset-shadow: var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);
|
||||
--un-ring-shadow: var(--un-ring-inset) 0 0 0 calc(2px + var(--un-ring-offset-width)) var(--un-ring-color);
|
||||
box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow); }
|
||||
[type='checkbox']:checked, [type='radio']:checked { border-color: transparent;
|
||||
background-color: currentColor;
|
||||
background-size: 100% 100%;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat; }
|
||||
[type='checkbox']:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); }
|
||||
[type='radio']:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); }
|
||||
[type='checkbox']:checked:hover, [type='checkbox']:checked:focus, [type='radio']:checked:hover, [type='radio']:checked:focus { border-color: transparent;
|
||||
background-color: currentColor; }
|
||||
[type='checkbox']:indeterminate { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
|
||||
border-color: transparent;
|
||||
background-color: currentColor;
|
||||
background-size: 100% 100%;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat; }
|
||||
[type='checkbox']:indeterminate:hover, [type='checkbox']:indeterminate:focus { border-color: transparent;
|
||||
background-color: currentColor; }
|
||||
[type='file'] { background: unset;
|
||||
border-color: inherit;
|
||||
border-width: 0;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
font-size: unset;
|
||||
line-height: inherit; }
|
||||
[type='file']:focus { outline: 1px solid ButtonText , 1px auto -webkit-focus-ring-color; }
|
||||
/* layer: shortcuts */
|
||||
.container{width:100%;}
|
||||
@media (min-width: 640px){
|
||||
|
@ -19,26 +112,30 @@
|
|||
}
|
||||
/* layer: default */
|
||||
.static{position:static;}
|
||||
.m-2{margin:0.5rem;}
|
||||
.mx-auto{margin-left:auto;margin-right:auto;}
|
||||
.mb-2{margin-bottom:0.5rem;}
|
||||
.mb-4{margin-bottom:1rem;}
|
||||
.ms,
|
||||
[ms=""]{margin-inline-start:1rem;}
|
||||
contents{display:contents;}
|
||||
.inline-block{display:inline-block;}
|
||||
.h1{height:0.25rem;}
|
||||
.w-full{width:100%;}
|
||||
.b,
|
||||
.border,
|
||||
[b=""]{border-width:1px;}
|
||||
.inline-flex{display:inline-flex;}
|
||||
.flex-shrink{flex-shrink:1;}
|
||||
.table{display:table;}
|
||||
.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
||||
.border{border-width:1px;}
|
||||
.rounded-lg{border-radius:0.5rem;}
|
||||
.bg-blue-500{--un-bg-opacity:1;background-color:rgba(59,130,246,var(--un-bg-opacity));}
|
||||
.bg-gray-100{--un-bg-opacity:1;background-color:rgba(243,244,246,var(--un-bg-opacity));}
|
||||
.bg-white{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}
|
||||
.bg-blue-500{--un-bg-opacity:1;background-color:rgb(59 130 246 / var(--un-bg-opacity)) /* #3b82f6 */;}
|
||||
.bg-gray-100{--un-bg-opacity:1;background-color:rgb(243 244 246 / var(--un-bg-opacity)) /* #f3f4f6 */;}
|
||||
.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity)) /* #fff */;}
|
||||
.p-2{padding:0.5rem;}
|
||||
.p-4{padding:1rem;}
|
||||
.p-6{padding:1.5rem;}
|
||||
[pe=""]{padding-inline-end:1rem;}
|
||||
.text-2xl{font-size:1.5rem;line-height:2rem;}
|
||||
.text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity)) /* #fff */;}
|
||||
.font-bold{font-weight:700;}
|
||||
.text-white{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}
|
||||
.shadow-md{--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
||||
.shadow-md{--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
||||
.outline{outline-style:solid;}
|
||||
.animated{--une-animated-duration:1s;animation-duration:var(--une-animated-duration);animation-fill-mode:both;}
|
||||
@keyframes uneBounce { 0%,20%,53%,to { animation-timing-function: cubic-bezier(.215,.61,.355,1); transform: translateZ(0) } 40%,43% { transform: translate3d(0,-30px,0) scaleY(1.1) } 40%,43%,70% { animation-timing-function: cubic-bezier(.755,.05,.855,.06) } 70% { transform: translate3d(0,-15px,0) scaleY(1.05) } 80% { transform: translateZ(0) scaleY(.95); transition-timing-function: cubic-bezier(.215,.61,.355,1) } 90% { transform: translate3d(0,-4px,0) scaleY(1.02) } }
|
||||
.animated-bounce{animation-name:uneBounce;transform-origin:center bottom;}
|
|
@ -3,29 +3,45 @@ import {
|
|||
defineConfig,
|
||||
presetAttributify,
|
||||
presetIcons,
|
||||
presetTagify,
|
||||
presetWind,
|
||||
presetTagify,
|
||||
presetTypography,
|
||||
transformerDirectives,
|
||||
transformerVariantGroup,
|
||||
} from "unocss";
|
||||
import { presetForms } from '@julr/unocss-preset-forms';
|
||||
import { presetHeroPatterns } from '@julr/unocss-preset-heropatterns';
|
||||
import { presetExtra } from 'unocss-preset-extra';
|
||||
|
||||
export default defineConfig({
|
||||
content: {
|
||||
filesystem: ["**/*.{html,js,ts,jsx,tsx,rs,rsx}"],
|
||||
filesystem: [
|
||||
"**/*.{html,css,scss,rs}",
|
||||
"src/**/*.rs",
|
||||
"*/src/**/*.rs",
|
||||
"*/style/*.scss",
|
||||
],
|
||||
},
|
||||
cli: {
|
||||
entry: {
|
||||
patterns: ["**/*.{html,js,ts,jsx,tsx,rs,rsx}"],
|
||||
patterns: [
|
||||
"**/*.{html,css,scss,rs}",
|
||||
"src/**/*.rs",
|
||||
"*/src/**/*.rs",
|
||||
"*/style/*.scss",
|
||||
],
|
||||
outFile: "./style/uno.css",
|
||||
},
|
||||
},
|
||||
presets: [
|
||||
presetAttributify({
|
||||
/* preset options */
|
||||
}),
|
||||
presetWind(),
|
||||
presetAttributify({}),
|
||||
presetTagify({}),
|
||||
presetIcons({}),
|
||||
presetWind({}),
|
||||
presetHeroPatterns(),
|
||||
presetTypography({}),
|
||||
presetForms(),
|
||||
presetExtra(),
|
||||
],
|
||||
transformers: [transformerDirectives(), transformerVariantGroup()],
|
||||
});
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
};
|
||||
customNodeModules = pkgs.npmlock2nix.v2.node_modules {
|
||||
src = ./.;
|
||||
nodejs = pkgs.nodejs_22;
|
||||
nodejs = pkgs.nodejs_23;
|
||||
};
|
||||
buildInputs = with pkgs; [
|
||||
aider-chat
|
||||
|
|
3819
package-lock.json
generated
3819
package-lock.json
generated
File diff suppressed because it is too large
Load diff
29
package.json
29
package.json
|
@ -4,24 +4,37 @@
|
|||
"version": "0.1.1",
|
||||
"author": "Tristan Druyen <tristan@vault81.mozmail.com>",
|
||||
"license": "AGPL",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"watch-unocss": "cd ./darm_test && unocss --watch",
|
||||
"watch-bundle": "npm run build-bundle; sleep 5; npm run watch-bundle",
|
||||
"build-unocss": "cd ./darm_test && unocss",
|
||||
"build-bundle": "cd ./darm_test && sass -scompressed style/main.scss > public/styles.min.css",
|
||||
"watch-all": "npm run watch-unocss & npm run watch-bundle",
|
||||
"build-all": "npm run build-unocss & npm run build-bundle"
|
||||
"build-all": "npm run build-unocss && npm run build-bundle"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@anthropic-ai/claude-code": "^0.2.35",
|
||||
"@starfederation/datastar": "^1.0.0-beta.7",
|
||||
"@tailwindcss/forms": "0.5.7",
|
||||
"@tailwindcss/typography": "0.5.10",
|
||||
"@julr/unocss-preset-forms": "^1.0.0",
|
||||
"@julr/unocss-preset-heropatterns": "^2.0.0",
|
||||
"@starfederation/datastar": "^1.0.0-beta.9",
|
||||
"@unocss/extractor-arbitrary-variants": "^66.1.0-beta.6",
|
||||
"@unocss/inspector": "^66.1.0-beta.6",
|
||||
"@unocss/preset-wind4": "^66.1.0-beta.6",
|
||||
"@unocss/reset": "^66.0.0",
|
||||
"daisyui": "4.7.3",
|
||||
"animate.css": "^4.1.1",
|
||||
"daisyui": "^5.0.9",
|
||||
"sass": "^1.85.0",
|
||||
"tailwindcss": "3.4.17",
|
||||
"tailwindcss": "^4.0.15",
|
||||
"typescript": "^5.7.3",
|
||||
"unocss": "^0.54.3"
|
||||
"unocss": "^66.0.0",
|
||||
"unocss-preset-extra": "^0.5.3"
|
||||
},
|
||||
"overrides": {
|
||||
"@julr/unocss-preset-forms": {
|
||||
"unocss": "$unocss"
|
||||
},
|
||||
"unocss-preset-extra": {
|
||||
"unocss": "$unocss"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue