lookbook 2.3.4 → 2.3.13

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 (468) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/components/lookbook/base_component.rb +1 -0
  4. data/app/components/lookbook/button/component.html.erb +11 -12
  5. data/app/components/lookbook/button/component.js +19 -24
  6. data/app/components/lookbook/button/component.rb +4 -0
  7. data/app/components/lookbook/button_group/component.html.erb +1 -1
  8. data/app/components/lookbook/code/component.html.erb +1 -1
  9. data/app/components/lookbook/copy_button/component.html.erb +1 -1
  10. data/app/components/lookbook/debug_menu/component.html.erb +1 -1
  11. data/app/components/lookbook/dimensions_display/component.html.erb +2 -2
  12. data/app/components/lookbook/display_options/editor/component.html.erb +1 -1
  13. data/app/components/lookbook/display_options/field/component.html.erb +1 -1
  14. data/app/components/lookbook/embed/component.html.erb +1 -1
  15. data/app/components/lookbook/file_source/component.html.erb +1 -1
  16. data/app/components/lookbook/filter/component.html.erb +2 -2
  17. data/app/components/lookbook/icon_button/component.html.erb +2 -2
  18. data/app/components/lookbook/inspector_panel/component.html.erb +1 -1
  19. data/app/components/lookbook/logo/component.html.erb +1 -1
  20. data/app/components/lookbook/message/component.html.erb +1 -1
  21. data/app/components/lookbook/nav/component.html.erb +1 -1
  22. data/app/components/lookbook/nav/directory/component.html.erb +1 -1
  23. data/app/components/lookbook/nav/entity/component.html.erb +1 -1
  24. data/app/components/lookbook/page_tabs/component.html.erb +1 -1
  25. data/app/components/lookbook/params/editor/component.html.erb +1 -1
  26. data/app/components/lookbook/params/editor/component.rb +1 -1
  27. data/app/components/lookbook/params/field/component.rb +1 -1
  28. data/app/components/lookbook/prose/component.html.erb +1 -1
  29. data/app/components/lookbook/split_layout/component.html.erb +1 -1
  30. data/app/components/lookbook/tab_panels/component.html.erb +1 -1
  31. data/app/components/lookbook/tab_panels/component.rb +1 -1
  32. data/app/components/lookbook/tab_panels/panel/component.html.erb +1 -1
  33. data/app/components/lookbook/tabs/component.html.erb +1 -1
  34. data/app/components/lookbook/tabs/dropdown_tab/component.html.erb +1 -1
  35. data/app/components/lookbook/tabs/tab/component.html.erb +1 -1
  36. data/app/components/lookbook/text_button/component.html.erb +2 -2
  37. data/app/components/lookbook/toolbar/component.html.erb +1 -1
  38. data/app/controllers/lookbook/application_controller.rb +17 -0
  39. data/app/controllers/lookbook/previews_controller.rb +11 -7
  40. data/app/views/layouts/lookbook/application.html.erb +3 -3
  41. data/app/views/layouts/lookbook/embed.html.erb +1 -1
  42. data/app/views/layouts/lookbook/skeleton.html.erb +2 -0
  43. data/app/views/lookbook/embeds/show.html.erb +1 -1
  44. data/app/views/lookbook/errors/default.html.erb +1 -1
  45. data/app/views/lookbook/errors/not_found.html.erb +1 -1
  46. data/app/views/lookbook/index.html.erb +1 -1
  47. data/app/views/lookbook/inspector/inputs/_color.html.erb +1 -1
  48. data/app/views/lookbook/inspector/inputs/_range.html.erb +1 -1
  49. data/app/views/lookbook/inspector/inputs/_select.html.erb +1 -1
  50. data/app/views/lookbook/inspector/inputs/_text.html.erb +1 -1
  51. data/app/views/lookbook/inspector/inputs/_text_two_step.html.erb +1 -1
  52. data/app/views/lookbook/inspector/inputs/_textarea.html.erb +1 -1
  53. data/app/views/lookbook/inspector/panels/_notes.html.erb +2 -2
  54. data/app/views/lookbook/inspector/panels/_output.html.erb +1 -1
  55. data/app/views/lookbook/inspector/panels/_preview.html.erb +1 -1
  56. data/app/views/lookbook/inspector/panels/_source.html.erb +1 -1
  57. data/app/views/lookbook/inspector/show.html.erb +4 -4
  58. data/app/views/lookbook/pages/show.html.erb +1 -1
  59. data/app/views/lookbook/partials/_iframe_content_scripts.html.erb +1 -1
  60. data/app/views/lookbook/partials/_user_styles.html.erb +1 -1
  61. data/app/views/lookbook/previews/group.html.erb +1 -1
  62. data/app/views/lookbook/previews/preview.html.erb +5 -1
  63. data/app/views/lookbook/previews/show.html.erb +1 -1
  64. data/config/app.yml +1 -1
  65. data/lib/lookbook/engine.rb +42 -18
  66. data/lib/lookbook/preview_controller_actions.rb +7 -2
  67. data/lib/lookbook/preview_parser.rb +2 -4
  68. data/lib/lookbook/services/markdown_renderer.rb +12 -4
  69. data/lib/lookbook/stores/config_store.rb +4 -0
  70. data/lib/lookbook/support/errors/config_error.rb +1 -1
  71. data/lib/lookbook/support/errors/parser_error.rb +1 -1
  72. data/lib/lookbook/support/errors/preview_template_error.rb +1 -1
  73. data/lib/lookbook/support/errors/template_error.rb +1 -1
  74. data/lib/lookbook/support/store.rb +1 -1
  75. data/lib/lookbook/support/utils/utils.rb +1 -1
  76. data/lib/lookbook/tags/param_tag.rb +4 -1
  77. data/lib/lookbook/tags/yard_tag.rb +1 -1
  78. data/lib/lookbook/version.rb +1 -1
  79. data/public/lookbook-assets/css/lookbook.css +131 -136
  80. data/public/lookbook-assets/css/lookbook.css.map +1 -1
  81. data/public/lookbook-assets/css/themes/blue.css +0 -1
  82. data/public/lookbook-assets/css/themes/green.css +0 -1
  83. data/public/lookbook-assets/css/themes/indigo.css +0 -1
  84. data/public/lookbook-assets/css/themes/rose.css +0 -1
  85. data/public/lookbook-assets/css/themes/zinc.css +0 -1
  86. data/public/lookbook-assets/js/iframe.js +205 -196
  87. data/public/lookbook-assets/js/iframe.js.map +1 -1
  88. data/public/lookbook-assets/js/index.js +1171 -1025
  89. data/public/lookbook-assets/js/index.js.map +1 -1
  90. data/public/lookbook-assets/js/lookbook-core.js +0 -37
  91. data/public/lookbook-assets/js/lookbook.js +277 -296
  92. metadata +4 -385
  93. data/assets/icons/activity-square.svg +0 -1
  94. data/assets/icons/ampersand.svg +0 -1
  95. data/assets/icons/ampersands.svg +0 -1
  96. data/assets/icons/antenna.svg +0 -1
  97. data/assets/icons/app-window.svg +0 -1
  98. data/assets/icons/archive-x.svg +0 -1
  99. data/assets/icons/area-chart.svg +0 -1
  100. data/assets/icons/arrow-big-down-dash.svg +0 -1
  101. data/assets/icons/arrow-big-left-dash.svg +0 -1
  102. data/assets/icons/arrow-big-right-dash.svg +0 -1
  103. data/assets/icons/arrow-big-up-dash.svg +0 -1
  104. data/assets/icons/arrow-down-0-1.svg +0 -1
  105. data/assets/icons/arrow-down-1-0.svg +0 -1
  106. data/assets/icons/arrow-down-a-z.svg +0 -1
  107. data/assets/icons/arrow-down-from-line.svg +0 -1
  108. data/assets/icons/arrow-down-left-from-circle.svg +0 -1
  109. data/assets/icons/arrow-down-left-square.svg +0 -1
  110. data/assets/icons/arrow-down-narrow-wide.svg +0 -1
  111. data/assets/icons/arrow-down-right-from-circle.svg +0 -1
  112. data/assets/icons/arrow-down-right-square.svg +0 -1
  113. data/assets/icons/arrow-down-square.svg +0 -1
  114. data/assets/icons/arrow-down-to-dot.svg +0 -1
  115. data/assets/icons/arrow-down-to-line.svg +0 -1
  116. data/assets/icons/arrow-down-up.svg +0 -1
  117. data/assets/icons/arrow-down-wide-narrow.svg +0 -1
  118. data/assets/icons/arrow-down-z-a.svg +0 -1
  119. data/assets/icons/arrow-left-from-line.svg +0 -1
  120. data/assets/icons/arrow-left-square.svg +0 -1
  121. data/assets/icons/arrow-left-to-line.svg +0 -1
  122. data/assets/icons/arrow-right-from-line.svg +0 -1
  123. data/assets/icons/arrow-right-left.svg +0 -1
  124. data/assets/icons/arrow-right-square.svg +0 -1
  125. data/assets/icons/arrow-right-to-line.svg +0 -1
  126. data/assets/icons/arrow-up-0-1.svg +0 -1
  127. data/assets/icons/arrow-up-1-0.svg +0 -1
  128. data/assets/icons/arrow-up-a-z.svg +0 -1
  129. data/assets/icons/arrow-up-from-dot.svg +0 -1
  130. data/assets/icons/arrow-up-from-line.svg +0 -1
  131. data/assets/icons/arrow-up-left-from-circle.svg +0 -1
  132. data/assets/icons/arrow-up-left-square.svg +0 -1
  133. data/assets/icons/arrow-up-narrow-wide.svg +0 -1
  134. data/assets/icons/arrow-up-right-from-circle.svg +0 -1
  135. data/assets/icons/arrow-up-right-square.svg +0 -1
  136. data/assets/icons/arrow-up-square.svg +0 -1
  137. data/assets/icons/arrow-up-to-line.svg +0 -1
  138. data/assets/icons/arrow-up-wide-narrow.svg +0 -1
  139. data/assets/icons/arrow-up-z-a.svg +0 -1
  140. data/assets/icons/arrows-up-from-line.svg +0 -1
  141. data/assets/icons/atom.svg +0 -1
  142. data/assets/icons/badge-alert.svg +0 -1
  143. data/assets/icons/badge-cent.svg +0 -1
  144. data/assets/icons/badge-check.svg +0 -1
  145. data/assets/icons/badge-dollar-sign.svg +0 -1
  146. data/assets/icons/badge-euro.svg +0 -1
  147. data/assets/icons/badge-help.svg +0 -1
  148. data/assets/icons/badge-indian-rupee.svg +0 -1
  149. data/assets/icons/badge-info.svg +0 -1
  150. data/assets/icons/badge-japanese-yen.svg +0 -1
  151. data/assets/icons/badge-minus.svg +0 -1
  152. data/assets/icons/badge-percent.svg +0 -1
  153. data/assets/icons/badge-plus.svg +0 -1
  154. data/assets/icons/badge-pound-sterling.svg +0 -1
  155. data/assets/icons/badge-russian-ruble.svg +0 -1
  156. data/assets/icons/badge-swiss-franc.svg +0 -1
  157. data/assets/icons/badge-x.svg +0 -1
  158. data/assets/icons/badge.svg +0 -1
  159. data/assets/icons/ban.svg +0 -1
  160. data/assets/icons/bar-chart-big.svg +0 -1
  161. data/assets/icons/bar-chart-horizontal-big.svg +0 -1
  162. data/assets/icons/bell-dot.svg +0 -1
  163. data/assets/icons/biohazard.svg +0 -1
  164. data/assets/icons/blocks.svg +0 -1
  165. data/assets/icons/book-copy.svg +0 -1
  166. data/assets/icons/book-down.svg +0 -1
  167. data/assets/icons/book-key.svg +0 -1
  168. data/assets/icons/book-lock.svg +0 -1
  169. data/assets/icons/book-marked.svg +0 -1
  170. data/assets/icons/book-minus.svg +0 -1
  171. data/assets/icons/book-plus.svg +0 -1
  172. data/assets/icons/book-template.svg +0 -1
  173. data/assets/icons/book-up-2.svg +0 -1
  174. data/assets/icons/book-up.svg +0 -1
  175. data/assets/icons/book-x.svg +0 -1
  176. data/assets/icons/bookmark-check.svg +0 -1
  177. data/assets/icons/bookmark-x.svg +0 -1
  178. data/assets/icons/boom-box.svg +0 -1
  179. data/assets/icons/braces.svg +0 -1
  180. data/assets/icons/brackets.svg +0 -1
  181. data/assets/icons/brain-circuit.svg +0 -1
  182. data/assets/icons/brain-cog.svg +0 -1
  183. data/assets/icons/brain.svg +0 -1
  184. data/assets/icons/bring-to-front.svg +0 -1
  185. data/assets/icons/bug-off.svg +0 -1
  186. data/assets/icons/bug-play.svg +0 -1
  187. data/assets/icons/bus-front.svg +0 -1
  188. data/assets/icons/cable-car.svg +0 -1
  189. data/assets/icons/cable.svg +0 -1
  190. data/assets/icons/cake-slice.svg +0 -1
  191. data/assets/icons/candlestick-chart.svg +0 -1
  192. data/assets/icons/candy-cane.svg +0 -1
  193. data/assets/icons/car-front.svg +0 -1
  194. data/assets/icons/car-taxi-front.svg +0 -1
  195. data/assets/icons/case-lower.svg +0 -1
  196. data/assets/icons/case-sensitive.svg +0 -1
  197. data/assets/icons/case-upper.svg +0 -1
  198. data/assets/icons/cassette-tape.svg +0 -1
  199. data/assets/icons/castle.svg +0 -1
  200. data/assets/icons/chevron-down-circle.svg +0 -1
  201. data/assets/icons/chevron-down-square.svg +0 -1
  202. data/assets/icons/chevron-left-circle.svg +0 -1
  203. data/assets/icons/chevron-left-square.svg +0 -1
  204. data/assets/icons/chevron-right-circle.svg +0 -1
  205. data/assets/icons/chevron-right-square.svg +0 -1
  206. data/assets/icons/chevron-up-circle.svg +0 -1
  207. data/assets/icons/chevron-up-square.svg +0 -1
  208. data/assets/icons/church.svg +0 -1
  209. data/assets/icons/circle-dashed.svg +0 -1
  210. data/assets/icons/circle-dollar-sign.svg +0 -1
  211. data/assets/icons/circle-dot-dashed.svg +0 -1
  212. data/assets/icons/circle-equal.svg +0 -1
  213. data/assets/icons/circle-off.svg +0 -1
  214. data/assets/icons/circle-slash-2.svg +0 -1
  215. data/assets/icons/circle-slash.svg +0 -1
  216. data/assets/icons/circuit-board.svg +0 -1
  217. data/assets/icons/clipboard-paste.svg +0 -1
  218. data/assets/icons/club.svg +0 -1
  219. data/assets/icons/combine.svg +0 -1
  220. data/assets/icons/computer.svg +0 -1
  221. data/assets/icons/contact-2.svg +0 -1
  222. data/assets/icons/container.svg +0 -1
  223. data/assets/icons/copy-check.svg +0 -1
  224. data/assets/icons/copy-minus.svg +0 -1
  225. data/assets/icons/copy-plus.svg +0 -1
  226. data/assets/icons/copy-slash.svg +0 -1
  227. data/assets/icons/copy-x.svg +0 -1
  228. data/assets/icons/database-zap.svg +0 -1
  229. data/assets/icons/dessert.svg +0 -1
  230. data/assets/icons/disc-2.svg +0 -1
  231. data/assets/icons/disc-3.svg +0 -1
  232. data/assets/icons/donut.svg +0 -1
  233. data/assets/icons/door-closed.svg +0 -1
  234. data/assets/icons/door-open.svg +0 -1
  235. data/assets/icons/dot.svg +0 -1
  236. data/assets/icons/drama.svg +0 -1
  237. data/assets/icons/ferris-wheel.svg +0 -1
  238. data/assets/icons/file-code-2.svg +0 -1
  239. data/assets/icons/file-stack.svg +0 -1
  240. data/assets/icons/fish-symbol.svg +0 -1
  241. data/assets/icons/fold-horizontal.svg +0 -1
  242. data/assets/icons/fold-vertical.svg +0 -1
  243. data/assets/icons/folder-dot.svg +0 -1
  244. data/assets/icons/folder-git-2.svg +0 -1
  245. data/assets/icons/folder-git.svg +0 -1
  246. data/assets/icons/folder-kanban.svg +0 -1
  247. data/assets/icons/folder-open-dot.svg +0 -1
  248. data/assets/icons/folder-root.svg +0 -1
  249. data/assets/icons/folder-sync.svg +0 -1
  250. data/assets/icons/gallery-horizontal-end.svg +0 -1
  251. data/assets/icons/gallery-horizontal.svg +0 -1
  252. data/assets/icons/gallery-thumbnails.svg +0 -1
  253. data/assets/icons/gallery-vertical-end.svg +0 -1
  254. data/assets/icons/gallery-vertical.svg +0 -1
  255. data/assets/icons/gantt-chart-square.svg +0 -1
  256. data/assets/icons/gantt-chart.svg +0 -1
  257. data/assets/icons/gauge-circle.svg +0 -1
  258. data/assets/icons/goal.svg +0 -1
  259. data/assets/icons/grid-2x2.svg +0 -1
  260. data/assets/icons/grid-3x3.svg +0 -1
  261. data/assets/icons/group.svg +0 -1
  262. data/assets/icons/hard-drive-download.svg +0 -1
  263. data/assets/icons/hard-drive-upload.svg +0 -1
  264. data/assets/icons/hdmi-port.svg +0 -1
  265. data/assets/icons/hotel.svg +0 -1
  266. data/assets/icons/iteration-ccw.svg +0 -1
  267. data/assets/icons/iteration-cw.svg +0 -1
  268. data/assets/icons/kanban-square-dashed.svg +0 -1
  269. data/assets/icons/kanban-square.svg +0 -1
  270. data/assets/icons/kanban.svg +0 -1
  271. data/assets/icons/key-round.svg +0 -1
  272. data/assets/icons/key-square.svg +0 -1
  273. data/assets/icons/layout-panel-left.svg +0 -1
  274. data/assets/icons/layout-panel-top.svg +0 -1
  275. data/assets/icons/leafy-green.svg +0 -1
  276. data/assets/icons/ligature.svg +0 -1
  277. data/assets/icons/list-filter.svg +0 -1
  278. data/assets/icons/list-restart.svg +0 -1
  279. data/assets/icons/list-todo.svg +0 -1
  280. data/assets/icons/list-tree.svg +0 -1
  281. data/assets/icons/lollipop.svg +0 -1
  282. data/assets/icons/m-square.svg +0 -1
  283. data/assets/icons/mailbox.svg +0 -1
  284. data/assets/icons/memory-stick.svg +0 -1
  285. data/assets/icons/menu-square.svg +0 -1
  286. data/assets/icons/merge.svg +0 -1
  287. data/assets/icons/message-square-dashed.svg +0 -1
  288. data/assets/icons/message-square-plus.svg +0 -1
  289. data/assets/icons/messages-square.svg +0 -1
  290. data/assets/icons/monitor-check.svg +0 -1
  291. data/assets/icons/monitor-dot.svg +0 -1
  292. data/assets/icons/monitor-down.svg +0 -1
  293. data/assets/icons/monitor-pause.svg +0 -1
  294. data/assets/icons/monitor-play.svg +0 -1
  295. data/assets/icons/monitor-stop.svg +0 -1
  296. data/assets/icons/monitor-up.svg +0 -1
  297. data/assets/icons/monitor-x.svg +0 -1
  298. data/assets/icons/moon-star.svg +0 -1
  299. data/assets/icons/mouse-pointer-square-dashed.svg +0 -1
  300. data/assets/icons/mouse-pointer-square.svg +0 -1
  301. data/assets/icons/move-down-left.svg +0 -1
  302. data/assets/icons/move-down-right.svg +0 -1
  303. data/assets/icons/move-down.svg +0 -1
  304. data/assets/icons/move-left.svg +0 -1
  305. data/assets/icons/move-right.svg +0 -1
  306. data/assets/icons/move-up-left.svg +0 -1
  307. data/assets/icons/move-up-right.svg +0 -1
  308. data/assets/icons/move-up.svg +0 -1
  309. data/assets/icons/orbit.svg +0 -1
  310. data/assets/icons/panel-bottom-close.svg +0 -1
  311. data/assets/icons/panel-bottom-inactive.svg +0 -1
  312. data/assets/icons/panel-bottom-open.svg +0 -1
  313. data/assets/icons/panel-bottom.svg +0 -1
  314. data/assets/icons/panel-left-close.svg +0 -1
  315. data/assets/icons/panel-left-inactive.svg +0 -1
  316. data/assets/icons/panel-left-open.svg +0 -1
  317. data/assets/icons/panel-left.svg +0 -1
  318. data/assets/icons/panel-right-close.svg +0 -1
  319. data/assets/icons/panel-right-inactive.svg +0 -1
  320. data/assets/icons/panel-right-open.svg +0 -1
  321. data/assets/icons/panel-right.svg +0 -1
  322. data/assets/icons/panel-top-close.svg +0 -1
  323. data/assets/icons/panel-top-inactive.svg +0 -1
  324. data/assets/icons/panel-top-open.svg +0 -1
  325. data/assets/icons/panel-top.svg +0 -1
  326. data/assets/icons/parentheses.svg +0 -1
  327. data/assets/icons/parking-circle-off.svg +0 -1
  328. data/assets/icons/parking-circle.svg +0 -1
  329. data/assets/icons/parking-meter.svg +0 -1
  330. data/assets/icons/parking-square-off.svg +0 -1
  331. data/assets/icons/parking-square.svg +0 -1
  332. data/assets/icons/paw-print.svg +0 -1
  333. data/assets/icons/pc-case.svg +0 -1
  334. data/assets/icons/pen-line.svg +0 -1
  335. data/assets/icons/pen-square.svg +0 -1
  336. data/assets/icons/pen.svg +0 -1
  337. data/assets/icons/pencil-line.svg +0 -1
  338. data/assets/icons/pencil-ruler.svg +0 -1
  339. data/assets/icons/percent-circle.svg +0 -1
  340. data/assets/icons/percent-diamond.svg +0 -1
  341. data/assets/icons/percent-square.svg +0 -1
  342. data/assets/icons/pi-square.svg +0 -1
  343. data/assets/icons/pi.svg +0 -1
  344. data/assets/icons/pilcrow-square.svg +0 -1
  345. data/assets/icons/plane-landing.svg +0 -1
  346. data/assets/icons/plane-takeoff.svg +0 -1
  347. data/assets/icons/play-square.svg +0 -1
  348. data/assets/icons/plug-zap-2.svg +0 -1
  349. data/assets/icons/pocket-knife.svg +0 -1
  350. data/assets/icons/popcorn.svg +0 -1
  351. data/assets/icons/popsicle.svg +0 -1
  352. data/assets/icons/presentation.svg +0 -1
  353. data/assets/icons/projector.svg +0 -1
  354. data/assets/icons/rabbit.svg +0 -1
  355. data/assets/icons/radar.svg +0 -1
  356. data/assets/icons/radiation.svg +0 -1
  357. data/assets/icons/radio-tower.svg +0 -1
  358. data/assets/icons/rail-symbol.svg +0 -1
  359. data/assets/icons/rainbow.svg +0 -1
  360. data/assets/icons/rat.svg +0 -1
  361. data/assets/icons/ratio.svg +0 -1
  362. data/assets/icons/receipt.svg +0 -1
  363. data/assets/icons/redo-dot.svg +0 -1
  364. data/assets/icons/refresh-ccw-dot.svg +0 -1
  365. data/assets/icons/refresh-cw-off.svg +0 -1
  366. data/assets/icons/repeat-2.svg +0 -1
  367. data/assets/icons/replace-all.svg +0 -1
  368. data/assets/icons/replace.svg +0 -1
  369. data/assets/icons/roller-coaster.svg +0 -1
  370. data/assets/icons/rows.svg +0 -1
  371. data/assets/icons/satellite-dish.svg +0 -1
  372. data/assets/icons/satellite.svg +0 -1
  373. data/assets/icons/save-all.svg +0 -1
  374. data/assets/icons/scatter-chart.svg +0 -1
  375. data/assets/icons/school-2.svg +0 -1
  376. data/assets/icons/school.svg +0 -1
  377. data/assets/icons/scissors-line-dashed.svg +0 -1
  378. data/assets/icons/scissors-square-dashed-bottom.svg +0 -1
  379. data/assets/icons/scissors-square.svg +0 -1
  380. data/assets/icons/scroll-text.svg +0 -1
  381. data/assets/icons/search-check.svg +0 -1
  382. data/assets/icons/search-code.svg +0 -1
  383. data/assets/icons/search-slash.svg +0 -1
  384. data/assets/icons/search-x.svg +0 -1
  385. data/assets/icons/send-horizontal.svg +0 -1
  386. data/assets/icons/send-to-back.svg +0 -1
  387. data/assets/icons/shapes.svg +0 -1
  388. data/assets/icons/shell.svg +0 -1
  389. data/assets/icons/shield-ban.svg +0 -1
  390. data/assets/icons/shield-ellipsis.svg +0 -1
  391. data/assets/icons/shield-half.svg +0 -1
  392. data/assets/icons/shield-minus.svg +0 -1
  393. data/assets/icons/shield-plus.svg +0 -1
  394. data/assets/icons/shield-question.svg +0 -1
  395. data/assets/icons/shield-x.svg +0 -1
  396. data/assets/icons/ship-wheel.svg +0 -1
  397. data/assets/icons/shopping-basket.svg +0 -1
  398. data/assets/icons/sigma-square.svg +0 -1
  399. data/assets/icons/snail.svg +0 -1
  400. data/assets/icons/space.svg +0 -1
  401. data/assets/icons/spade.svg +0 -1
  402. data/assets/icons/sparkle.svg +0 -1
  403. data/assets/icons/sparkles.svg +0 -1
  404. data/assets/icons/speech.svg +0 -1
  405. data/assets/icons/spell-check-2.svg +0 -1
  406. data/assets/icons/spell-check.svg +0 -1
  407. data/assets/icons/split.svg +0 -1
  408. data/assets/icons/spray-can.svg +0 -1
  409. data/assets/icons/square-asterisk.svg +0 -1
  410. data/assets/icons/square-code.svg +0 -1
  411. data/assets/icons/square-dashed-bottom-code.svg +0 -1
  412. data/assets/icons/square-dashed-bottom.svg +0 -1
  413. data/assets/icons/square-dot.svg +0 -1
  414. data/assets/icons/square-equal.svg +0 -1
  415. data/assets/icons/square-slash.svg +0 -1
  416. data/assets/icons/square-stack.svg +0 -1
  417. data/assets/icons/squirrel.svg +0 -1
  418. data/assets/icons/step-back.svg +0 -1
  419. data/assets/icons/step-forward.svg +0 -1
  420. data/assets/icons/store.svg +0 -1
  421. data/assets/icons/table-properties.svg +0 -1
  422. data/assets/icons/tablet-smartphone.svg +0 -1
  423. data/assets/icons/tally-1.svg +0 -1
  424. data/assets/icons/tally-2.svg +0 -1
  425. data/assets/icons/tally-3.svg +0 -1
  426. data/assets/icons/tally-4.svg +0 -1
  427. data/assets/icons/tally-5.svg +0 -1
  428. data/assets/icons/test-tube-2.svg +0 -1
  429. data/assets/icons/test-tube.svg +0 -1
  430. data/assets/icons/test-tubes.svg +0 -1
  431. data/assets/icons/text-quote.svg +0 -1
  432. data/assets/icons/text-select.svg +0 -1
  433. data/assets/icons/text.svg +0 -1
  434. data/assets/icons/theater.svg +0 -1
  435. data/assets/icons/touchpad-off.svg +0 -1
  436. data/assets/icons/touchpad.svg +0 -1
  437. data/assets/icons/tractor.svg +0 -1
  438. data/assets/icons/traffic-cone.svg +0 -1
  439. data/assets/icons/train-front-tunnel.svg +0 -1
  440. data/assets/icons/train-front.svg +0 -1
  441. data/assets/icons/train-track.svg +0 -1
  442. data/assets/icons/tram-front.svg +0 -1
  443. data/assets/icons/triangle-right.svg +0 -1
  444. data/assets/icons/turtle.svg +0 -1
  445. data/assets/icons/undo-dot.svg +0 -1
  446. data/assets/icons/unfold-horizontal.svg +0 -1
  447. data/assets/icons/unfold-vertical.svg +0 -1
  448. data/assets/icons/ungroup.svg +0 -1
  449. data/assets/icons/unplug.svg +0 -1
  450. data/assets/icons/user-2.svg +0 -1
  451. data/assets/icons/user-check-2.svg +0 -1
  452. data/assets/icons/user-circle-2.svg +0 -1
  453. data/assets/icons/user-circle.svg +0 -1
  454. data/assets/icons/user-cog-2.svg +0 -1
  455. data/assets/icons/user-minus-2.svg +0 -1
  456. data/assets/icons/user-plus-2.svg +0 -1
  457. data/assets/icons/user-square-2.svg +0 -1
  458. data/assets/icons/user-square.svg +0 -1
  459. data/assets/icons/user-x-2.svg +0 -1
  460. data/assets/icons/users-2.svg +0 -1
  461. data/assets/icons/variable.svg +0 -1
  462. data/assets/icons/videotape.svg +0 -1
  463. data/assets/icons/wallet-2.svg +0 -1
  464. data/assets/icons/wallet-cards.svg +0 -1
  465. data/assets/icons/wallpaper.svg +0 -1
  466. data/assets/icons/warehouse.svg +0 -1
  467. data/assets/icons/whole-word.svg +0 -1
  468. data/assets/icons/workflow.svg +0 -1
