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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/components/lookbook/base_component.rb +1 -0
- data/app/components/lookbook/button/component.html.erb +11 -12
- data/app/components/lookbook/button/component.js +19 -24
- data/app/components/lookbook/button/component.rb +4 -0
- data/app/components/lookbook/button_group/component.html.erb +1 -1
- data/app/components/lookbook/code/component.html.erb +1 -1
- data/app/components/lookbook/copy_button/component.html.erb +1 -1
- data/app/components/lookbook/debug_menu/component.html.erb +1 -1
- data/app/components/lookbook/dimensions_display/component.html.erb +2 -2
- data/app/components/lookbook/display_options/editor/component.html.erb +1 -1
- data/app/components/lookbook/display_options/field/component.html.erb +1 -1
- data/app/components/lookbook/embed/component.html.erb +1 -1
- data/app/components/lookbook/file_source/component.html.erb +1 -1
- data/app/components/lookbook/filter/component.html.erb +2 -2
- data/app/components/lookbook/icon_button/component.html.erb +2 -2
- data/app/components/lookbook/inspector_panel/component.html.erb +1 -1
- data/app/components/lookbook/logo/component.html.erb +1 -1
- data/app/components/lookbook/message/component.html.erb +1 -1
- data/app/components/lookbook/nav/component.html.erb +1 -1
- data/app/components/lookbook/nav/directory/component.html.erb +1 -1
- data/app/components/lookbook/nav/entity/component.html.erb +1 -1
- data/app/components/lookbook/page_tabs/component.html.erb +1 -1
- data/app/components/lookbook/params/editor/component.html.erb +1 -1
- data/app/components/lookbook/params/editor/component.rb +1 -1
- data/app/components/lookbook/params/field/component.rb +1 -1
- data/app/components/lookbook/prose/component.html.erb +1 -1
- data/app/components/lookbook/split_layout/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/component.rb +1 -1
- data/app/components/lookbook/tab_panels/panel/component.html.erb +1 -1
- data/app/components/lookbook/tabs/component.html.erb +1 -1
- data/app/components/lookbook/tabs/dropdown_tab/component.html.erb +1 -1
- data/app/components/lookbook/tabs/tab/component.html.erb +1 -1
- data/app/components/lookbook/text_button/component.html.erb +2 -2
- data/app/components/lookbook/toolbar/component.html.erb +1 -1
- data/app/controllers/lookbook/application_controller.rb +17 -0
- data/app/controllers/lookbook/previews_controller.rb +11 -7
- data/app/views/layouts/lookbook/application.html.erb +3 -3
- data/app/views/layouts/lookbook/embed.html.erb +1 -1
- data/app/views/layouts/lookbook/skeleton.html.erb +2 -0
- data/app/views/lookbook/embeds/show.html.erb +1 -1
- data/app/views/lookbook/errors/default.html.erb +1 -1
- data/app/views/lookbook/errors/not_found.html.erb +1 -1
- data/app/views/lookbook/index.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_color.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_range.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_select.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_text.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_text_two_step.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_textarea.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_notes.html.erb +2 -2
- data/app/views/lookbook/inspector/panels/_output.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_preview.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_source.html.erb +1 -1
- data/app/views/lookbook/inspector/show.html.erb +4 -4
- data/app/views/lookbook/pages/show.html.erb +1 -1
- data/app/views/lookbook/partials/_iframe_content_scripts.html.erb +1 -1
- data/app/views/lookbook/partials/_user_styles.html.erb +1 -1
- data/app/views/lookbook/previews/group.html.erb +1 -1
- data/app/views/lookbook/previews/preview.html.erb +5 -1
- data/app/views/lookbook/previews/show.html.erb +1 -1
- data/config/app.yml +1 -1
- data/lib/lookbook/engine.rb +42 -18
- data/lib/lookbook/preview_controller_actions.rb +7 -2
- data/lib/lookbook/preview_parser.rb +2 -4
- data/lib/lookbook/services/markdown_renderer.rb +12 -4
- data/lib/lookbook/stores/config_store.rb +4 -0
- data/lib/lookbook/support/errors/config_error.rb +1 -1
- data/lib/lookbook/support/errors/parser_error.rb +1 -1
- data/lib/lookbook/support/errors/preview_template_error.rb +1 -1
- data/lib/lookbook/support/errors/template_error.rb +1 -1
- data/lib/lookbook/support/store.rb +1 -1
- data/lib/lookbook/support/utils/utils.rb +1 -1
- data/lib/lookbook/tags/param_tag.rb +4 -1
- data/lib/lookbook/tags/yard_tag.rb +1 -1
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/css/lookbook.css +131 -136
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/css/themes/blue.css +0 -1
- data/public/lookbook-assets/css/themes/green.css +0 -1
- data/public/lookbook-assets/css/themes/indigo.css +0 -1
- data/public/lookbook-assets/css/themes/rose.css +0 -1
- data/public/lookbook-assets/css/themes/zinc.css +0 -1
- data/public/lookbook-assets/js/iframe.js +205 -196
- data/public/lookbook-assets/js/iframe.js.map +1 -1
- data/public/lookbook-assets/js/index.js +1171 -1025
- data/public/lookbook-assets/js/index.js.map +1 -1
- data/public/lookbook-assets/js/lookbook-core.js +0 -37
- data/public/lookbook-assets/js/lookbook.js +277 -296
- metadata +4 -385
- data/assets/icons/activity-square.svg +0 -1
- data/assets/icons/ampersand.svg +0 -1
- data/assets/icons/ampersands.svg +0 -1
- data/assets/icons/antenna.svg +0 -1
- data/assets/icons/app-window.svg +0 -1
- data/assets/icons/archive-x.svg +0 -1
- data/assets/icons/area-chart.svg +0 -1
- data/assets/icons/arrow-big-down-dash.svg +0 -1
- data/assets/icons/arrow-big-left-dash.svg +0 -1
- data/assets/icons/arrow-big-right-dash.svg +0 -1
- data/assets/icons/arrow-big-up-dash.svg +0 -1
- data/assets/icons/arrow-down-0-1.svg +0 -1
- data/assets/icons/arrow-down-1-0.svg +0 -1
- data/assets/icons/arrow-down-a-z.svg +0 -1
- data/assets/icons/arrow-down-from-line.svg +0 -1
- data/assets/icons/arrow-down-left-from-circle.svg +0 -1
- data/assets/icons/arrow-down-left-square.svg +0 -1
- data/assets/icons/arrow-down-narrow-wide.svg +0 -1
- data/assets/icons/arrow-down-right-from-circle.svg +0 -1
- data/assets/icons/arrow-down-right-square.svg +0 -1
- data/assets/icons/arrow-down-square.svg +0 -1
- data/assets/icons/arrow-down-to-dot.svg +0 -1
- data/assets/icons/arrow-down-to-line.svg +0 -1
- data/assets/icons/arrow-down-up.svg +0 -1
- data/assets/icons/arrow-down-wide-narrow.svg +0 -1
- data/assets/icons/arrow-down-z-a.svg +0 -1
- data/assets/icons/arrow-left-from-line.svg +0 -1
- data/assets/icons/arrow-left-square.svg +0 -1
- data/assets/icons/arrow-left-to-line.svg +0 -1
- data/assets/icons/arrow-right-from-line.svg +0 -1
- data/assets/icons/arrow-right-left.svg +0 -1
- data/assets/icons/arrow-right-square.svg +0 -1
- data/assets/icons/arrow-right-to-line.svg +0 -1
- data/assets/icons/arrow-up-0-1.svg +0 -1
- data/assets/icons/arrow-up-1-0.svg +0 -1
- data/assets/icons/arrow-up-a-z.svg +0 -1
- data/assets/icons/arrow-up-from-dot.svg +0 -1
- data/assets/icons/arrow-up-from-line.svg +0 -1
- data/assets/icons/arrow-up-left-from-circle.svg +0 -1
- data/assets/icons/arrow-up-left-square.svg +0 -1
- data/assets/icons/arrow-up-narrow-wide.svg +0 -1
- data/assets/icons/arrow-up-right-from-circle.svg +0 -1
- data/assets/icons/arrow-up-right-square.svg +0 -1
- data/assets/icons/arrow-up-square.svg +0 -1
- data/assets/icons/arrow-up-to-line.svg +0 -1
- data/assets/icons/arrow-up-wide-narrow.svg +0 -1
- data/assets/icons/arrow-up-z-a.svg +0 -1
- data/assets/icons/arrows-up-from-line.svg +0 -1
- data/assets/icons/atom.svg +0 -1
- data/assets/icons/badge-alert.svg +0 -1
- data/assets/icons/badge-cent.svg +0 -1
- data/assets/icons/badge-check.svg +0 -1
- data/assets/icons/badge-dollar-sign.svg +0 -1
- data/assets/icons/badge-euro.svg +0 -1
- data/assets/icons/badge-help.svg +0 -1
- data/assets/icons/badge-indian-rupee.svg +0 -1
- data/assets/icons/badge-info.svg +0 -1
- data/assets/icons/badge-japanese-yen.svg +0 -1
- data/assets/icons/badge-minus.svg +0 -1
- data/assets/icons/badge-percent.svg +0 -1
- data/assets/icons/badge-plus.svg +0 -1
- data/assets/icons/badge-pound-sterling.svg +0 -1
- data/assets/icons/badge-russian-ruble.svg +0 -1
- data/assets/icons/badge-swiss-franc.svg +0 -1
- data/assets/icons/badge-x.svg +0 -1
- data/assets/icons/badge.svg +0 -1
- data/assets/icons/ban.svg +0 -1
- data/assets/icons/bar-chart-big.svg +0 -1
- data/assets/icons/bar-chart-horizontal-big.svg +0 -1
- data/assets/icons/bell-dot.svg +0 -1
- data/assets/icons/biohazard.svg +0 -1
- data/assets/icons/blocks.svg +0 -1
- data/assets/icons/book-copy.svg +0 -1
- data/assets/icons/book-down.svg +0 -1
- data/assets/icons/book-key.svg +0 -1
- data/assets/icons/book-lock.svg +0 -1
- data/assets/icons/book-marked.svg +0 -1
- data/assets/icons/book-minus.svg +0 -1
- data/assets/icons/book-plus.svg +0 -1
- data/assets/icons/book-template.svg +0 -1
- data/assets/icons/book-up-2.svg +0 -1
- data/assets/icons/book-up.svg +0 -1
- data/assets/icons/book-x.svg +0 -1
- data/assets/icons/bookmark-check.svg +0 -1
- data/assets/icons/bookmark-x.svg +0 -1
- data/assets/icons/boom-box.svg +0 -1
- data/assets/icons/braces.svg +0 -1
- data/assets/icons/brackets.svg +0 -1
- data/assets/icons/brain-circuit.svg +0 -1
- data/assets/icons/brain-cog.svg +0 -1
- data/assets/icons/brain.svg +0 -1
- data/assets/icons/bring-to-front.svg +0 -1
- data/assets/icons/bug-off.svg +0 -1
- data/assets/icons/bug-play.svg +0 -1
- data/assets/icons/bus-front.svg +0 -1
- data/assets/icons/cable-car.svg +0 -1
- data/assets/icons/cable.svg +0 -1
- data/assets/icons/cake-slice.svg +0 -1
- data/assets/icons/candlestick-chart.svg +0 -1
- data/assets/icons/candy-cane.svg +0 -1
- data/assets/icons/car-front.svg +0 -1
- data/assets/icons/car-taxi-front.svg +0 -1
- data/assets/icons/case-lower.svg +0 -1
- data/assets/icons/case-sensitive.svg +0 -1
- data/assets/icons/case-upper.svg +0 -1
- data/assets/icons/cassette-tape.svg +0 -1
- data/assets/icons/castle.svg +0 -1
- data/assets/icons/chevron-down-circle.svg +0 -1
- data/assets/icons/chevron-down-square.svg +0 -1
- data/assets/icons/chevron-left-circle.svg +0 -1
- data/assets/icons/chevron-left-square.svg +0 -1
- data/assets/icons/chevron-right-circle.svg +0 -1
- data/assets/icons/chevron-right-square.svg +0 -1
- data/assets/icons/chevron-up-circle.svg +0 -1
- data/assets/icons/chevron-up-square.svg +0 -1
- data/assets/icons/church.svg +0 -1
- data/assets/icons/circle-dashed.svg +0 -1
- data/assets/icons/circle-dollar-sign.svg +0 -1
- data/assets/icons/circle-dot-dashed.svg +0 -1
- data/assets/icons/circle-equal.svg +0 -1
- data/assets/icons/circle-off.svg +0 -1
- data/assets/icons/circle-slash-2.svg +0 -1
- data/assets/icons/circle-slash.svg +0 -1
- data/assets/icons/circuit-board.svg +0 -1
- data/assets/icons/clipboard-paste.svg +0 -1
- data/assets/icons/club.svg +0 -1
- data/assets/icons/combine.svg +0 -1
- data/assets/icons/computer.svg +0 -1
- data/assets/icons/contact-2.svg +0 -1
- data/assets/icons/container.svg +0 -1
- data/assets/icons/copy-check.svg +0 -1
- data/assets/icons/copy-minus.svg +0 -1
- data/assets/icons/copy-plus.svg +0 -1
- data/assets/icons/copy-slash.svg +0 -1
- data/assets/icons/copy-x.svg +0 -1
- data/assets/icons/database-zap.svg +0 -1
- data/assets/icons/dessert.svg +0 -1
- data/assets/icons/disc-2.svg +0 -1
- data/assets/icons/disc-3.svg +0 -1
- data/assets/icons/donut.svg +0 -1
- data/assets/icons/door-closed.svg +0 -1
- data/assets/icons/door-open.svg +0 -1
- data/assets/icons/dot.svg +0 -1
- data/assets/icons/drama.svg +0 -1
- data/assets/icons/ferris-wheel.svg +0 -1
- data/assets/icons/file-code-2.svg +0 -1
- data/assets/icons/file-stack.svg +0 -1
- data/assets/icons/fish-symbol.svg +0 -1
- data/assets/icons/fold-horizontal.svg +0 -1
- data/assets/icons/fold-vertical.svg +0 -1
- data/assets/icons/folder-dot.svg +0 -1
- data/assets/icons/folder-git-2.svg +0 -1
- data/assets/icons/folder-git.svg +0 -1
- data/assets/icons/folder-kanban.svg +0 -1
- data/assets/icons/folder-open-dot.svg +0 -1
- data/assets/icons/folder-root.svg +0 -1
- data/assets/icons/folder-sync.svg +0 -1
- data/assets/icons/gallery-horizontal-end.svg +0 -1
- data/assets/icons/gallery-horizontal.svg +0 -1
- data/assets/icons/gallery-thumbnails.svg +0 -1
- data/assets/icons/gallery-vertical-end.svg +0 -1
- data/assets/icons/gallery-vertical.svg +0 -1
- data/assets/icons/gantt-chart-square.svg +0 -1
- data/assets/icons/gantt-chart.svg +0 -1
- data/assets/icons/gauge-circle.svg +0 -1
- data/assets/icons/goal.svg +0 -1
- data/assets/icons/grid-2x2.svg +0 -1
- data/assets/icons/grid-3x3.svg +0 -1
- data/assets/icons/group.svg +0 -1
- data/assets/icons/hard-drive-download.svg +0 -1
- data/assets/icons/hard-drive-upload.svg +0 -1
- data/assets/icons/hdmi-port.svg +0 -1
- data/assets/icons/hotel.svg +0 -1
- data/assets/icons/iteration-ccw.svg +0 -1
- data/assets/icons/iteration-cw.svg +0 -1
- data/assets/icons/kanban-square-dashed.svg +0 -1
- data/assets/icons/kanban-square.svg +0 -1
- data/assets/icons/kanban.svg +0 -1
- data/assets/icons/key-round.svg +0 -1
- data/assets/icons/key-square.svg +0 -1
- data/assets/icons/layout-panel-left.svg +0 -1
- data/assets/icons/layout-panel-top.svg +0 -1
- data/assets/icons/leafy-green.svg +0 -1
- data/assets/icons/ligature.svg +0 -1
- data/assets/icons/list-filter.svg +0 -1
- data/assets/icons/list-restart.svg +0 -1
- data/assets/icons/list-todo.svg +0 -1
- data/assets/icons/list-tree.svg +0 -1
- data/assets/icons/lollipop.svg +0 -1
- data/assets/icons/m-square.svg +0 -1
- data/assets/icons/mailbox.svg +0 -1
- data/assets/icons/memory-stick.svg +0 -1
- data/assets/icons/menu-square.svg +0 -1
- data/assets/icons/merge.svg +0 -1
- data/assets/icons/message-square-dashed.svg +0 -1
- data/assets/icons/message-square-plus.svg +0 -1
- data/assets/icons/messages-square.svg +0 -1
- data/assets/icons/monitor-check.svg +0 -1
- data/assets/icons/monitor-dot.svg +0 -1
- data/assets/icons/monitor-down.svg +0 -1
- data/assets/icons/monitor-pause.svg +0 -1
- data/assets/icons/monitor-play.svg +0 -1
- data/assets/icons/monitor-stop.svg +0 -1
- data/assets/icons/monitor-up.svg +0 -1
- data/assets/icons/monitor-x.svg +0 -1
- data/assets/icons/moon-star.svg +0 -1
- data/assets/icons/mouse-pointer-square-dashed.svg +0 -1
- data/assets/icons/mouse-pointer-square.svg +0 -1
- data/assets/icons/move-down-left.svg +0 -1
- data/assets/icons/move-down-right.svg +0 -1
- data/assets/icons/move-down.svg +0 -1
- data/assets/icons/move-left.svg +0 -1
- data/assets/icons/move-right.svg +0 -1
- data/assets/icons/move-up-left.svg +0 -1
- data/assets/icons/move-up-right.svg +0 -1
- data/assets/icons/move-up.svg +0 -1
- data/assets/icons/orbit.svg +0 -1
- data/assets/icons/panel-bottom-close.svg +0 -1
- data/assets/icons/panel-bottom-inactive.svg +0 -1
- data/assets/icons/panel-bottom-open.svg +0 -1
- data/assets/icons/panel-bottom.svg +0 -1
- data/assets/icons/panel-left-close.svg +0 -1
- data/assets/icons/panel-left-inactive.svg +0 -1
- data/assets/icons/panel-left-open.svg +0 -1
- data/assets/icons/panel-left.svg +0 -1
- data/assets/icons/panel-right-close.svg +0 -1
- data/assets/icons/panel-right-inactive.svg +0 -1
- data/assets/icons/panel-right-open.svg +0 -1
- data/assets/icons/panel-right.svg +0 -1
- data/assets/icons/panel-top-close.svg +0 -1
- data/assets/icons/panel-top-inactive.svg +0 -1
- data/assets/icons/panel-top-open.svg +0 -1
- data/assets/icons/panel-top.svg +0 -1
- data/assets/icons/parentheses.svg +0 -1
- data/assets/icons/parking-circle-off.svg +0 -1
- data/assets/icons/parking-circle.svg +0 -1
- data/assets/icons/parking-meter.svg +0 -1
- data/assets/icons/parking-square-off.svg +0 -1
- data/assets/icons/parking-square.svg +0 -1
- data/assets/icons/paw-print.svg +0 -1
- data/assets/icons/pc-case.svg +0 -1
- data/assets/icons/pen-line.svg +0 -1
- data/assets/icons/pen-square.svg +0 -1
- data/assets/icons/pen.svg +0 -1
- data/assets/icons/pencil-line.svg +0 -1
- data/assets/icons/pencil-ruler.svg +0 -1
- data/assets/icons/percent-circle.svg +0 -1
- data/assets/icons/percent-diamond.svg +0 -1
- data/assets/icons/percent-square.svg +0 -1
- data/assets/icons/pi-square.svg +0 -1
- data/assets/icons/pi.svg +0 -1
- data/assets/icons/pilcrow-square.svg +0 -1
- data/assets/icons/plane-landing.svg +0 -1
- data/assets/icons/plane-takeoff.svg +0 -1
- data/assets/icons/play-square.svg +0 -1
- data/assets/icons/plug-zap-2.svg +0 -1
- data/assets/icons/pocket-knife.svg +0 -1
- data/assets/icons/popcorn.svg +0 -1
- data/assets/icons/popsicle.svg +0 -1
- data/assets/icons/presentation.svg +0 -1
- data/assets/icons/projector.svg +0 -1
- data/assets/icons/rabbit.svg +0 -1
- data/assets/icons/radar.svg +0 -1
- data/assets/icons/radiation.svg +0 -1
- data/assets/icons/radio-tower.svg +0 -1
- data/assets/icons/rail-symbol.svg +0 -1
- data/assets/icons/rainbow.svg +0 -1
- data/assets/icons/rat.svg +0 -1
- data/assets/icons/ratio.svg +0 -1
- data/assets/icons/receipt.svg +0 -1
- data/assets/icons/redo-dot.svg +0 -1
- data/assets/icons/refresh-ccw-dot.svg +0 -1
- data/assets/icons/refresh-cw-off.svg +0 -1
- data/assets/icons/repeat-2.svg +0 -1
- data/assets/icons/replace-all.svg +0 -1
- data/assets/icons/replace.svg +0 -1
- data/assets/icons/roller-coaster.svg +0 -1
- data/assets/icons/rows.svg +0 -1
- data/assets/icons/satellite-dish.svg +0 -1
- data/assets/icons/satellite.svg +0 -1
- data/assets/icons/save-all.svg +0 -1
- data/assets/icons/scatter-chart.svg +0 -1
- data/assets/icons/school-2.svg +0 -1
- data/assets/icons/school.svg +0 -1
- data/assets/icons/scissors-line-dashed.svg +0 -1
- data/assets/icons/scissors-square-dashed-bottom.svg +0 -1
- data/assets/icons/scissors-square.svg +0 -1
- data/assets/icons/scroll-text.svg +0 -1
- data/assets/icons/search-check.svg +0 -1
- data/assets/icons/search-code.svg +0 -1
- data/assets/icons/search-slash.svg +0 -1
- data/assets/icons/search-x.svg +0 -1
- data/assets/icons/send-horizontal.svg +0 -1
- data/assets/icons/send-to-back.svg +0 -1
- data/assets/icons/shapes.svg +0 -1
- data/assets/icons/shell.svg +0 -1
- data/assets/icons/shield-ban.svg +0 -1
- data/assets/icons/shield-ellipsis.svg +0 -1
- data/assets/icons/shield-half.svg +0 -1
- data/assets/icons/shield-minus.svg +0 -1
- data/assets/icons/shield-plus.svg +0 -1
- data/assets/icons/shield-question.svg +0 -1
- data/assets/icons/shield-x.svg +0 -1
- data/assets/icons/ship-wheel.svg +0 -1
- data/assets/icons/shopping-basket.svg +0 -1
- data/assets/icons/sigma-square.svg +0 -1
- data/assets/icons/snail.svg +0 -1
- data/assets/icons/space.svg +0 -1
- data/assets/icons/spade.svg +0 -1
- data/assets/icons/sparkle.svg +0 -1
- data/assets/icons/sparkles.svg +0 -1
- data/assets/icons/speech.svg +0 -1
- data/assets/icons/spell-check-2.svg +0 -1
- data/assets/icons/spell-check.svg +0 -1
- data/assets/icons/split.svg +0 -1
- data/assets/icons/spray-can.svg +0 -1
- data/assets/icons/square-asterisk.svg +0 -1
- data/assets/icons/square-code.svg +0 -1
- data/assets/icons/square-dashed-bottom-code.svg +0 -1
- data/assets/icons/square-dashed-bottom.svg +0 -1
- data/assets/icons/square-dot.svg +0 -1
- data/assets/icons/square-equal.svg +0 -1
- data/assets/icons/square-slash.svg +0 -1
- data/assets/icons/square-stack.svg +0 -1
- data/assets/icons/squirrel.svg +0 -1
- data/assets/icons/step-back.svg +0 -1
- data/assets/icons/step-forward.svg +0 -1
- data/assets/icons/store.svg +0 -1
- data/assets/icons/table-properties.svg +0 -1
- data/assets/icons/tablet-smartphone.svg +0 -1
- data/assets/icons/tally-1.svg +0 -1
- data/assets/icons/tally-2.svg +0 -1
- data/assets/icons/tally-3.svg +0 -1
- data/assets/icons/tally-4.svg +0 -1
- data/assets/icons/tally-5.svg +0 -1
- data/assets/icons/test-tube-2.svg +0 -1
- data/assets/icons/test-tube.svg +0 -1
- data/assets/icons/test-tubes.svg +0 -1
- data/assets/icons/text-quote.svg +0 -1
- data/assets/icons/text-select.svg +0 -1
- data/assets/icons/text.svg +0 -1
- data/assets/icons/theater.svg +0 -1
- data/assets/icons/touchpad-off.svg +0 -1
- data/assets/icons/touchpad.svg +0 -1
- data/assets/icons/tractor.svg +0 -1
- data/assets/icons/traffic-cone.svg +0 -1
- data/assets/icons/train-front-tunnel.svg +0 -1
- data/assets/icons/train-front.svg +0 -1
- data/assets/icons/train-track.svg +0 -1
- data/assets/icons/tram-front.svg +0 -1
- data/assets/icons/triangle-right.svg +0 -1
- data/assets/icons/turtle.svg +0 -1
- data/assets/icons/undo-dot.svg +0 -1
- data/assets/icons/unfold-horizontal.svg +0 -1
- data/assets/icons/unfold-vertical.svg +0 -1
- data/assets/icons/ungroup.svg +0 -1
- data/assets/icons/unplug.svg +0 -1
- data/assets/icons/user-2.svg +0 -1
- data/assets/icons/user-check-2.svg +0 -1
- data/assets/icons/user-circle-2.svg +0 -1
- data/assets/icons/user-circle.svg +0 -1
- data/assets/icons/user-cog-2.svg +0 -1
- data/assets/icons/user-minus-2.svg +0 -1
- data/assets/icons/user-plus-2.svg +0 -1
- data/assets/icons/user-square-2.svg +0 -1
- data/assets/icons/user-square.svg +0 -1
- data/assets/icons/user-x-2.svg +0 -1
- data/assets/icons/users-2.svg +0 -1
- data/assets/icons/variable.svg +0 -1
- data/assets/icons/videotape.svg +0 -1
- data/assets/icons/wallet-2.svg +0 -1
- data/assets/icons/wallet-cards.svg +0 -1
- data/assets/icons/wallpaper.svg +0 -1
- data/assets/icons/warehouse.svg +0 -1
- data/assets/icons/whole-word.svg +0 -1
- 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",
|
@@ -1 +1 @@
|
|
1
|
-
<script src="<%= lookbook_asset_path("/js/iframe.js") %>" defer></script>
|
1
|
+
<script src="<%= lookbook_asset_path("/js/iframe.js") %>" defer></script>
|
@@ -1,6 +1,10 @@
|
|
1
1
|
<% if @render_args[:component] %>
|
2
2
|
<% if defined?(Phlex::SGML) && @render_args[:component].is_a?(Phlex::SGML) %>
|
3
|
-
|
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:
|
data/lib/lookbook/engine.rb
CHANGED
@@ -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 -
|
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
|
-
|
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
|
-
|
40
|
+
if vc_config.key?(:previews)
|
41
|
+
# New config style (ViewComponent >= 4.0)
|
42
|
+
opts.preview_paths += vc_config.previews.paths
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
51
|
-
|
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
|
-
|
54
|
-
|
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
|
-
|
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
|
-
|
59
|
-
|
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
|
-
|
20
|
-
opts
|
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 =
|
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
|
-
|
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, :
|
5
|
+
attr_reader :text, :extensions, :options
|
6
6
|
|
7
|
-
|
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
|
-
@
|
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,
|
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
|
@@ -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
|
-
|
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
|
data/lib/lookbook/version.rb
CHANGED