@ezpg/app-ui 0.21.0 → 0.23.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 (486) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/lib/module/adjust/adjust-template.js +1 -0
  3. package/lib/module/adjust/adjust-template.js.map +1 -1
  4. package/lib/module/adjust/axis-adjust.js +181 -0
  5. package/lib/module/adjust/axis-adjust.js.map +1 -0
  6. package/lib/module/adjust/axis-dial.js +2 -2
  7. package/lib/module/adjust/axis-dial.js.map +1 -1
  8. package/lib/module/adjust/axis-tabs.js +81 -0
  9. package/lib/module/adjust/axis-tabs.js.map +1 -0
  10. package/lib/module/adjust/axis-wheel.js +286 -0
  11. package/lib/module/adjust/axis-wheel.js.map +1 -0
  12. package/lib/module/adjust/dial-strip.js +6 -4
  13. package/lib/module/adjust/dial-strip.js.map +1 -1
  14. package/lib/module/adjust/index.js +4 -0
  15. package/lib/module/adjust/index.js.map +1 -1
  16. package/lib/module/adjust/store-sample.js +436 -0
  17. package/lib/module/adjust/store-sample.js.map +1 -0
  18. package/lib/module/blocks/chat-message/chat-message.js +1 -0
  19. package/lib/module/blocks/chat-message/chat-message.js.map +1 -1
  20. package/lib/module/blocks/choice-art/choice-art.js +2 -0
  21. package/lib/module/blocks/choice-art/choice-art.js.map +1 -1
  22. package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
  23. package/lib/module/blocks/color-tune/store-sample.js +13 -6
  24. package/lib/module/blocks/color-tune/store-sample.js.map +1 -1
  25. package/lib/module/blocks/color-tune/swatch-card.js +1 -1
  26. package/lib/module/blocks/color-tune/swatch-card.js.map +1 -1
  27. package/lib/module/blocks/detail-editor/compare-slider.js +6 -2
  28. package/lib/module/blocks/detail-editor/compare-slider.js.map +1 -1
  29. package/lib/module/blocks/detail-editor/detail-canvas.js +195 -61
  30. package/lib/module/blocks/detail-editor/detail-canvas.js.map +1 -1
  31. package/lib/module/blocks/detail-editor/detail-types.js +57 -0
  32. package/lib/module/blocks/detail-editor/detail-types.js.map +1 -1
  33. package/lib/module/blocks/detail-editor/draft-preview.js +22 -0
  34. package/lib/module/blocks/detail-editor/draft-preview.js.map +1 -1
  35. package/lib/module/blocks/detail-editor/focus-context.js +1 -0
  36. package/lib/module/blocks/detail-editor/focus-context.js.map +1 -1
  37. package/lib/module/blocks/detail-editor/index.js +2 -2
  38. package/lib/module/blocks/detail-editor/index.js.map +1 -1
  39. package/lib/module/blocks/detail-editor/keep-words.js +34 -0
  40. package/lib/module/blocks/detail-editor/keep-words.js.map +1 -0
  41. package/lib/module/blocks/detail-editor/layout-picker.js +195 -8
  42. package/lib/module/blocks/detail-editor/layout-picker.js.map +1 -1
  43. package/lib/module/blocks/detail-request/detail-request.js +213 -0
  44. package/lib/module/blocks/detail-request/detail-request.js.map +1 -0
  45. package/lib/module/blocks/detail-request/index.js +4 -0
  46. package/lib/module/blocks/detail-request/index.js.map +1 -0
  47. package/lib/module/blocks/detail-studio/action-chips.js +73 -0
  48. package/lib/module/blocks/detail-studio/action-chips.js.map +1 -0
  49. package/lib/module/blocks/detail-studio/adjust-tiles.js +4 -3
  50. package/lib/module/blocks/detail-studio/adjust-tiles.js.map +1 -1
  51. package/lib/module/blocks/detail-studio/asset-grid.js +33 -16
  52. package/lib/module/blocks/detail-studio/asset-grid.js.map +1 -1
  53. package/lib/module/blocks/detail-studio/confirm-row.js +3 -0
  54. package/lib/module/blocks/detail-studio/confirm-row.js.map +1 -1
  55. package/lib/module/blocks/detail-studio/detail-studio-template.js +2 -6
  56. package/lib/module/blocks/detail-studio/detail-studio-template.js.map +1 -1
  57. package/lib/module/blocks/detail-studio/edge-fade.js +74 -0
  58. package/lib/module/blocks/detail-studio/edge-fade.js.map +1 -0
  59. package/lib/module/blocks/detail-studio/image-prompt.js +9 -10
  60. package/lib/module/blocks/detail-studio/image-prompt.js.map +1 -1
  61. package/lib/module/blocks/detail-studio/index.js +7 -5
  62. package/lib/module/blocks/detail-studio/index.js.map +1 -1
  63. package/lib/module/blocks/detail-studio/rewrite-tray.js +17 -64
  64. package/lib/module/blocks/detail-studio/rewrite-tray.js.map +1 -1
  65. package/lib/module/blocks/detail-studio/section-cover.js +41 -0
  66. package/lib/module/blocks/detail-studio/section-cover.js.map +1 -0
  67. package/lib/module/blocks/detail-studio/section-edit-template.js +103 -12
  68. package/lib/module/blocks/detail-studio/section-edit-template.js.map +1 -1
  69. package/lib/module/blocks/detail-studio/section-kind-grid.js +4 -3
  70. package/lib/module/blocks/detail-studio/section-kind-grid.js.map +1 -1
  71. package/lib/module/blocks/detail-studio/section-settings.js +127 -61
  72. package/lib/module/blocks/detail-studio/section-settings.js.map +1 -1
  73. package/lib/module/blocks/detail-studio/studio-bar.js +46 -25
  74. package/lib/module/blocks/detail-studio/studio-bar.js.map +1 -1
  75. package/lib/module/blocks/detail-studio/studio-dock.js +21 -39
  76. package/lib/module/blocks/detail-studio/studio-dock.js.map +1 -1
  77. package/lib/module/blocks/detail-studio/studio-glyphs.js +92 -0
  78. package/lib/module/blocks/detail-studio/studio-glyphs.js.map +1 -0
  79. package/lib/module/blocks/detail-studio/studio-sheet.js +5 -3
  80. package/lib/module/blocks/detail-studio/studio-sheet.js.map +1 -1
  81. package/lib/module/blocks/detail-studio/studio-steps.js +60 -0
  82. package/lib/module/blocks/detail-studio/studio-steps.js.map +1 -0
  83. package/lib/module/blocks/detail-studio/studio-toggle.js +130 -0
  84. package/lib/module/blocks/detail-studio/studio-toggle.js.map +1 -0
  85. package/lib/module/blocks/detail-studio/{photo-tool-bar.js → studio-tools.js} +63 -42
  86. package/lib/module/blocks/detail-studio/studio-tools.js.map +1 -0
  87. package/lib/module/blocks/detail-studio/text-format-panel.js +20 -8
  88. package/lib/module/blocks/detail-studio/text-format-panel.js.map +1 -1
  89. package/lib/module/blocks/draft-box/draft-box.js +3 -0
  90. package/lib/module/blocks/draft-box/draft-box.js.map +1 -1
  91. package/lib/module/blocks/index.js +1 -0
  92. package/lib/module/blocks/index.js.map +1 -1
  93. package/lib/module/blocks/oauth-buttons/oauth-buttons.js +1 -0
  94. package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
  95. package/lib/module/blocks/order-block/order-block.js +19 -5
  96. package/lib/module/blocks/order-block/order-block.js.map +1 -1
  97. package/lib/module/blocks/product-tile/product-tile.js +4 -1
  98. package/lib/module/blocks/product-tile/product-tile.js.map +1 -1
  99. package/lib/module/blocks/question-accordion/question-accordion.js +1 -2
  100. package/lib/module/blocks/question-accordion/question-accordion.js.map +1 -1
  101. package/lib/module/blocks/question-pager/question-pager.js +2 -1
  102. package/lib/module/blocks/question-pager/question-pager.js.map +1 -1
  103. package/lib/module/blocks/review-card/review-card.js +4 -0
  104. package/lib/module/blocks/review-card/review-card.js.map +1 -1
  105. package/lib/module/blocks/send-bar/send-bar.js +1 -0
  106. package/lib/module/blocks/send-bar/send-bar.js.map +1 -1
  107. package/lib/module/blocks/stage-bar/stage-bar.js +3 -2
  108. package/lib/module/blocks/stage-bar/stage-bar.js.map +1 -1
  109. package/lib/module/blocks/stat-card/stat-card.js +4 -1
  110. package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
  111. package/lib/module/blocks/step-screen/step-screen.js +5 -2
  112. package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
  113. package/lib/module/blocks/store-top/store-top.js +8 -3
  114. package/lib/module/blocks/store-top/store-top.js.map +1 -1
  115. package/lib/module/blocks/summary-cards/summary-cards.js +10 -3
  116. package/lib/module/blocks/summary-cards/summary-cards.js.map +1 -1
  117. package/lib/module/blocks/task-tiles/task-tiles.js +3 -2
  118. package/lib/module/blocks/task-tiles/task-tiles.js.map +1 -1
  119. package/lib/module/components/amount-summary/amount-summary.js +7 -1
  120. package/lib/module/components/amount-summary/amount-summary.js.map +1 -1
  121. package/lib/module/components/button/button.js +19 -5
  122. package/lib/module/components/button/button.js.map +1 -1
  123. package/lib/module/components/calendar/calendar.js +7 -4
  124. package/lib/module/components/calendar/calendar.js.map +1 -1
  125. package/lib/module/components/chip/chip.js +7 -3
  126. package/lib/module/components/chip/chip.js.map +1 -1
  127. package/lib/module/components/chip-group/chip-group.js +1 -0
  128. package/lib/module/components/chip-group/chip-group.js.map +1 -1
  129. package/lib/module/components/circle-grid/circle-grid.js +1 -0
  130. package/lib/module/components/circle-grid/circle-grid.js.map +1 -1
  131. package/lib/module/components/credit/credit.js +8 -4
  132. package/lib/module/components/credit/credit.js.map +1 -1
  133. package/lib/module/components/dialog/dialog.js +2 -0
  134. package/lib/module/components/dialog/dialog.js.map +1 -1
  135. package/lib/module/components/dropdown-menu/dropdown-menu.js +9 -4
  136. package/lib/module/components/dropdown-menu/dropdown-menu.js.map +1 -1
  137. package/lib/module/components/empty-state/empty-state.js +1 -0
  138. package/lib/module/components/empty-state/empty-state.js.map +1 -1
  139. package/lib/module/components/fact-list/fact-list.js +1 -0
  140. package/lib/module/components/fact-list/fact-list.js.map +1 -1
  141. package/lib/module/components/field/field.js +4 -0
  142. package/lib/module/components/field/field.js.map +1 -1
  143. package/lib/module/components/filter-tabs/filter-tabs.js +2 -1
  144. package/lib/module/components/filter-tabs/filter-tabs.js.map +1 -1
  145. package/lib/module/components/list-row/list-row.js +23 -6
  146. package/lib/module/components/list-row/list-row.js.map +1 -1
  147. package/lib/module/components/page-header/page-header.js +1 -0
  148. package/lib/module/components/page-header/page-header.js.map +1 -1
  149. package/lib/module/components/pill/pill.js +1 -0
  150. package/lib/module/components/pill/pill.js.map +1 -1
  151. package/lib/module/components/segmented-control/segmented-control.js +5 -1
  152. package/lib/module/components/segmented-control/segmented-control.js.map +1 -1
  153. package/lib/module/components/segmented-tabs/segmented-tabs.js +3 -2
  154. package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
  155. package/lib/module/components/skeleton/skeleton.js +4 -2
  156. package/lib/module/components/skeleton/skeleton.js.map +1 -1
  157. package/lib/module/components/slider/slider.js +53 -16
  158. package/lib/module/components/slider/slider.js.map +1 -1
  159. package/lib/module/components/status-steps/status-steps.js +2 -0
  160. package/lib/module/components/status-steps/status-steps.js.map +1 -1
  161. package/lib/module/components/text/figures.js +82 -0
  162. package/lib/module/components/text/figures.js.map +1 -0
  163. package/lib/module/components/text/index.js +1 -0
  164. package/lib/module/components/text/index.js.map +1 -1
  165. package/lib/module/components/text/metrics.js +5 -0
  166. package/lib/module/components/text/metrics.js.map +1 -0
  167. package/lib/module/components/text/text.js +31 -2
  168. package/lib/module/components/text/text.js.map +1 -1
  169. package/lib/module/components/tile-grid/tile-grid.js +3 -2
  170. package/lib/module/components/tile-grid/tile-grid.js.map +1 -1
  171. package/lib/module/components/toast/toast.js +4 -1
  172. package/lib/module/components/toast/toast.js.map +1 -1
  173. package/lib/module/components/value-rows/value-rows.js +8 -1
  174. package/lib/module/components/value-rows/value-rows.js.map +1 -1
  175. package/lib/module/index.js +1 -1
  176. package/lib/module/index.js.map +1 -1
  177. package/lib/module/internal/field-label.js +2 -0
  178. package/lib/module/internal/field-label.js.map +1 -1
  179. package/lib/module/internal/glyphs.js +2 -1
  180. package/lib/module/internal/glyphs.js.map +1 -1
  181. package/lib/module/internal/line-icons.js +1 -0
  182. package/lib/module/internal/line-icons.js.map +1 -1
  183. package/lib/module/internal/retry-glyph.js +5 -2
  184. package/lib/module/internal/retry-glyph.js.map +1 -1
  185. package/lib/module/internal/roll-text.js +10 -2
  186. package/lib/module/internal/roll-text.js.map +1 -1
  187. package/lib/module/internal/sample-tiles.js +2 -0
  188. package/lib/module/internal/sample-tiles.js.map +1 -1
  189. package/lib/module/internal/undo-glyph.js +11 -8
  190. package/lib/module/internal/undo-glyph.js.map +1 -1
  191. package/lib/module/sortable/section-board.js +75 -89
  192. package/lib/module/sortable/section-board.js.map +1 -1
  193. package/lib/module/templates/design-pick-template.js +9 -1
  194. package/lib/module/templates/design-pick-template.js.map +1 -1
  195. package/lib/module/templates/intro-template.js +3 -3
  196. package/lib/module/templates/intro-template.js.map +1 -1
  197. package/lib/module/templates/preview-edit-template.js +3 -0
  198. package/lib/module/templates/preview-edit-template.js.map +1 -1
  199. package/lib/module/templates/result-template.js +2 -1
  200. package/lib/module/templates/result-template.js.map +1 -1
  201. package/lib/module/templates/scroll-templates.js +12 -2
  202. package/lib/module/templates/scroll-templates.js.map +1 -1
  203. package/lib/module/templates/sheet-form-template.js +4 -0
  204. package/lib/module/templates/sheet-form-template.js.map +1 -1
  205. package/lib/module/theme/base.js +16 -9
  206. package/lib/module/theme/base.js.map +1 -1
  207. package/lib/module/theme/create-theme.js +6 -2
  208. package/lib/module/theme/create-theme.js.map +1 -1
  209. package/lib/module/theme/tokens.js +23 -2
  210. package/lib/module/theme/tokens.js.map +1 -1
  211. package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -1
  212. package/lib/typescript/src/adjust/axis-adjust.d.ts +25 -0
  213. package/lib/typescript/src/adjust/axis-adjust.d.ts.map +1 -0
  214. package/lib/typescript/src/adjust/axis-tabs.d.ts +15 -0
  215. package/lib/typescript/src/adjust/axis-tabs.d.ts.map +1 -0
  216. package/lib/typescript/src/adjust/axis-wheel.d.ts +15 -0
  217. package/lib/typescript/src/adjust/axis-wheel.d.ts.map +1 -0
  218. package/lib/typescript/src/adjust/dial-strip.d.ts.map +1 -1
  219. package/lib/typescript/src/adjust/index.d.ts +4 -0
  220. package/lib/typescript/src/adjust/index.d.ts.map +1 -1
  221. package/lib/typescript/src/adjust/store-sample.d.ts +46 -0
  222. package/lib/typescript/src/adjust/store-sample.d.ts.map +1 -0
  223. package/lib/typescript/src/blocks/chat-message/chat-message.d.ts.map +1 -1
  224. package/lib/typescript/src/blocks/choice-art/choice-art.d.ts.map +1 -1
  225. package/lib/typescript/src/blocks/color-tune/store-sample.d.ts.map +1 -1
  226. package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts +2 -1
  227. package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts.map +1 -1
  228. package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts +3 -1
  229. package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts.map +1 -1
  230. package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts +11 -0
  231. package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts.map +1 -1
  232. package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts +4 -1
  233. package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts.map +1 -1
  234. package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts +9 -0
  235. package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts.map +1 -1
  236. package/lib/typescript/src/blocks/detail-editor/index.d.ts +3 -2
  237. package/lib/typescript/src/blocks/detail-editor/index.d.ts.map +1 -1
  238. package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts +2 -0
  239. package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts.map +1 -0
  240. package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts +6 -1
  241. package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts.map +1 -1
  242. package/lib/typescript/src/blocks/detail-request/detail-request.d.ts +24 -0
  243. package/lib/typescript/src/blocks/detail-request/detail-request.d.ts.map +1 -0
  244. package/lib/typescript/src/blocks/detail-request/index.d.ts +2 -0
  245. package/lib/typescript/src/blocks/detail-request/index.d.ts.map +1 -0
  246. package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts +12 -0
  247. package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts.map +1 -0
  248. package/lib/typescript/src/blocks/detail-studio/adjust-tiles.d.ts.map +1 -1
  249. package/lib/typescript/src/blocks/detail-studio/asset-grid.d.ts.map +1 -1
  250. package/lib/typescript/src/blocks/detail-studio/confirm-row.d.ts.map +1 -1
  251. package/lib/typescript/src/blocks/detail-studio/detail-studio-template.d.ts.map +1 -1
  252. package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts +10 -0
  253. package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts.map +1 -0
  254. package/lib/typescript/src/blocks/detail-studio/image-prompt.d.ts.map +1 -1
  255. package/lib/typescript/src/blocks/detail-studio/index.d.ts +7 -5
  256. package/lib/typescript/src/blocks/detail-studio/index.d.ts.map +1 -1
  257. package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts +3 -3
  258. package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts.map +1 -1
  259. package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts +7 -0
  260. package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts.map +1 -0
  261. package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts +9 -0
  262. package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts.map +1 -1
  263. package/lib/typescript/src/blocks/detail-studio/section-kind-grid.d.ts.map +1 -1
  264. package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts +11 -13
  265. package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts.map +1 -1
  266. package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts +6 -2
  267. package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts.map +1 -1
  268. package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts +0 -2
  269. package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts.map +1 -1
  270. package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts +6 -0
  271. package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts.map +1 -0
  272. package/lib/typescript/src/blocks/detail-studio/studio-sheet.d.ts.map +1 -1
  273. package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts +11 -0
  274. package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts.map +1 -0
  275. package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts +14 -0
  276. package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts.map +1 -0
  277. package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts +19 -0
  278. package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts.map +1 -0
  279. package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts +2 -1
  280. package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts.map +1 -1
  281. package/lib/typescript/src/blocks/draft-box/draft-box.d.ts.map +1 -1
  282. package/lib/typescript/src/blocks/index.d.ts +1 -0
  283. package/lib/typescript/src/blocks/index.d.ts.map +1 -1
  284. package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
  285. package/lib/typescript/src/blocks/order-block/order-block.d.ts.map +1 -1
  286. package/lib/typescript/src/blocks/product-tile/product-tile.d.ts.map +1 -1
  287. package/lib/typescript/src/blocks/question-accordion/question-accordion.d.ts.map +1 -1
  288. package/lib/typescript/src/blocks/question-pager/question-pager.d.ts.map +1 -1
  289. package/lib/typescript/src/blocks/review-card/review-card.d.ts.map +1 -1
  290. package/lib/typescript/src/blocks/send-bar/send-bar.d.ts.map +1 -1
  291. package/lib/typescript/src/blocks/stage-bar/stage-bar.d.ts.map +1 -1
  292. package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
  293. package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
  294. package/lib/typescript/src/blocks/store-top/store-top.d.ts.map +1 -1
  295. package/lib/typescript/src/blocks/summary-cards/summary-cards.d.ts.map +1 -1
  296. package/lib/typescript/src/blocks/task-tiles/task-tiles.d.ts.map +1 -1
  297. package/lib/typescript/src/components/amount-summary/amount-summary.d.ts.map +1 -1
  298. package/lib/typescript/src/components/button/button.d.ts +3 -1
  299. package/lib/typescript/src/components/button/button.d.ts.map +1 -1
  300. package/lib/typescript/src/components/calendar/calendar.d.ts.map +1 -1
  301. package/lib/typescript/src/components/chip/chip.d.ts +2 -1
  302. package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
  303. package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -0
  304. package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
  305. package/lib/typescript/src/components/circle-grid/circle-grid.d.ts.map +1 -1
  306. package/lib/typescript/src/components/credit/credit.d.ts +1 -0
  307. package/lib/typescript/src/components/credit/credit.d.ts.map +1 -1
  308. package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
  309. package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +2 -0
  310. package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  311. package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
  312. package/lib/typescript/src/components/fact-list/fact-list.d.ts.map +1 -1
  313. package/lib/typescript/src/components/field/field.d.ts.map +1 -1
  314. package/lib/typescript/src/components/filter-tabs/filter-tabs.d.ts.map +1 -1
  315. package/lib/typescript/src/components/list-row/list-row.d.ts +3 -1
  316. package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
  317. package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -1
  318. package/lib/typescript/src/components/pill/pill.d.ts.map +1 -1
  319. package/lib/typescript/src/components/segmented-control/segmented-control.d.ts +2 -0
  320. package/lib/typescript/src/components/segmented-control/segmented-control.d.ts.map +1 -1
  321. package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
  322. package/lib/typescript/src/components/skeleton/skeleton.d.ts +2 -1
  323. package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
  324. package/lib/typescript/src/components/slider/slider.d.ts +2 -1
  325. package/lib/typescript/src/components/slider/slider.d.ts.map +1 -1
  326. package/lib/typescript/src/components/status-steps/status-steps.d.ts.map +1 -1
  327. package/lib/typescript/src/components/text/figures.d.ts +12 -0
  328. package/lib/typescript/src/components/text/figures.d.ts.map +1 -0
  329. package/lib/typescript/src/components/text/index.d.ts +1 -0
  330. package/lib/typescript/src/components/text/index.d.ts.map +1 -1
  331. package/lib/typescript/src/components/text/metrics.d.ts +6 -0
  332. package/lib/typescript/src/components/text/metrics.d.ts.map +1 -0
  333. package/lib/typescript/src/components/text/text.d.ts +2 -2
  334. package/lib/typescript/src/components/text/text.d.ts.map +1 -1
  335. package/lib/typescript/src/components/tile-grid/tile-grid.d.ts.map +1 -1
  336. package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
  337. package/lib/typescript/src/components/value-rows/value-rows.d.ts.map +1 -1
  338. package/lib/typescript/src/index.d.ts +1 -1
  339. package/lib/typescript/src/index.d.ts.map +1 -1
  340. package/lib/typescript/src/internal/field-label.d.ts.map +1 -1
  341. package/lib/typescript/src/internal/glyphs.d.ts +1 -0
  342. package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
  343. package/lib/typescript/src/internal/line-icons.d.ts +1 -0
  344. package/lib/typescript/src/internal/line-icons.d.ts.map +1 -1
  345. package/lib/typescript/src/internal/retry-glyph.d.ts.map +1 -1
  346. package/lib/typescript/src/internal/roll-text.d.ts +3 -2
  347. package/lib/typescript/src/internal/roll-text.d.ts.map +1 -1
  348. package/lib/typescript/src/internal/sample-tiles.d.ts +2 -0
  349. package/lib/typescript/src/internal/sample-tiles.d.ts.map +1 -1
  350. package/lib/typescript/src/internal/undo-glyph.d.ts.map +1 -1
  351. package/lib/typescript/src/sortable/section-board.d.ts.map +1 -1
  352. package/lib/typescript/src/templates/design-pick-template.d.ts.map +1 -1
  353. package/lib/typescript/src/templates/intro-template.d.ts.map +1 -1
  354. package/lib/typescript/src/templates/preview-edit-template.d.ts.map +1 -1
  355. package/lib/typescript/src/templates/result-template.d.ts +2 -1
  356. package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
  357. package/lib/typescript/src/templates/scroll-templates.d.ts.map +1 -1
  358. package/lib/typescript/src/templates/sheet-form-template.d.ts.map +1 -1
  359. package/lib/typescript/src/theme/base.d.ts +9 -2
  360. package/lib/typescript/src/theme/base.d.ts.map +1 -1
  361. package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
  362. package/lib/typescript/src/theme/tokens.d.ts +3 -1
  363. package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
  364. package/lib/typescript/src/types/index.d.ts +12 -0
  365. package/lib/typescript/src/types/index.d.ts.map +1 -1
  366. package/package.json +1 -1
  367. package/src/adjust/adjust-template.tsx +1 -0
  368. package/src/adjust/axis-adjust.tsx +206 -0
  369. package/src/adjust/axis-dial.tsx +2 -2
  370. package/src/adjust/axis-tabs.tsx +81 -0
  371. package/src/adjust/axis-wheel.tsx +309 -0
  372. package/src/adjust/dial-strip.tsx +5 -3
  373. package/src/adjust/index.ts +15 -0
  374. package/src/adjust/store-sample.tsx +519 -0
  375. package/src/blocks/chat-message/chat-message.tsx +1 -0
  376. package/src/blocks/choice-art/choice-art.tsx +2 -0
  377. package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +1 -1
  378. package/src/blocks/color-tune/store-sample.tsx +11 -6
  379. package/src/blocks/color-tune/swatch-card.tsx +1 -1
  380. package/src/blocks/detail-editor/compare-slider.tsx +4 -1
  381. package/src/blocks/detail-editor/detail-canvas.tsx +267 -69
  382. package/src/blocks/detail-editor/detail-types.ts +37 -0
  383. package/src/blocks/detail-editor/draft-preview.tsx +46 -2
  384. package/src/blocks/detail-editor/focus-context.ts +13 -0
  385. package/src/blocks/detail-editor/index.ts +11 -1
  386. package/src/blocks/detail-editor/keep-words.ts +36 -0
  387. package/src/blocks/detail-editor/layout-picker.tsx +191 -6
  388. package/src/blocks/detail-request/detail-request.tsx +198 -0
  389. package/src/blocks/detail-request/index.ts +11 -0
  390. package/src/blocks/detail-studio/action-chips.tsx +78 -0
  391. package/src/blocks/detail-studio/adjust-tiles.tsx +4 -3
  392. package/src/blocks/detail-studio/asset-grid.tsx +30 -16
  393. package/src/blocks/detail-studio/confirm-row.tsx +3 -0
  394. package/src/blocks/detail-studio/detail-studio-template.tsx +2 -6
  395. package/src/blocks/detail-studio/edge-fade.tsx +76 -0
  396. package/src/blocks/detail-studio/image-prompt.tsx +7 -9
  397. package/src/blocks/detail-studio/index.ts +19 -16
  398. package/src/blocks/detail-studio/rewrite-tray.tsx +16 -56
  399. package/src/blocks/detail-studio/section-cover.tsx +44 -0
  400. package/src/blocks/detail-studio/section-edit-template.tsx +138 -13
  401. package/src/blocks/detail-studio/section-kind-grid.tsx +4 -2
  402. package/src/blocks/detail-studio/section-settings.tsx +124 -69
  403. package/src/blocks/detail-studio/studio-bar.tsx +61 -41
  404. package/src/blocks/detail-studio/studio-dock.tsx +19 -37
  405. package/src/blocks/detail-studio/studio-glyphs.tsx +77 -0
  406. package/src/blocks/detail-studio/studio-sheet.tsx +7 -3
  407. package/src/blocks/detail-studio/studio-steps.tsx +58 -0
  408. package/src/blocks/detail-studio/studio-toggle.tsx +130 -0
  409. package/src/blocks/detail-studio/studio-tools.tsx +126 -0
  410. package/src/blocks/detail-studio/text-format-panel.tsx +30 -14
  411. package/src/blocks/draft-box/draft-box.tsx +3 -0
  412. package/src/blocks/index.tsx +1 -0
  413. package/src/blocks/oauth-buttons/oauth-buttons.tsx +1 -0
  414. package/src/blocks/order-block/order-block.tsx +20 -4
  415. package/src/blocks/product-tile/product-tile.tsx +4 -1
  416. package/src/blocks/question-accordion/question-accordion.tsx +0 -1
  417. package/src/blocks/question-pager/question-pager.tsx +2 -1
  418. package/src/blocks/review-card/review-card.tsx +4 -0
  419. package/src/blocks/send-bar/send-bar.tsx +1 -0
  420. package/src/blocks/stage-bar/stage-bar.tsx +3 -2
  421. package/src/blocks/stat-card/stat-card.tsx +2 -1
  422. package/src/blocks/step-screen/step-screen.tsx +5 -2
  423. package/src/blocks/store-top/store-top.tsx +7 -2
  424. package/src/blocks/summary-cards/summary-cards.tsx +4 -3
  425. package/src/blocks/task-tiles/task-tiles.tsx +2 -1
  426. package/src/components/amount-summary/amount-summary.tsx +9 -3
  427. package/src/components/button/button.tsx +18 -5
  428. package/src/components/calendar/calendar.tsx +5 -2
  429. package/src/components/chip/chip.tsx +11 -2
  430. package/src/components/chip-group/chip-group.tsx +2 -0
  431. package/src/components/circle-grid/circle-grid.tsx +5 -1
  432. package/src/components/credit/credit.tsx +11 -4
  433. package/src/components/dialog/dialog.tsx +2 -0
  434. package/src/components/dropdown-menu/dropdown-menu.tsx +18 -7
  435. package/src/components/empty-state/empty-state.tsx +1 -0
  436. package/src/components/fact-list/fact-list.tsx +1 -0
  437. package/src/components/field/field.tsx +4 -0
  438. package/src/components/filter-tabs/filter-tabs.tsx +2 -1
  439. package/src/components/list-row/list-row.tsx +40 -5
  440. package/src/components/page-header/page-header.tsx +1 -0
  441. package/src/components/pill/pill.tsx +1 -0
  442. package/src/components/segmented-control/segmented-control.tsx +12 -2
  443. package/src/components/segmented-tabs/segmented-tabs.tsx +2 -1
  444. package/src/components/skeleton/skeleton.tsx +5 -2
  445. package/src/components/slider/slider.tsx +66 -14
  446. package/src/components/status-steps/status-steps.tsx +2 -0
  447. package/src/components/text/figures.tsx +92 -0
  448. package/src/components/text/index.ts +7 -0
  449. package/src/components/text/metrics.ts +5 -0
  450. package/src/components/text/text.tsx +60 -16
  451. package/src/components/tile-grid/tile-grid.tsx +3 -2
  452. package/src/components/toast/toast.tsx +7 -1
  453. package/src/components/value-rows/value-rows.tsx +9 -1
  454. package/src/index.tsx +1 -0
  455. package/src/internal/field-label.tsx +2 -0
  456. package/src/internal/glyphs.tsx +2 -0
  457. package/src/internal/line-icons.ts +2 -0
  458. package/src/internal/retry-glyph.tsx +7 -2
  459. package/src/internal/roll-text.tsx +12 -2
  460. package/src/internal/sample-tiles.tsx +2 -0
  461. package/src/internal/undo-glyph.tsx +12 -11
  462. package/src/sortable/section-board.tsx +73 -76
  463. package/src/templates/design-pick-template.tsx +10 -1
  464. package/src/templates/intro-template.tsx +14 -12
  465. package/src/templates/preview-edit-template.tsx +3 -0
  466. package/src/templates/result-template.tsx +3 -0
  467. package/src/templates/scroll-templates.tsx +11 -2
  468. package/src/templates/sheet-form-template.tsx +4 -0
  469. package/src/theme/base.ts +9 -2
  470. package/src/theme/create-theme.ts +9 -2
  471. package/src/theme/tokens.ts +37 -3
  472. package/src/types/index.ts +13 -0
  473. package/lib/module/blocks/detail-studio/keyboard-bar.js +0 -67
  474. package/lib/module/blocks/detail-studio/keyboard-bar.js.map +0 -1
  475. package/lib/module/blocks/detail-studio/photo-tool-bar.js.map +0 -1
  476. package/lib/module/blocks/detail-studio/section-thumb.js +0 -49
  477. package/lib/module/blocks/detail-studio/section-thumb.js.map +0 -1
  478. package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts +0 -18
  479. package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts.map +0 -1
  480. package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts +0 -19
  481. package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts.map +0 -1
  482. package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts +0 -14
  483. package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts.map +0 -1
  484. package/src/blocks/detail-studio/keyboard-bar.tsx +0 -73
  485. package/src/blocks/detail-studio/photo-tool-bar.tsx +0 -100
  486. package/src/blocks/detail-studio/section-thumb.tsx +0 -41
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  createContext,
3
+ useCallback,
3
4
  useContext,
