@ezpg/app-ui 0.20.0 → 0.22.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 (313) hide show
  1. package/CHANGELOG.md +37 -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-tabs.js +81 -0
  7. package/lib/module/adjust/axis-tabs.js.map +1 -0
  8. package/lib/module/adjust/axis-wheel.js +286 -0
  9. package/lib/module/adjust/axis-wheel.js.map +1 -0
  10. package/lib/module/adjust/index.js +4 -0
  11. package/lib/module/adjust/index.js.map +1 -1
  12. package/lib/module/adjust/store-sample.js +436 -0
  13. package/lib/module/adjust/store-sample.js.map +1 -0
  14. package/lib/module/blocks/choice-art/choice-art.js +589 -0
  15. package/lib/module/blocks/choice-art/choice-art.js.map +1 -0
  16. package/lib/module/blocks/choice-art/index.js +4 -0
  17. package/lib/module/blocks/choice-art/index.js.map +1 -0
  18. package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
  19. package/lib/module/blocks/detail-editor/compare-slider.js +5 -2
  20. package/lib/module/blocks/detail-editor/compare-slider.js.map +1 -1
  21. package/lib/module/blocks/detail-editor/detail-canvas.js +192 -61
  22. package/lib/module/blocks/detail-editor/detail-canvas.js.map +1 -1
  23. package/lib/module/blocks/detail-editor/detail-types.js +57 -0
  24. package/lib/module/blocks/detail-editor/detail-types.js.map +1 -1
  25. package/lib/module/blocks/detail-editor/draft-preview.js +22 -0
  26. package/lib/module/blocks/detail-editor/draft-preview.js.map +1 -1
  27. package/lib/module/blocks/detail-editor/focus-context.js +1 -0
  28. package/lib/module/blocks/detail-editor/focus-context.js.map +1 -1
  29. package/lib/module/blocks/detail-editor/index.js +2 -2
  30. package/lib/module/blocks/detail-editor/index.js.map +1 -1
  31. package/lib/module/blocks/detail-editor/keep-words.js +34 -0
  32. package/lib/module/blocks/detail-editor/keep-words.js.map +1 -0
  33. package/lib/module/blocks/detail-editor/layout-picker.js +192 -8
  34. package/lib/module/blocks/detail-editor/layout-picker.js.map +1 -1
  35. package/lib/module/blocks/detail-request/detail-request.js +213 -0
  36. package/lib/module/blocks/detail-request/detail-request.js.map +1 -0
  37. package/lib/module/blocks/detail-request/index.js +4 -0
  38. package/lib/module/blocks/detail-request/index.js.map +1 -0
  39. package/lib/module/blocks/detail-studio/action-chips.js +72 -0
  40. package/lib/module/blocks/detail-studio/action-chips.js.map +1 -0
  41. package/lib/module/blocks/detail-studio/adjust-tiles.js +3 -3
  42. package/lib/module/blocks/detail-studio/adjust-tiles.js.map +1 -1
  43. package/lib/module/blocks/detail-studio/asset-grid.js +33 -16
  44. package/lib/module/blocks/detail-studio/asset-grid.js.map +1 -1
  45. package/lib/module/blocks/detail-studio/confirm-row.js +3 -0
  46. package/lib/module/blocks/detail-studio/confirm-row.js.map +1 -1
  47. package/lib/module/blocks/detail-studio/detail-studio-template.js +2 -6
  48. package/lib/module/blocks/detail-studio/detail-studio-template.js.map +1 -1
  49. package/lib/module/blocks/detail-studio/edge-fade.js +74 -0
  50. package/lib/module/blocks/detail-studio/edge-fade.js.map +1 -0
  51. package/lib/module/blocks/detail-studio/image-prompt.js +8 -10
  52. package/lib/module/blocks/detail-studio/image-prompt.js.map +1 -1
  53. package/lib/module/blocks/detail-studio/index.js +7 -5
  54. package/lib/module/blocks/detail-studio/index.js.map +1 -1
  55. package/lib/module/blocks/detail-studio/rewrite-tray.js +17 -64
  56. package/lib/module/blocks/detail-studio/rewrite-tray.js.map +1 -1
  57. package/lib/module/blocks/detail-studio/section-cover.js +41 -0
  58. package/lib/module/blocks/detail-studio/section-cover.js.map +1 -0
  59. package/lib/module/blocks/detail-studio/section-edit-template.js +103 -12
  60. package/lib/module/blocks/detail-studio/section-edit-template.js.map +1 -1
  61. package/lib/module/blocks/detail-studio/section-kind-grid.js +2 -3
  62. package/lib/module/blocks/detail-studio/section-kind-grid.js.map +1 -1
  63. package/lib/module/blocks/detail-studio/section-settings.js +127 -61
  64. package/lib/module/blocks/detail-studio/section-settings.js.map +1 -1
  65. package/lib/module/blocks/detail-studio/studio-bar.js +46 -25
  66. package/lib/module/blocks/detail-studio/studio-bar.js.map +1 -1
  67. package/lib/module/blocks/detail-studio/studio-dock.js +21 -39
  68. package/lib/module/blocks/detail-studio/studio-dock.js.map +1 -1
  69. package/lib/module/blocks/detail-studio/studio-glyphs.js +92 -0
  70. package/lib/module/blocks/detail-studio/studio-glyphs.js.map +1 -0
  71. package/lib/module/blocks/detail-studio/studio-sheet.js +5 -3
  72. package/lib/module/blocks/detail-studio/studio-sheet.js.map +1 -1
  73. package/lib/module/blocks/detail-studio/studio-steps.js +60 -0
  74. package/lib/module/blocks/detail-studio/studio-steps.js.map +1 -0
  75. package/lib/module/blocks/detail-studio/studio-toggle.js +130 -0
  76. package/lib/module/blocks/detail-studio/studio-toggle.js.map +1 -0
  77. package/lib/module/blocks/detail-studio/{photo-tool-bar.js → studio-tools.js} +63 -42
  78. package/lib/module/blocks/detail-studio/studio-tools.js.map +1 -0
  79. package/lib/module/blocks/detail-studio/text-format-panel.js +16 -8
  80. package/lib/module/blocks/detail-studio/text-format-panel.js.map +1 -1
  81. package/lib/module/blocks/index.js +2 -0
  82. package/lib/module/blocks/index.js.map +1 -1
  83. package/lib/module/components/button/button.js +13 -5
  84. package/lib/module/components/button/button.js.map +1 -1
  85. package/lib/module/components/chip/chip.js +5 -1
  86. package/lib/module/components/chip/chip.js.map +1 -1
  87. package/lib/module/components/chip-group/chip-group.js +1 -0
  88. package/lib/module/components/chip-group/chip-group.js.map +1 -1
  89. package/lib/module/components/credit/credit.js +6 -2
  90. package/lib/module/components/credit/credit.js.map +1 -1
  91. package/lib/module/components/dropdown-menu/dropdown-menu.js +9 -4
  92. package/lib/module/components/dropdown-menu/dropdown-menu.js.map +1 -1
  93. package/lib/module/components/page-header/page-header.js +25 -1
  94. package/lib/module/components/page-header/page-header.js.map +1 -1
  95. package/lib/module/components/segmented-control/segmented-control.js +3 -1
  96. package/lib/module/components/segmented-control/segmented-control.js.map +1 -1
  97. package/lib/module/components/skeleton/skeleton.js +4 -2
  98. package/lib/module/components/skeleton/skeleton.js.map +1 -1
  99. package/lib/module/components/slider/slider.js +53 -16
  100. package/lib/module/components/slider/slider.js.map +1 -1
  101. package/lib/module/components/toast/index.js.map +1 -1
  102. package/lib/module/components/toast/toast.js +8 -4
  103. package/lib/module/components/toast/toast.js.map +1 -1
  104. package/lib/module/index.js +1 -1
  105. package/lib/module/index.js.map +1 -1
  106. package/lib/module/internal/glyphs.js +459 -1
  107. package/lib/module/internal/glyphs.js.map +1 -1
  108. package/lib/module/internal/line-icons.js +1 -0
  109. package/lib/module/internal/line-icons.js.map +1 -1
  110. package/lib/module/internal/retry-glyph.js +5 -2
  111. package/lib/module/internal/retry-glyph.js.map +1 -1
  112. package/lib/module/internal/undo-glyph.js +11 -8
  113. package/lib/module/internal/undo-glyph.js.map +1 -1
  114. package/lib/module/sortable/section-board.js +73 -89
  115. package/lib/module/sortable/section-board.js.map +1 -1
  116. package/lib/module/templates/design-pick-template.js +8 -1
  117. package/lib/module/templates/design-pick-template.js.map +1 -1
  118. package/lib/module/templates/index.js +1 -0
  119. package/lib/module/templates/index.js.map +1 -1
  120. package/lib/module/templates/intro-template.js +3 -3
  121. package/lib/module/templates/intro-template.js.map +1 -1
  122. package/lib/module/templates/preview-edit-template.js +422 -0
  123. package/lib/module/templates/preview-edit-template.js.map +1 -0
  124. package/lib/module/templates/result-template.js +2 -1
  125. package/lib/module/templates/result-template.js.map +1 -1
  126. package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -1
  127. package/lib/typescript/src/adjust/axis-adjust.d.ts +25 -0
  128. package/lib/typescript/src/adjust/axis-adjust.d.ts.map +1 -0
  129. package/lib/typescript/src/adjust/axis-tabs.d.ts +15 -0
  130. package/lib/typescript/src/adjust/axis-tabs.d.ts.map +1 -0
  131. package/lib/typescript/src/adjust/axis-wheel.d.ts +15 -0
  132. package/lib/typescript/src/adjust/axis-wheel.d.ts.map +1 -0
  133. package/lib/typescript/src/adjust/index.d.ts +4 -0
  134. package/lib/typescript/src/adjust/index.d.ts.map +1 -1
  135. package/lib/typescript/src/adjust/store-sample.d.ts +46 -0
  136. package/lib/typescript/src/adjust/store-sample.d.ts.map +1 -0
  137. package/lib/typescript/src/blocks/choice-art/choice-art.d.ts +73 -0
  138. package/lib/typescript/src/blocks/choice-art/choice-art.d.ts.map +1 -0
  139. package/lib/typescript/src/blocks/choice-art/index.d.ts +2 -0
  140. package/lib/typescript/src/blocks/choice-art/index.d.ts.map +1 -0
  141. package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts +2 -1
  142. package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts.map +1 -1
  143. package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts +3 -1
  144. package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts.map +1 -1
  145. package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts +11 -0
  146. package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts.map +1 -1
  147. package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts +4 -1
  148. package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts.map +1 -1
  149. package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts +9 -0
  150. package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts.map +1 -1
  151. package/lib/typescript/src/blocks/detail-editor/index.d.ts +3 -2
  152. package/lib/typescript/src/blocks/detail-editor/index.d.ts.map +1 -1
  153. package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts +2 -0
  154. package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts.map +1 -0
  155. package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts +6 -1
  156. package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts.map +1 -1
  157. package/lib/typescript/src/blocks/detail-request/detail-request.d.ts +24 -0
  158. package/lib/typescript/src/blocks/detail-request/detail-request.d.ts.map +1 -0
  159. package/lib/typescript/src/blocks/detail-request/index.d.ts +2 -0
  160. package/lib/typescript/src/blocks/detail-request/index.d.ts.map +1 -0
  161. package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts +12 -0
  162. package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts.map +1 -0
  163. package/lib/typescript/src/blocks/detail-studio/asset-grid.d.ts.map +1 -1
  164. package/lib/typescript/src/blocks/detail-studio/confirm-row.d.ts.map +1 -1
  165. package/lib/typescript/src/blocks/detail-studio/detail-studio-template.d.ts.map +1 -1
  166. package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts +10 -0
  167. package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts.map +1 -0
  168. package/lib/typescript/src/blocks/detail-studio/image-prompt.d.ts.map +1 -1
  169. package/lib/typescript/src/blocks/detail-studio/index.d.ts +7 -5
  170. package/lib/typescript/src/blocks/detail-studio/index.d.ts.map +1 -1
  171. package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts +3 -3
  172. package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts.map +1 -1
  173. package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts +7 -0
  174. package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts.map +1 -0
  175. package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts +9 -0
  176. package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts.map +1 -1
  177. package/lib/typescript/src/blocks/detail-studio/section-kind-grid.d.ts.map +1 -1
  178. package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts +11 -13
  179. package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts.map +1 -1
  180. package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts +6 -2
  181. package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts.map +1 -1
  182. package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts +0 -2
  183. package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts.map +1 -1
  184. package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts +6 -0
  185. package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts.map +1 -0
  186. package/lib/typescript/src/blocks/detail-studio/studio-sheet.d.ts.map +1 -1
  187. package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts +11 -0
  188. package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts.map +1 -0
  189. package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts +14 -0
  190. package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts.map +1 -0
  191. package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts +19 -0
  192. package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts.map +1 -0
  193. package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts +2 -1
  194. package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts.map +1 -1
  195. package/lib/typescript/src/blocks/index.d.ts +2 -0
  196. package/lib/typescript/src/blocks/index.d.ts.map +1 -1
  197. package/lib/typescript/src/components/button/button.d.ts +3 -1
  198. package/lib/typescript/src/components/button/button.d.ts.map +1 -1
  199. package/lib/typescript/src/components/chip/chip.d.ts +2 -1
  200. package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
  201. package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -0
  202. package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
  203. package/lib/typescript/src/components/credit/credit.d.ts +1 -0
  204. package/lib/typescript/src/components/credit/credit.d.ts.map +1 -1
  205. package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +2 -0
  206. package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  207. package/lib/typescript/src/components/page-header/page-header.d.ts +1 -0
  208. package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -1
  209. package/lib/typescript/src/components/segmented-control/segmented-control.d.ts +2 -0
  210. package/lib/typescript/src/components/segmented-control/segmented-control.d.ts.map +1 -1
  211. package/lib/typescript/src/components/skeleton/skeleton.d.ts +2 -1
  212. package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
  213. package/lib/typescript/src/components/slider/slider.d.ts +2 -1
  214. package/lib/typescript/src/components/slider/slider.d.ts.map +1 -1
  215. package/lib/typescript/src/components/toast/index.d.ts +1 -1
  216. package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
  217. package/lib/typescript/src/components/toast/toast.d.ts +4 -1
  218. package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
  219. package/lib/typescript/src/index.d.ts +1 -1
  220. package/lib/typescript/src/index.d.ts.map +1 -1
  221. package/lib/typescript/src/internal/glyphs.d.ts +13 -0
  222. package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
  223. package/lib/typescript/src/internal/line-icons.d.ts +1 -0
  224. package/lib/typescript/src/internal/line-icons.d.ts.map +1 -1
  225. package/lib/typescript/src/internal/retry-glyph.d.ts.map +1 -1
  226. package/lib/typescript/src/internal/undo-glyph.d.ts.map +1 -1
  227. package/lib/typescript/src/sortable/section-board.d.ts.map +1 -1
  228. package/lib/typescript/src/templates/design-pick-template.d.ts.map +1 -1
  229. package/lib/typescript/src/templates/index.d.ts +2 -0
  230. package/lib/typescript/src/templates/index.d.ts.map +1 -1
  231. package/lib/typescript/src/templates/intro-template.d.ts.map +1 -1
  232. package/lib/typescript/src/templates/preview-edit-template.d.ts +39 -0
  233. package/lib/typescript/src/templates/preview-edit-template.d.ts.map +1 -0
  234. package/lib/typescript/src/templates/result-template.d.ts +2 -1
  235. package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
  236. package/package.json +1 -1
  237. package/src/adjust/adjust-template.tsx +1 -0
  238. package/src/adjust/axis-adjust.tsx +206 -0
  239. package/src/adjust/axis-tabs.tsx +81 -0
  240. package/src/adjust/axis-wheel.tsx +309 -0
  241. package/src/adjust/index.ts +15 -0
  242. package/src/adjust/store-sample.tsx +519 -0
  243. package/src/blocks/choice-art/choice-art.tsx +500 -0
  244. package/src/blocks/choice-art/index.ts +29 -0
  245. package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +1 -1
  246. package/src/blocks/detail-editor/compare-slider.tsx +3 -1
  247. package/src/blocks/detail-editor/detail-canvas.tsx +264 -69
  248. package/src/blocks/detail-editor/detail-types.ts +37 -0
  249. package/src/blocks/detail-editor/draft-preview.tsx +46 -2
  250. package/src/blocks/detail-editor/focus-context.ts +13 -0
  251. package/src/blocks/detail-editor/index.ts +11 -1
  252. package/src/blocks/detail-editor/keep-words.ts +36 -0
  253. package/src/blocks/detail-editor/layout-picker.tsx +188 -6
  254. package/src/blocks/detail-request/detail-request.tsx +198 -0
  255. package/src/blocks/detail-request/index.ts +11 -0
  256. package/src/blocks/detail-studio/action-chips.tsx +77 -0
  257. package/src/blocks/detail-studio/adjust-tiles.tsx +3 -3
  258. package/src/blocks/detail-studio/asset-grid.tsx +30 -16
  259. package/src/blocks/detail-studio/confirm-row.tsx +3 -0
  260. package/src/blocks/detail-studio/detail-studio-template.tsx +2 -6
  261. package/src/blocks/detail-studio/edge-fade.tsx +76 -0
  262. package/src/blocks/detail-studio/image-prompt.tsx +6 -9
  263. package/src/blocks/detail-studio/index.ts +19 -16
  264. package/src/blocks/detail-studio/rewrite-tray.tsx +16 -56
  265. package/src/blocks/detail-studio/section-cover.tsx +44 -0
  266. package/src/blocks/detail-studio/section-edit-template.tsx +138 -13
  267. package/src/blocks/detail-studio/section-kind-grid.tsx +2 -2
  268. package/src/blocks/detail-studio/section-settings.tsx +124 -69
  269. package/src/blocks/detail-studio/studio-bar.tsx +61 -41
  270. package/src/blocks/detail-studio/studio-dock.tsx +19 -37
  271. package/src/blocks/detail-studio/studio-glyphs.tsx +77 -0
  272. package/src/blocks/detail-studio/studio-sheet.tsx +7 -3
  273. package/src/blocks/detail-studio/studio-steps.tsx +58 -0
  274. package/src/blocks/detail-studio/studio-toggle.tsx +130 -0
  275. package/src/blocks/detail-studio/studio-tools.tsx +126 -0
  276. package/src/blocks/detail-studio/text-format-panel.tsx +26 -14
  277. package/src/blocks/index.tsx +2 -0
  278. package/src/components/button/button.tsx +12 -5
  279. package/src/components/chip/chip.tsx +9 -1
  280. package/src/components/chip-group/chip-group.tsx +2 -0
  281. package/src/components/credit/credit.tsx +9 -2
  282. package/src/components/dropdown-menu/dropdown-menu.tsx +18 -7
  283. package/src/components/page-header/page-header.tsx +28 -1
  284. package/src/components/segmented-control/segmented-control.tsx +10 -2
  285. package/src/components/skeleton/skeleton.tsx +5 -2
  286. package/src/components/slider/slider.tsx +66 -14
  287. package/src/components/toast/index.ts +1 -0
  288. package/src/components/toast/toast.tsx +12 -4
  289. package/src/index.tsx +13 -0
  290. package/src/internal/glyphs.tsx +411 -0
  291. package/src/internal/line-icons.ts +2 -0
  292. package/src/internal/retry-glyph.tsx +7 -2
  293. package/src/internal/undo-glyph.tsx +12 -11
  294. package/src/sortable/section-board.tsx +71 -76
  295. package/src/templates/design-pick-template.tsx +9 -1
  296. package/src/templates/index.ts +7 -0
  297. package/src/templates/intro-template.tsx +14 -12
  298. package/src/templates/preview-edit-template.tsx +467 -0
  299. package/src/templates/result-template.tsx +3 -0
  300. package/lib/module/blocks/detail-studio/keyboard-bar.js +0 -67
  301. package/lib/module/blocks/detail-studio/keyboard-bar.js.map +0 -1
  302. package/lib/module/blocks/detail-studio/photo-tool-bar.js.map +0 -1
  303. package/lib/module/blocks/detail-studio/section-thumb.js +0 -49
  304. package/lib/module/blocks/detail-studio/section-thumb.js.map +0 -1
  305. package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts +0 -18
  306. package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts.map +0 -1
  307. package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts +0 -19
  308. package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts.map +0 -1
  309. package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts +0 -14
  310. package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts.map +0 -1
  311. package/src/blocks/detail-studio/keyboard-bar.tsx +0 -73
  312. package/src/blocks/detail-studio/photo-tool-bar.tsx +0 -100
  313. package/src/blocks/detail-studio/section-thumb.tsx +0 -41
