@exponential_app/eui 0.2.1 → 0.3.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.
Files changed (66) hide show
  1. package/catalog/a11y.json +15 -1
  2. package/catalog/core.catalog.json +142 -0
  3. package/catalog/core.schema.json +198 -1
  4. package/catalog/host.json +10 -0
  5. package/catalog/macros.json +541 -1
  6. package/catalog/recipes.json +2 -2
  7. package/catalog/strings.json +5 -0
  8. package/catalog/theme.schema.json +2066 -212
  9. package/conformance/manifest.json +5 -5
  10. package/dist/chunks/{index-gtk2gwsb.js → index-4z7f2bp1.js} +160 -33
  11. package/dist/chunks/{index-gtk2gwsb.js.map → index-4z7f2bp1.js.map} +6 -5
  12. package/dist/chunks/{index-5fmaa0xq.js → index-abcjanhc.js} +629 -3
  13. package/dist/chunks/{index-5fmaa0xq.js.map → index-abcjanhc.js.map} +2 -2
  14. package/dist/chunks/{index-62yzr94z.js → index-dx45asrf.js} +99 -3
  15. package/dist/chunks/{index-62yzr94z.js.map → index-dx45asrf.js.map} +2 -2
  16. package/dist/chunks/{index-bg2jsgjq.js → index-h3zgfghf.js} +304 -6
  17. package/dist/chunks/{index-bg2jsgjq.js.map → index-h3zgfghf.js.map} +2 -2
  18. package/dist/conformance.js +7901 -614
  19. package/dist/conformance.js.map +2 -2
  20. package/dist/entries/prompt.js +2 -2
  21. package/dist/entries/schema.js +2 -2
  22. package/dist/host/index.js +20 -4
  23. package/dist/host/index.js.map +1 -1
  24. package/dist/index.js +35 -5
  25. package/dist/index.js.map +2 -2
  26. package/dist/types/src/catalog.generated.d.ts +23 -3
  27. package/dist/types/src/host/contract.d.ts +17 -0
  28. package/dist/types/src/host/exposes.d.ts +68 -0
  29. package/dist/types/src/host/index.d.ts +1 -0
  30. package/dist/types/src/host/package.d.ts +8 -0
  31. package/dist/types/src/web/primitives/carousel.d.ts +17 -0
  32. package/dist/types/src/web/primitives/index.d.ts +3 -0
  33. package/dist/types/src/web/primitives/mosaic.d.ts +30 -0
  34. package/dist/types/src/web/primitives/outline.d.ts +22 -0
  35. package/dist/web/index.js +8 -2
  36. package/dist/web/index.js.map +4 -4
  37. package/dist/web/primitives/index.js +59 -1
  38. package/dist/web/primitives/index.js.map +6 -3
  39. package/docs/components.generated.json +150 -1
  40. package/docs/package-format.md +56 -1
  41. package/docs/round-6-contract.md +108 -0
  42. package/docs/themes.generated.json +39 -2
  43. package/fixtures/bind-time.json +1464 -0
  44. package/fixtures/catalog-components.json +96 -0
  45. package/fixtures/catalog-macros.json +1159 -48
  46. package/fixtures/conformance-baseline.json +46073 -44448
  47. package/fixtures/conformance-known.json +76 -64
  48. package/fixtures/host-router.json +539 -1
  49. package/fixtures/kitchen-sink.expanded.json +614 -1
  50. package/fixtures/kitchen-sink.json +69 -1
  51. package/fixtures/primitive-specimens.json +3 -0
  52. package/fixtures/prompt-budget.json +14 -14
  53. package/fixtures/specimens.json +122 -0
  54. package/fixtures/theme-recipes.json +4617 -1691
  55. package/fixtures/theme-resolved.json +1154 -2
  56. package/generated/ExponentialUICatalog.generated.kt +13 -13
  57. package/generated/ExponentialUICatalog.generated.swift +13 -13
  58. package/generated/ExponentialUIThemes.generated.kt +7 -7
  59. package/generated/ExponentialUIThemes.generated.swift +7 -7
  60. package/generated/catalog.descriptions.generated.rs +1 -1
  61. package/generated/catalog.generated.rs +18 -18
  62. package/generated/catalog.themes.generated.rs +8 -8
  63. package/generated/core.descriptions.json +96 -0
  64. package/generated/core.runtime.json +86 -0
  65. package/package.json +1 -1
  66. package/themes/neutral.theme.json +288 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "VAPP-91: the host router (catalog/host.json ops): server messages in, ops out, in order. Inputs hand-written; `expected` filled by the generator from src/host/router.ts. A conformance runner creates ONE router per flow with `extensionIds`, installs `packages` (their install issues are `installIssues`), then routes every step's message and compares the ops. VAPP-122: `records` = validateRecord(packages[package].records[kind].schema, data) → issues; `acme.hours` declares two kinds, `acme.badrecords` every schema mistake. Keys of `records` and of every `properties` are written in sorted order: the Rust core iterates its maps sorted, so the issue order is the same on every platform. VAPP-161 (format version 2): `acme.v2` uses every new key validly (formatVersion, a records: binding, the records.* functions, the three tool transports, an empty extensions list); `acme.charts` declares an extension: not available under the default catalogs, installed by the VAPP-161 flow that registers it; `acme.v2broken` makes every tools / extensions / records-source mistake; `acme.future` is a newer format version; `acme.v1` is a version-1 package that stays valid.",
