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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 699b3598051a4b9f584d5c0bb703142b16988603b8cc2c99dcd0d2dee5191aa9
4
- data.tar.gz: f6893f9ffb913df5b41fe54db42f8491d2169c8ba2b4de66ba8c13eac5cce8a6
3
+ metadata.gz: 6690e132c2afade65dabcdd620bf4d8e67f6bfcbacd8d94ad5f156d443417eb9
4
+ data.tar.gz: fa40a220f164cef926db2e1ce4a6be8681ccac8069149b49d791e58157e1a2a8
5
5
  SHA512:
6
- metadata.gz: bcca11383c011dd7044d2291f8d39f806624e73281c5df0f60ea5face46e2171222cd9d7d6222fe4a9da5275452ac5f8a8ff95ea3edc0af064232e64e96eb378
7
- data.tar.gz: 732624f41ad1a0cbd895a27348cc0cf10373fb823c5f0f36618c9cb1c464ce03baa962754c9c63078c56c681a0aca9be084ffcd5fb7f7bca6897788d50c2b22b
6
+ metadata.gz: 6590230a593eccba2833f205758255543ae6fdb4afea7ccc656909d7426a0032dc67163dfcb412c000c0d7b1fb78bc55070d4e738d05068d9bb6a21b6154166d
7
+ data.tar.gz: cb3f413449f297e41ec1a6706b11dcfb3589631a70252f4220466dcda5ade1e9ae8b909627ad923de8c9aa5471397085fcb50cbc6cacf81348cbfaf550ceaa02
data/README.md CHANGED
@@ -49,9 +49,9 @@ To preview changes locally you can run a development version of the docs site:
49
49
 
50
50
  ### Testing
51
51
 
