@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.
Files changed (195) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/capabilities/index.js +34 -59
  4. package/dist/capabilities/index.js.map +3 -3
  5. package/dist/features/date-picker/composition/DatePickerContent.d.ts.map +1 -1
  6. package/dist/features/date-picker/composition/DatePickerContent.js +1 -11
  7. package/dist/features/date-picker/composition/DatePickerContent.js.map +1 -1
  8. package/dist/features/date-picker/composition/DatePickerField.d.ts.map +1 -1
  9. package/dist/features/date-picker/composition/DatePickerField.js +2 -17
  10. package/dist/features/date-picker/composition/DatePickerField.js.map +1 -1
  11. package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.js +7 -19
  12. package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.js.map +1 -1
  13. package/dist/features/picker/composition/PickerField.d.ts +14 -0
  14. package/dist/features/picker/composition/PickerField.d.ts.map +1 -0
  15. package/dist/features/picker/composition/PickerField.js +21 -0
  16. package/dist/features/picker/composition/PickerField.js.map +1 -0
  17. package/dist/features/picker/composition/PickerHeader.d.ts +9 -0
  18. package/dist/features/picker/composition/PickerHeader.d.ts.map +1 -0
  19. package/dist/features/picker/composition/PickerHeader.js +14 -0
  20. package/dist/features/picker/composition/PickerHeader.js.map +1 -0
  21. package/dist/features/tabletop/meta.d.ts +46 -46
  22. package/dist/features/tabletop/meta.d.ts.map +1 -1
  23. package/dist/features/tabletop/meta.js +33 -58
  24. package/dist/features/tabletop/meta.js.map +1 -1
  25. package/dist/features/time-picker/composition/TimePickerContent.js +1 -12
  26. package/dist/features/time-picker/composition/TimePickerContent.js.map +1 -1
  27. package/dist/features/time-picker/composition/TimePickerField.d.ts.map +1 -1
  28. package/dist/features/time-picker/composition/TimePickerField.js +2 -17
  29. package/dist/features/time-picker/composition/TimePickerField.js.map +1 -1
  30. package/dist/features/typography/utils/headingThemeRecipeMeta.d.ts +5 -5
  31. package/dist/features/typography/utils/headingThemeRecipeMeta.d.ts.map +1 -1
  32. package/dist/features/typography/utils/headingThemeRecipeMeta.js +2 -19
  33. package/dist/features/typography/utils/headingThemeRecipeMeta.js.map +1 -1
  34. package/dist/features/typography/utils/resolveHeadingRecipe.d.ts.map +1 -1
  35. package/dist/features/typography/utils/resolveHeadingRecipe.js +11 -68
  36. package/dist/features/typography/utils/resolveHeadingRecipe.js.map +1 -1
  37. package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts +4 -4
  38. package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts.map +1 -1
  39. package/dist/features/typography/utils/resolveHeadingThemeRecipe.js +2 -33
  40. package/dist/features/typography/utils/resolveHeadingThemeRecipe.js.map +1 -1
  41. package/dist/features/typography/utils/resolveTextStyle.d.ts.map +1 -1
  42. package/dist/features/typography/utils/resolveTextStyle.js +11 -76
  43. package/dist/features/typography/utils/resolveTextStyle.js.map +1 -1
  44. package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts +4 -4
  45. package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts.map +1 -1
  46. package/dist/features/typography/utils/resolveTextThemeRecipe.js +2 -33
  47. package/dist/features/typography/utils/resolveTextThemeRecipe.js.map +1 -1
  48. package/dist/features/typography/utils/resolveTypographyStyleTokens.d.ts +21 -0
  49. package/dist/features/typography/utils/resolveTypographyStyleTokens.d.ts.map +1 -0
  50. package/dist/features/typography/utils/resolveTypographyStyleTokens.js +75 -0
  51. package/dist/features/typography/utils/resolveTypographyStyleTokens.js.map +1 -0
  52. package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.d.ts +10 -0
  53. package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.d.ts.map +1 -0
  54. package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.js +19 -0
  55. package/dist/features/typography/utils/resolveTypographyThemeRecipeFields.js.map +1 -0
  56. package/dist/features/typography/utils/textThemeRecipeMeta.d.ts +6 -6
  57. package/dist/features/typography/utils/textThemeRecipeMeta.d.ts.map +1 -1
  58. package/dist/features/typography/utils/textThemeRecipeMeta.js +2 -19
  59. package/dist/features/typography/utils/textThemeRecipeMeta.js.map +1 -1
  60. package/dist/features/typography/utils/typographyThemeRecipeFields.d.ts +30 -0
  61. package/dist/features/typography/utils/typographyThemeRecipeFields.d.ts.map +1 -0
  62. package/dist/features/typography/utils/typographyThemeRecipeFields.js +23 -0
  63. package/dist/features/typography/utils/typographyThemeRecipeFields.js.map +1 -0
  64. package/dist/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
  65. package/dist/features/uploader/adapters/inbound/Uploader.js +1 -16
  66. package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
  67. package/dist/features/uploader/application/use-cases/validateUploadAsset.d.ts.map +1 -1
  68. package/dist/features/uploader/application/use-cases/validateUploadAsset.js +1 -16
  69. package/dist/features/uploader/application/use-cases/validateUploadAsset.js.map +1 -1
  70. package/dist/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.d.ts.map +1 -1
  71. package/dist/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.js +3 -4
  72. package/dist/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.js.map +1 -1
  73. package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.d.ts +8 -0
  74. package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.d.ts.map +1 -0
  75. package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.js +10 -0
  76. package/dist/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.js.map +1 -0
  77. package/dist/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.d.ts.map +1 -1
  78. package/dist/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.js +4 -6
  79. package/dist/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.js.map +1 -1
  80. package/package.json +14 -14
  81. package/src/expo57Migration.test.ts +50 -0
  82. package/src/features/date-picker/composition/DatePickerContent.tsx +1 -22
  83. package/src/features/date-picker/composition/DatePickerField.tsx +2 -31
  84. package/src/features/matrix-grid/application/getMatrixGridNextFocusId.ts +11 -22
  85. package/src/features/picker/composition/PickerField.tsx +61 -0
  86. package/src/features/picker/composition/PickerHeader.tsx +25 -0
  87. package/src/features/tabletop/meta.ts +34 -58
  88. package/src/features/time-picker/composition/TimePickerContent.tsx +1 -23
  89. package/src/features/time-picker/composition/TimePickerField.tsx +2 -31
  90. package/src/features/typography/utils/headingThemeRecipeMeta.ts +2 -19
  91. package/src/features/typography/utils/resolveHeadingRecipe.ts +12 -88
  92. package/src/features/typography/utils/resolveHeadingThemeRecipe.ts +3 -39
  93. package/src/features/typography/utils/resolveTextStyle.ts +10 -98
  94. package/src/features/typography/utils/resolveTextThemeRecipe.ts +3 -39
  95. package/src/features/typography/utils/resolveTypographyStyleTokens.ts +113 -0
  96. package/src/features/typography/utils/resolveTypographyThemeRecipeFields.ts +27 -0
  97. package/src/features/typography/utils/textThemeRecipeMeta.ts +2 -19
  98. package/src/features/typography/utils/typographyThemeRecipeFields.ts +23 -0
  99. package/src/features/uploader/adapters/inbound/Uploader.tsx +1 -20
  100. package/src/features/uploader/application/use-cases/validateUploadAsset.test.ts +2 -2
  101. package/src/features/uploader/application/use-cases/validateUploadAsset.ts +2 -20
  102. package/src/features/web-component-artifact/composition/createWebDesiredStateWithNodeAsync.ts +3 -6
  103. package/src/features/web-component-artifact/composition/readWebComponentPackageMetadataAsync.ts +18 -0
  104. package/src/features/web-component-artifact/composition/synchronizeDeclaredWebComponentsWithNodeAsync.ts +4 -8
  105. package/web-dist/chunks/{Accordion-rqr10gn4.js → Accordion-1495be5z.js} +2 -2
  106. package/web-dist/chunks/{Accordion-m2hcc8g4.js → Accordion-3qphhsb4.js} +1 -1
  107. package/web-dist/chunks/{Accordion-gn8ptzwb.js → Accordion-4x8gdqqs.js} +1 -1
  108. package/web-dist/chunks/{Accordion-9aczb0k2.js → Accordion-58bpmzdj.js} +2 -2
  109. package/web-dist/chunks/{Accordion-2jy53kzk.js → Accordion-69c4pfz2.js} +2 -2
  110. package/web-dist/chunks/{Accordion-rqhh2m5b.js → Accordion-7n93d7fa.js} +1 -1
  111. package/web-dist/chunks/{Accordion-m6mp8aea.js → Accordion-a42brn0p.js} +1 -1
  112. package/web-dist/chunks/{Accordion-g08740h4.js → Accordion-c912kzs0.js} +1 -1
  113. package/web-dist/chunks/{Accordion-tyh8jj9d.js → Accordion-cbbafww1.js} +1 -1
  114. package/web-dist/chunks/{Accordion-11ej93t5.js → Accordion-cjjg81ry.js} +2 -2
  115. package/web-dist/chunks/{Accordion-vkd002gw.js → Accordion-d0bebw9j.js} +3 -3
  116. package/web-dist/chunks/{Accordion-vjcd5kxc.js → Accordion-gntmfcmz.js} +1 -1
  117. package/web-dist/chunks/{Accordion-wqyrrptg.js → Accordion-jyemxzat.js} +1 -1
  118. package/web-dist/chunks/{Accordion-p7d5svfq.js → Accordion-kmwhjw1k.js} +1 -1
  119. package/web-dist/chunks/{Accordion-26prtnm7.js → Accordion-ptxa6trg.js} +1 -1
  120. package/web-dist/chunks/{Accordion-4yq92mxp.js → Accordion-ve81xazy.js} +1 -1
  121. package/web-dist/chunks/Accordion-vnb3vntm.js +79 -0
  122. package/web-dist/chunks/{Accordion-9rnsg9pk.js → Accordion-vqx3exsq.js} +129 -243
  123. package/web-dist/chunks/{Accordion-1hbt9k69.js → Accordion-w95t2pr3.js} +1 -1
  124. package/web-dist/chunks/{Accordion-g2aqhct0.js → Accordion-z5dpzw3g.js} +2 -2
  125. package/web-dist/chunks/{Accordion-a4pz3vjj.js → Accordion-zf1g5422.js} +1 -1
  126. package/web-dist/components/accordion/Accordion.js +2 -2
  127. package/web-dist/components/accordion-item/AccordionItem.js +2 -2
  128. package/web-dist/components/app-bar/AppBar.js +2 -2
  129. package/web-dist/components/app-header/AppHeader.js +2 -2
  130. package/web-dist/components/auth-screen/AuthScreen.js +4 -4
  131. package/web-dist/components/avatar/Avatar.js +2 -2
  132. package/web-dist/components/avatar-group/AvatarGroup.js +2 -2
  133. package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +4 -4
  134. package/web-dist/components/breadcrumbs/Breadcrumbs.js +1 -1
  135. package/web-dist/components/camera-permission-view/CameraPermissionView.js +4 -4
  136. package/web-dist/components/card/Card.js +3 -3
  137. package/web-dist/components/chat-list-item/ChatListItem.js +3 -3
  138. package/web-dist/components/checkbox/Checkbox.js +2 -2
  139. package/web-dist/components/checkbox-group/CheckboxGroup.js +2 -2
  140. package/web-dist/components/chip/Chip.js +2 -2
  141. package/web-dist/components/chip-group/ChipGroup.js +2 -2
  142. package/web-dist/components/collection-editor/CollectionEditor.js +3 -3
  143. package/web-dist/components/content-rail/ContentRail.js +1 -1
  144. package/web-dist/components/data-table/DataTable.js +7 -7
  145. package/web-dist/components/date-picker/DatePicker.js +12 -49
  146. package/web-dist/components/dialog/Dialog.js +2 -2
  147. package/web-dist/components/empty-state/EmptyState.js +4 -4
  148. package/web-dist/components/explorer/Explorer.js +2 -2
  149. package/web-dist/components/field/Field.js +2 -2
  150. package/web-dist/components/file-explorer/FileExplorer.js +2 -2
  151. package/web-dist/components/flat-list/FlatList.js +3 -3
  152. package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +4 -4
  153. package/web-dist/components/form/Form.js +3 -3
  154. package/web-dist/components/form-actions/FormActions.js +3 -3
  155. package/web-dist/components/form-error/FormError.js +3 -3
  156. package/web-dist/components/heading/Heading.js +1 -1
  157. package/web-dist/components/hero/Hero.js +3 -3
  158. package/web-dist/components/list/List.js +3 -3
  159. package/web-dist/components/list-item/ListItem.js +3 -3
  160. package/web-dist/components/list-section/ListSection.js +3 -3
  161. package/web-dist/components/matrix-grid/MatrixGrid.js +5 -17
  162. package/web-dist/components/media-card/MediaCard.js +3 -3
  163. package/web-dist/components/media-explorer/MediaExplorer.js +2 -2
  164. package/web-dist/components/message-bubble/MessageBubble.js +3 -3
  165. package/web-dist/components/metric-card/MetricCard.js +3 -3
  166. package/web-dist/components/missing-element/MissingElement.js +1 -1
  167. package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +4 -4
  168. package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +4 -4
  169. package/web-dist/components/otp-form/OtpForm.js +4 -4
  170. package/web-dist/components/pagination/Pagination.js +1 -1
  171. package/web-dist/components/palette-item/PaletteItem.js +3 -3
  172. package/web-dist/components/post-card/PostCard.js +3 -3
  173. package/web-dist/components/product-card/ProductCard.js +3 -3
  174. package/web-dist/components/progress/Progress.js +2 -2
  175. package/web-dist/components/progress-ring/ProgressRing.js +2 -2
  176. package/web-dist/components/radio/Radio.js +2 -2
  177. package/web-dist/components/radio-group/RadioGroup.js +2 -2
  178. package/web-dist/components/reader/Reader.js +4 -4
  179. package/web-dist/components/scan-overlay/ScanOverlay.js +4 -4
  180. package/web-dist/components/screen-section/ScreenSection.js +2 -2
  181. package/web-dist/components/section-header/SectionHeader.js +2 -2
  182. package/web-dist/components/section-list/SectionList.js +3 -3
  183. package/web-dist/components/sign-in-form/SignInForm.js +4 -4
  184. package/web-dist/components/sign-up-form/SignUpForm.js +4 -4
  185. package/web-dist/components/skeleton/Skeleton.js +6 -6
  186. package/web-dist/components/skeleton-card/SkeletonCard.js +6 -6
  187. package/web-dist/components/skeleton-list/SkeletonList.js +6 -6
  188. package/web-dist/components/skeleton-text/SkeletonText.js +6 -6
  189. package/web-dist/components/text/Text.js +1 -1
  190. package/web-dist/components/time-picker/TimePicker.js +12 -51
  191. package/web-dist/components/timeline/Timeline.js +1 -1
  192. package/web-dist/components/toolbar/Toolbar.js +3 -3
  193. package/web-dist/components/tree-item/TreeItem.js +3 -3
  194. package/web-dist/components/uploader/Uploader.js +21 -37
  195. package/web-dist/manifest.json +204 -202
