/**
 * webjs/core BROWSER public surface.
 *
 * Mirror of `./index.js` but with strictly server-only exports
 * removed so the browser bundle never drags `src/render-server.js`
 * (~1100 lines) or `src/expose.js` (~90 lines) over the wire.
 *
 * Stripped:
 *   - `renderToString`, `renderToStream` (server SSR pipeline; reach
 *     for `@webjsdev/core/server` if you need them in a Node test).
 *   - `setCspNonceProvider` (server-side wiring called by
 *     `@webjsdev/server`'s context module; `cspNonce()` stays
 *     because layouts can call it).
 *   - `expose`, `getExposed` (live inside `.server.{js,ts}` files;
 *     framework rewrites the import to an RPC stub on the client
 *     side, so the real module never legitimately reaches the
 *     browser).
 *
 * The framework's own SSR pipeline runs on Node and resolves the
 * package via the package.json `"default"` condition, which still
 * lands on `./index.js` (or its bundled equivalent). Browser routing
 * is done by `packages/server/src/importmap.js`, which points
 * `@webjsdev/core` at THIS file (workspace dev) or its bundled
 * sibling `dist/webjs-core-browser.js` (post-`build:dist`).
 *
 * Keep this list in sync with `./index.js` for everything else.
 */

export { html, isTemplate, MARKER } from './src/html.js';
export { css, isCSS, adoptStyles, stylesToString } from './src/css.js';
export { WebComponent } from './src/component.js';
export { register, lookup, lookupModuleUrl, isLazy, allTags, primeModuleUrl, tagOf } from './src/registry.js';
export { render } from './src/render-client.js';
export { escapeText, escapeAttr } from './src/escape.js';
export { notFound, redirect, isNotFound, isRedirect } from './src/nav.js';
export { cspNonce } from './src/csp-nonce.js';
export { repeat, isRepeat } from './src/repeat.js';
export { Suspense, isSuspense } from './src/suspense.js';
export { connectWS } from './src/websocket-client.js';
export { richFetch } from './src/rich-fetch.js';
export {
  stringify, parse,
  serialize, deserialize,
} from './src/serialize.js';
export { enableClientRouter, disableClientRouter, navigate, revalidate } from './src/router-client.js';
export { WebjsFrame } from './src/webjs-frame.js';
export { WebjsStream, renderStream } from './src/webjs-stream.js';

// Signals (TC39 Stage-1 shape), also available via '@webjsdev/core/signals'
export { signal, computed, effect, batch, isSignal, Signal } from './src/signal.js';

// Optimistic-mutation helper (thin signal wrapper, rolls back on failure)
export { optimistic } from './src/optimistic.js';

// Directives, also available via '@webjsdev/core/directives'. The full
// lit-html-parity set is re-exported here so the dist browser bundle (which
// the `@webjsdev/core/directives` subpath collapses onto in dist mode) carries
// every directive, matching what src/directives.js exports in dev.
export {
  unsafeHTML, isUnsafeHTML, live, isLive, keyed, isKeyed, guard, isGuard,
  templateContent, isTemplateContent, ref, isRef, createRef, cache, isCache,
  until, isUntil, asyncAppend, isAsyncAppend, asyncReplace, isAsyncReplace,
  watch, isWatch,
} from './src/directives.js';

// Context Protocol, also available via '@webjsdev/core/context'
export { createContext, ContextProvider, ContextConsumer, ContextRequestEvent } from './src/context.js';

// Task controller, also available via '@webjsdev/core/task'
export { Task, TaskStatus } from './src/task.js';
