@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/blocks/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyCxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoB9B,CAAC;AAYH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAmC,CAAC;AAoC9D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0ByC,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { blockRef } from "../block-ref.js";
|
|
3
|
+
import { COMMON_PROPERTY_KEYS, deprecated, deprecateKeys, ignoredOn, multiChildShape, singleChildShape } from "../common.js";
|
|
4
|
+
import { backgroundImageSchema, blendModeSchema, borderSchema, boxConstraintsSchema, clipBehaviorSchema, colorSchema, cornerRadiiSchema, gradientSchema, intSchema, keyboardDismissBehaviorSchema, scrollPhysicsSchema, shadowSchema, transformSchema, alignmentSchema, flexCrossAxisAlignmentSchema, mainAxisAlignmentSchema, mainAxisSizeSchema, textBaselineSchema, textDirectionSchema, verticalDirectionSchema, } from "../properties.js";
|
|
5
|
+
/**
|
|
6
|
+
* Layout and structural blocks. Each schema is the `data` payload of a block
|
|
7
|
+
* `{ type, data }`; the Swift source of every block is named next to it
|
|
8
|
+
* (paths relative to `fractal_core_blocks-ios/Sources/Blocks`).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Flutter `Container` (contract 2.0): the common single-child keys plus the
|
|
12
|
+
* `Container` / `BoxDecoration` properties. `size` is an exact size, the child
|
|
13
|
+
* is hugged unless `alignment_geometry` is set, and nothing is clipped unless
|
|
14
|
+
* `clip_behavior` says so. `fixed_size` is deprecated and ignored.
|
|
15
|
+
* Swift: Container/FIOCoreContainerDataBlock.swift.
|
|
16
|
+
*/
|
|
17
|
+
const containerShape = singleChildShape(blockRef);
|
|
18
|
+
export const containerDataSchema = z.strictObject({
|
|
19
|
+
...containerShape,
|
|
20
|
+
...deprecateKeys(containerShape, ["fixed_size"], ignoredOn("container", "S9", "containers")),
|
|
21
|
+
constraints: boxConstraintsSchema.optional(),
|
|
22
|
+
corner_radii: cornerRadiiSchema.optional(),
|
|
23
|
+
border: borderSchema.optional(),
|
|
24
|
+
shadow: shadowSchema.optional(),
|
|
25
|
+
clip_behavior: clipBehaviorSchema.optional(),
|
|
26
|
+
background_blend_mode: blendModeSchema.optional(),
|
|
27
|
+
/** Painted above the child, inside the shape: the gradient replaces the color (Flutter `BoxDecoration`), then the image. */
|
|
28
|
+
foreground_decoration: z
|
|
29
|
+
.strictObject({
|
|
30
|
+
color: colorSchema.optional(),
|
|
31
|
+
gradient: gradientSchema.optional(),
|
|
32
|
+
image: backgroundImageSchema.optional(),
|
|
33
|
+
})
|
|
34
|
+
.optional(),
|
|
35
|
+
transform: transformSchema.optional(),
|
|
36
|
+
/** The transform's origin; absent = the top left corner in both directions (Flutter `transformAlignment` null). */
|
|
37
|
+
transform_alignment: alignmentSchema.optional(),
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Flutter `Padding` (contract 2.0): only `child`, `padding` and `id` apply. The
|
|
41
|
+
* child gets the parent's constraints minus the insets (tight stays tight), sits
|
|
42
|
+
* at the top start, and the block is the child's size plus the insets, clamped
|
|
43
|
+
* to the parent; without a child it is the insets' size. Negative constants
|
|
44
|
+
* count as 0. The other common keys are deprecated and ignored.
|
|
45
|
+
* Swift: Padding/FIOCorePaddingDataBlock.swift (single child, no own keys).
|
|
46
|
+
*/
|
|
47
|
+
const paddingShape = singleChildShape(blockRef);
|
|
48
|
+
export const paddingDataSchema = z.strictObject({
|
|
49
|
+
...paddingShape,
|
|
50
|
+
...deprecateKeys(paddingShape, [...COMMON_PROPERTY_KEYS.filter((key) => key !== "padding"), "events"], ignoredOn("padding", "", "padding blocks")),
|
|
51
|
+
});
|
|
52
|
+
/** A Flutter flex factor: an integer of at least 1 (0 would mean "not flexible"). */
|
|
53
|
+
const flexFactorSchema = intSchema.min(1);
|
|
54
|
+
/**
|
|
55
|
+
* Flutter `Expanded` (contract 2.0) = `flexible` with `fit: tight`. As a direct child of a `row` /
|
|
56
|
+
* `column` with a bounded main axis it takes its `flex` share (default 1) of the free main-axis
|
|
57
|
+
* space and forces its child to it; the cross axis is loose. Outside a Flex it is transparent, and
|
|
58
|
+
* on an unbounded main axis its child keeps its natural size. `show_max_height` /
|
|
59
|
+
* `show_max_width` and the other common keys are deprecated and ignored.
|
|
60
|
+
* Swift: Expanded/FIOCoreExpandedDataBlock.swift.
|
|
61
|
+
*/
|
|
62
|
+
const ignoredOnExpanded = ignoredOn("expanded", "", "expanded blocks");
|
|
63
|
+
const expandedShape = singleChildShape(blockRef);
|
|
64
|
+
export const expandedDataSchema = z.strictObject({
|
|
65
|
+
...expandedShape,
|
|
66
|
+
...deprecateKeys(expandedShape, [...COMMON_PROPERTY_KEYS, "events"], ignoredOnExpanded),
|
|
67
|
+
show_max_height: deprecated(z.boolean().optional(), ignoredOnExpanded("show_max_height")),
|
|
68
|
+
show_max_width: deprecated(z.boolean().optional(), ignoredOnExpanded("show_max_width")),
|
|
69
|
+
flex: flexFactorSchema.optional(),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Flutter `Flexible` (contract 2.0): like `expanded`, but `fit` defaults to `loose`, so the child may
|
|
73
|
+
* be smaller than its share (`tight` behaves as `expanded`). Only `child`, `id`, `flex` and `fit`.
|
|
74
|
+
*/
|
|
75
|
+
export const flexibleDataSchema = z.strictObject({
|
|
76
|
+
child: blockRef.optional(),
|
|
77
|
+
id: z.string().nullish(),
|
|
78
|
+
flex: flexFactorSchema.optional(),
|
|
79
|
+
fit: z.enum(["loose", "tight"]).optional(),
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* Flutter `Spacer` (contract 2.0) = an `expanded` with no child (`SizedBox.shrink`). As a direct child
|
|
83
|
+
* of a `row` / `column` with a bounded main axis it takes its `flex` share (default 1) of the free
|
|
84
|
+
* main-axis space with the other flex children, and is 0 on the cross axis. Elsewhere, and on an
|
|
85
|
+
* unbounded main axis, it is 0 × 0. `child`, `show_max_height` / `show_max_width` and the other
|
|
86
|
+
* common keys are deprecated and ignored. Swift: Spacer/FIOCoreSpacerDataBlock.swift.
|
|
87
|
+
*/
|
|
88
|
+
const ignoredOnSpacer = ignoredOn("spacer", "", "spacers");
|
|
89
|
+
const spacerShape = singleChildShape(blockRef);
|
|
90
|
+
export const spacerDataSchema = z.strictObject({
|
|
91
|
+
...spacerShape,
|
|
92
|
+
...deprecateKeys(spacerShape, [...COMMON_PROPERTY_KEYS, "events", "child"], ignoredOnSpacer),
|
|
93
|
+
show_max_height: deprecated(z.boolean().optional(), ignoredOnSpacer("show_max_height")),
|
|
94
|
+
show_max_width: deprecated(z.boolean().optional(), ignoredOnSpacer("show_max_width")),
|
|
95
|
+
flex: flexFactorSchema.optional(),
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* Flutter `SingleChildScrollView` (contract 2.0). The child gets the scroll's constraints with the
|
|
99
|
+
* main axis unbounded and the cross axis as received, deflated by `padding` (insets inside the
|
|
100
|
+
* scrollable area). The viewport is the child's size plus `padding`, clamped to the parent's
|
|
101
|
+
* constraints, so it hugs a smaller child; the child sits at the start. In a `row` / `column` it is
|
|
102
|
+
* not flexible (wrap it in `expanded` to fill). `is_vertical` defaults to true, `reverse` to false,
|
|
103
|
+
* `clip_behavior` to `hard_edge`, `keyboard_dismiss_behavior` to `manual`; no `physics` means the
|
|
104
|
+
* platform default. `show_scroll_indicator` and the other common keys are deprecated and ignored.
|
|
105
|
+
* Swift: SingleChildScroll/FIOCoreSingleChildScrollDataBlock.swift.
|
|
106
|
+
*/
|
|
107
|
+
const ignoredOnScroll = ignoredOn("single_child_scroll", "", "scrolls");
|
|
108
|
+
const scrollShape = singleChildShape(blockRef);
|
|
109
|
+
export const singleChildScrollDataSchema = z.strictObject({
|
|
110
|
+
...scrollShape,
|
|
111
|
+
...deprecateKeys(scrollShape, [...COMMON_PROPERTY_KEYS.filter((key) => key !== "padding"), "events"], ignoredOnScroll),
|
|
112
|
+
is_vertical: z.boolean().optional(),
|
|
113
|
+
show_scroll_indicator: deprecated(z.boolean().optional(), ignoredOnScroll("show_scroll_indicator") + " The indicator is always hidden (Flutter mobile shows no scrollbar)."),
|
|
114
|
+
reverse: z.boolean().optional(),
|
|
115
|
+
clip_behavior: clipBehaviorSchema.optional(),
|
|
116
|
+
physics: scrollPhysicsSchema.optional(),
|
|
117
|
+
keyboard_dismiss_behavior: keyboardDismissBehaviorSchema.optional(),
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* Flutter `Card` / `Card.filled` / `Card.outlined` with the Material 3 defaults (contract 2.0).
|
|
121
|
+
* `variant` defaults to `elevated`; `elevation` (>= 0) defaults to 1 for `elevated` and 0 for
|
|
122
|
+
* `filled` / `outlined`; `corner_radius` defaults to 12, overridden per corner by `corner_radii`;
|
|
123
|
+
* `margin` (outside the card, in its frame) defaults to all 4; `clip_behavior` defaults to `none`;
|
|
124
|
+
* `border_on_foreground` and `semantic_container` default to true; `shadow_color` defaults to
|
|
125
|
+
* black; `surface_tint_color` has no default (no tint). An absent `background_color` is the
|
|
126
|
+
* variant's color token; `border` is drawn inside the edge (width default 1; `outlined` without a
|
|
127
|
+
* `border` draws `#CAC4D0`, 1) and does not inset the child. The child gets the constraints minus
|
|
128
|
+
* the margin and sits at the top start (`alignment_geometry` aligns it as in a `container`).
|
|
129
|
+
* `size`, `gradient`, `shadow` (replaces the elevation shadow) and `alignment_geometry` are kept as
|
|
130
|
+
* extensions. `padding`, `foreground_color`, `fixed_size`, `background_image` and
|
|
131
|
+
* `background_overlays` are deprecated and ignored.
|
|
132
|
+
* Swift: Card/FIOCoreCardDataBlock.swift. iOS decodes `shadow` and `border`
|
|
133
|
+
* with `try?`, so a malformed one is dropped silently; the schema rejects it.
|
|
134
|
+
*/
|
|
135
|
+
const cardShape = singleChildShape(blockRef);
|
|
136
|
+
export const cardDataSchema = z.strictObject({
|
|
137
|
+
...cardShape,
|
|
138
|
+
...deprecateKeys(cardShape, ["padding", "foreground_color", "fixed_size", "background_image", "background_overlays"], ignoredOn("card", "S15", "cards")),
|
|
139
|
+
shadow: shadowSchema.optional(),
|
|
140
|
+
border: borderSchema.optional(),
|
|
141
|
+
variant: z.enum(["elevated", "filled", "outlined"]).optional(),
|
|
142
|
+
elevation: z.number().min(0).optional(),
|
|
143
|
+
shadow_color: colorSchema.optional(),
|
|
144
|
+
surface_tint_color: colorSchema.optional(),
|
|
145
|
+
border_on_foreground: z.boolean().optional(),
|
|
146
|
+
clip_behavior: clipBehaviorSchema.optional(),
|
|
147
|
+
semantic_container: z.boolean().optional(),
|
|
148
|
+
corner_radii: cornerRadiiSchema.optional(),
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* Flutter `Divider` / `VerticalDivider` with the Material 3 defaults (contract 2.0).
|
|
152
|
+
* `height` is the extent of the box across the line (default 16; in 1.x it was the line
|
|
153
|
+
* thickness); the line is centered in it. `thickness` is the line (default 1; 0 draws one device
|
|
154
|
+
* pixel). `indent` / `end_indent` (default 0) are the empty space before / after the line and
|
|
155
|
+
* follow the layout direction (start / end). `color` defaults to `#CAC4D0`. `corner_radius` is the
|
|
156
|
+
* line's corner radius (Flutter `radius`; default none). `is_vertical` (default false) makes it a
|
|
157
|
+
* `VerticalDivider`: `height` is then the box width and the indents are top / bottom. All numbers
|
|
158
|
+
* are >= 0.
|
|
159
|
+
* Swift: Divider/FIOCoreDividerDataBlock.swift. Divider extends
|
|
160
|
+
* `FIOCoreGenericBlockData` directly, so it does NOT accept the common keys
|
|
161
|
+
* (`id`, `events`, `padding`, ...), only its own keys.
|
|
162
|
+
*/
|
|
163
|
+
export const dividerDataSchema = z.strictObject({
|
|
164
|
+
color: colorSchema.optional(),
|
|
165
|
+
height: z.number().min(0).optional(),
|
|
166
|
+
thickness: z.number().min(0).optional(),
|
|
167
|
+
indent: z.number().min(0).optional(),
|
|
168
|
+
end_indent: z.number().min(0).optional(),
|
|
169
|
+
corner_radius: z.number().min(0).optional(),
|
|
170
|
+
is_vertical: z.boolean().optional(),
|
|
171
|
+
});
|
|
172
|
+
/**
|
|
173
|
+
* The keys of a Flutter `Flex` shared by `row` and `column` (contract 2.0). `spacing` (from the
|
|
174
|
+
* multi-child shape) is the space between children in the main axis, default 0 (8 in 1.x; negative
|
|
175
|
+
* is accepted). `main_axis_alignment` defaults to `start`, `main_axis_size` to `max`, `alignment`
|
|
176
|
+
* (the cross axis) to `center` and gains `stretch` and `baseline` (row/column only);
|
|
177
|
+
* `text_direction` absent = the ambient direction; `vertical_direction` defaults to `down`;
|
|
178
|
+
* `text_baseline` absent with `baseline` = `alphabetic`; `clip_behavior` defaults to `none`.
|
|
179
|
+
* Layout (`RenderFlex`): every non-flex child gets an unbounded main axis and a loose cross axis
|
|
180
|
+
* (tight at the maximum cross extent with `stretch` when bounded); `expanded` / `flexible` /
|
|
181
|
+
* `spacer` children split the free space; `max` fills a bounded main axis and hugs an unbounded
|
|
182
|
+
* one, `min` hugs; overflow runs past the end and is not clipped with `none`. The Flex does not
|
|
183
|
+
* scroll. `distribution` and the common keys (`events`, `padding`, `size`, `background_color`, ...)
|
|
184
|
+
* are deprecated and ignored.
|
|
185
|
+
*/
|
|
186
|
+
function flexShape(block) {
|
|
187
|
+
const shape = multiChildShape(blockRef);
|
|
188
|
+
return {
|
|
189
|
+
...shape,
|
|
190
|
+
...deprecateKeys(shape, [...COMMON_PROPERTY_KEYS, "events", "distribution"], ignoredOn(block, "", `${block}s`)),
|
|
191
|
+
alignment: flexCrossAxisAlignmentSchema.optional(),
|
|
192
|
+
main_axis_alignment: mainAxisAlignmentSchema.optional(),
|
|
193
|
+
main_axis_size: mainAxisSizeSchema.optional(),
|
|
194
|
+
text_direction: textDirectionSchema.optional(),
|
|
195
|
+
vertical_direction: verticalDirectionSchema.optional(),
|
|
196
|
+
text_baseline: textBaselineSchema.optional(),
|
|
197
|
+
clip_behavior: clipBehaviorSchema.optional(),
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Flutter `Column` (contract 2.0): a vertical `Flex` (see `flexShape`); `baseline` acts as `start`
|
|
202
|
+
* and children are ordered by `vertical_direction`. Swift: Columns/FIOCoreColumnDataBlock.swift.
|
|
203
|
+
*/
|
|
204
|
+
export const columnDataSchema = z.strictObject(flexShape("column"));
|
|
205
|
+
/**
|
|
206
|
+
* Flutter `Row` (contract 2.0): a horizontal `Flex` (see `flexShape`); children are ordered by
|
|
207
|
+
* `text_direction`. A long text keeps its one-line width and overflows. Swift: Row/FIOCoreRowDataBlock.swift.
|
|
208
|
+
*/
|
|
209
|
+
export const rowDataSchema = z.strictObject(flexShape("row"));
|
|
210
|
+
/**
|
|
211
|
+
* Flutter `GridView.count` / `GridView.extent` (contract 2.0), "A scrollable, 2D array of widgets."
|
|
212
|
+
* The cross-axis count is `columns` (Flutter `crossAxisCount`, an integer >= 1; absent = 1) or, with
|
|
213
|
+
* `max_cross_axis_extent` (> 0), max(1, ceil(W / (max_cross_axis_extent + cross_axis_spacing)));
|
|
214
|
+
* `columns` together with `max_cross_axis_extent` is invalid. `main_axis_spacing` and
|
|
215
|
+
* `cross_axis_spacing` default to 0 (the 1.x grid used 8 / 20) and are never negative.
|
|
216
|
+
* `child_aspect_ratio` is "The ratio of the cross-axis to the main-axis extent of each child." (> 0,
|
|
217
|
+
* default 1.0); `main_axis_extent` is "The extent of each tile in the main axis." (>= 0, overrides
|
|
218
|
+
* the ratio).
|
|
219
|
+
* Tiles: usable = max(0, cross - padding - cross_axis_spacing * (n - 1)); tile cross = usable / n;
|
|
220
|
+
* tile main = `main_axis_extent` ?? tile cross / `child_aspect_ratio`; each child gets tight tile
|
|
221
|
+
* constraints (it fills its tile, it is not centered); the cross axis fills first and the last line
|
|
222
|
+
* may be partial; RTL mirrors the cross axis; `reverse` starts from the main-axis end.
|
|
223
|
+
* Scroll keys as `single_child_scroll`: `is_vertical` (default true), `reverse` (default false),
|
|
224
|
+
* `physics` (absent = the platform default), `clip_behavior` (default `hard_edge`),
|
|
225
|
+
* `keyboard_dismiss_behavior` (default `manual`). `padding` is Flutter's padding: it deflates the
|
|
226
|
+
* extent before the tiles. `shrink_wrap` "Defaults to false."
|
|
227
|
+
* Viewport: a bounded main axis with `shrink_wrap` false is filled and scrolls; `shrink_wrap` true
|
|
228
|
+
* hugs the tiles, clamped to the parent; an unbounded main axis (a `column` child, inside a scroll)
|
|
229
|
+
* acts as shrink-wrap and does not scroll. The cross axis fills a bounded extent; on an unbounded
|
|
230
|
+
* cross axis the tile side is the largest child. Not a flex child; inside `expanded` / `flexible`
|
|
231
|
+
* it takes the share.
|
|
232
|
+
* Deprecated, accepted and ignored: `grid_size`, `alignment` (the grid keeps its own 3-value enum),
|
|
233
|
+
* `spacing`, `distribution`, `events` and the other common keys.
|
|
234
|
+
* Swift: Grid/FIOCoreGridDataBlock.swift.
|
|
235
|
+
*
|
|
236
|
+
* The one rule JSON Schema cannot say with properties alone, "not both `columns` and
|
|
237
|
+
* `max_cross_axis_extent`", is a refine mirrored by its JSON Schema twin in the metadata
|
|
238
|
+
* (`not: { required: [...] }`), so the published schema says the same; the conformance suite
|
|
239
|
+
* checks both give the same verdict (`GR.both_modes`).
|
|
240
|
+
*/
|
|
241
|
+
const ignoredOnGrid = ignoredOn("grid", "S18", "grids");
|
|
242
|
+
const gridShape = multiChildShape(blockRef);
|
|
243
|
+
export const gridDataSchema = z
|
|
244
|
+
.strictObject({
|
|
245
|
+
...gridShape,
|
|
246
|
+
...deprecateKeys(gridShape, [...COMMON_PROPERTY_KEYS.filter((key) => key !== "padding"), "events", "alignment", "spacing", "distribution"], ignoredOnGrid),
|
|
247
|
+
grid_size: deprecated(z.enum(["flexible"]).optional(), ignoredOnGrid("grid_size")),
|
|
248
|
+
columns: intSchema.min(1).optional(),
|
|
249
|
+
max_cross_axis_extent: z.number().positive().optional(),
|
|
250
|
+
main_axis_spacing: z.number().min(0).optional(),
|
|
251
|
+
cross_axis_spacing: z.number().min(0).optional(),
|
|
252
|
+
child_aspect_ratio: z.number().positive().optional(),
|
|
253
|
+
main_axis_extent: z.number().min(0).optional(),
|
|
254
|
+
is_vertical: z.boolean().optional(),
|
|
255
|
+
reverse: z.boolean().optional(),
|
|
256
|
+
physics: scrollPhysicsSchema.optional(),
|
|
257
|
+
clip_behavior: clipBehaviorSchema.optional(),
|
|
258
|
+
keyboard_dismiss_behavior: keyboardDismissBehaviorSchema.optional(),
|
|
259
|
+
shrink_wrap: z.boolean().optional(),
|
|
260
|
+
})
|
|
261
|
+
.refine((data) => data.columns === undefined || data.max_cross_axis_extent === undefined, {
|
|
262
|
+
message: "`columns` and `max_cross_axis_extent` are mutually exclusive",
|
|
263
|
+
path: ["max_cross_axis_extent"],
|
|
264
|
+
})
|
|
265
|
+
.meta({ not: { required: ["columns", "max_cross_axis_extent"] } });
|
|
266
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/blocks/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7H,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,6BAA6B,EAC7B,mBAAmB,EACnB,YAAY,E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