@ankhorage/zora 28.7.2 → 28.7.3
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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/features/carousel/Carousel.d.ts.map +1 -1
- package/dist/features/carousel/Carousel.js +22 -4
- package/dist/features/carousel/Carousel.js.map +1 -1
- package/dist/features/form/select/adapters/inbound/Select.web.d.ts.map +1 -1
- package/dist/features/form/select/adapters/inbound/Select.web.js +4 -1
- package/dist/features/form/select/adapters/inbound/Select.web.js.map +1 -1
- package/dist/features/form/select/composition/SelectOptionsList.d.ts +9 -0
- package/dist/features/form/select/composition/SelectOptionsList.d.ts.map +1 -0
- package/dist/features/form/select/composition/SelectOptionsList.js +17 -0
- package/dist/features/form/select/composition/SelectOptionsList.js.map +1 -0
- package/package.json +1 -1
- package/src/features/carousel/Carousel.tsx +27 -5
- package/src/features/form/select/adapters/inbound/Select.web.tsx +13 -10
- package/src/features/form/select/composition/SelectOptionsList.tsx +29 -0
- package/src/webPackageExports.test.ts +40 -0
- package/web-dist/authoring/index.d.ts +2 -2
- package/web-dist/authoring/index.js +132 -23545
- package/web-dist/chunks/{Accordion-nh0cs9hq.js → Accordion-0g45tq8n.js} +1 -43
- package/web-dist/chunks/{Accordion-rhjddvkh.js → Accordion-0zk0xp73.js} +26 -27
- package/web-dist/chunks/Accordion-2ej7s27r.js +18 -0
- package/web-dist/chunks/{Accordion-0spfxhpg.js → Accordion-2gvv7h5p.js} +22 -28
- package/web-dist/chunks/{Accordion-mpb070cf.js → Accordion-4gfrfgh5.js} +27 -33
- package/web-dist/chunks/{Accordion-3cpkxpdg.js → Accordion-53c30cqa.js} +5 -5
- package/web-dist/chunks/{Accordion-8skz71ct.js → Accordion-6gc0jw1n.js} +25 -30
- package/web-dist/chunks/Accordion-6n2r35qh.js +103 -0
- package/web-dist/chunks/Accordion-6sa9z92t.js +99 -0
- package/web-dist/chunks/{Accordion-gs838h0n.js → Accordion-772gn1m6.js} +8 -10
- package/web-dist/chunks/Accordion-7ayxbm7k.js +20 -0
- package/web-dist/chunks/{Accordion-arr9ayv0.js → Accordion-92py9m3m.js} +12 -18
- package/web-dist/chunks/{Accordion-zd15byha.js → Accordion-a6a0za8s.js} +2 -2
- package/web-dist/chunks/Accordion-c781654t.js +171 -0
- package/web-dist/chunks/{Accordion-516n2cx4.js → Accordion-ce2r66e1.js} +43 -168
- package/web-dist/chunks/{Accordion-9d38cgqj.js → Accordion-cwx73cjc.js} +4 -1426
- package/web-dist/chunks/{Accordion-1fz55hk4.js → Accordion-d15mjc4n.js} +5 -4
- package/web-dist/chunks/Accordion-ddzm7pnp.js +4721 -0
- package/web-dist/chunks/{Accordion-htvmkx8s.js → Accordion-dv5c27w4.js} +105 -41
- package/web-dist/chunks/Accordion-e8tapf5a.js +22 -0
- package/web-dist/chunks/{Accordion-78astqx3.js → Accordion-enfevvwv.js} +100 -170
- package/web-dist/chunks/{Accordion-1g91we37.js → Accordion-f7czh00h.js} +48 -205
- package/web-dist/chunks/{Accordion-2ad57stc.js → Accordion-f8dj4gbw.js} +12 -12
- package/web-dist/chunks/{Accordion-yrac5a7m.js → Accordion-fkftnxgw.js} +7 -17
- package/web-dist/chunks/Accordion-fsdgssfq.js +20 -0
- package/web-dist/chunks/Accordion-gnkzvj03.js +40 -0
- package/web-dist/chunks/{Accordion-jtgh2tep.js → Accordion-gtsxpnxf.js} +24 -30
- package/web-dist/chunks/Accordion-h7ae9ybw.js +70 -0
- package/web-dist/chunks/Accordion-hadw5304.js +78 -0
- package/web-dist/chunks/Accordion-jf0vrgw4.js +219 -0
- package/web-dist/chunks/{Accordion-agt9vt85.js → Accordion-jn70wf9s.js} +13 -13
- package/web-dist/chunks/{Accordion-9m5asd8r.js → Accordion-jqk96gt9.js} +9 -15
- package/web-dist/chunks/Accordion-kgfw6vj3.js +117 -0
- package/web-dist/chunks/Accordion-kjv0pfyp.js +136 -0
- package/web-dist/chunks/{Accordion-19aegsx2.js → Accordion-knd9nb8v.js} +21 -22
- package/web-dist/chunks/Accordion-nkv2pzj8.js +203 -0
- package/web-dist/chunks/{Accordion-5mga7hty.js → Accordion-pr1tv6jx.js} +3 -5
- package/web-dist/chunks/{Accordion-d5sz8vaq.js → Accordion-r8swmfjm.js} +5 -7
- package/web-dist/chunks/{Accordion-bexwrnfh.js → Accordion-rp9cjtpg.js} +28 -34
- package/web-dist/chunks/{Accordion-9dk62zn9.js → Accordion-sam71gw6.js} +66 -48
- package/web-dist/chunks/Accordion-se0pee16.js +213 -0
- package/web-dist/chunks/{Accordion-tdrk9cyn.js → Accordion-t9v6kw4n.js} +8 -8
- package/web-dist/chunks/{Accordion-3zzzw7a8.js → Accordion-t9w365ke.js} +3 -5
- package/web-dist/chunks/{Accordion-ar8qe05j.js → Accordion-vhr7js3e.js} +4 -4
- package/web-dist/chunks/{Accordion-ytf9ba8v.js → Accordion-w35n9p3n.js} +10 -10
- package/web-dist/chunks/{Accordion-0egwarcs.js → Accordion-wcref68q.js} +8 -8
- package/web-dist/chunks/Accordion-wf6pk2j9.js +61 -0
- package/web-dist/chunks/{Accordion-b1y5mjac.js → Accordion-x1ze1wvk.js} +1 -4
- package/web-dist/chunks/Accordion-xfwdh07r.js +235 -0
- package/web-dist/chunks/{Accordion-8t6vh482.js → Accordion-xhkphta6.js} +15 -21
- package/web-dist/chunks/{Accordion-77514sk9.js → Accordion-ycatfb1v.js} +6 -6
- package/web-dist/chunks/{Accordion-kcspvk6q.js → Accordion-ysy3ezf0.js} +9 -11
- package/web-dist/chunks/{Accordion-qjxx43r1.js → Accordion-zdwbxeq1.js} +40 -48
- package/web-dist/chunks/{Accordion-tk8zf9ff.js → Accordion-zhgty1ae.js} +10 -35
- package/web-dist/chunks/{RichTextClient-7qqj2dpw.js → RichTextClient-tsah5t7v.js} +19 -31
- package/web-dist/chunks/{Video.native-6142s9f7.js → Video.native-y947mrfb.js} +22 -32
- package/web-dist/chunks/{index-n6p0wdvg.js → index-m1y984nz.js} +547 -241
- package/web-dist/components/accordion/Accordion.dependency-0.d.ts +1 -1
- package/web-dist/components/accordion/Accordion.js +8 -14
- package/web-dist/components/accordion/Accordion.types-0.d.ts +1 -1
- package/web-dist/components/accordion-item/AccordionItem.dependency-0.d.ts +1 -1
- package/web-dist/components/accordion-item/AccordionItem.js +8 -14
- package/web-dist/components/accordion-item/AccordionItem.types-0.d.ts +1 -1
- package/web-dist/components/activity-indicator/ActivityIndicator.js +3 -4
- package/web-dist/components/app-bar/AppBar.dependency-0.d.ts +1 -1
- package/web-dist/components/app-bar/AppBar.dependency-2.d.ts +1 -1
- package/web-dist/components/app-bar/AppBar.js +10 -27
- package/web-dist/components/app-bar/AppBar.types-0.d.ts +1 -1
- package/web-dist/components/app-header/AppHeader.dependency-0.d.ts +1 -1
- package/web-dist/components/app-header/AppHeader.dependency-1.d.ts +1 -1
- package/web-dist/components/app-header/AppHeader.dependency-3.d.ts +1 -1
- package/web-dist/components/app-header/AppHeader.js +10 -27
- package/web-dist/components/app-shell/AppShell.dependency-0.d.ts +1 -1
- package/web-dist/components/app-shell/AppShell.js +3 -8
- package/web-dist/components/audio/Audio.dependency-0.d.ts +1 -1
- package/web-dist/components/audio/Audio.js +17 -28
- package/web-dist/components/auth-screen/AuthScreen.dependency-0.d.ts +1 -1
- package/web-dist/components/auth-screen/AuthScreen.dependency-3.d.ts +1 -1
- package/web-dist/components/auth-screen/AuthScreen.dependency-4.d.ts +1 -1
- package/web-dist/components/auth-screen/AuthScreen.js +13 -25
- package/web-dist/components/auth-screen/AuthScreen.types-0.d.ts +1 -1
- package/web-dist/components/avatar/Avatar.dependency-0.d.ts +1 -1
- package/web-dist/components/avatar/Avatar.dependency-2.d.ts +1 -1
- package/web-dist/components/avatar/Avatar.js +8 -14
- package/web-dist/components/avatar/Avatar.types-0.d.ts +1 -1
- package/web-dist/components/avatar-group/AvatarGroup.dependency-1.d.ts +1 -1
- package/web-dist/components/avatar-group/AvatarGroup.dependency-3.d.ts +1 -1
- package/web-dist/components/avatar-group/AvatarGroup.js +8 -14
- package/web-dist/components/avatar-group/AvatarGroup.types-0.d.ts +1 -1
- package/web-dist/components/badge/Badge.dependency-0.d.ts +1 -1
- package/web-dist/components/badge/Badge.dependency-2.d.ts +1 -1
- package/web-dist/components/badge/Badge.dependency-3.d.ts +1 -1
- package/web-dist/components/badge/Badge.js +3 -10
- package/web-dist/components/badge/Badge.types-0.d.ts +1 -1
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.dependency-0.d.ts +1 -1
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +13 -25
- package/web-dist/components/bottom-sheet/BottomSheet.dependency-0.d.ts +1 -1
- package/web-dist/components/bottom-sheet/BottomSheet.js +5 -13
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.d.ts +1 -1
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +5 -13
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.d.ts +1 -1
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +5 -13
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.d.ts +1 -1
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +5 -13
- package/web-dist/components/bottom-sheet-view/BottomSheetView.d.ts +1 -1
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +5 -13
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.d.ts +1 -1
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +5 -13
- package/web-dist/components/breadcrumbs/Breadcrumbs.dependency-0.d.ts +1 -1
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +17 -27
- package/web-dist/components/breadcrumbs/Breadcrumbs.types-0.d.ts +1 -1
- package/web-dist/components/button/Button.dependency-0.d.ts +1 -1
- package/web-dist/components/button/Button.dependency-2.d.ts +1 -1
- package/web-dist/components/button/Button.dependency-3.d.ts +1 -1
- package/web-dist/components/button/Button.js +8 -18
- package/web-dist/components/button/Button.types-0.d.ts +1 -1
- package/web-dist/components/button-group/ButtonGroup.dependency-0.d.ts +1 -1
- package/web-dist/components/button-group/ButtonGroup.dependency-2.d.ts +1 -1
- package/web-dist/components/button-group/ButtonGroup.js +6 -16
- package/web-dist/components/calendar/Calendar.dependency-0.d.ts +1 -1
- package/web-dist/components/calendar/Calendar.js +9 -19
- package/web-dist/components/camera-permission-view/CameraPermissionView.dependency-0.d.ts +1 -1
- package/web-dist/components/camera-permission-view/CameraPermissionView.dependency-2.d.ts +1 -1
- package/web-dist/components/camera-permission-view/CameraPermissionView.dependency-3.d.ts +1 -1
- package/web-dist/components/camera-permission-view/CameraPermissionView.dependency-4.d.ts +1 -1
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +13 -25
- package/web-dist/components/card/Card.dependency-0.d.ts +1 -1
- package/web-dist/components/card/Card.js +12 -24
- package/web-dist/components/card/Card.types-0.d.ts +1 -1
- package/web-dist/components/card-back/CardBack.dependency-0.d.ts +1 -1
- package/web-dist/components/card-back/CardBack.js +5 -6
- package/web-dist/components/card-hand/CardHand.dependency-0.d.ts +1 -1
- package/web-dist/components/card-hand/CardHand.js +5 -6
- package/web-dist/components/carousel/Carousel.js +58 -49
- package/web-dist/components/chat-list-item/ChatListItem.dependency-1.d.ts +1 -1
- package/web-dist/components/chat-list-item/ChatListItem.dependency-3.d.ts +1 -1
- package/web-dist/components/chat-list-item/ChatListItem.js +10 -19
- package/web-dist/components/checkbox/Checkbox.dependency-0.d.ts +1 -1
- package/web-dist/components/checkbox/Checkbox.js +7 -17
- package/web-dist/components/checkbox/Checkbox.types-0.d.ts +1 -1
- package/web-dist/components/checkbox-group/CheckboxGroup.dependency-0.d.ts +1 -1
- package/web-dist/components/checkbox-group/CheckboxGroup.js +7 -17
- package/web-dist/components/checkbox-group/CheckboxGroup.types-0.d.ts +1 -1
- package/web-dist/components/chess-board/ChessBoard.dependency-0.d.ts +1 -1
- package/web-dist/components/chess-board/ChessBoard.js +5 -7
- package/web-dist/components/chip/Chip.dependency-0.d.ts +1 -1
- package/web-dist/components/chip/Chip.dependency-2.d.ts +1 -1
- package/web-dist/components/chip/Chip.dependency-3.d.ts +1 -1
- package/web-dist/components/chip/Chip.js +8 -15
- package/web-dist/components/chip/Chip.types-0.d.ts +1 -1
- package/web-dist/components/chip-group/ChipGroup.dependency-0.d.ts +1 -1
- package/web-dist/components/chip-group/ChipGroup.dependency-2.d.ts +1 -1
- package/web-dist/components/chip-group/ChipGroup.dependency-3.d.ts +1 -1
- package/web-dist/components/chip-group/ChipGroup.js +8 -15
- package/web-dist/components/chip-group/ChipGroup.types-0.d.ts +1 -1
- package/web-dist/components/collection-editor/CollectionEditor.dependency-0.d.ts +1 -1
- package/web-dist/components/collection-editor/CollectionEditor.js +19 -31
- package/web-dist/components/color-hue-scale/ColorHueScale.dependency-0.d.ts +1 -1
- package/web-dist/components/color-hue-scale/ColorHueScale.js +19 -35
- package/web-dist/components/color-picker/ColorPicker.dependency-0.d.ts +1 -1
- package/web-dist/components/color-picker/ColorPicker.js +19 -35
- package/web-dist/components/color-tone/ColorTone.dependency-0.d.ts +1 -1
- package/web-dist/components/color-tone/ColorTone.js +19 -35
- package/web-dist/components/color-wheel/ColorWheel.dependency-0.d.ts +1 -1
- package/web-dist/components/color-wheel/ColorWheel.js +19 -35
- package/web-dist/components/content-rail/ContentRail.dependency-0.d.ts +1 -1
- package/web-dist/components/content-rail/ContentRail.js +23 -35
- package/web-dist/components/data-table/DataTable.dependency-0.d.ts +1 -1
- package/web-dist/components/data-table/DataTable.dependency-2.d.ts +1 -1
- package/web-dist/components/data-table/DataTable.js +67 -101
- package/web-dist/components/data-table/DataTable.types-0.d.ts +1 -1
- package/web-dist/components/date-picker/DatePicker.dependency-0.d.ts +1 -1
- package/web-dist/components/date-picker/DatePicker.js +16 -32
- package/web-dist/components/dialog/Dialog.dependency-0.d.ts +1 -1
- package/web-dist/components/dialog/Dialog.js +7 -18
- package/web-dist/components/divider/Divider.dependency-0.d.ts +1 -1
- package/web-dist/components/divider/Divider.js +3 -8
- package/web-dist/components/divider/Divider.types-0.d.ts +1 -1
- package/web-dist/components/empty-state/EmptyState.dependency-0.d.ts +1 -1
- package/web-dist/components/empty-state/EmptyState.dependency-2.d.ts +1 -1
- package/web-dist/components/empty-state/EmptyState.dependency-3.d.ts +1 -1
- package/web-dist/components/empty-state/EmptyState.js +13 -25
- package/web-dist/components/explorer/Explorer.dependency-0.d.ts +1 -1
- package/web-dist/components/explorer/Explorer.js +10 -16
- package/web-dist/components/field/Field.dependency-0.d.ts +1 -1
- package/web-dist/components/field/Field.dependency-1.d.ts +1 -1
- package/web-dist/components/field/Field.js +7 -15
- package/web-dist/components/file-explorer/FileExplorer.dependency-0.d.ts +1 -1
- package/web-dist/components/file-explorer/FileExplorer.js +10 -16
- package/web-dist/components/flat-list/FlatList.dependency-0.d.ts +1 -1
- package/web-dist/components/flat-list/FlatList.js +8 -17
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.dependency-0.d.ts +1 -1
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.dependency-3.d.ts +1 -1
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.dependency-4.d.ts +1 -1
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +13 -25
- package/web-dist/components/form/Form.dependency-0.d.ts +1 -1
- package/web-dist/components/form/Form.js +9 -20
- package/web-dist/components/form-actions/FormActions.dependency-0.d.ts +1 -1
- package/web-dist/components/form-actions/FormActions.js +9 -20
- package/web-dist/components/form-error/FormError.dependency-0.d.ts +1 -1
- package/web-dist/components/form-error/FormError.js +9 -20
- package/web-dist/components/game/Game.dependency-0.d.ts +1 -1
- package/web-dist/components/game/Game.js +4 -10
- package/web-dist/components/game-entity/GameEntity.dependency-0.d.ts +1 -1
- package/web-dist/components/game-entity/GameEntity.js +4 -10
- package/web-dist/components/game-field/GameField.dependency-0.d.ts +1 -1
- package/web-dist/components/game-field/GameField.js +4 -10
- package/web-dist/components/game-input-zone/GameInputZone.dependency-0.d.ts +1 -1
- package/web-dist/components/game-input-zone/GameInputZone.js +4 -10
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.dependency-0.d.ts +1 -1
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +4 -10
- package/web-dist/components/game-overlay/GameOverlay.dependency-0.d.ts +1 -1
- package/web-dist/components/game-overlay/GameOverlay.js +4 -10
- package/web-dist/components/gradient/Gradient.dependency-0.d.ts +1 -1
- package/web-dist/components/gradient/Gradient.dependency-2.d.ts +1 -1
- package/web-dist/components/gradient/Gradient.js +4 -9
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +4 -9
- package/web-dist/components/graph-view/GraphView.js +3 -5
- package/web-dist/components/grid/Grid.dependency-0.d.ts +1 -1
- package/web-dist/components/grid/Grid.js +3 -8
- package/web-dist/components/grid/Grid.types-0.d.ts +1 -1
- package/web-dist/components/grid-interactions/GridInteractions.dependency-0.d.ts +1 -1
- package/web-dist/components/grid-interactions/GridInteractions.js +2 -8
- package/web-dist/components/grid-line-overlay/GridLineOverlay.dependency-0.d.ts +1 -1
- package/web-dist/components/grid-line-overlay/GridLineOverlay.js +4 -6
- package/web-dist/components/grid-ruler/GridRuler.dependency-0.d.ts +1 -1
- package/web-dist/components/grid-ruler/GridRuler.js +4 -6
- package/web-dist/components/grid-view/GridView.dependency-0.d.ts +1 -1
- package/web-dist/components/grid-view/GridView.js +1 -2
- package/web-dist/components/heading/Heading.dependency-0.d.ts +1 -1
- package/web-dist/components/heading/Heading.dependency-2.d.ts +1 -1
- package/web-dist/components/heading/Heading.js +5 -8
- package/web-dist/components/heading/Heading.types-0.d.ts +1 -1
- package/web-dist/components/hero/Hero.dependency-0.d.ts +1 -1
- package/web-dist/components/hero/Hero.dependency-2.d.ts +1 -1
- package/web-dist/components/hero/Hero.dependency-3.d.ts +1 -1
- package/web-dist/components/hero/Hero.js +20 -32
- package/web-dist/components/icon/Icon.dependency-0.d.ts +1 -1
- package/web-dist/components/icon/Icon.js +3 -7
- package/web-dist/components/icon/Icon.types-0.d.ts +1 -1
- package/web-dist/components/icon-button/IconButton.dependency-0.d.ts +1 -1
- package/web-dist/components/icon-button/IconButton.dependency-2.d.ts +1 -1
- package/web-dist/components/icon-button/IconButton.dependency-3.d.ts +1 -1
- package/web-dist/components/icon-button/IconButton.dependency-4.d.ts +1 -1
- package/web-dist/components/icon-button/IconButton.js +6 -16
- package/web-dist/components/icon-button/IconButton.types-0.d.ts +1 -1
- package/web-dist/components/image/Image.dependency-0.d.ts +1 -1
- package/web-dist/components/image/Image.js +6 -12
- package/web-dist/components/image/Image.types-0.d.ts +1 -1
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.dependency-0.d.ts +1 -1
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +3 -5
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.types-0.d.ts +1 -1
- package/web-dist/components/link/Link.dependency-0.d.ts +1 -1
- package/web-dist/components/link/Link.dependency-3.d.ts +1 -1
- package/web-dist/components/link/Link.js +9 -12
- package/web-dist/components/link/Link.types-0.d.ts +1 -1
- package/web-dist/components/list/List.dependency-0.d.ts +1 -1
- package/web-dist/components/list/List.js +8 -17
- package/web-dist/components/list/List.types-0.d.ts +1 -1
- package/web-dist/components/list-item/ListItem.dependency-0.d.ts +1 -1
- package/web-dist/components/list-item/ListItem.js +8 -17
- package/web-dist/components/list-item/ListItem.types-0.d.ts +1 -1
- package/web-dist/components/list-section/ListSection.dependency-0.d.ts +1 -1
- package/web-dist/components/list-section/ListSection.js +8 -17
- package/web-dist/components/list-section/ListSection.types-0.d.ts +1 -1
- package/web-dist/components/master-detail/MasterDetail.dependency-0.d.ts +1 -1
- package/web-dist/components/master-detail/MasterDetail.js +4 -17
- package/web-dist/components/matrix-grid/MatrixGrid.dependency-0.d.ts +1 -1
- package/web-dist/components/matrix-grid/MatrixGrid.js +14 -23
- package/web-dist/components/media-card/MediaCard.dependency-0.d.ts +1 -1
- package/web-dist/components/media-card/MediaCard.js +12 -24
- package/web-dist/components/media-explorer/MediaExplorer.dependency-0.d.ts +1 -1
- package/web-dist/components/media-explorer/MediaExplorer.js +10 -16
- package/web-dist/components/message-bubble/MessageBubble.dependency-1.d.ts +1 -1
- package/web-dist/components/message-bubble/MessageBubble.dependency-3.d.ts +1 -1
- package/web-dist/components/message-bubble/MessageBubble.js +10 -19
- package/web-dist/components/metric-card/MetricCard.dependency-0.d.ts +1 -1
- package/web-dist/components/metric-card/MetricCard.dependency-3.d.ts +1 -1
- package/web-dist/components/metric-card/MetricCard.js +12 -24
- package/web-dist/components/metric-card/MetricCard.types-0.d.ts +1 -1
- package/web-dist/components/missing-element/MissingElement.dependency-0.d.ts +1 -1
- package/web-dist/components/missing-element/MissingElement.js +15 -27
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.dependency-0.d.ts +1 -1
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.dependency-2.d.ts +1 -1
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.dependency-3.d.ts +1 -1
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.dependency-4.d.ts +1 -1
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +13 -25
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.types-0.d.ts +1 -1
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.dependency-0.d.ts +1 -1
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.dependency-2.d.ts +1 -1
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.dependency-3.d.ts +1 -1
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.dependency-4.d.ts +1 -1
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +13 -25
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.types-0.d.ts +1 -1
- package/web-dist/components/opening-book/OpeningBook.dependency-0.d.ts +1 -1
- package/web-dist/components/opening-book/OpeningBook.js +5 -7
- package/web-dist/components/otp-form/OtpForm.dependency-0.d.ts +1 -1
- package/web-dist/components/otp-form/OtpForm.dependency-3.d.ts +1 -1
- package/web-dist/components/otp-form/OtpForm.dependency-4.d.ts +1 -1
- package/web-dist/components/otp-form/OtpForm.js +13 -25
- package/web-dist/components/pagination/Pagination.dependency-0.d.ts +1 -1
- package/web-dist/components/pagination/Pagination.js +16 -26
- package/web-dist/components/palette-item/PaletteItem.dependency-0.d.ts +1 -1
- package/web-dist/components/palette-item/PaletteItem.js +17 -29
- package/web-dist/components/palette-item/PaletteItem.types-0.d.ts +1 -1
- package/web-dist/components/playing-card/PlayingCard.dependency-0.d.ts +1 -1
- package/web-dist/components/playing-card/PlayingCard.js +5 -6
- package/web-dist/components/poker-training-table/PokerTrainingTable.dependency-0.d.ts +1 -1
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +5 -6
- package/web-dist/components/popover/Popover.dependency-0.d.ts +1 -1
- package/web-dist/components/popover/Popover.js +4 -10
- package/web-dist/components/popover/Popover.types-0.d.ts +1 -1
- package/web-dist/components/popover-menu/PopoverMenu.dependency-0.d.ts +1 -1
- package/web-dist/components/popover-menu/PopoverMenu.js +6 -21
- package/web-dist/components/popover-menu/PopoverMenu.types-0.d.ts +1 -1
- package/web-dist/components/post-card/PostCard.dependency-1.d.ts +1 -1
- package/web-dist/components/post-card/PostCard.dependency-4.d.ts +1 -1
- package/web-dist/components/post-card/PostCard.js +12 -24
- package/web-dist/components/post-card/PostCard.types-0.d.ts +1 -1
- package/web-dist/components/product-card/ProductCard.dependency-0.d.ts +1 -1
- package/web-dist/components/product-card/ProductCard.js +12 -24
- package/web-dist/components/progress/Progress.dependency-0.d.ts +1 -1
- package/web-dist/components/progress/Progress.dependency-2.d.ts +1 -1
- package/web-dist/components/progress/Progress.dependency-3.d.ts +1 -1
- package/web-dist/components/progress/Progress.js +7 -12
- package/web-dist/components/progress-ring/ProgressRing.dependency-0.d.ts +1 -1
- package/web-dist/components/progress-ring/ProgressRing.dependency-2.d.ts +1 -1
- package/web-dist/components/progress-ring/ProgressRing.js +7 -12
- package/web-dist/components/radio/Radio.dependency-0.d.ts +1 -1
- package/web-dist/components/radio/Radio.js +8 -19
- package/web-dist/components/radio/Radio.types-0.d.ts +1 -1
- package/web-dist/components/radio-group/RadioGroup.dependency-0.d.ts +1 -1
- package/web-dist/components/radio-group/RadioGroup.dependency-2.d.ts +1 -1
- package/web-dist/components/radio-group/RadioGroup.js +8 -19
- package/web-dist/components/radio-group/RadioGroup.types-0.d.ts +1 -1
- package/web-dist/components/rating/Rating.dependency-0.d.ts +1 -1
- package/web-dist/components/rating/Rating.dependency-2.d.ts +1 -1
- package/web-dist/components/rating/Rating.dependency-3.d.ts +1 -1
- package/web-dist/components/rating/Rating.js +7 -13
- package/web-dist/components/reader/Reader.dependency-0.d.ts +1 -1
- package/web-dist/components/reader/Reader.js +25 -45
- package/web-dist/components/rich-text/RichText.dependency-0.d.ts +1 -1
- package/web-dist/components/rich-text/RichText.js +5 -6
- package/web-dist/components/scan-overlay/ScanOverlay.dependency-0.d.ts +1 -1
- package/web-dist/components/scan-overlay/ScanOverlay.js +13 -25
- package/web-dist/components/screen/Screen.dependency-0.d.ts +1 -1
- package/web-dist/components/screen/Screen.js +3 -8
- package/web-dist/components/screen-section/ScreenSection.dependency-0.d.ts +1 -1
- package/web-dist/components/screen-section/ScreenSection.js +7 -12
- package/web-dist/components/scroll-view/ScrollView.dependency-0.d.ts +1 -1
- package/web-dist/components/scroll-view/ScrollView.js +3 -8
- package/web-dist/components/scroll-view/ScrollView.types-0.d.ts +1 -1
- package/web-dist/components/search-input/SearchInput.dependency-0.d.ts +1 -1
- package/web-dist/components/search-input/SearchInput.dependency-2.d.ts +1 -1
- package/web-dist/components/search-input/SearchInput.js +8 -18
- package/web-dist/components/section-header/SectionHeader.dependency-0.d.ts +1 -1
- package/web-dist/components/section-header/SectionHeader.js +7 -12
- package/web-dist/components/section-list/SectionList.dependency-0.d.ts +1 -1
- package/web-dist/components/section-list/SectionList.js +8 -17
- package/web-dist/components/select/Select.dependency-0.d.ts +1 -1
- package/web-dist/components/select/Select.dependency-2.d.ts +1 -1
- package/web-dist/components/select/Select.js +13 -28
- package/web-dist/components/select/Select.types-0.d.ts +1 -1
- package/web-dist/components/selectable-item/SelectableItem.dependency-0.d.ts +1 -1
- package/web-dist/components/selectable-item/SelectableItem.js +3 -5
- package/web-dist/components/selectable-item/SelectableItem.types-0.d.ts +1 -1
- package/web-dist/components/selection-provider/SelectionProvider.js +3 -5
- package/web-dist/components/selection-provider/SelectionProvider.types-0.d.ts +1 -1
- package/web-dist/components/sign-in-form/SignInForm.dependency-0.d.ts +1 -1
- package/web-dist/components/sign-in-form/SignInForm.dependency-3.d.ts +1 -1
- package/web-dist/components/sign-in-form/SignInForm.dependency-4.d.ts +1 -1
- package/web-dist/components/sign-in-form/SignInForm.js +13 -25
- package/web-dist/components/sign-up-form/SignUpForm.dependency-0.d.ts +1 -1
- package/web-dist/components/sign-up-form/SignUpForm.dependency-3.d.ts +1 -1
- package/web-dist/components/sign-up-form/SignUpForm.dependency-4.d.ts +1 -1
- package/web-dist/components/sign-up-form/SignUpForm.js +13 -25
- package/web-dist/components/skeleton/Skeleton.dependency-0.d.ts +1 -1
- package/web-dist/components/skeleton/Skeleton.dependency-2.d.ts +1 -1
- package/web-dist/components/skeleton/Skeleton.js +15 -27
- package/web-dist/components/skeleton-card/SkeletonCard.dependency-0.d.ts +1 -1
- package/web-dist/components/skeleton-card/SkeletonCard.js +15 -27
- package/web-dist/components/skeleton-list/SkeletonList.dependency-0.d.ts +1 -1
- package/web-dist/components/skeleton-list/SkeletonList.js +15 -27
- package/web-dist/components/skeleton-text/SkeletonText.dependency-0.d.ts +1 -1
- package/web-dist/components/skeleton-text/SkeletonText.dependency-2.d.ts +1 -1
- package/web-dist/components/skeleton-text/SkeletonText.js +15 -27
- package/web-dist/components/spatial-grid/SpatialGrid.dependency-0.d.ts +1 -1
- package/web-dist/components/spatial-grid/SpatialGrid.js +4 -10
- package/web-dist/components/surface/Surface.dependency-0.d.ts +1 -1
- package/web-dist/components/surface/Surface.js +3 -10
- package/web-dist/components/surface/Surface.types-0.d.ts +1 -1
- package/web-dist/components/switch/Switch.dependency-0.d.ts +1 -1
- package/web-dist/components/switch/Switch.js +7 -121
- package/web-dist/components/switch/Switch.types-0.d.ts +1 -1
- package/web-dist/components/tab/Tab.dependency-0.d.ts +1 -1
- package/web-dist/components/tab/Tab.js +3 -12
- package/web-dist/components/tab/Tab.types-0.d.ts +1 -1
- package/web-dist/components/tab-list/TabList.dependency-0.d.ts +1 -1
- package/web-dist/components/tab-list/TabList.js +3 -12
- package/web-dist/components/tab-list/TabList.types-0.d.ts +1 -1
- package/web-dist/components/tab-panel/TabPanel.dependency-0.d.ts +1 -1
- package/web-dist/components/tab-panel/TabPanel.js +3 -12
- package/web-dist/components/tab-panel/TabPanel.types-0.d.ts +1 -1
- package/web-dist/components/tabletop-table/TabletopTable.dependency-0.d.ts +1 -1
- package/web-dist/components/tabletop-table/TabletopTable.js +5 -6
- package/web-dist/components/tabs/Tabs.dependency-0.d.ts +1 -1
- package/web-dist/components/tabs/Tabs.js +3 -12
- package/web-dist/components/tabs/Tabs.types-0.d.ts +1 -1
- package/web-dist/components/text/Text.dependency-0.d.ts +1 -1
- package/web-dist/components/text/Text.dependency-2.d.ts +1 -1
- package/web-dist/components/text/Text.js +7 -10
- package/web-dist/components/text/Text.types-0.d.ts +1 -1
- package/web-dist/components/text-input/TextInput.dependency-0.d.ts +1 -1
- package/web-dist/components/text-input/TextInput.dependency-2.d.ts +1 -1
- package/web-dist/components/text-input/TextInput.js +9 -19
- package/web-dist/components/text-input/TextInput.types-0.d.ts +1 -1
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.dependency-0.d.ts +1 -1
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.dependency-2.d.ts +1 -1
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.dependency-3.d.ts +1 -1
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.dependency-4.d.ts +1 -1
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.dependency-5.d.ts +1 -1
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +8 -18
- package/web-dist/components/tile-grid/TileGrid.dependency-0.d.ts +1 -1
- package/web-dist/components/tile-grid/TileGrid.js +1 -2
- package/web-dist/components/time-grid/TimeGrid.dependency-0.d.ts +1 -1
- package/web-dist/components/time-grid/TimeGrid.js +6 -12
- package/web-dist/components/time-picker/TimePicker.dependency-0.d.ts +1 -1
- package/web-dist/components/time-picker/TimePicker.js +18 -39
- package/web-dist/components/timeline/Timeline.dependency-0.d.ts +1 -1
- package/web-dist/components/timeline/Timeline.dependency-2.d.ts +1 -1
- package/web-dist/components/timeline/Timeline.dependency-4.d.ts +1 -1
- package/web-dist/components/timeline/Timeline.js +15 -21
- package/web-dist/components/timeline/Timeline.types-0.d.ts +1 -1
- package/web-dist/components/toast/Toast.dependency-0.d.ts +1 -1
- package/web-dist/components/toast/Toast.js +3 -14
- package/web-dist/components/toast/Toast.types-0.d.ts +1 -1
- package/web-dist/components/toast-provider/ToastProvider.js +3 -14
- package/web-dist/components/toast-provider/ToastProvider.types-0.d.ts +1 -1
- package/web-dist/components/toolbar/Toolbar.dependency-0.d.ts +1 -1
- package/web-dist/components/toolbar/Toolbar.js +13 -25
- package/web-dist/components/tree-item/TreeItem.dependency-0.d.ts +1 -1
- package/web-dist/components/tree-item/TreeItem.js +16 -32
- package/web-dist/components/tree-item/TreeItem.types-0.d.ts +1 -1
- package/web-dist/components/tree-view/TreeView.js +1 -1
- package/web-dist/components/uploader/Uploader.dependency-0.d.ts +1 -1
- package/web-dist/components/uploader/Uploader.js +28 -44
- package/web-dist/components/video/Video.dependency-0.d.ts +1 -1
- package/web-dist/components/video/Video.dependency-2.d.ts +1 -1
- package/web-dist/components/video/Video.js +11 -17
- package/web-dist/components/view/View.dependency-0.d.ts +1 -1
- package/web-dist/components/view/View.js +3 -8
- package/web-dist/components/view/View.types-0.d.ts +1 -1
- package/web-dist/components/zora-web-style-sheet/ZoraWebStyleSheet.js +3 -8
- package/web-dist/manifest.json +1104 -2714
- package/web-dist/runtime/ZoraProvider.js +19 -178
- package/web-dist/chunks/Accordion-0dj1r7w3.js +0 -13528
- package/web-dist/chunks/Accordion-224snqz3.js +0 -89
- package/web-dist/chunks/Accordion-23k6n6zk.js +0 -278
- package/web-dist/chunks/Accordion-2yat0x6x.js +0 -188
- package/web-dist/chunks/Accordion-4mg3epm9.js +0 -405
- package/web-dist/chunks/Accordion-4qrva6ye.js +0 -15
- package/web-dist/chunks/Accordion-4yrszsvs.js +0 -273
- package/web-dist/chunks/Accordion-5z75befg.js +0 -69
- package/web-dist/chunks/Accordion-61e19g3e.js +0 -1
- package/web-dist/chunks/Accordion-6a2hscrx.js +0 -50
- package/web-dist/chunks/Accordion-6zb9d92y.js +0 -87
- package/web-dist/chunks/Accordion-76b0qz8y.js +0 -41
- package/web-dist/chunks/Accordion-7nn4r909.js +0 -81
- package/web-dist/chunks/Accordion-7v6mrp8n.js +0 -311
- package/web-dist/chunks/Accordion-9b4bsxwe.js +0 -46
- package/web-dist/chunks/Accordion-9tgvr155.js +0 -9575
- package/web-dist/chunks/Accordion-a5fsrv3x.js +0 -198
- package/web-dist/chunks/Accordion-akwd4brm.js +0 -397
- package/web-dist/chunks/Accordion-c6edgxay.js +0 -1
- package/web-dist/chunks/Accordion-chdbfcm6.js +0 -93
- package/web-dist/chunks/Accordion-eqvdv7tt.js +0 -1
- package/web-dist/chunks/Accordion-fre84yaq.js +0 -12
- package/web-dist/chunks/Accordion-j1zerr6z.js +0 -389
- package/web-dist/chunks/Accordion-khfjh10v.js +0 -82
- package/web-dist/chunks/Accordion-ktscjwa2.js +0 -213
- package/web-dist/chunks/Accordion-mnac2z83.js +0 -21
- package/web-dist/chunks/Accordion-mnxf855g.js +0 -121
- package/web-dist/chunks/Accordion-mrstcjcm.js +0 -28
- package/web-dist/chunks/Accordion-mx7nkg85.js +0 -34
- package/web-dist/chunks/Accordion-pdjhezmz.js +0 -43
- package/web-dist/chunks/Accordion-q8a423pk.js +0 -379
- package/web-dist/chunks/Accordion-qjxbf8nt.js +0 -150
- package/web-dist/chunks/Accordion-sfvqf4fz.js +0 -1299
- package/web-dist/chunks/Accordion-sj30964p.js +0 -1350
- package/web-dist/chunks/Accordion-vx8bjm5k.js +0 -263
- package/web-dist/chunks/Accordion-wgc67k1g.js +0 -93
- package/web-dist/chunks/Accordion-ww4f12ty.js +0 -200
- package/web-dist/chunks/Accordion-xgpzh4wq.js +0 -18061
- package/web-dist/chunks/Accordion-xhxv2v0g.js +0 -196
|
@@ -1,1299 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import {
|
|
3
|
-
parseHexColorOrThrow,
|
|
4
|
-
getContrastRatio,
|
|
5
|
-
getReadableForeground,
|
|
6
|
-
selectColorSwatchStep,
|
|
7
|
-
createDefaultSemanticStatusSwatches,
|
|
8
|
-
LIGHT_SEMANTIC_COLOR_REFERENCES,
|
|
9
|
-
DARK_SEMANTIC_COLOR_REFERENCES,
|
|
10
|
-
generateThemeModeColors
|
|
11
|
-
} from "./Accordion-9d38cgqj.js";
|
|
12
|
-
import {
|
|
13
|
-
withZoraThemeScope
|
|
14
|
-
} from "./Accordion-tk8zf9ff.js";
|
|
15
|
-
import {
|
|
16
|
-
resolveSelectionEventIntent
|
|
17
|
-
} from "./Accordion-1fz55hk4.js";
|
|
18
|
-
import {
|
|
19
|
-
applySelectionIntent
|
|
20
|
-
} from "./Accordion-n4et7etk.js";
|
|
21
|
-
import {
|
|
22
|
-
require_cjs
|
|
23
|
-
} from "./Accordion-xgpzh4wq.js";
|
|
24
|
-
import {
|
|
25
|
-
__toESM
|
|
26
|
-
} from "./Accordion-nh0cs9hq.js";
|
|
27
|
-
// node_modules/@ankhorage/surface/dist/features/pressable/adapters/inbound/Pressable.js
|
|
28
|
-
var import_react_native2 = __toESM(require_cjs(), 1);
|
|
29
|
-
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
30
|
-
import React2 from "react";
|
|
31
|
-
// node_modules/@ankhorage/surface/dist/core/responsive/ResponsiveProvider.js
|
|
32
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
33
|
-
import React, { createContext, use, useMemo } from "react";
|
|
34
|
-
|
|
35
|
-
// node_modules/@ankhorage/surface/dist/core/responsive/breakpoints.js
|
|
36
|
-
var BREAKPOINT_ORDER = ["base", "sm", "md", "lg", "xl"];
|
|
37
|
-
|
|
38
|
-
// node_modules/@ankhorage/surface/dist/core/responsive/useResponsiveWidth.js
|
|
39
|
-
var import_react_native = __toESM(require_cjs(), 1);
|
|
40
|
-
import { useSyncExternalStore } from "react";
|
|
41
|
-
|
|
42
|
-
// node_modules/@ankhorage/surface/dist/core/responsive/ResponsiveProvider.js
|
|
43
|
-
var ResponsiveContext = createContext(null);
|
|
44
|
-
function useResponsiveRuntime() {
|
|
45
|
-
const runtime = use(ResponsiveContext);
|
|
46
|
-
if (!runtime) {
|
|
47
|
-
throw new Error("useResponsiveRuntime must be used within a ResponsiveProvider");
|
|
48
|
-
}
|
|
49
|
-
return runtime;
|
|
50
|
-
}
|
|
51
|
-
// node_modules/@ankhorage/surface/dist/internal/resolvers/resolveFocusRingStyles.js
|
|
52
|
-
function resolveFocusRingStyles(color, focused, isWeb) {
|
|
53
|
-
if (!focused || !isWeb) {
|
|
54
|
-
return {};
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
shadowColor: color,
|
|
58
|
-
shadowOpacity: 0.22,
|
|
59
|
-
shadowRadius: 6,
|
|
60
|
-
shadowOffset: { width: 0, height: 0 }
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
// node_modules/@ankhorage/surface/dist/internal/resolvers/resolveInteractiveState.js
|
|
64
|
-
function resolveInteractiveState(input) {
|
|
65
|
-
return {
|
|
66
|
-
pressed: Boolean(input.pressed),
|
|
67
|
-
hovered: Boolean(input.hovered),
|
|
68
|
-
focused: Boolean(input.focused),
|
|
69
|
-
disabled: Boolean(input.disabled)
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
// node_modules/@ankhorage/surface/dist/core/responsive/resolve.js
|
|
73
|
-
function isResponsiveRecord(value) {
|
|
74
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
75
|
-
}
|
|
76
|
-
function resolveResponsive2(value, breakpoint) {
|
|
77
|
-
if (value === undefined)
|
|
78
|
-
return;
|
|
79
|
-
if (!isResponsiveRecord(value))
|
|
80
|
-
return value;
|
|
81
|
-
const activeIndex = BREAKPOINT_ORDER.indexOf(breakpoint);
|
|
82
|
-
for (let i = activeIndex;i >= 0; i -= 1) {
|
|
83
|
-
const key = BREAKPOINT_ORDER[i];
|
|
84
|
-
if (!key)
|
|
85
|
-
continue;
|
|
86
|
-
const candidate = value[key];
|
|
87
|
-
if (candidate !== undefined)
|
|
88
|
-
return candidate;
|
|
89
|
-
}
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// node_modules/@ankhorage/surface/dist/features/theme/utils/resolveToken.js
|
|
94
|
-
function resolveToken(map, value) {
|
|
95
|
-
if (value === undefined)
|
|
96
|
-
return;
|
|
97
|
-
if (Object.prototype.hasOwnProperty.call(map, value)) {
|
|
98
|
-
return map[value];
|
|
99
|
-
}
|
|
100
|
-
return value;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// node_modules/@ankhorage/surface/dist/utils/resolveSpacing.js
|
|
104
|
-
function resolveSpacing(theme, value) {
|
|
105
|
-
return resolveToken(theme.spacing, value);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// node_modules/@ankhorage/surface/dist/utils/resolveViewStyles.js
|
|
109
|
-
function resolveViewStyles(theme, breakpoint, props) {
|
|
110
|
-
return {
|
|
111
|
-
elevation: 0,
|
|
112
|
-
...resolveSpacingStyles(theme, breakpoint, props),
|
|
113
|
-
...resolveVisualStyles(theme, breakpoint, props),
|
|
114
|
-
...resolveDimensionStyles(theme, breakpoint, props),
|
|
115
|
-
...resolveLayoutStyles(theme, breakpoint, props)
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function resolveSpacingStyles(theme, breakpoint, props) {
|
|
119
|
-
return {
|
|
120
|
-
padding: resolveSpacing(theme, resolveResponsive2(props.p, breakpoint)),
|
|
121
|
-
paddingHorizontal: resolveSpacing(theme, resolveResponsive2(props.px, breakpoint)),
|
|
122
|
-
paddingVertical: resolveSpacing(theme, resolveResponsive2(props.py, breakpoint)),
|
|
123
|
-
paddingTop: resolveSpacing(theme, resolveResponsive2(props.pt, breakpoint)),
|
|
124
|
-
paddingBottom: resolveSpacing(theme, resolveResponsive2(props.pb, breakpoint)),
|
|
125
|
-
paddingLeft: resolveSpacing(theme, resolveResponsive2(props.pl, breakpoint)),
|
|
126
|
-
paddingRight: resolveSpacing(theme, resolveResponsive2(props.pr, breakpoint)),
|
|
127
|
-
margin: resolveSpacing(theme, resolveResponsive2(props.m, breakpoint)),
|
|
128
|
-
marginHorizontal: resolveSpacing(theme, resolveResponsive2(props.mx, breakpoint)),
|
|
129
|
-
marginVertical: resolveSpacing(theme, resolveResponsive2(props.my, breakpoint)),
|
|
130
|
-
marginTop: resolveSpacing(theme, resolveResponsive2(props.mt, breakpoint)),
|
|
131
|
-
marginBottom: resolveSpacing(theme, resolveResponsive2(props.mb, breakpoint)),
|
|
132
|
-
marginLeft: resolveSpacing(theme, resolveResponsive2(props.ml, breakpoint)),
|
|
133
|
-
marginRight: resolveSpacing(theme, resolveResponsive2(props.mr, breakpoint)),
|
|
134
|
-
gap: resolveSpacing(theme, resolveResponsive2(props.gap, breakpoint)),
|
|
135
|
-
rowGap: resolveSpacing(theme, resolveResponsive2(props.rowGap, breakpoint)),
|
|
136
|
-
columnGap: resolveSpacing(theme, resolveResponsive2(props.columnGap, breakpoint))
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function resolveVisualStyles(theme, breakpoint, props) {
|
|
140
|
-
return {
|
|
141
|
-
backgroundColor: resolveColor(theme, resolveResponsive2(props.bg, breakpoint)),
|
|
142
|
-
borderRadius: resolveRadius(theme, resolveResponsive2(props.radius, breakpoint)),
|
|
143
|
-
borderWidth: resolveResponsive2(props.borderWidth, breakpoint),
|
|
144
|
-
borderColor: resolveColor(theme, resolveResponsive2(props.borderColor, breakpoint))
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function resolveDimensionStyles(theme, breakpoint, props) {
|
|
148
|
-
return {
|
|
149
|
-
width: resolveDimension(theme, resolveResponsive2(props.width, breakpoint)),
|
|
150
|
-
height: resolveDimension(theme, resolveResponsive2(props.height, breakpoint)),
|
|
151
|
-
minWidth: resolveDimension(theme, resolveResponsive2(props.minWidth, breakpoint)),
|
|
152
|
-
maxWidth: resolveDimension(theme, resolveResponsive2(props.maxWidth, breakpoint)),
|
|
153
|
-
minHeight: resolveDimension(theme, resolveResponsive2(props.minHeight, breakpoint)),
|
|
154
|
-
maxHeight: resolveDimension(theme, resolveResponsive2(props.maxHeight, breakpoint))
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function resolveLayoutStyles(theme, breakpoint, props) {
|
|
158
|
-
return {
|
|
159
|
-
display: "flex",
|
|
160
|
-
flex: resolveResponsive2(props.flex, breakpoint),
|
|
161
|
-
flexGrow: resolveResponsive2(props.flexGrow, breakpoint),
|
|
162
|
-
flexShrink: resolveResponsive2(props.flexShrink, breakpoint),
|
|
163
|
-
flexBasis: resolveDimension(theme, resolveResponsive2(props.flexBasis, breakpoint)),
|
|
164
|
-
flexDirection: resolveResponsive2(props.direction, breakpoint),
|
|
165
|
-
alignItems: resolveResponsive2(props.align, breakpoint),
|
|
166
|
-
justifyContent: resolveResponsive2(props.justify, breakpoint),
|
|
167
|
-
flexWrap: resolveResponsive2(props.wrap, breakpoint),
|
|
168
|
-
alignSelf: resolveResponsive2(props.alignSelf, breakpoint),
|
|
169
|
-
position: resolveResponsive2(props.position, breakpoint),
|
|
170
|
-
top: resolveResponsive2(props.top, breakpoint),
|
|
171
|
-
bottom: resolveResponsive2(props.bottom, breakpoint),
|
|
172
|
-
left: resolveResponsive2(props.left, breakpoint),
|
|
173
|
-
right: resolveResponsive2(props.right, breakpoint),
|
|
174
|
-
overflow: resolveResponsive2(props.overflow, breakpoint),
|
|
175
|
-
zIndex: resolveResponsive2(props.zIndex, breakpoint),
|
|
176
|
-
opacity: resolveResponsive2(props.opacity, breakpoint)
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
function resolveRadius(theme, value) {
|
|
180
|
-
return resolveToken(theme.radii, value);
|
|
181
|
-
}
|
|
182
|
-
function resolveColor(theme, value) {
|
|
183
|
-
return resolveToken(theme.colors, value);
|
|
184
|
-
}
|
|
185
|
-
function resolveDimension(theme, value) {
|
|
186
|
-
const resolved = resolveToken(theme.spacing, value);
|
|
187
|
-
if (resolved === undefined || typeof resolved === "number")
|
|
188
|
-
return resolved;
|
|
189
|
-
if (isPortableDimensionString(resolved))
|
|
190
|
-
return resolved;
|
|
191
|
-
throw new Error(`Unsupported Surface dimension: ${JSON.stringify(resolved)}.`);
|
|
192
|
-
}
|
|
193
|
-
function isPortableDimensionString(value) {
|
|
194
|
-
return value === "auto" || /^-?(?:\d+(?:\.\d+)?|\.\d+)%$/u.test(value);
|
|
195
|
-
}
|
|
196
|
-
// node_modules/@ankhorage/surface/dist/features/theme/adapters/inbound/useTheme.js
|
|
197
|
-
import { use as use2 } from "react";
|
|
198
|
-
|
|
199
|
-
// node_modules/@ankhorage/surface/dist/features/theme/adapters/inbound/ThemeRuntimeContext.js
|
|
200
|
-
import { createContext as createContext2 } from "react";
|
|
201
|
-
|
|
202
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/resolveSemanticColors.js
|
|
203
|
-
function resolveSemanticColors(generated, references) {
|
|
204
|
-
return Object.fromEntries(Object.entries(references).map(([token, ref]) => {
|
|
205
|
-
const swatch = generated.swatches[ref.role];
|
|
206
|
-
if (!swatch) {
|
|
207
|
-
throw new Error(`Missing swatch for role '${ref.role}' (token: '${token}')`);
|
|
208
|
-
}
|
|
209
|
-
return [token, swatch[ref.step]];
|
|
210
|
-
}));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/createSurfaceColorDiagnosticCollector.js
|
|
214
|
-
function createSurfaceColorDiagnosticCollector() {
|
|
215
|
-
return new SurfaceColorDiagnosticCollector;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
class SurfaceColorDiagnosticCollector {
|
|
219
|
-
selections = [];
|
|
220
|
-
contrasts = [];
|
|
221
|
-
measureForeground = (id, foreground, background, minimumContrast) => {
|
|
222
|
-
const contrast = getContrastRatio(foreground, background);
|
|
223
|
-
this.contrasts.push({
|
|
224
|
-
id,
|
|
225
|
-
foreground,
|
|
226
|
-
background,
|
|
227
|
-
contrast,
|
|
228
|
-
minimumContrast,
|
|
229
|
-
passes: contrast >= minimumContrast
|
|
230
|
-
});
|
|
231
|
-
return foreground;
|
|
232
|
-
};
|
|
233
|
-
measureSurface = (id, foreground, background, minimumContrast) => {
|
|
234
|
-
const contrast = getContrastRatio(foreground, background);
|
|
235
|
-
return {
|
|
236
|
-
id,
|
|
237
|
-
foreground,
|
|
238
|
-
background,
|
|
239
|
-
contrast,
|
|
240
|
-
minimumContrast,
|
|
241
|
-
passes: contrast >= minimumContrast
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
selectColor = (id, swatch, target, contexts, tiePolicy) => {
|
|
245
|
-
const result = selectColorSwatchStep(swatch, target, contexts, tiePolicy);
|
|
246
|
-
this.selections.push({ id, result });
|
|
247
|
-
if (!result.selected) {
|
|
248
|
-
throw new Error(`[surface] No '${id}' swatch step satisfies the required contrast.`);
|
|
249
|
-
}
|
|
250
|
-
return result.selected.hex;
|
|
251
|
-
};
|
|
252
|
-
selectForeground = (id, background, minimumContrast) => {
|
|
253
|
-
const selected = getReadableForeground(background);
|
|
254
|
-
this.contrasts.push({
|
|
255
|
-
id,
|
|
256
|
-
foreground: selected.foreground,
|
|
257
|
-
background,
|
|
258
|
-
contrast: selected.contrast,
|
|
259
|
-
minimumContrast,
|
|
260
|
-
passes: selected.contrast >= minimumContrast
|
|
261
|
-
});
|
|
262
|
-
return selected.foreground;
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// node_modules/@ankhorage/surface/dist/features/theme/constants.js
|
|
267
|
-
var EMPTY_FONT_MAP = {
|
|
268
|
-
"100": undefined,
|
|
269
|
-
"200": undefined,
|
|
270
|
-
"300": undefined,
|
|
271
|
-
"400": undefined,
|
|
272
|
-
"500": undefined,
|
|
273
|
-
"600": undefined,
|
|
274
|
-
"700": undefined,
|
|
275
|
-
"800": undefined,
|
|
276
|
-
"900": undefined,
|
|
277
|
-
bold: undefined,
|
|
278
|
-
normal: undefined
|
|
279
|
-
};
|
|
280
|
-
var DEFAULT_TOKENS = {
|
|
281
|
-
spacing: { none: 0, xs: 4, s: 8, m: 16, l: 24, xl: 32, xxl: 48 },
|
|
282
|
-
radii: { none: 0, s: 4, m: 8, l: 16, full: 9999 },
|
|
283
|
-
typography: {
|
|
284
|
-
headings: {
|
|
285
|
-
1: { size: 32, lineHeight: 40, weight: "bold" },
|
|
286
|
-
2: { size: 24, lineHeight: 32, weight: "bold" },
|
|
287
|
-
3: { size: 20, lineHeight: 28, weight: "bold" },
|
|
288
|
-
4: { size: 18, lineHeight: 24, weight: "semiBold" },
|
|
289
|
-
5: { size: 16, lineHeight: 22, weight: "semiBold" },
|
|
290
|
-
6: { size: 14, lineHeight: 20, weight: "semiBold" }
|
|
291
|
-
},
|
|
292
|
-
sizes: {
|
|
293
|
-
xs: 12,
|
|
294
|
-
s: 14,
|
|
295
|
-
m: 16,
|
|
296
|
-
l: 18,
|
|
297
|
-
xl: 20,
|
|
298
|
-
xxl: 24,
|
|
299
|
-
"3xl": 30,
|
|
300
|
-
h1: 32,
|
|
301
|
-
h2: 24,
|
|
302
|
-
h3: 20,
|
|
303
|
-
h4: 18,
|
|
304
|
-
h5: 16,
|
|
305
|
-
h6: 14
|
|
306
|
-
},
|
|
307
|
-
weights: {
|
|
308
|
-
thin: "100",
|
|
309
|
-
extraLight: "200",
|
|
310
|
-
light: "300",
|
|
311
|
-
regular: "400",
|
|
312
|
-
medium: "500",
|
|
313
|
-
semiBold: "600",
|
|
314
|
-
bold: "700",
|
|
315
|
-
extraBold: "800",
|
|
316
|
-
black: "900"
|
|
317
|
-
},
|
|
318
|
-
fonts: { normal: { ...EMPTY_FONT_MAP }, italic: { ...EMPTY_FONT_MAP } }
|
|
319
|
-
},
|
|
320
|
-
shadows: { soft: 2, medium: 4, hard: 8 }
|
|
321
|
-
};
|
|
322
|
-
var SURFACE_COLOR_POLICY = {
|
|
323
|
-
disabledContrast: 3,
|
|
324
|
-
surfaceSeparation: 1.05,
|
|
325
|
-
textContrast: 4.5,
|
|
326
|
-
uiContrast: 3
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/createSurfaceSemanticPolicy.js
|
|
330
|
-
function createSurfaceSemanticPolicy(resolved, isDark, measurements) {
|
|
331
|
-
return new SurfaceSemanticPolicy(resolved, isDark, measurements);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
class SurfaceSemanticPolicy {
|
|
335
|
-
resolved;
|
|
336
|
-
isDark;
|
|
337
|
-
measurements;
|
|
338
|
-
adjacentSurfaceContexts;
|
|
339
|
-
textSurfaceContexts;
|
|
340
|
-
tiePolicy;
|
|
341
|
-
constructor(resolved, isDark, measurements) {
|
|
342
|
-
this.resolved = resolved;
|
|
343
|
-
this.isDark = isDark;
|
|
344
|
-
this.measurements = measurements;
|
|
345
|
-
this.adjacentSurfaceContexts = this.createSurfaceContexts(SURFACE_COLOR_POLICY.uiContrast);
|
|
346
|
-
this.textSurfaceContexts = this.createSurfaceContexts(SURFACE_COLOR_POLICY.textContrast);
|
|
347
|
-
this.tiePolicy = isDark ? "lower-step" : "higher-step";
|
|
348
|
-
}
|
|
349
|
-
buildNeutral(neutralSwatch) {
|
|
350
|
-
return {
|
|
351
|
-
bg: this.resolved.background,
|
|
352
|
-
bgSubtle: this.resolved.surface,
|
|
353
|
-
surface: this.resolved.surface,
|
|
354
|
-
surfaceHover: this.isDark ? neutralSwatch[800] : neutralSwatch[200],
|
|
355
|
-
surfaceActive: this.isDark ? neutralSwatch[700] : neutralSwatch[300],
|
|
356
|
-
border: this.resolved.border,
|
|
357
|
-
borderStrong: this.isDark ? neutralSwatch[600] : neutralSwatch[300],
|
|
358
|
-
divider: this.resolved.divider,
|
|
359
|
-
text: this.resolved.text,
|
|
360
|
-
textMuted: this.resolved.textMuted,
|
|
361
|
-
textSubtle: this.isDark ? neutralSwatch[300] : neutralSwatch[600],
|
|
362
|
-
disabledBg: this.resolved.disabledBg,
|
|
363
|
-
disabledText: this.resolved.disabledText
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
buildSurface(inverse) {
|
|
367
|
-
return {
|
|
368
|
-
default: this.resolved.surface,
|
|
369
|
-
subtle: this.resolved.background,
|
|
370
|
-
raised: this.resolved.surfaceRaised,
|
|
371
|
-
sunken: this.resolved.background,
|
|
372
|
-
overlay: this.resolved.surfaceRaised,
|
|
373
|
-
scrim: "#0000008f",
|
|
374
|
-
disabled: this.resolved.disabledBg,
|
|
375
|
-
inverse
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
measureContent(content, surface) {
|
|
379
|
-
const pairs = [
|
|
380
|
-
[
|
|
381
|
-
"content.default/background",
|
|
382
|
-
content.default,
|
|
383
|
-
surface.sunken,
|
|
384
|
-
SURFACE_COLOR_POLICY.textContrast
|
|
385
|
-
],
|
|
386
|
-
[
|
|
387
|
-
"content.default/surface",
|
|
388
|
-
content.default,
|
|
389
|
-
surface.default,
|
|
390
|
-
SURFACE_COLOR_POLICY.textContrast
|
|
391
|
-
],
|
|
392
|
-
["content.muted/surface", content.muted, surface.default, SURFACE_COLOR_POLICY.textContrast],
|
|
393
|
-
[
|
|
394
|
-
"content.subtle/surface",
|
|
395
|
-
content.subtle,
|
|
396
|
-
surface.default,
|
|
397
|
-
SURFACE_COLOR_POLICY.textContrast
|
|
398
|
-
],
|
|
399
|
-
[
|
|
400
|
-
"content.disabled/disabled",
|
|
401
|
-
content.disabled,
|
|
402
|
-
surface.disabled,
|
|
403
|
-
SURFACE_COLOR_POLICY.disabledContrast
|
|
404
|
-
],
|
|
405
|
-
[
|
|
406
|
-
"content.inverse/inverse",
|
|
407
|
-
content.inverse,
|
|
408
|
-
surface.inverse,
|
|
409
|
-
SURFACE_COLOR_POLICY.textContrast
|
|
410
|
-
]
|
|
411
|
-
];
|
|
412
|
-
for (const [id, foreground, background, minimumContrast] of pairs) {
|
|
413
|
-
this.measurements.measureForeground(id, parseHexColorOrThrow(foreground), parseHexColorOrThrow(background), minimumContrast);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
measureSurfaceSeparation(surface) {
|
|
417
|
-
return [
|
|
418
|
-
this.measureSurface("surface.default", surface.default),
|
|
419
|
-
this.measureSurface("surface.raised", surface.raised),
|
|
420
|
-
this.measureSurface("surface.disabled", surface.disabled)
|
|
421
|
-
];
|
|
422
|
-
}
|
|
423
|
-
neutralTarget() {
|
|
424
|
-
return { lightness: this.isDark ? 0.65 : 0.55, chroma: 0.02 };
|
|
425
|
-
}
|
|
426
|
-
roleTarget() {
|
|
427
|
-
return { lightness: this.isDark ? 0.65 : 0.5, chroma: 0.15 };
|
|
428
|
-
}
|
|
429
|
-
strongNeutralTarget() {
|
|
430
|
-
return { lightness: this.isDark ? 0.8 : 0.4, chroma: 0.02 };
|
|
431
|
-
}
|
|
432
|
-
textTarget() {
|
|
433
|
-
return { lightness: this.isDark ? 0.75 : 0.45, chroma: 0.15 };
|
|
434
|
-
}
|
|
435
|
-
createSurfaceContexts(minimumContrast) {
|
|
436
|
-
return [
|
|
437
|
-
{ id: "background", against: this.resolved.background, minimumContrast },
|
|
438
|
-
{ id: "surface", against: this.resolved.surface, minimumContrast }
|
|
439
|
-
];
|
|
440
|
-
}
|
|
441
|
-
measureSurface(id, foreground) {
|
|
442
|
-
return this.measurements.measureSurface(id, parseHexColorOrThrow(foreground), this.resolved.background, SURFACE_COLOR_POLICY.surfaceSeparation);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/resolveRoleSemantics.js
|
|
447
|
-
function resolveRoleSemantics({ base, disabledBg, disabledText, hover, id, isDark, measureForeground, onSurfaceText, outline, selectForeground, swatch }) {
|
|
448
|
-
const states = resolveRoleStateColors(swatch, isDark, base, hover);
|
|
449
|
-
return {
|
|
450
|
-
...states,
|
|
451
|
-
outline,
|
|
452
|
-
onSurfaceText,
|
|
453
|
-
onSolidText: selectForeground(`${id}.base`, states.base, SURFACE_COLOR_POLICY.textContrast),
|
|
454
|
-
onHoverText: selectForeground(`${id}.hover`, states.hover, SURFACE_COLOR_POLICY.textContrast),
|
|
455
|
-
onStrongText: selectForeground(`${id}.strong`, states.strong, SURFACE_COLOR_POLICY.textContrast),
|
|
456
|
-
onSoftText: selectForeground(`${id}.soft`, states.softBg, SURFACE_COLOR_POLICY.textContrast),
|
|
457
|
-
onSoftHoverText: selectForeground(`${id}.softHover`, states.softHover, SURFACE_COLOR_POLICY.textContrast),
|
|
458
|
-
onSoftActiveText: selectForeground(`${id}.softActive`, states.softActive, SURFACE_COLOR_POLICY.textContrast),
|
|
459
|
-
disabledBg,
|
|
460
|
-
onDisabledText: measureForeground(`${id}.disabled`, disabledText, disabledBg, SURFACE_COLOR_POLICY.disabledContrast)
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
function resolveRoleStateColors(swatch, isDark, base, hover) {
|
|
464
|
-
return {
|
|
465
|
-
base: base ?? swatch[500],
|
|
466
|
-
hover: hover ?? (isDark ? swatch[400] : swatch[600]),
|
|
467
|
-
strong: isDark ? swatch[300] : swatch[700],
|
|
468
|
-
softBg: isDark ? swatch[900] : swatch[100],
|
|
469
|
-
softHover: isDark ? swatch[800] : swatch[200],
|
|
470
|
-
softActive: isDark ? swatch[700] : swatch[300]
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/resolveSurfaceSemanticModel.js
|
|
475
|
-
function resolveSurfaceSemanticModel(input) {
|
|
476
|
-
const context = createResolutionContext(input);
|
|
477
|
-
const roles = resolveSemanticRoles(context);
|
|
478
|
-
const inverseSurface = context.isDark ? context.neutralSwatch[50] : context.neutralSwatch[900];
|
|
479
|
-
const inverseContent = context.isDark ? context.neutralSwatch[900] : context.neutralSwatch[50];
|
|
480
|
-
const neutral = context.policy.buildNeutral(context.neutralSwatch);
|
|
481
|
-
const surface = context.policy.buildSurface(inverseSurface);
|
|
482
|
-
const content = resolveContentSemantics(context, neutral.textSubtle, inverseContent);
|
|
483
|
-
const border = resolveBorderSemantics(context, roles.brand.outline);
|
|
484
|
-
context.policy.measureContent(content, surface);
|
|
485
|
-
return {
|
|
486
|
-
semantics: {
|
|
487
|
-
neutral,
|
|
488
|
-
brand: roles.brand,
|
|
489
|
-
secondary: roles.secondary,
|
|
490
|
-
accent: roles.accent,
|
|
491
|
-
highlight: roles.highlight,
|
|
492
|
-
danger: roles.danger,
|
|
493
|
-
success: roles.success,
|
|
494
|
-
warning: roles.warning,
|
|
495
|
-
error: roles.danger,
|
|
496
|
-
info: roles.info,
|
|
497
|
-
surface,
|
|
498
|
-
content,
|
|
499
|
-
border,
|
|
500
|
-
selection: {
|
|
501
|
-
background: roles.brand.softBg,
|
|
502
|
-
content: roles.brand.onSoftText,
|
|
503
|
-
border: border.focus
|
|
504
|
-
},
|
|
505
|
-
action: { primary: roles.brand, neutral: roles.neutralAction, danger: roles.danger }
|
|
506
|
-
},
|
|
507
|
-
colorDiagnostics: {
|
|
508
|
-
mode: context.mode,
|
|
509
|
-
generated: context.generated,
|
|
510
|
-
semanticReferences: context.references,
|
|
511
|
-
statusSwatches: context.statusSwatches.diagnostics,
|
|
512
|
-
selections: context.collector.selections,
|
|
513
|
-
contrasts: context.collector.contrasts,
|
|
514
|
-
surfaceSeparation: context.policy.measureSurfaceSeparation(surface)
|
|
515
|
-
}
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
function createResolutionContext(input) {
|
|
519
|
-
const { generated, mode, references, resolved } = input;
|
|
520
|
-
const { swatches } = generated;
|
|
521
|
-
const collector = createSurfaceColorDiagnosticCollector();
|
|
522
|
-
const isDark = mode === "dark";
|
|
523
|
-
return {
|
|
524
|
-
collector,
|
|
525
|
-
generated,
|
|
526
|
-
isDark,
|
|
527
|
-
mode,
|
|
528
|
-
neutralSwatch: swatches.neutral,
|
|
529
|
-
policy: createSurfaceSemanticPolicy(resolved, isDark, collector),
|
|
530
|
-
quaternarySwatch: swatches.quaternary ?? swatches.primary,
|
|
531
|
-
references,
|
|
532
|
-
resolved,
|
|
533
|
-
secondarySwatch: swatches.secondary ?? swatches.primary,
|
|
534
|
-
statusSwatches: createDefaultSemanticStatusSwatches(),
|
|
535
|
-
swatches,
|
|
536
|
-
tertiarySwatch: swatches.tertiary ?? swatches.primary
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
function resolveBorderSemantics(context, focus) {
|
|
540
|
-
const { collector, neutralSwatch, policy, resolved } = context;
|
|
541
|
-
return {
|
|
542
|
-
default: collector.selectColor("border.default", neutralSwatch, policy.neutralTarget(), policy.adjacentSurfaceContexts, policy.tiePolicy),
|
|
543
|
-
subtle: resolved.border,
|
|
544
|
-
strong: collector.selectColor("border.strong", neutralSwatch, policy.strongNeutralTarget(), policy.adjacentSurfaceContexts, policy.tiePolicy),
|
|
545
|
-
divider: resolved.divider,
|
|
546
|
-
focus
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
function resolveContentSemantics(context, subtle, inverse) {
|
|
550
|
-
const { collector, policy, resolved, secondarySwatch, swatches } = context;
|
|
551
|
-
return {
|
|
552
|
-
default: resolved.text,
|
|
553
|
-
muted: resolved.textMuted,
|
|
554
|
-
subtle,
|
|
555
|
-
disabled: resolved.disabledText,
|
|
556
|
-
icon: resolved.text,
|
|
557
|
-
link: collector.selectColor("content.link", swatches.primary, policy.textTarget(), policy.textSurfaceContexts, policy.tiePolicy),
|
|
558
|
-
visited: collector.selectColor("content.visited", secondarySwatch, policy.textTarget(), policy.textSurfaceContexts, policy.tiePolicy),
|
|
559
|
-
inverse
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
function resolveRole(context, id, swatch, options = {}) {
|
|
563
|
-
const { collector, isDark, policy, resolved } = context;
|
|
564
|
-
return resolveRoleSemantics({
|
|
565
|
-
base: options.base,
|
|
566
|
-
disabledBg: resolved.disabledBg,
|
|
567
|
-
disabledText: resolved.disabledText,
|
|
568
|
-
hover: options.hover,
|
|
569
|
-
id,
|
|
570
|
-
isDark,
|
|
571
|
-
measureForeground: collector.measureForeground,
|
|
572
|
-
onSurfaceText: collector.selectColor(`${id}.content`, swatch, policy.textTarget(), policy.textSurfaceContexts, policy.tiePolicy),
|
|
573
|
-
outline: collector.selectColor(`${id}.outline`, swatch, options.target ?? policy.roleTarget(), policy.adjacentSurfaceContexts, policy.tiePolicy),
|
|
574
|
-
selectForeground: collector.selectForeground,
|
|
575
|
-
swatch
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
function resolveSemanticRoles(context) {
|
|
579
|
-
const { neutralSwatch, resolved, secondarySwatch, statusSwatches, swatches } = context;
|
|
580
|
-
return {
|
|
581
|
-
brand: resolveRole(context, "brand", swatches.primary, {
|
|
582
|
-
base: resolved.action,
|
|
583
|
-
hover: resolved.actionEmphasis
|
|
584
|
-
}),
|
|
585
|
-
secondary: resolveRole(context, "secondary", secondarySwatch),
|
|
586
|
-
accent: resolveRole(context, "accent", context.tertiarySwatch),
|
|
587
|
-
highlight: resolveRole(context, "highlight", context.quaternarySwatch),
|
|
588
|
-
danger: resolveRole(context, "danger", statusSwatches.swatches.danger),
|
|
589
|
-
success: resolveRole(context, "success", statusSwatches.swatches.success),
|
|
590
|
-
warning: resolveRole(context, "warning", statusSwatches.swatches.warning),
|
|
591
|
-
info: resolveRole(context, "info", statusSwatches.swatches.info),
|
|
592
|
-
neutralAction: resolveRole(context, "neutral", neutralSwatch, {
|
|
593
|
-
target: context.policy.neutralTarget()
|
|
594
|
-
})
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/generatePalette.js
|
|
599
|
-
function generatePalette(config, mode = "light") {
|
|
600
|
-
const modeConfig = mode === "dark" ? config.dark : config.light;
|
|
601
|
-
const isDark = mode === "dark";
|
|
602
|
-
parseHexColorOrThrow(modeConfig.primaryColor);
|
|
603
|
-
const generated = generateThemeModeColors(modeConfig);
|
|
604
|
-
const { swatches } = generated;
|
|
605
|
-
const references = isDark ? DARK_SEMANTIC_COLOR_REFERENCES : LIGHT_SEMANTIC_COLOR_REFERENCES;
|
|
606
|
-
const resolved = resolveSemanticColors(generated, references);
|
|
607
|
-
const { semantics, colorDiagnostics } = resolveSurfaceSemanticModel({
|
|
608
|
-
generated,
|
|
609
|
-
mode,
|
|
610
|
-
references,
|
|
611
|
-
resolved
|
|
612
|
-
});
|
|
613
|
-
const { border, content, error, info, neutral, success, surface, warning } = semantics;
|
|
614
|
-
const colors = {
|
|
615
|
-
primary: swatches.primary[500],
|
|
616
|
-
secondary: (swatches.secondary ?? swatches.primary)[500],
|
|
617
|
-
accent: (swatches.tertiary ?? swatches.primary)[500],
|
|
618
|
-
highlight: (swatches.quaternary ?? swatches.primary)[500],
|
|
619
|
-
tertiary: (swatches.tertiary ?? swatches.primary)[500],
|
|
620
|
-
quaternary: (swatches.quaternary ?? swatches.primary)[500],
|
|
621
|
-
background: neutral.bg,
|
|
622
|
-
surface: surface.default,
|
|
623
|
-
text: content.default,
|
|
624
|
-
textSecondary: content.muted,
|
|
625
|
-
border: border.default,
|
|
626
|
-
error: error.base,
|
|
627
|
-
success: success.base,
|
|
628
|
-
warning: warning.base,
|
|
629
|
-
info: info.base
|
|
630
|
-
};
|
|
631
|
-
return {
|
|
632
|
-
colors,
|
|
633
|
-
swatches,
|
|
634
|
-
semantics,
|
|
635
|
-
colorDiagnostics
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/resolveInverseSurface.js
|
|
640
|
-
function resolveInverseSurface(theme, lightSurface, collector) {
|
|
641
|
-
const { neutral } = theme.swatches;
|
|
642
|
-
const base = theme.semantics.surface.inverse;
|
|
643
|
-
const adjacent = lightSurface ? neutral[100] : neutral[800];
|
|
644
|
-
const sunken = lightSurface ? neutral[200] : neutral[950];
|
|
645
|
-
const surface = {
|
|
646
|
-
...theme.semantics.surface,
|
|
647
|
-
default: base,
|
|
648
|
-
subtle: adjacent,
|
|
649
|
-
raised: adjacent,
|
|
650
|
-
sunken,
|
|
651
|
-
overlay: adjacent,
|
|
652
|
-
disabled: adjacent,
|
|
653
|
-
inverse: theme.semantics.surface.default
|
|
654
|
-
};
|
|
655
|
-
return { surface, surfaceSeparation: measureInverseSurfaceSeparation(surface, collector) };
|
|
656
|
-
}
|
|
657
|
-
function measureInverseSurfaceSeparation(surface, collector) {
|
|
658
|
-
const background = parseHexColorOrThrow(surface.sunken);
|
|
659
|
-
const surfaces = [
|
|
660
|
-
["surface.default", surface.default],
|
|
661
|
-
["surface.raised", surface.raised],
|
|
662
|
-
["surface.disabled", surface.disabled]
|
|
663
|
-
];
|
|
664
|
-
return surfaces.map(([id, foreground]) => collector.measureSurface(id, parseHexColorOrThrow(foreground), background, SURFACE_COLOR_POLICY.surfaceSeparation));
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
// node_modules/@ankhorage/surface/dist/features/theme/domain/projectInvertedTheme.js
|
|
668
|
-
function projectInvertedTheme(theme) {
|
|
669
|
-
const collector = createSurfaceColorDiagnosticCollector();
|
|
670
|
-
const lightSurface = theme.colorDiagnostics.mode === "dark";
|
|
671
|
-
const { neutral } = theme.swatches;
|
|
672
|
-
const { surface, surfaceSeparation } = resolveInverseSurface(theme, lightSurface, collector);
|
|
673
|
-
const selection = createInverseSelection(collector, surface, neutral, lightSurface);
|
|
674
|
-
const content = resolveInverseContent(theme, selection);
|
|
675
|
-
const border = resolveInverseBorder(theme, selection);
|
|
676
|
-
const roles = resolveInverseRoles(theme, selection);
|
|
677
|
-
const { neutralAction, ...semanticRoles } = roles;
|
|
678
|
-
const semantics = {
|
|
679
|
-
...theme.semantics,
|
|
680
|
-
neutral: resolveInverseNeutral(theme, surface, content, border, neutral, lightSurface),
|
|
681
|
-
surface,
|
|
682
|
-
content,
|
|
683
|
-
border,
|
|
684
|
-
...semanticRoles,
|
|
685
|
-
error: roles.danger,
|
|
686
|
-
selection: {
|
|
687
|
-
background: roles.brand.softBg,
|
|
688
|
-
content: roles.brand.onSoftText,
|
|
689
|
-
border: border.focus
|
|
690
|
-
},
|
|
691
|
-
action: { primary: roles.brand, neutral: neutralAction, danger: roles.danger }
|
|
692
|
-
};
|
|
693
|
-
return {
|
|
694
|
-
...theme,
|
|
695
|
-
inverted: true,
|
|
696
|
-
semantics,
|
|
697
|
-
colors: {
|
|
698
|
-
...theme.colors,
|
|
699
|
-
background: surface.sunken,
|
|
700
|
-
surface: surface.default,
|
|
701
|
-
text: content.default,
|
|
702
|
-
textSecondary: content.muted,
|
|
703
|
-
border: border.default
|
|
704
|
-
},
|
|
705
|
-
colorDiagnostics: {
|
|
706
|
-
...theme.colorDiagnostics,
|
|
707
|
-
selections: [...theme.colorDiagnostics.selections, ...collector.selections],
|
|
708
|
-
contrasts: [...theme.colorDiagnostics.contrasts, ...collector.contrasts],
|
|
709
|
-
surfaceSeparation
|
|
710
|
-
}
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
function createInverseSelection(collector, surface, neutral, lightSurface) {
|
|
714
|
-
return {
|
|
715
|
-
collector,
|
|
716
|
-
neutral,
|
|
717
|
-
contexts: [
|
|
718
|
-
{
|
|
719
|
-
id: "inverse-surface",
|
|
720
|
-
against: parseHexColorOrThrow(surface.default),
|
|
721
|
-
minimumContrast: SURFACE_COLOR_POLICY.textContrast
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
id: "inverse-subtle",
|
|
725
|
-
against: parseHexColorOrThrow(surface.subtle),
|
|
726
|
-
minimumContrast: SURFACE_COLOR_POLICY.textContrast
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
id: "inverse-sunken",
|
|
730
|
-
against: parseHexColorOrThrow(surface.sunken),
|
|
731
|
-
minimumContrast: SURFACE_COLOR_POLICY.textContrast
|
|
732
|
-
}
|
|
733
|
-
],
|
|
734
|
-
tiePolicy: lightSurface ? "higher-step" : "lower-step",
|
|
735
|
-
textTarget: { lightness: lightSurface ? 0.2 : 0.9, chroma: 0.02 },
|
|
736
|
-
mutedTarget: { lightness: lightSurface ? 0.35 : 0.75, chroma: 0.02 },
|
|
737
|
-
subtleTarget: { lightness: lightSurface ? 0.4 : 0.7, chroma: 0.02 },
|
|
738
|
-
borderTarget: { lightness: lightSurface ? 0.45 : 0.65, chroma: 0.02 }
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
function resolveInverseContent(theme, selection) {
|
|
742
|
-
const { neutral, primary } = theme.swatches;
|
|
743
|
-
const secondary = theme.swatches.secondary ?? primary;
|
|
744
|
-
return {
|
|
745
|
-
default: selectText("content.default", neutral, selection.textTarget, selection),
|
|
746
|
-
muted: selectText("content.muted", neutral, selection.mutedTarget, selection),
|
|
747
|
-
subtle: selectText("content.subtle", neutral, selection.subtleTarget, selection),
|
|
748
|
-
disabled: selectText("content.disabled", neutral, selection.subtleTarget, selection, SURFACE_COLOR_POLICY.disabledContrast),
|
|
749
|
-
icon: selectText("content.icon", neutral, selection.textTarget, selection),
|
|
750
|
-
link: selectText("content.link", primary, selection.textTarget, selection),
|
|
751
|
-
visited: selectText("content.visited", secondary, selection.textTarget, selection),
|
|
752
|
-
inverse: theme.semantics.content.default
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
function resolveInverseBorder(theme, selection) {
|
|
756
|
-
const { neutral } = theme.swatches;
|
|
757
|
-
const outline = selection.borderTarget;
|
|
758
|
-
return {
|
|
759
|
-
default: selectOutline("border.default", neutral, outline, selection),
|
|
760
|
-
subtle: selectOutline("border.subtle", neutral, outline, selection),
|
|
761
|
-
strong: selectOutline("border.strong", neutral, outline, selection),
|
|
762
|
-
divider: selectOutline("border.divider", neutral, outline, selection),
|
|
763
|
-
focus: selectOutline("border.focus", theme.swatches.primary, selection.textTarget, selection)
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
function resolveInverseRoles(theme, selection) {
|
|
767
|
-
const status = createDefaultSemanticStatusSwatches().swatches;
|
|
768
|
-
const { semantics } = theme;
|
|
769
|
-
return {
|
|
770
|
-
brand: projectRole("brand", semantics.brand, theme.swatches.primary, selection),
|
|
771
|
-
secondary: projectRole("secondary", semantics.secondary, theme.swatches.secondary ?? theme.swatches.primary, selection),
|
|
772
|
-
accent: projectRole("accent", semantics.accent, theme.swatches.tertiary ?? theme.swatches.primary, selection),
|
|
773
|
-
highlight: projectRole("highlight", semantics.highlight, theme.swatches.quaternary ?? theme.swatches.primary, selection),
|
|
774
|
-
danger: projectRole("danger", semantics.danger, status.danger, selection),
|
|
775
|
-
success: projectRole("success", semantics.success, status.success, selection),
|
|
776
|
-
warning: projectRole("warning", semantics.warning, status.warning, selection),
|
|
777
|
-
info: projectRole("info", semantics.info, status.info, selection),
|
|
778
|
-
neutralAction: projectRole("neutral", semantics.action.neutral, theme.swatches.neutral, selection)
|
|
779
|
-
};
|
|
780
|
-
}
|
|
781
|
-
function projectRole(id, role, swatch, selection) {
|
|
782
|
-
return {
|
|
783
|
-
...role,
|
|
784
|
-
onSurfaceText: selectText(`${id}.onSurfaceText`, swatch, selection.textTarget, selection),
|
|
785
|
-
outline: selectOutline(`${id}.outline`, swatch, selection.borderTarget, selection)
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
|
-
function resolveInverseNeutral(theme, surface, content, border, swatch, lightSurface) {
|
|
789
|
-
return {
|
|
790
|
-
...theme.semantics.neutral,
|
|
791
|
-
bg: surface.sunken,
|
|
792
|
-
bgSubtle: surface.subtle,
|
|
793
|
-
surface: surface.default,
|
|
794
|
-
surfaceHover: lightSurface ? swatch[200] : swatch[700],
|
|
795
|
-
surfaceActive: lightSurface ? swatch[300] : swatch[600],
|
|
796
|
-
border: border.default,
|
|
797
|
-
borderStrong: border.strong,
|
|
798
|
-
divider: border.divider,
|
|
799
|
-
text: content.default,
|
|
800
|
-
textMuted: content.muted,
|
|
801
|
-
textSubtle: content.subtle,
|
|
802
|
-
disabledBg: surface.disabled,
|
|
803
|
-
disabledText: content.disabled
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
function selectText(id, swatch, target, selection, minimumContrast = SURFACE_COLOR_POLICY.textContrast) {
|
|
807
|
-
const contexts = selection.contexts.map((context) => ({ ...context, minimumContrast }));
|
|
808
|
-
const color = selectInverseColor(id, swatch, target, contexts, selection);
|
|
809
|
-
for (const context of contexts) {
|
|
810
|
-
selection.collector.measureForeground(`inverse.${id}/${context.id}`, color, context.against, minimumContrast);
|
|
811
|
-
}
|
|
812
|
-
return color;
|
|
813
|
-
}
|
|
814
|
-
function selectOutline(id, swatch, target, selection) {
|
|
815
|
-
const contexts = selection.contexts.map((context) => ({
|
|
816
|
-
...context,
|
|
817
|
-
minimumContrast: SURFACE_COLOR_POLICY.uiContrast
|
|
818
|
-
}));
|
|
819
|
-
const color = selectInverseColor(id, swatch, target, contexts, selection);
|
|
820
|
-
for (const context of contexts) {
|
|
821
|
-
selection.collector.measureForeground(`inverse.${id}/${context.id}`, color, context.against, SURFACE_COLOR_POLICY.uiContrast);
|
|
822
|
-
}
|
|
823
|
-
return color;
|
|
824
|
-
}
|
|
825
|
-
function selectInverseColor(id, swatch, target, contexts, selection) {
|
|
826
|
-
const result = selectColorSwatchStep(swatch, target, contexts, selection.tiePolicy);
|
|
827
|
-
selection.collector.selections.push({ id: `inverse.${id}`, result });
|
|
828
|
-
return result.selected?.hex ?? selection.collector.selectColor(`inverse.${id}.neutralFallback`, selection.neutral, target, contexts, selection.tiePolicy);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
// node_modules/@ankhorage/surface/dist/features/theme/utils/resolveHeadingTokenOverrides.js
|
|
832
|
-
var HEADING_KEYS = new Set(["1", "2", "3", "4", "5", "6"]);
|
|
833
|
-
var HEADING_WEIGHTS = new Set(["regular", "medium", "semiBold", "bold"]);
|
|
834
|
-
function resolveHeadingTokenOverrides(defaults, overrides) {
|
|
835
|
-
validateHeadingKeys(overrides);
|
|
836
|
-
return {
|
|
837
|
-
1: resolveHeading("1", defaults[1], overrides?.["1"]),
|
|
838
|
-
2: resolveHeading("2", defaults[2], overrides?.["2"]),
|
|
839
|
-
3: resolveHeading("3", defaults[3], overrides?.["3"]),
|
|
840
|
-
4: resolveHeading("4", defaults[4], overrides?.["4"]),
|
|
841
|
-
5: resolveHeading("5", defaults[5], overrides?.["5"]),
|
|
842
|
-
6: resolveHeading("6", defaults[6], overrides?.["6"])
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
function validateHeadingKeys(overrides) {
|
|
846
|
-
for (const key of Object.keys(overrides ?? {})) {
|
|
847
|
-
if (!HEADING_KEYS.has(key))
|
|
848
|
-
throw new RangeError(`Unknown typography heading token: ${key}.`);
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
function resolveHeading(key, fallback, override) {
|
|
852
|
-
const size = override?.size ?? fallback.size;
|
|
853
|
-
const lineHeight = override?.lineHeight ?? fallback.lineHeight;
|
|
854
|
-
const weight = override?.weight ?? fallback.weight;
|
|
855
|
-
if (!Number.isFinite(size) || size <= 0) {
|
|
856
|
-
throw new RangeError(`Theme token typography.headings.${key}.size must be a finite positive number.`);
|
|
857
|
-
}
|
|
858
|
-
if (!Number.isFinite(lineHeight) || lineHeight <= 0) {
|
|
859
|
-
throw new RangeError(`Theme token typography.headings.${key}.lineHeight must be a finite positive number.`);
|
|
860
|
-
}
|
|
861
|
-
if (!isHeadingWeight(weight)) {
|
|
862
|
-
throw new RangeError(`Invalid heading weight for typography.headings.${key}: ${weight}.`);
|
|
863
|
-
}
|
|
864
|
-
return { size, lineHeight, weight };
|
|
865
|
-
}
|
|
866
|
-
function isHeadingWeight(value) {
|
|
867
|
-
return HEADING_WEIGHTS.has(value);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
// node_modules/@ankhorage/surface/dist/features/theme/utils/resolveNumericTokenOverrides.js
|
|
871
|
-
function resolveNumericTokenOverrides(family, overrides, requirePositive = false) {
|
|
872
|
-
if (overrides === undefined)
|
|
873
|
-
return {};
|
|
874
|
-
for (const [token, value] of Object.entries(overrides)) {
|
|
875
|
-
const invalid = !Number.isFinite(value) || (requirePositive ? value <= 0 : value < 0);
|
|
876
|
-
if (invalid) {
|
|
877
|
-
const expectation = requirePositive ? "a finite positive number" : "a finite non-negative number";
|
|
878
|
-
throw new RangeError(`Theme token ${family}.${token} must be ${expectation}.`);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
return { ...overrides };
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
// node_modules/@ankhorage/surface/dist/features/theme/utils/resolveWeightTokenOverrides.js
|
|
885
|
-
var WEIGHT_TOKEN_KEYS = new Set([
|
|
886
|
-
"thin",
|
|
887
|
-
"extraLight",
|
|
888
|
-
"light",
|
|
889
|
-
"regular",
|
|
890
|
-
"medium",
|
|
891
|
-
"semiBold",
|
|
892
|
-
"bold",
|
|
893
|
-
"extraBold",
|
|
894
|
-
"black"
|
|
895
|
-
]);
|
|
896
|
-
var FONT_WEIGHT_VALUES = new Set([
|
|
897
|
-
"100",
|
|
898
|
-
"200",
|
|
899
|
-
"300",
|
|
900
|
-
"400",
|
|
901
|
-
"500",
|
|
902
|
-
"600",
|
|
903
|
-
"700",
|
|
904
|
-
"800",
|
|
905
|
-
"900",
|
|
906
|
-
"bold",
|
|
907
|
-
"normal"
|
|
908
|
-
]);
|
|
909
|
-
function resolveWeightTokenOverrides(overrides) {
|
|
910
|
-
if (overrides === undefined)
|
|
911
|
-
return {};
|
|
912
|
-
return Object.fromEntries(Object.entries(overrides).map(([token, value]) => {
|
|
913
|
-
if (!WEIGHT_TOKEN_KEYS.has(token)) {
|
|
914
|
-
throw new RangeError(`Unknown typography weight token: ${token}.`);
|
|
915
|
-
}
|
|
916
|
-
if (!isFontWeight(value)) {
|
|
917
|
-
throw new RangeError(`Invalid font weight for typography.weights.${token}: ${value}.`);
|
|
918
|
-
}
|
|
919
|
-
return [token, value];
|
|
920
|
-
}));
|
|
921
|
-
}
|
|
922
|
-
function isFontWeight(value) {
|
|
923
|
-
return FONT_WEIGHT_VALUES.has(value);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
// node_modules/@ankhorage/surface/dist/features/theme/utils/resolveGlobalTokens.js
|
|
927
|
-
function resolveGlobalTokens(overrides) {
|
|
928
|
-
validateZeroTokens(overrides);
|
|
929
|
-
const typography = overrides?.typography;
|
|
930
|
-
return {
|
|
931
|
-
spacing: {
|
|
932
|
-
...DEFAULT_TOKENS.spacing,
|
|
933
|
-
...resolveNumericTokenOverrides("spacing", overrides?.spacing)
|
|
934
|
-
},
|
|
935
|
-
radii: {
|
|
936
|
-
...DEFAULT_TOKENS.radii,
|
|
937
|
-
...resolveNumericTokenOverrides("radii", overrides?.radii)
|
|
938
|
-
},
|
|
939
|
-
typography: {
|
|
940
|
-
headings: resolveHeadingTokenOverrides(DEFAULT_TOKENS.typography.headings, typography?.headings),
|
|
941
|
-
sizes: {
|
|
942
|
-
...DEFAULT_TOKENS.typography.sizes,
|
|
943
|
-
...resolveNumericTokenOverrides("typography.sizes", typography?.sizes, true)
|
|
944
|
-
},
|
|
945
|
-
weights: {
|
|
946
|
-
...DEFAULT_TOKENS.typography.weights,
|
|
947
|
-
...resolveWeightTokenOverrides(typography?.weights)
|
|
948
|
-
},
|
|
949
|
-
fonts: {
|
|
950
|
-
normal: { ...DEFAULT_TOKENS.typography.fonts.normal },
|
|
951
|
-
italic: { ...DEFAULT_TOKENS.typography.fonts.italic }
|
|
952
|
-
}
|
|
953
|
-
},
|
|
954
|
-
shadows: {
|
|
955
|
-
...DEFAULT_TOKENS.shadows,
|
|
956
|
-
...resolveNumericTokenOverrides("shadows", overrides?.shadows)
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
function validateZeroTokens(overrides) {
|
|
961
|
-
if (overrides?.spacing?.none !== undefined && overrides.spacing.none !== 0) {
|
|
962
|
-
throw new RangeError("Theme token spacing.none must remain 0.");
|
|
963
|
-
}
|
|
964
|
-
if (overrides?.radii?.none !== undefined && overrides.radii.none !== 0) {
|
|
965
|
-
throw new RangeError("Theme token radii.none must remain 0.");
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
// node_modules/@ankhorage/surface/dist/features/theme/application/use-cases/createTheme.js
|
|
970
|
-
var DEFAULT_CONFIG = {
|
|
971
|
-
id: "default",
|
|
972
|
-
name: "Default",
|
|
973
|
-
light: { primaryColor: "#3B82F6", harmony: "monochromatic" },
|
|
974
|
-
dark: { primaryColor: "#3B82F6", harmony: "monochromatic" }
|
|
975
|
-
};
|
|
976
|
-
function createTheme(config = DEFAULT_CONFIG, mode = "light", activeFontId, inverted = false) {
|
|
977
|
-
const { colors, swatches, semantics, colorDiagnostics } = generatePalette(config, mode);
|
|
978
|
-
const baseTheme = {
|
|
979
|
-
...resolveGlobalTokens(config.tokens),
|
|
980
|
-
colors,
|
|
981
|
-
swatches,
|
|
982
|
-
semantics,
|
|
983
|
-
colorDiagnostics,
|
|
984
|
-
config,
|
|
985
|
-
inverted: false
|
|
986
|
-
};
|
|
987
|
-
const themed = activeFontId ? withActiveFont(baseTheme, activeFontId) : baseTheme;
|
|
988
|
-
return inverted ? projectInvertedTheme(themed) : themed;
|
|
989
|
-
}
|
|
990
|
-
function withActiveFont(theme, activeFontId) {
|
|
991
|
-
const familyName = toPascalCase(activeFontId);
|
|
992
|
-
return {
|
|
993
|
-
...theme,
|
|
994
|
-
typography: {
|
|
995
|
-
...theme.typography,
|
|
996
|
-
fonts: {
|
|
997
|
-
normal: createFontMap(theme.typography.fonts.normal, familyName, "Regular"),
|
|
998
|
-
italic: createFontMap(theme.typography.fonts.italic, familyName, "Italic")
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
};
|
|
1002
|
-
}
|
|
1003
|
-
function createFontMap(fallback, familyName, style) {
|
|
1004
|
-
return {
|
|
1005
|
-
...fallback,
|
|
1006
|
-
"100": `${familyName}_100${style}`,
|
|
1007
|
-
"200": `${familyName}_200${style}`,
|
|
1008
|
-
"300": `${familyName}_300${style}`,
|
|
1009
|
-
"400": `${familyName}_400${style}`,
|
|
1010
|
-
"500": `${familyName}_500${style}`,
|
|
1011
|
-
"600": `${familyName}_600${style}`,
|
|
1012
|
-
"700": `${familyName}_700${style}`,
|
|
1013
|
-
"800": `${familyName}_800${style}`,
|
|
1014
|
-
"900": `${familyName}_900${style}`
|
|
1015
|
-
};
|
|
1016
|
-
}
|
|
1017
|
-
function toPascalCase(value) {
|
|
1018
|
-
return value.split(/[- ]+/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
// node_modules/@ankhorage/surface/dist/features/theme/adapters/inbound/ThemeRuntimeContext.js
|
|
1022
|
-
var defaultTheme = createTheme();
|
|
1023
|
-
var ThemeRuntimeContext = createContext2({
|
|
1024
|
-
theme: defaultTheme,
|
|
1025
|
-
mode: "light",
|
|
1026
|
-
inverted: false,
|
|
1027
|
-
setThemeConfig: () => {
|
|
1028
|
-
return;
|
|
1029
|
-
},
|
|
1030
|
-
setMode: () => {
|
|
1031
|
-
return;
|
|
1032
|
-
}
|
|
1033
|
-
});
|
|
1034
|
-
|
|
1035
|
-
// node_modules/@ankhorage/surface/dist/features/theme/adapters/inbound/useTheme.js
|
|
1036
|
-
function useTheme() {
|
|
1037
|
-
return use2(ThemeRuntimeContext);
|
|
1038
|
-
}
|
|
1039
|
-
// node_modules/@ankhorage/surface/dist/features/pressable/adapters/inbound/Pressable.js
|
|
1040
|
-
function Pressable({ children, disabled = false, interactionPolicy = "enabled", onPress, onLongPress, accessibilityLabel, accessibilityRole = "button", accessibilityState, style, testID, ...props }) {
|
|
1041
|
-
const { theme } = useTheme();
|
|
1042
|
-
const { breakpoint } = useResponsiveRuntime();
|
|
1043
|
-
const [hovered, setHovered] = React2.useState(false);
|
|
1044
|
-
const [focused, setFocused] = React2.useState(false);
|
|
1045
|
-
const isWeb = import_react_native2.Platform.OS === "web";
|
|
1046
|
-
const resolvedViewStyles = resolveViewStyles(theme, breakpoint, props);
|
|
1047
|
-
const pressHandlers = resolvePressHandlers(interactionPolicy, onPress, onLongPress);
|
|
1048
|
-
const pressableStyle = resolvePressableStyle({
|
|
1049
|
-
disabled,
|
|
1050
|
-
focusColor: theme.semantics.border.focus,
|
|
1051
|
-
focused,
|
|
1052
|
-
hovered,
|
|
1053
|
-
isWeb,
|
|
1054
|
-
resolvedViewStyles,
|
|
1055
|
-
style
|
|
1056
|
-
});
|
|
1057
|
-
return _jsx2(import_react_native2.Pressable, { ...pressHandlers, accessibilityLabel, accessibilityRole, accessibilityState: { ...accessibilityState, disabled }, "aria-checked": accessibilityState?.checked, disabled, onBlur: () => setFocused(false), onFocus: resolveFocusHandler(isWeb, setFocused), onHoverIn: isWeb ? () => setHovered(true) : undefined, onHoverOut: isWeb ? () => setHovered(false) : undefined, onKeyDown: resolveCheckboxSpaceKeyHandler(accessibilityRole, isWeb, pressHandlers.onPress), style: pressableStyle, testID, children: resolvePressableChildren(children, hovered, focused, disabled) });
|
|
1058
|
-
}
|
|
1059
|
-
function resolvePressHandlers(interactionPolicy, onPress, onLongPress) {
|
|
1060
|
-
return interactionPolicy === "passive" ? { onLongPress: undefined, onPress: undefined } : { onLongPress, onPress };
|
|
1061
|
-
}
|
|
1062
|
-
function resolveCheckboxSpaceKeyHandler(accessibilityRole, isWeb, onPress) {
|
|
1063
|
-
if (!isWeb || accessibilityRole !== "checkbox" || onPress === undefined)
|
|
1064
|
-
return;
|
|
1065
|
-
const onKeyDown = (event) => {
|
|
1066
|
-
if (event.nativeEvent.key !== " " && event.nativeEvent.key !== "Spacebar")
|
|
1067
|
-
return;
|
|
1068
|
-
event.preventDefault();
|
|
1069
|
-
document.activeElement?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
|
1070
|
-
};
|
|
1071
|
-
return onKeyDown;
|
|
1072
|
-
}
|
|
1073
|
-
function resolvePressableChildren(children, hovered, focused, disabled) {
|
|
1074
|
-
return (pressableState) => {
|
|
1075
|
-
const state = resolveInteractionState(pressableState, hovered, focused, disabled);
|
|
1076
|
-
return typeof children === "function" ? children(state) : children;
|
|
1077
|
-
};
|
|
1078
|
-
}
|
|
1079
|
-
function resolveFocusHandler(isWeb, setFocused) {
|
|
1080
|
-
return () => {
|
|
1081
|
-
if (isWeb)
|
|
1082
|
-
setFocused(true);
|
|
1083
|
-
};
|
|
1084
|
-
}
|
|
1085
|
-
function resolvePressableStyle({ disabled, focusColor, focused, hovered, isWeb, resolvedViewStyles, style }) {
|
|
1086
|
-
return (pressableState) => {
|
|
1087
|
-
const state = resolveInteractionState(pressableState, hovered, focused, disabled);
|
|
1088
|
-
return [resolvedViewStyles, resolveFocusRingStyles(focusColor, state.focused, isWeb), style];
|
|
1089
|
-
};
|
|
1090
|
-
}
|
|
1091
|
-
function resolveInteractionState(pressableState, hovered, focused, disabled) {
|
|
1092
|
-
return resolveInteractiveState({
|
|
1093
|
-
pressed: pressableState.pressed,
|
|
1094
|
-
hovered,
|
|
1095
|
-
focused,
|
|
1096
|
-
disabled
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
// src/features/selection/adapters/inbound/SelectableItem.tsx
|
|
1100
|
-
var import_react_native3 = __toESM(require_cjs(), 1);
|
|
1101
|
-
import React4 from "react";
|
|
1102
|
-
|
|
1103
|
-
// src/features/selection/adapters/inbound/SelectionProvider.tsx
|
|
1104
|
-
import React3 from "react";
|
|
1105
|
-
|
|
1106
|
-
// src/features/selection/utils/resolveSelectionNextIds.ts
|
|
1107
|
-
function normalizeIds(ids, mode) {
|
|
1108
|
-
const uniqueIds = [];
|
|
1109
|
-
const seen = new Set;
|
|
1110
|
-
for (const id of ids ?? []) {
|
|
1111
|
-
if (seen.has(id))
|
|
1112
|
-
continue;
|
|
1113
|
-
seen.add(id);
|
|
1114
|
-
uniqueIds.push(id);
|
|
1115
|
-
if (mode === "single")
|
|
1116
|
-
break;
|
|
1117
|
-
}
|
|
1118
|
-
return uniqueIds;
|
|
1119
|
-
}
|
|
1120
|
-
function areIdsEqual(a, b) {
|
|
1121
|
-
if (a.length !== b.length)
|
|
1122
|
-
return false;
|
|
1123
|
-
for (let index = 0;index < a.length; index += 1) {
|
|
1124
|
-
if (a.at(index) !== b.at(index))
|
|
1125
|
-
return false;
|
|
1126
|
-
}
|
|
1127
|
-
return true;
|
|
1128
|
-
}
|
|
1129
|
-
function clearIds() {
|
|
1130
|
-
return [];
|
|
1131
|
-
}
|
|
1132
|
-
function selectId({
|
|
1133
|
-
mode,
|
|
1134
|
-
ids,
|
|
1135
|
-
id
|
|
1136
|
-
}) {
|
|
1137
|
-
if (mode === "single")
|
|
1138
|
-
return [id];
|
|
1139
|
-
if (ids.includes(id))
|
|
1140
|
-
return ids;
|
|
1141
|
-
return [...ids, id];
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
// src/features/selection/adapters/inbound/SelectionProvider.tsx
|
|
1145
|
-
import { jsx } from "react/jsx-runtime";
|
|
1146
|
-
var MISSING_CONTEXT_MESSAGE = "ZORA selection context is missing. Wrap this tree in <SelectionProvider>.";
|
|
1147
|
-
var SelectionContext = React3.createContext(null);
|
|
1148
|
-
function resolveMode(mode) {
|
|
1149
|
-
return mode ?? "single";
|
|
1150
|
-
}
|
|
1151
|
-
function resolveDisabled(disabled) {
|
|
1152
|
-
return disabled ?? false;
|
|
1153
|
-
}
|
|
1154
|
-
function useSelection() {
|
|
1155
|
-
const value = React3.use(SelectionContext);
|
|
1156
|
-
if (!value)
|
|
1157
|
-
throw new Error(MISSING_CONTEXT_MESSAGE);
|
|
1158
|
-
return value;
|
|
1159
|
-
}
|
|
1160
|
-
function SelectionProvider2({
|
|
1161
|
-
children,
|
|
1162
|
-
selectedIds,
|
|
1163
|
-
defaultSelectedIds,
|
|
1164
|
-
mode,
|
|
1165
|
-
disabled,
|
|
1166
|
-
onSelectionChange,
|
|
1167
|
-
interactionPolicy
|
|
1168
|
-
}) {
|
|
1169
|
-
const resolvedMode = resolveMode(mode);
|
|
1170
|
-
const resolvedDisabled = resolveDisabled(disabled);
|
|
1171
|
-
const isControlled = selectedIds !== undefined;
|
|
1172
|
-
const [uncontrolledIds, setUncontrolledIds] = React3.useState(defaultSelectedIds ?? []);
|
|
1173
|
-
const rawIds = isControlled ? selectedIds : uncontrolledIds;
|
|
1174
|
-
const currentNormalizedIds = normalizeIds(rawIds, resolvedMode);
|
|
1175
|
-
const selectedIdSet = React3.useMemo(() => new Set(currentNormalizedIds), [currentNormalizedIds]);
|
|
1176
|
-
const commitSelectionChange = React3.useCallback((nextNormalizedIds) => {
|
|
1177
|
-
if (resolvedDisabled || interactionPolicy === "passive")
|
|
1178
|
-
return;
|
|
1179
|
-
if (areIdsEqual(nextNormalizedIds, currentNormalizedIds))
|
|
1180
|
-
return;
|
|
1181
|
-
onSelectionChange?.(nextNormalizedIds);
|
|
1182
|
-
if (!isControlled)
|
|
1183
|
-
setUncontrolledIds(nextNormalizedIds);
|
|
1184
|
-
}, [currentNormalizedIds, interactionPolicy, isControlled, onSelectionChange, resolvedDisabled]);
|
|
1185
|
-
const clear = React3.useCallback(() => {
|
|
1186
|
-
commitSelectionChange(normalizeIds(clearIds(), resolvedMode));
|
|
1187
|
-
}, [commitSelectionChange, resolvedMode]);
|
|
1188
|
-
const select = React3.useCallback((id) => {
|
|
1189
|
-
const nextIds = selectId({ mode: resolvedMode, ids: currentNormalizedIds, id });
|
|
1190
|
-
commitSelectionChange(normalizeIds(nextIds, resolvedMode));
|
|
1191
|
-
}, [commitSelectionChange, currentNormalizedIds, resolvedMode]);
|
|
1192
|
-
const toggle = React3.useCallback((id) => {
|
|
1193
|
-
const nextIds = applySelectionIntent(currentNormalizedIds, id, "toggle");
|
|
1194
|
-
commitSelectionChange(normalizeIds(nextIds, resolvedMode));
|
|
1195
|
-
}, [commitSelectionChange, currentNormalizedIds, resolvedMode]);
|
|
1196
|
-
const activate = React3.useCallback((id, intent) => {
|
|
1197
|
-
const effectiveIntent = resolvedMode === "single" ? "replace" : intent;
|
|
1198
|
-
const nextIds = applySelectionIntent(currentNormalizedIds, id, effectiveIntent);
|
|
1199
|
-
commitSelectionChange(normalizeIds(nextIds, resolvedMode));
|
|
1200
|
-
}, [commitSelectionChange, currentNormalizedIds, resolvedMode]);
|
|
1201
|
-
const value = React3.useMemo(() => ({
|
|
1202
|
-
mode: resolvedMode,
|
|
1203
|
-
disabled: resolvedDisabled,
|
|
1204
|
-
selectedIds: currentNormalizedIds,
|
|
1205
|
-
selectedCount: currentNormalizedIds.length,
|
|
1206
|
-
hasSelection: currentNormalizedIds.length > 0,
|
|
1207
|
-
isSelected: (id) => selectedIdSet.has(id),
|
|
1208
|
-
activate,
|
|
1209
|
-
select,
|
|
1210
|
-
toggle,
|
|
1211
|
-
clear
|
|
1212
|
-
}), [
|
|
1213
|
-
activate,
|
|
1214
|
-
clear,
|
|
1215
|
-
currentNormalizedIds,
|
|
1216
|
-
resolvedDisabled,
|
|
1217
|
-
resolvedMode,
|
|
1218
|
-
select,
|
|
1219
|
-
selectedIdSet,
|
|
1220
|
-
toggle
|
|
1221
|
-
]);
|
|
1222
|
-
return /* @__PURE__ */ jsx(SelectionContext, {
|
|
1223
|
-
value,
|
|
1224
|
-
children
|
|
1225
|
-
});
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
// src/features/selection/adapters/inbound/SelectableItem.tsx
|
|
1229
|
-
import { jsx as jsx2, Fragment } from "react/jsx-runtime";
|
|
1230
|
-
function resolveTrigger(trigger) {
|
|
1231
|
-
return trigger ?? "manual";
|
|
1232
|
-
}
|
|
1233
|
-
function isRenderProp(children) {
|
|
1234
|
-
return typeof children === "function";
|
|
1235
|
-
}
|
|
1236
|
-
var SelectableItem2 = withZoraThemeScope(SelectableItemInner);
|
|
1237
|
-
function SelectableItemInner({
|
|
1238
|
-
id,
|
|
1239
|
-
trigger,
|
|
1240
|
-
disabled = false,
|
|
1241
|
-
interactionPolicy,
|
|
1242
|
-
children
|
|
1243
|
-
}) {
|
|
1244
|
-
const selection = useSelection();
|
|
1245
|
-
const resolvedTrigger = resolveTrigger(trigger);
|
|
1246
|
-
const resolvedDisabled = selection.disabled || disabled;
|
|
1247
|
-
const selected = selection.isSelected(id);
|
|
1248
|
-
const activate = React4.useCallback((intent) => {
|
|
1249
|
-
if (resolvedDisabled || interactionPolicy === "passive")
|
|
1250
|
-
return;
|
|
1251
|
-
selection.activate(id, intent);
|
|
1252
|
-
}, [id, interactionPolicy, resolvedDisabled, selection]);
|
|
1253
|
-
const select = React4.useCallback(() => {
|
|
1254
|
-
if (resolvedDisabled || interactionPolicy === "passive")
|
|
1255
|
-
return;
|
|
1256
|
-
selection.select(id);
|
|
1257
|
-
}, [id, interactionPolicy, resolvedDisabled, selection]);
|
|
1258
|
-
const toggle = React4.useCallback(() => {
|
|
1259
|
-
if (resolvedDisabled || interactionPolicy === "passive")
|
|
1260
|
-
return;
|
|
1261
|
-
selection.toggle(id);
|
|
1262
|
-
}, [id, interactionPolicy, resolvedDisabled, selection]);
|
|
1263
|
-
const clear = React4.useCallback(() => {
|
|
1264
|
-
if (selection.disabled || interactionPolicy === "passive")
|
|
1265
|
-
return;
|
|
1266
|
-
selection.clear();
|
|
1267
|
-
}, [interactionPolicy, selection]);
|
|
1268
|
-
const itemState = React4.useMemo(() => ({
|
|
1269
|
-
id,
|
|
1270
|
-
selected,
|
|
1271
|
-
disabled: resolvedDisabled,
|
|
1272
|
-
mode: selection.mode,
|
|
1273
|
-
activate,
|
|
1274
|
-
select,
|
|
1275
|
-
toggle,
|
|
1276
|
-
clear
|
|
1277
|
-
}), [activate, clear, id, resolvedDisabled, select, selected, selection.mode, toggle]);
|
|
1278
|
-
const content = isRenderProp(children) ? children(itemState) : children;
|
|
1279
|
-
if (resolvedTrigger === "manual")
|
|
1280
|
-
return /* @__PURE__ */ jsx2(Fragment, {
|
|
1281
|
-
children: content
|
|
1282
|
-
});
|
|
1283
|
-
const handleActivation = (event) => {
|
|
1284
|
-
event.stopPropagation();
|
|
1285
|
-
if (resolvedDisabled || interactionPolicy === "passive")
|
|
1286
|
-
return;
|
|
1287
|
-
selection.activate(id, resolveSelectionEventIntent(event, import_react_native3.Platform.OS === "web" ? "pointer" : "touch"));
|
|
1288
|
-
};
|
|
1289
|
-
return /* @__PURE__ */ jsx2(Pressable, {
|
|
1290
|
-
interactionPolicy,
|
|
1291
|
-
accessibilityRole: "button",
|
|
1292
|
-
accessibilityState: { disabled: resolvedDisabled, selected },
|
|
1293
|
-
disabled: resolvedDisabled,
|
|
1294
|
-
onLongPress: resolvedTrigger === "longPress" ? handleActivation : undefined,
|
|
1295
|
-
onPress: resolvedTrigger === "press" ? handleActivation : undefined,
|
|
1296
|
-
children: content
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
export { SelectionProvider2, SelectableItem2 };
|