跳到主要內容

ARC 2.0.0-beta.25

Device capabilities and degradation

Let a device report actual primitive capability, then use AUP's explicit degradation chains on limited targets.

Capability is neither guessed by a page author nor invented solely by a renderer. The client/device reports DeviceCaps during session handshake; AUP defines the capability shape and shared degradation chains; a concrete target presents from the reported capability.

DeviceCaps contains at least platform, formFactor, and a primitives map. Current primitive-capability values are:

ValueMeaning
nativeFully implemented by a native renderer
webviewFully implemented by a WebView renderer
partialRenderable, with some unsupported props
unsupportedCannot be directly rendered; try the shared degradation chain

Display, input, and features can add device context. They are not authorization switches that let an author bypass target renderer support.

Primitives with an explicit chain today

The shared degradation table in 2.0.0-beta.25 currently defines only these nine chains:

Original typeTry in order
globemapmediatext
charttabletext
mapmediatext
editorinputtext
canvasmediatext
rtcunsupported
calendartabletext
timetext
overlaytext

The current algorithm treats native, webview, and partial as supported. If a chain reaches unsupported or finds no supported fallback, the tree receives an explicit text/unsupported marker. That is not a guarantee of an equivalent experience.

In particular, an unknown or custom type with no explicit degradation chain currently passes through unchanged rather than automatically becoming text. “There is degradation” therefore does not mean every node displays safely on every device.

Chart on the static document target

chart is a cross-device primitive and can render with Chart.js on a full interactive Web surface. The static document target used for site docs is different:

FactCurrent boundary
Document capabilityDEVICE_CAPS_DOCUMENT does not list chart, so the value is unsupported
Shared chaincharttabletext
What you get on documentA table, not a live chart. No Chart.js, canvas, or CDN load on this path
Data reshapeWhen the runtime includes the static reshape (arc#3447 / arc#3458), inline labels / datasets (or single-series data) become real table columns and rows instead of an empty “No data” table
Version gateThe published version string 2.0.0-beta.28 is before that reshape commit. A CLI that only reports 2.0.0-beta.28 but is built from a later checkout may already reshape; a pure pre-reshape build may still show “No data”. Treat live chart in docs as unsupported until a release both declares document chart capability (or a dedicated document chart renderer) and is re-verified on this site
Markdown authoringThere is no defined ::chart Markdown directive. Do not invent one in site content
Docs sample policyPublic docs must not present a live chart sample as a document capability. Prefer a plain Markdown or AUP table when the page needs data on the static target

Measured on this documentation baseline with arc --version 2.0.0-beta.28 against a local Arc checkout that already contains the reshape: document still reports chart as unsupported, and renderToHtml of an inline bar chart yields a populated semantic <table> (including caption when title is set), not a chart graphic. Full evidence lives in the internal capability matrix (docs/aup/capability-matrix.md §0.6).

Primitives versus Web widgets

There are currently 18 cross-device primitives and 42 Web-only widgets. A Web-only widget can have a renderer in the Web runtime but is not part of the cross-device DeviceCaps.primitives table. When you use terminal, frame, breadcrumb, or a similar widget, treat it as a Web-target capability and accept it in a browser rather than assuming a mobile/terminal fallback.

Slides / deck path (web)

Ordinary document pages use DEVICE_CAPS_DOCUMENT. A tree that contains a deck (Markdown slides: true) may use DEVICE_CAPS_DECK so selected interactive types keep progressive-enhance / readonly shells instead of the article degradation chain: chart, map, calendar, overlay, canvas, explorer, surface, chat, and globe (map-shell variant) under arc#4005 / #4011 / #4012. That path is not a general product claim that every document page can host live Chart.js or Leaflet — ordinary articles still degrade those types.

Markdown directive attributes remain strings; deck demos that pass JSON arrays as attributes also need runtime coercion (arc#4013).

Author acceptance order

  1. Start with primitives the target you support explicitly reports.
  2. When using one of the nine degradable types, write down the text/table/media fallback that remains acceptable.
  3. Open the same tree on a real target and inspect presentation and any user-visible degradation marker.
  4. Give a Web-only widget its own Web acceptance; do not copy that success into a cross-device conclusion.

For the full name taxonomy, read Primitive taxonomy and evidence. For the transport boundary of interactive updates, read Sessions, patches, and scenes.