@ankhorage/zora 18.0.1 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (582) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/constants.d.ts +2 -1
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +2 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/corePluginMetadata.d.ts.map +1 -1
  8. package/dist/corePluginMetadata.js +1 -5
  9. package/dist/corePluginMetadata.js.map +1 -1
  10. package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
  11. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  12. package/dist/features/card/cardMeta.d.ts +1 -1
  13. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  14. package/dist/features/card/postCardMeta.d.ts +1 -1
  15. package/dist/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.d.ts +1 -1
  16. package/dist/features/chat/adapters/inbound/ChatListItem.d.ts.map +1 -0
  17. package/dist/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.js +6 -6
  18. package/dist/features/chat/adapters/inbound/ChatListItem.js.map +1 -0
  19. package/dist/{patterns/message-bubble → features/chat/adapters/inbound}/MessageBubble.d.ts +1 -1
  20. package/dist/features/chat/adapters/inbound/MessageBubble.d.ts.map +1 -0
  21. package/dist/{patterns/message-bubble → features/chat/adapters/inbound}/MessageBubble.js +5 -5
  22. package/dist/features/chat/adapters/inbound/MessageBubble.js.map +1 -0
  23. package/dist/{patterns/chat-list-item/meta.d.ts → features/chat/chatListItemMeta.d.ts} +1 -1
  24. package/dist/features/chat/chatListItemMeta.d.ts.map +1 -0
  25. package/dist/{patterns/chat-list-item/meta.js → features/chat/chatListItemMeta.js} +1 -1
  26. package/dist/features/chat/chatListItemMeta.js.map +1 -0
  27. package/dist/{patterns/message-bubble/meta.d.ts → features/chat/messageBubbleMeta.d.ts} +2 -2
  28. package/dist/features/chat/messageBubbleMeta.d.ts.map +1 -0
  29. package/dist/{patterns/message-bubble/meta.js → features/chat/messageBubbleMeta.js} +1 -1
  30. package/dist/features/chat/messageBubbleMeta.js.map +1 -0
  31. package/dist/features/chat/public.d.ts +4 -0
  32. package/dist/features/chat/public.d.ts.map +1 -0
  33. package/dist/features/chat/public.js +3 -0
  34. package/dist/features/chat/public.js.map +1 -0
  35. package/dist/{patterns/collection-editor → features/collection-editor/adapters/inbound}/CollectionEditor.d.ts +1 -1
  36. package/dist/features/collection-editor/adapters/inbound/CollectionEditor.d.ts.map +1 -0
  37. package/dist/{patterns/collection-editor → features/collection-editor/adapters/inbound}/CollectionEditor.js +8 -8
  38. package/dist/features/collection-editor/adapters/inbound/CollectionEditor.js.map +1 -0
  39. package/dist/features/collection-editor/meta.d.ts.map +1 -0
  40. package/dist/{patterns → features}/collection-editor/meta.js.map +1 -1
  41. package/dist/features/collection-editor/public.d.ts +3 -0
  42. package/dist/features/collection-editor/public.d.ts.map +1 -0
  43. package/dist/features/collection-editor/public.js +2 -0
  44. package/dist/features/collection-editor/public.js.map +1 -0
  45. package/dist/features/content-rail/contentRailMeta.d.ts +2 -2
  46. package/dist/features/dialog/dialogMeta.d.ts +2 -2
  47. package/dist/features/form/field/meta.d.ts +1 -1
  48. package/dist/features/form/field/meta.d.ts.map +1 -1
  49. package/dist/features/form/field/meta.js +1 -0
  50. package/dist/features/form/field/meta.js.map +1 -1
  51. package/dist/features/form/switch/adapters/inbound/Switch.d.ts +5 -0
  52. package/dist/features/form/switch/adapters/inbound/Switch.d.ts.map +1 -0
  53. package/dist/features/form/switch/adapters/inbound/Switch.js +9 -0
  54. package/dist/features/form/switch/adapters/inbound/Switch.js.map +1 -0
  55. package/dist/features/form/switch/public.d.ts +3 -0
  56. package/dist/features/form/switch/public.d.ts.map +1 -0
  57. package/dist/features/form/switch/public.js +2 -0
  58. package/dist/features/form/switch/public.js.map +1 -0
  59. package/dist/features/form/switch/switchMeta.d.ts +33 -0
  60. package/dist/features/form/switch/switchMeta.d.ts.map +1 -0
  61. package/dist/features/form/switch/switchMeta.js +13 -0
  62. package/dist/features/form/switch/switchMeta.js.map +1 -0
  63. package/dist/features/gradient/gradientMeta.d.ts +1 -1
  64. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
  65. package/dist/features/layout/gridMeta.d.ts +1 -1
  66. package/dist/features/layout/public.d.ts +1 -2
  67. package/dist/features/layout/public.d.ts.map +1 -1
  68. package/dist/features/layout/public.js +0 -1
  69. package/dist/features/layout/public.js.map +1 -1
  70. package/dist/features/layout/screenMeta.d.ts +1 -1
  71. package/dist/features/layout/scrollViewMeta.d.ts +1 -1
  72. package/dist/features/layout/viewMeta.d.ts +1 -1
  73. package/dist/features/list/adapters/inbound/ListSection.d.ts.map +1 -1
  74. package/dist/features/list/adapters/inbound/ListSection.js +1 -1
  75. package/dist/features/list/adapters/inbound/ListSection.js.map +1 -1
  76. package/dist/features/list/flatListMeta.d.ts +1 -1
  77. package/dist/features/list/sectionListMeta.d.ts +1 -1
  78. package/dist/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.d.ts +1 -1
  79. package/dist/features/reader/adapters/inbound/ReaderSurface.d.ts.map +1 -0
  80. package/dist/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.js +9 -9
  81. package/dist/features/reader/adapters/inbound/ReaderSurface.js.map +1 -0
  82. package/dist/{patterns → features}/reader/meta.d.ts +2 -2
  83. package/dist/{patterns → features}/reader/meta.d.ts.map +1 -1
  84. package/dist/{patterns → features}/reader/meta.js.map +1 -1
  85. package/dist/features/reader/public.d.ts +4 -0
  86. package/dist/features/reader/public.d.ts.map +1 -0
  87. package/dist/features/reader/public.js +3 -0
  88. package/dist/features/reader/public.js.map +1 -0
  89. package/dist/features/reader/utils/resolveReaderProgress.d.ts.map +1 -0
  90. package/dist/features/reader/utils/resolveReaderProgress.js.map +1 -0
  91. package/dist/{patterns/scanner → features/scanner/adapters/inbound}/BarcodeScannerView.d.ts +1 -1
  92. package/dist/features/scanner/adapters/inbound/BarcodeScannerView.d.ts.map +1 -0
  93. package/dist/{patterns/scanner → features/scanner/adapters/inbound}/BarcodeScannerView.js +5 -5
  94. package/dist/features/scanner/adapters/inbound/BarcodeScannerView.js.map +1 -0
  95. package/dist/{patterns/scanner → features/scanner/adapters/inbound}/CameraPermissionView.d.ts +1 -1
  96. package/dist/features/scanner/adapters/inbound/CameraPermissionView.d.ts.map +1 -0
  97. package/dist/{patterns/scanner → features/scanner/adapters/inbound}/CameraPermissionView.js +5 -5
  98. package/dist/features/scanner/adapters/inbound/CameraPermissionView.js.map +1 -0
  99. package/dist/{patterns/scanner → features/scanner/adapters/inbound}/ScanOverlay.d.ts +1 -1
  100. package/dist/features/scanner/adapters/inbound/ScanOverlay.d.ts.map +1 -0
  101. package/dist/{patterns/scanner → features/scanner/adapters/inbound}/ScanOverlay.js +5 -5
  102. package/dist/features/scanner/adapters/inbound/ScanOverlay.js.map +1 -0
  103. package/dist/{patterns → features}/scanner/meta.d.ts +2 -2
  104. package/dist/{patterns → features}/scanner/meta.d.ts.map +1 -1
  105. package/dist/{patterns → features}/scanner/meta.js.map +1 -1
  106. package/dist/features/scanner/public.d.ts +5 -0
  107. package/dist/features/scanner/public.d.ts.map +1 -0
  108. package/dist/features/scanner/public.js +4 -0
  109. package/dist/features/scanner/public.js.map +1 -0
  110. package/dist/features/{layout → section}/adapters/inbound/ScreenSection.d.ts +1 -1
  111. package/dist/features/section/adapters/inbound/ScreenSection.d.ts.map +1 -0
  112. package/dist/features/{layout → section}/adapters/inbound/ScreenSection.js +2 -2
  113. package/dist/features/section/adapters/inbound/ScreenSection.js.map +1 -0
  114. package/dist/{patterns/section-header → features/section/adapters/inbound}/SectionHeader.d.ts +1 -1
  115. package/dist/features/section/adapters/inbound/SectionHeader.d.ts.map +1 -0
  116. package/dist/{patterns/section-header → features/section/adapters/inbound}/SectionHeader.js +4 -4
  117. package/dist/features/section/adapters/inbound/SectionHeader.js.map +1 -0
  118. package/dist/features/section/public.d.ts +4 -0
  119. package/dist/features/section/public.d.ts.map +1 -0
  120. package/dist/features/section/public.js +3 -0
  121. package/dist/features/section/public.js.map +1 -0
  122. package/dist/features/{layout → section}/screenSectionMeta.d.ts +1 -1
  123. package/dist/features/section/screenSectionMeta.d.ts.map +1 -0
  124. package/dist/features/section/screenSectionMeta.js.map +1 -0
  125. package/dist/{patterns/section-header/meta.d.ts → features/section/sectionHeaderMeta.d.ts} +1 -1
  126. package/dist/features/section/sectionHeaderMeta.d.ts.map +1 -0
  127. package/dist/{patterns/section-header/meta.js → features/section/sectionHeaderMeta.js} +1 -1
  128. package/dist/features/section/sectionHeaderMeta.js.map +1 -0
  129. package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectableItem.d.ts +1 -1
  130. package/dist/features/selection/adapters/inbound/SelectableItem.d.ts.map +1 -0
  131. package/dist/features/selection/adapters/inbound/SelectableItem.js.map +1 -0
  132. package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.d.ts +1 -1
  133. package/dist/features/selection/adapters/inbound/SelectionProvider.d.ts.map +1 -0
  134. package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.js +1 -1
  135. package/dist/features/selection/adapters/inbound/SelectionProvider.js.map +1 -0
  136. package/dist/{patterns → features}/selection/meta.d.ts.map +1 -1
  137. package/dist/{patterns → features}/selection/meta.js.map +1 -1
  138. package/dist/features/selection/public.d.ts +4 -0
  139. package/dist/features/selection/public.d.ts.map +1 -0
  140. package/dist/features/selection/public.js +3 -0
  141. package/dist/features/selection/public.js.map +1 -0
  142. package/dist/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.d.ts +1 -1
  143. package/dist/features/selection/utils/resolveSelectionNextIds.d.ts.map +1 -0
  144. package/dist/features/selection/utils/resolveSelectionNextIds.js.map +1 -0
  145. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  146. package/dist/features/tabs/tabPanelMeta.d.ts +1 -1
  147. package/dist/{patterns/timeline → features/timeline/adapters/inbound}/Timeline.d.ts +1 -1
  148. package/dist/features/timeline/adapters/inbound/Timeline.d.ts.map +1 -0
  149. package/dist/{patterns/timeline → features/timeline/adapters/inbound}/Timeline.js +7 -7
  150. package/dist/features/timeline/adapters/inbound/Timeline.js.map +1 -0
  151. package/dist/features/timeline/meta.d.ts.map +1 -0
  152. package/dist/{patterns → features}/timeline/meta.js.map +1 -1
  153. package/dist/features/timeline/public.d.ts +3 -0
  154. package/dist/features/timeline/public.d.ts.map +1 -0
  155. package/dist/features/timeline/public.js +2 -0
  156. package/dist/features/timeline/public.js.map +1 -0
  157. package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeItem.d.ts +2 -2
  158. package/dist/features/tree-view/adapters/inbound/TreeItem.d.ts.map +1 -0
  159. package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeItem.js +4 -4
  160. package/dist/features/tree-view/adapters/inbound/TreeItem.js.map +1 -0
  161. package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeView.d.ts +1 -1
  162. package/dist/features/tree-view/adapters/inbound/TreeView.d.ts.map +1 -0
  163. package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeView.js +2 -2
  164. package/dist/features/tree-view/adapters/inbound/TreeView.js.map +1 -0
  165. package/dist/{patterns → features}/tree-view/meta.d.ts.map +1 -1
  166. package/dist/{patterns → features}/tree-view/meta.js.map +1 -1
  167. package/dist/features/tree-view/public.d.ts +4 -0
  168. package/dist/features/tree-view/public.d.ts.map +1 -0
  169. package/dist/features/tree-view/public.js +3 -0
  170. package/dist/features/tree-view/public.js.map +1 -0
  171. package/dist/index.d.ts +18 -34
  172. package/dist/index.d.ts.map +1 -1
  173. package/dist/index.js +10 -17
  174. package/dist/index.js.map +1 -1
  175. package/dist/metadata/allowedChildren.d.ts +4 -4
  176. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  177. package/dist/metadata/allowedChildren.js +0 -3
  178. package/dist/metadata/allowedChildren.js.map +1 -1
  179. package/dist/metadata/bindableComponentMeta.d.ts +23 -23
  180. package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
  181. package/dist/metadata/bindableComponentMeta.js +20 -28
  182. package/dist/metadata/bindableComponentMeta.js.map +1 -1
  183. package/dist/metadata/componentMeta.d.ts.map +1 -1
  184. package/dist/metadata/componentMeta.js +12 -24
  185. package/dist/metadata/componentMeta.js.map +1 -1
  186. package/dist/metadata/themeRecipeMeta.d.ts.map +1 -1
  187. package/dist/metadata/themeRecipeMeta.js +0 -2
  188. package/dist/metadata/themeRecipeMeta.js.map +1 -1
  189. package/dist/registry.d.ts.map +1 -1
  190. package/dist/registry.js +11 -24
  191. package/dist/registry.js.map +1 -1
  192. package/dist/{patterns/message-bubble/types.d.ts → types/chat.d.ts} +29 -4
  193. package/dist/types/chat.d.ts.map +1 -0
  194. package/dist/types/chat.js +2 -0
  195. package/dist/types/chat.js.map +1 -0
  196. package/dist/{patterns/collection-editor/types.d.ts → types/collection-editor.d.ts} +2 -2
  197. package/dist/types/collection-editor.d.ts.map +1 -0
  198. package/dist/types/collection-editor.js +2 -0
  199. package/dist/types/collection-editor.js.map +1 -0
  200. package/dist/types/layout.d.ts +0 -6
  201. package/dist/types/layout.d.ts.map +1 -1
  202. package/dist/types/layout.js.map +1 -1
  203. package/dist/{patterns/reader/types.d.ts → types/reader.d.ts} +2 -2
  204. package/dist/types/reader.d.ts.map +1 -0
  205. package/dist/types/reader.js +2 -0
  206. package/dist/types/reader.js.map +1 -0
  207. package/dist/{patterns/scanner/types.d.ts → types/scanner.d.ts} +3 -3
  208. package/dist/types/scanner.d.ts.map +1 -0
  209. package/dist/types/scanner.js +2 -0
  210. package/dist/types/scanner.js.map +1 -0
  211. package/dist/types/section.d.ts +15 -0
  212. package/dist/types/section.d.ts.map +1 -0
  213. package/dist/types/section.js +2 -0
  214. package/dist/types/section.js.map +1 -0
  215. package/dist/{patterns/selection/types.d.ts → types/selection.d.ts} +1 -1
  216. package/dist/types/selection.d.ts.map +1 -0
  217. package/dist/types/selection.js +2 -0
  218. package/dist/types/selection.js.map +1 -0
  219. package/dist/types/switch.d.ts +5 -0
  220. package/dist/types/switch.d.ts.map +1 -0
  221. package/dist/types/switch.js +2 -0
  222. package/dist/types/switch.js.map +1 -0
  223. package/dist/{patterns/timeline/types.d.ts → types/timeline.d.ts} +3 -3
  224. package/dist/types/timeline.d.ts.map +1 -0
  225. package/dist/types/timeline.js +2 -0
  226. package/dist/types/timeline.js.map +1 -0
  227. package/dist/{patterns/tree-view/types.d.ts → types/tree-view.d.ts} +2 -2
  228. package/dist/types/tree-view.d.ts.map +1 -0
  229. package/dist/types/tree-view.js +2 -0
  230. package/dist/types/tree-view.js.map +1 -0
  231. package/package.json +1 -1
  232. package/src/audit.test.ts +3 -3
  233. package/src/constants.ts +2 -1
  234. package/src/corePluginMetadata.ts +1 -5
  235. package/src/featureManifest.test.ts +2 -1
  236. package/src/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.test.tsx +1 -1
  237. package/src/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.tsx +7 -7
  238. package/src/{patterns/message-bubble → features/chat/adapters/inbound}/MessageBubble.tsx +6 -6
  239. package/src/features/chat/public.ts +11 -0
  240. package/src/{patterns/collection-editor → features/collection-editor/adapters/inbound}/CollectionEditor.tsx +9 -9
  241. package/src/features/collection-editor/public.ts +5 -0
  242. package/src/features/form/field/meta.ts +1 -0
  243. package/src/features/form/switch/adapters/inbound/Switch.tsx +12 -0
  244. package/src/features/form/switch/public.ts +2 -0
  245. package/src/features/form/switch/switchMeta.ts +14 -0
  246. package/src/features/layout/public.test.ts +3 -11
  247. package/src/features/layout/public.ts +0 -2
  248. package/src/features/list/adapters/inbound/ListSection.tsx +1 -1
  249. package/src/features/missing-element/MissingElement.test.ts +2 -2
  250. package/src/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.test.ts +3 -3
  251. package/src/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.tsx +10 -10
  252. package/src/{patterns/reader/index.ts → features/reader/public.ts} +3 -3
  253. package/src/{patterns/scanner → features/scanner/adapters/inbound}/BarcodeScannerView.tsx +6 -6
  254. package/src/{patterns/scanner → features/scanner/adapters/inbound}/CameraPermissionView.tsx +6 -6
  255. package/src/{patterns/scanner → features/scanner/adapters/inbound}/ScanOverlay.tsx +6 -6
  256. package/src/features/scanner/public.ts +10 -0
  257. package/src/features/{layout → section}/adapters/inbound/ScreenSection.tsx +3 -3
  258. package/src/{patterns/section-header → features/section/adapters/inbound}/SectionHeader.tsx +5 -5
  259. package/src/features/section/public.ts +3 -0
  260. package/src/{patterns/selection → features/selection/adapters/inbound}/SelectableItem.tsx +5 -1
  261. package/src/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.tsx +12 -2
  262. package/src/features/selection/public.ts +10 -0
  263. package/src/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.test.ts +1 -1
  264. package/src/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.ts +1 -1
  265. package/src/{patterns/timeline → features/timeline/adapters/inbound}/Timeline.tsx +9 -9
  266. package/src/features/timeline/public.ts +2 -0
  267. package/src/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeItem.tsx +6 -6
  268. package/src/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeView.tsx +3 -3
  269. package/src/features/tree-view/public.ts +3 -0
  270. package/src/index.ts +58 -76
  271. package/src/interactionPolicy.test.ts +8 -12
  272. package/src/metadata/allowedChildren.ts +0 -3
  273. package/src/metadata/authoringMeta.test.ts +1 -1
  274. package/src/metadata/bindableComponentMeta.ts +20 -28
  275. package/src/metadata/componentMeta.test.ts +2 -3
  276. package/src/metadata/componentMeta.ts +16 -28
  277. package/src/metadata/radioGroupReachability.test.ts +0 -1
  278. package/src/metadata/themeRecipeMeta.test.ts +0 -1
  279. package/src/metadata/themeRecipeMeta.ts +0 -2
  280. package/src/registry.ts +11 -32
  281. package/src/showcaseCoverage.test.ts +1 -7
  282. package/src/theme/themeScopeStructure.test.ts +13 -21
  283. package/src/{patterns/message-bubble/types.ts → types/chat.ts} +30 -3
  284. package/src/{patterns/collection-editor/types.ts → types/collection-editor.ts} +2 -2
  285. package/src/types/layout.ts +0 -7
  286. package/src/{patterns/reader/types.ts → types/reader.ts} +1 -1
  287. package/src/{patterns/scanner/types.ts → types/scanner.ts} +2 -2
  288. package/src/types/section.ts +17 -0
  289. package/src/types/switch.ts +5 -0
  290. package/src/{patterns/timeline/types.ts → types/timeline.ts} +2 -2
  291. package/src/{patterns/tree-view/types.ts → types/tree-view.ts} +1 -1
  292. package/dist/features/layout/adapters/inbound/ScreenSection.d.ts.map +0 -1
  293. package/dist/features/layout/adapters/inbound/ScreenSection.js.map +0 -1
  294. package/dist/features/layout/screenSectionMeta.d.ts.map +0 -1
  295. package/dist/features/layout/screenSectionMeta.js.map +0 -1
  296. package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +0 -1
  297. package/dist/patterns/chat-list-item/ChatListItem.js.map +0 -1
  298. package/dist/patterns/chat-list-item/index.d.ts +0 -3
  299. package/dist/patterns/chat-list-item/index.d.ts.map +0 -1
  300. package/dist/patterns/chat-list-item/index.js +0 -2
  301. package/dist/patterns/chat-list-item/index.js.map +0 -1
  302. package/dist/patterns/chat-list-item/meta.d.ts.map +0 -1
  303. package/dist/patterns/chat-list-item/meta.js.map +0 -1
  304. package/dist/patterns/chat-list-item/types.d.ts +0 -31
  305. package/dist/patterns/chat-list-item/types.d.ts.map +0 -1
  306. package/dist/patterns/chat-list-item/types.js +0 -2
  307. package/dist/patterns/chat-list-item/types.js.map +0 -1
  308. package/dist/patterns/collection-editor/CollectionEditor.d.ts.map +0 -1
  309. package/dist/patterns/collection-editor/CollectionEditor.js.map +0 -1
  310. package/dist/patterns/collection-editor/index.d.ts +0 -3
  311. package/dist/patterns/collection-editor/index.d.ts.map +0 -1
  312. package/dist/patterns/collection-editor/index.js +0 -3
  313. package/dist/patterns/collection-editor/index.js.map +0 -1
  314. package/dist/patterns/collection-editor/meta.d.ts.map +0 -1
  315. package/dist/patterns/collection-editor/types.d.ts.map +0 -1
  316. package/dist/patterns/collection-editor/types.js +0 -2
  317. package/dist/patterns/collection-editor/types.js.map +0 -1
  318. package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts +0 -9
  319. package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts.map +0 -1
  320. package/dist/patterns/confirm-dialog/ConfirmDialog.js +0 -24
  321. package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +0 -1
  322. package/dist/patterns/confirm-dialog/index.d.ts +0 -3
  323. package/dist/patterns/confirm-dialog/index.d.ts.map +0 -1
  324. package/dist/patterns/confirm-dialog/index.js +0 -2
  325. package/dist/patterns/confirm-dialog/index.js.map +0 -1
  326. package/dist/patterns/confirm-dialog/meta.d.ts +0 -9
  327. package/dist/patterns/confirm-dialog/meta.d.ts.map +0 -1
  328. package/dist/patterns/confirm-dialog/meta.js +0 -9
  329. package/dist/patterns/confirm-dialog/meta.js.map +0 -1
  330. package/dist/patterns/confirm-dialog/types.d.ts +0 -18
  331. package/dist/patterns/confirm-dialog/types.d.ts.map +0 -1
  332. package/dist/patterns/confirm-dialog/types.js +0 -2
  333. package/dist/patterns/confirm-dialog/types.js.map +0 -1
  334. package/dist/patterns/filter-bar/FilterBar.d.ts +0 -9
  335. package/dist/patterns/filter-bar/FilterBar.d.ts.map +0 -1
  336. package/dist/patterns/filter-bar/FilterBar.js +0 -17
  337. package/dist/patterns/filter-bar/FilterBar.js.map +0 -1
  338. package/dist/patterns/filter-bar/index.d.ts +0 -3
  339. package/dist/patterns/filter-bar/index.d.ts.map +0 -1
  340. package/dist/patterns/filter-bar/index.js +0 -2
  341. package/dist/patterns/filter-bar/index.js.map +0 -1
  342. package/dist/patterns/filter-bar/meta.d.ts +0 -9
  343. package/dist/patterns/filter-bar/meta.d.ts.map +0 -1
  344. package/dist/patterns/filter-bar/meta.js +0 -9
  345. package/dist/patterns/filter-bar/meta.js.map +0 -1
  346. package/dist/patterns/filter-bar/types.d.ts +0 -9
  347. package/dist/patterns/filter-bar/types.d.ts.map +0 -1
  348. package/dist/patterns/filter-bar/types.js +0 -2
  349. package/dist/patterns/filter-bar/types.js.map +0 -1
  350. package/dist/patterns/inspector-field/InspectorField.d.ts +0 -9
  351. package/dist/patterns/inspector-field/InspectorField.d.ts.map +0 -1
  352. package/dist/patterns/inspector-field/InspectorField.js +0 -19
  353. package/dist/patterns/inspector-field/InspectorField.js.map +0 -1
  354. package/dist/patterns/inspector-field/index.d.ts +0 -3
  355. package/dist/patterns/inspector-field/index.d.ts.map +0 -1
  356. package/dist/patterns/inspector-field/index.js +0 -3
  357. package/dist/patterns/inspector-field/index.js.map +0 -1
  358. package/dist/patterns/inspector-field/meta.d.ts +0 -9
  359. package/dist/patterns/inspector-field/meta.d.ts.map +0 -1
  360. package/dist/patterns/inspector-field/meta.js +0 -9
  361. package/dist/patterns/inspector-field/meta.js.map +0 -1
  362. package/dist/patterns/inspector-field/types.d.ts +0 -15
  363. package/dist/patterns/inspector-field/types.d.ts.map +0 -1
  364. package/dist/patterns/inspector-field/types.js +0 -2
  365. package/dist/patterns/inspector-field/types.js.map +0 -1
  366. package/dist/patterns/message-bubble/MessageBubble.d.ts.map +0 -1
  367. package/dist/patterns/message-bubble/MessageBubble.js.map +0 -1
  368. package/dist/patterns/message-bubble/index.d.ts +0 -3
  369. package/dist/patterns/message-bubble/index.d.ts.map +0 -1
  370. package/dist/patterns/message-bubble/index.js +0 -2
  371. package/dist/patterns/message-bubble/index.js.map +0 -1
  372. package/dist/patterns/message-bubble/meta.d.ts.map +0 -1
  373. package/dist/patterns/message-bubble/meta.js.map +0 -1
  374. package/dist/patterns/message-bubble/types.d.ts.map +0 -1
  375. package/dist/patterns/message-bubble/types.js +0 -2
  376. package/dist/patterns/message-bubble/types.js.map +0 -1
  377. package/dist/patterns/notice/Notice.d.ts +0 -9
  378. package/dist/patterns/notice/Notice.d.ts.map +0 -1
  379. package/dist/patterns/notice/Notice.js +0 -20
  380. package/dist/patterns/notice/Notice.js.map +0 -1
  381. package/dist/patterns/notice/index.d.ts +0 -3
  382. package/dist/patterns/notice/index.d.ts.map +0 -1
  383. package/dist/patterns/notice/index.js +0 -2
  384. package/dist/patterns/notice/index.js.map +0 -1
  385. package/dist/patterns/notice/meta.d.ts +0 -34
  386. package/dist/patterns/notice/meta.d.ts.map +0 -1
  387. package/dist/patterns/notice/meta.js +0 -35
  388. package/dist/patterns/notice/meta.js.map +0 -1
  389. package/dist/patterns/notice/types.d.ts +0 -11
  390. package/dist/patterns/notice/types.d.ts.map +0 -1
  391. package/dist/patterns/notice/types.js +0 -2
  392. package/dist/patterns/notice/types.js.map +0 -1
  393. package/dist/patterns/panel/Panel.d.ts +0 -7
  394. package/dist/patterns/panel/Panel.d.ts.map +0 -1
  395. package/dist/patterns/panel/Panel.js +0 -15
  396. package/dist/patterns/panel/Panel.js.map +0 -1
  397. package/dist/patterns/panel/index.d.ts +0 -3
  398. package/dist/patterns/panel/index.d.ts.map +0 -1
  399. package/dist/patterns/panel/index.js +0 -2
  400. package/dist/patterns/panel/index.js.map +0 -1
  401. package/dist/patterns/panel/meta.d.ts +0 -80
  402. package/dist/patterns/panel/meta.d.ts.map +0 -1
  403. package/dist/patterns/panel/meta.js +0 -49
  404. package/dist/patterns/panel/meta.js.map +0 -1
  405. package/dist/patterns/panel/themeRecipeMeta.d.ts +0 -31
  406. package/dist/patterns/panel/themeRecipeMeta.d.ts.map +0 -1
  407. package/dist/patterns/panel/themeRecipeMeta.js +0 -31
  408. package/dist/patterns/panel/themeRecipeMeta.js.map +0 -1
  409. package/dist/patterns/panel/types.d.ts +0 -16
  410. package/dist/patterns/panel/types.d.ts.map +0 -1
  411. package/dist/patterns/panel/types.js +0 -2
  412. package/dist/patterns/panel/types.js.map +0 -1
  413. package/dist/patterns/reader/ReaderSurface.d.ts.map +0 -1
  414. package/dist/patterns/reader/ReaderSurface.js.map +0 -1
  415. package/dist/patterns/reader/index.d.ts +0 -4
  416. package/dist/patterns/reader/index.d.ts.map +0 -1
  417. package/dist/patterns/reader/index.js +0 -3
  418. package/dist/patterns/reader/index.js.map +0 -1
  419. package/dist/patterns/reader/resolveReaderProgress.d.ts.map +0 -1
  420. package/dist/patterns/reader/resolveReaderProgress.js.map +0 -1
  421. package/dist/patterns/reader/types.d.ts.map +0 -1
  422. package/dist/patterns/reader/types.js +0 -2
  423. package/dist/patterns/reader/types.js.map +0 -1
  424. package/dist/patterns/scanner/BarcodeScannerView.d.ts.map +0 -1
  425. package/dist/patterns/scanner/BarcodeScannerView.js.map +0 -1
  426. package/dist/patterns/scanner/CameraPermissionView.d.ts.map +0 -1
  427. package/dist/patterns/scanner/CameraPermissionView.js.map +0 -1
  428. package/dist/patterns/scanner/ScanOverlay.d.ts.map +0 -1
  429. package/dist/patterns/scanner/ScanOverlay.js.map +0 -1
  430. package/dist/patterns/scanner/index.d.ts +0 -5
  431. package/dist/patterns/scanner/index.d.ts.map +0 -1
  432. package/dist/patterns/scanner/index.js +0 -4
  433. package/dist/patterns/scanner/index.js.map +0 -1
  434. package/dist/patterns/scanner/types.d.ts.map +0 -1
  435. package/dist/patterns/scanner/types.js +0 -2
  436. package/dist/patterns/scanner/types.js.map +0 -1
  437. package/dist/patterns/section-header/SectionHeader.d.ts.map +0 -1
  438. package/dist/patterns/section-header/SectionHeader.js.map +0 -1
  439. package/dist/patterns/section-header/index.d.ts +0 -3
  440. package/dist/patterns/section-header/index.d.ts.map +0 -1
  441. package/dist/patterns/section-header/index.js +0 -2
  442. package/dist/patterns/section-header/index.js.map +0 -1
  443. package/dist/patterns/section-header/meta.d.ts.map +0 -1
  444. package/dist/patterns/section-header/meta.js.map +0 -1
  445. package/dist/patterns/section-header/types.d.ts +0 -9
  446. package/dist/patterns/section-header/types.d.ts.map +0 -1
  447. package/dist/patterns/section-header/types.js +0 -2
  448. package/dist/patterns/section-header/types.js.map +0 -1
  449. package/dist/patterns/selection/SelectableItem.d.ts.map +0 -1
  450. package/dist/patterns/selection/SelectableItem.js.map +0 -1
  451. package/dist/patterns/selection/SelectionProvider.d.ts.map +0 -1
  452. package/dist/patterns/selection/SelectionProvider.js.map +0 -1
  453. package/dist/patterns/selection/index.d.ts +0 -4
  454. package/dist/patterns/selection/index.d.ts.map +0 -1
  455. package/dist/patterns/selection/index.js +0 -3
  456. package/dist/patterns/selection/index.js.map +0 -1
  457. package/dist/patterns/selection/resolveSelectionNextIds.d.ts.map +0 -1
  458. package/dist/patterns/selection/resolveSelectionNextIds.js.map +0 -1
  459. package/dist/patterns/selection/types.d.ts.map +0 -1
  460. package/dist/patterns/selection/types.js +0 -2
  461. package/dist/patterns/selection/types.js.map +0 -1
  462. package/dist/patterns/switch-field/SwitchField.d.ts +0 -8
  463. package/dist/patterns/switch-field/SwitchField.d.ts.map +0 -1
  464. package/dist/patterns/switch-field/SwitchField.js +0 -13
  465. package/dist/patterns/switch-field/SwitchField.js.map +0 -1
  466. package/dist/patterns/switch-field/index.d.ts +0 -3
  467. package/dist/patterns/switch-field/index.d.ts.map +0 -1
  468. package/dist/patterns/switch-field/index.js +0 -3
  469. package/dist/patterns/switch-field/index.js.map +0 -1
  470. package/dist/patterns/switch-field/meta.d.ts +0 -9
  471. package/dist/patterns/switch-field/meta.d.ts.map +0 -1
  472. package/dist/patterns/switch-field/meta.js +0 -9
  473. package/dist/patterns/switch-field/meta.js.map +0 -1
  474. package/dist/patterns/switch-field/types.d.ts +0 -10
  475. package/dist/patterns/switch-field/types.d.ts.map +0 -1
  476. package/dist/patterns/switch-field/types.js +0 -2
  477. package/dist/patterns/switch-field/types.js.map +0 -1
  478. package/dist/patterns/theme-composer/ThemeComposer.d.ts +0 -9
  479. package/dist/patterns/theme-composer/ThemeComposer.d.ts.map +0 -1
  480. package/dist/patterns/theme-composer/ThemeComposer.js +0 -217
  481. package/dist/patterns/theme-composer/ThemeComposer.js.map +0 -1
  482. package/dist/patterns/theme-composer/index.d.ts +0 -3
  483. package/dist/patterns/theme-composer/index.d.ts.map +0 -1
  484. package/dist/patterns/theme-composer/index.js +0 -2
  485. package/dist/patterns/theme-composer/index.js.map +0 -1
  486. package/dist/patterns/theme-composer/meta.d.ts +0 -9
  487. package/dist/patterns/theme-composer/meta.d.ts.map +0 -1
  488. package/dist/patterns/theme-composer/meta.js +0 -9
  489. package/dist/patterns/theme-composer/meta.js.map +0 -1
  490. package/dist/patterns/theme-composer/types.d.ts +0 -12
  491. package/dist/patterns/theme-composer/types.d.ts.map +0 -1
  492. package/dist/patterns/theme-composer/types.js +0 -2
  493. package/dist/patterns/theme-composer/types.js.map +0 -1
  494. package/dist/patterns/timeline/Timeline.d.ts.map +0 -1
  495. package/dist/patterns/timeline/Timeline.js.map +0 -1
  496. package/dist/patterns/timeline/index.d.ts +0 -3
  497. package/dist/patterns/timeline/index.d.ts.map +0 -1
  498. package/dist/patterns/timeline/index.js +0 -2
  499. package/dist/patterns/timeline/index.js.map +0 -1
  500. package/dist/patterns/timeline/meta.d.ts.map +0 -1
  501. package/dist/patterns/timeline/types.d.ts.map +0 -1
  502. package/dist/patterns/timeline/types.js +0 -2
  503. package/dist/patterns/timeline/types.js.map +0 -1
  504. package/dist/patterns/tree-view/TreeItem.d.ts.map +0 -1
  505. package/dist/patterns/tree-view/TreeItem.js.map +0 -1
  506. package/dist/patterns/tree-view/TreeView.d.ts.map +0 -1
  507. package/dist/patterns/tree-view/TreeView.js.map +0 -1
  508. package/dist/patterns/tree-view/index.d.ts +0 -4
  509. package/dist/patterns/tree-view/index.d.ts.map +0 -1
  510. package/dist/patterns/tree-view/index.js +0 -4
  511. package/dist/patterns/tree-view/index.js.map +0 -1
  512. package/dist/patterns/tree-view/types.d.ts.map +0 -1
  513. package/dist/patterns/tree-view/types.js +0 -2
  514. package/dist/patterns/tree-view/types.js.map +0 -1
  515. package/src/patterns/chat-list-item/index.ts +0 -2
  516. package/src/patterns/chat-list-item/types.ts +0 -33
  517. package/src/patterns/collection-editor/index.ts +0 -2
  518. package/src/patterns/confirm-dialog/ConfirmDialog.tsx +0 -69
  519. package/src/patterns/confirm-dialog/index.ts +0 -2
  520. package/src/patterns/confirm-dialog/meta.ts +0 -10
  521. package/src/patterns/confirm-dialog/types.ts +0 -19
  522. package/src/patterns/filter-bar/FilterBar.tsx +0 -31
  523. package/src/patterns/filter-bar/index.ts +0 -2
  524. package/src/patterns/filter-bar/meta.ts +0 -10
  525. package/src/patterns/filter-bar/types.ts +0 -10
  526. package/src/patterns/inspector-field/InspectorField.tsx +0 -32
  527. package/src/patterns/inspector-field/index.ts +0 -2
  528. package/src/patterns/inspector-field/meta.ts +0 -10
  529. package/src/patterns/inspector-field/types.ts +0 -16
  530. package/src/patterns/message-bubble/index.ts +0 -8
  531. package/src/patterns/notice/Notice.tsx +0 -41
  532. package/src/patterns/notice/index.ts +0 -2
  533. package/src/patterns/notice/meta.ts +0 -36
  534. package/src/patterns/notice/types.ts +0 -12
  535. package/src/patterns/panel/Panel.tsx +0 -26
  536. package/src/patterns/panel/index.ts +0 -2
  537. package/src/patterns/panel/meta.ts +0 -51
  538. package/src/patterns/panel/themeRecipeMeta.ts +0 -32
  539. package/src/patterns/panel/types.ts +0 -17
  540. package/src/patterns/scanner/index.ts +0 -10
  541. package/src/patterns/section-header/index.ts +0 -2
  542. package/src/patterns/section-header/types.ts +0 -10
  543. package/src/patterns/selection/index.ts +0 -10
  544. package/src/patterns/switch-field/SwitchField.tsx +0 -42
  545. package/src/patterns/switch-field/index.ts +0 -2
  546. package/src/patterns/switch-field/meta.ts +0 -10
  547. package/src/patterns/switch-field/types.ts +0 -11
  548. package/src/patterns/theme-composer/ThemeComposer.test.ts +0 -212
  549. package/src/patterns/theme-composer/ThemeComposer.tsx +0 -321
  550. package/src/patterns/theme-composer/index.ts +0 -2
  551. package/src/patterns/theme-composer/meta.ts +0 -10
  552. package/src/patterns/theme-composer/types.ts +0 -13
  553. package/src/patterns/timeline/index.ts +0 -2
  554. package/src/patterns/tree-view/index.ts +0 -3
  555. /package/dist/{patterns → features}/collection-editor/meta.d.ts +0 -0
  556. /package/dist/{patterns → features}/collection-editor/meta.js +0 -0
  557. /package/dist/{patterns → features}/reader/meta.js +0 -0
  558. /package/dist/{patterns/reader → features/reader/utils}/resolveReaderProgress.d.ts +0 -0
  559. /package/dist/{patterns/reader → features/reader/utils}/resolveReaderProgress.js +0 -0
  560. /package/dist/{patterns → features}/scanner/meta.js +0 -0
  561. /package/dist/features/{layout → section}/screenSectionMeta.js +0 -0
  562. /package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectableItem.js +0 -0
  563. /package/dist/{patterns → features}/selection/meta.d.ts +0 -0
  564. /package/dist/{patterns → features}/selection/meta.js +0 -0
  565. /package/dist/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.js +0 -0
  566. /package/dist/{patterns → features}/timeline/meta.d.ts +0 -0
  567. /package/dist/{patterns → features}/timeline/meta.js +0 -0
  568. /package/dist/{patterns → features}/tree-view/meta.d.ts +0 -0
  569. /package/dist/{patterns → features}/tree-view/meta.js +0 -0
  570. /package/src/{patterns/chat-list-item/meta.ts → features/chat/chatListItemMeta.ts} +0 -0
  571. /package/src/{patterns/message-bubble/meta.ts → features/chat/messageBubbleMeta.ts} +0 -0
  572. /package/src/{patterns → features}/collection-editor/meta.ts +0 -0
  573. /package/src/{patterns → features}/reader/meta.ts +0 -0
  574. /package/src/{patterns/reader → features/reader/utils}/resolveReaderProgress.test.ts +0 -0
  575. /package/src/{patterns/reader → features/reader/utils}/resolveReaderProgress.ts +0 -0
  576. /package/src/{patterns → features}/scanner/meta.ts +0 -0
  577. /package/src/features/{layout → section}/screenSectionMeta.ts +0 -0
  578. /package/src/{patterns/section-header/meta.ts → features/section/sectionHeaderMeta.ts} +0 -0
  579. /package/src/{patterns → features}/selection/meta.ts +0 -0
  580. /package/src/{patterns → features}/timeline/meta.ts +0 -0
  581. /package/src/{patterns → features}/tree-view/meta.ts +0 -0
  582. /package/src/{patterns/selection/types.ts → types/selection.ts} +0 -0