52
- Lookbook uses [RSpec](https://relishapp.com/rspec) for testing.
52
+ Lookbook uses [RSpec](https://relishapp.com/rspec). [Appraisal](https://github.com/thoughtbot/appraisal) is used to run tests against different Ruby and Rails versions.
53
53
 
54
- Tests can be run using the `rake spec` or `bundle exec rspec` commands.
54
+ Tests can be run using the `bundle exec appraisal rspec` command.
55
55
 
56
56
  The dummy app that the tests are being run against can be viewed by running the `bin/dummy` command and then browsing to http://localhost:9292/lookbook
57
57
 
@@ -3,6 +3,7 @@ module Lookbook
3
3
  send(:include, Lookbook::Engine.routes.url_helpers) # YARD parsing workaround: https://github.com/lsegal/yard/issues/546
4
4
  include Lookbook::UiElementsHelper
5
5
  include Lookbook::ClassNamesHelper if Engine.runtime_context.rails_older_than?("6.1.0")
6
+ include ERB::Util # for json_escape
6
7
 
7
8
  def initialize(alpine_data: [], **html_attrs)
8
9
  @alpine_data ||= alpine_data
@@ -1,18 +1,17 @@
1
- <%= lookbook_render button_component.new(
2
- id: id,
3
- icon: icon,
4
- **button_attrs,
5
- "x-on:keydown.esc.stop": "hideDropdown",
6
- "x-on:navigation:complete.window": "updateDropdown") do %>
7
- <%= content %>
8
- <% end %>
1
+ <div class="contents" key="<%= key %>">
2
+ <%= lookbook_render button_component.new(
3
+ id: id,
4
+ icon: icon,
5
+ **button_attrs,
6
+ "x-on:keydown.esc.stop.document": "hideDropdown") do %>
7
+ <%= content %>
8
+ <% end %>
9
9
 
10
- <% if dropdown? %>
11
- <% content_for :dropdowns do %>
12
- <div data-dropdown-id="<%= id %>">
10
+ <% if dropdown? %>
11
+ <div data-dropdown-id="<%= id %>" hidden>
13
12
  <div class="divide-y divide-lookbook-divider text-left">
14
13
  <%= dropdown %>
15
14
  </div>
16
15
  </div>
17
16
  <% end %>
18
- <% end %>
17
+ </div>
@@ -14,24 +14,28 @@ export default function buttonComponent() {
14
14
  }
15
15
 
16
16
  if (this.dropdownContent) {
17
- dropdown = tippy(this.$el, {
18
- content: this.dropdownContent,
19
- trigger: "click",
20
- theme: "menu",
21
- triggerTarget: this.$el,
22
- interactive: true,
23
- zIndex: 99999,
24
- onShow: () => {
25
- if (!this.$store.settings.showTooltips) {
26
- return false;
27
- }
28
- this.$dispatch("dropdown:show", { dropdown: this });
29
- },
30
- onHide: () => this.$dispatch("dropdown:hide", { dropdown: this }),
31
- });
17
+ this.initDropdown();
32
18
  }
33
19
  },
34
20
 
21
+ initDropdown() {
22
+ dropdown = tippy(this.$el, {
23
+ content: this.dropdownContent,
24
+ trigger: "click",
25
+ theme: "menu",
26
+ triggerTarget: this.$el,
27
+ interactive: true,
28
+ zIndex: 99999,
29
+ onShow: () => {
30
+ if (!this.$store.settings.showTooltips) {
31
+ return false;
32
+ }
33
+ this.$dispatch("dropdown:show", { dropdown: this });
34
+ },
35
+ onHide: () => this.$dispatch("dropdown:hide", { dropdown: this }),
36
+ });
37
+ },
38
+
35
39
  get dropdownContent() {
36
40
  if (this.$root && this.$root.id) {
37
41
  const dropdown = document.querySelector(
@@ -48,15 +52,6 @@ export default function buttonComponent() {
48
52
  }
49
53
  },
50
54
 
51
- updateDropdown() {
52
- if (dropdown) {
53
- dropdown.hide();
54
- this.$nextTick(() => {
55
- dropdown.setContent(this.dropdownContent);
56
- });
57
- }
58
- },
59
-
60
55
  startSpin() {
61
56
  this._spinning = true;
62
57
  },
@@ -10,6 +10,10 @@ module Lookbook
10
10
  @button_attrs = html_attrs
11
11
  end
12
12
 
13
+ def key
14
+ Digest::SHA256.hexdigest(icon.to_s + dropdown.to_s + @button_attrs.to_json)
15
+ end
16
+
13
17
  def dropdown?
14
18
  dropdown.present?
15
19
  end
@@ -1,3 +1,3 @@
1
1
  <%= render_component_tag :div, class: "flex items-center" do %>
2
2
  <%= safe_join(buttons) %>
3
- <% end %>
3
+ <% end %>
@@ -8,4 +8,4 @@
8
8
  }
9
9
  ] do %>
10
10
  <%= Lookbook::CodeHighlighter.call(source, **@highlight_opts) %>
11
- <% end %>
11
+ <% end %>
@@ -8,4 +8,4 @@
8
8
  <% if content %>
9
9
  <div x-ref="copyTarget" class="hidden"><%== content %></div>
10
10
  <% end %>
11
- <% end %>
11
+ <% end %>
@@ -49,4 +49,4 @@
49
49
  <%== debug_data %>
50
50
  </div>
51
51
  <% end %>
52
- <% end %>
52
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  <%= render_component_tag class: "flex items-center text-xs font-mono space-x-1 transition",
2
- ":class":"{'!opacity-100': resizing}",
2
+ "x-bind:class":"{'!opacity-100': resizing}",
3
3
  "x-on:viewport:resize-start.window": "resizing = true",
4
4
  "x-on:viewport:resize-complete.window": "resizing = false",
5
5
  "x-on:dom:update-start.window": "tearDown",
@@ -8,4 +8,4 @@
8
8
  <span x-text="`${width}px`"></span>
9
9
  <span class="opacity-70">x</span>
10
10
  <span x-text="`${height}px`"></span>
11
- <% end %>
11
+ <% end %>
@@ -10,4 +10,4 @@
10
10
  <% else %>
11
11
  <%= safe_join(fields) %>
12
12
  <% end %>
13
- <% end %>
13
+ <% end %>
@@ -5,4 +5,4 @@
5
5
  </label>
6
6
  <%= select_tag(name, options_for_select(choices, value), "x-model": "value", class: "compact") %>
7
7
  </div>
8
- <% end %>
8
+ <% end %>
@@ -3,4 +3,4 @@
3
3
  preview="<%= preview_class %>"
4
4
  scenario="<%= scenario.name %>"
5
5
  <%= params_attrs_str %> panels="<%= panels.join(",") %>"
6
- actions="<%= actions.join(",") %>"></lookbook-embed>
6
+ actions="<%= actions.join(",") %>"></lookbook-embed>
@@ -6,4 +6,4 @@
6
6
  line_numbers: true do %>
7
7
  <%= trimmed_source %>
8
8
  <% end %>
9
- <% end %>
9
+ <% end %>
@@ -11,7 +11,7 @@
11
11
  x-on:keydown.f.window="if (!($event.shiftKey || $event.metaKey || $event.ctrlKey || $event.altKey)) { focus(); $event.preventDefault(); $event.stopPropagation(); }"
12
12
  x-on:keydown.stop>
13
13
  <button class="text-lookbook-icon-button-stroke hover:text-lookbook-icon-button-stroke-hover focus:ring-0 focus:outline-none absolute top-1/2 right-3 -translate-y-1/2" x-on:click="clear" x-bind:class="{hidden: !active}">
14
- <%= icon :x, size: 3 %>
14
+ <%= icon :x, size: 4 %>
15
15
  </button>
16
16
  </div>
17
- <% end %>
17
+ <% end %>
@@ -11,10 +11,10 @@
11
11
  disabled: disabled,
12
12
  aria: { label: tooltip } do %>
13
13
  <span x-ref="icon">
14
- <%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, ":class": "{'animate-spin': _spinning}") if icon) %>
14
+ <%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, "x-bind:class": "{'animate-spin': _spinning}") if icon) %>
15
15
  </span>