@@ -24,6 +24,28 @@ import {
24
24
  // src/features/typography/adapters/inbound/Heading.tsx
25
25
  var import_react_native = __toESM(require_cjs(), 1);
26
26
 
27
+ // src/features/typography/utils/typographyThemeRecipeFields.ts
28
+ var typographyThemeRecipeFields = {
29
+ color: { type: "choice", label: "Color", options: ZORA_COLORS },
30
+ emphasis: {
31
+ type: "choice",
32
+ label: "Emphasis",
33
+ options: ZORA_EMPHASES,
34
+ default: "default"
35
+ },
36
+ align: {
37
+ type: "choice",
38
+ label: "Align",
39
+ options: ["auto", "left", "right", "center", "justify"]
40
+ },
41
+ weight: {
42
+ type: "choice",
43
+ label: "Weight",
44
+ options: ["regular", "medium", "semiBold", "bold"]
45
+ },
46
+ italic: { type: "boolean", label: "Italic", default: false }
47
+ };
48
+
27
49
  // src/features/typography/utils/headingThemeRecipeMeta.ts
28
50
  var headingThemeRecipeMeta = {
29
51
  name: "Heading",
@@ -35,24 +57,7 @@ var headingThemeRecipeMeta = {
35
57
  label: "Size",
36
58
  options: ["display", "h1", "h2", "h3", "h4", "h5", "h6"]
37
59
  },
38
- color: { type: "choice", label: "Color", options: ZORA_COLORS },
39
- emphasis: {
40
- type: "choice",
41
- label: "Emphasis",
42
- options: ZORA_EMPHASES,
43
- default: "default"
44
- },
45
- align: {
46
- type: "choice",
47
- label: "Align",
48
- options: ["auto", "left", "right", "center", "justify"]
49
- },
50
- weight: {
51
- type: "choice",
52
- label: "Weight",
53
- options: ["regular", "medium", "semiBold", "bold"]
54
- },
55
- italic: { type: "boolean", label: "Italic", default: false }
60
+ ...typographyThemeRecipeFields
56
61
  }
57
62
  };
