@fractal-io-technology/spec 0.0.0-stage → 2.2.2
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 +202 -0
- package/README.md +165 -2
- package/conformance/1.0/action-cases.json +227 -0
- package/conformance/1.0/bind-cases.json +768 -0
- package/conformance/1.0/cases.json +25139 -0
- package/conformance/1.0/layout/01-onboarding-start.json +95 -0
- package/conformance/1.0/layout/02-home-discover.json +177 -0
- package/conformance/1.0/layout/03-filters.json +186 -0
- package/conformance/1.0/layout/README.md +145 -0
- package/conformance/1.0/layout/REPORT.md +222 -0
- package/conformance/1.0/layout/alert.json +22 -0
- package/conformance/1.0/layout/iphone-14-15-pro-107.json +272 -0
- package/conformance/1.0/layout/live_status_on_its_way_4.ios.json +100 -0
- package/conformance/1.0/layout/lucy-booking-mobile.json +261 -0
- package/conformance/1.0/layout/lucy-booking-tablet.json +817 -0
- package/conformance/1.0/layout/lucy-booking.json +185 -0
- package/conformance/1.0/layout/lucy-header.json +84 -0
- package/conformance/1.0/layout/lucy-welcome-pin-mobile.json +31 -0
- package/conformance/1.0/layout/lucy-welcome-pin.json +31 -0
- package/conformance/1.0/layout/measured/android/01-onboarding-start.json +95 -0
- package/conformance/1.0/layout/measured/android/02-home-discover.json +177 -0
- package/conformance/1.0/layout/measured/android/03-filters.json +186 -0
- package/conformance/1.0/layout/measured/android/alert.json +22 -0
- package/conformance/1.0/layout/measured/android/iphone-14-15-pro-107.json +272 -0
- package/conformance/1.0/layout/measured/android/live_status_on_its_way_4.ios.json +100 -0
- package/conformance/1.0/layout/measured/android/lucy-booking-mobile.json +261 -0
- package/conformance/1.0/layout/measured/android/lucy-booking-tablet.json +817 -0
- package/conformance/1.0/layout/measured/android/lucy-booking.json +185 -0
- package/conformance/1.0/layout/measured/android/lucy-header.json +84 -0
- package/conformance/1.0/layout/measured/android/lucy-welcome-pin-mobile.json +31 -0
- package/conformance/1.0/layout/measured/android/lucy-welcome-pin.json +31 -0
- package/conformance/1.0/layout/measured/android/navigation-bar.json +46 -0
- package/conformance/1.0/layout/measured/android/probe-alert-banner-flutter.json +37 -0
- package/conformance/1.0/layout/measured/android/probe-alert-banner-regression-flutter.json +51 -0
- package/conformance/1.0/layout/measured/android/probe-alert-banner-stack-flutter.json +29 -0
- package/conformance/1.0/layout/measured/android/probe-card.json +35 -0
- package/conformance/1.0/layout/measured/android/probe-check-box-flutter.json +20 -0
- package/conformance/1.0/layout/measured/android/probe-container-height.json +21 -0
- package/conformance/1.0/layout/measured/android/probe-divider.json +55 -0
- package/conformance/1.0/layout/measured/android/probe-dropdown-menu-flutter.json +24 -0
- package/conformance/1.0/layout/measured/android/probe-dropdown-menu-max-lines.json +11 -0
- package/conformance/1.0/layout/measured/android/probe-expanded.json +31 -0
- package/conformance/1.0/layout/measured/android/probe-failed-decode.json +11 -0
- package/conformance/1.0/layout/measured/android/probe-flex.json +43 -0
- package/conformance/1.0/layout/measured/android/probe-grid-flutter.json +78 -0
- package/conformance/1.0/layout/measured/android/probe-grid.json +29 -0
- package/conformance/1.0/layout/measured/android/probe-icon-button-flutter.json +25 -0
- package/conformance/1.0/layout/measured/android/probe-icon-flutter.json +19 -0
- package/conformance/1.0/layout/measured/android/probe-icon-sizing.json +36 -0
- package/conformance/1.0/layout/measured/android/probe-image-flutter.json +24 -0
- package/conformance/1.0/layout/measured/android/probe-list-flutter.json +79 -0
- package/conformance/1.0/layout/measured/android/probe-list-regression-flutter.json +94 -0
- package/conformance/1.0/layout/measured/android/probe-list-row-flutter.json +86 -0
- package/conformance/1.0/layout/measured/android/probe-list-styles.json +45 -0
- package/conformance/1.0/layout/measured/android/probe-pin-input-parity.json +18 -0
- package/conformance/1.0/layout/measured/android/probe-progress-track-flutter.json +41 -0
- package/conformance/1.0/layout/measured/android/probe-progress-track-regression-flutter.json +57 -0
- package/conformance/1.0/layout/measured/android/probe-row-column.json +84 -0
- package/conformance/1.0/layout/measured/android/probe-scroll.json +54 -0
- package/conformance/1.0/layout/measured/android/probe-search-flutter.json +22 -0
- package/conformance/1.0/layout/measured/android/probe-size-constraints.json +20 -0
- package/conformance/1.0/layout/measured/android/probe-spacer.json +43 -0
- package/conformance/1.0/layout/measured/android/probe-stat-progress-track.json +14 -0
- package/conformance/1.0/layout/measured/android/probe-text-button-flutter.json +27 -0
- package/conformance/1.0/layout/measured/android/probe-text-field-flutter.json +28 -0
- package/conformance/1.0/layout/measured/android/probe-text.json +30 -0
- package/conformance/1.0/layout/measured/android/wallet-home.json +127 -0
- package/conformance/1.0/layout/measured/web/01-onboarding-start.json +95 -0
- package/conformance/1.0/layout/measured/web/02-home-discover.json +177 -0
- package/conformance/1.0/layout/measured/web/03-filters.json +186 -0
- package/conformance/1.0/layout/measured/web/alert.json +22 -0
- package/conformance/1.0/layout/measured/web/iphone-14-15-pro-107.json +272 -0
- package/conformance/1.0/layout/measured/web/live_status_on_its_way_4.ios.json +100 -0
- package/conformance/1.0/layout/measured/web/lucy-booking-mobile.json +261 -0
- package/conformance/1.0/layout/measured/web/lucy-booking-tablet.json +817 -0
- package/conformance/1.0/layout/measured/web/lucy-booking.json +185 -0
- package/conformance/1.0/layout/measured/web/lucy-header.json +84 -0
- package/conformance/1.0/layout/measured/web/lucy-welcome-pin-mobile.json +31 -0
- package/conformance/1.0/layout/measured/web/lucy-welcome-pin.json +31 -0
- package/conformance/1.0/layout/measured/web/navigation-bar.json +46 -0
- package/conformance/1.0/layout/measured/web/probe-alert-banner-flutter.json +37 -0
- package/conformance/1.0/layout/measured/web/probe-alert-banner-regression-flutter.json +51 -0
- package/conformance/1.0/layout/measured/web/probe-alert-banner-stack-flutter.json +29 -0
- package/conformance/1.0/layout/measured/web/probe-card.json +35 -0
- package/conformance/1.0/layout/measured/web/probe-check-box-flutter.json +20 -0
- package/conformance/1.0/layout/measured/web/probe-container-height.json +21 -0
- package/conformance/1.0/layout/measured/web/probe-divider.json +55 -0
- package/conformance/1.0/layout/measured/web/probe-dropdown-menu-flutter.json +24 -0
- package/conformance/1.0/layout/measured/web/probe-dropdown-menu-max-lines.json +11 -0
- package/conformance/1.0/layout/measured/web/probe-expanded.json +31 -0
- package/conformance/1.0/layout/measured/web/probe-failed-decode.json +15 -0
- package/conformance/1.0/layout/measured/web/probe-flex.json +43 -0
- package/conformance/1.0/layout/measured/web/probe-grid-flutter.json +78 -0
- package/conformance/1.0/layout/measured/web/probe-grid.json +29 -0
- package/conformance/1.0/layout/measured/web/probe-icon-button-flutter.json +25 -0
- package/conformance/1.0/layout/measured/web/probe-icon-flutter.json +19 -0
- package/conformance/1.0/layout/measured/web/probe-icon-sizing.json +36 -0
- package/conformance/1.0/layout/measured/web/probe-image-flutter.json +24 -0
- package/conformance/1.0/layout/measured/web/probe-list-flutter.json +79 -0
- package/conformance/1.0/layout/measured/web/probe-list-regression-flutter.json +94 -0
- package/conformance/1.0/layout/measured/web/probe-list-row-flutter.json +86 -0
- package/conformance/1.0/layout/measured/web/probe-list-styles.json +45 -0
- package/conformance/1.0/layout/measured/web/probe-pin-input-parity.json +18 -0
- package/conformance/1.0/layout/measured/web/probe-progress-track-flutter.json +41 -0
- package/conformance/1.0/layout/measured/web/probe-progress-track-regression-flutter.json +57 -0
- package/conformance/1.0/layout/measured/web/probe-row-column.json +84 -0
- package/conformance/1.0/layout/measured/web/probe-scroll.json +54 -0
- package/conformance/1.0/layout/measured/web/probe-search-flutter.json +22 -0
- package/conformance/1.0/layout/measured/web/probe-size-constraints.json +20 -0
- package/conformance/1.0/layout/measured/web/probe-spacer.json +43 -0
- package/conformance/1.0/layout/measured/web/probe-stat-progress-track.json +14 -0
- package/conformance/1.0/layout/measured/web/probe-text-button-flutter.json +27 -0
- package/conformance/1.0/layout/measured/web/probe-text-field-flutter.json +28 -0
- package/conformance/1.0/layout/measured/web/probe-text.json +30 -0
- package/conformance/1.0/layout/measured/web/wallet-home.json +127 -0
- package/conformance/1.0/layout/navigation-bar.json +46 -0
- package/conformance/1.0/layout/probe-alert-banner-flutter.json +37 -0
- package/conformance/1.0/layout/probe-alert-banner-regression-flutter.json +51 -0
- package/conformance/1.0/layout/probe-alert-banner-stack-flutter.json +29 -0
- package/conformance/1.0/layout/probe-card.json +35 -0
- package/conformance/1.0/layout/probe-check-box-flutter.json +20 -0
- package/conformance/1.0/layout/probe-container-height.json +21 -0
- package/conformance/1.0/layout/probe-divider.json +55 -0
- package/conformance/1.0/layout/probe-dropdown-menu-flutter.json +24 -0
- package/conformance/1.0/layout/probe-dropdown-menu-max-lines.json +11 -0
- package/conformance/1.0/layout/probe-expanded.json +31 -0
- package/conformance/1.0/layout/probe-failed-decode.json +13 -0
- package/conformance/1.0/layout/probe-flex.json +43 -0
- package/conformance/1.0/layout/probe-grid-flutter.json +78 -0
- package/conformance/1.0/layout/probe-grid.json +29 -0
- package/conformance/1.0/layout/probe-icon-button-flutter.json +25 -0
- package/conformance/1.0/layout/probe-icon-flutter.json +19 -0
- package/conformance/1.0/layout/probe-icon-sizing.json +36 -0
- package/conformance/1.0/layout/probe-image-flutter.json +24 -0
- package/conformance/1.0/layout/probe-list-flutter.json +79 -0
- package/conformance/1.0/layout/probe-list-regression-flutter.json +94 -0
- package/conformance/1.0/layout/probe-list-row-flutter.json +86 -0
- package/conformance/1.0/layout/probe-list-styles.json +45 -0
- package/conformance/1.0/layout/probe-pin-input-parity.json +18 -0
- package/conformance/1.0/layout/probe-progress-track-flutter.json +41 -0
- package/conformance/1.0/layout/probe-progress-track-regression-flutter.json +57 -0
- package/conformance/1.0/layout/probe-row-column.json +84 -0
- package/conformance/1.0/layout/probe-scroll.json +54 -0
- package/conformance/1.0/layout/probe-search-flutter.json +22 -0
- package/conformance/1.0/layout/probe-size-constraints.json +20 -0
- package/conformance/1.0/layout/probe-spacer.json +43 -0
- package/conformance/1.0/layout/probe-stat-progress-track.json +14 -0
- package/conformance/1.0/layout/probe-text-button-flutter.json +27 -0
- package/conformance/1.0/layout/probe-text-field-flutter.json +28 -0
- package/conformance/1.0/layout/probe-text.json +30 -0
- package/conformance/1.0/layout/probes/probe-alert-banner-flutter.json +296 -0
- package/conformance/1.0/layout/probes/probe-alert-banner-regression-flutter.json +1 -0
- package/conformance/1.0/layout/probes/probe-alert-banner-stack-flutter.json +219 -0
- package/conformance/1.0/layout/probes/probe-card.json +252 -0
- package/conformance/1.0/layout/probes/probe-check-box-flutter.json +86 -0
- package/conformance/1.0/layout/probes/probe-container-height.json +147 -0
- package/conformance/1.0/layout/probes/probe-divider.json +469 -0
- package/conformance/1.0/layout/probes/probe-dropdown-menu-flutter.json +293 -0
- package/conformance/1.0/layout/probes/probe-dropdown-menu-max-lines.json +54 -0
- package/conformance/1.0/layout/probes/probe-expanded.json +208 -0
- package/conformance/1.0/layout/probes/probe-failed-decode.json +96 -0
- package/conformance/1.0/layout/probes/probe-flex.json +353 -0
- package/conformance/1.0/layout/probes/probe-grid-flutter.json +584 -0
- package/conformance/1.0/layout/probes/probe-grid.json +209 -0
- package/conformance/1.0/layout/probes/probe-icon-button-flutter.json +143 -0
- package/conformance/1.0/layout/probes/probe-icon-flutter.json +89 -0
- package/conformance/1.0/layout/probes/probe-icon-sizing.json +219 -0
- package/conformance/1.0/layout/probes/probe-image-flutter.json +130 -0
- package/conformance/1.0/layout/probes/probe-list-flutter.json +732 -0
- package/conformance/1.0/layout/probes/probe-list-regression-flutter.json +815 -0
- package/conformance/1.0/layout/probes/probe-list-row-flutter.json +734 -0
- package/conformance/1.0/layout/probes/probe-list-styles.json +332 -0
- package/conformance/1.0/layout/probes/probe-pin-input-parity.json +87 -0
- package/conformance/1.0/layout/probes/probe-progress-track-flutter.json +298 -0
- package/conformance/1.0/layout/probes/probe-progress-track-regression-flutter.json +525 -0
- package/conformance/1.0/layout/probes/probe-row-column.json +784 -0
- package/conformance/1.0/layout/probes/probe-scroll.json +378 -0
- package/conformance/1.0/layout/probes/probe-search-flutter.json +138 -0
- package/conformance/1.0/layout/probes/probe-size-constraints.json +157 -0
- package/conformance/1.0/layout/probes/probe-spacer.json +291 -0
- package/conformance/1.0/layout/probes/probe-stat-progress-track.json +87 -0
- package/conformance/1.0/layout/probes/probe-text-button-flutter.json +163 -0
- package/conformance/1.0/layout/probes/probe-text-field-flutter.json +170 -0
- package/conformance/1.0/layout/probes/probe-text.json +202 -0
- package/conformance/1.0/layout/report/01-onboarding-start.md +49 -0
- package/conformance/1.0/layout/report/02-home-discover.md +98 -0
- package/conformance/1.0/layout/report/03-filters.md +85 -0
- package/conformance/1.0/layout/report/alert.md +27 -0
- package/conformance/1.0/layout/report/iphone-14-15-pro-107.md +47 -0
- package/conformance/1.0/layout/report/live_status_on_its_way_4.ios.md +60 -0
- package/conformance/1.0/layout/report/lucy-booking-mobile.md +81 -0
- package/conformance/1.0/layout/report/lucy-booking-tablet.md +279 -0
- package/conformance/1.0/layout/report/lucy-booking.md +117 -0
- package/conformance/1.0/layout/report/lucy-header.md +64 -0
- package/conformance/1.0/layout/report/lucy-welcome-pin-mobile.md +15 -0
- package/conformance/1.0/layout/report/lucy-welcome-pin.md +11 -0
- package/conformance/1.0/layout/report/navigation-bar.md +23 -0
- package/conformance/1.0/layout/report/probe-alert-banner-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-alert-banner-regression-flutter.md +27 -0
- package/conformance/1.0/layout/report/probe-alert-banner-stack-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-card.md +11 -0
- package/conformance/1.0/layout/report/probe-check-box-flutter.md +17 -0
- package/conformance/1.0/layout/report/probe-divider.md +11 -0
- package/conformance/1.0/layout/report/probe-dropdown-menu-flutter.md +15 -0
- package/conformance/1.0/layout/report/probe-dropdown-menu-max-lines.md +15 -0
- package/conformance/1.0/layout/report/probe-flex.md +23 -0
- package/conformance/1.0/layout/report/probe-grid-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-icon-button-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-icon-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-image-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-list-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-list-regression-flutter.md +27 -0
- package/conformance/1.0/layout/report/probe-list-row-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-pin-input-parity.md +11 -0
- package/conformance/1.0/layout/report/probe-progress-track-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-progress-track-regression-flutter.md +20 -0
- package/conformance/1.0/layout/report/probe-row-column.md +20 -0
- package/conformance/1.0/layout/report/probe-scroll.md +11 -0
- package/conformance/1.0/layout/report/probe-search-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-spacer.md +11 -0
- package/conformance/1.0/layout/report/probe-text-button-flutter.md +22 -0
- package/conformance/1.0/layout/report/probe-text-field-flutter.md +11 -0
- package/conformance/1.0/layout/report/probe-text.md +31 -0
- package/conformance/1.0/layout/report/wallet-home.md +35 -0
- package/conformance/1.0/layout/tolerance.json +12 -0
- package/conformance/1.0/layout/wallet-home.json +127 -0
- package/conformance/1.0/response-cases.json +228 -0
- package/conformance/1.0/screen-cases.json +198 -0
- package/conformance/1.0/screens/01-onboarding-start.json +994 -0
- package/conformance/1.0/screens/02-home-discover.json +2165 -0
- package/conformance/1.0/screens/03-filters.json +2290 -0
- package/conformance/1.0/screens/alert.json +231 -0
- package/conformance/1.0/screens/iphone-14-15-pro-107.json +3149 -0
- package/conformance/1.0/screens/live_status_on_its_way_4.ios.json +1313 -0
- package/conformance/1.0/screens/lucy-booking-mobile.json +3063 -0
- package/conformance/1.0/screens/lucy-booking-tablet.json +10371 -0
- package/conformance/1.0/screens/lucy-booking.json +2130 -0
- package/conformance/1.0/screens/lucy-header.json +1201 -0
- package/conformance/1.0/screens/lucy-welcome-pin-mobile.json +417 -0
- package/conformance/1.0/screens/lucy-welcome-pin.json +409 -0
- package/conformance/1.0/screens/navigation-bar.json +542 -0
- package/conformance/1.0/screens/wallet-home.json +1585 -0
- package/dist/action.d.ts +10616 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +92 -0
- package/dist/action.js.map +1 -0
- package/dist/bind.d.ts +32 -0
- package/dist/bind.d.ts.map +1 -0
- package/dist/bind.js +102 -0
- package/dist/bind.js.map +1 -0
- package/dist/block-ref.d.ts +17 -0
- package/dist/block-ref.d.ts.map +1 -0
- package/dist/block-ref.js +17 -0
- package/dist/block-ref.js.map +1 -0
- package/dist/block-types.d.ts +26 -0
- package/dist/block-types.d.ts.map +1 -0
- package/dist/block-types.js +39 -0
- package/dist/block-types.js.map +1 -0
- package/dist/block.d.ts +20908 -0
- package/dist/block.d.ts.map +1 -0
- package/dist/block.js +81 -0
- package/dist/block.js.map +1 -0
- package/dist/blocks/display.d.ts +1915 -0
- package/dist/blocks/display.d.ts.map +1 -0
- package/dist/blocks/display.js +433 -0
- package/dist/blocks/display.js.map +1 -0
- package/dist/blocks/input.d.ts +7148 -0
- package/dist/blocks/input.d.ts.map +1 -0
- package/dist/blocks/input.js +855 -0
- package/dist/blocks/input.js.map +1 -0
- package/dist/blocks/layout.d.ts +2482 -0
- package/dist/blocks/layout.d.ts.map +1 -0
- package/dist/blocks/layout.js +266 -0
- package/dist/blocks/layout.js.map +1 -0
- package/dist/blocks/list.d.ts +980 -0
- package/dist/blocks/list.d.ts.map +1 -0
- package/dist/blocks/list.js +286 -0
- package/dist/blocks/list.js.map +1 -0
- package/dist/common.d.ts +958 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +108 -0
- package/dist/common.js.map +1 -0
- package/dist/deprecated.d.ts +11 -0
- package/dist/deprecated.d.ts.map +1 -0
- package/dist/deprecated.js +26 -0
- package/dist/deprecated.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +103 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +113 -0
- package/dist/layout.js.map +1 -0
- package/dist/properties.d.ts +787 -0
- package/dist/properties.d.ts.map +1 -0
- package/dist/properties.js +447 -0
- package/dist/properties.js.map +1 -0
- package/dist/screen.d.ts +10494 -0
- package/dist/screen.d.ts.map +1 -0
- package/dist/screen.js +32 -0
- package/dist/screen.js.map +1 -0
- package/package.json +57 -4
- package/schema/1.0/action.json +109 -0
- package/schema/1.0/block.json +5886 -0
- package/schema/1.0/response.json +91 -0
- package/schema/1.0/screen.json +22 -0
- package/src/README.md +135 -0
- package/src/action.ts +119 -0
- package/src/bind.ts +114 -0
- package/src/block-ref.ts +18 -0
- package/src/block-types.ts +55 -0
- package/src/block.ts +116 -0
- package/src/blocks/display.ts +543 -0
- package/src/blocks/input.ts +1031 -0
- package/src/blocks/layout.ts +322 -0
- package/src/blocks/list.ts +355 -0
- package/src/common.ts +133 -0
- package/src/deprecated.ts +40 -0
- package/src/index.ts +31 -0
- package/src/layout.ts +194 -0
- package/src/properties.ts +516 -0
- package/src/screen.ts +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,166 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Fractal IO Specification
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The normative definition of the Fractal IO protocol for agent-driven interfaces: a server or agent describes a screen as a tree of blocks, and a renderer on any platform draws it.
|
|
4
|
+
|
|
5
|
+
**Status: draft 1.0.** The block payload, the screen document, the action message a renderer posts, the response a backend returns and how a template's bindings are resolved are specified. Session lifecycle is not specified yet.
|
|
6
|
+
|
|
7
|
+
## Source of truth
|
|
8
|
+
|
|
9
|
+
The protocol is written once, as a Zod contract in `src/`, and published as the JSON Schema generated from it:
|
|
10
|
+
|
|
11
|
+
- **Edit here:** `src/` (Zod). Every change to the wire format is a change to this contract.
|
|
12
|
+
- **Normative artifact:** `schema/<version>/*.json`, generated from `src/` (never edit it by hand), and the hand-written conformance cases in `conformance/<version>/`, which both forms must pass. They are what non-TypeScript implementations read.
|
|
13
|
+
- **Package:** `@fractal-io-technology/spec` on npm ships both: the Zod contract (compiled) for TypeScript producers and the JSON Schema files.
|
|
14
|
+
|
|
15
|
+
| Implementation | Repository | Role | Reads |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| FIOCoreBlocks (Swift) | `fractal_core_blocks-ios` | Renderer | JSON Schema, conformance suite |
|
|
18
|
+
| fiocore-blocks (Kotlin) | `fractal_core_blocks-android` | Renderer | JSON Schema, conformance suite |
|
|
19
|
+
| fractal-composer | `fractal-io-platform` | Producer | `@fractal-io-technology/spec` (Zod) |
|
|
20
|
+
|
|
21
|
+
When an implementation and this specification disagree, the implementation has a bug. The previous rule ("the Swift code wins", `JSON-CONTRACT.md`) no longer applies to the wire format.
|
|
22
|
+
|
|
23
|
+
CI keeps the two forms equal: `npm run check` fails when the committed schema differs from what the Zod contract generates, when the contract uses something JSON Schema cannot express (`.refine`, `.transform`, `.pipe`, `z.custom`), or when Ajv and Zod give any conformance case a verdict other than the expected one.
|
|
24
|
+
|
|
25
|
+
## Layout
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
src/ the Zod contract (edit the protocol here)
|
|
29
|
+
schema/<version>/block.json JSON Schema 2020-12 of a block tree (generated)
|
|
30
|
+
schema/<version>/screen.json JSON Schema 2020-12 of a screen document (generated)
|
|
31
|
+
schema/<version>/action.json JSON Schema 2020-12 of an action message (generated)
|
|
32
|
+
schema/<version>/response.json JSON Schema 2020-12 of a response (generated)
|
|
33
|
+
conformance/<version>/cases.json block payloads with the verdict both forms must give (valid / invalid)
|
|
34
|
+
conformance/<version>/screen-cases.json screen documents with the verdict both forms must give
|
|
35
|
+
conformance/<version>/action-cases.json action messages with the verdict both forms must give
|
|
36
|
+
conformance/<version>/response-cases.json responses with the verdict both forms must give
|
|
37
|
+
conformance/<version>/bind-cases.json templates and data with the screen or the bind error every implementation must give
|
|
38
|
+
conformance/<version>/screens/ full sample screens that must be valid
|
|
39
|
+
conformance/<version>/layout/ golden block frames per screen, layout probes, tolerance and the cross-platform report
|
|
40
|
+
scripts/schema.mts generates the schema from src/ (--check compares it with the committed files)
|
|
41
|
+
scripts/check-contract.ts wire vocabulary checks and the representability check
|
|
42
|
+
scripts/run-conformance.mjs runs every conformance case on Ajv and on Zod
|
|
43
|
+
scripts/check-layout.ts checks the layout goldens against their screens
|
|
44
|
+
scripts/layout-report.ts writes the cross-platform layout report
|
|
45
|
+
src/bind.ts binding rules and the reference `resolve`
|
|
46
|
+
src/layout.ts layout file format and comparison (`@fractal-io-technology/spec/layout`)
|
|
47
|
+
odd/tasks/ work tracking for this repository
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Changing the protocol
|
|
51
|
+
|
|
52
|
+
1. Edit the Zod contract in `src/`.
|
|
53
|
+
2. `npm run schema` to regenerate `schema/<version>/`.
|
|
54
|
+
3. Add conformance cases for the change in `conformance/<version>/`.
|
|
55
|
+
4. `npm run check`, then open a pull request. The schema diff in the pull request is the reviewable form of the change.
|
|
56
|
+
5. To release, bump `version` in `package.json` and push the tag `v<version>`; the Publish workflow publishes the package. Implementations then update to it.
|
|
57
|
+
|
|
58
|
+
The package version follows semver for the TypeScript API and is independent of the protocol version (`fractal: "1.0"`).
|
|
59
|
+
|
|
60
|
+
## Using the package
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { iosBlockSchema, screenSchema, actionMessageSchema, responseSchema, FRACTAL_PROTOCOL_VERSION } from "@fractal-io-technology/spec";
|
|
64
|
+
import { IOS_BLOCK_TYPES } from "@fractal-io-technology/spec/block-types"; // no zod: safe for client bundles
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Deprecated keys (2.1): a key that stays valid only so saved payloads decode (accepted and ignored, or a deprecated alias still honored) carries `deprecated: true` in its Zod metadata, and `npm run schema` exports it as JSON Schema `deprecated: true` next to its description, which says what replaces it or that it is ignored. Validation is unchanged. Editors read it with the package helpers:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { deprecatedKeysOf, isDeprecatedSchema } from "@fractal-io-technology/spec";
|
|
71
|
+
|
|
72
|
+
deprecatedKeysOf("spacer"); // ["background_color", ..., "child", "show_max_height", "show_max_width"]
|
|
73
|
+
isDeprecatedSchema(textStyleSchema.shape.line_height); // true; looks through optional / nullable / default
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`npm run check` fails when a description starting with "Deprecated" and the metadata disagree.
|
|
77
|
+
|
|
78
|
+
`zod` is a peer dependency, so the producer and the contract share one Zod instance. From 2.2.2 the package is public on npm: `npm install @fractal-io-technology/spec zod`. Every version is also on the organization's GitHub Packages, which is private: reading it there needs an `.npmrc` with `@fractal-io-technology:registry=https://npm.pkg.github.com` and a token with `read:packages`.
|
|
79
|
+
|
|
80
|
+
## Screen document
|
|
81
|
+
|
|
82
|
+
A screen is a JSON object with two protocol keys:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{ "fractal": "1.0", "data": { "type": "column", "data": { "children": [] } } }
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- `fractal` (required): the protocol version the screen speaks, `MAJOR.MINOR` (`schema/1.0/screen.json` accepts `1.0`, `1.1`, … `1.12`, …).
|
|
89
|
+
- `data` (required): the root block.
|
|
90
|
+
|
|
91
|
+
Any other top-level key, such as `status`, `statusCode`, `message` or `meta`, is transport data and not part of the protocol. Producers MAY send them; receivers MUST ignore them.
|
|
92
|
+
|
|
93
|
+
A receiver MUST reject a screen, with an error that names the version found and the major version it supports, when `fractal` is:
|
|
94
|
+
|
|
95
|
+
- missing;
|
|
96
|
+
- malformed: not a string of the form `MAJOR.MINOR` with non-negative integers and no leading zeros (for example `1`, `1.0.0`, `v1`), or not a string at all (a number, `null`, a boolean);
|
|
97
|
+
- of a major version the receiver does not support.
|
|
98
|
+
|
|
99
|
+
A receiver MUST accept a higher minor version of a major it supports and ignore what it does not know.
|
|
100
|
+
|
|
101
|
+
## Binding
|
|
102
|
+
|
|
103
|
+
A template is a screen document in which any value, at any depth, may be a binding: an object whose only key is `$bind` and whose value is a string, the path of a value in the data. A string is never a binding, so a literal `"$300"` stays as it is. There is no template schema: a template is judged by what it resolves to.
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{ "fractal": "1.0", "data": { "type": "text", "data": { "text": { "$bind": "product.name" } } } }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`resolve(template, data)` returns a screen document or fails as a whole:
|
|
110
|
+
|
|
111
|
+
1. Every binding is replaced with the value at its path, unchanged: no coercion and no default. The inserted value may be any JSON value (a string, a number, a list of blocks) and is not scanned for bindings again.
|
|
112
|
+
2. A path that does not lead to a value fails with `BIND_PATH_NOT_FOUND`.
|
|
113
|
+
3. A substituted document that is not a valid screen document fails with `BIND_TYPE_MISMATCH`. This is also what a `null` value gives, and what a template that is invalid for a reason unrelated to its bindings gives.
|
|
114
|
+
|
|
115
|
+
A path is one or more segments separated by `.`. On an object a segment is an own key; on an array it is an index in canonical decimal form (`0`, `12`). An inherited key, a step through a scalar or `null`, an index out of range and the empty path do not lead to a value. A key that contains `.` cannot be addressed.
|
|
116
|
+
|
|
117
|
+
An object that has `$bind` next to other keys, or whose `$bind` is not a string, is not a binding and is left as it is.
|
|
118
|
+
|
|
119
|
+
`conformance/<version>/bind-cases.json` pins these rules: each case is a template, the data, and either the screen (`expect`) or the error code (`expect_error`) every implementation must give. `src/bind.ts` is the reference implementation:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
import { resolve } from "@fractal-io-technology/spec";
|
|
123
|
+
|
|
124
|
+
const result = resolve(template, { product: { name: "Flight to Madrid" } });
|
|
125
|
+
if (result.ok) send(result.screen);
|
|
126
|
+
else report(result.error.code); // "BIND_PATH_NOT_FOUND" | "BIND_TYPE_MISMATCH"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Running the checks
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm install
|
|
133
|
+
npm run check
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The scripts run TypeScript directly, so they need Node 22.18 or later (type stripping).
|
|
137
|
+
|
|
138
|
+
The payload suite checks validity only. Layout conformance (where each platform draws every block of the sample screens) lives in `conformance/<version>/layout/`: goldens measured on the iOS reference, one harness per renderer, and a cross-platform report. See `conformance/1.0/layout/README.md`.
|
|
139
|
+
|
|
140
|
+
## Versioning policy (proposal)
|
|
141
|
+
|
|
142
|
+
The protocol version is `MAJOR.MINOR` and is independent of any implementation's package version. A published version's schema and conformance cases are immutable.
|
|
143
|
+
|
|
144
|
+
Two roles read the schema differently:
|
|
145
|
+
|
|
146
|
+
- **Producers** (backends, agents) MUST emit payloads that validate against the schema of the version they declare. The schema is closed: unknown keys and values are invalid.
|
|
147
|
+
- **Receivers** (renderers) MUST ignore unknown keys and MUST skip a block of an unknown `type` without failing the rest of the tree.
|
|
148
|
+
|
|
149
|
+
**Minor version** (backward compatible): adding a block type, adding an optional key, adding a value to an *open* enumeration, or relaxing a constraint.
|
|
150
|
+
|
|
151
|
+
**Major version** (breaking): removing or renaming a key, block type or enumeration value; changing a default or the meaning of a value; making an optional key required; adding a value to a *strict* enumeration.
|
|
152
|
+
|
|
153
|
+
Enumerations SHOULD be open: a receiver MUST treat an unknown value as the documented default. Several enumerations are still strict in the current renderers (an unknown value fails the block), so today adding a value to them is a major change. Making them open is planned work.
|
|
154
|
+
|
|
155
|
+
## Roadmap
|
|
156
|
+
|
|
157
|
+
1. Versioned block schema and conformance suite.
|
|
158
|
+
2. `fractal` version field in the screen document (this draft).
|
|
159
|
+
3. Session lifecycle: `initialize` with capabilities, version negotiation, a state machine for valid message order.
|
|
160
|
+
4. Action model and a client-to-server channel.
|
|
161
|
+
5. Standard error object and codes.
|
|
162
|
+
6. Transport bindings: HTTP, WebSocket / SSE, in-process.
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
[Apache-2.0](LICENSE).
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "A.full-example",
|
|
4
|
+
"expect": "valid",
|
|
5
|
+
"action": {
|
|
6
|
+
"fractal": "1.0",
|
|
7
|
+
"action": {
|
|
8
|
+
"name": "confirm_booking",
|
|
9
|
+
"screen_id": "booking",
|
|
10
|
+
"source_block_id": "confirm_button",
|
|
11
|
+
"event_type": "on_tap",
|
|
12
|
+
"timestamp": "2026-11-17T03:45:00Z",
|
|
13
|
+
"context": {
|
|
14
|
+
"flight": "UA-402"
|
|
15
|
+
},
|
|
16
|
+
"values": {
|
|
17
|
+
"passenger_name": "Alex Rosario",
|
|
18
|
+
"accept_terms": true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "A.required-only",
|
|
25
|
+
"expect": "valid",
|
|
26
|
+
"action": {
|
|
27
|
+
"fractal": "1.0",
|
|
28
|
+
"action": {
|
|
29
|
+
"name": "confirm_booking",
|
|
30
|
+
"event_type": "on_tap",
|
|
31
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "A.timestamp-fractional-seconds",
|
|
37
|
+
"expect": "valid",
|
|
38
|
+
"action": {
|
|
39
|
+
"fractal": "1.0",
|
|
40
|
+
"action": {
|
|
41
|
+
"name": "confirm_booking",
|
|
42
|
+
"event_type": "on_tap",
|
|
43
|
+
"timestamp": "2026-11-17T03:45:00.123Z"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "A.transport-keys-allowed",
|
|
49
|
+
"expect": "valid",
|
|
50
|
+
"action": {
|
|
51
|
+
"fractal": "1.0",
|
|
52
|
+
"action": {
|
|
53
|
+
"name": "confirm_booking",
|
|
54
|
+
"event_type": "on_tap",
|
|
55
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
56
|
+
},
|
|
57
|
+
"request_id": "r1",
|
|
58
|
+
"meta": {
|
|
59
|
+
"attempt": 1
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "A.missing-name",
|
|
65
|
+
"expect": "invalid",
|
|
66
|
+
"action": {
|
|
67
|
+
"fractal": "1.0",
|
|
68
|
+
"action": {
|
|
69
|
+
"event_type": "on_tap",
|
|
70
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "A.empty-name",
|
|
76
|
+
"expect": "invalid",
|
|
77
|
+
"action": {
|
|
78
|
+
"fractal": "1.0",
|
|
79
|
+
"action": {
|
|
80
|
+
"name": "",
|
|
81
|
+
"event_type": "on_tap",
|
|
82
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "A.missing-event-type",
|
|
88
|
+
"expect": "invalid",
|
|
89
|
+
"action": {
|
|
90
|
+
"fractal": "1.0",
|
|
91
|
+
"action": {
|
|
92
|
+
"name": "confirm_booking",
|
|
93
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "A.unknown-event-type",
|
|
99
|
+
"expect": "invalid",
|
|
100
|
+
"action": {
|
|
101
|
+
"fractal": "1.0",
|
|
102
|
+
"action": {
|
|
103
|
+
"name": "confirm_booking",
|
|
104
|
+
"event_type": "on_swipe",
|
|
105
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "A.missing-timestamp",
|
|
111
|
+
"expect": "invalid",
|
|
112
|
+
"action": {
|
|
113
|
+
"fractal": "1.0",
|
|
114
|
+
"action": {
|
|
115
|
+
"name": "confirm_booking",
|
|
116
|
+
"event_type": "on_tap"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "A.timestamp-without-z",
|
|
122
|
+
"expect": "invalid",
|
|
123
|
+
"action": {
|
|
124
|
+
"fractal": "1.0",
|
|
125
|
+
"action": {
|
|
126
|
+
"name": "confirm_booking",
|
|
127
|
+
"event_type": "on_tap",
|
|
128
|
+
"timestamp": "2026-11-17T03:45:00"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "A.timestamp-utc-offset",
|
|
134
|
+
"expect": "invalid",
|
|
135
|
+
"action": {
|
|
136
|
+
"fractal": "1.0",
|
|
137
|
+
"action": {
|
|
138
|
+
"name": "confirm_booking",
|
|
139
|
+
"event_type": "on_tap",
|
|
140
|
+
"timestamp": "2026-11-17T03:45:00+00:00"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "A.timestamp-not-date-time",
|
|
146
|
+
"expect": "invalid",
|
|
147
|
+
"action": {
|
|
148
|
+
"fractal": "1.0",
|
|
149
|
+
"action": {
|
|
150
|
+
"name": "confirm_booking",
|
|
151
|
+
"event_type": "on_tap",
|
|
152
|
+
"timestamp": "yesterday"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "A.unknown-action-key",
|
|
158
|
+
"expect": "invalid",
|
|
159
|
+
"action": {
|
|
160
|
+
"fractal": "1.0",
|
|
161
|
+
"action": {
|
|
162
|
+
"name": "confirm_booking",
|
|
163
|
+
"event_type": "on_tap",
|
|
164
|
+
"timestamp": "2026-11-17T03:45:00Z",
|
|
165
|
+
"session_id": "s1"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"id": "A.null-in-context",
|
|
171
|
+
"expect": "invalid",
|
|
172
|
+
"action": {
|
|
173
|
+
"fractal": "1.0",
|
|
174
|
+
"action": {
|
|
175
|
+
"name": "confirm_booking",
|
|
176
|
+
"event_type": "on_tap",
|
|
177
|
+
"timestamp": "2026-11-17T03:45:00Z",
|
|
178
|
+
"context": {
|
|
179
|
+
"flight": null
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "A.bad-version",
|
|
186
|
+
"expect": "invalid",
|
|
187
|
+
"action": {
|
|
188
|
+
"fractal": "2.0",
|
|
189
|
+
"action": {
|
|
190
|
+
"name": "confirm_booking",
|
|
191
|
+
"event_type": "on_tap",
|
|
192
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "A.missing-action",
|
|
198
|
+
"expect": "invalid",
|
|
199
|
+
"action": {
|
|
200
|
+
"fractal": "1.0"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "A.version-trailing-newline",
|
|
205
|
+
"expect": "invalid",
|
|
206
|
+
"action": {
|
|
207
|
+
"fractal": "1.0\n",
|
|
208
|
+
"action": {
|
|
209
|
+
"name": "confirm_booking",
|
|
210
|
+
"event_type": "on_tap",
|
|
211
|
+
"timestamp": "2026-11-17T03:45:00Z"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "A.timestamp-trailing-newline",
|
|
217
|
+
"expect": "invalid",
|
|
218
|
+
"action": {
|
|
219
|
+
"fractal": "1.0",
|
|
220
|
+
"action": {
|
|
221
|
+
"name": "confirm_booking",
|
|
222
|
+
"event_type": "on_tap",
|
|
223
|
+
"timestamp": "2026-11-17T03:45:00Z\n"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|