open-index/open-npm huggingface dataset:
npm package: @openuji/solospec
Description: Static HTML renderer for Speculator AST runtime
Latest version: 0.3.1

# @openuji/solospec

Static HTML renderer for Speculator AST without Astro.

`@openuji/solospec` is designed for CI-friendly single-document publishing flows.

## Install

```bash
pnpm add @openuji/solospec @openuji/speculator
```

## Vite Plugin (Package-Owned Theme)

`solospecPlugin` injects everything required for rendering:

- spec HTML wrapped in `.solospec-root`
- bikeshed theme CSS (from `@openuji/solospec`, no host CSS import)
- runtime mode handling (`system | light | dark`) with persisted preference
- optional built-in mode switcher

```ts
import { defineConfig } from "vite";
import { solospecPlugin } from "@openuji/solospec/vite";

export default defineConfig({
  plugins: [
    solospecPlugin({
      entry: "spec/index.md",
      configPath: "spec/config.json",
      theme: {
        name: "bikeshed",
      },
    }),
  ],
});
```

Theme config contract:

```ts
type SolospecThemeSettings = {
  name?: "bikeshed";
};
```

Defaults and schema are exported:

- `DEFAULT_SOLOSPEC_THEME_SETTINGS`
- `SOLOSPEC_THEME_SETTINGS_SCHEMA`
- `resolveSolospecThemeSettings(...)`

## Client Runtime

If a document contains diagram nodes like Mermaid or LikeC4, `solospec` will automatically inject standard ES module `import` scripts into the final HTML.
Consumers are expected to process the resulting HTML file through a bundler like Vite. The target application must install the peer dependencies:

```bash
pnpm add -D vite @likec4/core likec4 mermaid react react-dom
```

## Theme Tokens (DTCG + Tailwind v4)

Theme design values live in DTCG token files, grouped per theme:

```text
tokens/
  themes/
    bikeshed/
      color.json
      spacing.json
      typography.json
      radius.json
      shadow.json
      motion.json
      size.json
```

Token build output is generated into:

```text
src/styles/generated/themes/<theme>.tokens.css
```

Theme CSS files import their generated token file first, then Tailwind v4:

```css
@import "../generated/themes/bikeshed.tokens.css";
@import "tailwindcss";
```

Commands:

```bash
pnpm run tokens       # generate token css from DTCG files
pnpm run build:styles # regenerate tokens and compile theme css
```
npm package: @openuji/speculator-lint
Description: Standalone linter for Speculator workspace AST with configurable validation rules
Latest version: 0.3.8

# @openuji/speculator-lint

**Developer-grade linting for technical specifications.**

`speculator-lint` helps ensure conceptual consistency and semantic integrity in your technical specifications. It catches errors like redefinitions across spec levels, reverse dependencies, and ambiguous references.

## 📖 Documentation

For full documentation on available rules, configuration presets, and extensibility, please visit the [Speculator Documentation](https://speculator.pages.dev/qa/linter).

## 🚀 Quick Start

```bash
# Install
pnpm add -D @openuji/speculator-lint

# Lint your workspace
speculator-lint workspace.json
```

### Basic Config (`.speculatorlintrc.json`)

```json
{
  "extends": ["recommended"]
}
```

---

Part of the [Speculator](https://github.com/openuji/speculator) ecosystem.
npm package: @openuji/speculator-search
Description: Search index builder for Speculator with content mapping and navigation support
Latest version: 0.3.8

# @openuji/speculator-search

**Build-time search indexing for serverless, instant navigation.**

`speculator-search` extracts searchable content from [Speculator documents](../speculator) and generates static JSON indexes. This allows spec readers to find what they need instantly, without requiring a backend search server.

## 🔍 Features

- **Full-Text Indexing**: Extracts text from paragraphs, headings, and definitions.
- **Context-Aware Results**: Search results include section titles and node types for better relevance.
- **Zero Runtime Dependencies**: The generated index is pure JSON, compatible with any client-side search library (like FlexSearch).
- **Hierarchical IDs**: Automatically generates stable navigation anchors even if the source document lacks IDs.

## 🚀 Usage

### 1. Build the Index (Node.js)

```typescript
import { buildSearchIndex } from "@openuji/speculator-search";

const searchIndex = buildSearchIndex(workspace);
await fs.writeFile("public/search-index.json", JSON.stringify(searchIndex));
```

### 2. Search (Browser)

```javascript
const response = await fetch("/search-index.json");
const index = await response.json();

// Direct search across all documents
const results = index.documents
  .flatMap((doc) => doc.entries)
  .filter((e) => e.plainText.includes("your query"));
```

---

Part of the [Speculator](../../README.md) ecosystem.