Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

@clearcms/storage@0.2.2

Choose a tag to compare

@slavasolutions slavasolutions released this 06 May 21:57
925a7c3

Patch Changes

  • c7b4590 Thanks @slavasolutions! - Late-2026-05-04 release batch:

    • admin — pages preview wiring (PreviewPanel in PagePageEditor, type='page' branch in /api/v1/preview); page-scoped data editor (Data tab + pageData.save action + REST extension); schemaEditor subsystem default-on; security: drop Astro's strict same-origin POST guard for single-operator network access.
    • spec — page-data meta-schema + clear:widget + clear:width extension keywords; widthFor()/widthSpan() resolvers.
    • storage — page-scoped data.json read/write/delete helpers + layout-schema loader.
    • sdkcms.page(slug).data returns parsed page-scoped data across all 4 backends (fs/REST/R2/S3).
    • create — scaffolder ships /preview.astro route and example layout schema in theme-examples/home.schema.json.

    Note: this batch was published manually before Changesets was wired up. The next release runs through the standard CI flow.

  • 590abd8 Thanks @slavasolutions! - Schema-first editor (Task 16, ADR-0020). Inverts the editor model so a schema-driven form is the canvas. TipTap moves from "always-on body" to a widget: "richtext" field type only present when the schema declares it. Two modes — form (default, 12-col grid) and article (full-canvas TipTap, opt-in for long-form prose like blog posts).

    • adminSchemaForm + 10 widgets (text, textarea, richtext, number, url, date, image, select, array, object). PageItemEditor and PagePageEditor refactored to render SchemaForm instead of a hardcoded Body tab. Empty-state CTA when a page has no layout schema. Bucket migration 0004 lifts existing page bodies into data.json (with backup) and synthesizes default schemas for posts (article mode) + pages (default layout). Schema-editor UI gets editor-mode toggle + article-mode invariant validation.
    • speceditor: "form" | "article" keyword on collection + layout schemas. widget lifted to first-class top-level (alongside legacy clear:widget). New width: "full" | "half" | "third" keyword for grid layout (defaults: text/number/url/date/select → half; textarea/richtext/array/object/image → full). Helpers: validateArticleSchema, editorModeFor, titleFor, widthFor, widthSpan.
    • sdkcms.collection(<type>).get(<slug>).data.<field> and cms.pages.get(<slug>).data.<field> shape locked across all 4 backends. Schema-shape regression tests.
    • storage — page-data fs helpers stable.
    • create — scaffolder ships an example article-mode posts.json and a form-mode home.schema.json. README + docs/integrations/astro.md document the schema-first model.