Skip to content

Commit 622b0d0

Browse files
committed
docs: rework former em-dash phrasing into natural prose
Replace the mechanical em-dash-to-hyphen substitution with proper rewrites: each former em dash becomes a colon, comma, semicolon, parentheses, a split sentence, or a connective, chosen for natural reading. Covers docs, comments, JSDoc, and human-facing strings across the codebase. Created with the help of an agent.
1 parent 33a8e2b commit 622b0d0

708 files changed

Lines changed: 2544 additions & 2544 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Ahead-of-time build artifacts that live under `src/` - the shadow-root styleshee
5858
## Conventions
5959

6060
- RPC functions must use `defineRpcFunction`; always namespace IDs `devframes:plugin:<slug>:<fn-name>` for built-in devframes (the literal `plugin:` token mirrors the `@devframes/plugin-<slug>` package name on the wire - it is npm namespacing, not a concept).
61-
- **No magic event names - use the centralized event maps.** Every event, broadcast, shared-state key, and channel name lives in one of two source-of-truth maps: `DEVFRAME_EVENTS` (`packages/devframe/src/events.ts`, re-exported from `devframe/constants`) for the core runtime, and `HUB_EVENTS` (`packages/hub/src/events.ts`, re-exported from `@devframes/hub/constants`) for the hub. Reference `DEVFRAME_EVENTS.*` / `HUB_EVENTS.*` at call sites (`.events.emit`/`.on`, `rpc.broadcast({ method })`, `sharedState.get(key)`, `defineHubRpcFunction({ name })`, `rpc.call`) instead of re-typing a string literal. The two maps and the [`docs/content/8.references/3.events.md`](docs/content/8.references/3.events.md) Events Reference are kept in lockstep: adding, renaming, or removing a name means editing the map **and** that page in the same change - every name in the maps appears in the tables, and vice versa. The only literals left are unavoidable type-position keys (the `EventEmitter<…>` maps in `types/*` and the `DevframeRpcClientFunctions`/`DevframeRpcServerFunctions` augmentations), which mirror the maps; a package that deliberately avoids a hub dependency (e.g. `@devframes/plugin-terminals`, which models the hub bridge structurally) keeps a local literal rather than importing `HUB_EVENTS`.
61+
- **No magic event names: use the centralized event maps.** Every event, broadcast, shared-state key, and channel name lives in one of two source-of-truth maps: `DEVFRAME_EVENTS` (`packages/devframe/src/events.ts`, re-exported from `devframe/constants`) for the core runtime, and `HUB_EVENTS` (`packages/hub/src/events.ts`, re-exported from `@devframes/hub/constants`) for the hub. Reference `DEVFRAME_EVENTS.*` / `HUB_EVENTS.*` at call sites (`.events.emit`/`.on`, `rpc.broadcast({ method })`, `sharedState.get(key)`, `defineHubRpcFunction({ name })`, `rpc.call`) instead of re-typing a string literal. The two maps and the [`docs/content/8.references/3.events.md`](docs/content/8.references/3.events.md) Events Reference are kept in lockstep: adding, renaming, or removing a name means editing the map **and** that page in the same change; every name in the maps appears in the tables, and vice versa. The only literals left are unavoidable type-position keys (the `EventEmitter<…>` maps in `types/*` and the `DevframeRpcClientFunctions`/`DevframeRpcServerFunctions` augmentations), which mirror the maps; a package that deliberately avoids a hub dependency (e.g. `@devframes/plugin-terminals`, which models the hub bridge structurally) keeps a local literal rather than importing `HUB_EVENTS`.
6262
- **Stay validator-neutral.** `devframe` and every `@devframes/*` package must not introduce a preferred schema validator dependency - no `valibot`, `zod`, `arktype`, etc. in their runtime `dependencies`. `args`/`returns`/flag schemas are typed against [Standard Schema](https://standardschema.dev/) (`@standard-schema/spec`, types-only); first-party code that needs to author a schema uses the built-in zero-dep `devframe/utils/simple-schema` builder (deliberately minimal - not a general validator). JSON-schema conversion uses each schema's own Standard JSON Schema converter (`~standard.jsonSchema`, implemented by e.g. zod 4) when present and degrades to a permissive object otherwise - no converter library and no vendor dependency is required. Docs, by contrast, should point *users* at a real validator for their own integrations - recommend **valibot** (lightest) or **zod** (worth reusing if they already pull it via the JSON-render or MCP integrations).
6363
- Shared state via `devframe/utils/shared-state`; keep values serializable.
6464
- Utility imports use the package-path form `devframe/utils/*`, never relative `../utils/*`.

‎design/build-shadow-css.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface BuildShadowCssOptions {
3838
userStylePath?: string | readonly string[]
3939
/**
4040
* Prefix Wind's `--un-*` custom properties are renamed to (see
41-
* `namespaceShadowCssVars`) - unique per shadow-root surface so two
41+
* `namespaceShadowCssVars`), unique per shadow-root surface so two
4242
* shadow trees on the same host page never collide.
4343
*/
4444
varPrefix: string
@@ -54,7 +54,7 @@ export interface BuildShadowCssResult {
5454
/**
5555
* Compile a shadow-root surface's UnoCSS output ahead of time into a plain
5656
* string module (`<srcDir>/.generated/css.ts`) that the surface adopts into
57-
* its shadow root - fully styled inside any host page without a global
57+
* its shadow root, fully styled inside any host page without a global
5858
* stylesheet, and immune to the host page's own styles leaking in. Shared by
5959
* `@devframes/hub-ui`'s dock and `@devframes/json-render-ui`'s renderer
6060
* module: same pipeline, same two shadow-root gotchas (see the root
@@ -77,7 +77,7 @@ export async function buildShadowCss(options: BuildShadowCssOptions): Promise<Bu
7777
// Shadow-root surfaces reuse `@antfu/design`'s Vue components (buttons,
7878
// badges, …) directly. UnoCSS ignores `node_modules` by default, so their
7979
// semantic shortcut classes (`btn-primary`, `btn-action`, `badge-*`, …)
80-
// would be absent from the shadow-root stylesheet - scan the design
80+
// would be absent from the shadow-root stylesheet, so scan the design
8181
// package's component sources too so those classes ship in the injected
8282
// CSS.
8383
const designComponentsDir = join(require.resolve('@antfu/design/package.json'), '..', 'components')
@@ -111,12 +111,12 @@ export async function buildShadowCss(options: BuildShadowCssOptions): Promise<Bu
111111
const unoResult = await generator.generate(tokens)
112112
// Wind3 drops a *plain* semantic shortcut (`.bg-base` / `.color-base`) from
113113
// the main pass when the same shortcut also appears variant-prefixed in the
114-
// sources (e.g. `@antfu/design`'s Tabs emits `data-[state=active]:bg-base`) -
114+
// sources (e.g. `@antfu/design`'s Tabs emits `data-[state=active]:bg-base`),
115115
// a shortcut+variant interaction. Generate the shadow-surface tokens in a
116116
// dedicated pass so their plain (and `.dark`) rules are always present.
117117
const surfaces = await generator.generate(shadowSurfaceSafelist.join(' '))
118118
// Wind3 bakes the `primary` theme color to literal `rgb()` triplets at
119-
// generate-time - rewire them to read the live `--colors-primary-*`
119+
// generate-time, so rewire them to read the live `--colors-primary-*`
120120
// variables `primary-ramp.css` derives from `--devframe-primary`, so a
121121
// rebrand actually retints `text-primary`/`bg-primary`/`btn-primary`/…
122122
// (see `rewireBakedPrimaryColors`'s own comment).

‎design/dock-icon.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// `ph:git-branch-duotone`) to its live, sanitized SVG markup, fetched from the
66
// public `api.iconify.design` CDN. Unlike a UnoCSS `preset-icons` class, this
77
// needs no `@iconify-json/*` collection installed and no hand-maintained
8-
// id -> class table - any Iconify id just works, at the cost of a network
8+
// id -> class table, since any Iconify id just works, at the cost of a network
99
// round-trip on first render. We reuse @antfu/design's own fetcher, cache and
1010
// sanitizer (`utils/iconify.ts`) rather than reimplementing them; only the id
1111
// parsing and light/dark selection below are devframe-specific, mirroring the
@@ -19,7 +19,7 @@ const ICONIFY_ID = /^(?:i-)?([\w-]+):([\w-]+)$/
1919

2020
/**
2121
* Resolve a dock icon (a `collection:icon` string, or a `{ light, dark }`
22-
* pair - the `light` variant is fetched) to its sanitized SVG markup.
22+
* pair whose `light` variant is fetched) to its sanitized SVG markup.
2323
*
2424
* Returns `undefined` when the id doesn't parse or the fetch fails, so the
2525
* caller can fall back to a text initial.

‎design/uno.config.ts‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface CreateDesignConfigOptions {
1717
* json-render renderer module) pass `presetWind3()` instead: Wind4 registers
1818
* its theme + `--un-*` custom properties via `@property { inherits: false }`
1919
* and keeps them in a document `:root {}` block, neither of which reaches a
20-
* shadow tree - so its `color-mix(var(--colors-*))` utilities resolve to
20+
* shadow tree, so its `color-mix(var(--colors-*))` utilities resolve to
2121
* nothing there. Wind3 bakes the same `@antfu/design` semantic utilities to
2222
* concrete `rgb()` + `.dark` variants, which are self-contained inside a
2323
* shadow root.
@@ -27,9 +27,9 @@ export interface CreateDesignConfigOptions {
2727

2828
/**
2929
* Shared devframe UnoCSS base. Every plugin and example composes `@antfu/design`
30-
* the same way - its preset (tuned to devframe's sage green) over a Wind base,
30+
* the same way: its preset (tuned to devframe's sage green) over a Wind base,
3131
* Phosphor icons, DM Sans/Mono web fonts, and the directive/variant-group
32-
* transformers - so the surfaces look and feel like one product across
32+
* transformers, so the surfaces look and feel like one product across
3333
* frameworks. Each app extends this via `mergeConfigs([designConfig, { … }])`
3434
* and contributes only its own extraction globs (and any safelist).
3535
*
@@ -97,7 +97,7 @@ export const designConfig = createDesignConfig()
9797
* declared, so a host page built with Wind4 registers `--un-bg-opacity` /
9898
* `--un-border-opacity` / `--un-text-opacity` (et al.) as
9999
* `@property { syntax: '<percentage>'; inherits: false }` for the whole
100-
* document - including inside our shadow tree. Our shadow CSS is Wind3, which
100+
* document, including inside our shadow tree. Our shadow CSS is Wind3, which
101101
* sets those same vars **unitless** (`--un-border-opacity: 0.13`), so the
102102
* global `<percentage>` registration makes every such declaration invalid and
103103
* the dependent `color-mix()` / `rgb(… / var(--un-*))` value collapses (a
@@ -106,9 +106,9 @@ export const designConfig = createDesignConfig()
106106
* The shadow stylesheet sets and reads these vars entirely within itself, so
107107
* renaming every `--un-` to a per-surface prefix (`--un-jr-`, `--un-hub-`)
108108
* keeps it self-consistent while making it immune to whatever the host page
109-
* registered - the renamed names are distinct properties the host's
109+
* registered, since the renamed names are distinct properties the host's
110110
* `@property --un-*` rules never match. Apply only to shadow-injected CSS
111-
* (`hub-ui` dock, `json-render-ui` renderer module) - the Vite-served SPAs own
111+
* (`hub-ui` dock, `json-render-ui` renderer module); the Vite-served SPAs own
112112
* their whole document and need no rename.
113113
*
114114
* @param css - The compiled shadow-root stylesheet.
@@ -151,15 +151,15 @@ function hexToRgbTriplet(hex: string): string | undefined {
151151
* variables `primary-ramp.css` derives from `--devframe-primary`.
152152
*
153153
* Wind3 (unlike Wind4) resolves each theme color to a literal `rgb(r g b /
154-
* <alpha>)` at compile time - the `<alpha>` slot is already dynamic (a slash
154+
* <alpha>)` at compile time, and the `<alpha>` slot is already dynamic (a slash
155155
* literal, or the utility's own `--un-*-opacity` variable), but the base `r g
156156
* b` triplet is baked in, so every `primary`-based utility (`text-primary`,
157157
* `bg-primary`, `btn-primary`, `ring-primary-500`, …) ignores
158-
* `--devframe-primary` entirely - only hand-written rules that already
158+
* `--devframe-primary` entirely; only hand-written rules that already
159159
* reference `--colors-primary-*` directly (the dock's glow gradient,
160160
* `primary-ramp.css` itself) retint. Swapping the baked triplet for `from
161161
* var(--colors-primary-<stop>, <hex>) r g b` keeps that exact alpha
162-
* mechanism intact while sourcing the base color from the variable - a
162+
* mechanism intact while sourcing the base color from the variable, so a
163163
* rebrand's `--devframe-primary` now reaches every baked utility too.
164164
*
165165
* Call once per generated pass, after `generator.generate(...)`, passing the

‎docs/app/app.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ export default defineAppConfig({
134134
},
135135
llms: {
136136
description:
137-
'Framework-neutral foundation for building devtools - one definition becomes a Web Standard handler, a CLI, a static report, an MCP server, or a hub dock.',
137+
'Framework-neutral foundation for building devtools: one definition becomes a Web Standard handler, a CLI, a static report, an MCP server, or a hub dock.',
138138
},
139139
schemaOrg: {
140140
description:
141-
'Framework-neutral foundation for building devtools - RPC layer, hosts, and adapters.',
141+
'Framework-neutral foundation for building devtools: RPC layer, hosts, and adapters.',
142142
applicationCategory: 'DeveloperApplication',
143143
operatingSystem: 'Any',
144144
license: 'https://github.com/devframes/devframe/blob/main/LICENSE.md',

‎docs/app/components/global/GettingStartedWizard.vue‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Interactive "what should I read" wizard for the Getting Started guide.
44
*
55
* Every question is a grid of selectable cards (multiple answers allowed per
6-
* question, since a real devtool usually spans more than one answer - e.g.
7-
* it reads from both the node side and the user's web app). Selections
6+
* question, since a real devtool usually spans more than one answer: for
7+
* example, it reads from both the node side and the user's web app). Selections
88
* persist to `localStorage` so a reader can leave the page and pick up where
99
* they left off; the recommended reading list at the bottom recomputes from
1010
* whatever is currently checked.
@@ -126,22 +126,22 @@ const DOC_CATALOG: Record<string, DocEntry> = {
126126
'/guide/rpc': { title: 'RPC', description: 'Type-safe, bidirectional calls between the node side and the browser side.', icon: 'i-lucide-cable' },
127127
'/guide/shared-state': { title: 'Shared State', description: 'Observable state synced between the node side and every RPC client.', icon: 'i-lucide-refresh-cw' },
128128
'/guide/streaming': { title: 'Streaming', description: 'Push chunk-style data from the node side to the browser side.', icon: 'i-lucide-radio' },
129-
'/guide/client-assets': { title: 'Client Assets', description: 'Where a devframe\'s built SPA lives - a local directory or an npm package.', icon: 'i-lucide-folder-tree' },
129+
'/guide/client-assets': { title: 'Client Assets', description: 'Where a devframe\'s built SPA lives: a local directory or an npm package.', icon: 'i-lucide-folder-tree' },
130130
'/guide/client': { title: 'Client', description: 'Connects any surface to a devframe\'s node side with RPC and shared state.', icon: 'i-lucide-plug' },
131131
'/guide/transports': { title: 'Transports', description: 'Live RPC over WebSocket or SSE, transparent to your RPC code.', icon: 'i-lucide-waypoints' },
132132
'/guide/security': { title: 'Security', description: 'Localhost binding and a trust handshake before a browser can call RPC.', icon: 'i-lucide-shield-check' },
133133
'/guide/agent-native': { title: 'Agent-Native Devframe', description: 'Expose RPC functions, resources, and shared state to coding agents over MCP.', icon: 'i-lucide-bot' },
134-
'/guide/hub': { title: 'Hub', description: 'Orchestrate many devtools sharing one UI - docks, terminals, messages, commands.', icon: 'i-lucide-layout-dashboard' },
134+
'/guide/hub': { title: 'Hub', description: 'Orchestrate many devtools sharing one UI: docks, terminals, messages, commands.', icon: 'i-lucide-layout-dashboard' },
135135
'/guide/client-context': { title: 'Client Scripts & Client Context', description: 'How a dock client script runs a devframe\'s code inside the host page.', icon: 'i-lucide-code' },
136136
'/guide/hub-initiate': { title: 'Serve a Hub Anywhere', description: 'initHub() serves a whole multi-devframe install from one handler.', icon: 'i-lucide-server-cog' },
137137
'/guide/services': { title: 'Cross-Devframe Services', description: 'Expose a typed, namespaced capability to every devframe in a hub.', icon: 'i-lucide-share-2' },
138138
'/guide/deep-linking': { title: 'Deep Linking', description: 'Send a user to a specific view inside a devframe from a URL or an agent.', icon: 'i-lucide-link' },
139-
'/guide/json-render': { title: 'JSON-Render', description: 'Describe a UI as data - a serializable component spec any frontend renders.', icon: 'i-lucide-braces' },
139+
'/guide/json-render': { title: 'JSON-Render', description: 'Describe a UI as data: a serializable component spec any frontend renders.', icon: 'i-lucide-braces' },
140140
'/guide/build-your-own-json-render-frontend': { title: 'Build Your Own JSON-Render Frontend', description: 'Implement the renderer contract in your own framework instead of the reference one.', icon: 'i-lucide-component' },
141-
'/guide/build-your-own-hub-ui': { title: 'Build Your Own Hub UI', description: 'The two contracts a hub UI provider implements - node side and browser side.', icon: 'i-lucide-layout-panel-left' },
141+
'/guide/build-your-own-hub-ui': { title: 'Build Your Own Hub UI', description: 'The two contracts a hub UI provider implements: node side and browser side.', icon: 'i-lucide-layout-panel-left' },
142142
'/guide/standalone-cli': { title: 'Standalone CLI with Devframe', description: 'npx my-tool starts a dev server serving your SPA over type-safe RPC.', icon: 'i-lucide-terminal' },
143143
'/references/interactive-auth': { title: 'Interactive Auth', description: 'An OTP auth layer over devframe\'s node-side primitives.', icon: 'i-lucide-key-round' },
144-
'/references/utilities': { title: 'Utilities', description: 'Small, stable helpers bundled into devframe - no npm install.', icon: 'i-lucide-wrench' },
144+
'/references/utilities': { title: 'Utilities', description: 'Small, stable helpers bundled into devframe, no npm install.', icon: 'i-lucide-wrench' },
145145
'/adapters': { title: 'Adapters', description: 'Every path from a DevframeDefinition to a running devframe.', icon: 'i-lucide-shuffle' },
146146
'/adapters/initiate': { title: 'The Standard Handler', description: 'initDevframe() turns a definition into a Web Standard Request → Response handler.', icon: 'i-lucide-server' },
147147
'/adapters/cac': { title: 'CLI (cac)', description: 'A cac CLI around a DevframeDefinition with dev, build, and mcp commands.', icon: 'i-lucide-square-terminal' },

0 commit comments

Comments
 (0)