2
+ "$comment": "VAPP-91: the host router (catalog/host.json ops): server messages in, ops out, in order. Inputs hand-written; `expected` filled by the generator from src/host/router.ts. A conformance runner creates ONE router per flow with `extensionIds`, installs `packages` (their install issues are `installIssues`), then routes every step's message and compares the ops. VAPP-122: `records` = validateRecord(packages[package].records[kind].schema, data) → issues; `acme.hours` declares two kinds, `acme.badrecords` every schema mistake. Keys of `records` and of every `properties` are written in sorted order: the Rust core iterates its maps sorted, so the issue order is the same on every platform. VAPP-161 (format version 2): `acme.v2` uses every new key validly (formatVersion, a records: binding, the records.* functions, the three tool transports, an empty extensions list); `acme.charts` declares an extension: not available under the default catalogs, installed by the VAPP-161 flow that registers it; `acme.v2broken` makes every tools / extensions / records-source mistake; `acme.future` is a newer format version; `acme.v1` is a version-1 package that stays valid. VAPP-180: `acme.exposes` declares `upstreams` and valid `exposes` (a records read and upsert, two action bindings, an upstream); `acme.badexposes` makes every format mistake of an exposed tool, a duplicate upstream included; `acme.exposeslist` has neither list a list.",
3
3
  "packages": {
4
4
  "acme.devices": {
5
5
  "id": "acme.devices",
@@ -556,6 +556,426 @@
556
556
  ]
557
557
  }
558
558
  ]
