跳到主要內容

Sample contract · AUP cross-device · ARC 2.0.0-beta.28

`text` primitive

Express readable copy, headings, and admonitions as a portable text primitive.

text is an AUP cross-device primitive, not a Web Device layout component and not a Web-only widget. It is one of the 18 names in AUP_PRIMITIVES and appears in every target's DeviceCaps.primitives map as native, webview, partial, or unsupported.

Contract

FieldValue
Primitive nametext
LayerAUP cross-device primitive (AUP_PRIMITIVES)
Public statusreleased
Document capabilitynative
Shared degradation chainNone (document reports native)
Author entryAUP tree · Markdown blocks · GFM callouts → text admonition
Document renderer / notesrenderer/primitives/text.ts (includes admonition)
Showcase evidenceMarkdown body path; admonition labels via content-reader.ts ADMONITION_LOCALIZED_LABELS

When to use

You need semantic text, headings (level), code/quote formats, badges, or admonitions.

When not to use

Do not use text to smuggle layout chrome or site hero copy contracts that belong to Web Device components.

Sample contract

FieldValue
PurposeStatic callout / admonition presentation on document
BoundariesNot editable; not a toast/overlay; not a full AUP text props reference for every format
Author entry> [!NOTE]-style blockquote (Markdown → document text admonition)
SurfaceWeb Device document
Public statusreleased
Fallback / failureUnknown marker → ordinary blockquote; bare marker uses locale default title
VerificationRoutes below · arc --version = 2.0.0-beta.28

Document sample (admonition via GFM)

On the document target, a GitHub-style callout becomes text-admonition presentation. This proves the Markdown → document path for callouts. It is not a full AUP text node props reference (level / format / variant live in AUP JSON/DSL).

Source (custom title on the marker line):

markdown
> [!NOTE] Portable copy
> This callout is document content. It does not run actions or write AFS data.

Rendered:

Portable copy

This callout is document content. It does not run actions or write AFS data.

Source (bare marker — label comes from locale defaults):

markdown
> [!TIP]
> Prefer a same-line custom title when the English word is not the label you want.

Rendered:

Tip

Prefer a same-line custom title when the English word is not the label you want.

Bare markers use the reader’s default label for the content locale. English keeps English defaults; zh defaults are applied at read time (NOTE→说明, TIP→提示, IMPORTANT→重要, WARNING→警告, CAUTION→注意). An explicit same-line title always wins.

Failure and limits

SituationExpected result
[!FIXME] or other unknown markerPlain blockquote, not callout chrome
Marker not on the first line of the quoteNot recognized as admonition
Expecting dismiss / editor controlsStatic document content only
Assuming this is AUP format: markdown inside an interactive pageWrong surface; that path is not this sample

Unit page for the structure alone: GFM admonition.

Verification evidence

ItemValue
Baseline2026-08-09 · arc --version → 2.0.0-beta.28
Capability rowdocs/aup/capability-matrix.md (internal, non-routed) · text · GFM admonition
Implementationcontent-reader.ts (ADMONITION_MARKER_RE, ADMONITION_LOCALIZED_LABELS); renderer/primitives/text.ts
Public routes/en/docs/aup/primitives/text/ · /zh/docs/aup/primitives/text/
Local runarc service start --blocklet blocklets/arcblock --port 4900 · open routes; on zh locale, bare markers show Chinese default titles
AcceptSource matches rendered callout; unknown marker stays a quote; no edit controls

Evidence anchors

ItemValue
Registrypackages/aup/src/aup-types.ts · AUP_PRIMITIVES
Document capsproviders/runtime/web-device/src/device-caps.ts · DEVICE_CAPS_DOCUMENT
Degradationpackages/aup/src/degradation.ts · DEGRADATION_CHAINS
Internal matrixdocs/aup/capability-matrix.md (internal, non-routed)
Taxonomy hubPrimitive taxonomy and evidence
Sample contract rulesLive examples: scope and contract

Nearby pages