lookbook 2.3.0 → 2.3.9
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 +11 -11
- data/app/components/lookbook/button/component.html.erb +1 -1
- data/app/components/lookbook/button/component.js +10 -3
- data/app/components/lookbook/display_options/editor/component.html.erb +1 -1
- data/app/components/lookbook/filter/component.html.erb +2 -2
- data/app/components/lookbook/header/component.html.erb +1 -1
- data/app/components/lookbook/icon/component.html.erb +4 -2
- data/app/components/lookbook/icon/component.rb +0 -16
- data/app/components/lookbook/nav/entity/component.html.erb +3 -0
- data/app/components/lookbook/nav/item/component.js +8 -10
- data/app/components/lookbook/params/editor/component.rb +1 -1
- data/app/components/lookbook/params/field/component.rb +1 -1
- data/app/components/lookbook/tab_panels/component.rb +1 -1
- data/app/controllers/lookbook/previews_controller.rb +11 -7
- data/app/helpers/lookbook/application_helper.rb +10 -0
- data/app/views/layouts/lookbook/application.html.erb +98 -87
- data/app/views/layouts/lookbook/embed.html.erb +29 -17
- data/app/views/layouts/lookbook/skeleton.html.erb +2 -0
- data/app/views/lookbook/inspector/panels/_notes.html.erb +1 -1
- data/app/views/lookbook/previews/preview.html.erb +5 -1
- data/assets/js/app.js +7 -4
- data/assets/js/helpers/request.js +2 -2
- data/config/app.yml +3 -1
- data/lib/lookbook/engine.rb +32 -6
- data/lib/lookbook/preview_controller_actions.rb +7 -2
- data/lib/lookbook/reloaders.rb +6 -2
- 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/yard_tag.rb +1 -1
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/css/lookbook.css +52 -42
- 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/img/lucide-sprite.svg +1 -1
- data/public/lookbook-assets/js/iframe.js +193 -193
- data/public/lookbook-assets/js/index.js +680 -670
- 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 +252 -289
- metadata +5 -386
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1cd08282fd3abb0cb21cebd971a24d255839e0137abb7bea4e58770655b7329
|
4
|
+
data.tar.gz: 3c976d7cd1b69e72c667b7ffdd059b89a1c13cd6d69386650b88a3bb05d3d315
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff9c90f7415fc2ba4d2441e2d348bebe4ad2bb2395437cec315ad78af9687f00164d583ad1add293309bc04fe3b99e24da1ba727576ad58d334c16a457f190ee
|
7
|
+
data.tar.gz: 823fcbef26329719ada1600a8a0e15432edbf951232a1fde11f14f78d7bd758188e237159fb8192e8a4ff013a9dde4ced5d987de326fde06a0b98cd84dc705ab
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<p><strong><a href="https://lookbook.build">Documentation</a> | <a href="http://demo.lookbook.build/lookbook">Demo site</a></strong></p>
|
8
8
|
|
9
9
|
<p><a href="https://rubygems.org/gems/lookbook"><img src="https://img.shields.io/gem/v/lookbook" alt="Gem version"></a>
|
10
|
-
<a href="https://github.com/
|
10
|
+
<a href="https://github.com/lookbook-hq/lookbook/actions/workflows/ci.yml"><img src="https://github.com/lookbook-hq/lookbook/actions/workflows/ci.yml/badge.svg" alt="CI status"></a></p>
|
11
11
|
|
12
12
|
</div>
|
13
13
|
|
@@ -32,9 +32,9 @@ Lookbook is implemented as an isolated [Rails Engine](https://guides.rubyonrails
|
|
32
32
|
|
33
33
|
This repository contains:
|
34
34
|
|
35
|
-
* The Lookbook source code ([`/app`](https://github.com/
|
36
|
-
* The Lookbook [documentation site](#docs-site) source code and content ([`/docs`](https://github.com/
|
37
|
-
* A [test suite](#testing) with a 'runable' dummy app ([`/spec`](https://github.com/
|
35
|
+
* The Lookbook source code ([`/app`](https://github.com/lookbook-hq/lookbook/tree/main/app), [`/lib`](https://github.com/lookbook-hq/lookbook/tree/main/lib), [`/config`](https://github.com/lookbook-hq/lookbook/tree/main/config), etc)
|
36
|
+
* The Lookbook [documentation site](#docs-site) source code and content ([`/docs`](https://github.com/lookbook-hq/lookbook/tree/main/docs)).
|
37
|
+
* A [test suite](#testing) with a 'runable' dummy app ([`/spec`](https://github.com/lookbook-hq/lookbook/tree/main/spec)).
|
38
38
|
|
39
39
|
### Documentation site
|
40
40
|
|
@@ -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)
|
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 `
|
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
|
|
@@ -61,22 +61,22 @@ Lookbook uses [Release It!](https://github.com/release-it/release-it) to automat
|
|
61
61
|
|
62
62
|
Running `npm run release` will start the process of publishing a new release and walks though all the steps from picking a version number to publishing the updated gem.
|
63
63
|
|
64
|
-
Publishing a release requires write permissions for this repository (
|
64
|
+
Publishing a release requires write permissions for this repository (lookbook-hq/lookbook) and 2FA publish permissions for Lookbook on RubyGems.
|
65
65
|
|
66
66
|
## Contributing
|
67
67
|
|
68
68
|
Lookbook is an un-funded open source project and contributions of all types and sizes are most welcome!
|
69
69
|
|
70
|
-
Please take the time to read over the [Contributing](./CONTRIBUTING.md) guide before making your first contribution and if anything isn't clear then [start a discussion](https://github.com/
|
70
|
+
Please take the time to read over the [Contributing](./CONTRIBUTING.md) guide before making your first contribution and if anything isn't clear then [start a discussion](https://github.com/lookbook-hq/lookbook/discussions) and we will do our best to help you out.
|
71
71
|
|
72
72
|
## Contributors
|
73
73
|
|
74
74
|
Lookbook was created by [Mark Perkins](https://github.com/allmarkedup) and continues to grow
|
75
|
-
& improve thanks to the ideas, suggestions and hard work of all of [these excellent humans](https://github.com/
|
75
|
+
& improve thanks to the ideas, suggestions and hard work of all of [these excellent humans](https://github.com/lookbook-hq/lookbook/graphs/contributors):
|
76
76
|
<br>
|
77
77
|
<br>
|
78
|
-
<a href="https://github.com/
|
79
|
-
<img src="https://contrib.rocks/image?repo=
|
78
|
+
<a href="https://github.com/lookbook-hq/lookbook/graphs/contributors">
|
79
|
+
<img src="https://contrib.rocks/image?repo=lookbook-hq/lookbook&columns=14" width="800" />
|
80
80
|
</a>
|
81
81
|
|
82
82
|
## License
|
@@ -6,7 +6,12 @@ export default function buttonComponent() {
|
|
6
6
|
let dropdown = null;
|
7
7
|
|
8
8
|
return {
|
9
|
+
updateAfterNavigate: true,
|
10
|
+
|
9
11
|
init() {
|
12
|
+
this.updateAfterNavigate =
|
13
|
+
this.$el.dataset.updateAfterNavigate !== "false";
|
14
|
+
|
10
15
|
if (this.$refs.tooltip) {
|
11
16
|
tooltip = initTooltip(this, {
|
12
17
|
target: this.$refs.icon,
|
@@ -51,9 +56,11 @@ export default function buttonComponent() {
|
|
51
56
|
updateDropdown() {
|
52
57
|
if (dropdown) {
|
53
58
|
dropdown.hide();
|
54
|
-
this
|
55
|
-
|
56
|
-
|
59
|
+
if (this.updateAfterNavigate) {
|
60
|
+
this.$nextTick(() => {
|
61
|
+
dropdown.setContent(this.dropdownContent);
|
62
|
+
});
|
63
|
+
}
|
57
64
|
}
|
58
65
|
},
|
59
66
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= render_component_tag class: "px-2" do %>
|
2
2
|
<% if fields.many? %>
|
3
|
-
<%= lookbook_render :button, id: "display-options-dropdown-button", icon: :settings, tooltip: "Display options" do |button| %>
|
3
|
+
<%= lookbook_render :button, id: "display-options-dropdown-button", icon: :settings, tooltip: "Display options", data: {update_after_navigate: false} do |button| %>
|
4
4
|
<% button.with_dropdown do %>
|
5
5
|
<div class="p-3 space-y-3">
|
6
6
|
<%= safe_join(fields) %>
|
@@ -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:
|
14
|
+
<%= icon :x, size: 4 %>
|
15
15
|
</button>
|
16
16
|
</div>
|
17
|
-
<% end %>
|
17
|
+
<% end %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<% menu = lookbook_render :debug_menu,
|
35
35
|
version: Lookbook::VERSION,
|
36
36
|
docs_url: "https://lookbook.build/guide",
|
37
|
-
repo_url: "https://github.com/
|
37
|
+
repo_url: "https://github.com/lookbook-hq/lookbook" do %>
|
38
38
|
<%= debug_data %>
|
39
39
|
<% end %>
|
40
40
|
<% button.with_dropdown.with_content(menu) %>
|
@@ -1,3 +1,5 @@
|
|
1
1
|
<%= render_component_tag :i, style: "height: #{size_rems}; width: #{size_rems}; #{@html_attrs[:style]}", class: "icon-stroke-#{stroke}" do %>
|
2
|
-
|
3
|
-
|
2
|
+
<svg>
|
3
|
+
<use href="/lookbook-assets/img/lucide-sprite.svg#<%= @icon_name %>"></use>
|
4
|
+
</svg>
|
5
|
+
<% end %>
|
@@ -14,21 +14,5 @@ module Lookbook
|
|
14
14
|
def size_rems
|
15
15
|
"#{@size * 0.25}rem"
|
16
16
|
end
|
17
|
-
|
18
|
-
def svg
|
19
|
-
ICON_CACHE[@icon_name] ||= read_svg
|
20
|
-
end
|
21
|
-
|
22
|
-
def read_svg
|
23
|
-
File.read(svg_path).html_safe
|
24
|
-
rescue
|
25
|
-
if Rails.env.development? || Rails.env.test?
|
26
|
-
raise "`#{@icon_name}` is not a valid icon name"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def svg_path
|
31
|
-
Lookbook::Engine.root.join("assets/icons/#{@icon_name}.svg")
|
32
|
-
end
|
33
17
|
end
|
34
18
|
end
|
@@ -2,7 +2,10 @@
|
|
2
2
|
id: id,
|
3
3
|
key: "#{id}-entity-#{type}",
|
4
4
|
class: "list-none",
|
5
|
+
"x-init": "$nextTick(() => checkActive())",
|
5
6
|
"x-show": "!filteredOut",
|
7
|
+
"@navigation:complete.window": "checkActive",
|
8
|
+
# "x-effect": "active = ($refs.link && (window.location.pathname === $refs.link.getAttribute('href')))",
|
6
9
|
data: { "entity-type": type.to_s.tr("_","-") },
|
7
10
|
cloak: true do %>
|
8
11
|
<%= lookbook_tag href.present? ? :a : :button,
|
@@ -6,20 +6,12 @@ export default function navItemComponent({ id, matchers }) {
|
|
6
6
|
return {
|
7
7
|
filteredOut: false,
|
8
8
|
|
9
|
+
active: false,
|
10
|
+
|
9
11
|
get open() {
|
10
12
|
return this.isCollection && this.isOpen(id);
|
11
13
|
},
|
12
14
|
|
13
|
-
get active() {
|
14
|
-
if (this.$refs.link) {
|
15
|
-
return (
|
16
|
-
this.location &&
|
17
|
-
this.location.pathname === this.$refs.link.getAttribute("href")
|
18
|
-
);
|
19
|
-
}
|
20
|
-
return false;
|
21
|
-
},
|
22
|
-
|
23
15
|
get children() {
|
24
16
|
return this.$refs.items ? Array.from(this.$refs.items.children) : [];
|
25
17
|
},
|
@@ -28,6 +20,12 @@ export default function navItemComponent({ id, matchers }) {
|
|
28
20
|
return !this.$refs.link;
|
29
21
|
},
|
30
22
|
|
23
|
+
checkActive() {
|
24
|
+
this.active =
|
25
|
+
this.$refs.link &&
|
26
|
+
window.location.pathname === this.$refs.link.getAttribute("href");
|
27
|
+
},
|
28
|
+
|
31
29
|
toggle() {
|
32
30
|
this.toggleOpen(id);
|
33
31
|
},
|
@@ -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}\"})"
|
@@ -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 =
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
@@ -1,88 +1,90 @@
|
|
1
1
|
<% content_for :body do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<% if request_frame == "root" %>
|
3
|
+
<div
|
4
|
+
id="app"
|
5
|
+
x-data="app"
|
6
|
+
x-cloak
|
7
|
+
x-on:popstate.window="handleNavigation"
|
8
|
+
x-on:click.document="hijax"
|
9
|
+
x-on:navigation:start="closeMobileSidebar"
|
10
|
+
x-on:dom:update-complete.window="Lookbook.initEmbeds()"
|
11
|
+
class="w-screen h-screen grid grid-rows-[40px_1fr] relative">
|
11
12
|
|
12
|
-
|
13
|
+
<%= render "lookbook/partials/user_styles" %>
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
<%= lookbook_render :header,
|
16
|
+
id: "app-header",
|
17
|
+
debug_menu: @config.debug_menu,
|
18
|
+
project_name: @config.project_name,
|
19
|
+
project_logo: @config.project_logo %>
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
<% unless @blank_slate %>
|
22
|
+
|
23
|
+
<%= lookbook_render :split_layout,
|
24
|
+
alpine_data: "$store.layout.main",
|
25
|
+
":class": "$store.layout.mobile && '!block'" do |layout| %>
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
<% layout.with_pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0",
|
28
|
+
":class": "{
|
29
|
+
'transition': $store.layout.mobile,
|
30
|
+
'translate-x-full': $store.layout.mobile && sidebarHidden,
|
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
|
32
|
+
}",
|
33
|
+
"x-on:click.outside": "closeMobileSidebar",
|
34
|
+
cloak: true do %>
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
<% if @sidebar_panels.any? %>
|
37
|
+
<%= lookbook_render :split_layout,
|
38
|
+
alpine_data: "$store.layout.#{@sidebar_panels.many? ? "sidebar" : "singleSectionSidebar"}",
|
39
|
+
style: "height: calc(100vh - 2.5rem);" do |layout| %>
|
39
40
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
41
|
+
<% @sidebar_panels.each do |panel| %>
|
42
|
+
<% if panel == :previews && @previews.any? %>
|
43
|
+
<% layout.with_pane class: "overflow-hidden" do %>
|
44
|
+
<%= lookbook_render :nav,
|
45
|
+
id: "previews-nav",
|
46
|
+
tree: @previews.to_tree,
|
47
|
+
alpine_data: "$store.nav.previews" do |nav| %>
|
48
|
+
<%= nav.with_toolbar do |toolbar| %>
|
49
|
+
<% toolbar.with_section padded: true do %>
|
50
|
+
<h4 class="pt-1"><%= @config.preview_collection_label %></h4>
|
51
|
+
<% end %>
|
52
|
+
<% toolbar.with_section align: :right, padded: false do %>
|
53
|
+
<%= lookbook_render :button_group, size: :xs do |group| %>
|
54
|
+
<% group.with_button icon: :minus_square,
|
55
|
+
tooltip: "Collapse all",
|
56
|
+
"x-on:click": "closeAll" %>
|
57
|
+
<% end %>
|
56
58
|
<% end %>
|
57
59
|
<% end %>
|
58
|
-
|
59
|
-
|
60
|
-
<%
|
60
|
+
<% if @config.preview_nav_filter %>
|
61
|
+
<% nav.with_filter store: "$store.nav.previews.filter", placeholder: "Filter previews by name…" %>
|
62
|
+
<% end %>
|
61
63
|
<% end %>
|
62
64
|
<% end %>
|
63
65
|
<% end %>
|
64
|
-
<% end %>
|
65
66
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
67
|
+
<% if panel == :pages && @pages.any? %>
|
68
|
+
<% layout.with_pane class: "overflow-hidden" do %>
|
69
|
+
<%= lookbook_render :nav,
|
70
|
+
id: "pages-nav",
|
71
|
+
tree: @pages.to_tree,
|
72
|
+
alpine_data: "$store.nav.pages" do |nav| %>
|
73
|
+
<%= nav.with_toolbar do |toolbar| %>
|
74
|
+
<% toolbar.with_section padded: true do %>
|
75
|
+
<h4 class="pt-1"><%= @config.page_collection_label %></h4>
|
76
|
+
<% end %>
|
77
|
+
<% toolbar.with_section align: :right, padded: false do %>
|
78
|
+
<%= lookbook_render :button_group, size: :xs do |group| %>
|
79
|
+
<% group.with_button icon: :minus_square,
|
80
|
+
tooltip: "Collapse all",
|
81
|
+
"x-on:click": "closeAll" %>
|
82
|
+
<% end %>
|
81
83
|
<% end %>
|
82
84
|
<% end %>
|
83
|
-
|
84
|
-
|
85
|
-
<%
|
85
|
+
<% if @config.page_nav_filter %>
|
86
|
+
<% nav.with_filter store: "$store.nav.pages.filter", placeholder: "Filter pages by name…" %>
|
87
|
+
<% end %>
|
86
88
|
<% end %>
|
87
89
|
<% end %>
|
88
90
|
<% end %>
|
@@ -90,26 +92,35 @@
|
|
90
92
|
<% end %>
|
91
93
|
<% end %>
|
92
94
|
<% end %>
|
93
|
-
<% end %>
|
94
95
|
|
95
|
-
|
96
|
-
|
96
|
+
<% layout.with_pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %>
|
97
|
+
<%= content_for?(:main) ? yield(:main) : yield %>
|
98
|
+
<% end %>
|
97
99
|
<% end %>
|
100
|
+
<% else %>
|
101
|
+
<div id="app-main" class="w-screen h-full overflow-hidden">
|
102
|
+
<%= content_for?(:main) ? yield(:main) : yield %>
|
103
|
+
</div>
|
98
104
|
<% end %>
|
99
|
-
|
100
|
-
<div
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
105
|
+
|
106
|
+
<div class="absolute opacity-0 bg-black inset-0 top-[39px] z-[-1] transition-opacity" x-bind:class="($store.layout.mobile && !sidebarHidden) && '!opacity-30 !z-[1000]'" data-cloak></div>
|
107
|
+
|
108
|
+
<% if content_for? :dropdowns %>
|
109
|
+
<div class="hidden">
|
110
|
+
<%= content_for :dropdowns -%>
|
111
|
+
</div>
|
112
|
+
<% end %>
|
113
|
+
</div>
|
114
|
+
<% elsif request_frame == "main" %>
|
115
|
+
<div id="app-main">
|
116
|
+
<%= content_for?(:main) ? yield(:main) : yield %>
|
117
|
+
</div>
|
118
|
+
<% end %>
|
119
|
+
<% end %>
|
106
120
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
<% end %>
|
112
|
-
</div>
|
121
|
+
<% if frame_request? %>
|
122
|
+
<%= yield :body %>
|
123
|
+
<% else %>
|
124
|
+
<%= render template: "layouts/lookbook/skeleton" %>
|
113
125
|
<% end %>
|
114
126
|
|
115
|
-
<%= render template: "layouts/lookbook/skeleton" %>
|
@@ -1,22 +1,34 @@
|
|
1
1
|
<% content_for :body do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<% if request_frame == "root" %>
|
3
|
+
<div
|
4
|
+
id="app"
|
5
|
+
x-data="app"
|
6
|
+
x-cloak
|
7
|
+
x-on:popstate.window="handleNavigation"
|
8
|
+
x-on:click.document="hijax"
|
9
|
+
class="overflow-hidden">
|
10
|
+
|
11
|
+
<%= render "lookbook/partials/user_styles" %>
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<% if content_for? :dropdowns %>
|
16
|
-
<div class="hidden">
|
17
|
-
<%= content_for :dropdowns -%>
|
13
|
+
<div id="app-main" class="contents">
|
14
|
+
<%= content_for?(:main) ? yield(:main) : yield %>
|
15
|
+
</div>
|
18
16
|
</div>
|
19
|
-
|
17
|
+
|
18
|
+
<% if content_for? :dropdowns %>
|
19
|
+
<div class="hidden">
|
20
|
+
<%= content_for :dropdowns -%>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<% elsif request_frame == "main" %>
|
24
|
+
<div id="app-main">
|
25
|
+
<%= content_for?(:main) ? yield(:main) : yield %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
20
28
|
<% end %>
|
21
29
|
|
22
|
-
|
30
|
+
<% if frame_request? %>
|
31
|
+
<%= yield :body %>
|
32
|
+
<% else %>
|
33
|
+
<%= render template: "layouts/lookbook/skeleton" %>
|
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
|
|
@@ -11,7 +11,7 @@
|
|
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 %>
|
@@ -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(context: { rails_view_context: self }, &@render_args[:block])) %>
|
5
|
+
<% else %>
|
6
|
+
<%= raw(@render_args[:component].call(view_context: self, &@render_args[:block])) %>
|
7
|
+
<% end %>
|
4
8
|
<% else %>
|
5
9
|
<%= render(@render_args[:component], @render_args[:args], &@render_args[:block]) %>
|
6
10
|
<% end %>
|
data/assets/js/app.js
CHANGED
@@ -43,7 +43,9 @@ export default function app() {
|
|
43
43
|
this.debug("Navigating to ", window.location.pathname);
|
44
44
|
this.$dispatch("navigation:start");
|
45
45
|
this.location = window.location;
|
46
|
-
await this.updateDOM(
|
46
|
+
await this.updateDOM("#app-main", {
|
47
|
+
headers: { "X-Lookbook-Frame": "main" },
|
48
|
+
});
|
47
49
|
this.$dispatch("navigation:complete");
|
48
50
|
},
|
49
51
|
|
@@ -65,16 +67,17 @@ export default function app() {
|
|
65
67
|
}
|
66
68
|
},
|
67
69
|
|
68
|
-
async updateDOM() {
|
70
|
+
async updateDOM(rootSelector = `#${this.$root.id}`, options = {}) {
|
69
71
|
this.debug("Starting DOM update");
|
70
72
|
this.$dispatch("dom:update-start");
|
71
73
|
this.requestStart();
|
72
74
|
try {
|
73
75
|
const { fragment, title } = await fetchHTML(
|
74
76
|
window.location,
|
75
|
-
|
77
|
+
rootSelector,
|
78
|
+
options
|
76
79
|
);
|
77
|
-
morph(
|
80
|
+
morph(document.querySelector(rootSelector), fragment);
|
78
81
|
document.title = title;
|
79
82
|
this.requestEnd();
|
80
83
|
this.$dispatch("dom:update-complete");
|