@@ -2,7 +2,7 @@
2
2
  <%= lookbook_render :split_layout,
3
3
  id: "inspector",
4
4
  alpine_data: "$store.layout.inspector",
5
- ":class": "($store.inspector.drawer.hidden || #{@drawer_panels.none?}) && '!grid-rows-[1fr] !grid-cols-[1fr]'",
5
+ "x-bind:class": "($store.inspector.drawer.hidden || #{@drawer_panels.none?}) && '!grid-rows-[1fr] !grid-cols-[1fr]'",
6
6
  data: {
7
7
  "preview-target": @target.id
8
8
  } do |layout| %>
@@ -11,7 +11,7 @@
11
11
  "x-effect": "forceOrientation = (layoutWidth < $store.inspector.minVerticalSplitWidth) ? 'horizontal' : null" do %>
12
12
 
13
13
  <%= lookbook_render :toolbar, id: "main-toolbar" do |toolbar| %>
14
- <% toolbar.with_section ":class": "layoutResizing && 'overflow-hidden'" do %>
14
+ <% toolbar.with_section "x-bind:class": "layoutResizing && 'overflow-hidden'" do %>
15
15
  <%= lookbook_render :tabs, alpine_data: "$store.inspector.main", id: "inspector-tabs-main" do |tabs| %>
