@ankhorage/zora 27.3.9 → 27.4.1
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 +12 -0
- package/README.md +1 -1
- package/dist/features/color/ColorHueScale.d.ts +4 -0
- package/dist/features/color/ColorHueScale.d.ts.map +1 -0
- package/dist/features/color/ColorHueScale.js +22 -0
- package/dist/features/color/ColorHueScale.js.map +1 -0
- package/dist/features/color/ColorPicker.d.ts +5 -0
- package/dist/features/color/ColorPicker.d.ts.map +1 -0
- package/dist/features/color/ColorPicker.js +48 -0
- package/dist/features/color/ColorPicker.js.map +1 -0
- package/dist/features/color/ColorTone.d.ts +5 -0
- package/dist/features/color/ColorTone.d.ts.map +1 -0
- package/dist/features/color/ColorTone.js +65 -0
- package/dist/features/color/ColorTone.js.map +1 -0
- package/dist/features/color/ColorWheel.d.ts +5 -0
- package/dist/features/color/ColorWheel.d.ts.map +1 -0
- package/dist/features/color/ColorWheel.js +125 -0
- package/dist/features/color/ColorWheel.js.map +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.d.ts +10 -0
- package/dist/features/color/ColorWheelKeyboardProxy.d.ts.map +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.js +2 -0
- package/dist/features/color/ColorWheelKeyboardProxy.js.map +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.native.d.ts +4 -0
- package/dist/features/color/ColorWheelKeyboardProxy.native.d.ts.map +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.native.js +17 -0
- package/dist/features/color/ColorWheelKeyboardProxy.native.js.map +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.web.d.ts +5 -0
- package/dist/features/color/ColorWheelKeyboardProxy.web.d.ts.map +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.web.js +29 -0
- package/dist/features/color/ColorWheelKeyboardProxy.web.js.map +1 -0
- package/dist/features/color/public.d.ts +6 -0
- package/dist/features/color/public.d.ts.map +1 -0
- package/dist/features/color/public.js +5 -0
- package/dist/features/color/public.js.map +1 -0
- package/dist/features/color/utils/resolveColorAtHue.d.ts +4 -0
- package/dist/features/color/utils/resolveColorAtHue.d.ts.map +1 -0
- package/dist/features/color/utils/resolveColorAtHue.js +12 -0
- package/dist/features/color/utils/resolveColorAtHue.js.map +1 -0
- package/dist/features/color/utils/resolveColorHue.d.ts +4 -0
- package/dist/features/color/utils/resolveColorHue.d.ts.map +1 -0
- package/dist/features/color/utils/resolveColorHue.js +8 -0
- package/dist/features/color/utils/resolveColorHue.js.map +1 -0
- package/dist/features/color/utils/resolveOklchColor.d.ts +5 -0
- package/dist/features/color/utils/resolveOklchColor.d.ts.map +1 -0
- package/dist/features/color/utils/resolveOklchColor.js +10 -0
- package/dist/features/color/utils/resolveOklchColor.js.map +1 -0
- package/dist/features/color/utils/resolveWheelColor.d.ts +4 -0
- package/dist/features/color/utils/resolveWheelColor.d.ts.map +1 -0
- package/dist/features/color/utils/resolveWheelColor.js +17 -0
- package/dist/features/color/utils/resolveWheelColor.js.map +1 -0
- package/dist/features/color/utils/resolveWheelColorComponents.d.ts +7 -0
- package/dist/features/color/utils/resolveWheelColorComponents.d.ts.map +1 -0
- package/dist/features/color/utils/resolveWheelColorComponents.js +11 -0
- package/dist/features/color/utils/resolveWheelColorComponents.js.map +1 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js +11 -7
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.d.ts +2 -2
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.js +7 -7
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphPointerDownReader.d.ts +7 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphPointerDownReader.d.ts.map +1 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphPointerDownReader.js +40 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphPointerDownReader.js.map +1 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js +28 -4
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js.map +1 -1
- package/dist/features/selection/application/resolveSelectionEventIntent.d.ts +1 -1
- package/dist/features/selection/application/resolveSelectionEventIntent.d.ts.map +1 -1
- package/dist/features/selection/application/resolveSelectionEventIntent.js +14 -5
- package/dist/features/selection/application/resolveSelectionEventIntent.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/types/color.d.ts +70 -0
- package/dist/types/color.d.ts.map +1 -0
- package/dist/types/color.js +2 -0
- package/dist/types/color.js.map +1 -0
- package/package.json +3 -1
- package/src/audit.test.ts +3 -3
- package/src/features/color/ColorHueScale.tsx +57 -0
- package/src/features/color/ColorPicker.tsx +105 -0
- package/src/features/color/ColorTone.tsx +137 -0
- package/src/features/color/ColorWheel.tsx +251 -0
- package/src/features/color/ColorWheelKeyboardProxy.native.tsx +34 -0
- package/src/features/color/ColorWheelKeyboardProxy.tsx +11 -0
- package/src/features/color/ColorWheelKeyboardProxy.web.tsx +47 -0
- package/src/features/color/public.ts +17 -0
- package/src/features/color/utils/colorMath.test.ts +37 -0
- package/src/features/color/utils/resolveColorAtHue.ts +14 -0
- package/src/features/color/utils/resolveColorHue.ts +10 -0
- package/src/features/color/utils/resolveOklchColor.ts +13 -0
- package/src/features/color/utils/resolveWheelColor.ts +28 -0
- package/src/features/color/utils/resolveWheelColorComponents.ts +16 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/GraphView.tsx +16 -4
- package/src/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.ts +24 -4
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphPointerDownReader.test.ts +28 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphPointerDownReader.ts +48 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.test.ts +16 -6
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.ts +34 -3
- package/src/features/selection/application/resolveSelectionEventIntent.test.ts +1 -0
- package/src/features/selection/application/resolveSelectionEventIntent.ts +18 -4
- package/src/index.ts +14 -0
- package/src/types/color.ts +75 -0
- package/src/webPackageExports.test.ts +15 -0
- package/web-dist/authoring/index.js +6 -5
- package/web-dist/chunks/{Accordion-5w8chhxm.js → Accordion-001ymezm.js} +3 -63
- package/web-dist/chunks/{Accordion-2d5jdxeg.js → Accordion-01s50nga.js} +2 -2
- package/web-dist/chunks/{Accordion-dhnd347t.js → Accordion-09jkcm1x.js} +695 -4591
- package/web-dist/chunks/Accordion-0z2t95zw.js +548 -0
- package/web-dist/chunks/{Accordion-z1k4wg10.js → Accordion-120nmpbe.js} +3 -3
- package/web-dist/chunks/{Accordion-zrn4dy6s.js → Accordion-401452az.js} +6 -6
- package/web-dist/chunks/{Accordion-yy6qy5y2.js → Accordion-44bcsg35.js} +6 -6
- package/web-dist/chunks/{Accordion-5hvq2r84.js → Accordion-49m38edd.js} +4 -4
- package/web-dist/chunks/{Accordion-x4bpna1q.js → Accordion-49mzcav8.js} +4 -4
- package/web-dist/chunks/{Accordion-h3r90b65.js → Accordion-52a3dpsm.js} +4 -4
- package/web-dist/chunks/{Accordion-bhr3r525.js → Accordion-549akrjn.js} +4 -4
- package/web-dist/chunks/{Accordion-7atd70rg.js → Accordion-64px84rh.js} +10 -10
- package/web-dist/chunks/{Accordion-enracgev.js → Accordion-6ec9bfd8.js} +4 -4
- package/web-dist/chunks/Accordion-6jb7b67v.js +66 -0
- package/web-dist/chunks/{Accordion-5gbd0wzf.js → Accordion-8ac6dkcs.js} +1 -1
- package/web-dist/chunks/{Accordion-w18jbs39.js → Accordion-8q7hn9aj.js} +1 -1
- package/web-dist/chunks/{Accordion-825x4t0z.js → Accordion-8vcs6nz6.js} +1 -1
- package/web-dist/chunks/{Accordion-qqv9mak2.js → Accordion-9d3rd7ne.js} +1 -1
- package/web-dist/chunks/{Accordion-zfsnh03k.js → Accordion-9hcbf56f.js} +2 -2
- package/web-dist/chunks/{Accordion-rrmy3736.js → Accordion-a6xxvydp.js} +2 -2
- package/web-dist/chunks/{Accordion-dv281jw0.js → Accordion-b4yr6yq3.js} +2 -2
- package/web-dist/chunks/{Accordion-c1x8bqnr.js → Accordion-b8t2gq8g.js} +9 -9
- package/web-dist/chunks/{Accordion-25xjvp3t.js → Accordion-dk40hsc0.js} +2 -2
- package/web-dist/chunks/{Accordion-1dr6ktbf.js → Accordion-dxhs3xwx.js} +7 -7
- package/web-dist/chunks/{Accordion-q5swmcwm.js → Accordion-e1krqvc4.js} +3 -3
- package/web-dist/chunks/{Accordion-md1g54wg.js → Accordion-eq27a9ms.js} +6 -5
- package/web-dist/chunks/{Accordion-b7jgtnvm.js → Accordion-ew2cebyd.js} +3 -3
- package/web-dist/chunks/{Accordion-j3twwxyt.js → Accordion-g9m813fh.js} +2 -2
- package/web-dist/chunks/{Accordion-b36h9a7g.js → Accordion-gysa24fk.js} +1 -1
- package/web-dist/chunks/{Accordion-2xdwc579.js → Accordion-h21ah8w3.js} +6 -6
- package/web-dist/chunks/{Accordion-2rtkfs9t.js → Accordion-hfb983jm.js} +3 -3
- package/web-dist/chunks/{Accordion-5p0pc8wp.js → Accordion-j61qh3rb.js} +2 -2
- package/web-dist/chunks/{Accordion-tf459afq.js → Accordion-kexh248h.js} +2 -2
- package/web-dist/chunks/{Accordion-gbe84kyw.js → Accordion-kx6695j5.js} +2 -2
- package/web-dist/chunks/{Accordion-w42y21pt.js → Accordion-mrhkw8n6.js} +1 -1
- package/web-dist/chunks/{Accordion-vyr0wyp9.js → Accordion-ng9pnz9r.js} +9 -9
- package/web-dist/chunks/{Accordion-x3shxr1k.js → Accordion-p43psvv8.js} +6 -6
- package/web-dist/chunks/{Accordion-6y9ac3ad.js → Accordion-rcs75kj4.js} +3 -3
- package/web-dist/chunks/Accordion-rj3ayvn5.js +3925 -0
- package/web-dist/chunks/{Accordion-4d12nnq0.js → Accordion-sheqvs8c.js} +11 -11
- package/web-dist/chunks/{Accordion-j77vvja1.js → Accordion-ss57gqjb.js} +5 -5
- package/web-dist/chunks/{Accordion-hsnh2dgt.js → Accordion-sttjd4rs.js} +7 -7
- package/web-dist/chunks/{Accordion-n95zwem8.js → Accordion-sz17szqm.js} +8 -8
- package/web-dist/chunks/{Accordion-0ecj6p6b.js → Accordion-tchccn9f.js} +5 -5
- package/web-dist/chunks/{Accordion-4d4xahgg.js → Accordion-tpd1vvy9.js} +77 -74
- package/web-dist/chunks/{Accordion-bm75sm6d.js → Accordion-vzgpdtr2.js} +1 -1
- package/web-dist/chunks/{Accordion-4hthnyjj.js → Accordion-wdefxczv.js} +9 -9
- package/web-dist/chunks/{Accordion-2pq8kbaq.js → Accordion-wtqev4qa.js} +7 -7
- package/web-dist/chunks/{Accordion-s6n61fx6.js → Accordion-x33am5bc.js} +3 -3
- package/web-dist/chunks/{Accordion-5zx8d19h.js → Accordion-xfdp8w37.js} +13 -13
- package/web-dist/chunks/{Accordion-st7rj6hc.js → Accordion-xs9aspze.js} +4 -4
- package/web-dist/chunks/{Accordion-nf16vayy.js → Accordion-z4m47w0b.js} +2 -2
- package/web-dist/chunks/{Accordion-x2d68rrj.js → Accordion-z5kr43w5.js} +4 -4
- package/web-dist/chunks/{Accordion-nks69epp.js → Accordion-z8c7y6d8.js} +5 -5
- package/web-dist/components/accordion/Accordion.js +10 -10
- package/web-dist/components/accordion-item/AccordionItem.js +10 -10
- package/web-dist/components/activity-indicator/ActivityIndicator.js +3 -3
- package/web-dist/components/app-bar/AppBar.js +16 -15
- package/web-dist/components/app-header/AppHeader.js +16 -15
- package/web-dist/components/app-shell/AppShell.js +4 -4
- package/web-dist/components/auth-screen/AuthScreen.js +21 -19
- package/web-dist/components/avatar/Avatar.js +10 -10
- package/web-dist/components/avatar-group/AvatarGroup.js +10 -10
- package/web-dist/components/badge/Badge.js +5 -5
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +19 -18
- package/web-dist/components/bottom-sheet/BottomSheet.js +6 -6
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +6 -6
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +6 -6
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +6 -6
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +6 -6
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +6 -6
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -14
- package/web-dist/components/button/Button.js +11 -10
- package/web-dist/components/button-group/ButtonGroup.js +11 -10
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +19 -18
- package/web-dist/components/card/Card.js +18 -17
- package/web-dist/components/card-back/CardBack.js +4 -4
- package/web-dist/components/card-hand/CardHand.js +4 -4
- package/web-dist/components/chat-list-item/ChatListItem.js +14 -14
- package/web-dist/components/checkbox/Checkbox.js +10 -10
- package/web-dist/components/checkbox-group/CheckboxGroup.js +10 -10
- package/web-dist/components/chess-board/ChessBoard.js +4 -4
- package/web-dist/components/chip/Chip.js +11 -11
- package/web-dist/components/chip-group/ChipGroup.js +11 -11
- package/web-dist/components/collection-editor/CollectionEditor.js +20 -19
- package/web-dist/components/color-hue-scale/ColorHueScale.d.ts +6 -0
- package/web-dist/components/color-hue-scale/ColorHueScale.js +33 -0
- package/web-dist/components/color-hue-scale/index.d.ts +1 -0
- package/web-dist/components/color-hue-scale/index.js +2 -0
- package/web-dist/components/color-picker/ColorPicker.d.ts +6 -0
- package/web-dist/components/color-picker/ColorPicker.js +33 -0
- package/web-dist/components/color-picker/index.d.ts +1 -0
- package/web-dist/components/color-picker/index.js +2 -0
- package/web-dist/components/color-tone/ColorTone.d.ts +6 -0
- package/web-dist/components/color-tone/ColorTone.js +33 -0
- package/web-dist/components/color-tone/index.d.ts +1 -0
- package/web-dist/components/color-tone/index.js +2 -0
- package/web-dist/components/color-wheel/ColorWheel.d.ts +6 -0
- package/web-dist/components/color-wheel/ColorWheel.js +33 -0
- package/web-dist/components/color-wheel/index.d.ts +1 -0
- package/web-dist/components/color-wheel/index.js +2 -0
- package/web-dist/components/content-rail/ContentRail.js +14 -13
- package/web-dist/components/data-table/DataTable.js +25 -24
- package/web-dist/components/date-picker/DatePicker.js +16 -15
- package/web-dist/components/dialog/Dialog.js +9 -9
- package/web-dist/components/divider/Divider.js +4 -4
- package/web-dist/components/empty-state/EmptyState.js +19 -18
- package/web-dist/components/explorer/Explorer.js +11 -11
- package/web-dist/components/field/Field.js +10 -10
- package/web-dist/components/file-explorer/FileExplorer.js +11 -11
- package/web-dist/components/flat-list/FlatList.js +11 -11
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +21 -19
- package/web-dist/components/form/Form.js +15 -14
- package/web-dist/components/form-actions/FormActions.js +15 -14
- package/web-dist/components/form-error/FormError.js +15 -14
- package/web-dist/components/game/Game.js +5 -5
- package/web-dist/components/game-entity/GameEntity.js +5 -5
- package/web-dist/components/game-field/GameField.js +5 -5
- package/web-dist/components/game-input-zone/GameInputZone.js +5 -5
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +5 -5
- package/web-dist/components/game-overlay/GameOverlay.js +5 -5
- package/web-dist/components/gradient/Gradient.js +5 -5
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +5 -5
- package/web-dist/components/graph-view/GraphView.js +81 -18
- package/web-dist/components/grid/Grid.js +4 -4
- package/web-dist/components/grid-line-overlay/GridLineOverlay.js +4 -4
- package/web-dist/components/grid-ruler/GridRuler.js +4 -4
- package/web-dist/components/heading/Heading.js +5 -5
- package/web-dist/components/hero/Hero.js +20 -19
- package/web-dist/components/icon/Icon.js +4 -4
- package/web-dist/components/icon-button/IconButton.js +11 -10
- package/web-dist/components/image/Image.js +8 -8
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +3 -3
- package/web-dist/components/list/List.js +11 -11
- package/web-dist/components/list-item/ListItem.js +11 -11
- package/web-dist/components/list-section/ListSection.js +11 -11
- package/web-dist/components/matrix-grid/MatrixGrid.js +5 -5
- package/web-dist/components/media-card/MediaCard.js +18 -17
- package/web-dist/components/media-explorer/MediaExplorer.js +11 -11
- package/web-dist/components/message-bubble/MessageBubble.js +14 -14
- package/web-dist/components/metric-card/MetricCard.js +18 -17
- package/web-dist/components/missing-element/MissingElement.js +9 -9
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +21 -19
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +21 -19
- package/web-dist/components/opening-book/OpeningBook.js +4 -4
- package/web-dist/components/otp-form/OtpForm.js +21 -19
- package/web-dist/components/pagination/Pagination.js +14 -13
- package/web-dist/components/palette-item/PaletteItem.js +18 -17
- package/web-dist/components/playing-card/PlayingCard.js +4 -4
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +4 -4
- package/web-dist/components/popover-menu/PopoverMenu.js +10 -10
- package/web-dist/components/post-card/PostCard.js +18 -17
- package/web-dist/components/product-card/ProductCard.js +18 -17
- package/web-dist/components/progress/Progress.js +8 -8
- package/web-dist/components/progress-ring/ProgressRing.js +8 -8
- package/web-dist/components/radio/Radio.js +12 -12
- package/web-dist/components/radio-group/RadioGroup.js +12 -12
- package/web-dist/components/rating/Rating.js +7 -7
- package/web-dist/components/reader/Reader.js +21 -20
- package/web-dist/components/scan-overlay/ScanOverlay.js +19 -18
- package/web-dist/components/screen/Screen.js +4 -4
- package/web-dist/components/screen-section/ScreenSection.js +8 -8
- package/web-dist/components/scroll-view/ScrollView.js +4 -4
- package/web-dist/components/search-input/SearchInput.js +14 -12
- package/web-dist/components/section-header/SectionHeader.js +8 -8
- package/web-dist/components/section-list/SectionList.js +11 -11
- package/web-dist/components/select/Select.js +14 -13
- package/web-dist/components/selectable-item/SelectableItem.js +3 -3
- package/web-dist/components/selection-provider/SelectionProvider.js +3 -3
- package/web-dist/components/sign-in-form/SignInForm.js +21 -19
- package/web-dist/components/sign-up-form/SignUpForm.js +21 -19
- package/web-dist/components/skeleton/Skeleton.js +21 -20
- package/web-dist/components/skeleton-card/SkeletonCard.js +21 -20
- package/web-dist/components/skeleton-list/SkeletonList.js +21 -20
- package/web-dist/components/skeleton-text/SkeletonText.js +21 -20
- package/web-dist/components/surface/Surface.js +5 -5
- package/web-dist/components/switch/Switch.js +5 -5
- package/web-dist/components/tab/Tab.js +5 -5
- package/web-dist/components/tab-list/TabList.js +5 -5
- package/web-dist/components/tab-panel/TabPanel.js +5 -5
- package/web-dist/components/tabletop-table/TabletopTable.js +4 -4
- package/web-dist/components/tabs/Tabs.js +5 -5
- package/web-dist/components/text/Text.js +5 -5
- package/web-dist/components/text-input/TextInput.js +14 -12
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +13 -12
- package/web-dist/components/time-picker/TimePicker.js +16 -15
- package/web-dist/components/timeline/Timeline.js +9 -9
- package/web-dist/components/toast/Toast.js +7 -7
- package/web-dist/components/toast-provider/ToastProvider.js +7 -7
- package/web-dist/components/toolbar/Toolbar.js +18 -17
- package/web-dist/components/tree-item/TreeItem.js +19 -18
- package/web-dist/components/tree-view/TreeView.js +1 -1
- package/web-dist/components/uploader/Uploader.js +23 -22
- package/web-dist/components/view/View.js +4 -4
- package/web-dist/manifest.json +1473 -1271
- package/web-dist/runtime/ZoraProvider.js +6 -6
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
isHexColor,
|
|
4
|
+
parseHexColorOrThrow,
|
|
5
|
+
converter_default,
|
|
6
|
+
formatHex,
|
|
7
|
+
generateHarmonyRoleColors,
|
|
8
|
+
generateColorSwatch
|
|
9
|
+
} from "./Accordion-tpd1vvy9.js";
|
|
10
|
+
import {
|
|
11
|
+
Pressable
|
|
12
|
+
} from "./Accordion-g9m813fh.js";
|
|
13
|
+
import {
|
|
14
|
+
withZoraThemeScope
|
|
15
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
16
|
+
import {
|
|
17
|
+
View2
|
|
18
|
+
} from "./Accordion-120nmpbe.js";
|
|
19
|
+
import {
|
|
20
|
+
Text3
|
|
21
|
+
} from "./Accordion-ew2cebyd.js";
|
|
22
|
+
import {
|
|
23
|
+
Button3,
|
|
24
|
+
Circle,
|
|
25
|
+
Line,
|
|
26
|
+
Path,
|
|
27
|
+
Polygon,
|
|
28
|
+
Svg
|
|
29
|
+
} from "./Accordion-rj3ayvn5.js";
|
|
30
|
+
import {
|
|
31
|
+
TextInput3
|
|
32
|
+
} from "./Accordion-001ymezm.js";
|
|
33
|
+
import {
|
|
34
|
+
Tab2,
|
|
35
|
+
TabList2,
|
|
36
|
+
TabPanel2,
|
|
37
|
+
Tabs2
|
|
38
|
+
} from "./Accordion-z5kr43w5.js";
|
|
39
|
+
|
|
40
|
+
// src/features/color/ColorHueScale.tsx
|
|
41
|
+
import { jsx } from "react/jsx-runtime";
|
|
42
|
+
var ColorHueScale2 = withZoraThemeScope(ColorHueScaleInner);
|
|
43
|
+
function ColorHueScaleInner({
|
|
44
|
+
themeId: _themeId,
|
|
45
|
+
mode: _mode,
|
|
46
|
+
inverted: _inverted,
|
|
47
|
+
interactionPolicy,
|
|
48
|
+
value,
|
|
49
|
+
onChange,
|
|
50
|
+
testID
|
|
51
|
+
}) {
|
|
52
|
+
const { swatch } = generateColorSwatch(value);
|
|
53
|
+
const swatches = Object.entries(swatch);
|
|
54
|
+
return /* @__PURE__ */ jsx(View2, {
|
|
55
|
+
accessibilityLabel: "Color scale previews; choose a preview as the next 500 base color",
|
|
56
|
+
direction: "row",
|
|
57
|
+
gap: "xs",
|
|
58
|
+
testID,
|
|
59
|
+
wrap: "wrap",
|
|
60
|
+
children: swatches.map(([step, color]) => /* @__PURE__ */ jsx(Pressable, {
|
|
61
|
+
accessibilityLabel: Number(step) === 500 ? `Current editable base color 500: ${color}` : `Use generated ${step} preview ${color} as the next base color 500`,
|
|
62
|
+
bg: color,
|
|
63
|
+
borderColor: "border",
|
|
64
|
+
borderWidth: Number(step) === 500 ? 3 : 1,
|
|
65
|
+
disabled: interactionPolicy === "passive",
|
|
66
|
+
height: 48,
|
|
67
|
+
onPress: () => onChange(color),
|
|
68
|
+
radius: "sm",
|
|
69
|
+
width: 48,
|
|
70
|
+
children: /* @__PURE__ */ jsx(Text3, {
|
|
71
|
+
align: "center",
|
|
72
|
+
variant: "caption",
|
|
73
|
+
children: step
|
|
74
|
+
})
|
|
75
|
+
}, step))
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// src/features/color/ColorWheel.tsx
|
|
80
|
+
import React from "react";
|
|
81
|
+
|
|
82
|
+
// src/features/color/ColorWheelKeyboardProxy.web.tsx
|
|
83
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
84
|
+
function ColorWheelKeyboardProxy({
|
|
85
|
+
children,
|
|
86
|
+
chroma,
|
|
87
|
+
disabled,
|
|
88
|
+
hue,
|
|
89
|
+
onChange
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
92
|
+
"aria-label": `Color wheel, hue ${Math.round(hue)}, chroma ${chroma.toFixed(2)}`,
|
|
93
|
+
"aria-valuemax": 360,
|
|
94
|
+
"aria-valuemin": 0,
|
|
95
|
+
"aria-valuenow": Math.round(hue),
|
|
96
|
+
"aria-valuetext": `Hue ${Math.round(hue)}, chroma ${chroma.toFixed(2)}`,
|
|
97
|
+
"aria-disabled": disabled,
|
|
98
|
+
onKeyDown: (event) => {
|
|
99
|
+
const nextValue = resolveKeyboardWheelValue(event.key, hue, chroma);
|
|
100
|
+
if (!nextValue || disabled)
|
|
101
|
+
return;
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
onChange(nextValue.hue, nextValue.chroma);
|
|
104
|
+
},
|
|
105
|
+
role: "slider",
|
|
106
|
+
tabIndex: disabled ? -1 : 0,
|
|
107
|
+
children
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function resolveKeyboardWheelValue(key, hue, chroma) {
|
|
111
|
+
if (key === "ArrowLeft")
|
|
112
|
+
return { chroma, hue: normalizeHue(hue - 5) };
|
|
113
|
+
if (key === "ArrowRight")
|
|
114
|
+
return { chroma, hue: normalizeHue(hue + 5) };
|
|
115
|
+
if (key === "ArrowDown")
|
|
116
|
+
return { chroma: Math.max(0, chroma - 0.02), hue };
|
|
117
|
+
if (key === "ArrowUp")
|
|
118
|
+
return { chroma: Math.min(0.2, chroma + 0.02), hue };
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
function normalizeHue(hue) {
|
|
122
|
+
return hue < 0 ? hue + 360 : hue >= 360 ? hue - 360 : hue;
|
|
123
|
+
}
|
|
124
|
+
// src/features/color/utils/resolveColorHue.ts
|
|
125
|
+
var toOklch = converter_default("oklch");
|
|
126
|
+
function resolveColorHue(color) {
|
|
127
|
+
const parsed = toOklch(color);
|
|
128
|
+
return typeof parsed?.h === "number" ? parsed.h : 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// src/features/color/utils/resolveOklchColor.ts
|
|
132
|
+
function resolveOklchColor(target, hue) {
|
|
133
|
+
const formatted = formatHex({ mode: "oklch", l: target.lightness, c: target.chroma, h: hue });
|
|
134
|
+
if (!formatted)
|
|
135
|
+
throw new Error("The supplied OKLCH target cannot be represented as a hex color.");
|
|
136
|
+
return parseHexColorOrThrow(formatted);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/features/color/utils/resolveWheelColorComponents.ts
|
|
140
|
+
var toOklch2 = converter_default("oklch");
|
|
141
|
+
function resolveWheelColorComponents(color) {
|
|
142
|
+
const parsed = toOklch2(color);
|
|
143
|
+
return {
|
|
144
|
+
chroma: typeof parsed?.c === "number" ? parsed.c : 0,
|
|
145
|
+
lightness: typeof parsed?.l === "number" ? parsed.l : 0.65
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// src/features/color/utils/resolveWheelColor.ts
|
|
150
|
+
function resolveWheelColor(color, x, y, center, radius, maxChroma) {
|
|
151
|
+
const { lightness } = resolveWheelColorComponents(color);
|
|
152
|
+
const deltaX = x - center;
|
|
153
|
+
const deltaY = y - center;
|
|
154
|
+
const distance = Math.min(Math.hypot(deltaX, deltaY), radius);
|
|
155
|
+
const hue = normalizeHue2(Math.atan2(deltaY, deltaX) * 180 / Math.PI + 90);
|
|
156
|
+
const chroma = distance / radius * maxChroma;
|
|
157
|
+
return resolveOklchColor({ lightness, chroma }, hue);
|
|
158
|
+
}
|
|
159
|
+
function normalizeHue2(hue) {
|
|
160
|
+
return hue < 0 ? hue + 360 : hue;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// src/features/color/ColorWheel.tsx
|
|
164
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
165
|
+
var WHEEL_SIZE = 240;
|
|
166
|
+
var WHEEL_CENTER = WHEEL_SIZE / 2;
|
|
167
|
+
var WHEEL_RADIUS = 104;
|
|
168
|
+
var WHEEL_SEGMENT_COUNT = 36;
|
|
169
|
+
var WHEEL_MAX_CHROMA = 0.2;
|
|
170
|
+
var ColorWheel2 = withZoraThemeScope(ColorWheelInner);
|
|
171
|
+
function ColorWheelInner({
|
|
172
|
+
themeId: _themeId,
|
|
173
|
+
mode: _mode,
|
|
174
|
+
inverted: _inverted,
|
|
175
|
+
interactionPolicy,
|
|
176
|
+
value,
|
|
177
|
+
harmony = null,
|
|
178
|
+
harmonies,
|
|
179
|
+
onChange,
|
|
180
|
+
testID
|
|
181
|
+
}) {
|
|
182
|
+
const hue = resolveColorHue(value);
|
|
183
|
+
const { chroma, lightness } = resolveWheelColorComponents(value);
|
|
184
|
+
const harmonyColors = harmony ? generateHarmonyRoleColors(value, harmony).colors : [];
|
|
185
|
+
const selectedPoint = resolveWheelPoint(hue, Math.min(1, chroma / WHEEL_MAX_CHROMA));
|
|
186
|
+
const harmonyPoints = harmonyColors.map((color) => resolveWheelPoint(color.hueDegrees));
|
|
187
|
+
const harmonyLines = resolveHarmonyLines(harmonyPoints, selectedPoint);
|
|
188
|
+
const changeColorAt = (x, y) => {
|
|
189
|
+
if (interactionPolicy === "passive")
|
|
190
|
+
return;
|
|
191
|
+
onChange({
|
|
192
|
+
color: resolveWheelColor(value, x, y, WHEEL_CENTER, WHEEL_RADIUS, WHEEL_MAX_CHROMA),
|
|
193
|
+
harmony
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
const changeLightness = (offset) => onChange({
|
|
197
|
+
color: resolveOklchColor({ chroma, lightness: Math.max(0, Math.min(1, lightness + offset)) }, hue),
|
|
198
|
+
harmony
|
|
199
|
+
});
|
|
200
|
+
return /* @__PURE__ */ jsxs(View2, {
|
|
201
|
+
align: "center",
|
|
202
|
+
gap: "sm",
|
|
203
|
+
testID,
|
|
204
|
+
children: [
|
|
205
|
+
/* @__PURE__ */ jsx3(ColorWheelKeyboardProxy, {
|
|
206
|
+
chroma,
|
|
207
|
+
disabled: interactionPolicy === "passive",
|
|
208
|
+
hue,
|
|
209
|
+
onChange: (nextHue, nextChroma) => onChange({
|
|
210
|
+
color: resolveOklchColor({ lightness: resolveWheelLightness(value), chroma: nextChroma }, nextHue),
|
|
211
|
+
harmony
|
|
212
|
+
}),
|
|
213
|
+
children: /* @__PURE__ */ jsxs(Svg, {
|
|
214
|
+
accessibilityLabel: "Color wheel",
|
|
215
|
+
height: WHEEL_SIZE,
|
|
216
|
+
onResponderGrant: (event) => {
|
|
217
|
+
const { locationX, locationY } = event.nativeEvent;
|
|
218
|
+
changeColorAt(locationX, locationY);
|
|
219
|
+
},
|
|
220
|
+
onResponderMove: (event) => {
|
|
221
|
+
const { locationX, locationY } = event.nativeEvent;
|
|
222
|
+
changeColorAt(locationX, locationY);
|
|
223
|
+
},
|
|
224
|
+
onStartShouldSetResponder: () => interactionPolicy !== "passive",
|
|
225
|
+
width: WHEEL_SIZE,
|
|
226
|
+
children: [
|
|
227
|
+
resolveWheelSegments().map((segment) => /* @__PURE__ */ jsx3(Path, {
|
|
228
|
+
d: segment.path,
|
|
229
|
+
fill: segment.color
|
|
230
|
+
}, segment.hue)),
|
|
231
|
+
harmony === "triadic" && harmonyPoints.length === 3 ? /* @__PURE__ */ jsx3(Polygon, {
|
|
232
|
+
fill: "none",
|
|
233
|
+
points: harmonyPoints.map((point) => `${point.x},${point.y}`).join(" "),
|
|
234
|
+
stroke: "currentColor",
|
|
235
|
+
strokeWidth: 2
|
|
236
|
+
}) : harmonyLines,
|
|
237
|
+
harmonyPoints.map((point) => /* @__PURE__ */ jsx3(Circle, {
|
|
238
|
+
cx: point.x,
|
|
239
|
+
cy: point.y,
|
|
240
|
+
fill: "currentColor",
|
|
241
|
+
r: 5
|
|
242
|
+
}, `${point.x}-${point.y}`)),
|
|
243
|
+
/* @__PURE__ */ jsx3(Circle, {
|
|
244
|
+
cx: selectedPoint.x,
|
|
245
|
+
cy: selectedPoint.y,
|
|
246
|
+
fill: "none",
|
|
247
|
+
r: 9,
|
|
248
|
+
stroke: "currentColor",
|
|
249
|
+
strokeWidth: 3
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
})
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ jsxs(View2, {
|
|
255
|
+
direction: "row",
|
|
256
|
+
gap: "xs",
|
|
257
|
+
wrap: "wrap",
|
|
258
|
+
children: [
|
|
259
|
+
/* @__PURE__ */ jsx3(Button3, {
|
|
260
|
+
disabled: interactionPolicy === "passive" || lightness <= 0,
|
|
261
|
+
onPress: () => changeLightness(-0.05),
|
|
262
|
+
children: "Lightness -"
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ jsx3(Button3, {
|
|
265
|
+
disabled: interactionPolicy === "passive" || lightness >= 1,
|
|
266
|
+
onPress: () => changeLightness(0.05),
|
|
267
|
+
children: "Lightness +"
|
|
268
|
+
})
|
|
269
|
+
]
|
|
270
|
+
}),
|
|
271
|
+
/* @__PURE__ */ jsx3(ColorHexInput, {
|
|
272
|
+
disabled: interactionPolicy === "passive",
|
|
273
|
+
harmony,
|
|
274
|
+
onChange,
|
|
275
|
+
value
|
|
276
|
+
}, value),
|
|
277
|
+
harmonies ? /* @__PURE__ */ jsxs(View2, {
|
|
278
|
+
direction: "row",
|
|
279
|
+
gap: "xs",
|
|
280
|
+
wrap: "wrap",
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsx3(Button3, {
|
|
283
|
+
disabled: interactionPolicy === "passive",
|
|
284
|
+
onPress: () => onChange({ color: value, harmony: null }),
|
|
285
|
+
variant: harmony === null ? "solid" : "outline",
|
|
286
|
+
children: "None"
|
|
287
|
+
}),
|
|
288
|
+
harmonies.map((candidate) => /* @__PURE__ */ jsx3(Button3, {
|
|
289
|
+
disabled: interactionPolicy === "passive",
|
|
290
|
+
onPress: () => onChange({ color: value, harmony: candidate }),
|
|
291
|
+
variant: harmony === candidate ? "solid" : "outline",
|
|
292
|
+
children: candidate
|
|
293
|
+
}, candidate))
|
|
294
|
+
]
|
|
295
|
+
}) : null
|
|
296
|
+
]
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function resolveWheelSegments() {
|
|
300
|
+
return Array.from({ length: WHEEL_SEGMENT_COUNT }, (_, index) => {
|
|
301
|
+
const hue = index * 360 / WHEEL_SEGMENT_COUNT;
|
|
302
|
+
return {
|
|
303
|
+
color: resolveOklchColor({ lightness: 0.65, chroma: WHEEL_MAX_CHROMA }, hue),
|
|
304
|
+
hue,
|
|
305
|
+
path: resolveSegmentPath(hue, hue + 360 / WHEEL_SEGMENT_COUNT)
|
|
306
|
+
};
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function resolveSegmentPath(startHue, endHue) {
|
|
310
|
+
const start = resolveWheelPoint(startHue);
|
|
311
|
+
const end = resolveWheelPoint(endHue);
|
|
312
|
+
return `M ${WHEEL_CENTER} ${WHEEL_CENTER} L ${start.x} ${start.y} A ${WHEEL_RADIUS} ${WHEEL_RADIUS} 0 0 1 ${end.x} ${end.y} Z`;
|
|
313
|
+
}
|
|
314
|
+
function resolveWheelPoint(hue, radiusRatio = 1) {
|
|
315
|
+
const radians = (hue - 90) * Math.PI / 180;
|
|
316
|
+
return {
|
|
317
|
+
x: WHEEL_CENTER + WHEEL_RADIUS * radiusRatio * Math.cos(radians),
|
|
318
|
+
y: WHEEL_CENTER + WHEEL_RADIUS * radiusRatio * Math.sin(radians)
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function resolveHarmonyLines(points, selectedPoint) {
|
|
322
|
+
return points.slice(1).reduce(({ lines, previous }, point) => ({
|
|
323
|
+
lines: [
|
|
324
|
+
...lines,
|
|
325
|
+
/* @__PURE__ */ jsx3(Line, {
|
|
326
|
+
stroke: "currentColor",
|
|
327
|
+
strokeWidth: 2,
|
|
328
|
+
x1: previous.x,
|
|
329
|
+
x2: point.x,
|
|
330
|
+
y1: previous.y,
|
|
331
|
+
y2: point.y
|
|
332
|
+
}, `${previous.x}-${previous.y}-${point.x}-${point.y}`)
|
|
333
|
+
],
|
|
334
|
+
previous: point
|
|
335
|
+
}), { lines: [], previous: points.at(0) ?? selectedPoint }).lines;
|
|
336
|
+
}
|
|
337
|
+
function resolveWheelLightness(color) {
|
|
338
|
+
const { lightness } = resolveWheelColorComponents(color);
|
|
339
|
+
return lightness;
|
|
340
|
+
}
|
|
341
|
+
function ColorHexInput({
|
|
342
|
+
disabled,
|
|
343
|
+
harmony,
|
|
344
|
+
onChange,
|
|
345
|
+
value
|
|
346
|
+
}) {
|
|
347
|
+
const [input, setInput] = React.useState(value);
|
|
348
|
+
return /* @__PURE__ */ jsx3(TextInput3, {
|
|
349
|
+
accessibilityLabel: "Color hex value",
|
|
350
|
+
disabled,
|
|
351
|
+
onChangeText: (nextValue) => {
|
|
352
|
+
setInput(nextValue);
|
|
353
|
+
if (isHexColor(nextValue))
|
|
354
|
+
onChange({ color: nextValue, harmony: harmony ?? null });
|
|
355
|
+
},
|
|
356
|
+
value: input
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// src/features/color/ColorTone.tsx
|
|
361
|
+
import React2 from "react";
|
|
362
|
+
import { jsx as jsx4, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
363
|
+
var MAX_TONE_COLORS = 4;
|
|
364
|
+
var ColorTone2 = withZoraThemeScope(ColorToneInner);
|
|
365
|
+
function ColorToneInner({
|
|
366
|
+
themeId: _themeId,
|
|
367
|
+
mode: _mode,
|
|
368
|
+
inverted: _inverted,
|
|
369
|
+
interactionPolicy,
|
|
370
|
+
tones,
|
|
371
|
+
selectionMode = "single",
|
|
372
|
+
value,
|
|
373
|
+
onChange,
|
|
374
|
+
testID
|
|
375
|
+
}) {
|
|
376
|
+
const [editingColorIndex, setEditingColorIndex] = React2.useState(0);
|
|
377
|
+
const selectedTone = tones.find((tone) => tone.id === value?.toneId);
|
|
378
|
+
const colors = value ? selectionMode === "single" ? value.colors.slice(0, 1) : value.colors.slice(0, MAX_TONE_COLORS) : [];
|
|
379
|
+
const currentEditingColorIndex = Math.min(editingColorIndex, Math.max(0, colors.length - 1));
|
|
380
|
+
const selectedColor = colors.at(currentEditingColorIndex);
|
|
381
|
+
const selectTone = (tone) => {
|
|
382
|
+
const hue = selectedColor ? resolveColorHue(selectedColor) : 0;
|
|
383
|
+
setEditingColorIndex(0);
|
|
384
|
+
onChange({ toneId: tone.id, colors: [resolveOklchColor(tone.accentTarget, hue)] });
|
|
385
|
+
};
|
|
386
|
+
return /* @__PURE__ */ jsxs2(View2, {
|
|
387
|
+
gap: "sm",
|
|
388
|
+
testID,
|
|
389
|
+
children: [
|
|
390
|
+
/* @__PURE__ */ jsx4(View2, {
|
|
391
|
+
direction: "row",
|
|
392
|
+
wrap: "wrap",
|
|
393
|
+
gap: "sm",
|
|
394
|
+
children: tones.map((tone) => {
|
|
395
|
+
const selected = value?.toneId === tone.id;
|
|
396
|
+
const color = selected && selectedColor ? selectedColor : resolveOklchColor(tone.accentTarget, 0);
|
|
397
|
+
return /* @__PURE__ */ jsx4(Pressable, {
|
|
398
|
+
accessibilityLabel: tone.accent,
|
|
399
|
+
accessibilityRole: "radio",
|
|
400
|
+
accessibilityState: { checked: selected },
|
|
401
|
+
bg: color,
|
|
402
|
+
borderColor: "border",
|
|
403
|
+
borderWidth: selected ? 3 : 1,
|
|
404
|
+
disabled: interactionPolicy === "passive",
|
|
405
|
+
height: 44,
|
|
406
|
+
onPress: () => selectTone(tone),
|
|
407
|
+
radius: "md",
|
|
408
|
+
width: 44
|
|
409
|
+
}, tone.id);
|
|
410
|
+
})
|
|
411
|
+
}),
|
|
412
|
+
selectedTone && selectedColor && value ? /* @__PURE__ */ jsxs2(Fragment, {
|
|
413
|
+
children: [
|
|
414
|
+
/* @__PURE__ */ jsxs2(View2, {
|
|
415
|
+
direction: "row",
|
|
416
|
+
gap: "xs",
|
|
417
|
+
wrap: "wrap",
|
|
418
|
+
children: [
|
|
419
|
+
colors.map((color, index) => /* @__PURE__ */ jsx4(Pressable, {
|
|
420
|
+
accessibilityLabel: `Selected ${selectedTone.accent} color ${index + 1}: ${color}`,
|
|
421
|
+
accessibilityRole: "radio",
|
|
422
|
+
accessibilityState: { checked: currentEditingColorIndex === index },
|
|
423
|
+
bg: color,
|
|
424
|
+
borderColor: "border",
|
|
425
|
+
borderWidth: currentEditingColorIndex === index ? 3 : 1,
|
|
426
|
+
disabled: interactionPolicy === "passive",
|
|
427
|
+
height: 44,
|
|
428
|
+
onPress: () => setEditingColorIndex(index),
|
|
429
|
+
radius: "md",
|
|
430
|
+
width: 44
|
|
431
|
+
}, `${color}-${index}`)),
|
|
432
|
+
selectionMode === "multiple" ? /* @__PURE__ */ jsx4(Button3, {
|
|
433
|
+
disabled: interactionPolicy === "passive" || colors.length >= MAX_TONE_COLORS,
|
|
434
|
+
onPress: () => {
|
|
435
|
+
setEditingColorIndex(colors.length);
|
|
436
|
+
onChange({
|
|
437
|
+
toneId: selectedTone.id,
|
|
438
|
+
colors: [...colors, resolveOklchColor(selectedTone.accentTarget, 0)]
|
|
439
|
+
});
|
|
440
|
+
},
|
|
441
|
+
children: "Add color"
|
|
442
|
+
}) : null,
|
|
443
|
+
selectionMode === "multiple" && colors.length > 1 ? /* @__PURE__ */ jsx4(Button3, {
|
|
444
|
+
disabled: interactionPolicy === "passive",
|
|
445
|
+
onPress: () => {
|
|
446
|
+
const nextColors = colors.filter((_, index) => index !== currentEditingColorIndex);
|
|
447
|
+
setEditingColorIndex(Math.min(currentEditingColorIndex, nextColors.length - 1));
|
|
448
|
+
onChange({ toneId: selectedTone.id, colors: nextColors });
|
|
449
|
+
},
|
|
450
|
+
children: "Remove color"
|
|
451
|
+
}) : null
|
|
452
|
+
]
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ jsx4(ColorWheel2, {
|
|
455
|
+
harmony: null,
|
|
456
|
+
interactionPolicy,
|
|
457
|
+
onChange: ({ color }) => {
|
|
458
|
+
const nextColor = resolveOklchColor(selectedTone.accentTarget, resolveColorHue(color));
|
|
459
|
+
onChange({
|
|
460
|
+
toneId: selectedTone.id,
|
|
461
|
+
colors: colors.map((entry, index) => index === currentEditingColorIndex ? nextColor : entry)
|
|
462
|
+
});
|
|
463
|
+
},
|
|
464
|
+
value: selectedColor
|
|
465
|
+
})
|
|
466
|
+
]
|
|
467
|
+
}) : null
|
|
468
|
+
]
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// src/features/color/ColorPicker.tsx
|
|
473
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
474
|
+
var ColorPicker2 = withZoraThemeScope(ColorPickerInner);
|
|
475
|
+
function ColorPickerInner({
|
|
476
|
+
themeId: _themeId,
|
|
477
|
+
mode: _mode,
|
|
478
|
+
inverted: _inverted,
|
|
479
|
+
tabs,
|
|
480
|
+
value,
|
|
481
|
+
onValueChange,
|
|
482
|
+
onSelectionChange,
|
|
483
|
+
hideTabListWhenSingle = true,
|
|
484
|
+
wheel,
|
|
485
|
+
tone,
|
|
486
|
+
hue,
|
|
487
|
+
testID
|
|
488
|
+
}) {
|
|
489
|
+
if (tabs.length === 0)
|
|
490
|
+
throw new Error("ColorPicker requires at least one tab.");
|
|
491
|
+
if (!tabs.includes(value.tab))
|
|
492
|
+
throw new Error("ColorPicker value must be configured in tabs.");
|
|
493
|
+
return /* @__PURE__ */ jsxs3(Tabs2, {
|
|
494
|
+
defaultValue: value.tab,
|
|
495
|
+
onValueChange: (nextValue) => {
|
|
496
|
+
if (isColorPickerTab(nextValue) && tabs.includes(nextValue))
|
|
497
|
+
onValueChange({ ...value, tab: nextValue });
|
|
498
|
+
},
|
|
499
|
+
testID,
|
|
500
|
+
value: value.tab,
|
|
501
|
+
children: [
|
|
502
|
+
tabs.length > 1 || !hideTabListWhenSingle ? /* @__PURE__ */ jsx5(TabList2, {
|
|
503
|
+
fill: true,
|
|
504
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsx5(Tab2, {
|
|
505
|
+
label: tab,
|
|
506
|
+
value: tab
|
|
507
|
+
}, tab))
|
|
508
|
+
}) : null,
|
|
509
|
+
tabs.map((tab) => /* @__PURE__ */ jsx5(TabPanel2, {
|
|
510
|
+
value: tab,
|
|
511
|
+
children: resolveTabContent(tab, value, wheel, tone, hue, onValueChange, onSelectionChange)
|
|
512
|
+
}, tab))
|
|
513
|
+
]
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
function isColorPickerTab(value) {
|
|
517
|
+
return value === "wheel" || value === "tone" || value === "hue";
|
|
518
|
+
}
|
|
519
|
+
function resolveTabContent(tab, value, wheel, tone, hue, onValueChange, onSelectionChange) {
|
|
520
|
+
if (tab === "wheel")
|
|
521
|
+
return wheel ? /* @__PURE__ */ jsx5(ColorWheel2, {
|
|
522
|
+
...wheel,
|
|
523
|
+
harmony: value.wheel.harmony,
|
|
524
|
+
onChange: (next) => {
|
|
525
|
+
onValueChange({ ...value, wheel: next });
|
|
526
|
+
onSelectionChange?.({ mode: "wheel", value: next });
|
|
527
|
+
},
|
|
528
|
+
value: value.wheel.color
|
|
529
|
+
}) : null;
|
|
530
|
+
if (tab === "tone")
|
|
531
|
+
return tone ? /* @__PURE__ */ jsx5(ColorTone2, {
|
|
532
|
+
...tone,
|
|
533
|
+
onChange: (next) => {
|
|
534
|
+
onValueChange({ ...value, tone: next });
|
|
535
|
+
onSelectionChange?.({ mode: "tone", value: next });
|
|
536
|
+
},
|
|
537
|
+
value: value.tone
|
|
538
|
+
}) : null;
|
|
539
|
+
return hue ? /* @__PURE__ */ jsx5(ColorHueScale2, {
|
|
540
|
+
...hue,
|
|
541
|
+
onChange: (next) => {
|
|
542
|
+
onValueChange({ ...value, hue: next });
|
|
543
|
+
onSelectionChange?.({ mode: "hue", value: next });
|
|
544
|
+
},
|
|
545
|
+
value: value.hue
|
|
546
|
+
}) : null;
|
|
547
|
+
}
|
|
548
|
+
export { ColorHueScale2, ColorWheel2, ColorTone2, ColorPicker2 };
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
resolveViewStyles,
|
|
9
9
|
View3,
|
|
10
10
|
Divider3
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-8q7hn9aj.js";
|
|
12
12
|
import {
|
|
13
13
|
useTheme
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-tpd1vvy9.js";
|
|
15
15
|
import {
|
|
16
16
|
withZoraThemeScope
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
18
18
|
import {
|
|
19
19
|
require_cjs
|
|
20
20
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
Button2
|
|
4
|
-
} from "./Accordion-dhnd347t.js";
|
|
5
2
|
import {
|
|
6
3
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
5
|
+
import {
|
|
6
|
+
Button2
|
|
7
|
+
} from "./Accordion-09jkcm1x.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-120nmpbe.js";
|
|
11
11
|
import {
|
|
12
12
|
Card2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-xfdp8w37.js";
|
|
14
14
|
|
|
15
15
|
// src/features/empty-state/adapters/inbound/EmptyState.tsx
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -8,23 +8,23 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
resolvePointerEvents,
|
|
10
10
|
View3
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-8q7hn9aj.js";
|
|
12
12
|
import {
|
|
13
13
|
useTheme
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-tpd1vvy9.js";
|
|
15
15
|
import {
|
|
16
16
|
Surface3
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-z4m47w0b.js";
|
|
18
18
|
import {
|
|
19
19
|
withZoraThemeScope
|
|
20
|
-
} from "./Accordion-
|
|
20
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
21
21
|
import {
|
|
22
22
|
View2
|
|
23
|
-
} from "./Accordion-
|
|
23
|
+
} from "./Accordion-120nmpbe.js";
|
|
24
24
|
import {
|
|
25
25
|
Heading2,
|
|
26
26
|
Text3
|
|
27
|
-
} from "./Accordion-
|
|
27
|
+
} from "./Accordion-ew2cebyd.js";
|
|
28
28
|
import {
|
|
29
29
|
resolveOverlayAnimation
|
|
30
30
|
} from "./Accordion-6ec4gxv2.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-120nmpbe.js";
|
|
8
8
|
import {
|
|
9
9
|
Text3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-ew2cebyd.js";
|
|
11
11
|
import {
|
|
12
12
|
useZoraTheme2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-gysa24fk.js";
|
|
14
14
|
import {
|
|
15
15
|
require_cjs
|
|
16
16
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
View3
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-8q7hn9aj.js";
|
|
5
5
|
import {
|
|
6
6
|
useTheme
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-tpd1vvy9.js";
|
|
8
8
|
import {
|
|
9
9
|
Text2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-8vcs6nz6.js";
|
|
11
11
|
import {
|
|
12
12
|
withZoraThemeScope
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveControlSize,
|
|
16
16
|
resolveButtonColors
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
useZoraThemeRuntime
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-tpd1vvy9.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-mrhkw8n6.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-120nmpbe.js";
|
|
11
11
|
import {
|
|
12
12
|
useZoraTheme2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-gysa24fk.js";
|
|
14
14
|
import {
|
|
15
15
|
require_cjs
|
|
16
16
|
} from "./Accordion-xgpzh4wq.js";
|