Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .clinerules
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# bQuery.js — Cline Rules

You are working on bQuery.js (`@bquery/bquery`), a TypeScript-first, zero-build DOM library.
You are working on bQuery.js (`@bquery/bquery`), a batteries-included TypeScript full-stack web framework with a jQuery-inspired API.

> Derived snapshot for Cline. If this file drifts from `package.json`, `src/*/index.ts`, or `AGENT.md`, trust those files first and then realign this one.

The reactive module now also covers HTTP clients, polling, pagination, WebSocket / SSE, REST helpers, request queues, and request deduplication.
bQuery.js is not a utility library; its broad module surface is the product. The reactive module now also covers HTTP clients, polling, pagination, WebSocket / SSE, REST helpers, request queues, and request deduplication.

Current release baseline: **1.11.0**.

Expand Down
6 changes: 4 additions & 2 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# bQuery.js — Cursor Rules

You are working on bQuery.js, a TypeScript-first, zero-build DOM library.
You are working on bQuery.js, a batteries-included TypeScript full-stack web framework with a jQuery-inspired API.

> Derived snapshot for Cursor. If this file conflicts with `package.json`, `src/*/index.ts`, or `AGENT.md`, trust those files in that order and then realign this one.

Current release baseline: **1.11.0**.

bQuery.js is not a utility library; treat its broad module surface as the product, and keep guidance aligned with that scope.

## Critical Rules

- Runtime: Bun (not Node). Use `bun test` for tests, `bun:test` imports.
- Tooling/tests: Use Bun for repository workflows (`bun test`, `bun:test` imports). Runtime support for SSR/server workflows includes Node.js, and runtime-agnostic server APIs may also target environments such as Deno where applicable.
- Supported toolchain: Node.js `>=24.0.0`, Bun `>=1.3.13`.
- TypeScript: strict mode, ES2020 target, Bundler module resolution.
- Security: ALL DOM HTML writes MUST use `sanitizeHtml()` from `src/security/sanitize.ts` (re-exported via `src/security/index.ts`).
Expand Down
14 changes: 11 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Role and operating mode

You are the primary coding agent for **bQuery.js** (`@bquery/bquery`), a TypeScript-first, zero-build-capable DOM library that combines jQuery-like direct DOM ergonomics with modern platform features.
You are the primary coding agent for **bQuery.js** (`@bquery/bquery`), a batteries-included TypeScript full-stack web framework that brings a jQuery-inspired API to modern reactive, component, SSR, and server workflows.

Work autonomously inside the scope of the current request, but do not invent a hidden local backlog.

Expand All @@ -14,7 +14,7 @@ Work autonomously inside the scope of the current request, but do not invent a h

## Quick orientation

bQuery.js is modular, tree-shakeable, has zero runtime dependencies, and currently ships **23 public entry points**.
bQuery.js is a batteries-included framework, not a utility library. It is modular, tree-shakeable, has zero runtime dependencies, and currently ships **23 public entry points**.

Current release baseline: **1.11.0**.

Expand Down Expand Up @@ -109,7 +109,15 @@ Public modules live under `src/<module>/index.ts`. Important module groups:
- `router` — SPA routing, guards, params, navigation utilities, route signals
- `store` — signal-based state management and persistence
- `view` — declarative bindings with `bq-*` directives including `bq-error` and `bq-aria`
- `storybook`, `forms`, `i18n`, `a11y`, `dnd`, `media`, `plugin`, `devtools`, `testing` — feature modules with their own public barrels and guides
- `storybook` — Storybook helpers for safe story templates and boolean-attribute shorthand
- `forms` — reactive form state, validation, and submit orchestration
- `i18n` — locale state, translation, interpolation, and Intl formatting
- `a11y` — focus management, live regions, audits, and media preferences
- `dnd` — draggable elements, drop zones, and sortable lists
- `media` — viewport, network, battery, clipboard, and DOM observer signals
- `plugin` — plugin registration for custom directives and Web Components
- `devtools` — runtime inspection helpers for signals, stores, components, and timelines
- `testing` — component mounts, mock signals/router helpers, and async test utilities
- `ssr` — runtime-agnostic rendering, streaming, hydration, adapters, snapshots, resumability
- `server` — dependency-free backend routing, SSR-aware responses, runtime-agnostic WebSocket sessions

Expand Down
21 changes: 19 additions & 2 deletions AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
| Version | 1.11.0 |
| License | MIT |
| Language | TypeScript (strict) |
| Runtime | Browser (ESM, UMD, IIFE) — tests run via Bun |
| Runtime | Browser (ESM, UMD, IIFE), plus Node.js, Bun, and Deno for SSR/server workflows |
| Toolchain | Node.js `>=24.0.0`, Bun `>=1.3.13` |
| Repository | <https://github.com/bQuery/bQuery> |
| Homepage | <https://bQuery.flausch-code.de> |
| Description | jQuery-style DOM library with reactivity, zero-build worker tasks, async data, HTTP clients, polling / pagination, realtime transports, REST helpers, Web Components, motion, routing, stores, declarative views, and shared runtime config — zero-build capable, security-by-default |
| Tagline | The full-stack web framework that speaks jQuery. |
| Description | Batteries-included TypeScript framework for the modern web with signals, SSR, Web Components, routing, server helpers, and a jQuery-inspired API — zero mandatory build step, security-by-default |

---

Expand Down Expand Up @@ -48,6 +49,20 @@ Project-specific starter prompts live in [`.github/prompts/`](.github/prompts/)

---

## Positioning

**The full-stack web framework that speaks jQuery.**

bQuery.js does not compete with jQuery on simplicity — it competes with full-stack frameworks on developer experience, bringing the ergonomics of jQuery's API surface to a modern, reactive, SSR-capable architecture.

## Module Maturity

- **Stable**: Core, Reactive, Security, Component, Motion, Platform, Router, Store
- **Beta**: View, Forms, i18n, A11y, DnD, Media, Plugin, Devtools, Testing, Storybook
- **Experimental**: SSR, Server, Concurrency

---

## Architecture Overview

```bash
Expand Down Expand Up @@ -403,6 +418,8 @@ Runtime-agnostic SSR pipeline. Works on Node.js ≥ 24, Deno and Bun ≥ 1.3.13

## Design Principles & Invariants

See the earlier Positioning section for the project's jQuery/framework comparison.

1. **Security by default** — Every `.html()` call and component render goes through `sanitizeHtml()`. New DOM-writing methods MUST sanitize input.
2. **Chainable APIs** — All mutating methods on `BQueryElement` / `BQueryCollection` return `this`.
3. **Getter/setter overloading** — `.text()`, `.attr()`, `.css()`, `.data()` etc. act as getters without args, setters with args.
Expand Down
Loading
Loading