16
16
  <%= @main_panels.each do |panel| %>
17
17
  <% tabs.with_tab name: panel.name,
@@ -99,7 +99,7 @@
99
99
  "x-show": "!$store.inspector.drawer.hidden && #{@drawer_panels.any?}" do %>
100
100
 
101
101
  <%= lookbook_render :toolbar, id: "drawer-toolbar" do |toolbar| %>
102
- <% toolbar.with_section ":class": "layoutResizing && 'overflow-hidden'" do %>
102
+ <% toolbar.with_section "x-bind:class": "layoutResizing && 'overflow-hidden'" do %>
103
103
  <%= lookbook_render :tabs, alpine_data: "$store.inspector.drawer", id: "inspector-tabs-drawer" do |tabs| %>
104
104
  <%= @drawer_panels.each do |panel| %>
105
105
  <% tabs.with_tab name: panel.name,
@@ -133,7 +133,7 @@
133
133
  tooltip: "Pin drawer on right",
134
134
  "x-on:click": "switchOrientation",
135
135
  "x-show": "horizontal",
136
- ":class": "{'pointer-events-none opacity-50 !cursor-not-allowed': horizontal && layoutWidth <= $store.inspector.minVerticalSplitWidth}",
136
+ "x-bind:class": "{'pointer-events-none opacity-50 !cursor-not-allowed': horizontal && layoutWidth <= $store.inspector.minVerticalSplitWidth}",
137
137
  cloak: true %>