58
63
 
@@ -74,59 +79,20 @@ function resolveHeadingSizeFromLevel(level) {
74
79
  }
75
80
  }
76
81
 
77
- // src/features/typography/utils/resolveHeadingRecipe.ts
78
- function resolveHeadingRecipe(theme, {
79
- align,
82
+ // src/features/typography/utils/resolveTypographyStyleTokens.ts
83
+ function resolveTypographyStyleTokens({
84
+ theme,
80
85
  color,
81
- emphasis = "default",
82
- italic = false,
83
- level,
84
- size,
85
- weight
86
+ emphasis,
87
+ weight,
88
+ italic
86
89
  }) {
87
- const recipe = resolveSizeRecipe(theme, size ?? resolveHeadingSizeFromLevel(level));
88
- const resolvedWeight = resolveWeight(theme, weight ?? recipe.weight);
89
- return {
90
- color: resolveHeadingColor(theme, emphasis, color),
91
- elevation: 0,
92
- fontFamily: resolveFontFamily({ theme, weight: resolvedWeight, italic }),
93
- fontSize: recipe.fontSize,
94
- fontStyle: italic ? "italic" : "normal",
95
- fontWeight: resolvedWeight,
96
- lineHeight: recipe.lineHeight,
97
- textAlign: align
98
- };
99
- }
100
- function resolveHeadingLevelFromSize(size) {
101
- switch (size) {
102
- case "h1":
103
- return 1;
104
- case "h2":
105
- return 2;
106
- case "h3":
107
- return 3;
108
- case "h4":
109
- return 4;
110
- case "h5":
111
- return 5;
112
- case "h6":
113
- return 6;
114
- }
115
- }
116
- function resolveSizeRecipe(theme, size) {
117
- if (size === "display") {
118
- const fontSize = theme.typography.sizes["3xl"];
119
- return {
120
- fontSize,
121
- lineHeight: fontSize + 8,
122
- weight: "bold"
123
- };
124
- }
125
- const heading = theme.typography.headings[resolveHeadingLevelFromSize(size)];
90
+ const role = color ? resolveRoleSemantics(theme, color) : undefined;
91
+ const fontWeight = resolveWeight(theme, weight);
126
92
  return {
127
- fontSize: heading.size,
128
- lineHeight: heading.lineHeight,
129
- weight: heading.weight
93
+ color: role ? emphasis === "inverse" ? role.onSolidText : role.base : resolveEmphasisColor(theme, emphasis),
94
+ fontFamily: resolveFontFamily(theme, fontWeight, italic),
95
+ fontWeight
130
96
  };
131
97
  }
132
98
  function resolveRoleSemantics(theme, color) {
@@ -154,11 +120,7 @@ function resolveRoleSemantics(theme, color) {
154
120
  return theme.semantics.action.primary;
155
121
  }
156
122
  }
157
- function resolveHeadingColor(theme, emphasis, color) {
158
- if (color) {
159
- const role = resolveRoleSemantics(theme, color);
160
- return emphasis === "inverse" ? role.onSolidText : role.base;
161
- }
123
+ function resolveEmphasisColor(theme, emphasis) {
162
124
  switch (emphasis) {
163
125
  case "muted":
164
126
  return theme.semantics.content.muted;
@@ -184,11 +146,7 @@ function resolveWeight(theme, weight) {
184
146
  return theme.typography.weights.regular;
185
147
  }
186
148
  }
187
- function resolveFontFamily({
188
- theme,
189
- weight,
190
- italic
191
- }) {
149
+ function resolveFontFamily(theme, weight, italic) {
192
150
  const fonts = italic ? theme.typography.fonts.italic : theme.typography.fonts.normal;
193
151
  for (const [fontWeight, fontFamily] of Object.entries(fonts)) {
194
152
  if (fontWeight === weight) {
@@ -198,15 +156,91 @@ function resolveFontFamily({
198
156
  return;
199
157
  }
200
158
 
159
+ // src/features/typography/utils/resolveHeadingRecipe.ts
160
+ function resolveHeadingRecipe(theme, {
161
+ align,
162
+ color,
163
+ emphasis = "default",
164
+ italic = false,
165
+ level,
166
+ size,
167
+ weight
168
+ }) {
169
+ const recipe = resolveSizeRecipe(theme, size ?? resolveHeadingSizeFromLevel(level));
170
+ const tokens = resolveTypographyStyleTokens({
171
+ theme,
172
+ color,
173
+ emphasis,
174
+ weight: weight ?? recipe.weight,
175
+ italic
176
+ });
177
+ return {
178
+ color: tokens.color,
179
+ elevation: 0,
180
+ fontFamily: tokens.fontFamily,
181
+ fontSize: recipe.fontSize,
182
+ fontStyle: italic ? "italic" : "normal",
183
+ fontWeight: tokens.fontWeight,
184
+ lineHeight: recipe.lineHeight,
185
+ textAlign: align
186
+ };
187
+ }
188
+ function resolveHeadingLevelFromSize(size) {
189
+ switch (size) {
190
+ case "h1":
191
+ return 1;
192
+ case "h2":
193
+ return 2;
194
+ case "h3":
195
+ return 3;
196
+ case "h4":
197
+ return 4;
198
+ case "h5":
199
+ return 5;
200
+ case "h6":
201
+ return 6;
202
+ }
203
+ }
204
+ function resolveSizeRecipe(theme, size) {
205
+ if (size === "display") {
206
+ const fontSize = theme.typography.sizes["3xl"];
207
+ return {
208
+ fontSize,
209
+ lineHeight: fontSize + 8,
210
+ weight: "bold"
211
+ };
212
+ }
213
+ const heading = theme.typography.headings[resolveHeadingLevelFromSize(size)];
214
+ return {
215
+ fontSize: heading.size,
216
+ lineHeight: heading.lineHeight,
217
+ weight: heading.weight
218
+ };
219
+ }
220
+
221
+ // src/features/typography/utils/resolveTypographyThemeRecipeFields.ts
222
+ var ALIGNMENTS = ["auto", "left", "right", "center", "justify"];
223
+ var WEIGHTS = ["regular", "medium", "semiBold", "bold"];
224
+ function resolveTypographyThemeRecipeFields(fields) {
225
+ return {
226
+ color: readChoice(fields.color, ZORA_COLORS),
227
+ emphasis: readChoice(fields.emphasis, ZORA_EMPHASES),
228
+ align: readChoice(fields.align, ALIGNMENTS),
229
+ weight: readChoice(fields.weight, WEIGHTS),
230
+ italic: typeof fields.italic === "boolean" ? fields.italic : undefined
231
+ };
232
+ }
233
+ function readChoice(value, choices) {
234
+ if (typeof value !== "string")
235
+ return;
236
+ return choices.find((choice) => choice === value);
237
+ }
238
+
201
239
  // src/features/typography/utils/resolveHeadingThemeRecipe.ts
202
240
  function resolveHeadingThemeRecipe(fields) {
203
241
  return {
204
242
  size: readSize(fields.size),
205
- color: readColor(fields.color),
206
- emphasis: readEmphasis(fields.emphasis),
207
- align: readAlign(fields.align),
208
- weight: readWeight(fields.weight),
209
- italic: typeof fields.italic === "boolean" ? fields.italic : undefined
243
+ ...resolveTypographyThemeRecipeFields(fields)
210
244
  };
211
245
  }
212
246
  function readSize(value) {
@@ -216,34 +250,6 @@ function readSize(value) {
216
250
  return value;
217
251
  return;
218
252
  }
219
- function readColor(value) {
220
- if (typeof value !== "string")
221
- return;
222
- if (value === "primary" || value === "secondary" || value === "tertiary")
223
- return value;
224
- if (value === "quaternary" || value === "neutral" || value === "danger")
225
- return value;
226
- if (value === "success" || value === "warning" || value === "error" || value === "info")
227
- return value;
228
- return;
229
- }
230
- function readEmphasis(value) {
231
- if (value === "default" || value === "muted" || value === "subtle" || value === "inverse")
232
- return value;
233
- return;
234
- }
235
- function readAlign(value) {
236
- if (value === "auto" || value === "left" || value === "right")
237
- return value;
238
- if (value === "center" || value === "justify")
239
- return value;
240
- return;
241
- }
242
- function readWeight(value) {
243
- if (value === "regular" || value === "medium" || value === "semiBold" || value === "bold")
244
- return value;
245
- return;
246
- }
247
253
 
248
254
  // src/features/typography/adapters/inbound/Heading.tsx
249
255
  import { jsx } from "react/jsx-runtime";
@@ -351,19 +357,20 @@ function resolveTextStyle({
351
357
  const resolvedColor = resolveResponsive(color, breakpoint);
352
358
  const resolvedAlign = resolveResponsive(align, breakpoint);
353
359
  const recipe = resolveVariantRecipe(theme, resolvedVariant, breakpoint);
354
- const resolvedWeight = resolveWeight2(theme, resolveResponsive(weight, breakpoint) ?? recipe.weight);
360
+ const tokens = resolveTypographyStyleTokens({
361
+ theme,
362
+ color: resolvedColor,
363
+ emphasis: resolvedEmphasis,
364
+ weight: resolveResponsive(weight, breakpoint) ?? recipe.weight,
365
+ italic
366
+ });
355
367
  return {
356
- color: resolveTextColor(theme, resolvedEmphasis, resolvedColor),
368
+ color: tokens.color,
357
369
  elevation: 0,
358
- fontFamily: resolveFontFamily2({
359
- theme,
360
- variant: resolvedVariant,
361
- weight: resolvedWeight,
362
- italic
363
- }),
370
+ fontFamily: resolvedVariant === "code" ? "monospace" : tokens.fontFamily,
364
371
  fontSize: recipe.fontSize,
365
372
  fontStyle: italic ? "italic" : "normal",
366
- fontWeight: resolvedWeight,
373
+ fontWeight: tokens.fontWeight,
367
374
  letterSpacing: recipe.letterSpacing,
368
375
  lineHeight: recipe.lineHeight,
369
376
  textAlign: resolvedAlign,
@@ -373,36 +380,6 @@ function resolveTextStyle({
373
380
  function isMediumBreakpointOrLarger(breakpoint) {
374
381
  return breakpoint === "md" || breakpoint === "lg" || breakpoint === "xl";
375
382
  }
376
- function resolveWeight2(theme, weight) {
377
- switch (weight) {
378
- case "medium":
379
- return theme.typography.weights.medium;
380
- case "semiBold":
381
- return theme.typography.weights.semiBold;
382
- case "bold":
383
- return theme.typography.weights.bold;
384
- case "regular":
385
- default:
386
- return theme.typography.weights.regular;
387
- }
388
- }
389
- function resolveFontFamily2({
390
- theme,
391
- variant,
392
- weight,
393
- italic
394
- }) {
395
- if (variant === "code") {
396
- return "monospace";
397
- }
398
- const fonts = italic ? theme.typography.fonts.italic : theme.typography.fonts.normal;
399
- for (const [fontWeight, fontFamily] of Object.entries(fonts)) {
400
- if (fontWeight === weight) {
401
- return fontFamily;
402
- }
403
- }
404
- return;
405
- }
406
383
  function resolveVariantRecipe(theme, variant, breakpoint) {
407
384
  switch (variant) {
408
385
  case "lead":
@@ -452,58 +429,12 @@ function resolveVariantRecipe(theme, variant, breakpoint) {
452
429
  };
453
430
  }
454
431
  }
455
- function resolveRoleSemantics2(theme, color) {
456
- switch (color) {
457
- case "secondary":
458
- return theme.semantics.secondary;
459
- case "tertiary":
460
- return theme.semantics.accent;
461
- case "quaternary":
462
- return theme.semantics.highlight;
463
- case "neutral":
464
- return theme.semantics.action.neutral;
465
- case "error":
466
- return theme.semantics.error;
467
- case "info":
468
- return theme.semantics.info;
469
- case "danger":
470
- return theme.semantics.action.danger;
471
- case "success":
472
- return theme.semantics.success;
473
- case "warning":
474
- return theme.semantics.warning;
475
- case "primary":
476
- default:
477
- return theme.semantics.action.primary;
478
- }
479
- }
480
- function resolveTextColor(theme, emphasis, color) {
481
- if (color) {
482
- const role = resolveRoleSemantics2(theme, color);
483
- return emphasis === "inverse" ? role.onSolidText : role.base;
484
- }
485
- switch (emphasis) {
486
- case "muted":
487
- return theme.semantics.content.muted;
488
- case "subtle":
489
- return theme.semantics.content.subtle;
490
- case "inverse":
491
- return theme.semantics.content.inverse;
492
- case "default":
493
- default:
494
- return theme.semantics.content.default;
495
- }
496
- }
497
432
 
498
433
  // src/features/typography/utils/resolveTextThemeRecipe.ts
499
434
  function resolveTextThemeRecipe(fields) {
500
435
  return {
501
436
  variant: readVariant(fields.variant),
502
- color: readColor2(fields.color),
503
- emphasis: readEmphasis2(fields.emphasis),
504
- align: readAlign2(fields.align),
505
- weight: readWeight2(fields.weight),
506
- italic: typeof fields.italic === "boolean" ? fields.italic : undefined
437
+ ...resolveTypographyThemeRecipeFields(fields)
507
438
  };
508
439
  }
509
440
  function readVariant(value) {
@@ -513,34 +444,6 @@ function readVariant(value) {
513
444
  return value;
514
445
  return;
515
446
  }
516
- function readColor2(value) {
517
- if (typeof value !== "string")
518
- return;
519
- if (value === "primary" || value === "secondary" || value === "tertiary")
520
- return value;
521
- if (value === "quaternary" || value === "neutral" || value === "danger")
522
- return value;
523
- if (value === "success" || value === "warning" || value === "error" || value === "info")
524
- return value;
525
- return;
526
- }
527
- function readEmphasis2(value) {
528
- if (value === "default" || value === "muted" || value === "subtle" || value === "inverse")
529
- return value;
530
- return;
531
- }
532
- function readAlign2(value) {
533
- if (value === "auto" || value === "left" || value === "right")
534
- return value;
535
- if (value === "center" || value === "justify")
536
- return value;
537
- return;
538
- }
539
- function readWeight2(value) {
540
- if (value === "regular" || value === "medium" || value === "semiBold" || value === "bold")
541
- return value;
542
- return;
543
- }
544
447
 
545
448
  // src/features/typography/utils/textThemeRecipeMeta.ts
546
449
  var textThemeRecipeMeta = {
@@ -554,24 +457,7 @@ var textThemeRecipeMeta = {
554
457
  options: ["body", "lead", "bodySmall", "caption", "label", "eyebrow", "code"],
555
458
  default: "body"
556
459
  },
557
- color: { type: "choice", label: "Color", options: ZORA_COLORS },
558
- emphasis: {
559
- type: "choice",
560
- label: "Emphasis",
561
- options: ZORA_EMPHASES,
562
- default: "default"
563
- },
564
- align: {
565
- type: "choice",
566
- label: "Align",
567
- options: ["auto", "left", "right", "center", "justify"]
568
- },
569
- weight: {
570
- type: "choice",
571
- label: "Weight",
572
- options: ["regular", "medium", "semiBold", "bold"]
573
- },
574
- italic: { type: "boolean", label: "Italic", default: false }
460
+ ...typographyThemeRecipeFields
575
461
  }
576
462
  };
577
463
 
@@ -7,7 +7,7 @@ import {
7
7
  } from "./Accordion-ep35792s.js";
8
8
  import {
9
9
  Text3
10
- } from "./Accordion-9rnsg9pk.js";
10
+ } from "./Accordion-vqx3exsq.js";
11
11
  import {
12
12
  useZoraTheme2
13
13
  } from "./Accordion-srjya6dz.js";
@@ -10,10 +10,10 @@ import {
10
10
  } from "./Accordion-czcaf5x2.js";
11
11
  import {
12
12
  Card2
13
- } from "./Accordion-rqr10gn4.js";
13
+ } from "./Accordion-1495be5z.js";
14
14
  import {
15
15
  List2
16
- } from "./Accordion-2jy53kzk.js";
16
+ } from "./Accordion-69c4pfz2.js";
17
17
  import {
18
18
  useZoraTheme2
19
19
  } from "./Accordion-srjya6dz.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  Heading2,
14
14
  Text3
15
- } from "./Accordion-9rnsg9pk.js";
15
+ } from "./Accordion-vqx3exsq.js";
16
16
  import {
17
17
  require_cjs
18
18
  } from "./Accordion-xgpzh4wq.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Accordion2,
4
4
  AccordionItem2
5
- } from "../../chunks/Accordion-a4pz3vjj.js";
5
+ } from "../../chunks/Accordion-zf1g5422.js";
6
6
  import"../../chunks/Accordion-6wrr910w.js";
7
7
  import"../../chunks/Accordion-vj1m2wck.js";
8
8
  import"../../chunks/Accordion-bfzeab9x.js";
@@ -11,7 +11,7 @@ import"../../chunks/Accordion-1fsrnq73.js";
11
11
  import"../../chunks/Accordion-09qs8gt1.js";
12
12
  import"../../chunks/Accordion-z5a0tx18.js";
13
13
  import"../../chunks/Accordion-ep35792s.js";
14
- import"../../chunks/Accordion-9rnsg9pk.js";
14
+ import"../../chunks/Accordion-vqx3exsq.js";
15
15
  import"../../chunks/Accordion-bff0p3x4.js";
16
16
  import"../../chunks/Accordion-srjya6dz.js";
17
17
  import"../../chunks/Accordion-184r2r82.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Accordion2,
4
4
  AccordionItem2
5
- } from "../../chunks/Accordion-a4pz3vjj.js";
5
+ } from "../../chunks/Accordion-zf1g5422.js";
6
6
  import"../../chunks/Accordion-6wrr910w.js";
7
7
  import"../../chunks/Accordion-vj1m2wck.js";
8
8
  import"../../chunks/Accordion-bfzeab9x.js";
@@ -11,7 +11,7 @@ import"../../chunks/Accordion-1fsrnq73.js";
11
11
  import"../../chunks/Accordion-09qs8gt1.js";
12
12
  import"../../chunks/Accordion-z5a0tx18.js";
13
13
  import"../../chunks/Accordion-ep35792s.js";
14
- import"../../chunks/Accordion-9rnsg9pk.js";
14
+ import"../../chunks/Accordion-vqx3exsq.js";
15
15
  import"../../chunks/Accordion-bff0p3x4.js";
16
16
  import"../../chunks/Accordion-srjya6dz.js";
17
17
  import"../../chunks/Accordion-184r2r82.js";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  AppBar2
4
- } from "../../chunks/Accordion-rqhh2m5b.js";
4
+ } from "../../chunks/Accordion-7n93d7fa.js";
5
5
  import"../../chunks/Accordion-09qs8gt1.js";
6
6
  import"../../chunks/Accordion-z5a0tx18.js";
7
7
  import"../../chunks/Accordion-6wrr910w.js";
@@ -20,7 +20,7 @@ import"../../chunks/Accordion-fzcpm4xf.js";
20
20
  import"../../chunks/Accordion-2nesr9cv.js";
21
21
  import"../../chunks/Accordion-b337t2df.js";
22
22
  import"../../chunks/Accordion-1fsrnq73.js";
23
- import"../../chunks/Accordion-9rnsg9pk.js";
23
+ import"../../chunks/Accordion-vqx3exsq.js";
24
24
  import"../../chunks/Accordion-eqvdv7tt.js";
25
25
  import"../../chunks/Accordion-61e19g3e.js";
26
26
  import"../../chunks/Accordion-ys214jt5.js";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  AppBar2
4
- } from "../../chunks/Accordion-rqhh2m5b.js";
4
+ } from "../../chunks/Accordion-7n93d7fa.js";
5
5
  import"../../chunks/Accordion-09qs8gt1.js";
6
6
  import"../../chunks/Accordion-z5a0tx18.js";
7
7
  import"../../chunks/Accordion-6wrr910w.js";
@@ -20,7 +20,7 @@ import"../../chunks/Accordion-fzcpm4xf.js";
20
20
  import"../../chunks/Accordion-2nesr9cv.js";
21
21
  import"../../chunks/Accordion-b337t2df.js";
22
22
  import"../../chunks/Accordion-1fsrnq73.js";
23
- import"../../chunks/Accordion-9rnsg9pk.js";
23
+ import"../../chunks/Accordion-vqx3exsq.js";
24
24
  import"../../chunks/Accordion-eqvdv7tt.js";
25
25
  import"../../chunks/Accordion-61e19g3e.js";
26
26
  import"../../chunks/Accordion-ys214jt5.js";
@@ -8,7 +8,7 @@ import"../../chunks/Accordion-ep35792s.js";
8
8
  import"../../chunks/Accordion-2nesr9cv.js";
9
9
  import"../../chunks/Accordion-x055n3b3.js";
10
10
  import"../../chunks/Accordion-bfzeab9x.js";
11
- import"../../chunks/Accordion-9rnsg9pk.js";
11
+ import"../../chunks/Accordion-vqx3exsq.js";
12
12
  import"../../chunks/Accordion-8f0nekwe.js";
13
13
  import"../../chunks/Accordion-nnv76yff.js";
14
14
  import"../../chunks/Accordion-wyxmd0n0.js";
@@ -21,10 +21,10 @@ import {
21
21
  AuthScreen2,
22
22
  ForgotPasswordForm2,
23
23
  OtpForm2
24
- } from "../../chunks/Accordion-vkd002gw.js";
25
- import"../../chunks/Accordion-wqyrrptg.js";
24
+ } from "../../chunks/Accordion-d0bebw9j.js";
25
+ import"../../chunks/Accordion-jyemxzat.js";
26
26
  import"../../chunks/Accordion-45nc4bte.js";
27
- import"../../chunks/Accordion-gn8ptzwb.js";
27
+ import"../../chunks/Accordion-4x8gdqqs.js";
28
28
  import"../../chunks/Accordion-y2pss5p0.js";
29
29
  import"../../chunks/Accordion-61e19g3e.js";
30
30
  import"../../chunks/Accordion-ys214jt5.js";
@@ -7,11 +7,11 @@ import"../../chunks/Accordion-1fsrnq73.js";
7
7
  import"../../chunks/Accordion-09qs8gt1.js";
8
8
  import"../../chunks/Accordion-z5a0tx18.js";
9
9
  import"../../chunks/Accordion-ep35792s.js";
10
- import"../../chunks/Accordion-9rnsg9pk.js";
10
+ import"../../chunks/Accordion-vqx3exsq.js";
11
11
  import {
12
12
  Avatar2,
13
13
  AvatarGroup2
14
- } from "../../chunks/Accordion-tyh8jj9d.js";
14
+ } from "../../chunks/Accordion-cbbafww1.js";
15
15
  import"../../chunks/Accordion-bff0p3x4.js";
