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
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Normalise line endings on checkin so the repo never accumulates CRLF again.
* text=auto eol=lf

# Source must stay UTF-8 without BOM. The box-drawing separators in comments and
# CSS section headers were corrupted twice by editors round-tripping through
# cp1252; declaring the encoding stops git from re-encoding on checkout.
*.ts text eol=lf working-tree-encoding=UTF-8
*.tsx text eol=lf working-tree-encoding=UTF-8
*.css text eol=lf working-tree-encoding=UTF-8
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf

# Never normalise binaries.
*.png binary
*.jpg binary
*.ico binary
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- run: npm ci

# Order matters: typecheck is the cheapest gate and catches the class of
# bug (a silently overwritten JSX prop) that reached a release before.
- name: Typecheck
run: npm run typecheck

- name: Test
run: npm test

- name: Build
run: npm run build

# Guards the two things that have regressed more than once: CRLF creeping
# back in, and UTF-8 comments being re-encoded through cp1252.
- name: Check encoding and line endings
run: npm run check:encoding
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags: ['v*']

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org

- run: npm ci

- run: npm run typecheck
- run: npm test
- run: npm run build

- run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Changelog

All notable changes to this project are documented in this file.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.2.0 - 2026-09-03

### Added

- Live Preview panel — shows each field's label, placeholder, and resolved data-access slug while designing a block
- Layout fields — Row, Tabs, Collapsible, Group, Array — nestable and drillable
- JSON Import/Export for block schemas
- Version history with restore
- Concurrency-safe version publishing (no more duplicate version numbers under concurrent publishes)
- CSRF protection on internal API endpoints
- Reserved field-name and slug format validation
- Automated test suite (114 tests) with coverage thresholds and CI
- Admin UX improvements — nav sidebar shortcut, "Edit in Builder" button, clickable breadcrumbs

### Fixed

- Generated code for Tabs/Row/Collapsible fields was broken or failed to type-check
- Generated field types now correctly map to Payload's vocabulary (richText, upload, select, etc.)
- Various validation, duplicate-ID, and stale-state bugs in the builder
- Security fix: SSRF/host-confusion vulnerability in the `fast-uri` dependency
- Cleaned up stray encoding corruption across source files

### Changed

- Unified internal field-type system with the validation schema
- Renamed internal `relationTo` property to `collection`
- Replaced `radio`/`upload` with `richtext`/`image`/`file` in the palette
- Removed the `uuid` dependency in favor of `crypto.randomUUID()`

## 0.1.0 - 2026-06-19

- Initial release
- `init` CLI: auto-detects app dir, injects plugin config, admin field CSS, Postgres/SQLite-aware next steps
- Auth guard on the generated Block Builder layout
- Admin field CSS auto-injection, automatic nav link injection, `BlockDataField`/`BlockVersionSync` admin components
- README overhaul and canvas fixes
- Removed the Tailwind dependency from `builder.css`
- Fixed source-encoding corruption, `repository` URL format, and author/license info
Loading
Loading