138
138
 
139
139
  <% group.with_button id: "drawer-to-bottom-button",
@@ -95,4 +95,4 @@
95
95
  </div>
96
96
  </div>
97
97
  </div>
98
- </main>
98
+ </main>
@@ -1 +1 @@
1
- <script src="<%= lookbook_asset_path("/js/iframe.js") %>" defer></script>
1
+ <script src="<%= lookbook_asset_path("/js/iframe.js") %>" defer></script>
@@ -2,4 +2,4 @@
2
2
  <style media="all" id="user-styles">
3
3
  <%= content_for :user_styles -%>
4
4
  </style>
5
- <% end %>
5
+ <% end %>
@@ -12,4 +12,4 @@
12
12
  <% else %>
13
13
  <%# Render a single scenario %>
14
14
  <%= scenarios.first.output %>
15
- <% end %>
15
+ <% end %>
@@ -1,6 +1,10 @@
1
1
  <% if @render_args[:component] %>
2
2
  <% if defined?(Phlex::SGML) && @render_args[:component].is_a?(Phlex::SGML) %>
3
- <%= raw(@render_args[:component].call(view_context: self, &@render_args[:block])) %>
3
+ <% if defined?(Phlex::VERSION) && Gem::Version.new(Phlex::VERSION) < Gem::Version.new("2.0.0") %>
4
+ <%= raw(@render_args[:component].call(view_context: self, &@render_args[:block])) %>
5
+ <% else %>
6
+ <%= render(@render_args[:component], @render_args[:args], &@render_args[:block]) %>
7
+ <% end %>
4
8
  <% else %>