16
16
  import"../../chunks/Accordion-srjya6dz.js";
17
17
  import"../../chunks/Accordion-184r2r82.js";
@@ -7,11 +7,11 @@ import"../../chunks/Accordion-1fsrnq73.js";
7
7
  import"../../chunks/Accordion-09qs8gt1.js";
8
8
  import"../../chunks/Accordion-z5a0tx18.js";
9
9
  import"../../chunks/Accordion-ep35792s.js";
10
- import"../../chunks/Accordion-9rnsg9pk.js";
10
+ import"../../chunks/Accordion-vqx3exsq.js";
11
11
  import {
12
12
  Avatar2,
13
13
  AvatarGroup2
14
- } from "../../chunks/Accordion-tyh8jj9d.js";
14
+ } from "../../chunks/Accordion-cbbafww1.js";
15
15
  import"../../chunks/Accordion-bff0p3x4.js";
16
16
  import"../../chunks/Accordion-srjya6dz.js";
17
17
  import"../../chunks/Accordion-184r2r82.js";
@@ -4,23 +4,23 @@ import"../../chunks/Accordion-6wrr910w.js";
4
4
  import"../../chunks/Accordion-nnv76yff.js";
5
5
  import"../../chunks/Accordion-z5a0tx18.js";
6
6
  import"../../chunks/Accordion-2nesr9cv.js";
