import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["form"]
static values = { delay: { type: Number, default: 250 } }
import { Application } from "@hotwired/stimulus"
import FormSubmitController from "./controllers/form_submit_controller"
const application = Application.start()
application.debug = false
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static values = {
url: String,
delay: { type: Number, default: 800 },
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
import React from "react";
type FallbackProps = {
error: Error;
reset: () => void;
};
<nav class="site-nav" data-controller="preload">
<ul>
<li>
<%= link_to "Dashboard", dashboard_path,
class: "nav-link",
data: { turbo_preload: true } %>
<%# renders a lazy placeholder; real content arrives when scrolled into view %>
<div class="panel-card">
<h3 class="panel-card__title"><%= title %></h3>
<%= turbo_frame_tag dom_id(panel, :frame),
class: "panel-card__body",
module LayoutlessTurboFrame
extend ActiveSupport::Concern
included do
layout :layout_for_turbo
end
export const CACHE_VERSION = 'v7';
export const APP_SHELL = '/index.html';
export const PRECACHE_URLS = [
'/',
web: bin/rails server
css: bin/rails tailwindcss:watch
<%# Append is also broadcast from the model; this response scrolls the author's view %>
<%= turbo_stream.append "messages" do %>
<%= render partial: "messages/message", locals: { message: @message } %>
<% end %>
<turbo-stream action="scroll_to" target="<%= dom_id(@message) %>" behavior="smooth" block="end">
import { z } from "zod";
export const envSchema = z.object({
VITE_API_URL: z.string().url(),
VITE_APP_NAME: z.string().min(1).default("my-app"),
VITE_ENABLE_ANALYTICS: z