@@ -1,3 +0,0 @@
1
- export * from './SwitchField';
2
- export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/switch-field/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './SwitchField';
2
- export * from './types';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/switch-field/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC","sourcesContent":["export * from './SwitchField';\nexport * from './types';\n"]}
@@ -1,9 +0,0 @@
1
- export declare const switchFieldMeta: {
2
- readonly name: "SwitchField";
3
- readonly category: "pattern";
4
- readonly directManifestNode: false;
5
- readonly allowedChildren: readonly [];
6
- readonly note: "Form pattern; not represented as a manifest node in v1.";
7
- readonly props: {};
8
- };
9
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/switch-field/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;CAOU,CAAC"}
@@ -1,9 +0,0 @@
1
- export const switchFieldMeta = {
2
- name: 'SwitchField',
3
- category: 'pattern',
4
- directManifestNode: false,
5
- allowedChildren: [],
6
- note: 'Form pattern; not represented as a manifest node in v1.',
7
- props: {},
8
- };
9
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/switch-field/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,yDAAyD;IAC/D,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const switchFieldMeta = {\n name: 'SwitchField',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Form pattern; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
- export interface SwitchFieldProps extends ZoraBaseProps {
4
- label: ReactNode;
5
- description?: ReactNode;
6
- value: boolean;
7
- onValueChange: (value: boolean) => void;
8
- disabled?: boolean;
9
- }
10
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/switch-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/switch-field/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface SwitchFieldProps extends ZoraBaseProps {\n label: ReactNode;\n description?: ReactNode;\n value: boolean;\n onValueChange: (value: boolean) => void;\n disabled?: boolean;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ThemeComposerProps } from './types';
3
- /***
4
- * UI for composing and applying a theme via structured controls.
5
- *
6
- *
7
- */
8
- export declare const ThemeComposer: (props: ThemeComposerProps) => React.ReactElement | null;
9
- //# sourceMappingURL=ThemeComposer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeComposer.d.ts","sourceRoot":"","sources":["../../../src/patterns/theme-composer/ThemeComposer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA0SlD;;;;GAIG;AACH,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
@@ -1,217 +0,0 @@
1
- import { COLOR_HARMONIES, parseHexColorOrThrow } from '@ankhorage/color-theory';
2
- import { APP_CATEGORIES } from '@ankhorage/contracts';
3
- import React from 'react';
4
- import { Badge } from '../../features/badge/public';
5
- import { Button } from '../../features/button/public';
6
- import { Card } from '../../features/card/public';
7
- import { ChipGroup } from '../../features/chip/public';
8
- import { Select } from '../../features/form/select/public';
9
- import { TextInput } from '../../features/form/text-input/public';
10
- import { View } from '../../features/layout/public';
11
- import { Heading } from '../../features/typography/public';
12
- import { Text } from '../../features/typography/public';
13
- import { useZoraTheme } from '../../theme/useZoraTheme';
14
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
15
- const HEX_ERROR_MESSAGE = 'Enter a valid 6-digit hex color.';
16
- const HEX_INPUT_PLACEHOLDER = 'Enter hex color';
17
- const NAME_ERROR_MESSAGE = 'Theme name cannot be empty.';
18
- function createInputDraft(sourceValue) {
19
- return { inputValue: sourceValue, error: undefined };
20
- }
21
- function isValidHex(value) {
22
- try {
23
- parseHexColorOrThrow(value);
24
- return true;
25
- }
26
- catch {
27
- return false;
28
- }
29
- }
30
- function formatAppCategoryLabel(category) {
31
- return category
32
- .split('_')
33
- .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
34
- .join(' ');
35
- }
36
- const HARMONY_OPTIONS = COLOR_HARMONIES.map((h) => ({ value: h, label: h }));
37
- const MODE_OPTIONS = [
38
- { value: 'light', label: 'Light' },
39
- { value: 'dark', label: 'Dark' },
40
- ];
41
- function ThemeComposerInner({ themeId: _themeId, value, onChange, mode, onModeChange, onSubmit, appCategories, testID, }) {
42
- const { theme } = useZoraTheme();
43
- const [hexDraft, setHexDraft] = React.useState(() => createInputDraft(value.primaryColor));
44
- const [nameDraft, setNameDraft] = React.useState(() => createInputDraft(value.name));
45
- const [previousPrimaryColor, setPreviousPrimaryColor] = React.useState(value.primaryColor);
46
- const [previousName, setPreviousName] = React.useState(value.name);
47
- if (previousPrimaryColor !== value.primaryColor) {
48
- setPreviousPrimaryColor(value.primaryColor);
49
- setHexDraft(createInputDraft(value.primaryColor));
50
- }
51
- if (previousName !== value.name) {
52
- setPreviousName(value.name);
53
- setNameDraft(createInputDraft(value.name));
54
- }
55
- function handleNameChange(text) {
56
- const error = text.trim().length === 0 ? NAME_ERROR_MESSAGE : undefined;
57
- setNameDraft({ inputValue: text, error });
58
- if (!error) {
59
- onChange({ ...value, name: text });
60
- }
61
- }
62
- function handleHexChange(text) {
63
- const normalized = text.startsWith('#') ? text : `#${text}`;
64
- const error = isValidHex(normalized) ? undefined : HEX_ERROR_MESSAGE;
65
- setHexDraft({ inputValue: normalized, error });
66
- if (!error) {
67
- onChange({ ...value, primaryColor: normalized });
68
- }
69
- }
70
- function handleSubmit() {
71
- const hasValidName = nameDraft.inputValue.trim().length > 0;
72
- const hasValidHex = isValidHex(hexDraft.inputValue);
73
- if (!hasValidName) {
74
- setNameDraft((current) => ({ ...current, error: NAME_ERROR_MESSAGE }));
75
- }
76
- if (!hasValidHex) {
77
- setHexDraft((current) => ({ ...current, error: HEX_ERROR_MESSAGE }));
78
- }
79
- if (!hasValidName || !hasValidHex) {
80
- return;
81
- }
82
- onSubmit?.({
83
- ...value,
84
- name: nameDraft.inputValue,
85
- primaryColor: hexDraft.inputValue,
86
- });
87
- }
88
- const activeMode = mode ?? 'light';
89
- const categoryOptions = (appCategories ?? APP_CATEGORIES).map((c) => ({
90
- value: c,
91
- label: formatAppCategoryLabel(c),
92
- }));
93
- return (<View gap="l" testID={testID}>
94
- {/* Section: Theme identity */}
95
- <Card title="Theme identity" description="Name your theme. The ID is assigned automatically and shown for reference.">
96
- <View gap="m">
97
- <View gap="xs">
98
- <Text variant="label">Name</Text>
99
- <TextInput value={nameDraft.inputValue} onChangeText={handleNameChange} placeholder="My theme" autoCorrect={false} invalid={nameDraft.error !== undefined} testID={testID ? `${testID}-name-input` : undefined}/>
100
- {nameDraft.error ? (<Text color="danger" variant="bodySmall">
101
- {nameDraft.error}
102
- </Text>) : null}
103
- </View>
104
- <View gap="xs">
105
- <Text variant="label">ID</Text>
106
- <Text emphasis="muted" variant="bodySmall" testID={testID ? `${testID}-id-display` : undefined}>
107
- {value.id}
108
- </Text>
109
- </View>
110
- </View>
111
- </Card>
112
-
113
- {/* Section: App category */}
114
- <Card title="App category" description="Choose the category that best describes this app.">
115
- <Select value={value.appCategory} options={categoryOptions} onValueChange={(c) => onChange({ ...value, appCategory: c })} testID={testID ? `${testID}-category-select` : undefined}/>
116
- </Card>
117
-
118
- {/* Section: Primary Color */}
119
- <Card title="Primary color" description="Set the seed color for your theme palette.">
120
- <View gap="m">
121
- <View direction="row" gap="m" align="center">
122
- <View flex={1}>
123
- <TextInput value={hexDraft.inputValue} onChangeText={handleHexChange} placeholder={HEX_INPUT_PLACEHOLDER} autoCapitalize="none" autoCorrect={false} maxLength={7} invalid={hexDraft.error !== undefined} testID={testID ? `${testID}-hex-input` : undefined}/>
124
- </View>
125
- {/* Color preview chip */}
126
- <View width={36} height={36} radius="m" style={{
127
- backgroundColor: isValidHex(hexDraft.inputValue)
128
- ? hexDraft.inputValue
129
- : theme.colors.border,
130
- borderWidth: 1,
131
- borderColor: theme.colors.border,
132
- }}/>
133
- </View>
134
- {hexDraft.error ? (<Text color="danger" variant="bodySmall">
135
- {hexDraft.error}
136
- </Text>) : null}
137
- </View>
138
- </Card>
139
-
140
- {/* Section: Harmony */}
141
- <Card title="Harmony" description="Choose how accent hues are generated from your primary color.">
142
- <Select value={value.harmony} options={HARMONY_OPTIONS} onValueChange={(h) => onChange({ ...value, harmony: h })} testID={testID ? `${testID}-harmony-select` : undefined}/>
143
- </Card>
144
-
145
- {/* Section: Mode */}
146
- <Card title="Mode" description="Switch between light and dark presentation.">
147
- <ChipGroup value={activeMode} items={MODE_OPTIONS} onValueChange={(nextMode) => onModeChange?.(nextMode)} testID={testID ? `${testID}-mode` : undefined}/>
148
- </Card>
149
-
150
- {/* Section: Preview */}
151
- <Card title="Preview" description="A quick look at how your theme renders common controls.">
152
- <View gap="m">
153
- <View gap="xs">
154
- <Text variant="label">Name</Text>
155
- <Text>{value.name}</Text>
156
- </View>
157
- <View gap="xs">
158
- <Text variant="label">Category</Text>
159
- <Text>{formatAppCategoryLabel(value.appCategory)}</Text>
160
- </View>
161
- <View gap="xs">
162
- <Text variant="label">Primary color</Text>
163
- <Text emphasis="muted" variant="bodySmall">
164
- {value.primaryColor}
165
- </Text>
166
- </View>
167
- <View gap="xs">
168
- <Text variant="label">Harmony</Text>
169
- <Text emphasis="muted" variant="bodySmall">
170
- {value.harmony}
171
- </Text>
172
- </View>
173
- <Heading level={4}>Heading</Heading>
174
- <Text>Body text — this shows default text color and weight.</Text>
175
- <Text emphasis="muted" variant="bodySmall">
176
- Muted caption text.
177
- </Text>
178
- <View direction="row" gap="s" align="center">
179
- <Button color="primary" variant="solid" size="m">
180
- Primary
181
- </Button>
182
- <Button color="neutral" variant="soft" size="m">
183
- Neutral
184
- </Button>
185
- <Button color="danger" variant="ghost" size="m">
186
- Danger
187
- </Button>
188
- </View>
189
- <View direction="row" gap="s" align="center">
190
- <Badge color="primary">Primary</Badge>
191
- <Badge color="success" variant="soft">
192
- Success
193
- </Badge>
194
- <Badge color="warning" variant="soft">
195
- Warning
196
- </Badge>
197
- <Badge color="danger" variant="soft">
198
- Danger
199
- </Badge>
200
- </View>
201
- <Card tone="subtle" title="Nested card" description="Subtle tone inside the preview." compact/>
202
- </View>
203
- </Card>
204
-
205
- {/* Submit */}
206
- {onSubmit ? (<Button color="primary" variant="solid" onPress={handleSubmit} testID={testID ? `${testID}-submit` : undefined}>
207
- Apply theme
208
- </Button>) : null}
209
- </View>);
210
- }
211
- /***
212
- * UI for composing and applying a theme via structured controls.
213
- *
214
- *
215
- */
216
- export const ThemeComposer = withZoraThemeScope(ThemeComposerInner);
217
- //# sourceMappingURL=ThemeComposer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeComposer.js","sourceRoot":"","sources":["../../../src/patterns/theme-composer/ThemeComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,MAAM,iBAAiB,GAAG,kCAAkC,C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A,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAC1C;YAAA,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CACrC;YAAA,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CACnC;;YACF,EAAE,KAAK,CACP;YAAA,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CACnC;;YACF,EAAE,KAAK,CACP;YAAA,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAClC;;YACF,EAAE,KAAK,CACT;UAAA,EAAE,IAAI,CACN;UAAA,CAAC,IAAI,CACH,IAAI,CAAC,QAAQ,CACb,KAAK,CAAC,aAAa,CACnB,WAAW,CAAC,iCAAiC,CAC7C,OAAO,EAEX;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CAEN;;MAAA,CAAC,YAAY,CACb;MAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,MAAM,CACL,KAAK,CAAC,SAAS,CACf,OAAO,CAAC,OAAO,CACf,OAAO,CAAC,CAAC,YAAY,CAAC,CACtB,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAEhD;;QACF,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { COLOR_HARMONIES, parseHexColorOrThrow } from '@ankhorage/color-theory';\nimport type { AppCategory } from '@ankhorage/contracts';\nimport { APP_CATEGORIES } from '@ankhorage/contracts';\nimport React from 'react';\n\nimport { Badge } from '../../features/badge/public';\nimport { Button } from '../../features/button/public';\nimport { Card } from '../../features/card/public';\nimport { ChipGroup } from '../../features/chip/public';\nimport { Select } from '../../features/form/select/public';\nimport { TextInput } from '../../features/form/text-input/public';\nimport { View } from '../../features/layout/public';\nimport { Heading } from '../../features/typography/public';\nimport { Text } from '../../features/typography/public';\nimport type { ZoraThemeMode } from '../../theme/types';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ThemeComposerProps } from './types';\n\nconst HEX_ERROR_MESSAGE = 'Enter a valid 6-digit hex color.';\nconst HEX_INPUT_PLACEHOLDER = 'Enter hex color';\nconst NAME_ERROR_MESSAGE = 'Theme name cannot be empty.';\n\ninterface InputDraft {\n inputValue: string;\n error: string | undefined;\n}\n\nfunction createInputDraft(sourceValue: string): InputDraft {\n return { inputValue: sourceValue, error: undefined };\n}\n\nfunction isValidHex(value: string): boolean {\n try {\n parseHexColorOrThrow(value);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction formatAppCategoryLabel(category: AppCategory): string {\n return category\n .split('_')\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(' ');\n}\n\nconst HARMONY_OPTIONS = COLOR_HARMONIES.map((h) => ({ value: h, label: h }));\n\nconst MODE_OPTIONS = [\n { value: 'light' as ZoraThemeMode, label: 'Light' },\n { value: 'dark' as ZoraThemeMode, label: 'Dark' },\n];\n\nfunction ThemeComposerInner({\n themeId: _themeId,\n value,\n onChange,\n mode,\n onModeChange,\n onSubmit,\n appCategories,\n testID,\n}: ThemeComposerProps) {\n const { theme } = useZoraTheme();\n\n const [hexDraft, setHexDraft] = React.useState<InputDraft>(() =>\n createInputDraft(value.primaryColor),\n );\n const [nameDraft, setNameDraft] = React.useState<InputDraft>(() => createInputDraft(value.name));\n const [previousPrimaryColor, setPreviousPrimaryColor] = React.useState(value.primaryColor);\n const [previousName, setPreviousName] = React.useState(value.name);\n\n if (previousPrimaryColor !== value.primaryColor) {\n setPreviousPrimaryColor(value.primaryColor);\n setHexDraft(createInputDraft(value.primaryColor));\n }\n\n if (previousName !== value.name) {\n setPreviousName(value.name);\n setNameDraft(createInputDraft(value.name));\n }\n\n function handleNameChange(text: string) {\n const error = text.trim().length === 0 ? NAME_ERROR_MESSAGE : undefined;\n setNameDraft({ inputValue: text, error });\n\n if (!error) {\n onChange({ ...value, name: text });\n }\n }\n\n function handleHexChange(text: string) {\n const normalized = text.startsWith('#') ? text : `#${text}`;\n const error = isValidHex(normalized) ? undefined : HEX_ERROR_MESSAGE;\n setHexDraft({ inputValue: normalized, error });\n\n if (!error) {\n onChange({ ...value, primaryColor: normalized });\n }\n }\n\n function handleSubmit() {\n const hasValidName = nameDraft.inputValue.trim().length > 0;\n const hasValidHex = isValidHex(hexDraft.inputValue);\n\n if (!hasValidName) {\n setNameDraft((current) => ({ ...current, error: NAME_ERROR_MESSAGE }));\n }\n\n if (!hasValidHex) {\n setHexDraft((current) => ({ ...current, error: HEX_ERROR_MESSAGE }));\n }\n\n if (!hasValidName || !hasValidHex) {\n return;\n }\n\n onSubmit?.({\n ...value,\n name: nameDraft.inputValue,\n primaryColor: hexDraft.inputValue,\n });\n }\n\n const activeMode = mode ?? 'light';\n const categoryOptions = (appCategories ?? APP_CATEGORIES).map((c) => ({\n value: c,\n label: formatAppCategoryLabel(c),\n }));\n\n return (\n <View gap=\"l\" testID={testID}>\n {/* Section: Theme identity */}\n <Card\n title=\"Theme identity\"\n description=\"Name your theme. The ID is assigned automatically and shown for reference.\"\n >\n <View gap=\"m\">\n <View gap=\"xs\">\n <Text variant=\"label\">Name</Text>\n <TextInput\n value={nameDraft.inputValue}\n onChangeText={handleNameChange}\n placeholder=\"My theme\"\n autoCorrect={false}\n invalid={nameDraft.error !== undefined}\n testID={testID ? `${testID}-name-input` : undefined}\n />\n {nameDraft.error ? (\n <Text color=\"danger\" variant=\"bodySmall\">\n {nameDraft.error}\n </Text>\n ) : null}\n </View>\n <View gap=\"xs\">\n <Text variant=\"label\">ID</Text>\n <Text\n emphasis=\"muted\"\n variant=\"bodySmall\"\n testID={testID ? `${testID}-id-display` : undefined}\n >\n {value.id}\n </Text>\n </View>\n </View>\n </Card>\n\n {/* Section: App category */}\n <Card title=\"App category\" description=\"Choose the category that best describes this app.\">\n <Select\n value={value.appCategory}\n options={categoryOptions}\n onValueChange={(c) => onChange({ ...value, appCategory: c })}\n testID={testID ? `${testID}-category-select` : undefined}\n />\n </Card>\n\n {/* Section: Primary Color */}\n <Card title=\"Primary color\" description=\"Set the seed color for your theme palette.\">\n <View gap=\"m\">\n <View direction=\"row\" gap=\"m\" align=\"center\">\n <View flex={1}>\n <TextInput\n value={hexDraft.inputValue}\n onChangeText={handleHexChange}\n placeholder={HEX_INPUT_PLACEHOLDER}\n autoCapitalize=\"none\"\n autoCorrect={false}\n maxLength={7}\n invalid={hexDraft.error !== undefined}\n testID={testID ? `${testID}-hex-input` : undefined}\n />\n </View>\n {/* Color preview chip */}\n <View\n width={36}\n height={36}\n radius=\"m\"\n style={{\n backgroundColor: isValidHex(hexDraft.inputValue)\n ? hexDraft.inputValue\n : theme.colors.border,\n borderWidth: 1,\n borderColor: theme.colors.border,\n }}\n />\n </View>\n {hexDraft.error ? (\n <Text color=\"danger\" variant=\"bodySmall\">\n {hexDraft.error}\n </Text>\n ) : null}\n </View>\n </Card>\n\n {/* Section: Harmony */}\n <Card\n title=\"Harmony\"\n description=\"Choose how accent hues are generated from your primary color.\"\n >\n <Select\n value={value.harmony}\n options={HARMONY_OPTIONS}\n onValueChange={(h) => onChange({ ...value, harmony: h })}\n testID={testID ? `${testID}-harmony-select` : undefined}\n />\n </Card>\n\n {/* Section: Mode */}\n <Card title=\"Mode\" description=\"Switch between light and dark presentation.\">\n <ChipGroup\n value={activeMode}\n items={MODE_OPTIONS}\n onValueChange={(nextMode) => onModeChange?.(nextMode)}\n testID={testID ? `${testID}-mode` : undefined}\n />\n </Card>\n\n {/* Section: Preview */}\n <Card title=\"Preview\" description=\"A quick look at how your theme renders common controls.\">\n <View gap=\"m\">\n <View gap=\"xs\">\n <Text variant=\"label\">Name</Text>\n <Text>{value.name}</Text>\n </View>\n <View gap=\"xs\">\n <Text variant=\"label\">Category</Text>\n <Text>{formatAppCategoryLabel(value.appCategory)}</Text>\n </View>\n <View gap=\"xs\">\n <Text variant=\"label\">Primary color</Text>\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {value.primaryColor}\n </Text>\n </View>\n <View gap=\"xs\">\n <Text variant=\"label\">Harmony</Text>\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {value.harmony}\n </Text>\n </View>\n <Heading level={4}>Heading</Heading>\n <Text>Body text — this shows default text color and weight.</Text>\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n Muted caption text.\n </Text>\n <View direction=\"row\" gap=\"s\" align=\"center\">\n <Button color=\"primary\" variant=\"solid\" size=\"m\">\n Primary\n </Button>\n <Button color=\"neutral\" variant=\"soft\" size=\"m\">\n Neutral\n </Button>\n <Button color=\"danger\" variant=\"ghost\" size=\"m\">\n Danger\n </Button>\n </View>\n <View direction=\"row\" gap=\"s\" align=\"center\">\n <Badge color=\"primary\">Primary</Badge>\n <Badge color=\"success\" variant=\"soft\">\n Success\n </Badge>\n <Badge color=\"warning\" variant=\"soft\">\n Warning\n </Badge>\n <Badge color=\"danger\" variant=\"soft\">\n Danger\n </Badge>\n </View>\n <Card\n tone=\"subtle\"\n title=\"Nested card\"\n description=\"Subtle tone inside the preview.\"\n compact\n />\n </View>\n </Card>\n\n {/* Submit */}\n {onSubmit ? (\n <Button\n color=\"primary\"\n variant=\"solid\"\n onPress={handleSubmit}\n testID={testID ? `${testID}-submit` : undefined}\n >\n Apply theme\n </Button>\n ) : null}\n </View>\n );\n}\n\n/***\n * UI for composing and applying a theme via structured controls.\n *\n *\n */\nexport const ThemeComposer = withZoraThemeScope(ThemeComposerInner);\n"]}
@@ -1,3 +0,0 @@
1
- export { ThemeComposer } from './ThemeComposer';
2
- export type { ThemeComposerProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/theme-composer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ThemeComposer } from './ThemeComposer';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/theme-composer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { ThemeComposer } from './ThemeComposer';\nexport type { ThemeComposerProps } from './types';\n"]}
@@ -1,9 +0,0 @@
1
- export declare const themeComposerMeta: {
2
- readonly name: "ThemeComposer";
3
- readonly category: "pattern";
4
- readonly directManifestNode: false;
5
- readonly allowedChildren: readonly [];
6
- readonly note: "Theme tooling pattern; not represented as a manifest node in v1.";
7
- readonly props: {};
8
- };
9
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/theme-composer/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;CAOQ,CAAC"}
@@ -1,9 +0,0 @@
1
- export const themeComposerMeta = {
2
- name: 'ThemeComposer',
3
- category: 'pattern',
4
- directManifestNode: false,
5
- allowedChildren: [],
6
- note: 'Theme tooling pattern; not represented as a manifest node in v1.',
7
- props: {},
8
- };
9
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/theme-composer/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,kEAAkE;IACxE,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const themeComposerMeta = {\n name: 'ThemeComposer',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Theme tooling pattern; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,12 +0,0 @@
1
- import type { AppCategory } from '@ankhorage/contracts';
2
- import type { ZoraTheme, ZoraThemeMode } from '../../theme/types';
3
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
- export interface ThemeComposerProps extends ZoraBaseProps {
5
- value: ZoraTheme;
6
- onChange: (theme: ZoraTheme) => void;
7
- mode?: ZoraThemeMode;
8
- onModeChange?: (mode: ZoraThemeMode) => void;
9
- onSubmit?: (theme: ZoraTheme) => void;
10
- appCategories?: readonly AppCategory[];
11
- }
12
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/theme-composer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CACxC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/theme-composer/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppCategory } from '@ankhorage/contracts';\n\nimport type { ZoraTheme, ZoraThemeMode } from '../../theme/types';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ThemeComposerProps extends ZoraBaseProps {\n value: ZoraTheme;\n onChange: (theme: ZoraTheme) => void;\n mode?: ZoraThemeMode;\n onModeChange?: (mode: ZoraThemeMode) => void;\n onSubmit?: (theme: ZoraTheme) => void;\n appCategories?: readonly AppCategory[];\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../src/patterns/timeline/Timeline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,SAAS,CAAC;AA8G3D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../../../src/patterns/timeline/Timeline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE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A,CAAC,IAAI,CAAC,IAAI,CACZ;cAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,IAAI,CACN;UAAA,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAClB,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;cAAA,CAAC,IAAI,CAAC,WAAW,CACnB;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CAAC,CACR,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC7B;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CACxB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Icon } from '../../features/icon/public';\nimport { View } from '../../features/layout/public';\nimport { Heading } from '../../features/typography/public';\nimport { Text } from '../../features/typography/public';\nimport type { ZoraColor } from '../../internal/recipes';\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { TimelineItem, TimelineProps } from './types';\n\nfunction resolveRoleSemantics(theme: SurfaceTheme, color: ZoraColor): RoleSemantics {\n switch (color) {\n case 'secondary':\n return theme.semantics.secondary;\n case 'tertiary':\n return theme.semantics.accent;\n case 'quaternary':\n return theme.semantics.highlight;\n case 'error':\n return theme.semantics.error;\n case 'info':\n return theme.semantics.info;\n case 'primary':\n return theme.semantics.action.primary;\n case 'danger':\n return theme.semantics.action.danger;\n case 'success':\n return theme.semantics.success;\n case 'warning':\n return theme.semantics.warning;\n case 'neutral':\n default:\n return theme.semantics.action.neutral;\n }\n}\n\nfunction TimelineInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n testID,\n items,\n compact = false,\n}: TimelineProps) {\n const { theme } = useZoraTheme();\n const gap = compact ? 'm' : 'l';\n const connectorHeight = compact ? 20 : 36;\n\n const renderItem = (item: TimelineItem, index: number) => {\n const status = item.status ?? 'neutral';\n const role = resolveRoleSemantics(theme, status);\n const showConnector = index < items.length - 1;\n const iconSize = Math.max(12, resolveIconSize('s'));\n\n return (\n <View\n direction=\"row\"\n key={item.id}\n align=\"flex-start\"\n gap=\"m\"\n testID={item.testID}\n wrap=\"nowrap\"\n >\n <View align=\"center\" flexShrink={0} gap=\"xs\" style={{ width: 24 }}>\n <View\n bg={status === 'neutral' ? theme.semantics.neutral.surface : role.softBg}\n borderColor={status === 'neutral' ? theme.semantics.neutral.divider : role.base}\n borderWidth={1}\n height={20}\n radius=\"full\"\n width={20}\n style={{ alignItems: 'center', justifyContent: 'center' }}\n >\n {item.icon ? (\n <Icon\n {...item.icon}\n color={status === 'neutral' ? theme.semantics.content.muted : role.base}\n size={iconSize}\n />\n ) : null}\n </View>\n\n {showConnector ? (\n <View\n bg={theme.semantics.neutral.divider}\n height={connectorHeight}\n radius=\"full\"\n style={{ width: 2 }}\n />\n ) : null}\n </View>\n\n <View flex={1} gap=\"xs\" testID={testID}>\n <View direction=\"row\" align=\"flex-start\" gap=\"s\" justify=\"space-between\" wrap=\"wrap\">\n <Heading level={compact ? 4 : 3}>{item.title}</Heading>\n {item.meta ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n {item.meta}\n </Text>\n ) : null}\n </View>\n {item.description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {item.description}\n </Text>\n ) : null}\n </View>\n </View>\n );\n };\n\n return (\n <View gap={gap} testID={testID}>\n {items.map(renderItem)}\n </View>\n );\n}\n\n/***\n * Timeline pattern for displaying a sequence of events.\n *\n \n */\nexport const Timeline = withZoraThemeScope(TimelineInner);\n"]}
@@ -1,3 +0,0 @@
1
- export { Timeline } from './Timeline';
2
- export type { TimelineItem, TimelineProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { Timeline } from './Timeline';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { Timeline } from './Timeline';\nexport type { TimelineItem, TimelineProps } from './types';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/timeline/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;CAOa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/timeline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/timeline/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraColor } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface TimelineItem {\n id: string;\n title: React.ReactNode;\n description?: React.ReactNode;\n meta?: React.ReactNode;\n status?: ZoraColor;\n icon?: ButtonIconSpec;\n testID?: string;\n}\n\nexport interface TimelineProps extends ZoraBaseProps {\n items: readonly TimelineItem[];\n compact?: boolean;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TreeItem.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/TreeItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEjE,UAAU,aAAa,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IACxE,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,GA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AAC,WAAW,IAAI,UAAU,CAAC,CAAC,CAAC,CAC3B,CAAC,IAAI,CACH;UAAA,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC7B,CAAC,QAAQ,CACP,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,CAAC,CAAC,KAAK,CAAC,CACZ,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC,CACJ;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { IconButton } from '../../features/button/public';\nimport { View } from '../../features/layout/public';\nimport { ListItem } from '../../features/list/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { TreeItemNode, TreeItemRenderProps } from './types';\n\ninterface TreeItemProps<TId extends string = string> extends ZoraBaseProps {\n node: TreeItemNode<TId>;\n depth: number;\n selectedId?: TId;\n expandedIds: readonly TId[];\n onSelect?: (id: TId) => void;\n onToggleExpand: (id: TId) => void;\n renderItem?: (props: TreeItemRenderProps<TId>) => React.ReactNode;\n}\n\nfunction TreeItemInner<TId extends string = string>({\n themeId: _themeId,\n mode: _mode,\n node,\n depth,\n selectedId,\n expandedIds,\n onSelect,\n onToggleExpand,\n renderItem,\n testID,\n interactionPolicy,\n}: TreeItemProps<TId>) {\n const hasChildren = node.children !== undefined && node.children.length > 0;\n const isExpanded = expandedIds.includes(node.id);\n const isSelected = selectedId === node.id;\n\n const renderContent = () => {\n if (renderItem) {\n return renderItem({\n node,\n depth,\n selected: isSelected,\n expanded: isExpanded,\n hasChildren,\n });\n }\n\n return (\n <ListItem\n title={node.label}\n action={\n <View direction=\"row\" gap=\"xs\" align=\"center\">\n {node.actions}\n {hasChildren ? (\n <IconButton\n icon={{ name: isExpanded ? 'chevron-down-outline' : 'chevron-forward-outline' }}\n interactionPolicy={interactionPolicy}\n label={isExpanded ? 'Collapse' : 'Expand'}\n onPress={() => onToggleExpand(node.id)}\n size=\"s\"\n variant=\"ghost\"\n />\n ) : null}\n </View>\n }\n meta={node.meta}\n disabled={node.disabled}\n selected={isSelected}\n />\n );\n };\n\n return (\n <View testID={testID}>\n <View style={{ paddingLeft: depth * 16 }}>{renderContent()}</View>\n {hasChildren && isExpanded ? (\n <View>\n {node.children?.map((child) => (\n <TreeItem\n key={child.id}\n depth={depth + 1}\n expandedIds={expandedIds}\n interactionPolicy={interactionPolicy}\n node={child}\n onSelect={onSelect}\n onToggleExpand={onToggleExpand}\n renderItem={renderItem}\n selectedId={selectedId}\n />\n ))}\n </View>\n ) : null}\n </View>\n );\n}\n\n/***\n * Single tree node row used within `TreeView`.\n *\n \n */\nexport const TreeItem = withZoraThemeScope(TreeItemInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAoD7C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAvDE,GAAG,SAAS,MAAM,kEAuDgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TreeView.js","sourceRoot":"","sources":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CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC9B;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,CAAC,QAAQ,CACP,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CACb,KAAK,CAAC,CAAC,CAAC,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,cAAc,CAAC,CAAC,kBAAkB,CAAC,CACnC,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,EACrC,CACH,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { TreeItem } from './TreeItem';\nimport type { TreeViewProps } from './types';\n\nfunction TreeViewInner<TId extends string = string>({\n themeId: _themeId,\n mode: _mode,\n nodes,\n selectedId,\n expandedIds: controlledExpandedIds,\n defaultExpandedIds,\n onSelect,\n onExpandedChange,\n renderItem,\n testID,\n interactionPolicy,\n}: TreeViewProps<TId>) {\n const [internalExpandedIds, setInternalExpandedIds] = React.useState<readonly TId[]>(\n defaultExpandedIds ?? [],\n );\n\n const isControlled = controlledExpandedIds !== undefined;\n const expandedIds = isControlled ? controlledExpandedIds : internalExpandedIds;\n\n const handleToggleExpand = (id: TId) => {\n if (interactionPolicy === 'passive') return;\n const isExpanded = expandedIds.includes(id);\n const newIds = isExpanded ? expandedIds.filter((eid) => eid !== id) : [...expandedIds, id];\n\n if (!isControlled) {\n setInternalExpandedIds(newIds);\n }\n onExpandedChange?.(newIds);\n };\n\n return (\n <View gap=\"none\" testID={testID}>\n {nodes.map((node) => (\n <TreeItem\n key={node.id}\n depth={0}\n expandedIds={expandedIds}\n node={node}\n onSelect={onSelect}\n onToggleExpand={handleToggleExpand}\n renderItem={renderItem}\n selectedId={selectedId}\n interactionPolicy={interactionPolicy}\n />\n ))}\n </View>\n );\n}\n\n/***\n * Tree view pattern for hierarchical navigation and expandable lists.\n *\n \n */\nexport const TreeView = withZoraThemeScope(TreeViewInner);\n"]}
@@ -1,4 +0,0 @@
1
- export * from './TreeItem';
2
- export * from './TreeView';
3
- export * from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './TreeItem';
2
- export * from './TreeView';
3
- export * from './types';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/tree-view/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './TreeItem';\nexport * from './TreeView';\nexport * from './types';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,YAAY,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IACvD,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IAC9D,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IAC/E,KAAK,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACpC,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,EAAE,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;CAC7D"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/tree-view/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { ReactNode } from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface TreeItemNode<TId extends string = string> {\n id: TId;\n label: ReactNode;\n icon?: ButtonIconSpec;\n children?: readonly TreeItemNode<TId>[];\n disabled?: boolean;\n meta?: ReactNode;\n actions?: ReactNode;\n}\n\nexport interface TreeItemRenderProps<TId extends string = string> {\n node: TreeItemNode<TId>;\n depth: number;\n selected: boolean;\n expanded: boolean;\n hasChildren: boolean;\n}\n\nexport interface TreeViewProps<TId extends string = string> extends ZoraBaseProps {\n nodes: readonly TreeItemNode<TId>[];\n selectedId?: TId;\n expandedIds?: readonly TId[];\n defaultExpandedIds?: readonly TId[];\n onSelect?: (id: TId) => void;\n onExpandedChange?: (ids: readonly TId[]) => void;\n renderItem?: (props: TreeItemRenderProps<TId>) => ReactNode;\n}\n"]}
@@ -1,2 +0,0 @@
1
- export { ChatListItem } from './ChatListItem';
2
- export type { ChatListAvatar, ChatListItemProps } from './types';
@@ -1,33 +0,0 @@
1
- import type React from 'react';
2
- import type { ImageSourcePropType } from 'react-native';
3
-
4
- import type { AvatarShape, AvatarSize } from '../../features/avatar/public';
5
- import type { ZoraColor } from '../../internal/recipes';
6
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
7
-
8
- export interface ChatListAvatar {
9
- source?: ImageSourcePropType;
10
- name?: string;
11
- initials?: string;
12
- label?: string;
13
- size?: AvatarSize;
14
- shape?: AvatarShape;
15
- color?: ZoraColor;
16
- }
17
-
18
- export interface ChatListItemProps extends ZoraBaseProps {
19
- title: React.ReactNode;
20
- preview?: React.ReactNode;
21
- meta?: React.ReactNode;
22
- timestamp?: React.ReactNode;
23
- avatar?: ChatListAvatar;
24
- leading?: React.ReactNode;
25
- trailing?: React.ReactNode;
26
- unread?: boolean;
27
- unreadCount?: React.ReactNode;
28
- selected?: boolean;
29
- disabled?: boolean;
30
- compact?: boolean;
31
- accessibilityLabel?: string;
32
- onPress?: () => void;
33
- }
@@ -1,2 +0,0 @@
1
- export * from './CollectionEditor';
2
- export * from './types';