7
- import"../../chunks/Accordion-rqr10gn4.js";
7
+ import"../../chunks/Accordion-1495be5z.js";
8
8
  import"../../chunks/Accordion-vj1m2wck.js";
9
9
  import"../../chunks/Accordion-ep35792s.js";
10
10
  import"../../chunks/Accordion-bfzeab9x.js";
11
- import"../../chunks/Accordion-9rnsg9pk.js";
11
+ import"../../chunks/Accordion-vqx3exsq.js";
12
12
  import"../../chunks/Accordion-wyxmd0n0.js";
13
13
  import"../../chunks/Accordion-xgxxg1hz.js";
14
14
  import"../../chunks/Accordion-8f0nekwe.js";
15
15
  import"../../chunks/Accordion-1fsrnq73.js";
16
- import"../../chunks/Accordion-tyh8jj9d.js";
16
+ import"../../chunks/Accordion-cbbafww1.js";
17
17
  import"../../chunks/Accordion-czcaf5x2.js";
18
18
  import"../../chunks/Accordion-799z2zf6.js";
19
19
  import {
20
20
  CameraPermissionView2,
21
21
  ScanOverlay2,
22
22
  BarcodeScannerView2
23
- } from "../../chunks/Accordion-11ej93t5.js";
23
+ } from "../../chunks/Accordion-cjjg81ry.js";
24
24
  import"../../chunks/Accordion-eqvdv7tt.js";
25
25
  import"../../chunks/Accordion-61e19g3e.js";
26
26
  import"../../chunks/Accordion-ys214jt5.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "../../chunks/Accordion-1fsrnq73.js";
21
21
  import {
22
22
  Text3
23
- } from "../../chunks/Accordion-9rnsg9pk.js";
23
+ } from "../../chunks/Accordion-vqx3exsq.js";
24
24
  import {
25
25
  resolveIconSize
26
26
  } from "../../chunks/Accordion-961ncx4e.js";