@exponential-at/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +54 -0
- package/README.md +360 -2
- package/catalog/a11y.json +668 -0
- package/catalog/basic-map.json +104 -0
- package/catalog/code.json +58 -0
- package/catalog/core.catalog.json +4752 -0
- package/catalog/core.schema.json +22667 -0
- package/catalog/host.json +64 -0
- package/catalog/layout.json +20 -0
- package/catalog/limits.json +9 -0
- package/catalog/locale.json +48 -0
- package/catalog/macros.json +3417 -0
- package/catalog/recipes.json +61 -0
- package/catalog/strings.json +72 -0
- package/catalog/style.json +128 -0
- package/catalog/theme.schema.json +42543 -0
- package/catalog/tokens.json +47 -0
- package/conformance/README.md +217 -0
- package/conformance/baseline.ts +101 -0
- package/conformance/browser-page.ts +146 -0
- package/conformance/browser-suites.ts +683 -0
- package/conformance/compare.ts +201 -0
- package/conformance/dom.ts +96 -0
- package/conformance/dump.ts +163 -0
- package/conformance/fonts.json +154 -0
- package/conformance/manifest.json +224 -0
- package/conformance/parity-compare.ts +191 -0
- package/conformance/parity-report.schema.json +73 -0
- package/conformance/parity.ts +412 -0
- package/conformance/pixel.ts +177 -0
- package/conformance/primitives-page.ts +49 -0
- package/conformance/report.schema.json +66 -0
- package/conformance/run.ts +118 -0
- package/dist/chunks/index-98npjvsd.js +3940 -0
- package/dist/chunks/index-98npjvsd.js.map +27 -0
- package/dist/chunks/index-gwkt14w3.js +7314 -0
- package/dist/chunks/index-gwkt14w3.js.map +10 -0
- package/dist/chunks/index-njt7yzzm.js +134 -0
- package/dist/chunks/index-njt7yzzm.js.map +9 -0
- package/dist/chunks/index-we7va6v6.js +7984 -0
- package/dist/chunks/index-we7va6v6.js.map +15 -0
- package/dist/chunks/index-xrm6f7wc.js +2563 -0
- package/dist/chunks/index-xrm6f7wc.js.map +10 -0
- package/dist/conformance.js +182749 -0
- package/dist/conformance.js.map +10 -0
- package/dist/entries/prompt.js +251 -0
- package/dist/entries/prompt.js.map +11 -0
- package/dist/entries/schema.js +1725 -0
- package/dist/entries/schema.js.map +11 -0
- package/dist/host/index.js +122 -0
- package/dist/host/index.js.map +9 -0
- package/dist/index.js +3213 -0
- package/dist/index.js.map +27 -0
- package/dist/types/src/a11y.d.ts +21 -0
- package/dist/types/src/animation.d.ts +76 -0
- package/dist/types/src/basic-map.d.ts +38 -0
- package/dist/types/src/builder.d.ts +50 -0
- package/dist/types/src/catalog.d.ts +54 -0
- package/dist/types/src/catalog.described.d.ts +33 -0
- package/dist/types/src/catalog.generated.d.ts +829 -0
- package/dist/types/src/chart.d.ts +46 -0
- package/dist/types/src/code.d.ts +44 -0
- package/dist/types/src/color.d.ts +20 -0
- package/dist/types/src/conformance.d.ts +39 -0
- package/dist/types/src/connector/app.d.ts +14 -0
- package/dist/types/src/connector/connector.d.ts +77 -0
- package/dist/types/src/connector/index.d.ts +4 -0
- package/dist/types/src/css.d.ts +29 -0
- package/dist/types/src/define.d.ts +66 -0
- package/dist/types/src/direction.d.ts +16 -0
- package/dist/types/src/dynamic.d.ts +159 -0
- package/dist/types/src/entries/prompt.d.ts +11 -0
- package/dist/types/src/entries/schema.d.ts +8 -0
- package/dist/types/src/expr.d.ts +71 -0
- package/dist/types/src/extension.d.ts +4 -0
- package/dist/types/src/format.d.ts +112 -0
- package/dist/types/src/geometry.d.ts +40 -0
- package/dist/types/src/host/contract.d.ts +188 -0
- package/dist/types/src/host/decoders.d.ts +61 -0
- package/dist/types/src/host/index.d.ts +11 -0
- package/dist/types/src/host/package.d.ts +58 -0
- package/dist/types/src/host/policy.d.ts +105 -0
- package/dist/types/src/host/router.d.ts +34 -0
- package/dist/types/src/host/runtime.d.ts +205 -0
- package/dist/types/src/host/sources.d.ts +15 -0
- package/dist/types/src/host/transports.d.ts +109 -0
- package/dist/types/src/index.d.ts +63 -0
- package/dist/types/src/layout.d.ts +20 -0
- package/dist/types/src/limits.d.ts +21 -0
- package/dist/types/src/list.d.ts +133 -0
- package/dist/types/src/locale.d.ts +22 -0
- package/dist/types/src/macros.d.ts +29 -0
- package/dist/types/src/overlay.d.ts +27 -0
- package/dist/types/src/prompt.d.ts +44 -0
- package/dist/types/src/recipes.d.ts +17 -0
- package/dist/types/src/reducer.d.ts +41 -0
- package/dist/types/src/resizable.d.ts +38 -0
- package/dist/types/src/schema.d.ts +7 -0
- package/dist/types/src/strings.d.ts +13 -0
- package/dist/types/src/style.d.ts +201 -0
- package/dist/types/src/test-preload.d.ts +1 -0
- package/dist/types/src/text-shimmer.d.ts +24 -0
- package/dist/types/src/theme-types.d.ts +162 -0
- package/dist/types/src/theme.d.ts +73 -0
- package/dist/types/src/themes.d.ts +22 -0
- package/dist/types/src/tree-guides.d.ts +17 -0
- package/dist/types/src/types.d.ts +314 -0
- package/dist/types/src/validate.d.ts +31 -0
- package/dist/types/src/web/base-css.d.ts +1 -0
- package/dist/types/src/web/box-css.d.ts +55 -0
- package/dist/types/src/web/coerce.d.ts +32 -0
- package/dist/types/src/web/data.d.ts +105 -0
- package/dist/types/src/web/dates.d.ts +12 -0
- package/dist/types/src/web/form.d.ts +44 -0
- package/dist/types/src/web/host-types.d.ts +119 -0
- package/dist/types/src/web/index.d.ts +28 -0
- package/dist/types/src/web/inputs.d.ts +55 -0
- package/dist/types/src/web/list.d.ts +13 -0
- package/dist/types/src/web/listbox.d.ts +14 -0
- package/dist/types/src/web/markdown.d.ts +96 -0
- package/dist/types/src/web/media.d.ts +62 -0
- package/dist/types/src/web/parts.d.ts +4 -0
- package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
- package/dist/types/src/web/primitives/alert.d.ts +9 -0
- package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
- package/dist/types/src/web/primitives/avatar.d.ts +13 -0
- package/dist/types/src/web/primitives/badge.d.ts +10 -0
- package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
- package/dist/types/src/web/primitives/button.d.ts +6 -0
- package/dist/types/src/web/primitives/calendar.d.ts +43 -0
- package/dist/types/src/web/primitives/card.d.ts +9 -0
- package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
- package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
- package/dist/types/src/web/primitives/cn.d.ts +3 -0
- package/dist/types/src/web/primitives/code-block.d.ts +24 -0
- package/dist/types/src/web/primitives/command.d.ts +134 -0
- package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
- package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
- package/dist/types/src/web/primitives/dialog.d.ts +24 -0
- package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
- package/dist/types/src/web/primitives/dock.d.ts +42 -0
- package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
- package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
- package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
- package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
- package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
- package/dist/types/src/web/primitives/index.d.ts +48 -0
- package/dist/types/src/web/primitives/input.d.ts +5 -0
- package/dist/types/src/web/primitives/kbd.d.ts +4 -0
- package/dist/types/src/web/primitives/label.d.ts +3 -0
- package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
- package/dist/types/src/web/primitives/meter.d.ts +21 -0
- package/dist/types/src/web/primitives/popover.d.ts +3 -0
- package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
- package/dist/types/src/web/primitives/progress.d.ts +8 -0
- package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
- package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
- package/dist/types/src/web/primitives/select.d.ts +47 -0
- package/dist/types/src/web/primitives/separator.d.ts +3 -0
- package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
- package/dist/types/src/web/primitives/sheet.d.ts +20 -0
- package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
- package/dist/types/src/web/primitives/spinner.d.ts +3 -0
- package/dist/types/src/web/primitives/switch.d.ts +4 -0
- package/dist/types/src/web/primitives/table.d.ts +11 -0
- package/dist/types/src/web/primitives/tabs.d.ts +13 -0
- package/dist/types/src/web/primitives/textarea.d.ts +3 -0
- package/dist/types/src/web/primitives/toast.d.ts +163 -0
- package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
- package/dist/types/src/web/primitives/truncate.d.ts +7 -0
- package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
- package/dist/types/src/web/share.d.ts +6 -0
- package/dist/types/src/web/table.d.ts +20 -0
- package/dist/types/src/web/theme-css.d.ts +69 -0
- package/dist/types/src/web/urls.d.ts +21 -0
- package/dist/web/index.js +2303 -0
- package/dist/web/index.js.map +26 -0
- package/dist/web/primitives/index.js +1450 -0
- package/dist/web/primitives/index.js.map +57 -0
- package/docs/components.generated.json +6238 -0
- package/docs/round-1-contract.md +679 -0
- package/docs/round-2-contract.md +476 -0
- package/docs/round-3-contract.md +174 -0
- package/docs/themes.generated.json +3503 -0
- package/fixtures/animations.json +2890 -0
- package/fixtures/bench-list.json +58 -0
- package/fixtures/bind-time.json +30664 -0
- package/fixtures/catalog-basic-map.json +1692 -0
- package/fixtures/catalog-components.json +9323 -0
- package/fixtures/catalog-extension.json +620 -0
- package/fixtures/catalog-macros.json +36370 -0
- package/fixtures/code-tokens.json +1993 -0
- package/fixtures/conformance-baseline.json +55544 -0
- package/fixtures/conformance-cases.json +49 -0
- package/fixtures/conformance-known.json +2123 -0
- package/fixtures/control-geometry.json +4200 -0
- package/fixtures/dashboard.data.json +74 -0
- package/fixtures/dashboard.json +752 -0
- package/fixtures/demo-surface.json +47 -0
- package/fixtures/format.json +870 -0
- package/fixtures/host-policy.json +1067 -0
- package/fixtures/host-router.json +1152 -0
- package/fixtures/host-transport.json +590 -0
- package/fixtures/interactions-round1.json +773 -0
- package/fixtures/kitchen-sink.expanded.json +10844 -0
- package/fixtures/kitchen-sink.json +3049 -0
- package/fixtures/layout-geometry-round1.json +7278 -0
- package/fixtures/layout-geometry.json +2072 -0
- package/fixtures/overlay-geometry.json +272 -0
- package/fixtures/primitive-specimens.json +58 -0
- package/fixtures/prompt-budget.json +33 -0
- package/fixtures/resizable.json +714 -0
- package/fixtures/round4-contract.json +2985 -0
- package/fixtures/specimens.json +9832 -0
- package/fixtures/style-conditions.json +336 -0
- package/fixtures/template-items.json +2215 -0
- package/fixtures/text-direction.json +309 -0
- package/fixtures/text-shimmer.json +96 -0
- package/fixtures/theme-extends.json +573 -0
- package/fixtures/theme-invalid.json +1296 -0
- package/fixtures/theme-recipes.json +58600 -0
- package/fixtures/theme-resolved.json +23949 -0
- package/fixtures/toast-stack.json +215 -0
- package/fixtures/tree-guides.json +224 -0
- package/fixtures/virtual-list.json +733 -0
- package/generated/ExponentialUICatalog.generated.kt +67 -0
- package/generated/ExponentialUICatalog.generated.swift +67 -0
- package/generated/ExponentialUIThemes.generated.kt +23 -0
- package/generated/ExponentialUIThemes.generated.swift +23 -0
- package/generated/catalog.descriptions.generated.rs +6 -0
- package/generated/catalog.generated.rs +80 -0
- package/generated/catalog.themes.generated.rs +34 -0
- package/generated/core.descriptions.json +2505 -0
- package/generated/core.runtime.json +3609 -0
- package/package.json +87 -4
- package/themes/exponential.recipes.json +49 -0
- package/themes/exponential.theme.json +755 -0
- package/themes/neutral.theme.json +5676 -0
- package/themes/orange.theme.json +43 -0
- package/themes/playful.theme.json +219 -0
- package/vendor/a2ui/LICENSE.txt +203 -0
- package/vendor/a2ui/README.md +27 -0
- package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
- package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
- package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
- package/vendor/a2ui/v0_9/client_to_server.json +104 -0
- package/vendor/a2ui/v0_9/common_types.json +315 -0
- package/vendor/a2ui/v0_9/server_to_client.json +132 -0
- package/vendor/json-render/LICENSE.txt +201 -0
- package/vendor/json-render/README.md +13 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "VAPP-92: the RECIPE contract. A theme styles a component PART under a `when` selector (the node's recipe props + the interaction `state`); this file fixes what a theme may name. `states` = the interaction states a painter reports (`default` is the absence of all; round 1 adds `invalid` = a field whose checks failed, `dragover` = a drop zone a drag hovers); `keys` = the whitelist a recipe style may set: a SUBSET of style.json's visual keys plus the padding/gap/size keys a part's box needs and `native` (true = the painter may use the platform's own control for this part, geometry still from the tokens); round 1 lets a recipe set `transition`/`transitionEasing` (so a theme's motion tokens finally animate hover/press/open), `transform` (a chevron that rotates when `open`), `borderStyle`, the four per-side border widths (an app bar's bottom rule, a tab bar's top rule), `textDecoration`, `letterSpacing`, `fontStyle`, `textTransform`. A part-level discriminator the painter supplies per drawn piece: CodeBlock/token `kind` (the codeToken enum), Table/headerCell+cell `align` and Table/row `striped` (true on ODD rows of a striped table), Stepper's step `status` (a macro `$recipe`). `native` lists every native component's PARTS (the painter paints each part with its resolved recipe) and the PROPS a `when` may key on (the component's enum/boolean props; the catalog default fills an unset one, so a theme always sees a concrete value; a part-level discriminator the PAINTER supplies is listed too, see below). Macro parts come from macros.json (every template `part`) and their `when` props from the macro's `recipeProps` (+ a part's `$recipe` keys); src/recipes.ts derives them. Both lists are append-only. Round 2 (docs/round-2-contract.md §6): `parts` lists EVERY part a painter lays out (the conformance dump names each `<node id>.<part>[.<index or row key>]`), so the layout-only parts are here too (Switch/body, Radio/items, Slider/header, Table/body, CodeBlock/body+code, FileUpload/title+browse+fileIcon, the fields' `input`, Tooltip/anchor, Accordion/count, List/section, Carousel/controls+previous+next); keys add `backdropBlur` (`$blur.*`) and `animation`; Resizable is new. EXP-1259: SearchList is new (its parts are also a searchable Menu submenu's: head, search, count, list, empty, fade), Tabs gain `close` + `new` (props `closable`, `addable`), Skeleton gains its rows (`row`, `dot`, `bar`). EXP-1324: CodeBlock gains the `variant` (default|destructive) and `size` (default|sm) props, shadcn's code-block.",
|
|
3
|
+
"states": ["hover", "pressed", "focus", "disabled", "checked", "open", "selected", "invalid", "dragover"],
|
|
4
|
+
"keys": [
|
|
5
|
+
"backgroundColor", "color", "borderColor", "borderWidth", "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth", "borderRadius", "borderStyle",
|
|
6
|
+
"padding", "paddingHorizontal", "paddingVertical", "gap",
|
|
7
|
+
"width", "height", "minWidth", "minHeight",
|
|
8
|
+
"fontSize", "fontWeight", "lineHeight", "fontFamily", "letterSpacing", "textDecoration", "textTransform", "fontStyle",
|
|
9
|
+
"boxShadow", "opacity", "transition", "transitionEasing", "transform", "backdropBlur", "animation", "native"
|
|
10
|
+
],
|
|
11
|
+
"native": {
|
|
12
|
+
"Box": { "parts": ["root"], "props": ["pressable"] },
|
|
13
|
+
"List": { "parts": ["root", "divider", "section"], "props": ["direction", "divided", "stickyHeaders"] },
|
|
14
|
+
"Resizable": { "parts": ["root", "panel", "handle", "grip"], "props": ["direction", "handle"] },
|
|
15
|
+
"Text": { "parts": ["root"], "props": ["variant", "tone"] },
|
|
16
|
+
"Markdown": { "parts": ["root", "paragraph", "heading", "link", "code", "codeBlock", "quote", "table", "listItem"], "props": [] },
|
|
17
|
+
"Image": { "parts": ["root", "fallback"], "props": ["fit"] },
|
|
18
|
+
"Icon": { "parts": ["root"], "props": ["size", "tone"] },
|
|
19
|
+
"Video": { "parts": ["root", "controls", "poster"], "props": ["autoplay"] },
|
|
20
|
+
"AudioPlayer": { "parts": ["root", "controls", "track"], "props": [] },
|
|
21
|
+
"Avatar": { "parts": ["root", "image", "fallback"], "props": ["size"] },
|
|
22
|
+
"Carousel": { "parts": ["root", "page", "indicator", "controls", "previous", "next"], "props": ["loop", "indicators"] },
|
|
23
|
+
"Tabs": { "parts": ["root", "list", "tab", "indicator", "content", "close", "new"], "props": ["fill", "closable", "addable"] },
|
|
24
|
+
"Segmented": { "parts": ["root", "item", "icon", "label"], "props": ["type", "variant", "size", "fill"] },
|
|
25
|
+
"Accordion": { "parts": ["root", "item", "trigger", "content", "count"], "props": ["type"] },
|
|
26
|
+
"Dialog": { "parts": ["overlay", "content", "title", "description", "footer", "close"], "props": ["dismissible"] },
|
|
27
|
+
"Drawer": { "parts": ["overlay", "content", "handle", "title", "description", "footer"], "props": ["side", "dismissible"] },
|
|
28
|
+
"Popover": { "parts": ["content", "arrow"], "props": ["side", "openOn"] },
|
|
29
|
+
"Tooltip": { "parts": ["content", "arrow", "anchor"], "props": ["side"] },
|
|
30
|
+
"Menu": { "parts": ["trigger", "content", "item", "separator", "label", "shortcut", "check", "submenuIndicator", "head", "search", "count", "list", "empty", "fade"], "props": ["openOn"] },
|
|
31
|
+
"Toast": { "parts": ["root", "icon", "title", "description", "action", "close"], "props": ["type"] },
|
|
32
|
+
"Ring": { "parts": ["root", "track", "fill", "label"], "props": ["size", "tone"] },
|
|
33
|
+
"Spinner": { "parts": ["root"], "props": ["size"] },
|
|
34
|
+
"Skeleton": { "parts": ["root", "row", "dot", "bar"], "props": ["rounded", "dot"] },
|
|
35
|
+
"Chart": { "parts": ["root", "title", "axis", "grid", "legend", "tooltip", "valueLabel"], "props": ["kind"] },
|
|
36
|
+
"Table": { "parts": ["root", "caption", "header", "headerCell", "sortIcon", "row", "cell", "checkbox", "empty", "body"], "props": ["selectable", "striped", "density", "stickyHeader", "align"] },
|
|
37
|
+
"Button": { "parts": ["root", "icon", "label", "spinner"], "props": ["variant", "size", "disabled", "loading"] },
|
|
38
|
+
"Link": { "parts": ["root"], "props": ["external"] },
|
|
39
|
+
"Toggle": { "parts": ["root", "icon", "label"], "props": ["variant", "size", "pressed"] },
|
|
40
|
+
"Form": { "parts": ["root", "summary"], "props": ["disabled", "busy"] },
|
|
41
|
+
"Input": { "parts": ["root", "label", "field", "placeholder", "description", "error"], "props": ["type", "disabled"] },
|
|
42
|
+
"Textarea": { "parts": ["root", "label", "field", "placeholder", "description", "error"], "props": ["disabled"] },
|
|
43
|
+
"NumberField": { "parts": ["root", "label", "field", "decrement", "increment", "unit", "description", "error", "input"], "props": ["disabled"] },
|
|
44
|
+
"Checkbox": { "parts": ["root", "box", "check", "label", "description"], "props": ["checked", "disabled"] },
|
|
45
|
+
"Radio": { "parts": ["root", "item", "dot", "label", "items"], "props": ["orientation"] },
|
|
46
|
+
"ChoiceTiles": { "parts": ["root", "tile", "picture", "label", "description"], "props": ["type", "columns"] },
|
|
47
|
+
"Switch": { "parts": ["root", "track", "thumb", "label", "description", "body"], "props": ["checked", "disabled"] },
|
|
48
|
+
"Slider": { "parts": ["root", "track", "range", "thumb", "label", "value", "header"], "props": [] },
|
|
49
|
+
"Select": { "parts": ["root", "label", "trigger", "placeholder", "content", "search", "item", "check", "empty"], "props": ["multiple", "searchable", "disabled"] },
|
|
50
|
+
"SearchList": { "parts": ["root", "head", "search", "count", "list", "item", "icon", "identifier", "label", "check", "empty", "fade"], "props": [] },
|
|
51
|
+
"ChipInput": { "parts": ["root", "label", "field", "chip", "chipLabel", "remove", "placeholder", "description", "error", "input"], "props": ["disabled"] },
|
|
52
|
+
"DatePicker": { "parts": ["root", "label", "trigger", "calendar", "day"], "props": [] },
|
|
53
|
+
"DateRangePicker": { "parts": ["root", "label", "trigger", "calendar", "day", "range"], "props": [] },
|
|
54
|
+
"TimePicker": { "parts": ["root", "label", "trigger", "placeholder", "list", "item"], "props": ["disabled"] },
|
|
55
|
+
"FileUpload": { "parts": ["root", "label", "dropzone", "icon", "hint", "file", "fileName", "fileMeta", "remove", "description", "error", "title", "browse", "fileIcon"], "props": ["multiple", "disabled"] },
|
|
56
|
+
"CodeBlock": { "parts": ["root", "header", "title", "copy", "gutter", "line", "lineNumber", "token", "body", "code"], "props": ["lineNumbers", "wrap", "kind", "variant", "size"] },
|
|
57
|
+
"Composer": { "parts": ["root", "field", "placeholder", "attachment", "send"], "props": ["attachments", "busy"] },
|
|
58
|
+
"TreeGuides": { "parts": ["root", "line"], "props": ["tee"] },
|
|
59
|
+
"Unknown": { "parts": ["root", "label"], "props": [] }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Round 1 (docs/round-1-contract.md §4): the built-in UI STRINGS every renderer shows — the copy no author writes (a Select's search placeholder, the calendar's month buttons, the copy button, the Pagination arrows' labels). Keys are the ids, values the English defaults. A renderer ships this table (generated into TS/Swift/Kotlin/Rust as STRING_IDS + STRING_DEFAULTS) and lets the HOST override any id per surface (`strings: {search: \"Suchen…\"}`); the catalog refers to an entry as `$string.<id>` in a prop default or a macro template (`$string.previous`), which the renderer resolves at bind time like a token. `{name}` placeholders are filled by the renderer (src/strings.ts formatString; a macro template uses `$fill` → the core `fill` function): a sentence is ONE id with placeholders, never concatenated fragments. Round 2 adds the names the renderers still hard-coded (`invalidValue` = a failed check without a message, `message` = the Composer field, `codeBlock` = an untitled CodeBlock, `dialog` = an untitled Dialog/Drawer, `table` = an uncaptioned Table, `carousel`/`slide` = the carousel's role descriptions, `resize` = a Resizable handle). EXP-1259 adds `closeTab` and `newTab` (the Tabs close glyph and + button). Append-only (round 1 dropped the unused fragment `of`).",
|
|
3
|
+
"strings": {
|
|
4
|
+
"back": "Back",
|
|
5
|
+
"breadcrumb": "Breadcrumb",
|
|
6
|
+
"browse": "Browse",
|
|
7
|
+
"cancel": "Cancel",
|
|
8
|
+
"carousel": "Carousel",
|
|
9
|
+
"chartSummary": "Chart of {series}, values from {min} to {max}",
|
|
10
|
+
"choose": "Choose",
|
|
11
|
+
"clear": "Clear",
|
|
12
|
+
"close": "Close",
|
|
13
|
+
"closeTab": "Close {name}",
|
|
14
|
+
"codeBlock": "Code",
|
|
15
|
+
"collapse": "Collapse",
|
|
16
|
+
"confirm": "Confirm",
|
|
17
|
+
"copied": "Copied",
|
|
18
|
+
"copy": "Copy",
|
|
19
|
+
"decrement": "Decrease",
|
|
20
|
+
"dialog": "Dialog",
|
|
21
|
+
"dismiss": "Dismiss",
|
|
22
|
+
"dropFiles": "Drop files here",
|
|
23
|
+
"expand": "Expand",
|
|
24
|
+
"fileTooLarge": "File too large",
|
|
25
|
+
"fileTooLargeNamed": "{name}: File too large",
|
|
26
|
+
"increment": "Increase",
|
|
27
|
+
"invalidFields": "Check the highlighted fields",
|
|
28
|
+
"invalidValue": "Invalid value",
|
|
29
|
+
"loading": "Loading",
|
|
30
|
+
"menu": "Menu",
|
|
31
|
+
"message": "Message",
|
|
32
|
+
"more": "More",
|
|
33
|
+
"newTab": "New tab",
|
|
34
|
+
"next": "Next",
|
|
35
|
+
"nextMonth": "Next month",
|
|
36
|
+
"noResults": "No results",
|
|
37
|
+
"optional": "Optional",
|
|
38
|
+
"pageOf": "Page {page} of {total}",
|
|
39
|
+
"pagination": "Pagination",
|
|
40
|
+
"previous": "Previous",
|
|
41
|
+
"previousMonth": "Previous month",
|
|
42
|
+
"ratingStar": "{value} of {max}",
|
|
43
|
+
"ratingValue": "Rated {value} of {max}",
|
|
44
|
+
"remove": "Remove",
|
|
45
|
+
"removeItem": "Remove {name}",
|
|
46
|
+
"required": "Required",
|
|
47
|
+
"resize": "Resize",
|
|
48
|
+
"search": "Search…",
|
|
49
|
+
"selectAll": "Select all",
|
|
50
|
+
"selectedCount": "{count} selected",
|
|
51
|
+
"selectRow": "Select row",
|
|
52
|
+
"send": "Send",
|
|
53
|
+
"showLess": "Show less",
|
|
54
|
+
"showMore": "Show more",
|
|
55
|
+
"slide": "Slide",
|
|
56
|
+
"sortAscending": "Sort ascending",
|
|
57
|
+
"sortByAscending": "{name}: Sort ascending",
|
|
58
|
+
"sortByDescending": "{name}: Sort descending",
|
|
59
|
+
"sortDescending": "Sort descending",
|
|
60
|
+
"sparklineSummary": "Trend from {first} to {last}, low {min}, high {max}",
|
|
61
|
+
"stepCurrent": "Step {step} of {total}: {label}, current",
|
|
62
|
+
"stepDone": "Step {step} of {total}: {label}, completed",
|
|
63
|
+
"stepUpcoming": "Step {step} of {total}: {label}",
|
|
64
|
+
"stop": "Stop",
|
|
65
|
+
"submit": "Submit",
|
|
66
|
+
"table": "Table",
|
|
67
|
+
"today": "Today",
|
|
68
|
+
"unknownComponent": "Unknown component",
|
|
69
|
+
"unsupportedFile": "Unsupported file",
|
|
70
|
+
"unsupportedFileNamed": "{name}: Unsupported file"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "VAPP-85: the `Box` style whitelist, verbatim from the VAPP-4 spike (`vapp_spike::WHITELIST` + the logical inline properties the spike added), extended by round 1 (docs/round-1-contract.md) — ONE source for the TS keys (`src/style.ts`), the JSON Schema (`core.schema.json#/$defs/style`) and the Swift/Kotlin/Rust key lists. Numbers are px (≡ pt ≡ dp); `length` also takes `\"N%\"`, `\"Npx\"` and `\"auto\"`; every value may be a token reference `$<group>.<name>` from tokens.json; a COLOUR (`backgroundColor`, `color`, `borderColor`, gradient stops) is ONLY a `$color.<name>` token (round 4, VAPP-103: a literal `#hex` ignores the theme's light and dark modes, so validateStyle refuses it; themes keep literals). `borderWidth` and the four per-side widths are the visual keys with layout effect (a number or `$border.<name>`, VAPP-92); `fontFamily` (VAPP-92) takes only `$type.family.<name>`; `transition` takes only `$motion.<name>` (the duration every opacity/colour/transform/size change animates with; nothing animates without it) and `transitionEasing` only `$ease.<name>`; `transform` is PAINT-ONLY (`translate(Xpx, Ypx)`, `scale(N)`, `rotate(Ndeg)`, space-separated, never layout); `backgroundGradient` = `{angle, stops: [{color, offset 0..1}]}` painted OVER `backgroundColor` (CSS order: the colour shows only through transparent stops); `visibility: hidden` keeps the box in layout and paints nothing (`display: none` removes it); `cursor` is a pointer-platform hint touch platforms ignore. CONDITIONS nest one level and apply in SOURCE ORDER after the base (write narrow-first): `@media` keys match the ONE grammar in `conditions.media` — `min-width`/`max-width`/`min-height`/`max-height` against the SURFACE box (`min-*` = `size >= N`, `max-*` = `size < N`; `N` = px or a `$breakpoint.<name>` token the theme resolves BEFORE matching), `orientation` of the surface box, `hover: hover|none` = a hover-capable pointer, `prefers-reduced-motion: reduce|no-preference` from the platform; the state keys `:hover`, `:focus-visible`, `:pressed` against the node's own interaction state, applied after every media block in that order (pressed wins). `src/style.ts resolveConditions` is the reference flattening and fixtures/style-conditions.json locks it. Still not in v1 (confirmed by the spike, kept by round 1): calc(), named grid lines, gridAutoFlow, justifyItems, order, zIndex (paint order = tree order, absolute nodes LAST among siblings, overlays stack by LAYER), per-side border colours (gpui paints ONE border colour per box; per-side WIDTHS are in), multi-value shorthands. After macro expansion a style VALUE may be a binding or a function call (a bound macro input, e.g. Progress fill width = percent{…}); the renderer resolves it at bind time and then applies it like an authored value; authors cannot write one (validateStyle refuses). Round 2 (docs/round-2-contract.md §2): `position: sticky` = relative in layout, then pinned inside the nearest scrolling ancestor (`overflow` scroll/auto, else the surface scroller) by its `top`/`bottom`/`left`/`right`/`inset*` offsets while its parent is in view; `backdropBlur` takes only `$blur.<name>` (blurs what is BEHIND the box through its translucent background; a platform without backdrop blur paints the background alone, so pair it with a translucent `backgroundColor`); `animation` names a keyframe set of `animations` (`animationDuration` = `$motion.<name>` only); `direction` may sit on ANY node and is inherited (flex rows, logical insets/paddings, `textAlign` start/end and mirrored glyphs follow the node's resolved direction).",
|
|
3
|
+
"layout": {
|
|
4
|
+
"display": { "enum": ["flex", "grid", "block", "none"] },
|
|
5
|
+
"flexDirection": { "enum": ["row", "column", "row-reverse", "column-reverse"] },
|
|
6
|
+
"flexWrap": { "enum": ["nowrap", "wrap", "wrap-reverse"] },
|
|
7
|
+
"justifyContent": { "enum": ["flex-start", "flex-end", "start", "end", "center", "stretch", "space-between", "space-around", "space-evenly"] },
|
|
8
|
+
"alignItems": { "enum": ["flex-start", "flex-end", "start", "end", "center", "stretch", "baseline"] },
|
|
9
|
+
"alignContent": { "enum": ["flex-start", "flex-end", "start", "end", "center", "stretch", "space-between", "space-around", "space-evenly"] },
|
|
10
|
+
"alignSelf": { "enum": ["flex-start", "flex-end", "start", "end", "center", "stretch", "baseline"] },
|
|
11
|
+
"justifySelf": { "enum": ["flex-start", "flex-end", "start", "end", "center", "stretch", "baseline"] },
|
|
12
|
+
"flexGrow": { "type": "number" },
|
|
13
|
+
"flexShrink": { "type": "number" },
|
|
14
|
+
"flexBasis": { "type": "length" },
|
|
15
|
+
"gap": { "type": "length" },
|
|
16
|
+
"rowGap": { "type": "length" },
|
|
17
|
+
"columnGap": { "type": "length" },
|
|
18
|
+
"direction": { "enum": ["ltr", "rtl"] },
|
|
19
|
+
"overflow": { "enum": ["visible", "hidden", "clip", "scroll", "auto"] },
|
|
20
|
+
"overflowX": { "enum": ["visible", "hidden", "clip", "scroll", "auto"] },
|
|
21
|
+
"overflowY": { "enum": ["visible", "hidden", "clip", "scroll", "auto"] },
|
|
22
|
+
"width": { "type": "length" },
|
|
23
|
+
"height": { "type": "length" },
|
|
24
|
+
"minWidth": { "type": "length" },
|
|
25
|
+
"minHeight": { "type": "length" },
|
|
26
|
+
"maxWidth": { "type": "length" },
|
|
27
|
+
"maxHeight": { "type": "length" },
|
|
28
|
+
"aspectRatio": { "type": "ratio" },
|
|
29
|
+
"position": { "enum": ["relative", "absolute", "sticky"] },
|
|
30
|
+
"top": { "type": "length" },
|
|
31
|
+
"right": { "type": "length" },
|
|
32
|
+
"bottom": { "type": "length" },
|
|
33
|
+
"left": { "type": "length" },
|
|
34
|
+
"inset": { "type": "length" },
|
|
35
|
+
"insetInlineStart": { "type": "length" },
|
|
36
|
+
"insetInlineEnd": { "type": "length" },
|
|
37
|
+
"insetBlockStart": { "type": "length" },
|
|
38
|
+
"insetBlockEnd": { "type": "length" },
|
|
39
|
+
"padding": { "type": "length" },
|
|
40
|
+
"paddingTop": { "type": "length" },
|
|
41
|
+
"paddingRight": { "type": "length" },
|
|
42
|
+
"paddingBottom": { "type": "length" },
|
|
43
|
+
"paddingLeft": { "type": "length" },
|
|
44
|
+
"paddingHorizontal": { "type": "length" },
|
|
45
|
+
"paddingVertical": { "type": "length" },
|
|
46
|
+
"paddingInlineStart": { "type": "length" },
|
|
47
|
+
"paddingInlineEnd": { "type": "length" },
|
|
48
|
+
"margin": { "type": "length" },
|
|
49
|
+
"marginTop": { "type": "length" },
|
|
50
|
+
"marginRight": { "type": "length" },
|
|
51
|
+
"marginBottom": { "type": "length" },
|
|
52
|
+
"marginLeft": { "type": "length" },
|
|
53
|
+
"marginHorizontal": { "type": "length" },
|
|
54
|
+
"marginVertical": { "type": "length" },
|
|
55
|
+
"marginInlineStart": { "type": "length" },
|
|
56
|
+
"marginInlineEnd": { "type": "length" },
|
|
57
|
+
"gridTemplateColumns": { "type": "tracks" },
|
|
58
|
+
"gridTemplateRows": { "type": "tracks" },
|
|
59
|
+
"gridTemplateAreas": { "type": "areas" },
|
|
60
|
+
"gridArea": { "type": "string" },
|
|
61
|
+
"gridColumn": { "type": "string" },
|
|
62
|
+
"gridRow": { "type": "string" }
|
|
63
|
+
},
|
|
64
|
+
"visual": {
|
|
65
|
+
"backgroundColor": { "type": "color" },
|
|
66
|
+
"backgroundGradient": { "type": "gradient" },
|
|
67
|
+
"color": { "type": "color" },
|
|
68
|
+
"borderWidth": { "type": "number", "layoutEffect": true },
|
|
69
|
+
"borderTopWidth": { "type": "number", "layoutEffect": true },
|
|
70
|
+
"borderRightWidth": { "type": "number", "layoutEffect": true },
|
|
71
|
+
"borderBottomWidth": { "type": "number", "layoutEffect": true },
|
|
72
|
+
"borderLeftWidth": { "type": "number", "layoutEffect": true },
|
|
73
|
+
"borderColor": { "type": "color" },
|
|
74
|
+
"borderStyle": { "enum": ["solid", "dashed", "dotted"] },
|
|
75
|
+
"borderRadius": { "type": "length" },
|
|
76
|
+
"borderTopLeftRadius": { "type": "length" },
|
|
77
|
+
"borderTopRightRadius": { "type": "length" },
|
|
78
|
+
"borderBottomRightRadius": { "type": "length" },
|
|
79
|
+
"borderBottomLeftRadius": { "type": "length" },
|
|
80
|
+
"opacity": { "type": "number" },
|
|
81
|
+
"boxShadow": { "type": "token", "group": "shadow" },
|
|
82
|
+
"fontSize": { "type": "length" },
|
|
83
|
+
"fontWeight": { "enum": [300, 400, 500, 600, 700, 800] },
|
|
84
|
+
"lineHeight": { "type": "length" },
|
|
85
|
+
"letterSpacing": { "type": "length" },
|
|
86
|
+
"textAlign": { "enum": ["left", "right", "center", "start", "end", "justify"] },
|
|
87
|
+
"textDecoration": { "enum": ["none", "underline", "line-through"] },
|
|
88
|
+
"textTransform": { "enum": ["none", "uppercase", "lowercase", "capitalize"] },
|
|
89
|
+
"fontStyle": { "enum": ["normal", "italic"] },
|
|
90
|
+
"fontFamily": { "type": "token", "group": "type.family" },
|
|
91
|
+
"transition": { "type": "token", "group": "motion" },
|
|
92
|
+
"transitionEasing": { "type": "token", "group": "ease" },
|
|
93
|
+
"transform": { "type": "transform" },
|
|
94
|
+
"visibility": { "enum": ["visible", "hidden"] },
|
|
95
|
+
"pointerEvents": { "enum": ["auto", "none"] },
|
|
96
|
+
"userSelect": { "enum": ["auto", "none", "text"] },
|
|
97
|
+
"cursor": { "enum": ["auto", "default", "pointer", "text", "not-allowed", "grab", "grabbing", "move", "col-resize", "row-resize"] },
|
|
98
|
+
"backdropBlur": { "type": "token", "group": "blur" },
|
|
99
|
+
"animation": { "enum": ["pulse", "spin", "fade-in", "slide-in-up", "slide-in-down", "slide-in-left", "slide-in-right", "shimmer"] },
|
|
100
|
+
"animationDuration": { "type": "token", "group": "motion" }
|
|
101
|
+
},
|
|
102
|
+
"animations": {
|
|
103
|
+
"$comment": "Round 2 (docs/round-2-contract.md §2): the keyframes behind the `animation` key. Channels: `opacity` (multiplies the node's), `translateX`/`translateY` (px), `rotate` (deg), `scale`, applied OUTSIDE the node's own `transform` about the box centre; `band` = the shimmer highlight's position across the box (-1 = one box width before it, 1 = one after), painted over the content and clipped to the border box. Duration = the theme's `duration` token (or the node's `animationDuration`) × `factor`; `easing` applies PER keyframe segment (CSS) and is a `$ease` token or `linear`; `iterations` = a count or `infinite`. An animation starts when the node enters the tree (first paint, `visible` turning true, a template item appearing). Reduced motion: no animation, the node shows the keyframe at `rest` (0 = the first, 1 = the last; shimmer draws no band). Channels are PHYSICAL, like `transform`: `direction` never mirrors them (in rtl too, `slide-in-left` moves leftwards and the shimmer band sweeps left → right).",
|
|
104
|
+
"pulse": { "duration": "$motion.slow", "factor": 7, "easing": "$ease.standard", "iterations": "infinite", "rest": 0, "keyframes": [{ "offset": 0, "opacity": 1 }, { "offset": 0.5, "opacity": 0.5 }, { "offset": 1, "opacity": 1 }] },
|
|
105
|
+
"spin": { "duration": "$motion.slow", "factor": 4, "easing": "linear", "iterations": "infinite", "rest": 0, "keyframes": [{ "offset": 0, "rotate": 0 }, { "offset": 1, "rotate": 360 }] },
|
|
106
|
+
"fade-in": { "duration": "$motion.standard", "factor": 1, "easing": "$ease.decelerate", "iterations": 1, "rest": 1, "keyframes": [{ "offset": 0, "opacity": 0 }, { "offset": 1, "opacity": 1 }] },
|
|
107
|
+
"slide-in-up": { "duration": "$motion.standard", "factor": 1, "easing": "$ease.decelerate", "iterations": 1, "rest": 1, "keyframes": [{ "offset": 0, "opacity": 0, "translateY": 8 }, { "offset": 1, "opacity": 1, "translateY": 0 }] },
|
|
108
|
+
"slide-in-down": { "duration": "$motion.standard", "factor": 1, "easing": "$ease.decelerate", "iterations": 1, "rest": 1, "keyframes": [{ "offset": 0, "opacity": 0, "translateY": -8 }, { "offset": 1, "opacity": 1, "translateY": 0 }] },
|
|
109
|
+
"slide-in-left": { "duration": "$motion.standard", "factor": 1, "easing": "$ease.decelerate", "iterations": 1, "rest": 1, "keyframes": [{ "offset": 0, "opacity": 0, "translateX": 8 }, { "offset": 1, "opacity": 1, "translateX": 0 }] },
|
|
110
|
+
"slide-in-right": { "duration": "$motion.standard", "factor": 1, "easing": "$ease.decelerate", "iterations": 1, "rest": 1, "keyframes": [{ "offset": 0, "opacity": 0, "translateX": -8 }, { "offset": 1, "opacity": 1, "translateX": 0 }] },
|
|
111
|
+
"shimmer": { "duration": "$motion.slow", "factor": 5, "easing": "linear", "iterations": "infinite", "rest": 0, "keyframes": [{ "offset": 0, "band": -1 }, { "offset": 1, "band": 1 }], "band": { "color": "$color.background", "stops": [{ "offset": 0, "alpha": 0 }, { "offset": 0.5, "alpha": 0.5 }, { "offset": 1, "alpha": 0 }] } }
|
|
112
|
+
},
|
|
113
|
+
"conditions": {
|
|
114
|
+
"media": "^@media \\((min-width|max-width|min-height|max-height): (\\d+(\\.\\d+)?px|\\$breakpoint\\.[a-zA-Z0-9]+)\\)$|^@media \\(orientation: (portrait|landscape)\\)$|^@media \\(hover: (hover|none)\\)$|^@media \\(prefers-reduced-motion: (reduce|no-preference)\\)$",
|
|
115
|
+
"states": [":hover", ":focus-visible", ":pressed"],
|
|
116
|
+
"transform": "^((translate\\(-?\\d+(\\.\\d+)?px, -?\\d+(\\.\\d+)?px\\)|scale\\(-?\\d+(\\.\\d+)?\\)|rotate\\(-?\\d+(\\.\\d+)?deg\\))( (?=\\S)|$))+$"
|
|
117
|
+
},
|
|
118
|
+
"textShimmer": {
|
|
119
|
+
"$comment": "EXP-1324: the Text `shimmer` prop (a running TraceItem title) = packages/design-tokens motion.shimmer (shadcn's `shimmer` utility), copied here because the SDK imports nothing from the app (src/text-shimmer.test.ts keeps them equal). The glyphs are filled with a linear gradient at 90deg + `angleDeg` (CSS angle: 90deg = left → right): base = the text colour, highlight (dark mode) = the text colour in OKLCH at lightness min(1, max(`highlightLightnessMin`, L + `highlightLightnessBoost`)), same a/b, alpha min(1, alpha + `highlightAlphaBoost`); light mode = the text colour at alpha × `lightAlphaFactor`; mid = the 50% OKLab mix of the two, alpha-premultiplied. Stops: base @ 50% - spread, mid @ 50% - spread/2, highlight @ 50%, mid @ 50% + spread/2, base @ 50% + spread (spread = `spreadPx`). The gradient is 200% of the text box width + 2 × spread wide and slides linearly from CSS background-position `100% 0` (its right edge on the box's right edge) to `0 0` (its left edge on the box's left edge) over `durationMs`, forever; rtl reverses. Reduced motion = the plain text. src/text-shimmer.ts textShimmer(colour, dark) is the reference (the Rust core `text_shimmer`, FFI `text_shimmer_json`); fixtures/text-shimmer.json locks the colours.",
|
|
120
|
+
"durationMs": 2000,
|
|
121
|
+
"angleDeg": 20,
|
|
122
|
+
"spreadPx": 60,
|
|
123
|
+
"highlightLightnessMin": 0.8,
|
|
124
|
+
"highlightLightnessBoost": 0.4,
|
|
125
|
+
"highlightAlphaBoost": 0.4,
|
|
126
|
+
"lightAlphaFactor": 0.2
|
|
127
|
+
}
|
|
128
|
+
}
|