5
9
  <%= render(@render_args[:component], @render_args[:args], &@render_args[:block]) %>
6
10
  <% end %>
@@ -1 +1 @@
1
- <%= @preview_html %>
1
+ <%= @preview_html %>
data/config/app.yml CHANGED
@@ -25,6 +25,7 @@ shared:
25
25
  preview_type_default: view_component
26
26
  preview_sort_scenarios: false
27
27
  preview_disable_error_handling: false
28
+ preview_single_pass_rendering: false
28
29
 
29
30
  page_collection_label: "Pages"
30
31
  page_nav_filter: false
@@ -40,7 +41,6 @@ shared:
40
41
  disable_indented_code_blocks: true
41
42
  strikethrough: true
42
43
  highlight: true
43
- with_toc_data: true
44
44
  lax_spacing: true
45
45
 
46
46
  highlighter_options:
@@ -14,11 +14,11 @@ module Lookbook
14
14
  )
15
15
  end
16
16
 
17
- initializer "lookbook.set_autoload_paths" do
17
+ initializer "lookbook.set_autoload_paths", before: :set_autoload_paths do |app|
18
18
  if opts.autoload_previews && opts.preview_paths.any?
19
- paths_to_add = opts.preview_paths - ActiveSupport::Dependencies.autoload_paths
19
+ paths_to_add = opts.preview_paths - app.config.autoload_paths
20
20
  filtered_paths = paths_to_add.filter { |p| !Engine.component_paths.include?(p) }