@@ -0,0 +1,519 @@
1
+ import { useEffect, useRef, type ReactNode } from 'react';
2
+ import {
3
+ Animated,
4
+ Easing,
5
+ Image,
6
+ Platform,
7
+ StyleSheet,
8
+ Text as RNText,
9
+ View,
10
+ type ImageSourcePropType,
11
+ type TextStyle,
12
+ type ViewStyle,
13
+ } from 'react-native';
14
+ import Svg, { Path } from 'react-native-svg';
15
+ import { useReducedMotion } from '../internal/use-reduced-motion';
16
+
17
+ export type StoreSampleScene =
18
+ 'color' | 'motion' | 'shape' | 'style' | 'power' | 'whole';
19
+
20
+ export type StoreSampleLook = {
21
+ surface: string;
22
+ surfaceAlt: string;
23
+ text: string;
24
+ muted: string;
25
+ accent: string;
26
+ onAccent: string;
27
+ radiusSm: number;
28
+ radiusMd: number;
29
+ radiusLg: number;
30
+ button: 'square' | 'rounded' | 'pill';
31
+ gutter: number;
32
+ sectionGap: number;
33
+ autoplay: boolean;
34
+ photoRatio: number;
35
+ tracking: number;
36
+ scale: number;
37
+ weight: 500 | 600 | 700;
38
+ area: 0 | 1 | 2;
39
+ serif: boolean;
40
+ };
41
+
42
+ export type StoreSampleCopy = {
43
+ store: string;
44
+ headline: string;
45
+ hero: string;
46
+ section: string;
47
+ more: string;
48
+ notice: string;
49
+ add: string;
50
+ };
51
+
52
+ export type StoreSampleProps = {
53
+ scene: StoreSampleScene;
54
+ look: StoreSampleLook;
55
+ photos: readonly ImageSourcePropType[];
56
+ hero: ImageSourcePropType;
57
+ copy: StoreSampleCopy;
58
+ width: number;
59
+ height: number;
60
+ fontFamily?: string;
61
+ serifFamily?: string;
62
+ cutout?: boolean;
63
+ };
64
+
65
+ const BASE = 390;
66
+ const PAD = 20;
67
+ const BAR = 56;
68
+ const SMALL = 280;
69
+ const TURN = 3000;
70
+ const SLIDE = 600;
71
+
72
+ const styles = StyleSheet.create({
73
+ root: { overflow: 'hidden' },
74
+ row: { flexDirection: 'row' },
75
+ center: { alignItems: 'center', justifyContent: 'center' },
76
+ between: {
77
+ flexDirection: 'row',
78
+ alignItems: 'center',
79
+ justifyContent: 'space-between',
80
+ },
81
+ lead: {
82
+ flex: 1,
83
+ justifyContent: 'space-between',
84
+ alignItems: 'flex-start',
85
+ paddingRight: 0,
86
+ },
87
+ fill: { flex: 1 },
88
+ strong: { fontWeight: '600' },
89
+ bold: { fontWeight: '700' },
90
+ dots: {
91
+ position: 'absolute',
92
+ left: 0,
93
+ right: 0,
94
+ flexDirection: 'row',
95
+ justifyContent: 'center',
96
+ },
97
+ faded: { opacity: 0.35 },
98
+ clip: { overflow: 'hidden', alignItems: 'center', justifyContent: 'center' },
99
+ inset: { width: '76%', height: '76%' },
100
+ });
101
+
102
+ const serifDefault = Platform.select({
103
+ ios: 'NanumMyeongjo',
104
+ android: 'NanumMyeongjo',
105
+ default: "'Nanum Myeongjo', 'Noto Serif KR', serif",
106
+ });
107
+
108
+ function Glyph({ d, size, color }: { d: string; size: number; color: string }) {
109
+ return (
110
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
111
+ <Path
112
+ d={d}
113
+ stroke={color}
114
+ strokeWidth={1.6}
115
+ strokeLinecap="round"
116
+ strokeLinejoin="round"
117
+ />
118
+ </Svg>
119
+ );
120
+ }
121
+
122
+ const MENU = 'M4 8h16M4 16h16';
123
+ const BAG = 'M5 8h14l1 12H4zM9 8a3 3 0 016 0';
124
+ const HEART =
125
+ 'M12 20s-7.5-4.6-7.5-10.2A4.2 4.2 0 0112 7.2a4.2 4.2 0 017.5 2.6C19.5 15.4 12 20 12 20z';
126
+
127
+ function Shot({
128
+ source,
129
+ box,
130
+ tone,
131
+ cutout,
132
+ }: {
133
+ source: ImageSourcePropType | undefined;
134
+ box: ViewStyle;
135
+ tone: string;
136
+ cutout: boolean;
137
+ }) {
138
+ if (!source) return <View style={[box, { backgroundColor: tone }]} />;
139
+ return cutout ? (
140
+ <View style={[styles.clip, box, { backgroundColor: tone }]}>
141
+ <Image source={source} resizeMode="contain" style={styles.inset} />
142
+ </View>
143
+ ) : (
144
+ <Image
145
+ source={source}
146
+ resizeMode="cover"
147
+ style={[box as never, { backgroundColor: tone }]}
148
+ />
149
+ );
150
+ }
151
+
152
+ function Rail({
153
+ photos,
154
+ side,
155
+ gap,
156
+ pad,
157
+ radius,
158
+ tone,
159
+ play,
160
+ cutout,
161
+ }: {
162
+ photos: readonly ImageSourcePropType[];
163
+ side: number;
164
+ gap: number;
165
+ pad: number;
166
+ radius: number;
167
+ tone: string;
168
+ play: boolean;
169
+ cutout: boolean;
170
+ }) {
171
+ const reduced = useReducedMotion();
172
+ const x = useRef(new Animated.Value(0)).current;
173
+ const running = play && !reduced;
174
+ useEffect(() => {
175
+ if (!running) {
176
+ x.setValue(0);
177
+ return undefined;
178
+ }
179
+ let at = 0;
180
+ const timer = setInterval(() => {
181
+ at = (at + 1) % 3;
182
+ Animated.timing(x, {
183
+ toValue: -at * (side + gap),
184
+ duration: SLIDE,
185
+ easing: Easing.inOut(Easing.cubic),
186
+ useNativeDriver: Platform.OS !== 'web',
187
+ }).start();
188
+ }, TURN);
189
+ return () => clearInterval(timer);
190
+ }, [running, side, gap, x]);
191
+ return (
192
+ <Animated.View
193
+ style={[
194
+ styles.row,
195
+ { gap, paddingLeft: pad, transform: [{ translateX: x }] },
196
+ ]}
197
+ >
198
+ {photos.map((photo, i) => (
199
+ <Shot
200
+ key={i}
201
+ source={photo}
202
+ box={{ width: side, height: side, borderRadius: radius }}
203
+ tone={tone}
204
+ cutout={cutout}
205
+ />
206
+ ))}
207
+ </Animated.View>
208
+ );
209
+ }
210
+
211
+ export function StoreSample({
212
+ scene,
213
+ look,
214
+ photos,
215
+ hero,
216
+ copy,
217
+ width,
218
+ height,
219
+ fontFamily,
220
+ serifFamily = serifDefault,
221
+ cutout = false,
222
+ }: StoreSampleProps) {
223
+ const k = width / BASE;
224
+ const px = (n: number) => n * k;
225
+ const tall = height / k;
226
+ const small = tall < SMALL;
227
+ const inner = BASE - PAD * 2;
228
+ const cell = (inner - look.gutter) / 2;
229
+ const family = look.serif ? serifFamily : fontFamily;
230
+ const round = (h: number) =>
231
+ look.button === 'pill'
232
+ ? h / 2
233
+ : look.button === 'square'
234
+ ? look.radiusSm
235
+ : look.radiusMd;
236
+ const title = (size: number): TextStyle => ({
237
+ fontFamily: family,
238
+ fontSize: px(size),
239
+ lineHeight: px(size + 10),
240
+ letterSpacing: px(size * look.tracking),
241
+ fontWeight: String(look.weight) as TextStyle['fontWeight'],
242
+ color: look.text,
243
+ });
244
+ const photo = (i: number, w: number, h: number, radius = look.radiusLg) => (
245
+ <Shot
246
+ key={i}
247
+ source={photos[i % Math.max(1, photos.length)]}
248
+ box={{ width: px(w), height: px(h), borderRadius: px(radius) }}
249
+ tone={look.surfaceAlt}
250
+ cutout={cutout}
251
+ />
252
+ );
253
+ const pair = (first: number, h: number) => (
254
+ <View
255
+ style={[styles.row, { gap: px(look.gutter), paddingHorizontal: px(PAD) }]}
256
+ >
257
+ {photo(first, cell, h)}
258
+ {photo(first + 1, cell, h)}
259
+ </View>
260
+ );
261
+ const button = (label: string, h: number, size: number, flip = false) => (
262
+ <View
263
+ style={[
264
+ styles.center,
265
+ {
266
+ height: px(h),
267
+ paddingHorizontal: px(22),
268
+ borderRadius: px(round(h)),
269
+ backgroundColor: flip ? look.onAccent : look.accent,
270
+ },
271
+ ]}
272
+ >
273
+ <RNText
274
+ allowFontScaling={false}
275
+ style={[
276
+ styles.strong,
277
+ {
278
+ fontFamily,
279
+ fontSize: px(size),
280
+ color: flip ? look.accent : look.onAccent,
281
+ },
282
+ ]}
283
+ >
284
+ {label}
285
+ </RNText>
286
+ </View>
287
+ );
288
+ const bar = (
289
+ <View
290
+ style={[styles.between, { height: px(BAR), paddingHorizontal: px(PAD) }]}
291
+ >
292
+ <Glyph d={MENU} size={px(22)} color={look.text} />
293
+ <RNText allowFontScaling={false} style={[title(20), styles.bold]}>
294
+ {copy.store}
295
+ </RNText>
296
+ <Glyph d={BAG} size={px(22)} color={look.text} />
297
+ </View>
298
+ );
299
+ const strong = look.area === 2;
300
+ const heroHeight =
301
+ scene === 'whole'
302
+ ? 252
303
+ : Math.min(300, Math.max(130, tall - (small ? 44 : 58)));
304
+ const heroBlock = (
305
+ <View
306
+ style={[
307
+ styles.row,
308
+ {
309
+ height: px(heroHeight),
310
+ backgroundColor: strong ? look.accent : look.surfaceAlt,
311
+ },
312
+ ]}
313
+ >
314
+ <View
315
+ style={[
316
+ styles.lead,
317
+ {
318
+ paddingVertical: px(small ? 14 : 20),
319
+ paddingLeft: px(small ? 14 : 20),
320
+ },
321
+ ]}
322
+ >
323
+ <RNText
324
+ allowFontScaling={false}
325
+ style={[
326
+ title(Math.round((small ? 12.6 : 16) * Math.pow(look.scale, 3.6))),
327
+ strong && { color: look.onAccent },
328
+ ]}
329
+ >
330
+ {copy.hero}
331
+ </RNText>
332
+ {button(copy.more, small ? 36 : 48, 15, strong)}
333
+ </View>
334
+ <Shot
335
+ source={photos[2 % Math.max(1, photos.length)]}
336
+ box={{ width: px(178), height: '100%' }}
337
+ tone={strong ? look.accent : look.surfaceAlt}
338
+ cutout={cutout}
339
+ />
340
+ </View>
341
+ );
342
+ const band = (
343
+ <View
344
+ style={[
345
+ styles.center,
346
+ {
347
+ height: px(48),
348
+ backgroundColor: look.area === 0 ? look.surface : look.accent,
349
+ },
350
+ ]}
351
+ >
352
+ <RNText
353
+ allowFontScaling={false}
354
+ style={[
355
+ styles.strong,
356
+ {
357
+ fontFamily,
358
+ fontSize: px(15),
359
+ color: look.area === 0 ? look.muted : look.onAccent,
360
+ },
361
+ ]}
362
+ >
363
+ {copy.notice}
364
+ </RNText>
365
+ </View>
366
+ );
367
+ const sectionTitle = (
368
+ <RNText
369
+ allowFontScaling={false}
370
+ style={[
371
+ title(Math.round(16 * Math.pow(look.scale, 2))),
372
+ { paddingHorizontal: px(PAD), paddingBottom: px(14) },
373
+ ]}
374
+ >
375
+ {copy.section}
376
+ </RNText>
377
+ );
378
+
379
+ let body: ReactNode;
380
+ if (scene === 'color') {
381
+ const h = Math.max(70, (tall - BAR - look.gutter - PAD) / 2);
382
+ body = (
383
+ <>
384
+ {bar}
385
+ <View style={{ gap: px(look.gutter) }}>
386
+ {pair(0, h)}
387
+ {pair(2, h)}
388
+ </View>
389
+ </>
390
+ );
391
+ } else if (scene === 'motion') {
392
+ const side = Math.max(64, Math.min(230, tall * 0.42));
393
+ body = (
394
+ <View style={{ paddingTop: px(PAD), gap: px(look.sectionGap) }}>
395
+ <View>
396
+ <Rail
397
+ photos={[0, 1, 3, 2].map(
398
+ (i) => photos[i % Math.max(1, photos.length)]!
399
+ )}
400
+ side={px(side)}
401
+ gap={px(look.gutter)}
402
+ pad={px(PAD)}
403
+ radius={px(look.radiusLg)}
404
+ tone={look.surfaceAlt}
405
+ play={look.autoplay}
406
+ cutout={cutout}
407
+ />
408
+ {look.autoplay ? (
409
+ <View style={[styles.dots, { bottom: -px(PAD), gap: px(6) }]}>
410
+ {[0, 1, 2].map((i) => (
411
+ <View
412
+ key={i}
413
+ style={[
414
+ {
415
+ width: px(i ? 6 : 18),
416
+ height: px(6),
417
+ borderRadius: px(3),
418
+ backgroundColor: i ? look.muted : look.accent,
419
+ },
420
+ i > 0 && styles.faded,
421
+ ]}
422
+ />
423
+ ))}
424
+ </View>
425
+ ) : null}
426
+ </View>
427
+ {pair(2, cell)}
428
+ </View>
429
+ );
430
+ } else if (scene === 'shape') {
431
+ const h = Math.max(70, tall - PAD * 3 - 56);
432
+ body = (
433
+ <View style={{ padding: px(PAD), gap: px(PAD) }}>
434
+ <Shot
435
+ source={hero}
436
+ box={{
437
+ width: px(inner),
438
+ height: px(h),
439
+ borderRadius: px(look.radiusLg),
440
+ }}
441
+ tone={look.surfaceAlt}
442
+ cutout={cutout}
443
+ />
444
+ <View style={[styles.row, { gap: px(10) }]}>
445
+ <View
446
+ style={[
447
+ styles.center,
448
+ {
449
+ width: px(56),
450
+ height: px(56),
451
+ borderRadius: px(round(56)),
452
+ backgroundColor: look.surfaceAlt,
453
+ },
454
+ ]}
455
+ >
456
+ <Glyph d={HEART} size={px(24)} color={look.text} />
457
+ </View>
458
+ <View style={styles.fill}>{button(copy.add, 56, 17)}</View>
459
+ </View>
460
+ </View>
461
+ );
462
+ } else if (scene === 'style') {
463
+ const w = Math.min(260, Math.max(90, (tall - 110) / 1.25));
464
+ body = (
465
+ <View style={{ paddingTop: px(22) }}>
466
+ <RNText
467
+ allowFontScaling={false}
468
+ numberOfLines={1}
469
+ style={[title(small ? 26 : 30), { paddingHorizontal: px(PAD) }]}
470
+ >
471
+ {copy.headline}
472
+ </RNText>
473
+ <View
474
+ style={[
475
+ styles.row,
476
+ {
477
+ gap: px(look.gutter),
478
+ paddingLeft: px(PAD),
479
+ paddingTop: px(16),
480
+ },
481
+ ]}
482
+ >
483
+ {[1, 0, 3].map((i) =>
484
+ photo(i, w, w / look.photoRatio, Math.min(look.radiusLg, w / 4))
485
+ )}
486
+ </View>
487
+ </View>
488
+ );
489
+ } else if (scene === 'power') {
490
+ body = (
491
+ <>
492
+ {heroBlock}
493
+ {band}
494
+ <View style={{ paddingTop: px(22) }}>{sectionTitle}</View>
495
+ {pair(0, cell)}
496
+ </>
497
+ );
498
+ } else {
499
+ body = (
500
+ <>
501
+ {bar}
502
+ {heroBlock}
503
+ {band}
504
+ <View style={{ paddingTop: px(look.sectionGap) }}>
505
+ {sectionTitle}
506
+ {pair(1, cell / look.photoRatio)}
507
+ </View>
508
+ </>
509
+ );
510
+ }
511
+ return (
512
+ <View
513
+ pointerEvents="none"
514
+ style={[styles.root, { width, height, backgroundColor: look.surface }]}
515
+ >
516
+ {body}
517
+ </View>
518
+ );
519
+ }