559
+ },
560
+ "acme.exposes": {
561
+ "id": "acme.exposes",
562
+ "name": "Hours with tools",
563
+ "version": "1.0.0",
564
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
565
+ "templates": {
566
+ "t": {
567
+ "components": [
568
+ {
569
+ "id": "root",
570
+ "component": "Column"
571
+ }
572
+ ]
573
+ }
574
+ },
575
+ "records": {
576
+ "entry": {
577
+ "schema": {
578
+ "type": "object",
579
+ "properties": {
580
+ "date": {
581
+ "type": "string",
582
+ "format": "date"
583
+ },
584
+ "hours": {
585
+ "type": "number"
586
+ }
587
+ },
588
+ "required": [
589
+ "date"
590
+ ]
591
+ }
592
+ }
593
+ },
594
+ "upstreams": [
595
+ "m5"
596
+ ],
597
+ "exposes": [
598
+ {
599
+ "name": "list_entries",
600
+ "title": "List entries",
601
+ "description": "The time entries of a day.",
602
+ "input": {
603
+ "type": "object",
604
+ "properties": {
605
+ "day": {
606
+ "type": "string"
607
+ },
608
+ "limit": {
609
+ "type": "integer"
610
+ }
611
+ }
612
+ },
613
+ "access": "read",
614
+ "run": {
615
+ "records": {
616
+ "op": "list",
617
+ "kind": "entry",
618
+ "where": {
619
+ "date": "${input.day}"
620
+ },
621
+ "limit": "${input.limit}"
622
+ }
623
+ }
624
+ },
625
+ {
626
+ "name": "add_entry",
627
+ "title": "Add an entry",
628
+ "description": "Log hours.",
629
+ "input": {
630
+ "type": "object",
631
+ "properties": {
632
+ "entry": {
633
+ "type": "object"
634
+ }
635
+ },
636
+ "required": [
637
+ "entry"
638
+ ]
639
+ },
640
+ "access": "write",
641
+ "run": {
642
+ "records": {
643
+ "op": "upsert",
644
+ "kind": "entry",
645
+ "data": "${input.entry}"
646
+ }
647
+ }
648
+ },
649
+ {
650
+ "name": "log_comment",
651
+ "title": "Log a comment",
652
+ "description": "Comment the logged hours on an issue.",
653
+ "input": {
654
+ "type": "object",
655
+ "properties": {
656
+ "hours": {
657
+ "type": "number"
658
+ },
659
+ "issue": {
660
+ "type": "string"
661
+ }
662
+ }
663
+ },
664
+ "access": "write",
665
+ "run": {
666
+ "action": "exponential.comments.create",
667
+ "args": {
668
+ "body": "Logged ${input.hours} h",
669
+ "issueId": "${input.issue}"
670
+ }
671
+ }
672
+ },
673
+ {
674
+ "name": "open_issues",
675
+ "title": "Open issues",
676
+ "description": "A write tool over a read only narrows who sees it.",
677
+ "input": {
678
+ "type": "object"
679
+ },
680
+ "access": "write",
681
+ "run": {
682
+ "action": "exponential.issues.list",
683
+ "args": {}
684
+ }
685
+ },
686
+ {
687
+ "name": "find_customer",
688
+ "title": "Find a customer",
689
+ "description": "Search m5 customers.",
690
+ "input": {
691
+ "type": "object",
692
+ "properties": {
693
+ "q": {
694
+ "type": "string"
695
+ }
696
+ }
697
+ },
698
+ "access": "read",
699
+ "run": {
700
+ "upstream": "m5",
701
+ "tool": "search_customers",
702
+ "args": {
703
+ "query": "${input.q}"
704
+ }
705
+ }
706
+ }
707
+ ]
708
+ },
709
+ "acme.badexposes": {
710
+ "id": "acme.badexposes",
711
+ "name": "Bad tools",
712
+ "version": "1.0.0",
713
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
714
+ "templates": {
715
+ "t": {
716
+ "components": [
717
+ {
718
+ "id": "root",
719
+ "component": "Column"
720
+ }
721
+ ]
722
+ }
723
+ },
724
+ "records": {
725
+ "entry": {
726
+ "schema": {
727
+ "type": "object",
728
+ "properties": {
729
+ "date": {
730
+ "type": "string",
731
+ "format": "date"
732
+ },
733
+ "hours": {
734
+ "type": "number"
735
+ }
736
+ },
737
+ "required": [
738
+ "date"
739
+ ]
740
+ }
741
+ }
742
+ },
743
+ "upstreams": [
744
+ "m5",
745
+ "m5"
746
+ ],
747
+ "exposes": [
748
+ "x",
749
+ {
750
+ "name": "List",
751
+ "title": " ",
752
+ "description": "",
753
+ "input": {
754
+ "type": "string"
755
+ },
756
+ "access": "admin",
757
+ "run": {
758
+ "records": {
759
+ "op": "get",
760
+ "kind": "entry",
761
+ "id": "x"
762
+ }
763
+ }
764
+ },
765
+ {
766
+ "name": "list__all",
767
+ "title": "A",
768
+ "description": "A.",
769
+ "input": {
770
+ "type": "object"
771
+ },
772
+ "access": "read",
773
+ "run": {}
774
+ },
775
+ {
776
+ "name": "entries",
777
+ "title": "A",
778
+ "description": "A.",
779
+ "input": {
780
+ "type": "object"
781
+ },
782
+ "access": "write",
783
+ "run": {
784
+ "action": "exponential.issues.create",
785
+ "upstream": "m5",
786
+ "tool": "x"
787
+ }
788
+ },
789
+ {
790
+ "name": "entries",
791
+ "title": "A",
792
+ "description": "A.",
793
+ "input": {
794
+ "type": "object"
795
+ },
796
+ "access": "read",
797
+ "run": {
798
+ "records": {
799
+ "op": "count",
800
+ "kind": "entry"
801
+ }
802
+ }
803
+ },
804
+ {
805
+ "name": "by_day",
806
+ "title": "A",
807
+ "description": "A.",
808
+ "input": {
809
+ "type": "object",
810
+ "properties": {
811
+ "day": {
812
+ "type": "string"
813
+ }
814
+ }
815
+ },
816
+ "access": "read",
817
+ "run": {
818
+ "records": {
819
+ "op": "list",
820
+ "kind": "note",
821
+ "where": {
822
+ "date": "${input.day}",
823
+ "who": "${input.user.email}"
824
+ }
825
+ }
826
+ }
827
+ },
828
+ {
829
+ "name": "drop_entry",
830
+ "title": "A",
831
+ "description": "A.",
832
+ "input": {
833
+ "type": "object"
834
+ },
835
+ "access": "write",
836
+ "run": {
837
+ "records": {
838
+ "op": "delete",
839
+ "kind": "entry",
840
+ "id": "x"
841
+ }
842
+ }
843
+ },
844
+ {
845
+ "name": "drop_issue",
846
+ "title": "A",
847
+ "description": "A.",
848
+ "input": {
849
+ "type": "object"
850
+ },
851
+ "access": "write",
852
+ "run": {
853
+ "action": "exponential.issues.delete",
854
+ "args": {}
855
+ }
856
+ },
857
+ {
858
+ "name": "bad_action",
859
+ "title": "A",
860
+ "description": "A.",
861
+ "input": {
862
+ "type": "object"
863
+ },
864
+ "access": "write",
865
+ "run": {
866
+ "action": "Issues",
867
+ "args": {}
868
+ }
869
+ },
870
+ {
871
+ "name": "new_issue",
872
+ "title": "A",
873
+ "description": "A.",
874
+ "input": {
875
+ "type": "object"
876
+ },
877
+ "access": "read",
878
+ "run": {
879
+ "action": "exponential.issues.create",
880
+ "args": {}
881
+ }
882
+ },
883
+ {
884
+ "name": "add_entry",
885
+ "title": "A",
886
+ "description": "A.",
887
+ "input": {
888
+ "type": "object"
889
+ },
890
+ "access": "read",
891
+ "run": {
892
+ "records": {
893
+ "op": "upsert",
894
+ "kind": "entry",
895
+ "data": {}
896
+ }
897
+ }
898
+ },
899
+ {
900
+ "name": "github",
901
+ "title": "A",
902
+ "description": "A.",
903
+ "input": {
904
+ "type": "object"
905
+ },
906
+ "access": "write",
907
+ "run": {
908
+ "upstream": "github",
909
+ "tool": "create_issue",
910
+ "args": {}
911
+ }
912
+ },
913
+ {
914
+ "name": "drop_customer",
915
+ "title": "A",
916
+ "description": "A.",
917
+ "input": {
918
+ "type": "object"
919
+ },
920
+ "access": "write",
921
+ "run": {
922
+ "upstream": "m5",
923
+ "tool": "delete_customer"
924
+ }
925
+ },
926
+ {
927
+ "name": "no_tool",
928
+ "title": "A",
929
+ "description": "A.",
930
+ "input": {
931
+ "type": "object"
932
+ },
933
+ "access": "write",
934
+ "run": {
935
+ "upstream": "m5",
936
+ "tool": ""
937
+ }
938
+ },
939
+ {
940
+ "name": "long_title",
941
+ "title": "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT",
942
+ "description": "A.",
943
+ "input": {
944
+ "type": "object",
945
+ "properties": []
946
+ },
947
+ "access": "read",
948
+ "run": {
949
+ "records": {
950
+ "op": "list",
951
+ "kind": "entry"
952
+ }
953
+ }
954
+ }
955
+ ]
956
+ },
957
+ "acme.exposeslist": {
958
+ "id": "acme.exposeslist",
959
+ "name": "Tools not a list",
960
+ "version": "1.0.0",
961
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
962
+ "templates": {
963
+ "t": {
964
+ "components": [
965
+ {
966
+ "id": "root",
967
+ "component": "Column"
968
+ }
969
+ ]
970
+ }
971
+ },
972
+ "upstreams": [
973
+ "m5",
974
+ 3
975
+ ],
976
+ "exposes": {
977
+ "list": {}
978
+ }
559
979
  }
