@ankhorage/zora 25.6.0 → 25.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.d.ts +5 -0
- package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.d.ts.map +1 -0
- package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.js +59 -0
- package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.js.map +1 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridContentSize.d.ts +7 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridContentSize.d.ts.map +1 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridContentSize.js +24 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridContentSize.js.map +1 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridSelection.d.ts +5 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridSelection.d.ts.map +1 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridSelection.js +8 -0
- package/dist/features/matrix-grid/application/resolveMatrixGridSelection.js.map +1 -0
- package/dist/features/matrix-grid/meta.d.ts +11 -0
- package/dist/features/matrix-grid/meta.d.ts.map +1 -0
- package/dist/features/matrix-grid/meta.js +11 -0
- package/dist/features/matrix-grid/meta.js.map +1 -0
- package/dist/features/matrix-grid/public.d.ts +4 -0
- package/dist/features/matrix-grid/public.d.ts.map +1 -0
- package/dist/features/matrix-grid/public.js +3 -0
- package/dist/features/matrix-grid/public.js.map +1 -0
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +2 -0
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
- package/dist/features/registry/componentMeta.d.ts.map +1 -1
- package/dist/features/registry/componentMeta.js +2 -0
- package/dist/features/registry/componentMeta.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/matrix-grid.d.ts +23 -0
- package/dist/types/matrix-grid.d.ts.map +1 -0
- package/dist/types/matrix-grid.js +2 -0
- package/dist/types/matrix-grid.js.map +1 -0
- package/package.json +1 -1
- package/src/features/matrix-grid/adapters/inbound/MatrixGrid.test.tsx +232 -0
- package/src/features/matrix-grid/adapters/inbound/MatrixGrid.tsx +142 -0
- package/src/features/matrix-grid/application/resolveMatrixGridContentSize.test.ts +32 -0
- package/src/features/matrix-grid/application/resolveMatrixGridContentSize.ts +28 -0
- package/src/features/matrix-grid/application/resolveMatrixGridSelection.test.ts +10 -0
- package/src/features/matrix-grid/application/resolveMatrixGridSelection.ts +15 -0
- package/src/features/matrix-grid/application/resolveMatrixGridVisibleCells.test.ts +35 -0
- package/src/features/matrix-grid/meta.ts +12 -0
- package/src/features/matrix-grid/public.ts +3 -0
- package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +2 -0
- package/src/features/registry/componentMeta.ts +2 -0
- package/src/index.ts +2 -0
- package/src/types/matrix-grid.ts +29 -0
- package/web-dist/chunks/{Accordion-f43jba23.js → Accordion-2r0gqk3x.js} +1 -1
- package/web-dist/chunks/{Accordion-q8exgc3h.js → Accordion-a6551mh4.js} +1 -1
- package/web-dist/chunks/{Accordion-ebghcyzj.js → Accordion-bz04casa.js} +92 -3
- package/web-dist/chunks/{Accordion-szar8dt5.js → Accordion-jh72azm2.js} +1 -1
- package/web-dist/components/explorer/Explorer.js +2 -2
- package/web-dist/components/file-explorer/FileExplorer.js +2 -2
- package/web-dist/components/grid-line-overlay/GridLineOverlay.js +1 -1
- package/web-dist/components/grid-ruler/GridRuler.js +1 -1
- package/web-dist/components/grid-view/GridView.js +1 -1
- package/web-dist/components/matrix-grid/MatrixGrid.d.ts +3 -0
- package/web-dist/components/matrix-grid/MatrixGrid.js +153 -0
- package/web-dist/components/matrix-grid/index.d.ts +1 -0
- package/web-dist/components/matrix-grid/index.js +2 -0
- package/web-dist/components/media-explorer/MediaExplorer.js +2 -2
- package/web-dist/components/reader/Reader.js +1 -1
- package/web-dist/components/spatial-grid/SpatialGrid.js +1 -1
- package/web-dist/components/tile-grid/TileGrid.js +1 -1
- package/web-dist/components/time-grid/TimeGrid.js +2 -2
- package/web-dist/components/uploader/Uploader.js +2 -2
- package/web-dist/manifest.json +53 -24
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,GAMd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAuB,MAAM,8BAA8B,CAAC;AAqB9E,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACV,UAAU,GACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAGL,WAAW,GAEZ,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAYtD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB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,CAAC;AACxF,OAAO,EACL,UAAU,GAGX,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAQtD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAqB,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAkBjE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAUpD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export {\n Accordion,\n AccordionItem,\n type AccordionItemProps,\n type AccordionMode,\n type AccordionMultipleProps,\n type AccordionProps,\n type AccordionSingleProps,\n} from './features/accordion/public';\nexport {\n ActivityIndicator,\n type ActivityIndicatorProps,\n} from './features/activity-indicator/public';\nexport type { AppBarMode, AppBarOverflowMenu, AppBarProps } from './features/app-bar/public';\nexport { AppBar } from './features/app-bar/public';\nexport { AppHeader, type AppHeaderProps } from './features/app-header/public';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n AuthScreenMode,\n AuthScreenProps,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OAuthProviderButtonProps,\n OAuthProviderIconSpec,\n OAuthProviderItem,\n OAuthProviderListLayout,\n OAuthProviderListProps,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './features/auth/public';\nexport {\n AuthScreen,\n DEFAULT_OAUTH_PROVIDER_ICONS,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n resolveOAuthProviderIcon,\n resolveOAuthProviderLabel,\n SignInForm,\n SignUpForm,\n} from './features/auth/public';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './features/avatar/public';\nexport type { AvatarGroupItem, AvatarGroupProps } from './features/avatar/public';\nexport { Avatar, resolveAvatarInitials } from './features/avatar/public';\nexport { AvatarGroup } from './features/avatar/public';\nexport type { BadgeProps } from './features/badge/public';\nexport { Badge } from './features/badge/public';\nexport type { BottomSheetProps } from './features/bottom-sheet/public';\nexport { BottomSheet } from './features/bottom-sheet/public';\nexport {\n type BreadcrumbItem,\n type BreadcrumbPressEvent,\n Breadcrumbs,\n type BreadcrumbsProps,\n} from './features/breadcrumbs/public';\nexport type { ButtonProps } from './features/button/public';\nexport type {\n ButtonGroupAlign,\n ButtonGroupOrientation,\n ButtonGroupProps,\n} from './features/button/public';\nexport type { IconButtonProps } from './features/button/public';\nexport { Button } from './features/button/public';\nexport { ButtonGroup } from './features/button/public';\nexport { IconButton } from './features/button/public';\nexport type { CardProps } from './features/card/public';\nexport type { MediaCardImageProps, MediaCardProps } from './features/card/public';\nexport type { MetricCardProps } from './features/card/public';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n} from './features/card/public';\nexport type { ProductCardProps } from './features/card/public';\nexport { Card } from './features/card/public';\nexport { MediaCard } from './features/card/public';\nexport { MetricCard } from './features/card/public';\nexport { PostCard } from './features/card/public';\nexport { ProductCard } from './features/card/public';\nexport type {\n ChatListAvatar,\n ChatListItemProps,\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './features/chat/public';\nexport { ChatListItem, MessageBubble } from './features/chat/public';\nexport type {\n ChessBoardColorOverrides,\n ChessBoardColorScheme,\n ChessBoardOrientation,\n ChessBoardProps,\n ChessMoveAttempt,\n ChessMoveResult,\n ChessPieceCode,\n ChessPieceRenderContext,\n ChessPieceRenderer,\n ChessPieceState,\n ChessPromotionPiece,\n ChessSquareId,\n OpeningBookColorOverrides,\n OpeningBookColorScheme,\n OpeningBookMove,\n OpeningBookProps,\n} from './features/chess/public';\nexport type { ChessColorThemeShape } from './features/chess/public';\nexport { ChessBoard, chessBoardMeta, OpeningBook, openingBookMeta } from './features/chess/public';\nexport {\n chessSquares,\n createBoardSquares,\n createChessBoardColorScheme,\n createOpeningBookColorScheme,\n getLegalTargets,\n getSquareFile,\n getSquareRank,\n isLightSquare,\n readChessPieces,\n tryMove,\n} from './features/chess/public';\nexport type { ChipProps } from './features/chip/public';\nexport type { ChipGroupItem, ChipGroupProps } from './features/chip/public';\nexport { Chip } from './features/chip/public';\nexport { ChipGroup } from './features/chip/public';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './features/collection-editor/public';\nexport { CollectionEditor } from './features/collection-editor/public';\nexport type {\n ContentRailControlPressEvent,\n ContentRailDirection,\n ContentRailItemSize,\n ContentRailMotion,\n ContentRailProps,\n ContentRailSpacing,\n ContentRailVisibleRangeChangeEvent,\n} from './features/content-rail/public';\nexport { ContentRail } from './features/content-rail/public';\nexport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n DataTableSortState,\n} from './features/data-table/public';\nexport { DataTable } from './features/data-table/public';\nexport {\n DatePicker,\n type DatePickerProps,\n type DatePickerValue,\n} from './features/date-picker/public';\nexport { Dialog, type DialogProps } from './features/dialog/public';\nexport {\n EmptyState,\n type EmptyStateAction,\n type EmptyStateProps,\n} from './features/empty-state/public';\nexport type {\n ExplorerActivateEvent,\n ExplorerItem,\n ExplorerItemKind,\n ExplorerProps,\n ExplorerSelectionChangeEvent,\n ExplorerSelectionMode,\n} from './features/explorer/public';\nexport {\n Explorer,\n FileExplorer,\n MediaExplorer,\n resolveExplorerSelection,\n} from './features/explorer/public';\nexport {\n Checkbox,\n CheckboxGroup,\n type CheckboxGroupOption,\n type CheckboxGroupProps,\n type CheckboxProps,\n} from './features/form/checkbox/public';\nexport type {\n FieldProps,\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldInputType,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './features/form/public';\nexport {\n Field,\n Form,\n FormActions,\n FormError,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './features/form/public';\nexport {\n Radio,\n RadioGroup,\n type RadioGroupOption,\n type RadioGroupProps,\n type RadioProps,\n} from './features/form/radio/public';\nexport { SearchInput, type SearchInputProps } from './features/form/search-input/public';\nexport { Select, type SelectOption, type SelectProps } from './features/form/select/public';\nexport { Switch, type SwitchProps } from './features/form/switch/public';\nexport {\n TextInput,\n type TextInputProps,\n type TextInputTrailingAction,\n} from './features/form/text-input/public';\nexport type {\n GameEntityEasing,\n GameEntityMotionProps,\n GameEntityProps,\n GameFieldProps,\n GameInputZoneProps,\n GameKeyboardBinding,\n GameMeasurementProbeProps,\n GameOverlayPlacement,\n GameOverlayProps,\n GamePointerEvents,\n GameProps,\n} from './features/game/public';\nexport {\n Game,\n GameEntity,\n GameField,\n GameInputZone,\n GameMeasurementProbe,\n GameOverlay,\n} from './features/game/public';\nexport type {\n GradientColor,\n GradientColors,\n GradientLocations,\n GradientPoint,\n GradientProps,\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from './features/gradient/public';\nexport { Gradient, GradientRendererProvider } from './features/gradient/public';\nexport type {\n GridGuide,\n GridLineOverlayProps,\n GridRulerMark,\n GridRulerProps,\n GridRulerTickSource,\n} from './features/grid-rulers/public';\nexport { GridLineOverlay, GridRuler, resolveGridRulerMarks } from './features/grid-rulers/public';\nexport type { GridViewProps, TileGridItem, TileGridProps } from './features/grid-view/public';\nexport { GridView, layoutTileGrid, TileGrid } from './features/grid-view/public';\nexport {\n Hero,\n type HeroAction,\n type HeroAlign,\n type HeroLayout,\n type HeroProps,\n type HeroTone,\n} from './features/hero/public';\nexport type { IconProps } from './features/icon/public';\nexport { Icon } from './features/icon/public';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';\nexport { Image } from './features/image/public';\nexport {\n KeyboardAvoidingView,\n type KeyboardAvoidingViewBehavior,\n type KeyboardAvoidingViewProps,\n} from './features/keyboard-avoiding-view/public';\nexport type {\n AppShellProps,\n DividerProps,\n GridProps,\n ScreenProps,\n ScrollViewProps,\n ViewProps,\n} from './features/layout/public';\nexport { AppShell, Divider, Grid, Screen, ScrollView, View } from './features/layout/public';\nexport type {\n ManifestListProps,\n ManifestListSection,\n ManifestSectionListProps,\n} from './features/list/public';\nexport type {\n ListChildrenProps,\n ListItemProps,\n ListItemsProps,\n ListItemVariant,\n ListProps,\n ListSectionProps,\n} from './features/list/public';\nexport { FlatList, SectionList } from './features/list/public';\nexport { List, ListItem, ListSection } from './features/list/public';\nexport { MissingElement, type MissingElementProps } from './features/missing-element/public';\nexport { Pagination, type PaginationProps } from './features/pagination/public';\nexport type { PaletteItemProps } from './features/palette-item/public';\nexport { PaletteItem } from './features/palette-item/public';\nexport {\n PopoverMenu,\n type PopoverMenuAction,\n type PopoverMenuActionIntent,\n type PopoverMenuProps,\n} from './features/popover-menu/public';\nexport {\n Progress,\n type ProgressProps,\n ProgressRing,\n type ProgressRingProps,\n} from './features/progress/public';\nexport { Rating, type RatingProps } from './features/rating/public';\nexport type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderProps,\n ReaderResolvedSource,\n ReaderStatus,\n} from './features/reader/public';\nexport { Reader, resolveReaderProgress } from './features/reader/public';\nexport type {\n ZoraBindableComponentType,\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentManifestPolicy,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropAuthoring,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n ZoraThemeRecipeBooleanFieldMeta,\n ZoraThemeRecipeChoiceFieldMeta,\n ZoraThemeRecipeFieldMeta,\n ZoraThemeRecipeKind,\n ZoraThemeRecipeMeta,\n ZoraThemeRecipeMetaRegistry,\n ZoraThemeRecipeTokenFieldMeta,\n ZoraThemeTokenFamily,\n} from './features/registry';\nexport {\n ZORA_BINDABLE_COMPONENT_META,\n ZORA_COMPONENT_META,\n ZORA_THEME_RECIPE_META,\n ZORA_THEME_TOKEN_FAMILIES,\n} from './features/registry';\nexport { ZORA_COMPONENT_REGISTRY } from './features/registry/public';\nexport type {\n BarcodeScannerViewProps,\n BarcodeScanResult,\n CameraPermissionStatus,\n CameraPermissionViewProps,\n ScanOverlayProps,\n} from './features/scanner/public';\nexport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './features/scanner/public';\nexport {\n ScreenSection,\n type ScreenSectionProps,\n SectionHeader,\n type SectionHeaderProps,\n} from './features/section/public';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionIntent,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './features/selection/public';\nexport { SelectableItem, SelectionProvider, useSelection } from './features/selection/public';\nexport {\n Skeleton,\n SkeletonCard,\n type SkeletonCardProps,\n type SkeletonDimension,\n SkeletonList,\n type SkeletonListProps,\n type SkeletonListVariant,\n type SkeletonProps,\n type SkeletonRadius,\n SkeletonText,\n type SkeletonTextProps,\n} from './features/skeleton/public';\nexport type {\n SpatialGridItem,\n SpatialGridItemState,\n SpatialGridProps,\n} from './features/spatial-grid/public';\nexport { SpatialGrid } from './features/spatial-grid/public';\nexport type { SurfaceProps, SurfaceVariant } from './features/surface/public';\nexport { Surface } from './features/surface/public';\nexport type {\n CardBackProps,\n CardHandProps,\n CreatePokerTrainingTableStateOptions,\n CreateTabletopGameSeatsInput,\n PlayingCardProps,\n PlayingCardSuit,\n PlayingCardValue,\n PokerTrainingPlayer,\n PokerTrainingTableProps,\n PokerTrainingTableSize,\n PokerTrainingTableState,\n PokerTrainingTaskTableData,\n TabletopCardSize,\n TabletopColorOverrides,\n TabletopColorScheme,\n TabletopGameParticipantState,\n TabletopGameSeatDefinition,\n TabletopGameSeatPresentation,\n TabletopSeatCount,\n TabletopSeatState,\n TabletopShape,\n TabletopTableProps,\n} from './features/tabletop/public';\nexport {\n CardBack,\n CardHand,\n createPokerTrainingTableState,\n createTabletopColorScheme,\n createTabletopGameSeats,\n PlayingCard,\n PokerTrainingTable,\n pokerTrainingTableMeta,\n TabletopTable,\n tabletopTableMeta,\n} from './features/tabletop/public';\nexport {\n Tab,\n TabList,\n type TabListProps,\n TabPanel,\n type TabPanelProps,\n type TabProps,\n Tabs,\n type TabsProps,\n} from './features/tabs/public';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './features/theme/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './features/theme/colorModel';\nexport * from './features/theme/public';\nexport * from './features/theme/runtime';\nexport type { TimeGridInterval, TimeGridLane, TimeGridProps } from './features/time-grid/public';\nexport { resolveTimeGridVisibleIntervals, TimeGrid } from './features/time-grid/public';\nexport {\n TimePicker,\n type TimePickerProps,\n type TimePickerValue,\n} from './features/time-picker/public';\nexport type { TimelineItem, TimelineProps } from './features/timeline/public';\nexport { Timeline } from './features/timeline/public';\nexport type {\n ToastController,\n ToastOptions,\n ToastProps,\n ToastProviderProps,\n ToastStatus,\n} from './features/toast/public';\nexport { Toast, ToastProvider, useToast } from './features/toast/public';\nexport { Toolbar, type ToolbarProps } from './features/toolbar/public';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './features/tree-view/public';\nexport { TreeItem, TreeView } from './features/tree-view/public';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './features/typography/public';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './features/typography/public';\nexport { Heading } from './features/typography/public';\nexport { Text } from './features/typography/public';\nexport type {\n UploadAsset,\n UploadAssetBase,\n UploaderExplorerItem,\n UploaderProps,\n UploadProgressContext,\n UploadType,\n ValidateUploadAssetInput,\n} from './features/uploader/public';\nexport { Uploader, validateUploadAsset } from './features/uploader/public';\nexport type { ZoraComponentRegistry } from './types/registry';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,GAMd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAuB,MAAM,8BAA8B,CAAC;AAqB9E,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACV,UAAU,GACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAGL,WAAW,GAEZ,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA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AAC;AAOhC,OAAO,EACL,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EACL,UAAU,GAGX,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAQtD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAqB,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAkBjE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAUpD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export {\n Accordion,\n AccordionItem,\n type AccordionItemProps,\n type AccordionMode,\n type AccordionMultipleProps,\n type AccordionProps,\n type AccordionSingleProps,\n} from './features/accordion/public';\nexport {\n ActivityIndicator,\n type ActivityIndicatorProps,\n} from './features/activity-indicator/public';\nexport type { AppBarMode, AppBarOverflowMenu, AppBarProps } from './features/app-bar/public';\nexport { AppBar } from './features/app-bar/public';\nexport { AppHeader, type AppHeaderProps } from './features/app-header/public';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n AuthScreenMode,\n AuthScreenProps,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OAuthProviderButtonProps,\n OAuthProviderIconSpec,\n OAuthProviderItem,\n OAuthProviderListLayout,\n OAuthProviderListProps,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './features/auth/public';\nexport {\n AuthScreen,\n DEFAULT_OAUTH_PROVIDER_ICONS,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n resolveOAuthProviderIcon,\n resolveOAuthProviderLabel,\n SignInForm,\n SignUpForm,\n} from './features/auth/public';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './features/avatar/public';\nexport type { AvatarGroupItem, AvatarGroupProps } from './features/avatar/public';\nexport { Avatar, resolveAvatarInitials } from './features/avatar/public';\nexport { AvatarGroup } from './features/avatar/public';\nexport type { BadgeProps } from './features/badge/public';\nexport { Badge } from './features/badge/public';\nexport type { BottomSheetProps } from './features/bottom-sheet/public';\nexport { BottomSheet } from './features/bottom-sheet/public';\nexport {\n type BreadcrumbItem,\n type BreadcrumbPressEvent,\n Breadcrumbs,\n type BreadcrumbsProps,\n} from './features/breadcrumbs/public';\nexport type { ButtonProps } from './features/button/public';\nexport type {\n ButtonGroupAlign,\n ButtonGroupOrientation,\n ButtonGroupProps,\n} from './features/button/public';\nexport type { IconButtonProps } from './features/button/public';\nexport { Button } from './features/button/public';\nexport { ButtonGroup } from './features/button/public';\nexport { IconButton } from './features/button/public';\nexport type { CardProps } from './features/card/public';\nexport type { MediaCardImageProps, MediaCardProps } from './features/card/public';\nexport type { MetricCardProps } from './features/card/public';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n} from './features/card/public';\nexport type { ProductCardProps } from './features/card/public';\nexport { Card } from './features/card/public';\nexport { MediaCard } from './features/card/public';\nexport { MetricCard } from './features/card/public';\nexport { PostCard } from './features/card/public';\nexport { ProductCard } from './features/card/public';\nexport type {\n ChatListAvatar,\n ChatListItemProps,\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './features/chat/public';\nexport { ChatListItem, MessageBubble } from './features/chat/public';\nexport type {\n ChessBoardColorOverrides,\n ChessBoardColorScheme,\n ChessBoardOrientation,\n ChessBoardProps,\n ChessMoveAttempt,\n ChessMoveResult,\n ChessPieceCode,\n ChessPieceRenderContext,\n ChessPieceRenderer,\n ChessPieceState,\n ChessPromotionPiece,\n ChessSquareId,\n OpeningBookColorOverrides,\n OpeningBookColorScheme,\n OpeningBookMove,\n OpeningBookProps,\n} from './features/chess/public';\nexport type { ChessColorThemeShape } from './features/chess/public';\nexport { ChessBoard, chessBoardMeta, OpeningBook, openingBookMeta } from './features/chess/public';\nexport {\n chessSquares,\n createBoardSquares,\n createChessBoardColorScheme,\n createOpeningBookColorScheme,\n getLegalTargets,\n getSquareFile,\n getSquareRank,\n isLightSquare,\n readChessPieces,\n tryMove,\n} from './features/chess/public';\nexport type { ChipProps } from './features/chip/public';\nexport type { ChipGroupItem, ChipGroupProps } from './features/chip/public';\nexport { Chip } from './features/chip/public';\nexport { ChipGroup } from './features/chip/public';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './features/collection-editor/public';\nexport { CollectionEditor } from './features/collection-editor/public';\nexport type {\n ContentRailControlPressEvent,\n ContentRailDirection,\n ContentRailItemSize,\n ContentRailMotion,\n ContentRailProps,\n ContentRailSpacing,\n ContentRailVisibleRangeChangeEvent,\n} from './features/content-rail/public';\nexport { ContentRail } from './features/content-rail/public';\nexport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n DataTableSortState,\n} from './features/data-table/public';\nexport { DataTable } from './features/data-table/public';\nexport {\n DatePicker,\n type DatePickerProps,\n type DatePickerValue,\n} from './features/date-picker/public';\nexport { Dialog, type DialogProps } from './features/dialog/public';\nexport {\n EmptyState,\n type EmptyStateAction,\n type EmptyStateProps,\n} from './features/empty-state/public';\nexport type {\n ExplorerActivateEvent,\n ExplorerItem,\n ExplorerItemKind,\n ExplorerProps,\n ExplorerSelectionChangeEvent,\n ExplorerSelectionMode,\n} from './features/explorer/public';\nexport {\n Explorer,\n FileExplorer,\n MediaExplorer,\n resolveExplorerSelection,\n} from './features/explorer/public';\nexport {\n Checkbox,\n CheckboxGroup,\n type CheckboxGroupOption,\n type CheckboxGroupProps,\n type CheckboxProps,\n} from './features/form/checkbox/public';\nexport type {\n FieldProps,\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldInputType,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './features/form/public';\nexport {\n Field,\n Form,\n FormActions,\n FormError,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './features/form/public';\nexport {\n Radio,\n RadioGroup,\n type RadioGroupOption,\n type RadioGroupProps,\n type RadioProps,\n} from './features/form/radio/public';\nexport { SearchInput, type SearchInputProps } from './features/form/search-input/public';\nexport { Select, type SelectOption, type SelectProps } from './features/form/select/public';\nexport { Switch, type SwitchProps } from './features/form/switch/public';\nexport {\n TextInput,\n type TextInputProps,\n type TextInputTrailingAction,\n} from './features/form/text-input/public';\nexport type {\n GameEntityEasing,\n GameEntityMotionProps,\n GameEntityProps,\n GameFieldProps,\n GameInputZoneProps,\n GameKeyboardBinding,\n GameMeasurementProbeProps,\n GameOverlayPlacement,\n GameOverlayProps,\n GamePointerEvents,\n GameProps,\n} from './features/game/public';\nexport {\n Game,\n GameEntity,\n GameField,\n GameInputZone,\n GameMeasurementProbe,\n GameOverlay,\n} from './features/game/public';\nexport type {\n GradientColor,\n GradientColors,\n GradientLocations,\n GradientPoint,\n GradientProps,\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from './features/gradient/public';\nexport { Gradient, GradientRendererProvider } from './features/gradient/public';\nexport type {\n GridGuide,\n GridLineOverlayProps,\n GridRulerMark,\n GridRulerProps,\n GridRulerTickSource,\n} from './features/grid-rulers/public';\nexport { GridLineOverlay, GridRuler, resolveGridRulerMarks } from './features/grid-rulers/public';\nexport type { GridViewProps, TileGridItem, TileGridProps } from './features/grid-view/public';\nexport { GridView, layoutTileGrid, TileGrid } from './features/grid-view/public';\nexport {\n Hero,\n type HeroAction,\n type HeroAlign,\n type HeroLayout,\n type HeroProps,\n type HeroTone,\n} from './features/hero/public';\nexport type { IconProps } from './features/icon/public';\nexport { Icon } from './features/icon/public';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';\nexport { Image } from './features/image/public';\nexport {\n KeyboardAvoidingView,\n type KeyboardAvoidingViewBehavior,\n type KeyboardAvoidingViewProps,\n} from './features/keyboard-avoiding-view/public';\nexport type {\n AppShellProps,\n DividerProps,\n GridProps,\n ScreenProps,\n ScrollViewProps,\n ViewProps,\n} from './features/layout/public';\nexport { AppShell, Divider, Grid, Screen, ScrollView, View } from './features/layout/public';\nexport type {\n ManifestListProps,\n ManifestListSection,\n ManifestSectionListProps,\n} from './features/list/public';\nexport type {\n ListChildrenProps,\n ListItemProps,\n ListItemsProps,\n ListItemVariant,\n ListProps,\n ListSectionProps,\n} from './features/list/public';\nexport { FlatList, SectionList } from './features/list/public';\nexport { List, ListItem, ListSection } from './features/list/public';\nexport type { MatrixGridProps } from './features/matrix-grid/public';\nexport { MatrixGrid } from './features/matrix-grid/public';\nexport { MissingElement, type MissingElementProps } from './features/missing-element/public';\nexport { Pagination, type PaginationProps } from './features/pagination/public';\nexport type { PaletteItemProps } from './features/palette-item/public';\nexport { PaletteItem } from './features/palette-item/public';\nexport {\n PopoverMenu,\n type PopoverMenuAction,\n type PopoverMenuActionIntent,\n type PopoverMenuProps,\n} from './features/popover-menu/public';\nexport {\n Progress,\n type ProgressProps,\n ProgressRing,\n type ProgressRingProps,\n} from './features/progress/public';\nexport { Rating, type RatingProps } from './features/rating/public';\nexport type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderProps,\n ReaderResolvedSource,\n ReaderStatus,\n} from './features/reader/public';\nexport { Reader, resolveReaderProgress } from './features/reader/public';\nexport type {\n ZoraBindableComponentType,\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentManifestPolicy,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropAuthoring,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n ZoraThemeRecipeBooleanFieldMeta,\n ZoraThemeRecipeChoiceFieldMeta,\n ZoraThemeRecipeFieldMeta,\n ZoraThemeRecipeKind,\n ZoraThemeRecipeMeta,\n ZoraThemeRecipeMetaRegistry,\n ZoraThemeRecipeTokenFieldMeta,\n ZoraThemeTokenFamily,\n} from './features/registry';\nexport {\n ZORA_BINDABLE_COMPONENT_META,\n ZORA_COMPONENT_META,\n ZORA_THEME_RECIPE_META,\n ZORA_THEME_TOKEN_FAMILIES,\n} from './features/registry';\nexport { ZORA_COMPONENT_REGISTRY } from './features/registry/public';\nexport type {\n BarcodeScannerViewProps,\n BarcodeScanResult,\n CameraPermissionStatus,\n CameraPermissionViewProps,\n ScanOverlayProps,\n} from './features/scanner/public';\nexport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './features/scanner/public';\nexport {\n ScreenSection,\n type ScreenSectionProps,\n SectionHeader,\n type SectionHeaderProps,\n} from './features/section/public';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionIntent,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './features/selection/public';\nexport { SelectableItem, SelectionProvider, useSelection } from './features/selection/public';\nexport {\n Skeleton,\n SkeletonCard,\n type SkeletonCardProps,\n type SkeletonDimension,\n SkeletonList,\n type SkeletonListProps,\n type SkeletonListVariant,\n type SkeletonProps,\n type SkeletonRadius,\n SkeletonText,\n type SkeletonTextProps,\n} from './features/skeleton/public';\nexport type {\n SpatialGridItem,\n SpatialGridItemState,\n SpatialGridProps,\n} from './features/spatial-grid/public';\nexport { SpatialGrid } from './features/spatial-grid/public';\nexport type { SurfaceProps, SurfaceVariant } from './features/surface/public';\nexport { Surface } from './features/surface/public';\nexport type {\n CardBackProps,\n CardHandProps,\n CreatePokerTrainingTableStateOptions,\n CreateTabletopGameSeatsInput,\n PlayingCardProps,\n PlayingCardSuit,\n PlayingCardValue,\n PokerTrainingPlayer,\n PokerTrainingTableProps,\n PokerTrainingTableSize,\n PokerTrainingTableState,\n PokerTrainingTaskTableData,\n TabletopCardSize,\n TabletopColorOverrides,\n TabletopColorScheme,\n TabletopGameParticipantState,\n TabletopGameSeatDefinition,\n TabletopGameSeatPresentation,\n TabletopSeatCount,\n TabletopSeatState,\n TabletopShape,\n TabletopTableProps,\n} from './features/tabletop/public';\nexport {\n CardBack,\n CardHand,\n createPokerTrainingTableState,\n createTabletopColorScheme,\n createTabletopGameSeats,\n PlayingCard,\n PokerTrainingTable,\n pokerTrainingTableMeta,\n TabletopTable,\n tabletopTableMeta,\n} from './features/tabletop/public';\nexport {\n Tab,\n TabList,\n type TabListProps,\n TabPanel,\n type TabPanelProps,\n type TabProps,\n Tabs,\n type TabsProps,\n} from './features/tabs/public';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './features/theme/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './features/theme/colorModel';\nexport * from './features/theme/public';\nexport * from './features/theme/runtime';\nexport type { TimeGridInterval, TimeGridLane, TimeGridProps } from './features/time-grid/public';\nexport { resolveTimeGridVisibleIntervals, TimeGrid } from './features/time-grid/public';\nexport {\n TimePicker,\n type TimePickerProps,\n type TimePickerValue,\n} from './features/time-picker/public';\nexport type { TimelineItem, TimelineProps } from './features/timeline/public';\nexport { Timeline } from './features/timeline/public';\nexport type {\n ToastController,\n ToastOptions,\n ToastProps,\n ToastProviderProps,\n ToastStatus,\n} from './features/toast/public';\nexport { Toast, ToastProvider, useToast } from './features/toast/public';\nexport { Toolbar, type ToolbarProps } from './features/toolbar/public';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './features/tree-view/public';\nexport { TreeItem, TreeView } from './features/tree-view/public';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './features/typography/public';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './features/typography/public';\nexport { Heading } from './features/typography/public';\nexport { Text } from './features/typography/public';\nexport type {\n UploadAsset,\n UploadAssetBase,\n UploaderExplorerItem,\n UploaderProps,\n UploadProgressContext,\n UploadType,\n ValidateUploadAssetInput,\n} from './features/uploader/public';\nexport { Uploader, validateUploadAsset } from './features/uploader/public';\nexport type { ZoraComponentRegistry } from './types/registry';\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GridMatrixCell, GridMatrixCellPlacement, GridMatrixLayout, GridViewport } from '@ankhorage/grid-view';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ZoraBaseProps } from './base';
|
|
4
|
+
import type { SelectionMode } from './selection';
|
|
5
|
+
/** Code-first virtualized sparse-matrix presentation over the published grid-view geometry API. */
|
|
6
|
+
export interface MatrixGridProps extends ZoraBaseProps {
|
|
7
|
+
readonly layout: GridMatrixLayout;
|
|
8
|
+
readonly cells: readonly GridMatrixCell[];
|
|
9
|
+
readonly width: number;
|
|
10
|
+
readonly height: number;
|
|
11
|
+
/** A supplied viewport is controlled by the caller, including independent axis zoom. */
|
|
12
|
+
readonly viewport?: GridViewport;
|
|
13
|
+
readonly zoomX?: number;
|
|
14
|
+
readonly zoomY?: number;
|
|
15
|
+
readonly overscanPixels?: number;
|
|
16
|
+
readonly selectedCellIds?: readonly string[];
|
|
17
|
+
readonly selectionMode?: SelectionMode;
|
|
18
|
+
readonly onSelectionChange?: (ids: readonly string[]) => void;
|
|
19
|
+
readonly onViewportChange?: (viewport: GridViewport) => void;
|
|
20
|
+
readonly renderCell: (cell: GridMatrixCellPlacement) => React.ReactNode;
|
|
21
|
+
readonly accessibilityLabel?: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=matrix-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix-grid.d.ts","sourceRoot":"","sources":["../../src/types/matrix-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,mGAAmG;AACnG,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC;IACxE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix-grid.js","sourceRoot":"","sources":["../../src/types/matrix-grid.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n GridMatrixCell,\n GridMatrixCellPlacement,\n GridMatrixLayout,\n GridViewport,\n} from '@ankhorage/grid-view';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\nimport type { SelectionMode } from './selection';\n\n/** Code-first virtualized sparse-matrix presentation over the published grid-view geometry API. */\nexport interface MatrixGridProps extends ZoraBaseProps {\n readonly layout: GridMatrixLayout;\n readonly cells: readonly GridMatrixCell[];\n readonly width: number;\n readonly height: number;\n /** A supplied viewport is controlled by the caller, including independent axis zoom. */\n readonly viewport?: GridViewport;\n readonly zoomX?: number;\n readonly zoomY?: number;\n readonly overscanPixels?: number;\n readonly selectedCellIds?: readonly string[];\n readonly selectionMode?: SelectionMode;\n readonly onSelectionChange?: (ids: readonly string[]) => void;\n readonly onViewportChange?: (viewport: GridViewport) => void;\n readonly renderCell: (cell: GridMatrixCellPlacement) => React.ReactNode;\n readonly accessibilityLabel?: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.7.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
|
|
4
|
+
import { expect, test } from 'bun:test';
|
|
5
|
+
import { Window } from 'happy-dom';
|
|
6
|
+
import React, { act } from 'react';
|
|
7
|
+
import { createRoot } from 'react-dom/client';
|
|
8
|
+
|
|
9
|
+
const browserKeys = [
|
|
10
|
+
'window',
|
|
11
|
+
'document',
|
|
12
|
+
'Node',
|
|
13
|
+
'navigator',
|
|
14
|
+
'ShadowRoot',
|
|
15
|
+
'IS_REACT_ACT_ENVIRONMENT',
|
|
16
|
+
] as const;
|
|
17
|
+
const webDistRoot = join(import.meta.dir, '../../../../../web-dist');
|
|
18
|
+
const load = (path: string) => import(pathToFileURL(join(webDistRoot, path)).href);
|
|
19
|
+
|
|
20
|
+
/*** Mount MatrixGrid through React Native Web and restore the ambient DOM after each assertion. */
|
|
21
|
+
async function withMatrixDom(assertion: (host: HTMLElement, browser: Window) => Promise<void>) {
|
|
22
|
+
const browser = new Window();
|
|
23
|
+
const previous = browserKeys.map(
|
|
24
|
+
(key) => [key, Object.getOwnPropertyDescriptor(globalThis, key)] as const,
|
|
25
|
+
);
|
|
26
|
+
Object.assign(globalThis, {
|
|
27
|
+
IS_REACT_ACT_ENVIRONMENT: true,
|
|
28
|
+
window: browser,
|
|
29
|
+
document: browser.document,
|
|
30
|
+
Node: browser.Node,
|
|
31
|
+
navigator: browser.navigator,
|
|
32
|
+
ShadowRoot: browser.ShadowRoot,
|
|
33
|
+
});
|
|
34
|
+
const host = document.createElement('div');
|
|
35
|
+
document.body.appendChild(host);
|
|
36
|
+
try {
|
|
37
|
+
await assertion(host, browser);
|
|
38
|
+
} finally {
|
|
39
|
+
browser.close();
|
|
40
|
+
for (const [key, descriptor] of previous) {
|
|
41
|
+
if (descriptor) Object.defineProperty(globalThis, key, descriptor);
|
|
42
|
+
else Reflect.deleteProperty(globalThis, key);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const layout = {
|
|
48
|
+
columns: Array.from({ length: 100 }, (_, index) => ({
|
|
49
|
+
id: `column-${index}`,
|
|
50
|
+
size: 10 + (index % 3),
|
|
51
|
+
})),
|
|
52
|
+
rows: Array.from({ length: 100 }, (_, index) => ({ id: `row-${index}`, size: 8 + (index % 4) })),
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const cells = layout.rows.flatMap((row) =>
|
|
56
|
+
layout.columns.map((column) => ({
|
|
57
|
+
id: `${row.id}-${column.id}`,
|
|
58
|
+
rowId: row.id,
|
|
59
|
+
columnId: column.id,
|
|
60
|
+
})),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
type MatrixGridComponent = React.ComponentType<{
|
|
64
|
+
readonly cells: typeof cells;
|
|
65
|
+
readonly height: number;
|
|
66
|
+
readonly layout: typeof layout;
|
|
67
|
+
readonly onSelectionChange?: (ids: readonly string[]) => void;
|
|
68
|
+
readonly onViewportChange?: (viewport: unknown) => void;
|
|
69
|
+
readonly renderCell: (cell: { readonly id: string }) => React.ReactNode;
|
|
70
|
+
readonly selectedCellIds?: readonly string[];
|
|
71
|
+
readonly selectionMode?: 'multi';
|
|
72
|
+
readonly testID: string;
|
|
73
|
+
readonly viewport?: {
|
|
74
|
+
readonly height: number;
|
|
75
|
+
readonly offsetX: number;
|
|
76
|
+
readonly offsetY: number;
|
|
77
|
+
readonly pixelsPerUnitX: number;
|
|
78
|
+
readonly pixelsPerUnitY: number;
|
|
79
|
+
readonly width: number;
|
|
80
|
+
};
|
|
81
|
+
readonly width: number;
|
|
82
|
+
readonly zoomX?: number;
|
|
83
|
+
readonly zoomY?: number;
|
|
84
|
+
}>;
|
|
85
|
+
|
|
86
|
+
type ZoraProviderComponent = React.ComponentType<{ readonly children: React.ReactNode }>;
|
|
87
|
+
|
|
88
|
+
test('mounts only visible sparse cells with independent axis zoom and preserves native-web selection', async () => {
|
|
89
|
+
await withMatrixDom(async (host, browser) => {
|
|
90
|
+
const selected: (readonly string[])[] = [];
|
|
91
|
+
const root = createRoot(host);
|
|
92
|
+
const { MatrixGrid } = (await load('components/matrix-grid/MatrixGrid.js')) as {
|
|
93
|
+
MatrixGrid: MatrixGridComponent;
|
|
94
|
+
};
|
|
95
|
+
const { ZoraProvider } = (await load('runtime/ZoraProvider.js')) as {
|
|
96
|
+
ZoraProvider: ZoraProviderComponent;
|
|
97
|
+
};
|
|
98
|
+
try {
|
|
99
|
+
act(() =>
|
|
100
|
+
root.render(
|
|
101
|
+
<ZoraProvider>
|
|
102
|
+
<MatrixGrid
|
|
103
|
+
cells={cells}
|
|
104
|
+
height={96}
|
|
105
|
+
layout={layout}
|
|
106
|
+
selectedCellIds={[]}
|
|
107
|
+
selectionMode="multi"
|
|
108
|
+
testID="matrix"
|
|
109
|
+
viewport={{
|
|
110
|
+
height: 96,
|
|
111
|
+
offsetX: 0,
|
|
112
|
+
offsetY: 0,
|
|
113
|
+
pixelsPerUnitX: 2,
|
|
114
|
+
pixelsPerUnitY: 3,
|
|
115
|
+
width: 120,
|
|
116
|
+
}}
|
|
117
|
+
width={120}
|
|
118
|
+
onSelectionChange={(ids) => selected.push(ids)}
|
|
119
|
+
renderCell={(cell) => <span>{cell.id}</span>}
|
|
120
|
+
/>
|
|
121
|
+
</ZoraProvider>,
|
|
122
|
+
),
|
|
123
|
+
);
|
|
124
|
+
const mountedCells = host.querySelectorAll('[data-testid^="matrix-cell-"]');
|
|
125
|
+
expect(cells).toHaveLength(10_000);
|
|
126
|
+
expect(mountedCells.length).toBeGreaterThan(1);
|
|
127
|
+
expect(mountedCells.length).toBeLessThan(100);
|
|
128
|
+
const target = host.querySelector('[data-testid="matrix-cell-row-1-column-1"]');
|
|
129
|
+
expect(target).not.toBeNull();
|
|
130
|
+
expect(target?.parentElement?.getAttribute('style')).toContain('left: 20px');
|
|
131
|
+
expect(target?.parentElement?.getAttribute('style')).toContain('top: 24px');
|
|
132
|
+
void act(() => target?.dispatchEvent(new browser.MouseEvent('click', { bubbles: true })));
|
|
133
|
+
expect(selected).toEqual([['row-1-column-1']]);
|
|
134
|
+
} finally {
|
|
135
|
+
act(() => root.unmount());
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
test('does not propose controlled viewports on mount or fresh parent callback identities', async () => {
|
|
141
|
+
await withMatrixDom(async (host) => {
|
|
142
|
+
const proposals: unknown[] = [];
|
|
143
|
+
const root = createRoot(host);
|
|
144
|
+
const { MatrixGrid } = (await load('components/matrix-grid/MatrixGrid.js')) as {
|
|
145
|
+
MatrixGrid: MatrixGridComponent;
|
|
146
|
+
};
|
|
147
|
+
const { ZoraProvider } = (await load('runtime/ZoraProvider.js')) as {
|
|
148
|
+
ZoraProvider: ZoraProviderComponent;
|
|
149
|
+
};
|
|
150
|
+
const render = () => (
|
|
151
|
+
<ZoraProvider>
|
|
152
|
+
<MatrixGrid
|
|
153
|
+
cells={cells}
|
|
154
|
+
height={96}
|
|
155
|
+
layout={layout}
|
|
156
|
+
testID="controlled-matrix"
|
|
157
|
+
viewport={{
|
|
158
|
+
height: 96,
|
|
159
|
+
offsetX: 0,
|
|
160
|
+
offsetY: 0,
|
|
161
|
+
pixelsPerUnitX: 2,
|
|
162
|
+
pixelsPerUnitY: 3,
|
|
163
|
+
width: 120,
|
|
164
|
+
}}
|
|
165
|
+
width={120}
|
|
166
|
+
onViewportChange={(proposal) => proposals.push(proposal)}
|
|
167
|
+
renderCell={(cell) => <span>{cell.id}</span>}
|
|
168
|
+
/>
|
|
169
|
+
</ZoraProvider>
|
|
170
|
+
);
|
|
171
|
+
try {
|
|
172
|
+
act(() => root.render(render()));
|
|
173
|
+
act(() => root.render(render()));
|
|
174
|
+
expect(proposals).toEqual([]);
|
|
175
|
+
} finally {
|
|
176
|
+
act(() => root.unmount());
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
test('proposes an uncontrolled horizontal pan in world units while retaining independent axis zoom', async () => {
|
|
182
|
+
await withMatrixDom(async (host, browser) => {
|
|
183
|
+
const proposals: unknown[] = [];
|
|
184
|
+
const root = createRoot(host);
|
|
185
|
+
const { MatrixGrid } = (await load('components/matrix-grid/MatrixGrid.js')) as {
|
|
186
|
+
MatrixGrid: MatrixGridComponent;
|
|
187
|
+
};
|
|
188
|
+
const { ZoraProvider } = (await load('runtime/ZoraProvider.js')) as {
|
|
189
|
+
ZoraProvider: ZoraProviderComponent;
|
|
190
|
+
};
|
|
191
|
+
try {
|
|
192
|
+
act(() =>
|
|
193
|
+
root.render(
|
|
194
|
+
<ZoraProvider>
|
|
195
|
+
<MatrixGrid
|
|
196
|
+
cells={cells}
|
|
197
|
+
height={96}
|
|
198
|
+
layout={layout}
|
|
199
|
+
testID="uncontrolled-matrix"
|
|
200
|
+
width={120}
|
|
201
|
+
zoomX={2}
|
|
202
|
+
zoomY={3}
|
|
203
|
+
onViewportChange={(proposal) => proposals.push(proposal)}
|
|
204
|
+
renderCell={(cell) => <span>{cell.id}</span>}
|
|
205
|
+
/>
|
|
206
|
+
</ZoraProvider>,
|
|
207
|
+
),
|
|
208
|
+
);
|
|
209
|
+
const horizontalScroll = host.querySelector(
|
|
210
|
+
'[data-testid="uncontrolled-matrix-horizontal-scroll"]',
|
|
211
|
+
);
|
|
212
|
+
if (!horizontalScroll) throw new Error('Missing MatrixGrid horizontal scroll viewport.');
|
|
213
|
+
horizontalScroll.scrollLeft = 40;
|
|
214
|
+
await act(async () => {
|
|
215
|
+
horizontalScroll.dispatchEvent(new browser.Event('scroll', { bubbles: true }));
|
|
216
|
+
await new Promise<void>((resolve) => browser.setTimeout(resolve, 200));
|
|
217
|
+
});
|
|
218
|
+
expect(proposals).toEqual([
|
|
219
|
+
{
|
|
220
|
+
height: 96,
|
|
221
|
+
offsetX: 20,
|
|
222
|
+
offsetY: 0,
|
|
223
|
+
pixelsPerUnitX: 2,
|
|
224
|
+
pixelsPerUnitY: 3,
|
|
225
|
+
width: 120,
|
|
226
|
+
},
|
|
227
|
+
]);
|
|
228
|
+
} finally {
|
|
229
|
+
act(() => root.unmount());
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
});
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getVisibleMatrixCells,
|
|
3
|
+
type GridMatrixCellPlacement,
|
|
4
|
+
type GridViewport,
|
|
5
|
+
} from '@ankhorage/grid-view';
|
|
6
|
+
import { Pressable } from '@ankhorage/surface';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { StyleSheet, View } from 'react-native';
|
|
9
|
+
|
|
10
|
+
import type { MatrixGridProps } from '../../../../types/matrix-grid';
|
|
11
|
+
import { GridView } from '../../../grid-view/public';
|
|
12
|
+
import { resolveSelectionEventIntent } from '../../../selection/public';
|
|
13
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
14
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
15
|
+
import { resolveMatrixGridContentSize } from '../../application/resolveMatrixGridContentSize';
|
|
16
|
+
import { resolveMatrixGridSelection } from '../../application/resolveMatrixGridSelection';
|
|
17
|
+
|
|
18
|
+
/*** Compose the canonical GridView around released sparse matrix placement and culling geometry. */
|
|
19
|
+
function MatrixGridInner({
|
|
20
|
+
accessibilityLabel = 'Matrix grid',
|
|
21
|
+
cells,
|
|
22
|
+
height,
|
|
23
|
+
interactionPolicy,
|
|
24
|
+
layout,
|
|
25
|
+
onSelectionChange,
|
|
26
|
+
onViewportChange,
|
|
27
|
+
overscanPixels = 160,
|
|
28
|
+
renderCell,
|
|
29
|
+
selectedCellIds = [],
|
|
30
|
+
selectionMode = 'single',
|
|
31
|
+
testID,
|
|
32
|
+
viewport: controlledViewport,
|
|
33
|
+
width,
|
|
34
|
+
zoomX = 1,
|
|
35
|
+
zoomY = 1,
|
|
36
|
+
}: MatrixGridProps) {
|
|
37
|
+
const { theme } = useZoraTheme();
|
|
38
|
+
const contentSize = React.useMemo(() => resolveMatrixGridContentSize(layout), [layout]);
|
|
39
|
+
const initialViewport = React.useMemo<GridViewport>(
|
|
40
|
+
() => ({ height, offsetX: 0, offsetY: 0, pixelsPerUnitX: zoomX, pixelsPerUnitY: zoomY, width }),
|
|
41
|
+
[height, width, zoomX, zoomY],
|
|
42
|
+
);
|
|
43
|
+
const [uncontrolledViewport, setUncontrolledViewport] = React.useState(initialViewport);
|
|
44
|
+
const viewport = controlledViewport ?? uncontrolledViewport;
|
|
45
|
+
const visibleCells = React.useMemo(
|
|
46
|
+
() => getVisibleMatrixCells(layout, cells, viewport, overscanPixels),
|
|
47
|
+
[cells, layout, overscanPixels, viewport],
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const visibleCellById = React.useMemo(
|
|
51
|
+
() => new Map(visibleCells.map((cell) => [cell.id, cell])),
|
|
52
|
+
[visibleCells],
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const handleViewportChange = React.useCallback(
|
|
56
|
+
(proposal: GridViewport) => {
|
|
57
|
+
if (controlledViewport === undefined) setUncontrolledViewport(proposal);
|
|
58
|
+
onViewportChange?.(proposal);
|
|
59
|
+
},
|
|
60
|
+
[controlledViewport, onViewportChange],
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const activateCell = React.useCallback(
|
|
64
|
+
(cell: GridMatrixCellPlacement, event: unknown) => {
|
|
65
|
+
if (interactionPolicy === 'passive') return;
|
|
66
|
+
const intent = resolveSelectionEventIntent(event, 'pointer');
|
|
67
|
+
onSelectionChange?.(
|
|
68
|
+
resolveMatrixGridSelection(selectedCellIds, cell.id, intent, selectionMode),
|
|
69
|
+
);
|
|
70
|
+
},
|
|
71
|
+
[interactionPolicy, onSelectionChange, selectedCellIds, selectionMode],
|
|
72
|
+
);
|
|
73
|
+
return (
|
|
74
|
+
<View accessibilityLabel={accessibilityLabel}>
|
|
75
|
+
<GridView
|
|
76
|
+
contentHeight={contentSize.height}
|
|
77
|
+
contentWidth={contentSize.width}
|
|
78
|
+
height={height}
|
|
79
|
+
interactionPolicy={interactionPolicy}
|
|
80
|
+
items={visibleCells}
|
|
81
|
+
overscanPixels={0}
|
|
82
|
+
renderItem={(item) => {
|
|
83
|
+
const cell = visibleCellById.get(item.id);
|
|
84
|
+
if (!cell) return null;
|
|
85
|
+
return renderMatrixCell(
|
|
86
|
+
cell,
|
|
87
|
+
selectedCellIds,
|
|
88
|
+
theme.semantics.neutral.divider,
|
|
89
|
+
theme.colors.primary,
|
|
90
|
+
renderCell,
|
|
91
|
+
activateCell,
|
|
92
|
+
testID,
|
|
93
|
+
);
|
|
94
|
+
}}
|
|
95
|
+
testID={testID}
|
|
96
|
+
viewport={viewport}
|
|
97
|
+
width={width}
|
|
98
|
+
onViewportChange={handleViewportChange}
|
|
99
|
+
/>
|
|
100
|
+
</View>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/*** Render one positioned sparse cell with native/web accessible selection semantics. */
|
|
105
|
+
function renderMatrixCell(
|
|
106
|
+
cell: GridMatrixCellPlacement,
|
|
107
|
+
selectedCellIds: readonly string[],
|
|
108
|
+
dividerColor: string,
|
|
109
|
+
selectedColor: string,
|
|
110
|
+
renderCell: MatrixGridProps['renderCell'],
|
|
111
|
+
activateCell: (cell: GridMatrixCellPlacement, event: unknown) => void,
|
|
112
|
+
testID: string | undefined,
|
|
113
|
+
) {
|
|
114
|
+
const selected = selectedCellIds.includes(cell.id);
|
|
115
|
+
return (
|
|
116
|
+
<Pressable
|
|
117
|
+
key={cell.id}
|
|
118
|
+
accessibilityLabel={`Cell ${cell.id}`}
|
|
119
|
+
accessibilityRole="button"
|
|
120
|
+
accessibilityState={{ selected }}
|
|
121
|
+
style={[
|
|
122
|
+
styles.cell,
|
|
123
|
+
{
|
|
124
|
+
borderColor: selected ? selectedColor : dividerColor,
|
|
125
|
+
height: '100%',
|
|
126
|
+
width: '100%',
|
|
127
|
+
},
|
|
128
|
+
]}
|
|
129
|
+
testID={testID === undefined ? undefined : `${testID}-cell-${cell.id}`}
|
|
130
|
+
onPress={(event) => activateCell(cell, event)}
|
|
131
|
+
>
|
|
132
|
+
{renderCell(cell)}
|
|
133
|
+
</Pressable>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const styles = StyleSheet.create({
|
|
138
|
+
cell: { borderWidth: 1, height: '100%', overflow: 'hidden', width: '100%' },
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
/*** A code-first generic sparse matrix grid; formulas and domain vocabulary remain external. */
|
|
142
|
+
export const MatrixGrid = withZoraThemeScope(MatrixGridInner);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { resolveMatrixGridContentSize } from './resolveMatrixGridContentSize';
|
|
4
|
+
|
|
5
|
+
describe('resolveMatrixGridContentSize', () => {
|
|
6
|
+
test('sums variable matrix axes without materializing logical cells', () => {
|
|
7
|
+
expect(
|
|
8
|
+
resolveMatrixGridContentSize({
|
|
9
|
+
columns: [
|
|
10
|
+
{ id: 'beat', size: 40 },
|
|
11
|
+
{ id: 'bar', size: 60 },
|
|
12
|
+
],
|
|
13
|
+
rows: [
|
|
14
|
+
{ id: 'bass', size: 24 },
|
|
15
|
+
{ id: 'lead', size: 36 },
|
|
16
|
+
],
|
|
17
|
+
}),
|
|
18
|
+
).toEqual({ height: 60, width: 100 });
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('rejects non-finite cumulative axis geometry through the published grid-view contract', () => {
|
|
22
|
+
expect(() =>
|
|
23
|
+
resolveMatrixGridContentSize({
|
|
24
|
+
columns: [
|
|
25
|
+
{ id: 'left', size: Number.MAX_VALUE },
|
|
26
|
+
{ id: 'right', size: Number.MAX_VALUE },
|
|
27
|
+
],
|
|
28
|
+
rows: [{ id: 'row', size: 1 }],
|
|
29
|
+
}),
|
|
30
|
+
).toThrow('Layout axis cumulative world coordinates must be finite.');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getMatrixCellPlacement,
|
|
3
|
+
getVisibleMatrixCells,
|
|
4
|
+
type GridMatrixLayout,
|
|
5
|
+
} from '@ankhorage/grid-view';
|
|
6
|
+
|
|
7
|
+
/*** Resolve total sparse-matrix world extents without expanding its logical cells. */
|
|
8
|
+
export function resolveMatrixGridContentSize(layout: GridMatrixLayout) {
|
|
9
|
+
const finalRow = layout.rows.at(-1);
|
|
10
|
+
const finalColumn = layout.columns.at(-1);
|
|
11
|
+
if (!finalRow || !finalColumn) {
|
|
12
|
+
getVisibleMatrixCells(layout, [], {
|
|
13
|
+
height: 1,
|
|
14
|
+
offsetX: 0,
|
|
15
|
+
offsetY: 0,
|
|
16
|
+
pixelsPerUnitX: 1,
|
|
17
|
+
pixelsPerUnitY: 1,
|
|
18
|
+
width: 1,
|
|
19
|
+
});
|
|
20
|
+
return { height: 0, width: 0 };
|
|
21
|
+
}
|
|
22
|
+
const finalCell = getMatrixCellPlacement(layout, {
|
|
23
|
+
id: 'matrix-grid-content-boundary',
|
|
24
|
+
rowId: finalRow.id,
|
|
25
|
+
columnId: finalColumn.id,
|
|
26
|
+
});
|
|
27
|
+
return { height: finalCell.y + finalCell.height, width: finalCell.x + finalCell.width };
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { resolveMatrixGridSelection } from './resolveMatrixGridSelection';
|
|
4
|
+
|
|
5
|
+
describe('resolveMatrixGridSelection', () => {
|
|
6
|
+
test('preserves the canonical single and multi selection intent rules', () => {
|
|
7
|
+
expect(resolveMatrixGridSelection(['a'], 'b', 'toggle', 'single')).toEqual(['b']);
|
|
8
|
+
expect(resolveMatrixGridSelection(['a'], 'b', 'toggle', 'multi')).toEqual(['a', 'b']);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { applySelectionIntent, type SelectionIntent } from '@ankhorage/utility/selection';
|
|
2
|
+
|
|
3
|
+
import type { SelectionMode } from '../../../types/selection';
|
|
4
|
+
|
|
5
|
+
/*** Apply ZORA's canonical selection intent while retaining the configured selection mode. */
|
|
6
|
+
export function resolveMatrixGridSelection(
|
|
7
|
+
selectedIds: readonly string[],
|
|
8
|
+
cellId: string,
|
|
9
|
+
intent: SelectionIntent,
|
|
10
|
+
mode: SelectionMode,
|
|
11
|
+
): readonly string[] {
|
|
12
|
+
return mode === 'single'
|
|
13
|
+
? applySelectionIntent(selectedIds, cellId, 'replace')
|
|
14
|
+
: applySelectionIntent(selectedIds, cellId, intent);
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { getMatrixCellPlacement, getVisibleMatrixCells } from '@ankhorage/grid-view';
|
|
2
|
+
import { describe, expect, test } from 'bun:test';
|
|
3
|
+
|
|
4
|
+
describe('MatrixGrid sparse geometry', () => {
|
|
5
|
+
test('culls a 10k sparse cell catalogue in a million-cell logical matrix', () => {
|
|
6
|
+
const layout = {
|
|
7
|
+
columns: Array.from({ length: 1000 }, (_, index) => ({ id: `column-${index}`, size: 20 })),
|
|
8
|
+
rows: Array.from({ length: 1000 }, (_, index) => ({
|
|
9
|
+
id: `row-${index}`,
|
|
10
|
+
size: index % 2 === 0 ? 16 : 24,
|
|
11
|
+
})),
|
|
12
|
+
};
|
|
13
|
+
const cells = Array.from({ length: 10001 }, (_, index) => ({
|
|
14
|
+
columnId: `column-${(index * 37) % 1000}`,
|
|
15
|
+
id: `cell-${index}`,
|
|
16
|
+
rowId: `row-${(index * 91) % 1000}`,
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
const firstCell = cells.at(0);
|
|
20
|
+
if (!firstCell) throw new Error('The sparse test catalogue must contain a first cell.');
|
|
21
|
+
const first = getMatrixCellPlacement(layout, firstCell);
|
|
22
|
+
const visible = getVisibleMatrixCells(layout, cells, {
|
|
23
|
+
height: 120,
|
|
24
|
+
offsetX: first.x,
|
|
25
|
+
offsetY: first.y,
|
|
26
|
+
pixelsPerUnitX: 1,
|
|
27
|
+
pixelsPerUnitY: 1,
|
|
28
|
+
width: 120,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
expect(first).toMatchObject({ id: 'cell-0', width: 20 });
|
|
32
|
+
expect(visible.length).toBeLessThan(cells.length);
|
|
33
|
+
expect(visible.every((cell) => cell.width === 20 && cell.height > 0)).toBe(true);
|
|
34
|
+
});
|
|
35
|
+
});
|