21
- ActiveSupport::Dependencies.autoload_paths.concat(filtered_paths) if filtered_paths.any?
21
+ app.config.autoload_paths.concat(filtered_paths) if filtered_paths.any?
22
22
  end
23
23
  end
24
24
 
@@ -37,26 +37,50 @@ module Lookbook
37
37
  if opts.using_view_component
38
38
  vc_config = Engine.host_config.view_component
39
39
 
40
- opts.preview_paths += vc_config.preview_paths
40
+ if vc_config.key?(:previews)
41
+ # New config style (ViewComponent >= 4.0)
42
+ opts.preview_paths += vc_config.previews.paths
41
43
 
42
- # sync preview controller and layout setting between Lookbook and ViewComponent
43
- if opts.preview_controller == "Lookbook::PreviewController" ||
44
- vc_config.preview_controller != ViewComponent::Config.defaults.preview_controller
45
- opts.preview_controller = vc_config.preview_controller
46
- else
47
- vc_config.preview_controller = opts.preview_controller
48
- end
44
+ if opts.preview_controller == "Lookbook::PreviewController" ||
45
+ vc_config.previews.controller != "ViewComponentsController"
46
+ opts.preview_controller = vc_config.previews.controller
47
+ else
48
+ vc_config.previews.controller = opts.preview_controller
49
+ end
49
50
 
