@ankhorage/zora 25.8.15 → 25.8.17
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/capabilities/index.js +34 -59
- package/dist/capabilities/index.js.map +3 -3
- package/dist/features/date-picker/composition/DatePickerContent.d.ts.map +1 -1
- package/dist/features/date-picker/composition/DatePickerContent.js +1 -11
- package/dist/features/date-picker/composition/DatePickerContent.js.map +1 -1
- package/dist/features/date-picker/composition/DatePickerField.d.ts.map +1 -1
- package/dist/features/date-picker/composition/DatePickerField.js +2 -17
- package/dist/features/date-picker/composition/DatePickerField.js.map +1 -1
- package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.js +7 -19
- package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.js.map +1 -1
- package/dist/features/picker/composition/PickerField.d.ts +14 -0
- package/dist/features/picker/composition/PickerField.d.ts.map +1 -0
- package/dist/features/picker/composition/PickerField.js +21 -0
- package/dist/features/picker/composition/PickerField.js.map +1 -0
- package/dist/features/picker/composition/PickerHeader.d.ts +9 -0
- package/dist/features/picker/composition/PickerHeader.d.ts.map +1 -0
- package/dist/features/picker/composition/PickerHeader.js +14 -0
- package/dist/features/picker/composition/PickerHeader.js.map +1 -0
- package/dist/features/tabletop/meta.d.ts +46 -46
- package/dist/features/tabletop/meta.d.ts.map +1 -1
- package/dist/features/tabletop/meta.js +33 -58
- package/dist/features/tabletop/meta.js.map +1 -1
- package/dist/features/time-picker/composition/TimePickerContent.js +1 -12
- package/dist/features/time-picker/composition/TimePickerContent.js.map +1 -1
- package/dist/features/time-picker/composition/TimePickerField.d.ts.map +1 -1
- package/dist/features/time-picker/composition/TimePickerField.js +2 -17
- package/dist/features/time-picker/composition/TimePickerField.js.map +1 -1
- package/dist/features/typography/utils/headingThemeRecipeMeta.d.ts +5 -5
- package/dist/features/typography/utils/headingThemeRecipeMeta.d.ts.map +1 -1
- package/dist/features/typography/utils/headingThemeRecipeMeta.js +2 -19
- package/dist/features/typography/utils/headingThemeRecipeMeta.js.map +1 -1
- package/dist/features/typography/utils/resolveHeadingRecipe.d.ts.map +1 -1
- package/dist/features/typography/utils/resolveHeadingRecipe.js +11 -68
- package/dist/features/typography/utils/resolveHeadingRecipe.js.map +1 -1
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts +4 -4
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts.map +1 -1
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.js +2 -33
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.js.map +1 -1
- package/dist/features/typography/utils/resolveTextStyle.d.ts.map +1 -1
- package/dist/features/typography/utils/resolveTextStyle.js +11 -76
- package/dist/features/typography/utils/resolveTextStyle.js.map +1 -1
- package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts +4 -4
- package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts.map +1 -1
- package/dist/features/typography/utils/resolveTextThemeRecipe.js +2 -33
- package/dist/features/typography/utils/resolveTextThemeRecipe.js.map +1 -1
- package/dist/features/typography/utils/resolveTypographyStyleTokens.d.ts +21 -0
- package/dist/features/typography/utils/resolveTypographyStyleTokens.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveTypographyStyleTokens.js +75 -0
- package/dist/features/typography/utils/resolveTypographyStyleTokens.js.map +1 -0
- package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.d.ts +10 -0
- package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.js +19 -0
- package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.js.map +1 -0
- package/dist/features/typography/utils/textThemeRecipeMeta.d.ts +6 -6
- package/dist/features/typography/utils/textThemeRecipeMeta.d.ts.map +1 -1
- package/dist/features/typography/utils/textThemeRecipeMeta.js +2 -19
- package/dist/features/typography/utils/textThemeRecipeMeta.js.map +1 -1
- package/dist/features/typography/utils/typographyThemeRecipeFields.d.ts +30 -0
- package/dist/features/typography/utils/typographyThemeRecipeFields.d.ts.map +1 -0
- package/dist/features/typography/utils/typographyThemeRecipeFields.js +23 -0
- package/dist/features/typography/utils/typographyThemeRecipeFields.js.map +1 -0
- package/dist/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js +1 -16
- package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
- package/dist/features/uploader/application/use-cases/validateUploadAsset.d.ts.map +1 -1
- package/dist/features/uploader/application/use-cases/validateUploadAsset.js +1 -16
- package/dist/features/uploader/application/use-cases/validateUploadAsset.js.map +1 -1
- package/dist/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.d.ts.map +1 -1
- package/dist/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.js +3 -4
- package/dist/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.js.map +1 -1
- package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.d.ts +8 -0
- package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.d.ts.map +1 -0
- package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.js +10 -0
- package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.js.map +1 -0
- package/dist/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.d.ts.map +1 -1
- package/dist/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.js +4 -6
- package/dist/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.js.map +1 -1
- package/package.json +14 -14
- package/src/expo57Migration.test.ts +50 -0
- package/src/features/date-picker/composition/DatePickerContent.tsx +1 -22
- package/src/features/date-picker/composition/DatePickerField.tsx +2 -31
- package/src/features/matrix-grid/application/getMatrixGridNextFocusId.ts +11 -22
- package/src/features/picker/composition/PickerField.tsx +61 -0
- package/src/features/picker/composition/PickerHeader.tsx +25 -0
- package/src/features/tabletop/meta.ts +34 -58
- package/src/features/time-picker/composition/TimePickerContent.tsx +1 -23
- package/src/features/time-picker/composition/TimePickerField.tsx +2 -31
- package/src/features/typography/utils/headingThemeRecipeMeta.ts +2 -19
- package/src/features/typography/utils/resolveHeadingRecipe.ts +12 -88
- package/src/features/typography/utils/resolveHeadingThemeRecipe.ts +3 -39
- package/src/features/typography/utils/resolveTextStyle.ts +10 -98
- package/src/features/typography/utils/resolveTextThemeRecipe.ts +3 -39
- package/src/features/typography/utils/resolveTypographyStyleTokens.ts +113 -0
- package/src/features/typography/utils/resolveTypographyThemeRecipeFields.ts +27 -0
- package/src/features/typography/utils/textThemeRecipeMeta.ts +2 -19
- package/src/features/typography/utils/typographyThemeRecipeFields.ts +23 -0
- package/src/features/uploader/adapters/inbound/Uploader.tsx +1 -20
- package/src/features/uploader/application/use-cases/validateUploadAsset.test.ts +2 -2
- package/src/features/uploader/application/use-cases/validateUploadAsset.ts +2 -20
- package/src/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.ts +3 -6
- package/src/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.ts +18 -0
- package/src/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.ts +4 -8
- package/web-dist/chunks/{Accordion-rqr10gn4.js → Accordion-1495be5z.js} +2 -2
- package/web-dist/chunks/{Accordion-m2hcc8g4.js → Accordion-3qphhsb4.js} +1 -1
- package/web-dist/chunks/{Accordion-gn8ptzwb.js → Accordion-4x8gdqqs.js} +1 -1
- package/web-dist/chunks/{Accordion-9aczb0k2.js → Accordion-58bpmzdj.js} +2 -2
- package/web-dist/chunks/{Accordion-2jy53kzk.js → Accordion-69c4pfz2.js} +2 -2
- package/web-dist/chunks/{Accordion-rqhh2m5b.js → Accordion-7n93d7fa.js} +1 -1
- package/web-dist/chunks/{Accordion-m6mp8aea.js → Accordion-a42brn0p.js} +1 -1
- package/web-dist/chunks/{Accordion-g08740h4.js → Accordion-c912kzs0.js} +1 -1
- package/web-dist/chunks/{Accordion-tyh8jj9d.js → Accordion-cbbafww1.js} +1 -1
- package/web-dist/chunks/{Accordion-11ej93t5.js → Accordion-cjjg81ry.js} +2 -2
- package/web-dist/chunks/{Accordion-vkd002gw.js → Accordion-d0bebw9j.js} +3 -3
- package/web-dist/chunks/{Accordion-vjcd5kxc.js → Accordion-gntmfcmz.js} +1 -1
- package/web-dist/chunks/{Accordion-wqyrrptg.js → Accordion-jyemxzat.js} +1 -1
- package/web-dist/chunks/{Accordion-p7d5svfq.js → Accordion-kmwhjw1k.js} +1 -1
- package/web-dist/chunks/{Accordion-26prtnm7.js → Accordion-ptxa6trg.js} +1 -1
- package/web-dist/chunks/{Accordion-4yq92mxp.js → Accordion-ve81xazy.js} +1 -1
- package/web-dist/chunks/Accordion-vnb3vntm.js +79 -0
- package/web-dist/chunks/{Accordion-9rnsg9pk.js → Accordion-vqx3exsq.js} +129 -243
- package/web-dist/chunks/{Accordion-1hbt9k69.js → Accordion-w95t2pr3.js} +1 -1
- package/web-dist/chunks/{Accordion-g2aqhct0.js → Accordion-z5dpzw3g.js} +2 -2
- package/web-dist/chunks/{Accordion-a4pz3vjj.js → Accordion-zf1g5422.js} +1 -1
- package/web-dist/components/accordion/Accordion.js +2 -2
- package/web-dist/components/accordion-item/AccordionItem.js +2 -2
- package/web-dist/components/app-bar/AppBar.js +2 -2
- package/web-dist/components/app-header/AppHeader.js +2 -2
- package/web-dist/components/auth-screen/AuthScreen.js +4 -4
- package/web-dist/components/avatar/Avatar.js +2 -2
- package/web-dist/components/avatar-group/AvatarGroup.js +2 -2
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +4 -4
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +1 -1
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +4 -4
- package/web-dist/components/card/Card.js +3 -3
- package/web-dist/components/chat-list-item/ChatListItem.js +3 -3
- package/web-dist/components/checkbox/Checkbox.js +2 -2
- package/web-dist/components/checkbox-group/CheckboxGroup.js +2 -2
- package/web-dist/components/chip/Chip.js +2 -2
- package/web-dist/components/chip-group/ChipGroup.js +2 -2
- package/web-dist/components/collection-editor/CollectionEditor.js +3 -3
- package/web-dist/components/content-rail/ContentRail.js +1 -1
- package/web-dist/components/data-table/DataTable.js +7 -7
- package/web-dist/components/date-picker/DatePicker.js +12 -49
- package/web-dist/components/dialog/Dialog.js +2 -2
- package/web-dist/components/empty-state/EmptyState.js +4 -4
- package/web-dist/components/explorer/Explorer.js +2 -2
- package/web-dist/components/field/Field.js +2 -2
- package/web-dist/components/file-explorer/FileExplorer.js +2 -2
- package/web-dist/components/flat-list/FlatList.js +3 -3
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +4 -4
- package/web-dist/components/form/Form.js +3 -3
- package/web-dist/components/form-actions/FormActions.js +3 -3
- package/web-dist/components/form-error/FormError.js +3 -3
- package/web-dist/components/heading/Heading.js +1 -1
- package/web-dist/components/hero/Hero.js +3 -3
- package/web-dist/components/list/List.js +3 -3
- package/web-dist/components/list-item/ListItem.js +3 -3
- package/web-dist/components/list-section/ListSection.js +3 -3
- package/web-dist/components/matrix-grid/MatrixGrid.js +5 -17
- package/web-dist/components/media-card/MediaCard.js +3 -3
- package/web-dist/components/media-explorer/MediaExplorer.js +2 -2
- package/web-dist/components/message-bubble/MessageBubble.js +3 -3
- package/web-dist/components/metric-card/MetricCard.js +3 -3
- package/web-dist/components/missing-element/MissingElement.js +1 -1
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +4 -4
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +4 -4
- package/web-dist/components/otp-form/OtpForm.js +4 -4
- package/web-dist/components/pagination/Pagination.js +1 -1
- package/web-dist/components/palette-item/PaletteItem.js +3 -3
- package/web-dist/components/post-card/PostCard.js +3 -3
- package/web-dist/components/product-card/ProductCard.js +3 -3
- package/web-dist/components/progress/Progress.js +2 -2
- package/web-dist/components/progress-ring/ProgressRing.js +2 -2
- package/web-dist/components/radio/Radio.js +2 -2
- package/web-dist/components/radio-group/RadioGroup.js +2 -2
- package/web-dist/components/reader/Reader.js +4 -4
- package/web-dist/components/scan-overlay/ScanOverlay.js +4 -4
- package/web-dist/components/screen-section/ScreenSection.js +2 -2
- package/web-dist/components/section-header/SectionHeader.js +2 -2
- package/web-dist/components/section-list/SectionList.js +3 -3
- package/web-dist/components/sign-in-form/SignInForm.js +4 -4
- package/web-dist/components/sign-up-form/SignUpForm.js +4 -4
- package/web-dist/components/skeleton/Skeleton.js +6 -6
- package/web-dist/components/skeleton-card/SkeletonCard.js +6 -6
- package/web-dist/components/skeleton-list/SkeletonList.js +6 -6
- package/web-dist/components/skeleton-text/SkeletonText.js +6 -6
- package/web-dist/components/text/Text.js +1 -1
- package/web-dist/components/time-picker/TimePicker.js +12 -51
- package/web-dist/components/timeline/Timeline.js +1 -1
- package/web-dist/components/toolbar/Toolbar.js +3 -3
- package/web-dist/components/tree-item/TreeItem.js +3 -3
- package/web-dist/components/uploader/Uploader.js +21 -37
- package/web-dist/manifest.json +204 -202
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/tabletop/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,qCAAqC;IAClD,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,gGAAgG;IACtG,SAAS,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACnE,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;YAClC,OAAO,EAAE,QAAQ;Y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E,IAAI,EAAE,SAAS,EAAE;gBAC1B,eAAe,EAAE,IAAI;gBACrB,iBAAiB,EAAE,IAAI;aACxB;SACF;KACF;IACD,KAAK,EAAE;QACL,qBAAqB,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,6BAA6B;YACpC,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;YACnC,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;YAClC,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,qBAAqB;YAC5B,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../types/authoring';\n\nexport const cardBackMeta = {\n name: 'CardBack',\n category: 'component',\n description: 'Renders one face-down playing card.',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Public card primitive composed by code-facing tabletop components, not a direct manifest node.',\n blueprint: { label: 'Card back', defaultProps: { size: 'medium' } },\n props: {\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['small', 'medium', 'large'],\n default: 'medium',\n authoring: { authority: 'instance' },\n },\n muted: {\n type: 'boolean',\n category: 'State',\n label: 'Muted',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const cardHandMeta = {\n name: 'CardHand',\n category: 'component',\n description: 'Renders a compact caller-owned card hand.',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Public hand primitive composed by code-facing tabletop components, not a direct manifest node.',\n blueprint: { label: 'Card hand', defaultProps: { cards: [], faceDownCards: 0, size: 'medium' } },\n props: {\n cards: {\n type: 'array',\n category: 'Cards',\n label: 'Cards',\n default: [],\n authoring: { authority: 'instance' },\n },\n faceDownCards: {\n type: 'number',\n category: 'Cards',\n label: 'Face-down cards',\n default: 0,\n authoring: { authority: 'instance' },\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['small', 'medium', 'large'],\n default: 'medium',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const playingCardMeta = {\n name: 'PlayingCard',\n category: 'component',\n description: 'Renders one face-up caller-owned playing card.',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Public card primitive composed by code-facing tabletop components, not a direct manifest node.',\n blueprint: {\n label: 'Playing card',\n defaultProps: { card: { rank: 'A', suit: 'spades' }, size: 'medium' },\n },\n bindings: {\n props: { card: { label: 'Card', value: { type: 'object' }, acceptsFallback: true } },\n },\n props: {\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['small', 'medium', 'large'],\n default: 'medium',\n authoring: { authority: 'instance' },\n },\n selected: {\n type: 'boolean',\n category: 'State',\n label: 'Selected',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const tabletopTableMeta = {\n name: 'TabletopTable',\n category: 'component',\n description:\n 'Arranges caller-owned player seats and shared cards around a responsive tabletop surface.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Tabletop table',\n defaultProps: { seats: [], centerCards: [], shape: 'oval', cardSize: 'small' },\n },\n bindings: {\n props: {\n seats: {\n label: 'Seats',\n value: { type: 'array', itemType: 'object' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n centerCards: {\n label: 'Center cards',\n value: { type: 'array', itemType: 'object' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n centerLabel: {\n label: 'Center label',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n centerSublabel: {\n label: 'Center sublabel',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n seats: {\n type: 'array',\n category: 'Players',\n label: 'Seats',\n default: [],\n authoring: { authority: 'instance' },\n },\n centerCards: {\n type: 'array',\n category: 'Table',\n label: 'Center cards',\n default: [],\n authoring: { authority: 'instance' },\n },\n centerLabel: {\n type: 'string',\n category: 'Table',\n label: 'Center label',\n authoring: { authority: 'instance' },\n },\n centerSublabel: {\n type: 'string',\n category: 'Table',\n label: 'Center sublabel',\n authoring: { authority: 'instance' },\n },\n shape: {\n type: 'enum',\n category: 'Table',\n label: 'Shape',\n enum: ['circle', 'oval', 'rounded'],\n default: 'oval',\n authoring: { authority: 'instance' },\n },\n seatCount: {\n type: 'enum',\n category: 'Players',\n label: 'Seat count',\n enum: [2, 3, 4, 5, 6, 7, 8, 9, 10],\n authoring: { authority: 'instance' },\n },\n cardSize: {\n type: 'enum',\n category: 'Cards',\n label: 'Card size',\n enum: ['small', 'medium', 'large'],\n default: 'small',\n authoring: { authority: 'instance' },\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const pokerTrainingTableMeta = {\n name: 'PokerTrainingTable',\n category: 'pattern',\n description: 'Maps serializable poker table data into the reusable tabletop presentation.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Poker training table',\n defaultProps: { task: {}, defaultStackBigBlinds: 100, shape: 'oval', cardSize: 'small' },\n },\n bindings: {\n props: {\n task: {\n label: 'Poker training task',\n description: 'Table-relevant fields from a poker training task.',\n value: {\n type: 'object',\n fields: [\n { path: 'blinds', type: 'object', label: 'Blinds' },\n { path: 'heroPosition', type: 'string', label: 'Hero position' },\n { path: 'heroCards', type: 'array', label: 'Hero cards' },\n { path: 'communityCards', type: 'array', label: 'Community cards' },\n { path: 'pot', type: 'number', label: 'Pot' },\n { path: 'players', type: 'array', label: 'Players' },\n ],\n },\n acceptsFallback: true,\n },\n disabled: {\n label: 'Disabled',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n defaultStackBigBlinds: {\n type: 'number',\n category: 'Players',\n label: 'Default stack in big blinds',\n default: 100,\n authoring: { authority: 'instance' },\n },\n shape: {\n type: 'enum',\n category: 'Table',\n label: 'Shape',\n enum: ['circle', 'oval', 'rounded'],\n default: 'oval',\n authoring: { authority: 'instance' },\n },\n cardSize: {\n type: 'enum',\n category: 'Cards',\n label: 'Card size',\n enum: ['small', 'medium', 'large'],\n default: 'small',\n authoring: { authority: 'instance' },\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/tabletop/meta.ts"],"names":[],"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AAE;wBACnD,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE;wBAChE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE;wBACzD,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE;wBACnE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE;wBAC7C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;qBACrD;iBACF;gBACD,eAAe,EAAE,IAAI;aACtB;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU;gBACjB,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC1B,eAAe,EAAE,IAAI;gBACrB,iBAAiB,EAAE,IAAI;aACxB;SACF;KACF;IACD,KAAK,EAAE;QACL,qBAAqB,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,6BAA6B;YACpC,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,GAAG,yBAAyB;KAC7B;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../types/authoring';\n\nconst tabletopPresentationProps = {\n shape: {\n type: 'enum',\n category: 'Table',\n label: 'Shape',\n enum: ['circle', 'oval', 'rounded'],\n default: 'oval',\n authoring: { authority: 'instance' },\n },\n cardSize: {\n type: 'enum',\n category: 'Cards',\n label: 'Card size',\n enum: ['small', 'medium', 'large'],\n default: 'small',\n authoring: { authority: 'instance' },\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n} as const;\n\nexport const cardBackMeta = {\n name: 'CardBack',\n category: 'component',\n description: 'Renders one face-down playing card.',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Public card primitive composed by code-facing tabletop components, not a direct manifest node.',\n blueprint: { label: 'Card back', defaultProps: { size: 'medium' } },\n props: {\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['small', 'medium', 'large'],\n default: 'medium',\n authoring: { authority: 'instance' },\n },\n muted: {\n type: 'boolean',\n category: 'State',\n label: 'Muted',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const cardHandMeta = {\n name: 'CardHand',\n category: 'component',\n description: 'Renders a compact caller-owned card hand.',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Public hand primitive composed by code-facing tabletop components, not a direct manifest node.',\n blueprint: { label: 'Card hand', defaultProps: { cards: [], faceDownCards: 0, size: 'medium' } },\n props: {\n cards: {\n type: 'array',\n category: 'Cards',\n label: 'Cards',\n default: [],\n authoring: { authority: 'instance' },\n },\n faceDownCards: {\n type: 'number',\n category: 'Cards',\n label: 'Face-down cards',\n default: 0,\n authoring: { authority: 'instance' },\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['small', 'medium', 'large'],\n default: 'medium',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const playingCardMeta = {\n name: 'PlayingCard',\n category: 'component',\n description: 'Renders one face-up caller-owned playing card.',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Public card primitive composed by code-facing tabletop components, not a direct manifest node.',\n blueprint: {\n label: 'Playing card',\n defaultProps: { card: { rank: 'A', suit: 'spades' }, size: 'medium' },\n },\n bindings: {\n props: { card: { label: 'Card', value: { type: 'object' }, acceptsFallback: true } },\n },\n props: {\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['small', 'medium', 'large'],\n default: 'medium',\n authoring: { authority: 'instance' },\n },\n selected: {\n type: 'boolean',\n category: 'State',\n label: 'Selected',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\nexport const tabletopTableMeta = {\n name: 'TabletopTable',\n category: 'component',\n description:\n 'Arranges caller-owned player seats and shared cards around a responsive tabletop surface.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Tabletop table',\n defaultProps: { seats: [], centerCards: [], shape: 'oval', cardSize: 'small' },\n },\n bindings: {\n props: {\n seats: {\n label: 'Seats',\n value: { type: 'array', itemType: 'object' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n centerCards: {\n label: 'Center cards',\n value: { type: 'array', itemType: 'object' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n centerLabel: {\n label: 'Center label',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n centerSublabel: {\n label: 'Center sublabel',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n seats: {\n type: 'array',\n category: 'Players',\n label: 'Seats',\n default: [],\n authoring: { authority: 'instance' },\n },\n centerCards: {\n type: 'array',\n category: 'Table',\n label: 'Center cards',\n default: [],\n authoring: { authority: 'instance' },\n },\n centerLabel: {\n type: 'string',\n category: 'Table',\n label: 'Center label',\n authoring: { authority: 'instance' },\n },\n centerSublabel: {\n type: 'string',\n category: 'Table',\n label: 'Center sublabel',\n authoring: { authority: 'instance' },\n },\n seatCount: {\n type: 'enum',\n category: 'Players',\n label: 'Seat count',\n enum: [2, 3, 4, 5, 6, 7, 8, 9, 10],\n authoring: { authority: 'instance' },\n },\n ...tabletopPresentationProps,\n },\n} as const satisfies ZoraComponentMeta;\nexport const pokerTrainingTableMeta = {\n name: 'PokerTrainingTable',\n category: 'pattern',\n description: 'Maps serializable poker table data into the reusable tabletop presentation.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Poker training table',\n defaultProps: { task: {}, defaultStackBigBlinds: 100, shape: 'oval', cardSize: 'small' },\n },\n bindings: {\n props: {\n task: {\n label: 'Poker training task',\n description: 'Table-relevant fields from a poker training task.',\n value: {\n type: 'object',\n fields: [\n { path: 'blinds', type: 'object', label: 'Blinds' },\n { path: 'heroPosition', type: 'string', label: 'Hero position' },\n { path: 'heroCards', type: 'array', label: 'Hero cards' },\n { path: 'communityCards', type: 'array', label: 'Community cards' },\n { path: 'pot', type: 'number', label: 'Pot' },\n { path: 'players', type: 'array', label: 'Players' },\n ],\n },\n acceptsFallback: true,\n },\n disabled: {\n label: 'Disabled',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n defaultStackBigBlinds: {\n type: 'number',\n category: 'Players',\n label: 'Default stack in big blinds',\n default: 100,\n authoring: { authority: 'instance' },\n },\n ...tabletopPresentationProps,\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ScrollView, StyleSheet } from 'react-native';
|
|
3
3
|
import { Button } from '../../button/public';
|
|
4
4
|
import { View } from '../../layout/public';
|
|
5
|
-
import {
|
|
5
|
+
import { PickerHeader } from '../../picker/composition/PickerHeader';
|
|
6
6
|
const MINUTES_PER_DAY = 24 * 60;
|
|
7
7
|
const DEFAULT_STEP_MINUTES = 30;
|
|
8
8
|
/*** Renders shared time options for native BottomSheet and web Popover hosts. */
|
|
@@ -20,17 +20,6 @@ export function TimePickerContent({ description, formatTime, interactionPolicy,
|
|
|
20
20
|
</Button>
|
|
21
21
|
</View>);
|
|
22
22
|
}
|
|
23
|
-
/*** Renders the shared title block used by picker overlays. */
|
|
24
|
-
function PickerHeader({ description, title, }) {
|
|
25
|
-
return (<View gap="xxs">
|
|
26
|
-
<Text align="center" variant="label" weight="semiBold">
|
|
27
|
-
{title}
|
|
28
|
-
</Text>
|
|
29
|
-
{description ? (<Text align="center" emphasis="muted" variant="bodySmall">
|
|
30
|
-
{description}
|
|
31
|
-
</Text>) : null}
|
|
32
|
-
</View>);
|
|
33
|
-
}
|
|
34
23
|
/*** Renders one accessible selectable time option. */
|
|
35
24
|
function TimePickerOption({ formatTime, interactionPolicy, onSelect, option, selected, testID, }) {
|
|
36
25
|
return (<Button accessibilityState={{ selected }} fullWidth interactionPolicy={interactionPolicy} onPress={() => onSelect(option)} testID={testID ? `${testID}-option-${option}` : undefined} variant={selected ? 'soft' : 'ghost'}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePickerContent.js","sourceRoot":"","sources":["../../../../src/features/time-picker/composition/TimePickerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TimePickerContent.js","sourceRoot":"","sources":["../../../../src/features/time-picker/composition/TimePickerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAErE,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,CAAC;AAChC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EAC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M,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,CAAC;SAClD,GAAG,CAAC,aAAa,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE;CAC5B,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { ScrollView, StyleSheet } from 'react-native';\n\nimport type { TimePickerProps } from '../../../types/time-picker';\nimport { Button } from '../../button/public';\nimport { View } from '../../layout/public';\nimport { PickerHeader } from '../../picker/composition/PickerHeader';\n\nconst MINUTES_PER_DAY = 24 * 60;\nconst DEFAULT_STEP_MINUTES = 30;\n\n/*** Renders shared time options for native BottomSheet and web Popover hosts. */\nexport function TimePickerContent({\n description,\n formatTime,\n interactionPolicy,\n label,\n maxTime,\n minTime,\n onDismiss,\n onSelect,\n stepMinutes,\n testID,\n value,\n}: TimePickerContentProps) {\n const options = React.useMemo(\n () => generateTimeOptions({ maxTime, minTime, stepMinutes }),\n [maxTime, minTime, stepMinutes],\n );\n\n return (\n <View gap=\"m\" p=\"m\" testID={testID ? `${testID}-content` : undefined}>\n <PickerHeader description={description} title={label ?? 'Choose time'} />\n <ScrollView style={styles.options}>\n <View gap=\"xxs\">\n {options.map((option) => (\n <TimePickerOption\n formatTime={formatTime}\n interactionPolicy={interactionPolicy}\n key={option}\n onSelect={onSelect}\n option={option}\n selected={option === value}\n testID={testID}\n />\n ))}\n </View>\n </ScrollView>\n <Button fullWidth interactionPolicy={interactionPolicy} onPress={onDismiss} variant=\"ghost\">\n Cancel\n </Button>\n </View>\n );\n}\n\ninterface TimePickerContentProps extends Pick<\n TimePickerProps,\n | 'description'\n | 'formatTime'\n | 'interactionPolicy'\n | 'label'\n | 'maxTime'\n | 'minTime'\n | 'stepMinutes'\n | 'testID'\n | 'value'\n> {\n onDismiss: () => void;\n onSelect: (value: string) => void;\n}\n\n/*** Renders one accessible selectable time option. */\nfunction TimePickerOption({\n formatTime,\n interactionPolicy,\n onSelect,\n option,\n selected,\n testID,\n}: Pick<TimePickerContentProps, 'formatTime' | 'interactionPolicy' | 'testID'> & {\n onSelect: (value: string) => void;\n option: string;\n selected: boolean;\n}) {\n return (\n <Button\n accessibilityState={{ selected }}\n fullWidth\n interactionPolicy={interactionPolicy}\n onPress={() => onSelect(option)}\n testID={testID ? `${testID}-option-${option}` : undefined}\n variant={selected ? 'soft' : 'ghost'}\n >\n {formatTime ? formatTime(option) : option}\n </Button>\n );\n}\n\n/*** Parses one HH:mm value to minutes since midnight. */\nfunction parseTimeToMinutes(value: string | undefined): number | undefined {\n if (!value) return undefined;\n const match = /^(\\d{2}):(\\d{2})$/.exec(value);\n if (!match) return undefined;\n\n const hours = Number(match[1]);\n const minutes = Number(match[2]);\n if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59) return undefined;\n return hours * 60 + minutes;\n}\n\n/*** Formats minutes since midnight as HH:mm. */\nfunction formatMinutes(value: number): string {\n const hours = Math.floor(value / 60);\n const minutes = value % 60;\n return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;\n}\n\n/*** Normalizes the configured time step to a positive whole minute. */\nfunction resolveStepMinutes(stepMinutes: number | undefined): number {\n if (stepMinutes === undefined || !Number.isFinite(stepMinutes) || stepMinutes <= 0) {\n return DEFAULT_STEP_MINUTES;\n }\n return Math.max(1, Math.floor(stepMinutes));\n}\n\n/*** Generates selectable HH:mm values within the configured range. */\nfunction generateTimeOptions({\n minTime,\n maxTime,\n stepMinutes,\n}: Pick<TimePickerProps, 'maxTime' | 'minTime' | 'stepMinutes'>): string[] {\n const step = resolveStepMinutes(stepMinutes);\n const min = parseTimeToMinutes(minTime) ?? 0;\n const max = parseTimeToMinutes(maxTime) ?? MINUTES_PER_DAY - 1;\n return Array.from({ length: Math.ceil(MINUTES_PER_DAY / step) }, (_, index) => index * step)\n .filter((minute) => minute >= min && minute <= max)\n .map(formatMinutes);\n}\n\nconst styles = StyleSheet.create({\n options: { maxHeight: 360 },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePickerField.d.ts","sourceRoot":"","sources":["../../../../src/features/time-picker/composition/TimePickerField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimePickerField.d.ts","sourceRoot":"","sources":["../../../../src/features/time-picker/composition/TimePickerField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlE,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,oBAAoB,qBAEtB;AAED,UAAU,oBAAqB,SAAQ,IAAI,CACzC,eAAe,EACf,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CACvE;IACC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B"}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { View } from '../../layout/public';
|
|
3
|
-
import { Text } from '../../typography/public';
|
|
1
|
+
import { PickerField } from '../../picker/composition/PickerField';
|
|
4
2
|
/*** Renders the shared TimePicker field frame around a platform-specific trigger. */
|
|
5
3
|
export function TimePickerField({ children, description, disabled, error, label, required, testID, }) {
|
|
6
|
-
return
|
|
7
|
-
{children}
|
|
8
|
-
</Field>);
|
|
9
|
-
}
|
|
10
|
-
/*** Renders the picker label and optional supporting description. */
|
|
11
|
-
function renderLabel(label, description) {
|
|
12
|
-
return (<View gap="xs">
|
|
13
|
-
<Text variant="label" weight="semiBold">
|
|
14
|
-
{label}
|
|
15
|
-
</Text>
|
|
16
|
-
{description ? (<Text emphasis="muted" variant="bodySmall">
|
|
17
|
-
{description}
|
|
18
|
-
</Text>) : null}
|
|
19
|
-
</View>);
|
|
4
|
+
return <PickerField {...{ children, description, disabled, error, label, required, testID }}/>;
|
|
20
5
|
}
|
|
21
6
|
//# sourceMappingURL=TimePickerField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePickerField.js","sourceRoot":"","sources":["../../../../src/features/time-picker/composition/TimePickerField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimePickerField.js","sourceRoot":"","sources":["../../../../src/features/time-picker/composition/TimePickerField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,qFAAqF;AACrF,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAM,GACe;IACrB,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAG,CAAC;AAClG,CAAC","sourcesContent":["import type React from 'react';\n\nimport type { TimePickerProps } from '../../../types/time-picker';\nimport { PickerField } from '../../picker/composition/PickerField';\n\n/*** Renders the shared TimePicker field frame around a platform-specific trigger. */\nexport function TimePickerField({\n children,\n description,\n disabled,\n error,\n label,\n required,\n testID,\n}: TimePickerFieldProps) {\n return <PickerField {...{ children, description, disabled, error, label, required, testID }} />;\n}\n\ninterface TimePickerFieldProps extends Pick<\n TimePickerProps,\n 'description' | 'disabled' | 'error' | 'label' | 'required' | 'testID'\n> {\n children: React.ReactNode;\n}\n"]}
|
|
@@ -3,11 +3,6 @@ export declare const headingThemeRecipeMeta: {
|
|
|
3
3
|
readonly kind: "component";
|
|
4
4
|
readonly description: "Maps Heading presentation defaults without replacing semantic heading levels.";
|
|
5
5
|
readonly fields: {
|
|
6
|
-
readonly size: {
|
|
7
|
-
readonly type: "choice";
|
|
8
|
-
readonly label: "Size";
|
|
9
|
-
readonly options: readonly ["display", "h1", "h2", "h3", "h4", "h5", "h6"];
|
|
10
|
-
};
|
|
11
6
|
readonly color: {
|
|
12
7
|
readonly type: "choice";
|
|
13
8
|
readonly label: "Color";
|
|
@@ -34,6 +29,11 @@ export declare const headingThemeRecipeMeta: {
|
|
|
34
29
|
readonly label: "Italic";
|
|
35
30
|
readonly default: false;
|
|
36
31
|
};
|
|
32
|
+
readonly size: {
|
|
33
|
+
readonly type: "choice";
|
|
34
|
+
readonly label: "Size";
|
|
35
|
+
readonly options: readonly ["display", "h1", "h2", "h3", "h4", "h5", "h6"];
|
|
36
|
+
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
//# sourceMappingURL=headingThemeRecipeMeta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headingThemeRecipeMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/headingThemeRecipeMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"headingThemeRecipeMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/headingThemeRecipeMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYK,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { typographyThemeRecipeFields } from './typographyThemeRecipeFields';
|
|
2
2
|
export const headingThemeRecipeMeta = {
|
|
3
3
|
name: 'Heading',
|
|
4
4
|
kind: 'component',
|
|
@@ -9,24 +9,7 @@ export const headingThemeRecipeMeta = {
|
|
|
9
9
|
label: 'Size',
|
|
10
10
|
options: ['display', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
emphasis: {
|
|
14
|
-
type: 'choice',
|
|
15
|
-
label: 'Emphasis',
|
|
16
|
-
options: ZORA_EMPHASES,
|
|
17
|
-
default: 'default',
|
|
18
|
-
},
|
|
19
|
-
align: {
|
|
20
|
-
type: 'choice',
|
|
21
|
-
label: 'Align',
|
|
22
|
-
options: ['auto', 'left', 'right', 'center', 'justify'],
|
|
23
|
-
},
|
|
24
|
-
weight: {
|
|
25
|
-
type: 'choice',
|
|
26
|
-
label: 'Weight',
|
|
27
|
-
options: ['regular', 'medium', 'semiBold', 'bold'],
|
|
28
|
-
},
|
|
29
|
-
italic: { type: 'boolean', label: 'Italic', default: false },
|
|
12
|
+
...typographyThemeRecipeFields,
|
|
30
13
|
},
|
|
31
14
|
};
|
|
32
15
|
//# sourceMappingURL=headingThemeRecipeMeta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headingThemeRecipeMeta.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/headingThemeRecipeMeta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"headingThemeRecipeMeta.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/headingThemeRecipeMeta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,+EAA+E;IAC5F,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;SACzD;QACD,GAAG,2BAA2B;KAC/B;CACqC,CAAC","sourcesContent":["import type { ZoraThemeRecipeMeta } from '../../../types/theme-recipe';\nimport { typographyThemeRecipeFields } from './typographyThemeRecipeFields';\n\nexport const headingThemeRecipeMeta = {\n name: 'Heading',\n kind: 'component',\n description: 'Maps Heading presentation defaults without replacing semantic heading levels.',\n fields: {\n size: {\n type: 'choice',\n label: 'Size',\n options: ['display', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n },\n ...typographyThemeRecipeFields,\n },\n} as const satisfies ZoraThemeRecipeMeta;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingRecipe.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"resolveHeadingRecipe.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,WAAW,EACX,aAAa,EACd,MAAM,wBAAwB,CAAC;AAGhC,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,YAAY,EACnB,EACE,KAAK,EACL,KAAK,EACL,QAAoB,EACpB,MAAc,EACd,KAAK,EACL,IAAI,EACJ,MAAM,GACP,EAAE,2BAA2B,GAC7B,SAAS,CAoBX;AAED,UAAU,2BAA2B;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { resolveHeadingSizeFromLevel } from './resolveHeadingSizeFromLevel';
|
|
2
|
+
import { resolveTypographyStyleTokens } from './resolveTypographyStyleTokens';
|
|
2
3
|
export function resolveHeadingRecipe(theme, { align, color, emphasis = 'default', italic = false, level, size, weight, }) {
|
|
3
4
|
const recipe = resolveSizeRecipe(theme, size ?? resolveHeadingSizeFromLevel(level));
|
|
4
|
-
const
|
|
5
|
+
const tokens = resolveTypographyStyleTokens({
|
|
6
|
+
theme,
|
|
7
|
+
color,
|
|
8
|
+
emphasis,
|
|
9
|
+
weight: weight ?? recipe.weight,
|
|
10
|
+
italic,
|
|
11
|
+
});
|
|
5
12
|
return {
|
|
6
|
-
color:
|
|
13
|
+
color: tokens.color,
|
|
7
14
|
elevation: 0,
|
|
8
|
-
fontFamily:
|
|
15
|
+
fontFamily: tokens.fontFamily,
|
|
9
16
|
fontSize: recipe.fontSize,
|
|
10
17
|
fontStyle: italic ? 'italic' : 'normal',
|
|
11
|
-
fontWeight:
|
|
18
|
+
fontWeight: tokens.fontWeight,
|
|
12
19
|
lineHeight: recipe.lineHeight,
|
|
13
20
|
textAlign: align,
|
|
14
21
|
};
|
|
@@ -45,68 +52,4 @@ function resolveSizeRecipe(theme, size) {
|
|
|
45
52
|
weight: heading.weight,
|
|
46
53
|
};
|
|
47
54
|
}
|
|
48
|
-
function resolveRoleSemantics(theme, color) {
|
|
49
|
-
switch (color) {
|
|
50
|
-
case 'secondary':
|
|
51
|
-
return theme.semantics.secondary;
|
|
52
|
-
case 'tertiary':
|
|
53
|
-
return theme.semantics.accent;
|
|
54
|
-
case 'quaternary':
|
|
55
|
-
return theme.semantics.highlight;
|
|
56
|
-
case 'neutral':
|
|
57
|
-
return theme.semantics.action.neutral;
|
|
58
|
-
case 'error':
|
|
59
|
-
return theme.semantics.error;
|
|
60
|
-
case 'info':
|
|
61
|
-
return theme.semantics.info;
|
|
62
|
-
case 'danger':
|
|
63
|
-
return theme.semantics.action.danger;
|
|
64
|
-
case 'success':
|
|
65
|
-
return theme.semantics.success;
|
|
66
|
-
case 'warning':
|
|
67
|
-
return theme.semantics.warning;
|
|
68
|
-
case 'primary':
|
|
69
|
-
default:
|
|
70
|
-
return theme.semantics.action.primary;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function resolveHeadingColor(theme, emphasis, color) {
|
|
74
|
-
if (color) {
|
|
75
|
-
const role = resolveRoleSemantics(theme, color);
|
|
76
|
-
return emphasis === 'inverse' ? role.onSolidText : role.base;
|
|
77
|
-
}
|
|
78
|
-
switch (emphasis) {
|
|
79
|
-
case 'muted':
|
|
80
|
-
return theme.semantics.content.muted;
|
|
81
|
-
case 'subtle':
|
|
82
|
-
return theme.semantics.content.subtle;
|
|
83
|
-
case 'inverse':
|
|
84
|
-
return theme.semantics.content.inverse;
|
|
85
|
-
case 'default':
|
|
86
|
-
default:
|
|
87
|
-
return theme.semantics.content.default;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function resolveWeight(theme, weight) {
|
|
91
|
-
switch (weight) {
|
|
92
|
-
case 'medium':
|
|
93
|
-
return theme.typography.weights.medium;
|
|
94
|
-
case 'semiBold':
|
|
95
|
-
return theme.typography.weights.semiBold;
|
|
96
|
-
case 'bold':
|
|
97
|
-
return theme.typography.weights.bold;
|
|
98
|
-
case 'regular':
|
|
99
|
-
default:
|
|
100
|
-
return theme.typography.weights.regular;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function resolveFontFamily({ theme, weight, italic, }) {
|
|
104
|
-
const fonts = italic ? theme.typography.fonts.italic : theme.typography.fonts.normal;
|
|
105
|
-
for (const [fontWeight, fontFamily] of Object.entries(fonts)) {
|
|
106
|
-
if (fontWeight === weight) {
|
|
107
|
-
return fontFamily;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return undefined;
|
|
111
|
-
}
|
|
112
55
|
//# sourceMappingURL=resolveHeadingRecipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingRecipe.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingRecipe.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,MAAM,UAAU,oBAAoB,CAClC,KAAmB,EACnB,EACE,KAAK,EACL,KAAK,EACL,QAAQ,GAAG,SAAS,EACpB,MAAM,GAAG,KAAK,EACd,KAAK,EACL,IAAI,EACJ,MAAM,GACsB;IAE9B,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,EAAE,IAAI,IAAI,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC;IACpF,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveHeadingRecipe.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingRecipe.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,MAAM,UAAU,oBAAoB,CAClC,KAAmB,EACnB,EACE,KAAK,EACL,KAAK,EACL,QAAQ,GAAG,SAAS,EACpB,MAAM,GAAG,KAAK,EACd,KAAK,EACL,IAAI,EACJ,MAAM,GACsB;IAE9B,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,EAAE,IAAI,IAAI,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC;IACpF,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,KAAK;QACL,QAAQ;QACR,MAAM,EAAE,MAAM,IAAI,MAAM,CAAC,MAAM;QAC/B,MAAM;KACP,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QACvC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC;AAkBD,SAAS,2BAA2B,CAAC,IAAqC;IACxE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,IAAI;YACP,OAAO,CAAC,CAAC;QACX,KAAK,IAAI;YACP,OAAO,CAAC,CAAC;QACX,KAAK,IAAI;YACP,OAAO,CAAC,CAAC;QACX,KAAK,IAAI;YACP,OAAO,CAAC,CAAC;QACX,KAAK,IAAI;YACP,OAAO,CAAC,CAAC;QACX,KAAK,IAAI;YACP,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAmB,EAAE,IAAiB;IAC/D,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE/C,OAAO;YACL,QAAQ;YACR,UAAU,EAAE,QAAQ,GAAG,CAAC;YACxB,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7E,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,IAAI;QACtB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceTheme } from '@ankhorage/surface';\nimport type { TextStyle } from 'react-native';\n\nimport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingSize,\n HeadingWeight,\n} from '../../../types/heading';\nimport { resolveHeadingSizeFromLevel } from './resolveHeadingSizeFromLevel';\nimport { resolveTypographyStyleTokens } from './resolveTypographyStyleTokens';\nexport function resolveHeadingRecipe(\n theme: SurfaceTheme,\n {\n align,\n color,\n emphasis = 'default',\n italic = false,\n level,\n size,\n weight,\n }: ResolveHeadingRecipeOptions,\n): TextStyle {\n const recipe = resolveSizeRecipe(theme, size ?? resolveHeadingSizeFromLevel(level));\n const tokens = resolveTypographyStyleTokens({\n theme,\n color,\n emphasis,\n weight: weight ?? recipe.weight,\n italic,\n });\n\n return {\n color: tokens.color,\n elevation: 0,\n fontFamily: tokens.fontFamily,\n fontSize: recipe.fontSize,\n fontStyle: italic ? 'italic' : 'normal',\n fontWeight: tokens.fontWeight,\n lineHeight: recipe.lineHeight,\n textAlign: align,\n };\n}\n\ninterface ResolveHeadingRecipeOptions {\n level: HeadingLevel;\n size?: HeadingSize;\n color?: HeadingColor;\n emphasis?: HeadingEmphasis;\n align?: HeadingAlign;\n weight?: HeadingWeight;\n italic?: boolean;\n}\n\ninterface HeadingRecipe {\n fontSize: number;\n lineHeight: number;\n weight: HeadingWeight;\n}\n\nfunction resolveHeadingLevelFromSize(size: Exclude<HeadingSize, 'display'>): HeadingLevel {\n switch (size) {\n case 'h1':\n return 1;\n case 'h2':\n return 2;\n case 'h3':\n return 3;\n case 'h4':\n return 4;\n case 'h5':\n return 5;\n case 'h6':\n return 6;\n }\n}\n\nfunction resolveSizeRecipe(theme: SurfaceTheme, size: HeadingSize): HeadingRecipe {\n if (size === 'display') {\n const fontSize = theme.typography.sizes['3xl'];\n\n return {\n fontSize,\n lineHeight: fontSize + 8,\n weight: 'bold',\n };\n }\n\n const heading = theme.typography.headings[resolveHeadingLevelFromSize(size)];\n\n return {\n fontSize: heading.size,\n lineHeight: heading.lineHeight,\n weight: heading.weight,\n };\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ThemeRecipeOverrideValue } from '@ankhorage/contracts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HeadingSize } from '../../../types/heading';
|
|
3
3
|
export declare function resolveHeadingThemeRecipe(fields: Readonly<Record<string, ThemeRecipeOverrideValue>>): {
|
|
4
|
-
size: HeadingSize | undefined;
|
|
5
4
|
color: "primary" | "secondary" | "tertiary" | "quaternary" | "neutral" | "error" | "success" | "warning" | "info" | "danger" | undefined;
|
|
6
5
|
emphasis: "default" | "muted" | "subtle" | "inverse" | undefined;
|
|
7
|
-
align:
|
|
8
|
-
weight:
|
|
6
|
+
align: "justify" | "left" | "right" | "center" | "auto" | undefined;
|
|
7
|
+
weight: "bold" | "regular" | "medium" | "semiBold" | undefined;
|
|
9
8
|
italic: boolean | undefined;
|
|
9
|
+
size: HeadingSize | undefined;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=resolveHeadingThemeRecipe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingThemeRecipe.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingThemeRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"resolveHeadingThemeRecipe.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingThemeRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;;;;;;;EAM3D"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { resolveTypographyThemeRecipeFields } from './resolveTypographyThemeRecipeFields';
|
|
1
2
|
export function resolveHeadingThemeRecipe(fields) {
|
|
2
3
|
return {
|
|
3
4
|
size: readSize(fields.size),
|
|
4
|
-
|
|
5
|
-
emphasis: readEmphasis(fields.emphasis),
|
|
6
|
-
align: readAlign(fields.align),
|
|
7
|
-
weight: readWeight(fields.weight),
|
|
8
|
-
italic: typeof fields.italic === 'boolean' ? fields.italic : undefined,
|
|
5
|
+
...resolveTypographyThemeRecipeFields(fields),
|
|
9
6
|
};
|
|
10
7
|
}
|
|
11
8
|
function readSize(value) {
|
|
@@ -15,32 +12,4 @@ function readSize(value) {
|
|
|
15
12
|
return value;
|
|
16
13
|
return undefined;
|
|
17
14
|
}
|
|
18
|
-
function readColor(value) {
|
|
19
|
-
if (typeof value !== 'string')
|
|
20
|
-
return undefined;
|
|
21
|
-
if (value === 'primary' || value === 'secondary' || value === 'tertiary')
|
|
22
|
-
return value;
|
|
23
|
-
if (value === 'quaternary' || value === 'neutral' || value === 'danger')
|
|
24
|
-
return value;
|
|
25
|
-
if (value === 'success' || value === 'warning' || value === 'error' || value === 'info')
|
|
26
|
-
return value;
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
function readEmphasis(value) {
|
|
30
|
-
if (value === 'default' || value === 'muted' || value === 'subtle' || value === 'inverse')
|
|
31
|
-
return value;
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
function readAlign(value) {
|
|
35
|
-
if (value === 'auto' || value === 'left' || value === 'right')
|
|
36
|
-
return value;
|
|
37
|
-
if (value === 'center' || value === 'justify')
|
|
38
|
-
return value;
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
function readWeight(value) {
|
|
42
|
-
if (value === 'regular' || value === 'medium' || value === 'semiBold' || value === 'bold')
|
|
43
|
-
return value;
|
|
44
|
-
return undefined;
|
|
45
|
-
}
|
|
46
15
|
//# sourceMappingURL=resolveHeadingThemeRecipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingThemeRecipe.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingThemeRecipe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveHeadingThemeRecipe.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingThemeRecipe.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F,MAAM,UAAU,yBAAyB,CACvC,MAA0D;IAE1D,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3B,GAAG,kCAAkC,CAAC,MAAM,CAAC;KAC9C,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,KAA2C;IAC3D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACrE,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { ThemeRecipeOverrideValue } from '@ankhorage/contracts';\n\nimport type { HeadingSize } from '../../../types/heading';\nimport { resolveTypographyThemeRecipeFields } from './resolveTypographyThemeRecipeFields';\n\nexport function resolveHeadingThemeRecipe(\n fields: Readonly<Record<string, ThemeRecipeOverrideValue>>,\n) {\n return {\n size: readSize(fields.size),\n ...resolveTypographyThemeRecipeFields(fields),\n };\n}\n\nfunction readSize(value: ThemeRecipeOverrideValue | undefined): HeadingSize | undefined {\n if (value === 'display' || value === 'h1' || value === 'h2' || value === 'h3') return value;\n if (value === 'h4' || value === 'h5' || value === 'h6') return value;\n return undefined;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveTextStyle.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveTextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"resolveTextStyle.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveTextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,qBAAqB,CAAC;AAE7B,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAc,GACf,EAAE,uBAAuB,GAAG,SAAS,CA0BrC;AAUD,UAAU,uBAAuB;IAC/B,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveResponsive, } from '@ankhorage/surface';
|
|
2
|
+
import { resolveTypographyStyleTokens } from './resolveTypographyStyleTokens';
|
|
2
3
|
/*** Resolves responsive text variants and theme semantics into a native text style. */
|
|
3
4
|
export function resolveTextStyle({ theme, breakpoint, variant, color, emphasis, weight, align, italic = false, }) {
|
|
4
5
|
const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';
|
|
@@ -6,19 +7,20 @@ export function resolveTextStyle({ theme, breakpoint, variant, color, emphasis,
|
|
|
6
7
|
const resolvedColor = resolveResponsive(color, breakpoint);
|
|
7
8
|
const resolvedAlign = resolveResponsive(align, breakpoint);
|
|
8
9
|
const recipe = resolveVariantRecipe(theme, resolvedVariant, breakpoint);
|
|
9
|
-
const
|
|
10
|
+
const tokens = resolveTypographyStyleTokens({
|
|
11
|
+
theme,
|
|
12
|
+
color: resolvedColor,
|
|
13
|
+
emphasis: resolvedEmphasis,
|
|
14
|
+
weight: resolveResponsive(weight, breakpoint) ?? recipe.weight,
|
|
15
|
+
italic,
|
|
16
|
+
});
|
|
10
17
|
return {
|
|
11
|
-
color:
|
|
18
|
+
color: tokens.color,
|
|
12
19
|
elevation: 0,
|
|
13
|
-
fontFamily:
|
|
14
|
-
theme,
|
|
15
|
-
variant: resolvedVariant,
|
|
16
|
-
weight: resolvedWeight,
|
|
17
|
-
italic,
|
|
18
|
-
}),
|
|
20
|
+
fontFamily: resolvedVariant === 'code' ? 'monospace' : tokens.fontFamily,
|
|
19
21
|
fontSize: recipe.fontSize,
|
|
20
22
|
fontStyle: italic ? 'italic' : 'normal',
|
|
21
|
-
fontWeight:
|
|
23
|
+
fontWeight: tokens.fontWeight,
|
|
22
24
|
letterSpacing: recipe.letterSpacing,
|
|
23
25
|
lineHeight: recipe.lineHeight,
|
|
24
26
|
textAlign: resolvedAlign,
|
|
@@ -28,31 +30,6 @@ export function resolveTextStyle({ theme, breakpoint, variant, color, emphasis,
|
|
|
28
30
|
function isMediumBreakpointOrLarger(breakpoint) {
|
|
29
31
|
return breakpoint === 'md' || breakpoint === 'lg' || breakpoint === 'xl';
|
|
30
32
|
}
|
|
31
|
-
function resolveWeight(theme, weight) {
|
|
32
|
-
switch (weight) {
|
|
33
|
-
case 'medium':
|
|
34
|
-
return theme.typography.weights.medium;
|
|
35
|
-
case 'semiBold':
|
|
36
|
-
return theme.typography.weights.semiBold;
|
|
37
|
-
case 'bold':
|
|
38
|
-
return theme.typography.weights.bold;
|
|
39
|
-
case 'regular':
|
|
40
|
-
default:
|
|
41
|
-
return theme.typography.weights.regular;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function resolveFontFamily({ theme, variant, weight, italic, }) {
|
|
45
|
-
if (variant === 'code') {
|
|
46
|
-
return 'monospace';
|
|
47
|
-
}
|
|
48
|
-
const fonts = italic ? theme.typography.fonts.italic : theme.typography.fonts.normal;
|
|
49
|
-
for (const [fontWeight, fontFamily] of Object.entries(fonts)) {
|
|
50
|
-
if (fontWeight === weight) {
|
|
51
|
-
return fontFamily;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
33
|
function resolveVariantRecipe(theme, variant, breakpoint) {
|
|
57
34
|
switch (variant) {
|
|
58
35
|
case 'lead':
|
|
@@ -104,46 +81,4 @@ function resolveVariantRecipe(theme, variant, breakpoint) {
|
|
|
104
81
|
};
|
|
105
82
|
}
|
|
106
83
|
}
|
|
107
|
-
function resolveRoleSemantics(theme, color) {
|
|
108
|
-
switch (color) {
|
|
109
|
-
case 'secondary':
|
|
110
|
-
return theme.semantics.secondary;
|
|
111
|
-
case 'tertiary':
|
|
112
|
-
return theme.semantics.accent;
|
|
113
|
-
case 'quaternary':
|
|
114
|
-
return theme.semantics.highlight;
|
|
115
|
-
case 'neutral':
|
|
116
|
-
return theme.semantics.action.neutral;
|
|
117
|
-
case 'error':
|
|
118
|
-
return theme.semantics.error;
|
|
119
|
-
case 'info':
|
|
120
|
-
return theme.semantics.info;
|
|
121
|
-
case 'danger':
|
|
122
|
-
return theme.semantics.action.danger;
|
|
123
|
-
case 'success':
|
|
124
|
-
return theme.semantics.success;
|
|
125
|
-
case 'warning':
|
|
126
|
-
return theme.semantics.warning;
|
|
127
|
-
case 'primary':
|
|
128
|
-
default:
|
|
129
|
-
return theme.semantics.action.primary;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function resolveTextColor(theme, emphasis, color) {
|
|
133
|
-
if (color) {
|
|
134
|
-
const role = resolveRoleSemantics(theme, color);
|
|
135
|
-
return emphasis === 'inverse' ? role.onSolidText : role.base;
|
|
136
|
-
}
|
|
137
|
-
switch (emphasis) {
|
|
138
|
-
case 'muted':
|
|
139
|
-
return theme.semantics.content.muted;
|
|
140
|
-
case 'subtle':
|
|
141
|
-
return theme.semantics.content.subtle;
|
|
142
|
-
case 'inverse':
|
|
143
|
-
return theme.semantics.content.inverse;
|
|
144
|
-
case 'default':
|
|
145
|
-
default:
|
|
146
|
-
return theme.semantics.content.default;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
84
|
//# sourceMappingURL=resolveTextStyle.js.map
|