Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5ba2ab4
feat(spec,lint): a page gains an optional print declaration and the p…
claude Oct 8, 2026
6759c50
feat(spec): the list-export pdf prescription points at the print page…
claude Oct 8, 2026
864eccb
feat(spec)!: retire the zero-reader document family whole (DocumentTe…
claude Oct 8, 2026
a7e7860
chore(spec): regenerate the surface, docs and ledger artifacts for th…
claude Oct 8, 2026
206aa8c
chore(changeset): the print page, the printable block subset and the …
claude Oct 8, 2026
ff98604
Merge remote-tracking branch 'origin/main' into claude/issue-22158-pr…
claude Oct 8, 2026
7812db5
chore(spec): regenerate the references index on the merged tree
claude Oct 8, 2026
3e14620
fix(spec): spell the cited objectui pin sha in backticks in the retir…
claude Oct 8, 2026
e05df7f
fix(spec): record the print key's form omission and keep the page-typ…
claude Oct 8, 2026
4d7a5df
docs: the quick reference drops the retired data/document row (16 of …
claude Oct 8, 2026
d4b4284
docs: the CLI transcripts print 50 author-time rules (validatePrintPa…
claude Oct 8, 2026
8395484
fix(spec,metadata-protocol): print is refused on a utility page; the …
claude Oct 8, 2026
9077995
chore(spec): regenerate the page reference for the print describe nam…
claude Oct 8, 2026
0b96e61
test(spec): the isomorphic pin count is 773 — PagePrintSchema's pin, …
claude Oct 8, 2026
bf3359d
Merge remote-tracking branch 'origin/main' into claude/issue-22158-pr…
claude Oct 8, 2026
5f68ebe
chore(spec): regenerate the page reference on the merged tree
claude Oct 8, 2026
9f9fa3d
chore(changeset): grade the document-family retirement major under Ch…
claude Oct 8, 2026
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
64 changes: 64 additions & 0 deletions .changeset/22158-print-page-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
'@objectstack/spec': major
'@objectstack/lint': minor
---

feat(spec)!: a `page` gains an optional `print` declaration and a linted printable block subset; the list-export `'pdf'` prescription points at the print page; the zero-reader document schemas retire whole (#22158)

Clause-②: yes (narrowing)

<!-- adr-0087: registered document-schemas-retired -->

**BREAKING** — the document family's exports leave `@objectstack/spec/data` (an export removal on a published entry), graded `major` on `@objectstack/spec`: Changesets is in pre mode on `main` (tag `next`), where the launch-window `major` guard stands aside for the line's breaking changes, so the level says what the change is. The v18 opening marker already takes the fixed group to `18.0.0-next.N`, so this grade moves no version on its own. `@objectstack/lint` is `minor`: its new rule refuses blocks only inside a page that declares `print`, which no page could carry before this release, and it adds exports. The `print` declaration itself is additive.

Card ① of the ruling on PDF and print documents (letter B′): **a document is a page with a print declaration; there is no separate template type.**

### The print page (additive)

`PageSchema` gains an optional, closed `print` block. Its presence makes the page a print page — a document (an invoice, a delivery order, a letter, a report) authored in the page's own blocks:

```ts
definePage({
name: 'invoice_print',
label: 'Invoice',
type: 'record',
object: 'invoice',
regions: [
{ name: 'header', components: [{ type: 'element:image', properties: { src: '/logo.png', alt: 'ACME' } }] },
{ name: 'main', components: [
{ type: 'record:details', properties: { fields: ['customer', 'invoice_date'] } },
{ type: 'record:line_items', properties: { childObject: 'invoice_line', relationshipField: 'invoice', columns: [{ name: 'description' }, { name: 'amount' }] } },
] },
{ name: 'footer', components: [{ type: 'element:text', properties: { content: 'Payment due within 30 days.' } }] },
],
print: { paperSize: 'A4', orientation: 'portrait', margins: { top: 15, bottom: 15 }, repeatHeader: true, repeatFooter: true, pageNumbers: true },
});
```

- **Keys** (`PagePrintSchema`): `paperSize` (`A4` | `A5` | `Letter` | `Legal`), `orientation` (`portrait` | `landscape`), `margins` (`{ top, right, bottom, left }` in millimetres), `repeatHeader` / `repeatFooter` (repeat the page's own `header` / `footer` region on every sheet), `pageNumbers`, and the page-break hints `repeatTableHeaders` and `avoidBreakInside`. Each maps to print CSS (`@page`, `thead { display: table-header-group }`, `break-inside`).
- **Not yet rendered.** Nothing applies these keys until the console's print rendering lands; the liveness ledger carries `print` as `planned` with an author warning, so `os validate` tells an author who writes it that the layout is validated but not yet applied.
- **Refused at the parse** (`checkPagePrintComposition`, exported for `.shape` mirrors): `print` on a `slotted` page, on an `html` / `jsx` / `react` page, on a `list` or `utility` page (a print page is a `record`, `home` or `app` page), on a `full` page with no `regions`, and `repeatHeader` / `repeatFooter` on a page with no region of that name.
- **The printable block subset** (`PRINTABLE_PAGE_COMPONENT_TYPES`, with the reason for every other vocabulary type in `PRINT_REFUSED_PAGE_COMPONENT_TYPES`): `page:section`, `page:card`, `page:footer`, `record:details`, `record:highlights`, `record:line_items`, `element:text`, `element:image`, `element:divider`, `element:definition-list`, `element:repeater`, `element:number` and `object-metric`. Inside a print page any other block — one that pages or windows its rows (`object-grid`, `record:related_list`), one that lays itself out to the screen (`page:sidebar`, `object-kanban`, `object-calendar`), or one with nothing printable (controls, inputs, shell chrome, `page:tabs`) — is refused by `@objectstack/lint`'s new gating rule `print-page-block-unprintable` (`validatePrintPageBlocks`), on `os validate`, `os build`, `os lint` and the page save door.

### The list-export prescription

`'pdf'` stays refused in `view.exportOptions` formats. The refusal no longer says "PDF export itself was declined as NOT PLANNED" — no longer true — and instead names the view's `allowPrinting` for printing a list and a page that declares `print` for a document.

### FROM → TO (the retirement)

`DocumentTemplateSchema`, `DocumentSchema`, `ESignatureConfigSchema` and the orphaned `DocumentVersionSchema` (`data/document.zod.ts`) are removed from `@objectstack/spec/data`, with their type aliases (`DocumentTemplate`, `DocumentTemplateParsed`, `Document`, `DocumentParsed`, `ESignatureConfig`, `ESignatureConfigParsed`, `DocumentVersion`, `DocumentVersionParsed`). No code in this repository, objectui or hotcrm read them.

| before | what to write instead |
| --- | --- |
| `DocumentTemplateSchema` (a docx template with placeholders) | a `page` that declares `print`, its body drawn from the printable block subset |
| `DocumentSchema` / `DocumentVersionSchema` | nothing — no document store ever kept them; a document record is ordinary object data, its files `sys_file` attachments |
| `ESignatureConfigSchema` | nothing — no e-signature integration exists |

**The one-line fix: delete the import; author a printable document as a page with a `print` block.** Every such import is TS2305 after upgrade. `data/DocumentSchemaValidation` (the NoSQL driver's block) is unaffected. `os migrate meta --from 17` lists the delegated step (D3 `document-schemas-retired`); there is no mechanical edit, since no stack collection ever carried these shapes.

### The retirement kit

- `RETIRED_DEFS_BY_MAJOR[18]`: `data/DocumentTemplate`, `data/Document`, `data/ESignatureConfig`, `data/DocumentVersion`; D3 semantic entry `document-schemas-retired`, with a step-18 rationale fragment. The `ESignatureConfig` deadline-key entries in `RETIRED_KEYS_BY_MAJOR[18]` stay as history.
- No tombstone and no D2 conversion: none of the schemas is a stack collection member or a metadata type, so a conversion would have no seam that runs.
- Generated: `json-schema.manifest/data.json` −4 defs, `authorable-surface/data.json` −30 rows, `authorable-defaults/data.json` −2, the api-surface / declaration-map / export-origins shards, the `data/document` reference page removed.
- Pin: `src/data/document-schemas-retirement.test.ts`, a tree-scoped absence walk over the declared radius.
2 changes: 1 addition & 1 deletion content/docs/deployment/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ os compile --json # JSON output for CI pipelines
→ Normalizing stack definition...
→ Lowering inline handlers...
→ Validating protocol compliance...
→ Running author-time rules (49)...
→ Running author-time rules (50)...
→ Checking that every required capability has a provider installable in this edition...
→ Collecting package docs (ADR-0046)... 0 collected
→ Writing artifact...
Expand Down
2 changes: 1 addition & 1 deletion content/docs/deployment/validating-metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ A clean run walks the registry and reports timing:
Config: /path/to/support-desk/objectstack.config.ts
Load time: 21ms
→ Validating against ObjectStack Protocol...
→ Running author-time rules (49)...
→ Running author-time rules (50)...
→ Checking that every required capability has a provider installable in this edition...
→ Checking package docs (ADR-0046)...
Expand Down
2 changes: 1 addition & 1 deletion content/docs/getting-started/build-with-claude-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ visible: 'status != "resolved"'
◆ Validate
────────────────────────────────────────
→ Validating against ObjectStack Protocol...
→ Running author-time rules (49)...
→ Running author-time rules (50)...

✗ Author-time rules failed (1 issue)
• stack · action 'resolve_ticket' visible: bare reference `status` — a
Expand Down
3 changes: 1 addition & 2 deletions content/docs/getting-started/quick-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Categories that have no section here at all are named under
[Categories Without a Section](#categories-without-a-section) — that curation is stated,
not left implicit.

## Data Protocol (16 of 30 schemas)
## Data Protocol (15 of 29 schemas)

Core business logic and data modeling schemas.

Expand All @@ -41,7 +41,6 @@ Core business logic and data modeling schemas.
| **[Driver](/docs/references/data/driver)** | `driver.zod.ts` | Driver, DriverCapabilities | Database driver interface |
| **[SQL Driver](/docs/references/data/driver-sql)** | `driver-sql.zod.ts` | SQLDriverConfig, SQLDialect | SQL-specific driver |
| **[NoSQL Driver](/docs/references/data/driver-nosql)** | `driver-nosql.zod.ts` | NoSQLDriverConfig | NoSQL-specific driver |
| **[Document](/docs/references/data/document)** | `document.zod.ts` | Document | Document-oriented data |
| **[Postgres Driver](/docs/references/data/driver-postgres)** | `driver/postgres.zod.ts` | PostgresConfig | PostgreSQL configuration |
| **[Mongo Driver](/docs/references/data/driver-mongo)** | `driver/mongo.zod.ts` | MongoConfig | MongoDB configuration |

Expand Down
150 changes: 0 additions & 150 deletions content/docs/references/data/document.mdx

This file was deleted.

3 changes: 1 addition & 2 deletions content/docs/references/data/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Data Protocol — complete schema reference
navTitle: Data Protocol
description: "The ObjectStack Data Protocol in 30 reference pages: every schema in @objectstack/spec with its properties, types, defaults and a TypeScript example."
description: "The ObjectStack Data Protocol in 29 reference pages: every schema in @objectstack/spec with its properties, types, defaults and a TypeScript example."
---

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
Expand All @@ -14,7 +14,6 @@ This section contains all protocol schemas for the data layer of ObjectStack.
<Card href="/docs/references/data/data-engine" title="Data Engine" description="Source: packages/spec/src/data/data-engine.zod.ts" />
<Card href="/docs/references/data/datasource" title="Datasource" description="Source: packages/spec/src/data/datasource.zod.ts" />
<Card href="/docs/references/data/date-macros" title="Date Macros" description="Source: packages/spec/src/data/date-macros.zod.ts" />
<Card href="/docs/references/data/document" title="Document" description="Source: packages/spec/src/data/document.zod.ts" />
<Card href="/docs/references/data/driver" title="Driver" description="Source: packages/spec/src/data/driver.zod.ts" />
<Card href="/docs/references/data/driver-common" title="Driver Common" description="Source: packages/spec/src/data/driver/common.zod.ts" />
<Card href="/docs/references/data/driver-memory" title="Driver Memory" description="Source: packages/spec/src/data/driver/memory.zod.ts" />
Expand Down
1 change: 0 additions & 1 deletion content/docs/references/data/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"driver-sql",
"external-catalog",
"---Documents & Seed---",
"document",
"feed",
"seed",
"seed-loader",
Expand Down
Loading
Loading