@fuaran-ui/conformance 0.5.0 → 0.6.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.
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "version": 1,
3
3
  "schema": "schema.json",
4
+ "idl": "idl.json",
4
5
  "description": "Fuaran canonical wire-format conformance corpus. node-round-trip / op-round-trip fixtures: decode inputFile, re-encode, assert byte-equal to expectedFile. reject fixtures: decode inputFile, assert DecodeError.Code = expectedErrorCode and DecodeError.Path starts with expectedPath. lenient-accept fixtures (WIRE_FORMAT 16): decode the SHORTHAND inputFile, re-encode, assert byte-equal to expectedFile (the verbose canonical form) — a conformant host MUST accept the shorthand and normalise it; rejecting it, or decoding it to different bytes, is non-conformant. envelope-round-trip / envelope-reject fixtures (WIRE_FORMAT 15): read the $profile/$payload envelope, negotiate the authored profile against the host's own core@1.0, then either re-render byte-equal to expectedFile (Current/Behind — unknown kinds preserved verbatim, must-ignore-but-preserve) or refuse a Foreign profile with expectedErrorCode FOREIGN_PROFILE at expectedPath. elicitation-round-trip / elicitation-reject fixtures (WIRE_FORMAT 18): decode with the decoder-named entry point (elicitation = the envelope codec, elicitation-outcome = the outcome codec), then either re-encode byte-equal to expectedFile or assert the structured refusal (expectedErrorCode at a path starting with expectedPath). elicitation-answer-accept / elicitation-answer-reject fixtures (WIRE_FORMAT 18.4): the inputFile pairs {answer, contract}; run the host's answer-conformance validation and assert acceptance or the expected refusal. See fuaran-dotnet/docs/WIRE_FORMAT.md.",
5
6
  "kinds": [
6
7
  "Badge",
@@ -53,7 +54,8 @@
53
54
  "RangedNumber",
54
55
  "SegmentedChoice",
55
56
  "Text",
56
- "TextArea"
57
+ "TextArea",
58
+ "Toggle"
57
59
  ],
