a82a1af3a21__remix_99102.cursorrules6 matches
189- **Imports:** Use `https://esm.sh` for npm and Deno dependencies to ensure compatibility on server and browser
190- **Storage Strategy:** Only use backend storage if explicitly required; prefer simple static client-side sites
191- **React Configuration:** When using React libraries, pin versions with `?deps=react@18.2.0,react-dom@18.2.0` and start the file with `/** @jsxImportSource https://esm.sh/react@18.2.0 */`
192- Ensure all React dependencies and sub-dependencies are pinned to the same version
193- **Styling:** Default to using TailwindCSS via `<script src="https://cdn.twind.style" crossorigin></script>` unless otherwise specified
194275- Always run table creation before querying
2762773. **React Configuration:**
278- All React dependencies must be pinned to 18.2.0
279- Always include `@jsxImportSource https://esm.sh/react@18.2.0` at the top of React files
280- Rendering issues often come from mismatched React versions
2812824. **File Handling:**
maine-bills-taxmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { getCache, setCache } from "https://esm.town/v/cmknz/maine-bills-tax/cache.ts";
3import { search } from "https://esm.town/v/cmknz/maine-bills-tax/search.ts";
4import { summarize } from "https://esm.town/v/cmknz/maine-bills-tax/summarize.ts";
5import { marked } from "npm:marked";
6import { renderToString } from "npm:react-dom@18.2.0/server";
7import React from "npm:react@18.2.0";
89const results = await search("tax");
341template: '#app-template',
342setup() {
343// Reactive state
344const apps = ref(initialApps);
345const currentAppId = ref(null);
productpanelREADME.md5 matches
7We've migrated the original vanilla JavaScript UI to Vue 3 to provide:
891. **Better reactivity**: Automatic UI updates when data changes
102. **Component-based architecture**: More maintainable, reusable UI code
113. **Declarative templates**: Cleaner, more readable UI code
23- **Template syntax**: `v-for`, `v-if`, `v-model`, etc.
24- **Component props and emits**: Clean component API
25- **Reactive state**: With `ref()` and `computed()`
26- **Event handling**: `@click`, `@submit.prevent`, etc.
27461. The `dashboard.http.ts` file serves the main HTML page with Vue 3 included
472. Vue initializes with the app data received from the server
483. The UI reactively updates as the user interacts with it
494. API calls still go to the existing backend endpoints
50551. Add new components to `components.ts` if they're reusable
562. Update the main dashboard template for layout changes
573. Add new reactive state and methods in the `setup()` function
5859## Benefits Over the Previous Implementation
61- No manual DOM manipulation
62- Cleaner separation of concerns
63- Better reactivity without custom event listeners
64- More maintainable template structure
65- Easier to extend with new features
8586```typescript
87// Example React Native code for submitting feedback
88const submitFeedback = async (apiKey, rating, comment) => {
89try {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { parseProject } from "https://esm.town/v/std/utils/index.ts";
4import { html } from "https://esm.town/v/stevekrouse/html";
5import { renderToString } from "npm:react-dom@18.2.0/server";
6import config from "./config.json" with { type: "json" };
7import { SparklineSVG } from "./sparklineSVG";
statussparklineSVG1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3const padding = 2;
cerebras_coderindex.ts10 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
3import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import STARTER_PROMPTS from "./starter-prompts.js";
630}: {
31prompt: string;
32setPrompt: React.Dispatch<React.SetStateAction<string>>;
33handleSubmit: (e: React.FormEvent) => void;
34handleStarterPromptClick: (promptItem: PromptItem) => void;
35}) {
116117function App() {
118const previewRef = React.useRef<HTMLDivElement>(null);
119const [prompt, setPrompt] = useState("");
120const [projectId, setProjectId] = useState<number | null>(null);
174}
175176async function handleSubmit(e: React.FormEvent | string) {
177if (typeof e !== "string") {
178e.preventDefault();
673</div>
674<div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
675<React.Fragment key={iframeKey}>
676<iframe
677srcDoc={code}
679className="w-full grow"
680/>
681</React.Fragment>
682</div>
683</div>
markdownBlogStarterLayout.tsx3 matches
1/** @jsxImportSource npm:react@18.2.0 */
2import type { ReactNode } from "npm:react@18.2.0";
34export function Layout({ children }: { children: ReactNode }) {
5return (
6<html lang="en">
markdownBlogStarterindex.tsx4 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Markdown from "https://esm.sh/react-markdown@9?deps=react@18.2.0";
3import { listFiles, readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { renderToString } from "npm:react-dom@18.2.0/server";
5import { Layout } from "./Layout.tsx";
644}
4546function html(children: React.ReactNode) {
47return new Response(
48renderToString(