50
- if opts.preview_layout.nil? || vc_config.default_preview_layout.present?
51
- opts.preview_layout = vc_config.default_preview_layout
51
+ if opts.preview_layout.nil? || vc_config.previews.default_layout.present?
52
+ opts.preview_layout = vc_config.previews.default_layout
53
+ else
54
+ vc_config.previews.default_layout = opts.preview_layout
55
+ end
56
+
57
+ vc_config.previews.enabled = true
58
+
59
+ if vc_config.generate.path.present?
60
+ opts.component_paths << vc_config.generate.path
61
+ end
52
62
  else
53
- vc_config.default_preview_layout = opts.preview_layout
54
- end
63
+ # Legacy config style (ViewComponent < 4.0)
64
+ opts.preview_paths += vc_config.preview_paths
65
+
66
+ if opts.preview_controller == "Lookbook::PreviewController" ||
67
+ vc_config.preview_controller != ViewComponent::Config.defaults.preview_controller
68
+ opts.preview_controller = vc_config.preview_controller
69
+ else
70
+ vc_config.preview_controller = opts.preview_controller
71
+ end
55
72
 
56
- vc_config.show_previews = true
73
+ if opts.preview_layout.nil? || vc_config.default_preview_layout.present?
74
+ opts.preview_layout = vc_config.default_preview_layout
75
+ else
76
+ vc_config.default_preview_layout = opts.preview_layout
77
+ end
57
78
 
58
- if vc_config.view_component_path.present?
59
- opts.component_paths << vc_config.view_component_path
79
+ vc_config.show_previews = true
80
+
81
+ if vc_config.view_component_path.present?
82
+ opts.component_paths << vc_config.view_component_path
83
+ end
60
84
  end
61
85
 
62
86
  ViewComponent::Preview.extend(Lookbook::PreviewAfterRender)
@@ -16,8 +16,13 @@ module Lookbook
16
16
  @render_args = @preview.render_args(@scenario_name, params: params.permit!)
17
17
  template = @render_args[:template]
18
18
  locals = @render_args[:locals]
19
- opts = {}
20
- opts[:layout] = nil
19
+
20
+ opts = if Lookbook.config.preview_single_pass_rendering && !scenario.group.present?
21
+ determine_layout(preview.layout)
22
+ else
23
+ {layout: nil}
24
+ end
25
+
21
26
  opts[:assigns] = @render_args[:assigns] || {}
