diff --git a/.gitignore b/.gitignore index 6754135..704b117 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ !extensions/ !extensions/** !README.md +!README.adoc !CHANGELOG.md !LICENSE !package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6ebe3..1a721ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,15 @@ ## Unreleased +### Added + +- **Antora docs** — `docs/antora.yml` and AsciiDoc pages under `docs/modules/ROOT/` for the Dev-Centr docs portal; changelog index with detail pages. +- **README.adoc** — primary readme with Docs | Dev-Centr badge; `README.md` retained for GitHub/npm rendering. + ### Changed - Repository transferred from `AMDphreak/code-lens` to [`dev-centr/code-lens`](https://github.com/dev-centr/code-lens). Live demo: [dev-centr.github.io/code-lens](https://dev-centr.github.io/code-lens/). +- Flat `docs/*.md` guides migrated to AsciiDoc; links in README and demo README point at `docs.devcentr.org/code-lens/`. ## [0.3.13] - 2026-05-29 diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..394f848 --- /dev/null +++ b/README.adoc @@ -0,0 +1,114 @@ +ifndef::env-github[:icons: font] +:toc: preamble +:toclevels: 2 +:sectanchors: + +ifndef::env-github[] +image:https://img.shields.io/github/contributors/dev-centr/code-lens.svg?style=for-the-badge[Contributors,link=https://github.com/dev-centr/code-lens/graphs/contributors] +image:https://img.shields.io/github/forks/dev-centr/code-lens.svg?style=for-the-badge[Forks,link=https://github.com/dev-centr/code-lens/network/members] +image:https://img.shields.io/github/stars/dev-centr/code-lens.svg?style=for-the-badge[Stars,link=https://github.com/dev-centr/code-lens/stargazers] +image:https://img.shields.io/github/issues/dev-centr/code-lens.svg?style=for-the-badge[Issues,link=https://github.com/dev-centr/code-lens/issues] +image:https://img.shields.io/github/license/dev-centr/code-lens.svg?style=for-the-badge[License,link=https://github.com/dev-centr/code-lens/blob/main/LICENSE] +image:https://img.shields.io/badge/docs-Dev--Centr-22c55e[Docs,link=https://docs.devcentr.org/code-lens/] +image:https://github.com/dev-centr/code-lens/actions/workflows/pages.yml/badge.svg[Deploy GitHub Pages,link=https://github.com/dev-centr/code-lens/actions/workflows/pages.yml] +endif::[] + +ifdef::env-github[] +image:https://img.shields.io/github/contributors/dev-centr/code-lens.svg?style=for-the-badge[Contributors] +image:https://img.shields.io/github/forks/dev-centr/code-lens.svg?style=for-the-badge[Forks] +image:https://img.shields.io/github/stars/dev-centr/code-lens.svg?style=for-the-badge[Stars] +image:https://img.shields.io/github/issues/dev-centr/code-lens.svg?style=for-the-badge[Issues] +image:https://img.shields.io/github/license/dev-centr/code-lens.svg?style=for-the-badge[License] +image:https://img.shields.io/badge/docs-Dev--Centr-22c55e[Docs | Dev-Centr] +image:https://github.com/dev-centr/code-lens/actions/workflows/pages.yml/badge.svg[Deploy GitHub Pages] +endif::[] + += code-lens + +[.text-center] +One code snippet, multiple pedagogical lenses — portable JSON5 spec and `` web component with framework adapters. + +link:https://dev-centr.github.io/code-lens/[Live demo] · +link:https://docs.devcentr.org/code-lens/[Docs | Dev-Centr] · +link:https://github.com/dev-centr/code-lens/issues[Report Bug] · +link:https://github.com/dev-centr/code-lens/issues[Request Feature] + +== About The Project + +One snippet, multiple pedagogical naming conventions — the real lens for code examples (not a metaphor). + +=== Delivery model + +*In Solid/React/Next you install a component* — e.g. `import { CodeLens } from "@code-lens/solid"`. +Under the hood one shared engine powers every framework package. + +[cols="1,1",options="header"] +|=== +| Layer | Package +| Component (your import) | `@code-lens/solid`, `@code-lens/react`, … +| Skin | `@code-lens/css` or `@code-lens/tailwind` (planned) +| Engine | `@code-lens/vanilla` + `@code-lens/core` (pulled in automatically) +|=== + +→ link:https://docs.devcentr.org/code-lens/ecosystem.html[Delivery model docs] + +== Installation + +[source,bash] +---- +pnpm install +pnpm dev # SolidJS + solid-ui demo (port 5174) +---- + +== Usage + +[source,javascript] +---- +import "@code-lens/css"; +import { createCodeLens, registerCodeLens } from "@code-lens/vanilla"; +import { parseLensBlock, parseThemes, parseUi } from "@code-lens/core"; + +registerCodeLens(); +const el = createCodeLens({ + document: parseLensBlock(blockJson5), + themes: parseThemes(themesJson5), + ui: parseUi(uiJson5), +}, "earth"); +document.body.appendChild(el); +---- + +[source,html] +---- + +---- + +`appearance`: `auto` | `light` | `dark` — independent of pedagogical color theme. + +`slotHighlight`: `plain` | `box` — rounded highlight on changeable tokens (default `plain`). + +=== Portable spec + +[cols="1,2",options="header"] +|=== +| File | Role +| link:https://github.com/dev-centr/code-lens/tree/main/spec/examples[`spec/examples/*.json5`] | Aligned token data per lens +| link:https://github.com/dev-centr/code-lens/blob/main/spec/themes.json5[`spec/themes.json5`] | Color schemes (light/dark per theme) +| link:https://github.com/dev-centr/code-lens/blob/main/spec/ui.json5[`spec/ui.json5`] | Interaction + animation +|=== + +* link:https://docs.devcentr.org/code-lens/ecosystem.html[Ecosystem / delivery model] +* link:https://docs.devcentr.org/code-lens/specification.html[Full specification] +* link:https://docs.devcentr.org/code-lens/ai-reproduction-spec.html[AI / LLM reproduction spec] +* link:https://docs.devcentr.org/code-lens/glass-lens-capabilities.html[Glass lens capabilities] +* link:https://github.com/dev-centr/code-lens/blob/main/implementations/REGISTRY.md[Implementation registry] + +== License + +MIT + +== Contact + +DevCentr.org — support@devcentr.org + +* Project: https://github.com/dev-centr/code-lens +* Site: https://dev-centr.github.io/code-lens/ diff --git a/README.md b/README.md index 55e15b0..fbab1ec 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![License][license-shield]][license-url] +[![Docs | Dev-Centr](https://img.shields.io/badge/docs-Dev--Centr-22c55e)](https://docs.devcentr.org/code-lens/) [![Deploy GitHub Pages](https://github.com/dev-centr/code-lens/actions/workflows/pages.yml/badge.svg)](https://github.com/dev-centr/code-lens/actions/workflows/pages.yml)
@@ -13,6 +14,8 @@

Live demo · + Docs | Dev-Centr + · Report Bug · Request Feature @@ -44,7 +47,7 @@ One snippet, multiple pedagogical naming conventions — the real lens for code | Skin | `@code-lens/css` or `@code-lens/tailwind` (planned) | | Engine | `@code-lens/vanilla` + `@code-lens/core` (pulled in automatically) | -→ [docs/ecosystem.md](docs/ecosystem.md) +→ [Delivery model docs](https://docs.devcentr.org/code-lens/ecosystem.html) ## Installation @@ -85,10 +88,10 @@ document.body.appendChild(el); | [`spec/themes.json5`](spec/themes.json5) | Color schemes (light/dark per theme) | | [`spec/ui.json5`](spec/ui.json5) | Interaction + animation | -- [Ecosystem / delivery model](docs/ecosystem.md) -- [Full specification](docs/specification.md) -- [AI / LLM reproduction spec](docs/ai-reproduction-spec.md) — normative porting detail -- [Glass lens capabilities](docs/glass-lens-capabilities.md) +- [Ecosystem / delivery model](https://docs.devcentr.org/code-lens/ecosystem.html) +- [Full specification](https://docs.devcentr.org/code-lens/specification.html) +- [AI / LLM reproduction spec](https://docs.devcentr.org/code-lens/ai-reproduction-spec.html) — normative porting detail +- [Glass lens capabilities](https://docs.devcentr.org/code-lens/glass-lens-capabilities.html) - [Implementation registry](implementations/REGISTRY.md) ## License diff --git a/demo/README.md b/demo/README.md index 2c58f00..4cab19b 100644 --- a/demo/README.md +++ b/demo/README.md @@ -38,6 +38,7 @@ pnpm dlx solidui-cli@latest add dialog tabs ## GitHub Pages URL -When published from the `code-lens` repository, the site is served at the repo Pages URL (e.g. `https://amdphreak.github.io/code-lens/`). The portfolio links to `https://dev-centr.github.io/code-lens/` when that custom domain is configured on the repo. +Published from the `dev-centr/code-lens` repository at **https://dev-centr.github.io/code-lens/**. +Product documentation lives on the Dev-Centr docs portal: **https://docs.devcentr.org/code-lens/**. `vite.config.ts` uses `base: "./"` so asset paths work under a subdirectory. diff --git a/demo/src/App.tsx b/demo/src/App.tsx index 67d0603..a57a783 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -84,7 +84,7 @@ export default function App() {