560
980
  },
561
981
  "flows": [
@@ -1909,6 +2329,124 @@
1909
2329
  "message": "extension https://acme.example/catalogs/charts/v1 is not available on this host"
1910
2330
  }
1911
2331
  ]
2332
+ },
2333
+ {
2334
+ "package": "acme.exposes",
2335
+ "expected": []
2336
+ },
2337
+ {
2338
+ "package": "acme.badexposes",
2339
+ "expected": [
2340
+ {
2341
+ "path": "/upstreams/1",
2342
+ "message": "duplicate upstream m5"
2343
+ },
2344
+ {
2345
+ "path": "/exposes/0",
2346
+ "message": "a tool is {name, title, description, input, access, run}"
2347
+ },
2348
+ {
2349
+ "path": "/exposes/1/name",
2350
+ "message": "name is lowercase letters, digits and _ (at most 40, no __)"
2351
+ },
2352
+ {
2353
+ "path": "/exposes/1/title",
2354
+ "message": "title is a non-blank string of at most 80 characters"
2355
+ },
2356
+ {
2357
+ "path": "/exposes/1/description",
2358
+ "message": "description is a non-blank string of at most 1024 characters"
2359
+ },
2360
+ {
2361
+ "path": "/exposes/1/input",
2362
+ "message": "input is a JSON Schema of type object"
2363
+ },
2364
+ {
2365
+ "path": "/exposes/1/access",
2366
+ "message": "access is read or write"
2367
+ },
2368
+ {
2369
+ "path": "/exposes/2/name",
2370
+ "message": "name is lowercase letters, digits and _ (at most 40, no __)"
2371
+ },
2372
+ {
2373
+ "path": "/exposes/2/run",
2374
+ "message": "run holds exactly one of records, action, upstream"
2375
+ },
2376
+ {
2377
+ "path": "/exposes/3/run",
2378
+ "message": "run holds exactly one of records, action, upstream"
2379
+ },
2380
+ {
2381
+ "path": "/exposes/4/name",
2382
+ "message": "duplicate tool entries"
2383
+ },
2384
+ {
2385
+ "path": "/exposes/4/run/records/op",
2386
+ "message": "op is list, get, upsert"
2387
+ },
2388
+ {
2389
+ "path": "/exposes/5/run",
2390
+ "message": "${input.user.email} names no input property"
2391
+ },
2392
+ {
2393
+ "path": "/exposes/5/run/records/kind",
2394
+ "message": "kind names no declared record kind"
2395
+ },
2396
+ {
2397
+ "path": "/exposes/6/run/records/op",
2398
+ "message": "a records delete is destructive: never exposed"
2399
+ },
2400
+ {
2401
+ "path": "/exposes/7/run/action",
2402
+ "message": "a destructive action is never exposed"
2403
+ },
2404
+ {
2405
+ "path": "/exposes/8/run/action",
2406
+ "message": "action is a function name like namespace.function"
2407
+ },
2408
+ {
2409
+ "path": "/exposes/9/access",
2410
+ "message": "the run writes: access is write"
2411
+ },
2412
+ {
2413
+ "path": "/exposes/10/access",
2414
+ "message": "the run writes: access is write"
2415
+ },
2416
+ {
2417
+ "path": "/exposes/11/run/upstream",
2418
+ "message": "upstream names none of the package's upstreams"
2419
+ },
2420
+ {
2421
+ "path": "/exposes/12/run/tool",
2422
+ "message": "a destructive tool is never exposed"
2423
+ },
2424
+ {
2425
+ "path": "/exposes/13/run/tool",
2426
+ "message": "tool is a non-empty string"
2427
+ },
2428
+ {
2429
+ "path": "/exposes/14/title",
2430
+ "message": "title is a non-blank string of at most 80 characters"
2431
+ },
2432
+ {
2433
+ "path": "/exposes/14/input",
2434
+ "message": "input is a JSON Schema of type object"
2435
+ }
2436
+ ]
2437
+ },
2438
+ {
2439
+ "package": "acme.exposeslist",
2440
+ "expected": [
2441
+ {
2442
+ "path": "/upstreams",
2443
+ "message": "upstreams is a list of MCP server names"
2444
+ },
2445
+ {
2446
+ "path": "/exposes",
2447
+ "message": "exposes is a list of tools"
2448
+ }
2449
+ ]
1912
2450
  }
1913
2451
  ],
1914
2452
  "records": [