16
16
  <% if tooltip %>
17
17
  <label class="hidden" x-ref="tooltip"><%= tooltip %></label>
18
18
  <% end %>
19
19
  <%= content %>
20
- <% end %>
20
+ <% end %>
@@ -5,4 +5,4 @@
5
5
  <% if panel_styles %>
6
6
  <% content_for :user_styles do %><%= panel_styles %>
7
7
  <% end %>
8
- <% end %>
8
+ <% end %>
@@ -3,4 +3,4 @@
3
3
  <path d="M3.5 1H17v20H3.5A2.5 2.5 0 0 1 1 18.5v-15A2.5 2.5 0 0 1 3.5 1Z"/>
4
4
  <path d="M1.153 19.36c0-.737.261-1.188.596-1.57.417-.475.985-.79 1.751-.79H17M6.801 5.1v7.554L6.8 12.7h5.57"/>
5
5
  </g>
6
- </svg>
6
+ </svg>
@@ -23,4 +23,4 @@
23
23
  <%= lookbook_render :prose, size: :sm, content: content %>
24
24
  </div>
25
25
  </div>
26
- <% end %>
26
+ <% end %>
@@ -25,4 +25,4 @@
25
25
  </div>
26
26
  <% end %>
27
27
  </div>
28
- <% end %>
28
+ <% end %>
@@ -25,4 +25,4 @@
25
25
  <%= safe_join(children) %>
26
26
  </ul>
27
27
  <% end %>
28
- <% end %>
28
+ <% end %>
@@ -29,4 +29,4 @@
29
29
  <%= safe_join(children) %>
30
30
  </ul>
31
31
  <% end %>
32
- <% end %>
32
+ <% end %>
@@ -15,4 +15,4 @@
15
15
  <% end %>
16
16
  <% end %>
