docs: update portal for WRNexusJS 0.2.59
This commit is contained in:
+71
-71
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"status": "private-developer-preview",
|
||||
"generatedAt": "2026-07-13",
|
||||
"documents": [
|
||||
@@ -7,476 +7,476 @@
|
||||
"url": "/",
|
||||
"title": "WRNexusJS",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/access",
|
||||
"title": "access",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/getting-started",
|
||||
"title": "getting started",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/tutorial",
|
||||
"title": "tutorial",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/architecture",
|
||||
"title": "architecture",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/language",
|
||||
"title": "language",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages",
|
||||
"title": "packages",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/project-structure",
|
||||
"title": "project structure",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/routing",
|
||||
"title": "routing",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/pages-and-components",
|
||||
"title": "pages and components",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/server-data",
|
||||
"title": "server data",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/api-routes",
|
||||
"title": "api routes",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/middleware",
|
||||
"title": "middleware",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/forms-and-validation",
|
||||
"title": "forms and validation",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/authentication",
|
||||
"title": "authentication",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/authorization",
|
||||
"title": "authorization",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/security",
|
||||
"title": "security",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/database",
|
||||
"title": "database",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/uploads",
|
||||
"title": "uploads",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/realtime",
|
||||
"title": "realtime",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/pubsub",
|
||||
"title": "pubsub",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/queues",
|
||||
"title": "queues",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "experimental"
|
||||
},
|
||||
{
|
||||
"url": "/guides/testing",
|
||||
"title": "testing",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/workspaces-and-gateway",
|
||||
"title": "workspaces and gateway",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/deployment",
|
||||
"title": "deployment",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/configuration-and-profiles",
|
||||
"title": "configuration and profiles",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/i18n-and-themes",
|
||||
"title": "i18n and themes",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/mobile",
|
||||
"title": "mobile",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "experimental"
|
||||
},
|
||||
{
|
||||
"url": "/guides/observability",
|
||||
"title": "observability",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/upgrading",
|
||||
"title": "upgrading",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/guides/troubleshooting",
|
||||
"title": "troubleshooting",
|
||||
"section": "guide",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/examples",
|
||||
"title": "examples",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/showcase",
|
||||
"title": "showcase",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/benchmarks",
|
||||
"title": "benchmarks",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/roadmap",
|
||||
"title": "roadmap",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/changelog",
|
||||
"title": "changelog",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/releases/0.2.58",
|
||||
"title": "0.2.58",
|
||||
"url": "/releases/0.2.59",
|
||||
"title": "0.2.59",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/security",
|
||||
"title": "security",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/support",
|
||||
"title": "support",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/license",
|
||||
"title": "license",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/search",
|
||||
"title": "search",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/404",
|
||||
"title": "404",
|
||||
"section": "portal",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/ai",
|
||||
"title": "ai",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/authz",
|
||||
"title": "authz",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/cli",
|
||||
"title": "cli",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/compiler",
|
||||
"title": "compiler",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/core",
|
||||
"title": "core",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/csr",
|
||||
"title": "csr",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/db",
|
||||
"title": "db",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/dev-server",
|
||||
"title": "dev server",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/encryption",
|
||||
"title": "encryption",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/helpers",
|
||||
"title": "helpers",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/i18n",
|
||||
"title": "i18n",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/jwt",
|
||||
"title": "jwt",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/mobile",
|
||||
"title": "mobile",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "experimental"
|
||||
},
|
||||
{
|
||||
"url": "/packages/native",
|
||||
"title": "native",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/oauth",
|
||||
"title": "oauth",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/pubsub",
|
||||
"title": "pubsub",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/queue",
|
||||
"title": "queue",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/reactive",
|
||||
"title": "reactive",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/router",
|
||||
"title": "router",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/ssr",
|
||||
"title": "ssr",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/styles",
|
||||
"title": "styles",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/test",
|
||||
"title": "test",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/tracking",
|
||||
"title": "tracking",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/ui",
|
||||
"title": "ui",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/uploader",
|
||||
"title": "uploader",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
},
|
||||
{
|
||||
"url": "/packages/validation",
|
||||
"title": "validation",
|
||||
"section": "package",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.59",
|
||||
"stability": "preview"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# WRNexusJS 0.2.58 comprehensive documentation index
|
||||
# WRNexusJS 0.2.59 comprehensive documentation index
|
||||
|
||||
Status: Private Developer Preview. Runtime: Bun. UI language: .wrn.
|
||||
This is the documentation application, not the framework monorepo.
|
||||
@@ -39,7 +39,7 @@ This is the documentation application, not the framework monorepo.
|
||||
- https://wrnexusjs.dev/benchmarks
|
||||
- https://wrnexusjs.dev/roadmap
|
||||
- https://wrnexusjs.dev/changelog
|
||||
- https://wrnexusjs.dev/releases/0.2.58
|
||||
- https://wrnexusjs.dev/releases/0.2.59
|
||||
- https://wrnexusjs.dev/security
|
||||
- https://wrnexusjs.dev/support
|
||||
- https://wrnexusjs.dev/license
|
||||
|
||||
+52
-20
@@ -1,4 +1,4 @@
|
||||
# WRNexusJS documentation 0.2.58
|
||||
# WRNexusJS documentation 0.2.59
|
||||
|
||||
Status: Private Developer Preview. This site documents 26 release-aligned packages.
|
||||
|
||||
@@ -12763,7 +12763,7 @@ Events: none
|
||||
|
||||
# Installed package documentation
|
||||
|
||||
The following README files and declarations come from the installed private 0.2.58 release.
|
||||
The following README files and declarations come from the installed private 0.2.59 release.
|
||||
|
||||
## @wrnexus/ai
|
||||
|
||||
@@ -13575,18 +13575,19 @@ class Lexer {
|
||||
|
||||
Exported type-only symbols describing the parsed tree:
|
||||
|
||||
| Type | Description |
|
||||
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `PageAst` | Root node: `kind` (`"page" \| "component"`), `name`, optional `layout`, `props`, `states`, `seo`, `view`, `styles`, `functions`, `dataApis`, `modeFunctions`, `apis`, `realtimes`. |
|
||||
| `ViewNode` | `{ type: "text"; value }` or `{ type: "element"; tag; attrs; children }`. |
|
||||
| `Attr` | `{ name; value; event; boolean? }` — `event` marks `@event` bindings. |
|
||||
| `StateDecl` | `{ name; expr }` — a `state x = <expr>` declaration. |
|
||||
| `SeoBlock` | `Record<string, string>` from the `seo { ... }` block. |
|
||||
| `ApiBlock` | `{ method; path; body }` — a top-level `api METHOD /path { ... }`. |
|
||||
| `DataApiBlock` | `{ mode; name; method; path; body }` — an `api` inside an `ssr`/`client` block. |
|
||||
| `DataMode` | `"ssr" \| "client"`. |
|
||||
| `ModeFunctionsBlock` | `{ mode; body }` — a `functions { ... }` inside an `ssr`/`client` block. |
|
||||
| `RealtimeBlock` | `{ name; handlers }` — a `realtime <name> { on evt(args) { ... } }` block. |
|
||||
| Type | Description |
|
||||
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `PageAst` | Root node including `kind`, `name`, `types`, typed `props`, typed `states`, `view`, styles, functions, data APIs, lifecycle, and routes. |
|
||||
| `ViewNode` | `{ type: "text"; value }` or `{ type: "element"; tag; attrs; children }`. |
|
||||
| `Attr` | `{ name; value; event; boolean? }` — `event` marks `@event` bindings. |
|
||||
| `StateDecl` | `{ name; valueType?; expr }` — a typed `state x: Type = <expr>` declaration. |
|
||||
| `PropDecl` | `{ name; valueType?; required; default }` — a typed prop declaration. |
|
||||
| `SeoBlock` | `Record<string, string>` from the `seo { ... }` block. |
|
||||
| `ApiBlock` | `{ method; path; body }` — a top-level `api METHOD /path { ... }`. |
|
||||
| `DataApiBlock` | `{ mode; name; method; path; body }` — an `api` inside an `ssr`/`client` block. |
|
||||
| `DataMode` | `"ssr" \| "client"`. |
|
||||
| `ModeFunctionsBlock` | `{ mode; body }` — a `functions { ... }` inside an `ssr`/`client` block. |
|
||||
| `RealtimeBlock` | `{ name; handlers }` — a `realtime <name> { on evt(args) { ... } }` block. |
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -13646,12 +13647,13 @@ lx.next(); // { type: "lbrace", value: "{", pos: 10 }
|
||||
A file opens with `page <Name>` or `component <Name>` followed by a `{ ... }` body containing zero or more members:
|
||||
|
||||
- `layout = "<name>"` — selects `app/layouts/<name>.wrn` (pages only).
|
||||
- `props { name = <default> ... }` — component props; each default's type drives coercion.
|
||||
- `state <ident> = <expr>` — reactive state seeded from a raw JS expression.
|
||||
- `types { <TypeScript declarations> }` — reusable interfaces and aliases for the current file.
|
||||
- `props { name: Type = <default> ... }` — typed component props. Omit `= <default>` to make a prop required. Legacy inferred props remain supported.
|
||||
- `state <ident>: Type = <expr>` — typed reactive state seeded from a raw JS expression. The annotation is optional for backward compatibility.
|
||||
- `view { <html> }` — plain HTML with `{expr}` interpolation in text and attributes, hyphenated attributes, boolean attributes, `@event="..."` client bindings, and `<!-- comments -->`. Attribute expressions that reference `state` keep an SSR value and update reactively in the browser.
|
||||
- `seo { key = "value" ... }` — metadata merged into the generated `meta`.
|
||||
- `style { <raw css> }` — inlined page/component stylesheet (repeatable).
|
||||
- `functions { <raw js> }` — shared server-side helpers (repeatable).
|
||||
- `functions { <TypeScript> }` — helpers with typed parameters and return values. Types remain in server output and are safely erased from browser behavior code.
|
||||
- `api <METHOD> <path> { <raw js> }` — route handler, lowered to a `METHOD` export (repeatable).
|
||||
- `ssr { ... }` / `client { ... }` — data blocks holding `api <name> <METHOD> <path> { ... }` bindings and their own `functions { ... }`.
|
||||
- `realtime <name> { on <evt>(<args>) { <raw js> } ... }` — websocket handlers, lowered to a `websocket` export.
|
||||
@@ -13672,7 +13674,9 @@ A file opens with `page <Name>` or `component <Name>` followed by a `{ ... }` bo
|
||||
* Grammar (subset of the vision, but real):
|
||||
*
|
||||
* page <Name> {
|
||||
* state <ident> = <expr> // zero or more
|
||||
* types { <TypeScript declarations> }
|
||||
* props { <ident>: <type> [= <expr>] } // no default means required
|
||||
* state <ident>: <type> = <expr> // type annotation is optional
|
||||
* view { <html> } // plain HTML (see parseHtmlView)
|
||||
* seo { title = "Home" description = "..." }
|
||||
* ssr { api <name> <METHOD> <path> { <render js> } functions { <raw js> } }
|
||||
@@ -13689,6 +13693,8 @@ A file opens with `page <Name>` or `component <Name>` followed by a `{ ... }` bo
|
||||
*/
|
||||
interface StateDecl {
|
||||
name: string;
|
||||
/** Explicit TypeScript-style type annotation, when supplied. */
|
||||
valueType?: string;
|
||||
/** Raw JS initializer expression, e.g. `0` or `'x'`. */
|
||||
expr: string;
|
||||
}
|
||||
@@ -13773,6 +13779,10 @@ interface RealtimeBlock {
|
||||
}
|
||||
interface PropDecl {
|
||||
name: string;
|
||||
/** Explicit TypeScript-style type annotation, when supplied. */
|
||||
valueType?: string;
|
||||
/** Props without a default are required. */
|
||||
required: boolean;
|
||||
/** Raw JS default expression, e.g. `0` or `'Count'`. Its type drives coercion. */
|
||||
default: string;
|
||||
}
|
||||
@@ -13788,6 +13798,8 @@ interface PageAst {
|
||||
layout?: string;
|
||||
/** Declared component props (empty for pages). */
|
||||
props: PropDecl[];
|
||||
/** Raw declarations from `types { ... }`, emitted as TypeScript. */
|
||||
types: string[];
|
||||
states: StateDecl[];
|
||||
seo: SeoBlock;
|
||||
view: ViewNode[];
|
||||
@@ -13838,7 +13850,7 @@ declare function generateNative(ast: PageAst): string;
|
||||
* `next()`/`peek()`, and exposes `readBalancedBraces()`, `readPath()` and
|
||||
* `readToLineEnd()` for the parser to grab raw spans when grammar demands it.
|
||||
*/
|
||||
type TokenType = "ident" | "string" | "lbrace" | "rbrace" | "lparen" | "rparen" | "at" | "eq" | "comma" | "eof";
|
||||
type TokenType = "ident" | "string" | "lbrace" | "rbrace" | "lparen" | "rparen" | "at" | "eq" | "colon" | "comma" | "eof";
|
||||
interface Token {
|
||||
type: TokenType;
|
||||
value: string;
|
||||
@@ -13861,6 +13873,15 @@ declare class Lexer {
|
||||
readPath(): string;
|
||||
/** Read the rest of the current line (used for `state x = <expr>`). */
|
||||
readToLineEnd(): string;
|
||||
/**
|
||||
* Read a TypeScript-style type annotation after `:`. Reading stops at a
|
||||
* top-level `=` or line ending, while nested object/tuple/generic syntax is
|
||||
* preserved. The optional `=` is consumed for the caller.
|
||||
*/
|
||||
readTypeAnnotation(): {
|
||||
type: string;
|
||||
hasDefault: boolean;
|
||||
};
|
||||
/**
|
||||
* Read a `{ ... }` block and return its INNER text (no outer braces), with
|
||||
* brace counting that respects string and template literals so a `}` inside a
|
||||
@@ -13870,6 +13891,17 @@ declare class Lexer {
|
||||
private lineAt;
|
||||
}
|
||||
|
||||
/** Utilities shared by typed `.wrn` parsing, validation, and code generation. */
|
||||
type RuntimeType = "string" | "number" | "boolean" | "bigint" | "array" | "object" | "function" | "unknown";
|
||||
declare function runtimeTypeOf(annotation: string | undefined): RuntimeType;
|
||||
declare function inferredRuntimeType(expression: string): RuntimeType;
|
||||
/**
|
||||
* Browser behavior is evaluated as JavaScript, so erase TypeScript annotations
|
||||
* from ordinary function declarations before serializing it into HTML.
|
||||
* Server output retains the original typed source.
|
||||
*/
|
||||
declare function eraseFunctionTypes(source: string): string;
|
||||
|
||||
/**
|
||||
* @wrnexus/compiler — the `.wrn` language compiler.
|
||||
*
|
||||
@@ -13894,7 +13926,7 @@ declare function compileWireFile(source: string, filePath?: string): string;
|
||||
/** Richer entry point returning the AST and diagnostics alongside the code. */
|
||||
declare function compile(source: string): CompileResult;
|
||||
|
||||
export { type ApiBlock, type Attr, type CompileResult, type DataApiBlock, type DataMode, LexError, Lexer, type ModeFunctionsBlock, NativeCompileError, type PageAst, ParseError, type RealtimeBlock, type SeoBlock, type StateDecl, type ViewNode, compile, compileNativeWireFile, compileWireFile, generate, generateNative, parse };
|
||||
export { type ApiBlock, type Attr, type CompileResult, type DataApiBlock, type DataMode, LexError, Lexer, type ModeFunctionsBlock, NativeCompileError, type PageAst, ParseError, type PropDecl, type RealtimeBlock, type SeoBlock, type StateDecl, type ViewNode, compile, compileNativeWireFile, compileWireFile, eraseFunctionTypes, generate, generateNative, inferredRuntimeType, parse, runtimeTypeOf };
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://wrnexusjs.dev/</loc></url><url><loc>https://wrnexusjs.dev/access</loc></url><url><loc>https://wrnexusjs.dev/getting-started</loc></url><url><loc>https://wrnexusjs.dev/tutorial</loc></url><url><loc>https://wrnexusjs.dev/architecture</loc></url><url><loc>https://wrnexusjs.dev/language</loc></url><url><loc>https://wrnexusjs.dev/packages</loc></url><url><loc>https://wrnexusjs.dev/guides/project-structure</loc></url><url><loc>https://wrnexusjs.dev/guides/routing</loc></url><url><loc>https://wrnexusjs.dev/guides/pages-and-components</loc></url><url><loc>https://wrnexusjs.dev/guides/server-data</loc></url><url><loc>https://wrnexusjs.dev/guides/api-routes</loc></url><url><loc>https://wrnexusjs.dev/guides/middleware</loc></url><url><loc>https://wrnexusjs.dev/guides/forms-and-validation</loc></url><url><loc>https://wrnexusjs.dev/guides/authentication</loc></url><url><loc>https://wrnexusjs.dev/guides/authorization</loc></url><url><loc>https://wrnexusjs.dev/guides/security</loc></url><url><loc>https://wrnexusjs.dev/guides/database</loc></url><url><loc>https://wrnexusjs.dev/guides/uploads</loc></url><url><loc>https://wrnexusjs.dev/guides/realtime</loc></url><url><loc>https://wrnexusjs.dev/guides/pubsub</loc></url><url><loc>https://wrnexusjs.dev/guides/queues</loc></url><url><loc>https://wrnexusjs.dev/guides/testing</loc></url><url><loc>https://wrnexusjs.dev/guides/workspaces-and-gateway</loc></url><url><loc>https://wrnexusjs.dev/guides/deployment</loc></url><url><loc>https://wrnexusjs.dev/guides/configuration-and-profiles</loc></url><url><loc>https://wrnexusjs.dev/guides/i18n-and-themes</loc></url><url><loc>https://wrnexusjs.dev/guides/mobile</loc></url><url><loc>https://wrnexusjs.dev/guides/observability</loc></url><url><loc>https://wrnexusjs.dev/guides/upgrading</loc></url><url><loc>https://wrnexusjs.dev/guides/troubleshooting</loc></url><url><loc>https://wrnexusjs.dev/examples</loc></url><url><loc>https://wrnexusjs.dev/showcase</loc></url><url><loc>https://wrnexusjs.dev/benchmarks</loc></url><url><loc>https://wrnexusjs.dev/roadmap</loc></url><url><loc>https://wrnexusjs.dev/changelog</loc></url><url><loc>https://wrnexusjs.dev/releases/0.2.58</loc></url><url><loc>https://wrnexusjs.dev/security</loc></url><url><loc>https://wrnexusjs.dev/support</loc></url><url><loc>https://wrnexusjs.dev/license</loc></url><url><loc>https://wrnexusjs.dev/search</loc></url><url><loc>https://wrnexusjs.dev/404</loc></url><url><loc>https://wrnexusjs.dev/packages/ai</loc></url><url><loc>https://wrnexusjs.dev/packages/authz</loc></url><url><loc>https://wrnexusjs.dev/packages/cli</loc></url><url><loc>https://wrnexusjs.dev/packages/compiler</loc></url><url><loc>https://wrnexusjs.dev/packages/core</loc></url><url><loc>https://wrnexusjs.dev/packages/csr</loc></url><url><loc>https://wrnexusjs.dev/packages/db</loc></url><url><loc>https://wrnexusjs.dev/packages/dev-server</loc></url><url><loc>https://wrnexusjs.dev/packages/encryption</loc></url><url><loc>https://wrnexusjs.dev/packages/helpers</loc></url><url><loc>https://wrnexusjs.dev/packages/i18n</loc></url><url><loc>https://wrnexusjs.dev/packages/jwt</loc></url><url><loc>https://wrnexusjs.dev/packages/mobile</loc></url><url><loc>https://wrnexusjs.dev/packages/native</loc></url><url><loc>https://wrnexusjs.dev/packages/oauth</loc></url><url><loc>https://wrnexusjs.dev/packages/pubsub</loc></url><url><loc>https://wrnexusjs.dev/packages/queue</loc></url><url><loc>https://wrnexusjs.dev/packages/reactive</loc></url><url><loc>https://wrnexusjs.dev/packages/router</loc></url><url><loc>https://wrnexusjs.dev/packages/ssr</loc></url><url><loc>https://wrnexusjs.dev/packages/styles</loc></url><url><loc>https://wrnexusjs.dev/packages/test</loc></url><url><loc>https://wrnexusjs.dev/packages/tracking</loc></url><url><loc>https://wrnexusjs.dev/packages/ui</loc></url><url><loc>https://wrnexusjs.dev/packages/uploader</loc></url><url><loc>https://wrnexusjs.dev/packages/validation</loc></url></urlset>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://wrnexusjs.dev/</loc></url><url><loc>https://wrnexusjs.dev/access</loc></url><url><loc>https://wrnexusjs.dev/getting-started</loc></url><url><loc>https://wrnexusjs.dev/tutorial</loc></url><url><loc>https://wrnexusjs.dev/architecture</loc></url><url><loc>https://wrnexusjs.dev/language</loc></url><url><loc>https://wrnexusjs.dev/packages</loc></url><url><loc>https://wrnexusjs.dev/guides/project-structure</loc></url><url><loc>https://wrnexusjs.dev/guides/routing</loc></url><url><loc>https://wrnexusjs.dev/guides/pages-and-components</loc></url><url><loc>https://wrnexusjs.dev/guides/server-data</loc></url><url><loc>https://wrnexusjs.dev/guides/api-routes</loc></url><url><loc>https://wrnexusjs.dev/guides/middleware</loc></url><url><loc>https://wrnexusjs.dev/guides/forms-and-validation</loc></url><url><loc>https://wrnexusjs.dev/guides/authentication</loc></url><url><loc>https://wrnexusjs.dev/guides/authorization</loc></url><url><loc>https://wrnexusjs.dev/guides/security</loc></url><url><loc>https://wrnexusjs.dev/guides/database</loc></url><url><loc>https://wrnexusjs.dev/guides/uploads</loc></url><url><loc>https://wrnexusjs.dev/guides/realtime</loc></url><url><loc>https://wrnexusjs.dev/guides/pubsub</loc></url><url><loc>https://wrnexusjs.dev/guides/queues</loc></url><url><loc>https://wrnexusjs.dev/guides/testing</loc></url><url><loc>https://wrnexusjs.dev/guides/workspaces-and-gateway</loc></url><url><loc>https://wrnexusjs.dev/guides/deployment</loc></url><url><loc>https://wrnexusjs.dev/guides/configuration-and-profiles</loc></url><url><loc>https://wrnexusjs.dev/guides/i18n-and-themes</loc></url><url><loc>https://wrnexusjs.dev/guides/mobile</loc></url><url><loc>https://wrnexusjs.dev/guides/observability</loc></url><url><loc>https://wrnexusjs.dev/guides/upgrading</loc></url><url><loc>https://wrnexusjs.dev/guides/troubleshooting</loc></url><url><loc>https://wrnexusjs.dev/examples</loc></url><url><loc>https://wrnexusjs.dev/showcase</loc></url><url><loc>https://wrnexusjs.dev/benchmarks</loc></url><url><loc>https://wrnexusjs.dev/roadmap</loc></url><url><loc>https://wrnexusjs.dev/changelog</loc></url><url><loc>https://wrnexusjs.dev/releases/0.2.59</loc></url><url><loc>https://wrnexusjs.dev/security</loc></url><url><loc>https://wrnexusjs.dev/support</loc></url><url><loc>https://wrnexusjs.dev/license</loc></url><url><loc>https://wrnexusjs.dev/search</loc></url><url><loc>https://wrnexusjs.dev/404</loc></url><url><loc>https://wrnexusjs.dev/packages/ai</loc></url><url><loc>https://wrnexusjs.dev/packages/authz</loc></url><url><loc>https://wrnexusjs.dev/packages/cli</loc></url><url><loc>https://wrnexusjs.dev/packages/compiler</loc></url><url><loc>https://wrnexusjs.dev/packages/core</loc></url><url><loc>https://wrnexusjs.dev/packages/csr</loc></url><url><loc>https://wrnexusjs.dev/packages/db</loc></url><url><loc>https://wrnexusjs.dev/packages/dev-server</loc></url><url><loc>https://wrnexusjs.dev/packages/encryption</loc></url><url><loc>https://wrnexusjs.dev/packages/helpers</loc></url><url><loc>https://wrnexusjs.dev/packages/i18n</loc></url><url><loc>https://wrnexusjs.dev/packages/jwt</loc></url><url><loc>https://wrnexusjs.dev/packages/mobile</loc></url><url><loc>https://wrnexusjs.dev/packages/native</loc></url><url><loc>https://wrnexusjs.dev/packages/oauth</loc></url><url><loc>https://wrnexusjs.dev/packages/pubsub</loc></url><url><loc>https://wrnexusjs.dev/packages/queue</loc></url><url><loc>https://wrnexusjs.dev/packages/reactive</loc></url><url><loc>https://wrnexusjs.dev/packages/router</loc></url><url><loc>https://wrnexusjs.dev/packages/ssr</loc></url><url><loc>https://wrnexusjs.dev/packages/styles</loc></url><url><loc>https://wrnexusjs.dev/packages/test</loc></url><url><loc>https://wrnexusjs.dev/packages/tracking</loc></url><url><loc>https://wrnexusjs.dev/packages/ui</loc></url><url><loc>https://wrnexusjs.dev/packages/uploader</loc></url><url><loc>https://wrnexusjs.dev/packages/validation</loc></url></urlset>
|
||||
|
||||
Reference in New Issue
Block a user