22
27
  opts[:locals] = locals if locals.present?
23
28
 
@@ -6,15 +6,14 @@ module Lookbook
6
6
  @paths = paths
7
7
  @after_parse_callbacks = []
8
8
  @after_parse_once_callbacks = []
9
- @parsing = false
9
+ @parsing = Monitor.new
10
10
 
11
11
  define_tags(tags)
12
12
  YARD::Parser::SourceParser.after_parse_list { run_callbacks }
13
13
  end
14
14
 
15
15
  def parse(files = nil, &block)
16
- unless @parsing
17
- @parsing = true
16
+ @parsing.synchronize do
18
17
  @after_parse_once_callbacks << block if block
19
18
  files_list = files ? files.select { |file| file.to_s.end_with?(".rb") } : paths
20
19
 
@@ -43,7 +42,6 @@ module Lookbook
43
42
  def run_callbacks
44
43
  callbacks.each { |cb| cb.call(YARD::Registry) }
45
44
  @after_parse_once_callbacks = []
46
- @parsing = false
47
45
  end
48
46
 
49
47
  def define_tags(tags = nil)
@@ -2,16 +2,18 @@ require "redcarpet"
2
2
 
3
3
  module Lookbook
4
4
  class MarkdownRenderer < Service
5
- attr_reader :text, :opts
5
+ attr_reader :text, :extensions, :options
6
6
 
7
- def initialize(text, opts = {})
7
+ # In Lookbook config, `markdown_options` are actually Redcarpet `extensions` so we store them as `@extensions`
8
+ def initialize(text, extensions = {}, options = {})
8
9
  @text = text
9
- @opts = Lookbook.config.markdown_options.merge(opts.to_h)
10
+ @extensions = Lookbook.config.markdown_options.merge(extensions.to_h)
11
+ @options = default_options.merge(options.to_h)
10
12
  end
11
13
 
12
14
  def call
13
15
  clean_text = ActionViewAnnotationsStripper.call(text)
14
- md = Redcarpet::Markdown.new(LookbookMarkdownRenderer, opts)
16
+ md = Redcarpet::Markdown.new(LookbookMarkdownRenderer.new(default_options), extensions)
15
17
  md.render(clean_text).html_safe
16
18
  end
17
19
 
@@ -29,5 +31,11 @@ module Lookbook
29
31
  full_document
30
32
  end
31
33
  end
34
+
35
+ def default_options
36
+ {
37
+ with_toc_data: true
38
+ }
39
+ end
32
40
  end
33
41
  end
@@ -63,6 +63,10 @@ module Lookbook
63
63
  store[:preview_disable_error_handling] = value
64
64
  end
65
65
 
66
+ def preview_single_pass_rendering=(value)
67
+ store[:preview_single_pass_rendering] = value
68
+ end
69
+
66
70
  def ui_theme=(name)
67
71
  name = name.to_s
68
72
  if Theme.valid_theme?(name)
@@ -1,7 +1,7 @@
1
1
  module Lookbook
2
2
  class ConfigError < Error
3
3
  def initialize(msg = nil, scope: "config", **kwargs)
4
- super(msg, scope: scope, **kwargs)
4
+ super
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Lookbook
2
2
  class ParserError < Error
3
3
  def initialize(msg = nil, scope: "parser", **kwargs)
4
- super(msg, scope: scope, **kwargs)
4
+ super
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Lookbook
2
2
  class PreviewTemplateError < Error
3
3
  def initialize(msg = nil, scope: "preview", **kwargs)
4
- super(msg, scope: scope, **kwargs)
4
+ super
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Lookbook
2
2
  class TemplateError < Error
3
3
  def initialize(msg = nil, scope: "template", **kwargs)
4
- super(msg, scope: scope, **kwargs)
4
+ super
5
5
  end
6
6
  end
7
7
  end
@@ -27,7 +27,7 @@ module Lookbook
27
27
  if name.to_s.end_with?("=")
28
28
  args[0] = normalize_value(args[0])
29
29
  end
30
- super(name, *args)
30
+ super
31
31
  end
32
32
 
33
33
  def respond_to_missing?(name, include_private)
@@ -12,7 +12,7 @@ module Lookbook
12
12
  end
13
13
 
14
14
  def name(str)
15
- str.to_s.parameterize.tr("-", "_")
15
+ str.to_s.dup.force_encoding("UTF-8").parameterize.tr("-", "_")
16
16
  end
17
17
 
18
18
  def symbolize_name(str)
@@ -28,7 +28,10 @@ module Lookbook
28
28
  def value_default
29
29
  default_value_parts = object.parameters.find { |parts| parts[0].chomp(":") == name }
30
30
  if default_value_parts
31
- host_class_instance.instance_eval(default_value_parts[1])
31
+ # fix issue with YARD argument parser not splitting args correctly (leaving a trailing comma or bracket)
32
+ # when one or more of the argument values is a negative number.
33
+ cleaned_value = default_value_parts[1].start_with?("-") ? default_value_parts[1].sub(/[,\)]$/, "") : default_value_parts[1]
34
+ host_class_instance.instance_eval(cleaned_value)
32
35
  else
33
36
  raise ParserError.new "Unknown method parameter '#{name}'"
34
37
  end
@@ -5,7 +5,7 @@ module Lookbook
5
5
  tag_name = self.class.name.demodulize.underscore.chomp("_tag")
6
6
  super(tag_name, args.first, nil, @name)
7
7
  else
8
- super(*args)
8
+ super
9
9
  end
10
10
  end
11
11
 
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "2.3.4"
2
+ VERSION = "2.3.13"
3
3
  end