17
17
  <% end %>
18
- <% end %>
18
+ <% end %>
@@ -18,4 +18,4 @@
18
18
  <% if param_styles %>
19
19
  <% content_for :user_styles do %><%= param_styles %>
20
20
  <% end %>
21
- <% end %>
21
+ <% end %>
@@ -9,7 +9,7 @@ module Lookbook
9
9
  def initialize(**html_attrs)
10
10
  @field_count = -1
11
11
  @@input_styles = {}
12
- super(**html_attrs)
12
+ super
13
13
  end
14
14
 
15
15
  def before_render
@@ -14,7 +14,7 @@ module Lookbook
14
14
  styles, html = StylesExtractor.call(render_input)
15
15
  Editor::Component.add_styles(param.input, styles)
16
16
 
17
- escaped_value = json_escape(param.value.to_s).gsub("\n", '\n')
17
+ escaped_value = html_escape(json_escape(param.value.to_s).gsub("\n", '\n'))
18
18
  wrapper_attrs = {
19
19
  data: {"param-input": param.input},
20
20
  "x-data": "paramsInputComponent({name: \"#{param.name}\", value: \"#{escaped_value}\"})"
@@ -5,4 +5,4 @@
5
5
  prose-h1:font-bold
6
6
  " do %>
7
7
  <%== rendered_content %>
8
- <% end %>
8
+ <% end %>
@@ -10,4 +10,4 @@
10
10
  </div>
11
11
  <% end %>
12
12
  <% end %>
13
- <% end %>
13
+ <% end %>
@@ -2,4 +2,4 @@
2
2
  <div x-ref="panels" class="h-full">
3
3
  <%= safe_join(panels) %>
4
4
  </div>
5
- <% end %>
5
+ <% end %>
@@ -8,7 +8,7 @@ module Lookbook
8
8
 
9
9
  def initialize(**html_attrs)
10
10
  @panel_counter = 0
11
- super(**html_attrs)
11
+ super
12
12
  end
13
13
 
14
14
  protected
@@ -3,6 +3,6 @@
3
3
  "data-tab-panel": @name,
4
4
  cloak: true,
5
5
  class: "h-full",
6
- ":class": "{ hidden: !isActive($el) }" do %>
6
+ "x-bind:class": "{ hidden: !isActive($el) }" do %>
7
7
  <%== content %>
8
8
  <% end %>
@@ -17,4 +17,4 @@
17
17
  <%= safe_join(dropdown_tabs) %>
18
18
  </div>
19
19
  </div>
20
- <% end %>
20
+ <% end %>
@@ -8,7 +8,7 @@
8
8
  "py-2 text-base": @theme == :page,
9
9
  }
10
10
  ],
11
- ":class": "{
11
+ "x-bind:class": "{
12
12
  'border-lookbook-tabs-border-active': isSelected($el),
13
13
  'border-transparent text-lookbook-tabs-text hover:text-lookbook-tabs-text-hover': !isSelected($el),
14
14
  'hidden': visibleTabsCount >= #{@position}
@@ -9,7 +9,7 @@
9
9
  "px-2 text-lg relative -bottom-px": @theme == :page,
10
10
  }
11
11
  ],
12
- ":class": "{
12
+ "x-bind:class": "{
13
13
  'border-lookbook-tabs-border-active': isSelected($el),
14
14
  'border-transparent text-lookbook-tabs-text hover:text-lookbook-tabs-text-hover': !isSelected($el),
15
15
  '!text-lookbook-tabs-text-disabled': isDisabled($el),
@@ -13,7 +13,7 @@
13
13
 
14
14
  <span class="flex items-center space-x-2 justify-center">
15
15
  <span x-ref="icon">
16
- <%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, ":class": "{'animate-spin': _spinning}") if icon) %>
16
+ <%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, "x-bind:class": "{'animate-spin': _spinning}") if icon) %>
17
17
  </span>
18
18
  <% if content %>
19
19
  <span><%= content %></span>