58
60
  "fixtures": [
59
61
  {
@@ -1032,6 +1034,14 @@
1032
1034
  "expectedFile": "nodes/drawing-empty.json",
1033
1035
  "description": "Display/Drawing (degenerate — empty)"
1034
1036
  },
1037
+ {
1038
+ "id": "empty-state-card",
1039
+ "kind": "node-round-trip",
1040
+ "decoder": "node",
1041
+ "inputFile": "nodes/empty-state-card.json",
1042
+ "expectedFile": "nodes/empty-state-card.json",
1043
+ "description": "Layout/Box (Phase 767 — the canonical empty state with a CTA: one Card region, no nested Callout)"
1044
+ },
1035
1045
  {
1036
1046
  "id": "fact-1",
1037
1047
  "kind": "node-round-trip",
@@ -1152,6 +1162,14 @@
1152
1162
  "expectedFile": "nodes/form-segmented.json",
1153
1163
  "description": "Input/Form (SegmentedChoice horizontal + vertical)"
1154
1164
  },
1165
+ {
1166
+ "id": "form-toggle",
1167
+ "kind": "node-round-trip",
1168
+ "decoder": "node",
1169
+ "inputFile": "nodes/form-toggle.json",
1170
+ "expectedFile": "nodes/form-toggle.json",
1171
+ "description": "Input/Form (Phase 766 — the Toggle switch affordance beside a Checkbox)"
1172
+ },
1155
1173
  {
1156
1174
  "id": "format-bindings",
1157
1175
  "kind": "node-round-trip",
@@ -1328,6 +1346,14 @@
1328
1346
  "expectedFile": "nodes/markdown-1.json",
1329
1347
  "description": "Display/Markdown"
1330
1348
  },
1349
+ {
1350
+ "id": "master-detail-multi-field",
1351
+ "kind": "node-round-trip",
1352
+ "decoder": "node",
1353
+ "inputFile": "nodes/master-detail-multi-field.json",
1354
+ "expectedFile": "nodes/master-detail-multi-field.json",
1355
+ "description": "Layout/Box (master-detail — ONE selection feeding N slots, each projecting a DIFFERENT field)"
1356
+ },
1331
1357
  {
1332
1358
  "id": "master-detail-preselected",
1333
1359
  "kind": "node-round-trip",
@@ -1432,6 +1458,14 @@
1432
1458
  "expectedFile": "nodes/multiselect-1.json",
1433
1459
  "description": "Input/Select (multi-select — list value)"
1434
1460
  },
1461
+ {
1462
+ "id": "now-environment-binding",
1463
+ "kind": "node-round-trip",
1464
+ "decoder": "node",
1465
+ "inputFile": "nodes/now-environment-binding.json",
1466
+ "expectedFile": "nodes/now-environment-binding.json",
1467
+ "description": "Binding/Now (Phase 765 — the host-furnished instant: a text slot + a Transform param feeding dateDiffDays)"
1468
+ },
1435
1469
  {
1436
1470
  "id": "progress-1",
1437
1471
  "kind": "node-round-trip",
@@ -1536,6 +1570,14 @@
1536
1570
  "expectedFile": "nodes/switch-1.json",
1537
1571
  "description": "Switch (view state → details/summary cases + info default)"
1538
1572
  },
1573
+ {
1574
+ "id": "switch-on-selection",
1575
+ "kind": "node-round-trip",
1576
+ "decoder": "node",
1577
+ "inputFile": "nodes/switch-on-selection.json",
1578
+ "expectedFile": "nodes/switch-on-selection.json",
1579
+ "description": "Meta/Switch (Phase 768 — the selector widened: `on` takes a Selection, the branch follows the clicked row)"
1580
+ },
1539
1581
  {
1540
1582
  "id": "table-1",
1541
1583
  "kind": "node-round-trip",
@@ -0,0 +1 @@
1
+ {"id":"empty-state-card","kind":{"$type":"Box","children":[{"id":"empty-state-note","kind":{"$type":"Markdown","text":"Searches you save will appear here so you can re-run them with one click."}},{"id":"empty-state-cta","kind":{"$type":"Button","icon":"search","label":"Browse jobs","onClick":{"$type":"Chain","ops":[]},"variant":"Primary"}}],"heading":"No saved searches yet","layout":{"$type":"Flex","direction":"Vertical","wrap":false},"role":"Card"}}
@@ -0,0 +1 @@
1
+ {"id":"form-toggle","kind":{"$type":"Form","fields":[{"id":"irrigation-running","kind":{"$type":"Toggle"},"label":"Irrigation","required":false},{"id":"accept-terms","kind":{"$type":"Checkbox"},"label":"I accept the terms","required":true}],"onSubmit":{"$type":"Chain","ops":[]},"submitLabel":"Save"}}
@@ -0,0 +1 @@
1
+ {"id":"master-detail-multi-field","kind":{"$type":"Box","children":[{"id":"ticket-grid","kind":{"$type":"DataGrid","columns":[{"field":"id","kind":{"$type":"Text"},"label":"Ticket"},{"field":"priority","kind":{"$type":"Text"},"label":"Priority"},{"field":"assignee","kind":{"$type":"Text"},"label":"Assignee"}],"rowKeyField":"id","source":{"$type":"Transform","pipeline":[],"source":{"columns":{"assignee":{"validity":[true,true],"values":["R. Okafor","M. Lindqvist"]},"id":{"validity":[true,true],"values":["TCK-2041","TCK-2042"]},"priority":{"validity":[true,true],"values":["high","low"]}},"schema":[{"name":"id","type":"string"},{"name":"priority","type":"string"},{"name":"assignee","type":"string"}]}}}},{"id":"ticket-detail","kind":{"$type":"Box","children":[{"id":"detail-ticket","kind":{"$type":"Fact","label":"Selected ticket","value":{"$type":"Bound","binding":{"$type":"Selection","defaultValue":"TCK-2041","field":"id","nodeId":"ticket-grid"}}}},{"id":"detail-priority","kind":{"$type":"Fact","label":"Priority","value":{"$type":"Bound","binding":{"$type":"Selection","defaultValue":"TCK-2041","field":"priority","nodeId":"ticket-grid"}}}},{"id":"detail-assignee","kind":{"$type":"Fact","label":"Assignee","value":{"$type":"Bound","binding":{"$type":"Selection","defaultValue":"TCK-2041","field":"assignee","nodeId":"ticket-grid"}}}},{"id":"detail-note","kind":{"$type":"Callout","body":{"$type":"Bound","binding":{"$type":"Selection","defaultValue":"R. Okafor","field":"assignee","nodeId":"ticket-grid"}},"heading":"Assigned to","tone":"Info"}}],"heading":"Ticket detail","layout":{"$type":"Flex","direction":"Vertical","wrap":false},"role":"Card"}}],"layout":{"$type":"Auto"},"role":"Dashboard"}}
@@ -0,0 +1 @@
1
+ {"id":"now-environment-binding","kind":{"$type":"Box","children":[{"id":"today-fact","kind":{"$type":"Fact","label":"Today","value":{"$type":"Bound","binding":{"$type":"Now"}}}},{"id":"overdue-grid","kind":{"$type":"DataGrid","columns":[{"field":"id","kind":{"$type":"Text"},"label":"Invoice"},{"field":"due","kind":{"$type":"Text"},"label":"Due"},{"field":"daysOverdue","kind":{"$type":"Text"},"label":"Days overdue"}],"rowKeyField":"id","source":{"$type":"Transform","params":[{"from":{"$type":"Now"},"name":"today"}],"pipeline":[{"$type":"derive","expr":{"$type":"apply","args":[{"$type":"param","name":"today"},{"$type":"col","name":"due"}],"fn":"dateDiffDays"},"name":"daysOverdue"}],"source":{"columns":{"due":{"validity":[true,true],"values":["2026-07-01","2026-07-28"]},"id":{"validity":[true,true],"values":["INV-1001","INV-1002"]}},"schema":[{"name":"id","type":"string"},{"name":"due","type":"string"}]}}}}],"layout":{"$type":"Auto"},"role":"Dashboard"}}
@@ -0,0 +1 @@
1
+ {"id":"switch-on-selection","kind":{"$type":"Box","children":[{"id":"ward-grid","kind":{"$type":"DataGrid","columns":[{"field":"id","kind":{"$type":"Text"},"label":"Ward"},{"field":"status","kind":{"$type":"Text"},"label":"Status"}],"rowKeyField":"id","source":{"$type":"Transform","pipeline":[],"source":{"columns":{"id":{"validity":[true,true],"values":["WARD-A","WARD-B"]},"status":{"validity":[true,true],"values":["steady","critical"]}},"schema":[{"name":"id","type":"string"},{"name":"status","type":"string"}]}}}},{"id":"ward-status-panel","kind":{"$type":"Switch","cases":[{"child":{"id":"ward-critical","kind":{"$type":"Callout","body":"Escalate admissions to the on-call manager.","heading":"Ward at capacity","tone":"Critical"}},"match":"critical"}],"default":{"id":"ward-steady","kind":{"$type":"Markdown","text":"Occupancy within normal range."}},"on":{"$type":"Selection","defaultValue":"steady","field":"status","nodeId":"ward-grid"}}}],"layout":{"$type":"Auto"},"role":"Dashboard"}}
@@ -350,6 +350,17 @@
350
350
  "fn"
351
351
  ]
352
352
  },