4
5
  useEffect,
5
6
  useMemo,
@@ -26,7 +27,13 @@ import { useTheme } from '../../theme/theme-provider';
26
27
  import { withAlpha } from '../../utils/color';
27
28
  import { makeStyles } from '../../utils/styles';
28
29
  import { CompareSlider } from './compare-slider';
29
- import { DetailFocusContext, type DetailFocusRect } from './focus-context';
30
+ import {
31
+ DetailFocusContext,
32
+ DetailPartsContext,
33
+ type DetailFocusRect,
34
+ type DetailPart,
35
+ } from './focus-context';
36
+ import { keepWords } from './keep-words';
30
37
  import {
31
38
  DETAIL_FONT_FAMILY,
32
39
  DETAIL_STEP_COLUMNS,
@@ -37,6 +44,7 @@ import {
37
44
  detailSteps,
38
45
  detailTableRows,
39
46
  detailFontSize,
47
+ detailIsTitle,
40
48
  detailLineHeight,
41
49
  detailTracking,
42
50
  type DetailBlock,
@@ -86,28 +94,103 @@ export type DetailCanvasProps = {
86
94
  paper?: string;
87
95
  mode?: 'select' | 'edit';
88
96
  focus?: DetailCanvasFocus | null;
97
+ onMeasure?: (parts: DetailPart[]) => void;
89
98
  };
90
99
 
100
+ const lay = Platform.OS === 'ios' ? (text: string) => text : keepWords;
101
+
91
102
  const HANDLE = 10;
92
- const BLANK_TITLE = 7;
93
103
  const DOT = 6;
94
104
  const MAX_TEXT = 2000;
95
105
  const RING = 2;
96
106
  const HALO = 0.9;
97
107
 
108
+ type PartSink = {
109
+ root: RefObject<ComponentRef<typeof View> | null>;
110
+ put: (key: string, part: DetailPart | null) => void;
111
+ watch: (key: string, measure: (() => void) | null) => void;
112
+ again: () => void;
113
+ };
114
+
115
+ const PartsContext = createContext<PartSink | null>(null);
116
+
117
+ type PartSpec = {
118
+ key: string;
119
+ kind: DetailPart['kind'];
120
+ line?: number;
121
+ blank?: boolean;
122
+ };
123
+
124
+ function useProbe(spec?: PartSpec) {
125
+ const sink = useContext(PartsContext);
126
+ const node = useRef<ComponentRef<typeof View>>(null);
127
+ const latest = useRef(spec);
128
+ latest.current = spec;
129
+ const measure = useCallback(() => {
130
+ const now = latest.current;
131
+ const root = sink?.root.current;
132
+ const self = node.current;
133
+ if (!sink || !now || !root || !self) return;
134
+ self.measureLayout(
135
+ root,
136
+ (_x, y, _w, height) =>
137
+ sink.put(now.key, {
138
+ key: now.key,
139
+ kind: now.kind,
140
+ y,
141
+ height,
142
+ line: now.line ?? 0,
143
+ ...(now.blank ? { blank: true } : {}),
144
+ }),
145
+ () => undefined
146
+ );
147
+ }, [sink]);
148
+ const key = spec?.key;
149
+ const blank = !!spec?.blank;
150
+ const seen = useRef(blank);
151
+ useEffect(() => {
152
+ if (seen.current === blank) return;
153
+ seen.current = blank;
154
+ measure();
155
+ }, [blank, measure]);
156
+ useEffect(() => {
157
+ if (!sink || !key) return;
158
+ sink.watch(key, measure);
159
+ return () => {
160
+ sink.watch(key, null);
161
+ sink.put(key, null);
162
+ };
163
+ }, [sink, key, measure]);
164
+ if (!sink || !spec) return null;
165
+ return { ref: node, onLayout: measure };
166
+ }
167
+
98
168
  type TapProps = {
99
169
  onPress?: () => void;
100
170
  label: string;
101
171
  style?: StyleProp<ViewStyle>;
172
+ part?: PartSpec;
102
173
  children?: ReactNode;
103
174
  };
104
175
 
105
- function Tap({ onPress, label, style, children }: TapProps) {
176
+ function Tap({ onPress, label, style, part, children }: TapProps) {
177
+ const probe = useProbe(part);
106
178
  if (!onPress) {
107
- return <View style={style}>{children}</View>;
179
+ return (
180
+ <View
181
+ ref={probe?.ref}
182
+ onLayout={probe?.onLayout}
183
+ collapsable={probe ? false : undefined}
184
+ style={style}
185
+ >
186
+ {children}
187
+ </View>
188
+ );
108
189
  }
109
190
  return (
110
191
  <PressableBase
192
+ ref={probe?.ref}
193
+ onLayout={probe?.onLayout}
111
194
  onPress={onPress}
112
195
  accessibilityLabel={label}
113
196
  feedback="none"
@@ -118,6 +201,17 @@ function Tap({ onPress, label, style, children }: TapProps) {
118
201
  );
119
202
  }
120
203
 
204
+ const textPart = (
205
+ block: DetailBlock,
206
+ layer: DetailLayer,
207
+ style: TextStyle,
208
+ lines = true
209
+ ): PartSpec => ({
210
+ key: `${block.id}/${layer.id}`,
211
+ kind: 'text',
212
+ line: lines ? (style.lineHeight ?? 0) : 0,
213
+ });
214
+
121
215
  const useStyles = makeStyles((t) => ({
122
216
  page: { overflow: 'hidden' },
123
217
  texts: { gap: t.space[2] },
@@ -157,6 +251,8 @@ const useStyles = makeStyles((t) => ({
157
251
  },
158
252
  tagText: {
159
253
  fontSize: t.typography.caption.fontSize,
254
+ fontFamily: t.fontFamily,
255
+ letterSpacing: t.typography.caption.letterSpacing,
160
256
  fontWeight: '600',
161
257
  },
162
258
  tag: {
@@ -210,6 +306,7 @@ const useStyles = makeStyles((t) => ({
210
306
  focusTagText: {
211
307
  fontFamily: t.fontFamily,
212
308
  fontSize: t.typography.eyebrow.fontSize,
309
+ letterSpacing: t.typography.eyebrow.letterSpacing,
213
310
  lineHeight: t.typography.eyebrow.lineHeight,
214
311
  fontWeight: '600',
215
312
  color: t.colors.title,
@@ -218,7 +315,7 @@ const useStyles = makeStyles((t) => ({
218
315
  flexDirection: 'row',
219
316
  justifyContent: 'center',
220
317
  gap: t.space[2],
221
- marginTop: t.space[3],
318
+ marginTop: t.space[5],
222
319
  },
223
320
  dotMark: { width: DOT, height: DOT, borderRadius: DOT / 2 },
224
321
  field: {
@@ -392,6 +489,7 @@ type FocusTextProps = {
392
489
  result?: DetailCanvasResult | null;
393
490
  blank: ReactNode;
394
491
  style?: StyleProp<ViewStyle>;
492
+ part?: PartSpec;
395
493
  };
396
494
 
397
495
  function FocusText({
@@ -401,9 +499,11 @@ function FocusText({
401
499
  result,
402
500
  blank,
403
501
  style,
502
+ part,
404
503
  }: FocusTextProps) {
405
504
  const t = useTheme();
406
505
  const s = useStyles();
506
+ const probe = useProbe(part);
407
507
  const target = useContext(FocusTargetContext);
408
508
  const ring = useRef<ComponentRef<typeof View>>(null);
409
509
  const field = useRef<ComponentRef<typeof TextInput>>(null);
@@ -435,7 +535,11 @@ function FocusText({
435
535
  const ready = () => {
436
536
  if (laid.current) return;
437
537
  laid.current = true;
438
- if (wanted.current) field.current?.focus();
538
+ const node = field.current;
539
+ if (!wanted.current || !node) return;
540
+ node.focus();
541
+ const end = input?.value.length ?? 0;
542
+ node.setSelection?.(end, end);
439
543
  };
440
544
 
441
545
  const pan = useMemo(
@@ -457,15 +561,22 @@ function FocusText({
457
561
  [slop, swipe]
458
562
  );
459
563
 
460
- const measure = () => {
564
+ const below = shown && shown.count >= 2 ? t.space[5] + DOT : 0;
565
+ const reach = useRef(below);
566
+ reach.current = below;
567
+ const measure = useCallback(() => {
461
568
  const root = target?.root.current;
462
569
  if (!target || !root || !ring.current) return;
463
570
  ring.current.measureLayout(
464
571
  root,
465
- (_x, y, _w, height) => target.report({ y, height }),
572
+ (_x, y, _w, height) =>
573
+ target.report({ y, height: height + reach.current }),
466
574
  () => undefined
467
575
  );
468
- };
576
+ }, [target]);
577
+ useEffect(() => {
578
+ measure();
579
+ }, [below, measure]);
469
580
 
470
581
  const line = text.lineHeight ?? 0;
471
582
  const fieldStyle: TextStyle = { ...text, alignSelf: undefined };
@@ -500,15 +611,24 @@ function FocusText({
500
611
  ]}
501
612
  />
502
613
  ) : shown ? (
503
- <RNText style={text}>{shown.text}</RNText>
614
+ <RNText lineBreakStrategyIOS="hangul-word" style={text}>
615
+ {lay(shown.text)}
616
+ </RNText>
504
617
  ) : layer.text?.trim() ? (
505
- <RNText style={text}>{layer.text}</RNText>
618
+ <RNText lineBreakStrategyIOS="hangul-word" style={text}>
619
+ {lay(layer.text)}
620
+ </RNText>
506
621
  ) : (
507
622
  blank
508
623
  );
509
624
 
510
625
  return (
511
- <View style={style}>
626
+ <View
627
+ ref={probe?.ref}
628
+ onLayout={probe?.onLayout}
629
+ collapsable={probe ? false : undefined}
630
+ style={style}
631
+ >
512
632
  <View
513
633
  testID="detail-focus-text"
514
634
  style={[s.focus, shown && s.focusResult]}
@@ -570,12 +690,61 @@ export function DetailCanvas({
570
690
  paper,
571
691
  mode = 'select',
572
692
  focus,
693
+ onMeasure,
573
694
  }: DetailCanvasProps) {
574
695
  const t = useTheme();
575
696
  const s = useStyles();
576
697
  const report = useContext(DetailFocusContext);
698
+ const listen = useContext(DetailPartsContext);
577
699
  const root = useRef<ComponentRef<typeof View>>(null);
578
700
  const target = useMemo(() => (report ? { root, report } : null), [report]);
701
+ const sink = onMeasure ?? listen;
702
+ const latest = useRef(sink);
703
+ latest.current = sink;
704
+ const measuring = !!sink;
705
+ const store = useRef(new Map<string, DetailPart>());
706
+ const watchers = useRef(new Map<string, () => void>());
707
+ const frame = useRef<number | null>(null);
708
+ useEffect(
709
+ () => () => {
710
+ if (frame.current !== null) cancelAnimationFrame(frame.current);
711
+ },
712
+ []
713
+ );
714
+ const parts = useMemo<PartSink | null>(() => {
715
+ if (!measuring) return null;
716
+ const flush = () => {
717
+ frame.current = null;
718
+ const list = [...store.current.values()].sort((a, b) => a.y - b.y);
719
+ latest.current?.(list);
720
+ };
721
+ return {
722
+ root,
723
+ put: (key, part) => {
724
+ const now = store.current.get(key);
725
+ if (part) {
726
+ if (
727
+ now &&
728
+ now.y === part.y &&
729
+ now.height === part.height &&
730
+ !!now.blank === !!part.blank
731
+ )
732
+ return;
733
+ store.current.set(key, part);
734
+ } else {
735
+ if (!now) return;
736
+ store.current.delete(key);
737
+ }
738
+ if (frame.current === null)
739
+ frame.current = requestAnimationFrame(flush);
740
+ },
741
+ watch: (key, measure) => {
742
+ if (measure) watchers.current.set(key, measure);
743
+ else watchers.current.delete(key);
744
+ },
745
+ again: () => watchers.current.forEach((measure) => measure()),
746
+ };
747
+ }, [measuring]);
579
748
  const pad = t.space[5] * scale;
580
749
  const fg = ink ?? t.colors.foreground;
581
750
  const bandText = paper ?? t.colors.surface;
@@ -639,6 +808,7 @@ export function DetailCanvas({
639
808
  after={compare.after}
640
809
  aspectRatio={ratio}
641
810
  labels={compare.labels}
811
+ inset={t.space[1] + RING}
642
812
  />
643
813
  <PhotoRing />
644
814
  </View>
@@ -653,6 +823,7 @@ export function DetailCanvas({
653
823
  onPress={press({ block: block.id, layer: layer.id })}
654
824
  label={'사진'}
655
825
  style={flex ? s.half : undefined}
826
+ part={{ key: `${block.id}/${layer.id}`, kind: 'image', blank: !url }}
656
827
  >
657
828
  {url ? (
658
829
  <Image
@@ -680,13 +851,14 @@ export function DetailCanvas({
680
851
  testID="detail-blank-text"
681
852
  style={[
682
853
  s.blank,
683
- (l.style?.size ?? 5) >= BLANK_TITLE ? s.blankTitle : s.blankLine,
854
+ detailIsTitle(l.style) ? s.blankTitle : s.blankLine,
684
855
  { height: style.lineHeight, alignSelf: alignSelfOf(l.style?.align) },
685
856
  ]}
686
857
  />
687
858
  );
688
859
 
689
860
  const focusText = (
861
+ block: DetailBlock,
690
862
  l: DetailLayer,
691
863
  style: TextStyle,
692
864
  wrap?: StyleProp<ViewStyle>
@@ -699,6 +871,7 @@ export function DetailCanvas({
699
871
  result={focus?.result}
700
872
  blank={blankBar(l, style)}
701
873
  style={wrap}
874
+ part={textPart(block, l, style, false)}
702
875
  />
703
876
  );
704
877
 
@@ -709,7 +882,7 @@ export function DetailCanvas({
709
882
  ) => {
710
883
  if (!l || l.hidden) return <View style={style} />;
711
884
  const text = tx(l);
712
- if (focused(block, l)) return focusText(l, text, style);
885
+ if (focused(block, l)) return focusText(block, l, text, style);
713
886
  const blank = !l.text?.trim();
714
887
  if (blank && !onSelect) return <View style={style} />;
715
888
  return (
@@ -717,8 +890,15 @@ export function DetailCanvas({
717
890
  onPress={press({ block: block.id, layer: l.id })}
718
891
  label={blank ? '글' : (l.text ?? '')}
719
892
  style={style}
893
+ part={textPart(block, l, text)}
720
894
  >
721
- {blank ? blankBar(l, text) : <RNText style={text}>{l.text}</RNText>}
895
+ {blank ? (
896
+ blankBar(l, text)
897
+ ) : (
898
+ <RNText lineBreakStrategyIOS="hangul-word" style={text}>
899
+ {lay(l.text ?? '')}
900
+ </RNText>
901
+ )}
722
902
  {picked(block, l) ? <Handles /> : null}
723
903
  </Tap>
724
904
  );
@@ -802,7 +982,7 @@ export function DetailCanvas({
802
982
  return (
803
983
  <View key={l.id} style={[s.step, { gap }]}>
804
984
  {dot}
805
- {focusText(l, text, s.stretch)}
985
+ {focusText(block, l, text, s.stretch)}
806
986
  </View>
807
987
  );
808
988
  }
@@ -812,12 +992,18 @@ export function DetailCanvas({
812
992
  onPress={press({ block: block.id, layer: l.id })}
813
993
  label={blank ? '글' : (l.text ?? '')}
814
994
  style={[s.step, { gap }]}
995
+ part={textPart(block, l, text, false)}
815
996
  >
816
997
  {dot}
817
998
  {blank ? (
818
999
  blankBar(l, text)
819
1000
  ) : (
820
- <RNText style={[text, s.stretch]}>{l.text}</RNText>
1001
+ <RNText
1002
+ lineBreakStrategyIOS="hangul-word"
1003
+ style={[text, s.stretch]}
1004
+ >
1005
+ {lay(l.text ?? '')}
1006
+ </RNText>
821
1007
  )}
822
1008
  {picked(block, l) ? <Handles /> : null}
823
1009
  </Tap>
@@ -829,27 +1015,36 @@ export function DetailCanvas({
829
1015
  );
830
1016
  };
831
1017
 
832
- const texts = (block: DetailBlock, shown: DetailLayer[]) => {
1018
+ const texts = (block: DetailBlock, shown: DetailLayer[], under = false) => {
833
1019
  const list = shown.filter(
834
1020
  (l) => l.type === 'text' && (l.text || onSelect || focused(block, l))
835
1021
  );
836
1022
  if (!list.length) return null;
837
1023
  return (
838
- <View style={[s.texts, { padding: pad }]}>
1024
+ <View
1025
+ style={[
1026
+ s.texts,
1027
+ { padding: pad },
1028
+ under && { paddingTop: pad + t.space[2] * scale },
1029
+ ]}
1030
+ >
839
1031
  {list.map((l) => {
840
1032
  const style = tx(l);
841
- if (focused(block, l)) return focusText(l, style);
1033
+ if (focused(block, l)) return focusText(block, l, style);
842
1034
  const blank = !!onSelect && !l.text?.trim();
843
1035
  return (
844
1036
  <Tap
845
1037
  key={l.id}
846
1038
  onPress={press({ block: block.id, layer: l.id })}
847
1039
  label={blank ? '글' : (l.text ?? '')}
1040
+ part={textPart(block, l, style)}
848
1041
  >
849
1042
  {blank ? (
850
1043
  blankBar(l, style)
851
1044
  ) : (
852
- <RNText style={style}>{l.text}</RNText>
1045
+ <RNText lineBreakStrategyIOS="hangul-word" style={style}>
1046
+ {lay(l.text ?? '')}
1047
+ </RNText>
853
1048
  )}
854
1049
  {picked(block, l) ? <Handles /> : null}
855
1050
  </Tap>
@@ -908,59 +1103,62 @@ export function DetailCanvas({
908
1103
  return (
909
1104
  <>
910
1105
  {images.map((l) => image(block, l, false, 4 / 5))}
911
- {texts(block, shown)}
1106
+ {texts(block, shown, images.length > 0)}
912
1107
  </>
913
1108
  );
914
1109
  }
915
1110
  };
916
1111
 
917
1112
  return (
918
- <FocusTargetContext.Provider value={target}>
919
- <View
920
- ref={root}
921
- style={[
922
- s.page,
923
- { backgroundColor: doc.background ?? paper ?? t.colors.surface },
924
- ]}
925
- >
926
- {doc.blocks.map((block, index) => (
927
- <View
928
- key={block.id}
929
- style={{
930
- backgroundColor: block.background?.color ?? undefined,
931
- paddingTop: detailBlockSpace(block.space_top) * scale,
932
- paddingBottom: detailBlockSpace(block.space_bottom) * scale,
933
- }}
934
- >
935
- {block.background?.url ? (
936
- <Image
937
- source={{ uri: block.background.url }}
938
- resizeMode="cover"
939
- style={s.fill}
940
- />
941
- ) : null}
942
- {onSelect && !edit ? (
943
- <PressableBase
944
- onPress={() => onSelect({ block: block.id })}
945
- accessibilityLabel="블록"
946
- feedback="none"
947
- style={s.fill}
948
- />
949
- ) : null}
950
- {body(block)}
951
- {picked(block) ? <Handles /> : null}
952
- {!edit && selection?.block === block.id ? (
953
- <View pointerEvents="none" style={s.tag}>
954
- <RNText
955
- style={[s.tagText, { color: t.colors.primaryForeground }]}
956
- >
957
- {String(index + 1)}
958
- </RNText>
959
- </View>
960
- ) : null}
961
- </View>
962
- ))}
963
- </View>
964
- </FocusTargetContext.Provider>
1113
+ <PartsContext.Provider value={parts}>
1114
+ <FocusTargetContext.Provider value={target}>
1115
+ <View
1116
+ ref={root}
1117
+ style={[
1118
+ s.page,
1119
+ { backgroundColor: doc.background ?? paper ?? t.colors.surface },
1120
+ ]}
1121
+ >
1122
+ {doc.blocks.map((block, index) => (
1123
+ <View
1124
+ key={block.id}
1125
+ onLayout={parts?.again}
1126
+ style={{
1127
+ backgroundColor: block.background?.color ?? undefined,
1128
+ paddingTop: detailBlockSpace(block.space_top) * scale,
1129
+ paddingBottom: detailBlockSpace(block.space_bottom) * scale,
1130
+ }}
1131
+ >
1132
+ {block.background?.url ? (
1133
+ <Image
1134
+ source={{ uri: block.background.url }}
1135
+ resizeMode="cover"
1136
+ style={s.fill}
1137
+ />
1138
+ ) : null}
1139
+ {onSelect && !edit ? (
1140
+ <PressableBase
1141
+ onPress={() => onSelect({ block: block.id })}
1142
+ accessibilityLabel="블록"
1143
+ feedback="none"
1144
+ style={s.fill}
1145
+ />
1146
+ ) : null}
1147
+ {body(block)}
1148
+ {picked(block) ? <Handles /> : null}
1149
+ {!edit && selection?.block === block.id ? (
1150
+ <View pointerEvents="none" style={s.tag}>
1151
+ <RNText
1152
+ style={[s.tagText, { color: t.colors.primaryForeground }]}
1153
+ >
1154
+ {String(index + 1)}
1155
+ </RNText>
1156
+ </View>
1157
+ ) : null}
1158
+ </View>
1159
+ ))}
1160
+ </View>
1161
+ </FocusTargetContext.Provider>
1162
+ </PartsContext.Provider>
965
1163
  );
966
1164
  }
@@ -170,3 +170,40 @@ export const DETAIL_COLORS: readonly { value: string; label: string }[] = [
170
170
  { value: '#2F4A2B', label: '초록' },
171
171
  { value: '#1F3A5F', label: '남색' },
172
172
  ];
173
+
174
+ export const DETAIL_HEAD_SIZE = 7;
175
+ export const DETAIL_TITLE_SIZE = 5;
176
+
177
+ export function detailIsTitle(style?: DetailTextStyle | null): boolean {
178
+ const size = style?.size ?? 5;
179
+ const weight = style?.weight ?? 'regular';
180
+ return (
181
+ size >= DETAIL_HEAD_SIZE ||
182
+ (size >= DETAIL_TITLE_SIZE && weight !== 'regular')
183
+ );
184
+ }
185
+
186
+ export const DETAIL_TEXT_COLORS: readonly { value: string; label: string }[] = [
187
+ { value: '#1A1A1A', label: '검정' },
188
+ { value: '#626262', label: '회색' },
189
+ { value: '#FFFFFF', label: '흰색' },
190
+ { value: '#8A6A4A', label: '갈색' },
191
+ { value: '#B5651D', label: '황토색' },
192
+ { value: '#3F5D45', label: '초록' },
193
+ { value: '#2F4A6B', label: '남색' },
194
+ { value: '#9A3412', label: '벽돌색' },
195
+ ];
196
+
197
+ export const DETAIL_BACKGROUND_COLORS: readonly {
198
+ value: string;
199
+ label: string;
200
+ }[] = [
201
+ { value: '#FFFFFF', label: '흰색' },
202
+ { value: '#F3EFE7', label: '크림색' },
203
+ { value: '#E6E1D8', label: '연회색' },
204
+ { value: '#D6C7B2', label: '베이지' },
205
+ { value: '#8A6A4A', label: '갈색' },
206
+ { value: '#3F5D45', label: '초록' },
207
+ { value: '#2F4A6B', label: '남색' },
208
+ { value: '#2A2D33', label: '먹색' },
209
+ ];
@@ -1,10 +1,35 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { View } from 'react-native';
3
3
  import { makeStyles } from '../../utils/styles';
4
+ import type { DetailPart } from './focus-context';
5
+
6
+ const EPS = 0.5;
7
+
8
+ export function draftPreviewFit(
9
+ parts: readonly DetailPart[],
10
+ room: number
11
+ ): number {
12
+ let end = room;
13
+ for (const part of parts) {
14
+ if (part.kind !== 'text') continue;
15
+ if (part.y + part.height <= room + EPS || part.y >= room - EPS) continue;
16
+ end = Math.min(end, part.y);
17
+ }
18
+ const photo = parts
19
+ .filter((p) => p.kind === 'image' && p.y + p.height <= end + EPS)
20
+ .pop();
21
+ if (!photo) return end;
22
+ const below = photo.y + photo.height;
23
+ const words = parts.some(
24
+ (p) => p.kind === 'text' && p.y >= below - EPS && p.y < end - EPS
25
+ );
26
+ return words ? end : below;
27
+ }
4
28
 
5
29
  export type DraftPreviewProps = {
6
30
  height: number;
7
31
  width: number;
32
+ pageHeight?: number;
8
33
  children: ReactNode;
9
34
  };
10
35
 
@@ -22,13 +47,32 @@ const useStyles = makeStyles((t) => ({
22
47
  borderTopRightRadius: t.radius.sm,
23
48
  backgroundColor: t.colors.surface,
24
49
  },
50
+ whole: {
51
+ borderBottomLeftRadius: t.radius.sm,
52
+ borderBottomRightRadius: t.radius.sm,
53
+ },
25
54
  }));
26
55
 
27
- export function DraftPreview({ height, width, children }: DraftPreviewProps) {
56
+ export function DraftPreview({
57
+ height,
58
+ width,
59
+ pageHeight,
60
+ children,
61
+ }: DraftPreviewProps) {
28
62
  const s = useStyles();
63
+ const whole = pageHeight !== undefined;
29
64
  return (
30
65
  <View style={[s.box, { height }]}>
31
- <View style={[s.page, { width }]}>{children}</View>
66
+ <View
67
+ style={[
68
+ s.page,
69
+ { width },
70
+ whole && s.whole,
71
+ whole && { height: pageHeight },
72
+ ]}
73
+ >
74
+ {children}
75
+ </View>
32
76
  </View>
33
77
  );
34
78
  }
@@ -5,3 +5,16 @@ export type DetailFocusRect = { y: number; height: number };
5
5
  export const DetailFocusContext = createContext<
6
6
  ((rect: DetailFocusRect | null) => void) | null
7
7
  >(null);
8
+
9
+ export type DetailPart = {
10
+ key: string;
11
+ kind: 'text' | 'image';
12
+ y: number;
13
+ height: number;
14
+ line: number;
15
+ blank?: boolean;
16
+ };
17
+
18
+ export const DetailPartsContext = createContext<
19
+ ((parts: DetailPart[]) => void) | null
20
+ >(null);