@@ -23,4 +23,4 @@
23
23
  <% if tooltip %>
24
24
  <label class="hidden" x-ref="tooltip"><%= tooltip %></label>
25
25
  <% end %>
26
- <% end %>
26
+ <% end %>
@@ -2,4 +2,4 @@
2
2
  <div class="toolbar-sections flex items-stretch w-full h-10">
3
3
  <%= safe_join(sections) %>
4
4
  </div>
5
- <% end %>
5
+ <% end %>
@@ -10,6 +10,9 @@ module Lookbook
10
10
  helper Lookbook::ApplicationHelper
11
11
  helper Lookbook::UiElementsHelper
12
12
 
13
+ before_action :disable_annotations
14
+ after_action :restore_annotations
15
+
13
16
  before_action :assign_theme_overrides
14
17
  before_action :assign_instance_vars
15
18
 
@@ -37,6 +40,20 @@ module Lookbook
37
40
 
38
41
  protected
39
42
 
43
+ def disable_annotations
44
+ return unless ActionView::Base.respond_to?(:annotate_rendered_view_with_filenames)
45
+
46
+ @original_annotations_value = ActionView::Base.annotate_rendered_view_with_filenames
47
+ ActionView::Base.annotate_rendered_view_with_filenames = false
48
+ end
49
+
50
+ def restore_annotations
51
+ return if @original_annotations_value.nil?
52
+
53
+ ActionView::Base.annotate_rendered_view_with_filenames = @original_annotations_value
54
+ @original_annotations_value = nil
55
+ end
56
+
40
57
  def assign_theme_overrides
41
58
  @theme_overrides ||= Engine.theme.to_css
42
59
  end
@@ -39,13 +39,17 @@ module Lookbook
39
39
  def show
40
40
  raise_not_found("Preview not found") unless @target
41
41
 
42
- @preview_html = preview_controller.process(
43
- :render_in_layout_to_string,
44
- "lookbook/previews/group",
45
- inspector_data,
46
- layout: @preview.layout,
47
- append_html: (iframe_content_scripts if embedded?)
48
- )
42
+ @preview_html = if Lookbook.config.preview_single_pass_rendering && !inspector_data.scenarios.many?
43
+ inspector_data.scenarios.first.output + (iframe_content_scripts if embedded?)
44
+ else
45
+ preview_controller.process(
46
+ :render_in_layout_to_string,
47
+ "lookbook/previews/group",
48
+ inspector_data,
49
+ layout: @preview.layout,
50
+ append_html: (iframe_content_scripts if embedded?)
51
+ )
52
+ end
49
53
  end
50
54
 
51
55
  private
@@ -22,10 +22,10 @@
22
22
 
23
23
  <%= lookbook_render :split_layout,
24
24
  alpine_data: "$store.layout.main",
25
- ":class": "$store.layout.mobile && '!block'" do |layout| %>
25
+ "x-bind:class": "$store.layout.mobile && '!block'" do |layout| %>
26
26
 
27
27
  <% layout.with_pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0",
28
- ":class": "{
28
+ "x-bind:class": "{
29
29
  'transition': $store.layout.mobile,
30
30
  'translate-x-full': $store.layout.mobile && sidebarHidden,
31
31
  '!absolute right-0 bottom-0 top-[40px] h-[calc(100%_-_40px)] w-full max-w-[420px] z-[1001] border-l border-lookbook-divider': $store.layout.mobile
@@ -93,7 +93,7 @@
93
93
  <% end %>
94
94
  <% end %>
95
95
 
96
- <% layout.with_pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %>
96
+ <% layout.with_pane id: "app-main", class: "overflow-hidden h-full", "x-bind:class": "$store.layout.mobile && 'w-screen'" do %>
97
97
  <%= content_for?(:main) ? yield(:main) : yield %>
98
98
  <% end %>
99
99
  <% end %>
@@ -31,4 +31,4 @@
31
31
  <%= yield :body %>