353
+ {
354
+ "type": "object",
355
+ "properties": {
356
+ "$type": {
357
+ "const": "Now"
358
+ }
359
+ },
360
+ "required": [
361
+ "$type"
362
+ ]
363
+ },
353
364
  {
354
365
  "type": "object",
355
366
  "properties": {
@@ -1187,6 +1198,23 @@
1187
1198
  "$type"
1188
1199
  ]
1189
1200
  },
1201
+ {
1202
+ "type": "object",
1203
+ "properties": {
1204
+ "$type": {
1205
+ "const": "Toggle"
1206
+ },
1207
+ "onToggle": {
1208
+ "const": "<closure>"
1209
+ },
1210
+ "value": {
1211
+ "$ref": "#/$defs/Binding"
1212
+ }
1213
+ },
1214
+ "required": [
1215
+ "$type"
1216
+ ]
1217
+ },
1190
1218
  {
1191
1219
  "type": "object",
1192
1220
  "properties": {
@@ -4012,41 +4040,61 @@
4012
4040
  ]
4013
4041
  },
4014
4042
  {
4015
- "type": "object",
4016
- "properties": {
4017
- "$type": {
4018
- "const": "Switch"
4019
- },
4020
- "cases": {
4021
- "type": "array",
4022
- "items": {
4023
- "type": "object",
4024
- "properties": {
4025
- "child": {
4026
- "$ref": "#/$defs/Node"
4027
- },
4028
- "match": {
4029
- "type": "string"
4043
+ "allOf": [
4044
+ {
4045
+ "type": "object",
4046
+ "properties": {
4047
+ "$type": {
4048
+ "const": "Switch"
4049
+ },
4050
+ "cases": {
4051
+ "type": "array",
4052
+ "items": {
4053
+ "type": "object",
4054
+ "properties": {
4055
+ "child": {
4056
+ "$ref": "#/$defs/Node"
4057
+ },
4058
+ "match": {
4059
+ "type": "string"
4060
+ }
4061
+ },
4062
+ "required": [
4063
+ "child",
4064
+ "match"
4065
+ ]
4030
4066
  }
4031
4067
  },
4032
- "required": [
4033
- "child",
4034
- "match"
4035
- ]
4036
- }
4037
- },
4038
- "default": {
4039
- "$ref": "#/$defs/Node"
4068
+ "default": {
4069
+ "$ref": "#/$defs/Node"
4070
+ },
4071
+ "stateKey": {
4072
+ "type": "string"
4073
+ },
4074
+ "on": {
4075
+ "$ref": "#/$defs/Binding"
4076
+ }
4077
+ },
4078
+ "required": [
4079
+ "$type",
4080
+ "cases",
4081
+ "default"
4082
+ ]
4040
4083
  },
4041
- "stateKey": {
4042
- "type": "string"
4084
+ {
4085
+ "anyOf": [
4086
+ {
4087
+ "required": [
4088
+ "stateKey"
4089
+ ]
4090
+ },
4091
+ {
4092
+ "required": [
4093
+ "on"
4094
+ ]
4095
+ }
4096
+ ]
4043
4097
  }
4044
- },
4045
- "required": [
4046
- "$type",
4047
- "cases",
4048
- "default",
4049
- "stateKey"
4050
4098
  ]
4051
4099
  },
4052
4100
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuaran-ui/conformance",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Third-party certification kit for the Fuaran UI wire format — runs any candidate implementation (via a small decode/encode adapter) over the bundled canonical fixture corpus and emits a per-leg pass/fail conformance report naming the corpus version. See CONFORMANCE.md for the certification procedure.",
5
5
  "keywords": [
6
6
  "fuaran",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^22.10.2",
46
- "@fuaran-ui/ops": "0.5.0",
47
- "@fuaran-ui/schema": "0.5.0"
46
+ "@fuaran-ui/ops": "0.6.0",
47
+ "@fuaran-ui/schema": "0.6.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"