@exponential_app/eui 0.0.0-stage → 0.2.1
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 +377 -2
- package/catalog/a11y.json +705 -0
- package/catalog/basic-map.json +104 -0
- package/catalog/code.json +58 -0
- package/catalog/core.catalog.json +5190 -0
- package/catalog/core.schema.json +24542 -0
- package/catalog/host.json +95 -0
- package/catalog/layout.json +20 -0
- package/catalog/limits.json +9 -0
- package/catalog/locale.json +48 -0
- package/catalog/macros.json +4152 -0
- package/catalog/recipes.json +64 -0
- package/catalog/strings.json +84 -0
- package/catalog/style.json +180 -0
- package/catalog/theme.schema.json +47754 -0
- package/catalog/tokens.json +47 -0
- package/conformance/README.md +218 -0
- package/conformance/baseline.ts +101 -0
- package/conformance/browser-page.ts +146 -0
- package/conformance/browser-suites.ts +699 -0
- package/conformance/compare.ts +201 -0
- package/conformance/dom.ts +97 -0
- package/conformance/dump.ts +163 -0
- package/conformance/fonts.json +157 -0
- package/conformance/manifest.json +233 -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/conformance/voice-wave-child.ts +102 -0
- package/dist/chunks/index-5fmaa0xq.js +8384 -0
- package/dist/chunks/index-5fmaa0xq.js.map +10 -0
- package/dist/chunks/index-62yzr94z.js +2784 -0
- package/dist/chunks/index-62yzr94z.js.map +10 -0
- package/dist/chunks/index-bg2jsgjq.js +8541 -0
- package/dist/chunks/index-bg2jsgjq.js.map +15 -0
- package/dist/chunks/index-fy7y2nz8.js +186 -0
- package/dist/chunks/index-fy7y2nz8.js.map +9 -0
- package/dist/chunks/index-gtk2gwsb.js +4555 -0
- package/dist/chunks/index-gtk2gwsb.js.map +31 -0
- package/dist/chunks/index-t6qz1770.js +95 -0
- package/dist/chunks/index-t6qz1770.js.map +11 -0
- package/dist/conformance.js +230462 -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 +194 -0
- package/dist/host/index.js.map +9 -0
- package/dist/index.js +3851 -0
- package/dist/index.js.map +30 -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 +904 -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 +27 -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 +161 -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 +225 -0
- package/dist/types/src/host/decoders.d.ts +61 -0
- package/dist/types/src/host/index.d.ts +15 -0
- package/dist/types/src/host/package.d.ts +102 -0
- package/dist/types/src/host/policy.d.ts +107 -0
- package/dist/types/src/host/record-store.d.ts +103 -0
- package/dist/types/src/host/records.d.ts +45 -0
- package/dist/types/src/host/router.d.ts +38 -0
- package/dist/types/src/host/runtime.d.ts +213 -0
- package/dist/types/src/host/signature.d.ts +52 -0
- package/dist/types/src/host/sources.d.ts +22 -0
- package/dist/types/src/host/tools.d.ts +42 -0
- package/dist/types/src/host/transports.d.ts +109 -0
- package/dist/types/src/index.d.ts +70 -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/qr-code.d.ts +30 -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-clusters.d.ts +11 -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 +75 -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 +320 -0
- package/dist/types/src/validate.d.ts +31 -0
- package/dist/types/src/voice-wave.d.ts +181 -0
- package/dist/types/src/web/base-css.d.ts +1 -0
- package/dist/types/src/web/box-css.d.ts +63 -0
- package/dist/types/src/web/coerce.d.ts +32 -0
- package/dist/types/src/web/custom-icons.generated.d.ts +4 -0
- package/dist/types/src/web/data.d.ts +107 -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 +126 -0
- package/dist/types/src/web/index.d.ts +35 -0
- package/dist/types/src/web/inputs.d.ts +55 -0
- package/dist/types/src/web/list.d.ts +16 -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 +63 -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 +50 -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/measure.d.ts +16 -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/primitives/voice-wave.d.ts +50 -0
- package/dist/types/src/web/round5.d.ts +107 -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 +2565 -0
- package/dist/web/index.js.map +28 -0
- package/dist/web/primitives/index.js +1476 -0
- package/dist/web/primitives/index.js.map +57 -0
- package/docs/components.generated.json +6783 -0
- package/docs/package-format.md +182 -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/round-5-contract.md +268 -0
- package/docs/themes.generated.json +3647 -0
- package/fixtures/animations.json +2890 -0
- package/fixtures/bench-list.json +58 -0
- package/fixtures/bind-time.json +54734 -0
- package/fixtures/catalog-basic-map.json +1692 -0
- package/fixtures/catalog-components.json +10293 -0
- package/fixtures/catalog-extension.json +620 -0
- package/fixtures/catalog-macros.json +51805 -0
- package/fixtures/code-tokens.json +1993 -0
- package/fixtures/conformance-baseline.json +59016 -0
- package/fixtures/conformance-cases.json +49 -0
- package/fixtures/conformance-known.json +2111 -0
- package/fixtures/control-geometry.json +5129 -0
- package/fixtures/dashboard.data.json +74 -0
- package/fixtures/dashboard.json +781 -0
- package/fixtures/demo-surface.json +47 -0
- package/fixtures/format.json +870 -0
- package/fixtures/host-package.json +1262 -0
- package/fixtures/host-policy.json +1209 -0
- package/fixtures/host-router.json +2034 -0
- package/fixtures/host-transport.json +590 -0
- package/fixtures/interactions-round1.json +1058 -0
- package/fixtures/kitchen-sink.expanded.json +11972 -0
- package/fixtures/kitchen-sink.json +3140 -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/pointer.json +89 -0
- package/fixtures/primitive-specimens.json +59 -0
- package/fixtures/prompt-budget.json +33 -0
- package/fixtures/qr-code.json +480 -0
- package/fixtures/resizable.json +714 -0
- package/fixtures/round4-contract.json +2985 -0
- package/fixtures/specimens.json +11168 -0
- package/fixtures/style-conditions.json +336 -0
- package/fixtures/template-items.json +2215 -0
- package/fixtures/text-clusters.json +65 -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 +1300 -0
- package/fixtures/theme-recipes.json +61762 -0
- package/fixtures/theme-resolved.json +25969 -0
- package/fixtures/toast-stack.json +215 -0
- package/fixtures/tree-guides.json +224 -0
- package/fixtures/virtual-list.json +733 -0
- package/fixtures/voice-wave.json +19236 -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 +2726 -0
- package/generated/core.runtime.json +3944 -0
- package/package.json +87 -4
- package/themes/exponential.recipes.json +49 -0
- package/themes/exponential.theme.json +768 -0
- package/themes/neutral.theme.json +6178 -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
- package/vendor/nayuki-qr/LICENSE.txt +20 -0
- package/vendor/nayuki-qr/README.md +10 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "VAPP-85 (D14): the ONE table from the A2UI basic catalog (vendor/a2ui/v0_9/basic_catalog.json) onto the core catalog. The reducer (src/reducer.ts, mirrored by the Rust core) applies it so painters never learn a second vocabulary; fixtures/catalog-basic-map.json locks the result. Per component: `to` = the core component, `props` = { coreProp: basicProp | {from, map?, default?} | {const} }, `children` = which basic field holds the child ids (`children` | `child`), `transform` = a NAMED structural step the reducer implements in code (listed under `transforms`, with what it does, so a second implementation knows the rules). A2UI dynamic values (`{path}` bindings, function calls) pass through untouched. `icons` maps the basic Icon names onto icons.json names (concept ids or registry Lucide names); `null` = no equivalent in the registry, painted as the placeholder icon `ui-icon-placeholder`. `functions` = identity, the core catalog exposes the same 14. A basic component absent from `components` becomes the `Unknown` placeholder (never an error).",
|
|
3
|
+
"from": "https://a2ui.org/specification/v0_9/basic_catalog.json",
|
|
4
|
+
"to": "https://ui.exponential.at/catalogs/core/v1",
|
|
5
|
+
"version": "v0.9",
|
|
6
|
+
"placeholderIcon": "ui-icon-placeholder",
|
|
7
|
+
"components": {
|
|
8
|
+
"Text": { "to": "Text", "props": { "text": "text" }, "transform": "textVariant" },
|
|
9
|
+
"Image": { "to": "Image", "props": { "src": "url", "alt": { "from": "description", "default": "" }, "fit": { "from": "fit", "default": "cover" } }, "transform": "imageVariant" },
|
|
10
|
+
"Icon": { "to": "Icon", "props": {}, "transform": "iconName" },
|
|
11
|
+
"Video": { "to": "Video", "props": { "src": "url" } },
|
|
12
|
+
"AudioPlayer": { "to": "AudioPlayer", "props": { "src": "url", "title": "description" } },
|
|
13
|
+
"Row": { "to": "Stack", "children": "children", "props": { "direction": { "const": "horizontal" }, "justify": { "from": "justify", "map": { "spaceBetween": "between", "spaceAround": "around", "spaceEvenly": "evenly", "stretch": "start" }, "default": "start" }, "align": { "from": "align", "default": "stretch" }, "gap": { "const": "sm" } } },
|
|
14
|
+
"Column": { "to": "Stack", "children": "children", "props": { "direction": { "const": "vertical" }, "justify": { "from": "justify", "map": { "spaceBetween": "between", "spaceAround": "around", "spaceEvenly": "evenly", "stretch": "start" }, "default": "start" }, "align": { "from": "align", "default": "stretch" }, "gap": { "const": "sm" } } },
|
|
15
|
+
"List": { "to": "List", "children": "children", "props": { "direction": { "from": "direction", "default": "vertical" }, "gap": { "const": "sm" } } },
|
|
16
|
+
"Card": { "to": "Card", "children": "child", "props": {} },
|
|
17
|
+
"Tabs": { "to": "Tabs", "props": {}, "transform": "tabs" },
|
|
18
|
+
"Modal": { "to": "Dialog", "props": {}, "transform": "modal" },
|
|
19
|
+
"Divider": { "to": "Separator", "props": { "orientation": { "from": "axis", "default": "horizontal" } } },
|
|
20
|
+
"Button": { "to": "Button", "props": { "variant": { "from": "variant", "map": { "primary": "default", "default": "secondary", "borderless": "ghost" }, "default": "secondary" } }, "transform": "buttonChild" },
|
|
21
|
+
"TextField": { "to": "Input", "props": { "label": "label", "value": "value", "checks": "checks" }, "transform": "textField" },
|
|
22
|
+
"CheckBox": { "to": "Checkbox", "props": { "label": "label", "checked": "value", "checks": "checks" }, "transform": "fieldName" },
|
|
23
|
+
"ChoicePicker": { "to": "Radio", "props": { "label": "label", "options": "options", "checks": "checks" }, "transform": "choicePicker" },
|
|
24
|
+
"Slider": { "to": "Slider", "props": { "label": "label", "min": { "from": "min", "default": 0 }, "max": "max", "value": "value" } },
|
|
25
|
+
"DateTimeInput": { "to": "DatePicker", "props": { "label": "label", "value": "value", "min": "min", "max": "max" }, "transform": "fieldName" }
|
|
26
|
+
},
|
|
27
|
+
"transforms": {
|
|
28
|
+
"textVariant": "variant h1..h4 → Heading{level}; h5 → Text{variant: label}; caption → Text{variant: caption}; body or absent → Text{variant: body}.",
|
|
29
|
+
"imageVariant": "variant avatar → Avatar{src: url, name: description}; icon → style width/height 24; smallFeature → style width/height 120; mediumFeature or absent → style width 100%, aspectRatio 1.7777778; largeFeature → the same; header → style width 100%, aspectRatio 3.",
|
|
30
|
+
"iconName": "name string → icons[name] (null or absent → placeholderIcon); name {path} (a custom glyph) → placeholderIcon.",
|
|
31
|
+
"tabs": "tabs[i] → props.tabs[i] = {label: title, value: child id}; children = the tab child ids in order; value = the first tab's child id.",
|
|
32
|
+
"modal": "trigger → slots.trigger; content → children[0]; props.open = false.",
|
|
33
|
+
"buttonChild": "child Text → props.label = its text (the Text node is consumed); child Icon → props.icon = the mapped icon name (consumed); any other child → children[0]; action → on.press (an A2UI Action verbatim); size icon when icon and no label.",
|
|
34
|
+
"textField": "name = id; variant longText → Textarea{label, value, checks}; number → Input{type: number}; obscured → Input{type: password}; shortText or absent → Input{type: text}; validationRegexp → one more check {condition: {call: regex, args: {value: {path: <the value binding's path, or the id>}, pattern}}, message: 'Invalid value'}.",
|
|
35
|
+
"fieldName": "name = id.",
|
|
36
|
+
"choicePicker": "name = id; options keep label/value; value (a list) → the first entry for single choice, comma-joined for multiple; filterable → Select{searchable: true, multiple: variant == multipleSelection}; else displayStyle chips → Segmented{type: single|multiple by variant, variant: outline, items: options}; else variant multipleSelection → Select{multiple: true}; else → Radio."
|
|
37
|
+
},
|
|
38
|
+
"icons": {
|
|
39
|
+
"accountCircle": "ui-assignee",
|
|
40
|
+
"add": "ui-add",
|
|
41
|
+
"arrowBack": "ui-back",
|
|
42
|
+
"arrowForward": "ui-arrow-right",
|
|
43
|
+
"attachFile": "ui-attach",
|
|
44
|
+
"calendarToday": "calendar",
|
|
45
|
+
"call": "phone",
|
|
46
|
+
"camera": "camera",
|
|
47
|
+
"check": "ui-check",
|
|
48
|
+
"close": "ui-close",
|
|
49
|
+
"delete": "ui-delete",
|
|
50
|
+
"download": "ui-download",
|
|
51
|
+
"edit": "ui-edit",
|
|
52
|
+
"event": "ui-due-date",
|
|
53
|
+
"error": "ui-error",
|
|
54
|
+
"fastForward": "media-fast-forward",
|
|
55
|
+
"favorite": "heart",
|
|
56
|
+
"favoriteOff": "ui-favorite-off",
|
|
57
|
+
"folder": "ui-folder",
|
|
58
|
+
"help": "ui-help",
|
|
59
|
+
"home": "house",
|
|
60
|
+
"info": "ui-info",
|
|
61
|
+
"locationOn": "map-pin",
|
|
62
|
+
"lock": "ui-private",
|
|
63
|
+
"lockOpen": "ui-unlock",
|
|
64
|
+
"mail": "ui-mail",
|
|
65
|
+
"menu": "ui-menu",
|
|
66
|
+
"moreVert": "ui-more-vertical",
|
|
67
|
+
"moreHoriz": "ui-more",
|
|
68
|
+
"notificationsOff": "ui-unsubscribe",
|
|
69
|
+
"notifications": "ui-subscribe",
|
|
70
|
+
"pause": "run-pause",
|
|
71
|
+
"payment": "credit-card",
|
|
72
|
+
"person": "ui-avatar-placeholder",
|
|
73
|
+
"phone": "smartphone",
|
|
74
|
+
"photo": "image",
|
|
75
|
+
"play": "action-run",
|
|
76
|
+
"print": "ui-print",
|
|
77
|
+
"refresh": "ui-refresh",
|
|
78
|
+
"rewind": "media-rewind",
|
|
79
|
+
"search": "nav-search",
|
|
80
|
+
"send": "ui-send",
|
|
81
|
+
"settings": "nav-settings",
|
|
82
|
+
"share": "ui-share",
|
|
83
|
+
"shoppingCart": "shopping-cart",
|
|
84
|
+
"skipNext": "media-skip-next",
|
|
85
|
+
"skipPrevious": "media-skip-previous",
|
|
86
|
+
"star": "star",
|
|
87
|
+
"starHalf": "ui-star-half",
|
|
88
|
+
"starOff": "ui-star-off",
|
|
89
|
+
"stop": "ui-stop",
|
|
90
|
+
"upload": "sc-push",
|
|
91
|
+
"visibility": "ui-watch",
|
|
92
|
+
"visibilityOff": "ui-hide",
|
|
93
|
+
"volumeDown": "media-volume-down",
|
|
94
|
+
"volumeMute": "media-volume-mute",
|
|
95
|
+
"volumeOff": "media-volume-off",
|
|
96
|
+
"volumeUp": "media-volume-up",
|
|
97
|
+
"warning": "ui-warning"
|
|
98
|
+
},
|
|
99
|
+
"functions": {
|
|
100
|
+
"required": "required", "regex": "regex", "length": "length", "numeric": "numeric", "email": "email",
|
|
101
|
+
"formatString": "formatString", "formatNumber": "formatNumber", "formatCurrency": "formatCurrency",
|
|
102
|
+
"formatDate": "formatDate", "pluralize": "pluralize", "openUrl": "openUrl", "and": "and", "or": "or", "not": "not"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Round 1 (docs/round-1-contract.md §3, CodeBlock): the BUILT-IN tokenizer every renderer mirrors so a CodeBlock colours the same on every platform (a host may still supply its own tokenizer; its kinds must be the `codeToken` enum). ONE scanner over the source (CRLF → LF), first rule that matches at the position wins: (1) `lineKinds` — at a line start (after spaces/tabs) a listed prefix makes the rest of the line that kind; (2) `lineComment` prefixes → comment to the end of the line; (3) `blockComment` [open, close] pairs → comment through close (or the end); (4) a quote in `strings` → string through the same unescaped quote (`\\` escapes the next char), stopping before a line break unless the quote is in `multiline`; with `keyStrings` a string followed by optional spaces and `:` is a `property`; (5) with `markup`, `<` followed by a letter, `/` or `!` opens a tag: `<`/`</` punctuation, the name `tag`, then whitespace plain, quotes string, `=` operator, names `attribute`, until `>`/`/>` punctuation (text outside tags is plain); (6) numbers (unless `numbers` is false): a digit, or `.` before a digit, then every [0-9A-Za-z_.]; (7) identifiers: [A-Za-z_$] plus `identExtra`, then the same plus digits: `keywords` (lower-cased first when `caseInsensitive`) → keyword; with `keyIdents` followed by spaces and a single `:` → property; followed by spaces and `(` → function; right after a `.` punctuation → property; in `typeNames` or (with `types: capitalized`) starting A–Z → type; else plain; (8) a run of spaces/tabs → plain; (9) a run of `operators` chars → operator; (10) one `punctuation` char → punctuation; (11) anything else, one char → plain. Then tokens split at line breaks into LINES and adjacent tokens of one kind merge; a line's tokens concatenate to exactly its text. src/code.ts is the reference, fixtures/code-tokens.json locks it. EXP-1324 `ansi` (the Terminal pattern: command output): BEFORE the scanner, every ANSI CSI escape (ESC `[` params 0x30-0x3F, intermediates 0x20-0x2F, one final 0x40-0x7E) is REMOVED from the source and the remaining text is split into runs by SGR (final `m`) colour: params 31/91 → `error`, 32/92 → `success`, 33/93 → `warning`, 2/90 → `comment`, 0/39/none → no colour, every other param leaves the colour as it was (params apply left to right). A run WITH a colour is that kind, verbatim (no rules). Runs without a colour go through the ordinary scanner with this language spec — which has only `lineKinds` (longest listed prefix wins), so an uncoloured line is either one lineKinds kind from its prefix on, or plain. Tokens then split into lines and merge as usual. The escapes never reach the text: a line's tokens concatenate to its text WITHOUT them (copy copies that text).",
|
|
3
|
+
"defaults": { "operators": "+-*/%=&|<>!?^~:@#", "punctuation": "()[]{},.;" },
|
|
4
|
+
"languages": {
|
|
5
|
+
"plain": { "plain": true },
|
|
6
|
+
"json": { "strings": ["\""], "keywords": ["true", "false", "null"], "keyStrings": true },
|
|
7
|
+
"js": {
|
|
8
|
+
"lineComment": ["//"], "blockComment": [["/*", "*/"]], "strings": ["\"", "'", "`"], "multiline": ["`"], "types": "capitalized",
|
|
9
|
+
"keywords": ["async", "await", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "export", "extends", "false", "finally", "for", "from", "function", "if", "import", "in", "instanceof", "let", "new", "null", "of", "return", "static", "super", "switch", "this", "throw", "true", "try", "typeof", "undefined", "var", "void", "while", "with", "yield"]
|
|
10
|
+
},
|
|
11
|
+
"ts": {
|
|
12
|
+
"lineComment": ["//"], "blockComment": [["/*", "*/"]], "strings": ["\"", "'", "`"], "multiline": ["`"], "types": "capitalized",
|
|
13
|
+
"typeNames": ["any", "bigint", "boolean", "never", "number", "object", "string", "symbol", "unknown"],
|
|
14
|
+
"keywords": ["abstract", "as", "async", "await", "break", "case", "catch", "class", "const", "continue", "declare", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "from", "function", "if", "implements", "import", "in", "infer", "instanceof", "interface", "is", "keyof", "let", "namespace", "new", "null", "of", "private", "protected", "public", "readonly", "return", "satisfies", "static", "super", "switch", "this", "throw", "true", "try", "type", "typeof", "undefined", "var", "void", "while", "yield"]
|
|
15
|
+
},
|
|
16
|
+
"tsx": {
|
|
17
|
+
"lineComment": ["//"], "blockComment": [["/*", "*/"]], "strings": ["\"", "'", "`"], "multiline": ["`"], "types": "capitalized",
|
|
18
|
+
"typeNames": ["any", "bigint", "boolean", "never", "number", "object", "string", "symbol", "unknown"],
|
|
19
|
+
"keywords": ["abstract", "as", "async", "await", "break", "case", "catch", "class", "const", "continue", "declare", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "from", "function", "if", "implements", "import", "in", "infer", "instanceof", "interface", "is", "keyof", "let", "namespace", "new", "null", "of", "private", "protected", "public", "readonly", "return", "satisfies", "static", "super", "switch", "this", "throw", "true", "try", "type", "typeof", "undefined", "var", "void", "while", "yield"]
|
|
20
|
+
},
|
|
21
|
+
"rust": {
|
|
22
|
+
"lineComment": ["//"], "blockComment": [["/*", "*/"]], "strings": ["\""], "multiline": ["\""], "types": "capitalized",
|
|
23
|
+
"typeNames": ["bool", "char", "f32", "f64", "i8", "i16", "i32", "i64", "i128", "isize", "str", "u8", "u16", "u32", "u64", "u128", "usize"],
|
|
24
|
+
"keywords": ["as", "async", "await", "break", "const", "continue", "crate", "dyn", "else", "enum", "extern", "false", "fn", "for", "if", "impl", "in", "let", "loop", "match", "mod", "move", "mut", "pub", "ref", "return", "self", "Self", "static", "struct", "super", "trait", "true", "type", "unsafe", "use", "where", "while"]
|
|
25
|
+
},
|
|
26
|
+
"swift": {
|
|
27
|
+
"lineComment": ["//"], "blockComment": [["/*", "*/"]], "strings": ["\""], "types": "capitalized",
|
|
28
|
+
"keywords": ["any", "as", "associatedtype", "async", "await", "break", "case", "catch", "class", "continue", "default", "defer", "do", "else", "enum", "extension", "fallthrough", "false", "for", "func", "guard", "if", "import", "in", "init", "inout", "internal", "is", "let", "nil", "private", "protocol", "public", "repeat", "rethrows", "return", "self", "Self", "some", "static", "struct", "subscript", "super", "switch", "throw", "throws", "true", "try", "typealias", "var", "where", "while"]
|
|
29
|
+
},
|
|
30
|
+
"kotlin": {
|
|
31
|
+
"lineComment": ["//"], "blockComment": [["/*", "*/"]], "strings": ["\"", "'"], "types": "capitalized",
|
|
32
|
+
"keywords": ["as", "break", "by", "catch", "class", "companion", "constructor", "continue", "data", "do", "else", "enum", "false", "finally", "for", "fun", "if", "import", "in", "init", "interface", "internal", "is", "lateinit", "null", "object", "open", "override", "package", "private", "protected", "public", "return", "sealed", "super", "suspend", "this", "throw", "true", "try", "typealias", "val", "var", "when", "while"]
|
|
33
|
+
},
|
|
34
|
+
"python": {
|
|
35
|
+
"lineComment": ["#"], "strings": ["\"", "'"], "types": "capitalized",
|
|
36
|
+
"keywords": ["False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue", "def", "del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "nonlocal", "not", "or", "pass", "raise", "return", "self", "try", "while", "with", "yield"]
|
|
37
|
+
},
|
|
38
|
+
"bash": {
|
|
39
|
+
"lineComment": ["#"], "strings": ["\"", "'"], "multiline": ["\"", "'"],
|
|
40
|
+
"keywords": ["case", "do", "done", "echo", "elif", "else", "esac", "exit", "export", "fi", "for", "function", "if", "in", "local", "readonly", "return", "then", "until", "while"]
|
|
41
|
+
},
|
|
42
|
+
"html": { "markup": true, "blockComment": [["<!--", "-->"]], "strings": ["\"", "'"], "numbers": false },
|
|
43
|
+
"css": {
|
|
44
|
+
"blockComment": [["/*", "*/"]], "strings": ["\"", "'"], "identExtra": "-@", "keyIdents": true, "operators": "+*/%=&|<>!?^~:#",
|
|
45
|
+
"keywords": ["@container", "@font-face", "@import", "@keyframes", "@layer", "@media", "@supports", "auto", "important", "inherit", "initial", "none", "unset"]
|
|
46
|
+
},
|
|
47
|
+
"sql": {
|
|
48
|
+
"lineComment": ["--"], "blockComment": [["/*", "*/"]], "strings": ["'", "\""], "caseInsensitive": true,
|
|
49
|
+
"keywords": ["all", "alter", "and", "as", "asc", "between", "by", "case", "create", "default", "delete", "desc", "distinct", "drop", "else", "end", "exists", "foreign", "from", "group", "having", "in", "index", "inner", "insert", "into", "is", "join", "key", "left", "like", "limit", "not", "null", "offset", "on", "or", "order", "outer", "primary", "references", "returning", "right", "select", "set", "table", "then", "union", "update", "values", "when", "where", "with"]
|
|
50
|
+
},
|
|
51
|
+
"yaml": { "lineComment": ["#"], "strings": ["\"", "'"], "keyIdents": true, "identExtra": "-", "keywords": ["true", "false", "null", "yes", "no"] },
|
|
52
|
+
"markdown": { "lineKinds": { "#": "keyword", ">": "comment" }, "strings": ["`"], "numbers": false, "operators": "", "punctuation": "" },
|
|
53
|
+
"ansi": {
|
|
54
|
+
"ansi": true, "numbers": false, "operators": "", "punctuation": "",
|
|
55
|
+
"lineKinds": { "$ ": "comment", "> ": "comment", "BUILD SUCCESSFUL": "success", "BUILD FAILED": "error", "PASS ": "success", "FAIL ": "error", "FAILED": "error", "(pass)": "success", "(fail)": "error", "test result: ok": "success", "test result: FAILED": "error", "error:": "error", "error[": "error", "Error:": "error", "warning:": "warning", "✓": "success", "✔": "success", "✗": "error", "✘": "error" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|