32
32
  <% else %>
33
33
  <%= render template: "layouts/lookbook/skeleton" %>
34
- <% end %>
34
+ <% end %>
@@ -5,6 +5,8 @@
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
7
7
 
8
+ <%= csrf_meta_tags %>
9
+
8
10
  <link href="<%= lookbook_asset_path("/css/lookbook.css") %>" rel="stylesheet">
9
11
  <link href="<%= lookbook_asset_path("/css/themes/#{@config.ui_theme}.css") %>" rel="stylesheet">
10
12
 
@@ -9,4 +9,4 @@
9
9
  params: @passed_params,
10
10
  dynamic_display_options: @dynamic_display_options,
11
11
  static_display_options: @static_display_options
12
- } %>
12
+ } %>
@@ -37,4 +37,4 @@
37
37
  </div>
38
38
  </div>
39
39
  </div>
40
- </div>
40
+ </div>
@@ -7,4 +7,4 @@
7
7
  theme: :error do %>
8
8
  <%= @error.detail || "It may have been moved or deleted." %>
9
9
  <% end %>
10
- <% end %>
10
+ <% end %>
@@ -37,4 +37,4 @@ sidebar_panels_config = @config.preview_inspector.sidebar_panels.map(&:to_sym)
37
37
  <p>Select a preview from the nav to get started.</p>
38
38
  <% end %>
39
39
  <% end %>
40
- <% end %>
40
+ <% end %>
@@ -3,4 +3,4 @@
3
3
  type: "color",
4
4
  "x-on:change.stop": "",
5
5
  "x-on:blur": "value = $el.value",
6
- ) %>
6
+ ) %>
@@ -12,4 +12,4 @@
12
12
  <div class="flex-none px-2 opacity-60">
13
13
  <%= input_options[:max] %>
14
14
  </div>
15
- </div>
15
+ </div>
@@ -2,4 +2,4 @@
2
2
  options_for_select(choices || [], value),
3
3
  **input_options,
4
4
  "x-model": "value"
5
- ) %>
5
+ ) %>
@@ -2,4 +2,4 @@
2
2
  **input_options,
3
3
  type: input,
4
4
  "x-model.debounce.200ms": "value"
5
- ) %>
5
+ ) %>
@@ -16,4 +16,4 @@
16
16
  "x-show": "changed",
17
17
  "x-on:click": "applyChange" %>
18
18
  </div>
19
- </div>
19
+ </div>
@@ -2,4 +2,4 @@
2
2
  rows: 4,
3
3
  **input_options,
4
4
  "x-model.debounce.200ms": "value"
5
- ) %>
5
+ ) %>
@@ -11,9 +11,9 @@
11
11
  <% end %>
12
12
  </div>
13
13
  <% else %>
14
- <div class="p-4 w-full h-full bg-lookbook-prose-bg">
14
+ <div class="p-4 w-full min-h-full h-max bg-lookbook-prose-bg">
15
15
  <%= lookbook_render :prose do %>
16
16
  <%== items.any? ? items.first.notes : "<em class='opacity-50'>No notes provided.</em>" %>
17
17
  <% end %>
18
18
  </div>
19
- <% end %>
19
+ <% end %>
@@ -4,4 +4,4 @@
4
4
  <%- else -%>
5
5
  <%== scenarios.first.beautified_output -%>
6
6
  <%- end %>
7
- <% end %>
7
+ <% end %>
@@ -7,4 +7,4 @@
7
7
  class: "-inset-px relative",
8
8
  style: "width: calc(100% + 2px); height: calc(100% + 2px)"
9
9
  %>
10
- </div>
10
+ </div>
@@ -8,4 +8,4 @@
8
8
  <% scenario = scenarios.first %>
9
9
  <%= lookbook_render :code, language: scenario.source_lang[:name], line_numbers: true, full_height: true do %><%== scenario.source %><% end %>
10
10
  <% end %>
11
- </div>
11
+ </div>