Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ versioning follows [SemVer](https://semver.org/).

## [Unreleased]

## [0.0.2-beta.2] — 2026-09-05

Ships the portable renderer, and corrects what the registry and the site were
saying about this project.

### Added

- **Window frames for a portable block**, via `renderPortable(…, { frame })`. `header` is jsray-wp's own title bar — bold filename on the left, language on the right — so a block copied from the site and a block the plugin rendered read as the same product; `macos` is the three dots; `minimal` is a hairline strip. `title` and `label` fill them, and the chrome's colours are computed from the palette with the same arithmetic the plugin's stylesheet does in `color-mix()`, rather than a second set of colours that would drift. A frame costs 490 bytes for the hairline, 750 for the title bar and 1,060 for the dots.
Expand All @@ -25,6 +30,9 @@ versioning follows [SemVer](https://semver.org/).

- **The palette fallback chain has one implementation.** `applyThemeToRoot` carried the only copy of it; `resolveToken` is now shared with the portable renderer, because two renderers resolving the same palette by two implementations is how they come to disagree about a palette that predates a token key.
- The site build ships `themes/` and the new page. The paste page fetches every palette at runtime for the same reason the Studio does — a second copy of the colours is a second thing to drift.
- **The README says what the integrations are, because npm shows this file.** The published page for `@jsray/core@0.0.2-beta.1` still lists all three as "Coming soon"; all three are public with releases, and the table now links each one and says where it can actually be installed from — which is GitHub rather than its host's directory in every case. npm freezes a package page per version, so a correction only reaches the registry by publishing.
- **`repository` and `bugs` point at the organisation's current name.** They were published as `github.com/JSRayCore/JSRay`, which still redirects — but the frozen metadata is what every tool reads, and the org name it names no longer exists.
- **The versioning doc says why Core counts its betas.** It justified the counter mechanically — `check:versions` wants it, `version_compare()` orders it — which is true and is not the reason. Core is the kernel every integration renders through, so it earns more revision rounds before `0.1.0` than anything built on it, and those land inside one patch. The integrations bump the patch each time, so a counter would say nothing.

## [0.0.2-beta.1] — 2026-08-24

Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[![npm](https://img.shields.io/npm/v/@jsray/core/beta?label=npm)](https://www.npmjs.com/package/@jsray/core)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-0.0.2--beta.1-lightgrey)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/version-0.0.2--beta.2-lightgrey)](CHANGELOG.md)
[![Channel](https://img.shields.io/badge/channel-beta-blue)](docs/versioning.md)
[![Zero deps](https://img.shields.io/badge/dependencies-0-success)](package.json)
[![Size](https://img.shields.io/badge/dist-core%20js%20%2B%20css-lightgrey)](dist/)
Expand Down Expand Up @@ -46,7 +46,7 @@ Or drop it into a page with no build step at all:
watching, pin the version instead** — every release is frozen at its own path:

```html
<script src="https://jsray.org/v/0.0.2-beta.1/jsray.js"></script>
<script src="https://jsray.org/v/0.0.2-beta.2/jsray.js"></script>
```

### Verifying what you loaded
Expand All @@ -56,15 +56,15 @@ A pinned URL says which release you asked for, not which bytes you got. Add a
hash and the browser refuses to run the file if it is not the one published:

```html
<script src="https://jsray.org/v/0.0.2-beta.1/jsray.js"
<script src="https://jsray.org/v/0.0.2-beta.2/jsray.js"
integrity="sha256-…"
crossorigin="anonymous"></script>
```

The hashes live next to the files they describe, in the same format SRI uses:

```
https://jsray.org/v/0.0.2-beta.1/integrity.json
https://jsray.org/v/0.0.2-beta.2/integrity.json
```

`crossorigin="anonymous"` is required, not optional — SRI on a cross-origin
Expand Down Expand Up @@ -107,15 +107,25 @@ JSRay is intended to be a fully open-source code rendering ecosystem: one small

> One renderer. Many places for code to shine.

Official integrations live in their own repositories, use JSRay Core by default, and stay fully usable without paid feature locks. Planned integrations:
Official integrations live in their own repositories, use JSRay Core by default, and stay fully usable without paid feature locks. The integrations:

| Integration | Repository | Status |
|---|---|---|
| WordPress plugin | `jsray-wp` | Coming soon |
| VS Code extension | `jsray-vscode` | Coming soon |
| Terminal CLI | `jsray-terminal` | Coming soon |
| WordPress plugin | [`jsray-wp`](https://github.com/jsrayorg/jsray-wp) | Public beta · not on WordPress.org yet |
| VS Code extension | [`jsray-vscode`](https://github.com/jsrayorg/jsray-vscode) | Public beta · not on the Marketplace yet |
| Terminal CLI | [`jsray-terminal`](https://github.com/jsrayorg/jsray-terminal) | Public beta · not on npm yet |
| …and more | — | Community & official adapters welcome |

Each is installable today, from GitHub rather than from its host's directory:

```sh
# Terminal CLI
npm i -g github:jsrayorg/jsray-terminal
```

- **VS Code** — download the `.vsix` from [its latest release](https://github.com/jsrayorg/jsray-vscode/releases/latest), then `code --install-extension jsray-vscode-<version>.vsix`, or **Extensions** → `…` → **Install from VSIX…**
- **WordPress** — download the `.zip` from [its latest release](https://github.com/jsrayorg/jsray-wp/releases/latest), then **Plugins → Add New → Upload Plugin**

Each repository is published as it reaches its own beta. Every integration exposes renderer adapter hooks, so a host project can swap in another renderer when it needs to.

---
Expand Down
26 changes: 18 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[![npm](https://img.shields.io/npm/v/@jsray/core/beta?label=npm)](https://www.npmjs.com/package/@jsray/core)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-0.0.2--beta.1-lightgrey)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/version-0.0.2--beta.2-lightgrey)](CHANGELOG.md)
[![Channel](https://img.shields.io/badge/channel-beta-blue)](docs/versioning.md)
[![Zero deps](https://img.shields.io/badge/dependencies-0-success)](package.json)
[![Size](https://img.shields.io/badge/dist-core%20js%20%2B%20css-lightgrey)](dist/)
Expand Down Expand Up @@ -45,7 +45,7 @@ JSRay.highlight('const x = 42;', 'js');
`jsray.org/dist/` 始终提供当前发布版本。**线上站点如果你不会持续盯着,请改用锁定版本的地址** —— 每个发布版本都固化在自己的路径下,永不变动:

```html
<script src="https://jsray.org/v/0.0.2-beta.1/jsray.js"></script>
<script src="https://jsray.org/v/0.0.2-beta.2/jsray.js"></script>
```

### 校验你加载到的东西
Expand All @@ -55,15 +55,15 @@ JSRay.highlight('const x = 42;', 'js');
哈希,浏览器在文件与发布内容不符时会直接拒绝执行:

```html
<script src="https://jsray.org/v/0.0.2-beta.1/jsray.js"
<script src="https://jsray.org/v/0.0.2-beta.2/jsray.js"
integrity="sha256-…"
crossorigin="anonymous"></script>
```

哈希就放在它所描述的文件旁边,格式与 SRI 完全一致:

```
https://jsray.org/v/0.0.2-beta.1/integrity.json
https://jsray.org/v/0.0.2-beta.2/integrity.json
```

`crossorigin="anonymous"` 是必需的,不是可选:跨源脚本的 SRI 只有在加载走
Expand All @@ -86,15 +86,25 @@ JSRay 的目标是成为完整开源的代码渲染生态:一个轻量 Core

> 一个渲染核心,让代码在不同平台中发光。

官方集成各自独立仓库,默认使用 JSRay Core,并保持完整可用,不以付费锁定基础能力。规划中的集成:
官方集成各自独立仓库,默认使用 JSRay Core,并保持完整可用,不以付费锁定基础能力。集成一览:

| 集成 | 仓库 | 状态 |
|---|---|---|
| WordPress 插件 | `jsray-wp` | 即将推出 |
| VS Code 扩展 | `jsray-vscode` | 即将推出 |
| 终端 CLI | `jsray-terminal` | 即将推出 |
| WordPress 插件 | [`jsray-wp`](https://github.com/jsrayorg/jsray-wp) | 公开测试版 · 尚未上架 WordPress.org |
| VS Code 扩展 | [`jsray-vscode`](https://github.com/jsrayorg/jsray-vscode) | 公开测试版 · 尚未上架 Marketplace |
| 终端 CLI | [`jsray-terminal`](https://github.com/jsrayorg/jsray-terminal) | 公开测试版 · 尚未发布到 npm |
| …以及更多 | — | 欢迎官方与社区适配器 |

三个集成现在都能装,只是要从 GitHub 拿,而不是各自平台的市场:

```sh
# 终端 CLI
npm i -g github:jsrayorg/jsray-terminal
```

- **VS Code** —— 从[最新 Release](https://github.com/jsrayorg/jsray-vscode/releases/latest) 下载 `.vsix`,执行 `code --install-extension jsray-vscode-<版本>.vsix`,或在 **扩展** → `…` → **从 VSIX 安装…**
- **WordPress** —— 从[最新 Release](https://github.com/jsrayorg/jsray-wp/releases/latest) 下载 `.zip`,在后台 **插件 → 安装插件 → 上传插件**

各仓库在其到达 beta 时对外公开。每个集成都开放 renderer adapter / hook,宿主项目需要时可接入其它渲染器。

---
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ one.

| Version | Security updates |
|---|---|
| 0.0.2-beta.1 | ✅ Current public beta |
| 0.0.2-beta.2 | ✅ Current public beta |
| Earlier betas | ❌ Superseded — upgrade to the current beta |
| 0.0.1-internal.∗ | ❌ Superseded by the public beta |
| Stable | Not yet released |
10 changes: 5 additions & 5 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ <h3>Documentation</h3>
<h3>Ecosystem</h3>
<ul>
<!-- Linked once the repository is public, listed until then: a footer
link to a repository that does not exist yet is a 404. jsray-wp is
out; the other two are not. -->
link to a repository that does not exist yet is a 404. All three
are out; none is on its host's own directory yet. -->
<li>WordPress · <a href="https://github.com/jsrayorg/jsray-wp"><code>jsray-wp</code></a><span class="tag tag--beta">beta</span></li>
<li class="site-footer__soon">VS Code · <code>jsray-vscode</code><span class="tag">soon</span></li>
<li class="site-footer__soon">Terminal · <code>jsray-terminal</code><span class="tag">soon</span></li>
<li>VS Code · <a href="https://github.com/jsrayorg/jsray-vscode"><code>jsray-vscode</code></a><span class="tag tag--beta">beta</span></li>
<li>Terminal · <a href="https://github.com/jsrayorg/jsray-terminal"><code>jsray-terminal</code></a><span class="tag tag--beta">beta</span></li>
<li><a href="https://github.com/jsrayorg/jsray/blob/main/docs/projects.md">How integrations work</a></li>
</ul>
</div>
Expand All @@ -357,7 +357,7 @@ <h3>Project</h3>
</div>

<div class="site-footer__base">
<p>© 2026 JSRay · MIT · <code data-jsray-version>0.0.2-beta.1</code></p>
<p>© 2026 JSRay · MIT · <code data-jsray-version>0.0.2-beta.2</code></p>
<p>Made by Jie</p>
</div>
</footer>
Expand Down
6 changes: 3 additions & 3 deletions demo/studio.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ <h3>Ecosystem</h3>
<!-- Listed, not linked: each repository opens at its own beta, and a
footer link to a repository that does not exist yet is a 404. -->
<li>WordPress · <a href="https://github.com/jsrayorg/jsray-wp"><code>jsray-wp</code></a><span class="tag tag--beta">beta</span></li>
<li class="site-footer__soon">VS Code · <code>jsray-vscode</code><span class="tag">soon</span></li>
<li class="site-footer__soon">Terminal · <code>jsray-terminal</code><span class="tag">soon</span></li>
<li>VS Code · <a href="https://github.com/jsrayorg/jsray-vscode"><code>jsray-vscode</code></a><span class="tag tag--beta">beta</span></li>
<li>Terminal · <a href="https://github.com/jsrayorg/jsray-terminal"><code>jsray-terminal</code></a><span class="tag tag--beta">beta</span></li>
<li><a href="https://github.com/jsrayorg/jsray/blob/main/docs/projects.md">How integrations work</a></li>
</ul>
</div>
Expand All @@ -112,7 +112,7 @@ <h3>Project</h3>
</div>

<div class="site-footer__base">
<p>© 2026 JSRay · MIT · <code data-jsray-version>0.0.2-beta.1</code></p>
<p>© 2026 JSRay · MIT · <code data-jsray-version>0.0.2-beta.2</code></p>
<p>Made by Jie</p>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion dist/jsray.js
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@
* Runtime version, for shell/core compatibility negotiation.
* Must match version.json — tools/check-versions.mjs asserts it.
*/
version: '0.0.2-beta.1',
version: '0.0.2-beta.2',
languages: G,
normalizeLanguage,
detectLanguage,
Expand Down
15 changes: 9 additions & 6 deletions docs/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ Core changes flow into plugin repositories by copying or packaging `dist/` asset

## Repository Split

| Repository | Ships as | Licence | State |
| Repository | Intended channel | Licence | Available from today |
|---|---|---|---|
| `jsray` | npm `@jsray/core` | MIT | public |
| `jsray-wp` | WordPress.org plugin | GPLv2 or later | public |
| `jsray-terminal` | npm CLI | MIT | not published yet |
| `jsray-vscode` | VS Code Marketplace | MIT | not published yet |
| `jsray` | npm `@jsray/core` | MIT | npm — `@jsray/core@0.0.2-beta.2` |
| `jsray-wp` | WordPress.org plugin | GPLv2 or later | GitHub release zip · not on WordPress.org yet |
| `jsray-terminal` | npm CLI | MIT | GitHub — `npm i -g github:jsrayorg/jsray-terminal` · not on npm yet |
| `jsray-vscode` | VS Code Marketplace | MIT | GitHub release `.vsix` · not on the Marketplace yet |

A public repository is not a listing. The last column is where a user can
actually get the thing today; the second is where it is headed.

Future platform repositories such as `jsray-react`, `jsray-astro`, or
`jsray-mdx` if needed.
Expand All @@ -91,7 +94,7 @@ The public website keeps the brand concentrated under `jsray.org`:
moves on every release, which is right for the demo and wrong for a site
nobody is watching.
- `https://jsray.org/v/<version>/`: the same files frozen per release
(`jsray.org/v/0.0.2-beta.1/jsray.js`). A page that pins here keeps rendering
(`jsray.org/v/0.0.2-beta.2/jsray.js`). A page that pins here keeps rendering
the way it did the day it was written.

`tools/build-site.sh` emits both. Cloudflare replaces the whole asset bundle on
Expand Down
10 changes: 6 additions & 4 deletions docs/projects.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ Core 的变更通过拷贝或打包 `dist/` 资产流向插件仓库。插件的
| 仓库 | 交付形态 | 许可 | 状态 |
|---|---|---|---|
| `jsray` | npm `@jsray/core` | MIT | 已公开 |
| `jsray-wp` | WordPress.org 插件 | GPLv2 or later | 已公开 |
| `jsray-terminal` | npm CLI | MIT | 尚未发布 |
| `jsray-vscode` | VS Code Marketplace | MIT | 尚未发布 |
| `jsray-wp` | WordPress.org 插件 | GPLv2 or later | GitHub Release 的 zip · 尚未上架 WordPress.org |
| `jsray-terminal` | npm CLI | MIT | GitHub —— `npm i -g github:jsrayorg/jsray-terminal` · 尚未发布到 npm |
| `jsray-vscode` | VS Code Marketplace | MIT | GitHub Release 的 `.vsix` · 尚未上架 Marketplace |

仓库公开不等于已上架。最后一列是**今天用户实际能从哪里拿到**,第二列是它将来要去的地方。

未来按需增加的平台仓库,例如 `jsray-react`、`jsray-astro`、`jsray-mdx`。

Expand All @@ -87,7 +89,7 @@ GPLv2 or later,因为 WordPress.org 的第一条指南接受任何 GPL 兼容许
(`jsray.org/dist/jsray.js`、`jsray.org/dist/themes/<name>.css`)。这个路径每次
发版都会变 —— 对演示页是对的,对没人盯着的站点是错的。
- `https://jsray.org/v/<version>/`:同样的文件按版本固化
(`jsray.org/v/0.0.2-beta.1/jsray.js`)。锁定到这里的页面,今天怎么渲染,
(`jsray.org/v/0.0.2-beta.2/jsray.js`)。锁定到这里的页面,今天怎么渲染,
以后还怎么渲染。

`tools/build-site.sh` 两者都生成。Cloudflare 每次部署都会整体替换资产包,因此
Expand Down
16 changes: 11 additions & 5 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

JSRay Core uses single-project versioning. Platform plugins keep their own version files in their own repositories.

Current version: `0.0.2-beta.1`
Current version: `0.0.2-beta.2`
Current channel: `beta`
Public beta released: yes

Expand All @@ -22,12 +22,18 @@ Internal test builds may be shared privately, but they should not be described a

### The ladder

Each beta bumps the **patch**; the counter after it exists because
`check:versions` requires it and because `version_compare()` is what orders
these — string order would put `0.0.10` before `0.0.2`.
Each beta bumps the **patch**, and Core alone keeps a counter after it. That is
not a notation preference: Core is the kernel every integration renders through,
so it earns more revision rounds before `0.1.0` than anything built on top of it,
and those rounds land within a single patch. The integrations do not iterate that
way, so they carry no counter.

The mechanics follow from that: `check:versions` requires the counter here, and
`version_compare()` is what orders these — string order would put `0.0.10` before
`0.0.2`.

```
0.0.1-beta.1 … 0.0.1-beta.5 → 0.0.2-beta.1 → 0.0.3-beta.1 → … → 0.1.0
0.0.1-beta.1 … 0.0.1-beta.5 → 0.0.2-beta.1 → 0.0.2-beta.2 → 0.0.3-beta.1 → … → 0.1.0
```

The `0.0.1` line closed at beta.5. `0.1.0` is where the beta label comes off,
Expand Down
12 changes: 8 additions & 4 deletions docs/versioning.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

JSRay Core 采用单项目版本号。平台插件在各自仓库里维护自己的版本文件。

当前版本:`0.0.2-beta.1`
当前版本:`0.0.2-beta.2`
当前通道:`beta`
公开测试版已发布:是

Expand All @@ -22,11 +22,15 @@ JSRay Core 是独立的 JavaScript 原生代码渲染内核。平台插件(包

### 版本阶梯

每个 beta 递增**补丁号**;后面那个计数器保留,一是 `check:versions` 强制要求,
二是排序用的是 `version_compare()` —— 字符串排序会把 `0.0.10` 排在 `0.0.2` 前面。
每个 beta 递增**补丁号**,而计数器只有 Core 保留。这不是记法偏好:Core 是所有集成
共同依赖的内核,进入 `0.1.0` 之前理应比任何建在它之上的东西经历更多轮修订,而那些
轮次落在同一个补丁号之内。各集成不这样迭代,所以不带计数器。

机制上的理由随之而来:`check:versions` 在这里强制要求它,排序用的是
`version_compare()` —— 字符串排序会把 `0.0.10` 排在 `0.0.2` 前面。

```
0.0.1-beta.1 … 0.0.1-beta.5 → 0.0.2-beta.1 → 0.0.3-beta.1 → …… → 0.1.0
0.0.1-beta.1 … 0.0.1-beta.5 → 0.0.2-beta.1 → 0.0.2-beta.2 → 0.0.3-beta.1 → …… → 0.1.0
```

`0.0.1` 这条线在 beta.5 结束。`0.1.0` 才是脱掉 beta 标签的地方,因此 `0.0.1`
Expand Down
4 changes: 2 additions & 2 deletions integrity.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"project": "jsray",
"version": "0.0.2-beta.1",
"version": "0.0.2-beta.2",
"algorithm": "sha256",
"note": "Base64 SHA-256 digests of the released Core assets. Integrations copy the relevant digest at sync time and verify their bundled snapshot against it.",
"files": {
"dist/jsray.js": "sha256-x180Gx5SNG9mcOdUrW8pyDkuoGV6MY4VB2caqu1Jd44=",
"dist/jsray.js": "sha256-FAodgz8GT5uEr//Gd7lY6pbSBtbIZzzYHIitDfEqkVg=",
"dist/jsray.css": "sha256-6Fuva+aZwCcmltNi2oN+1yWIJoKE+1rLpUxZvD9iutc=",
"dist/themes/aurora.css": "sha256-S8X+R8XZNC8WRdHOen839zMkPxVFol6PPTrpZibbeJA=",
"dist/themes/default.css": "sha256-vENOigRjwn1hW6wPjdM4tbZ58Ja44FMsa+akavPiMSI=",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsray/core",
"version": "0.0.2-beta.1",
"version": "0.0.2-beta.2",
"description": "JavaScript-native code rendering kernel with 23-class token semantics and pluggable themes.",
"author": "Jie <jie@jsray.org>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/jsray.js
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@
* Runtime version, for shell/core compatibility negotiation.
* Must match version.json — tools/check-versions.mjs asserts it.
*/
version: '0.0.2-beta.1',
version: '0.0.2-beta.2',
languages: G,
normalizeLanguage,
detectLanguage,
Expand Down
Loading
Loading