lookbook 1.0.0.beta.7 → 1.0.0.rc.2
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 +38 -30
- data/app/assets/lookbook/css/themes/blue.css +2 -1
- data/app/assets/lookbook/css/themes/indigo.css +2 -1
- data/app/assets/lookbook/css/themes/zinc.css +2 -1
- data/app/assets/lookbook/js/components/clipboard.js +1 -1
- data/app/components/lookbook/base_component.rb +0 -1
- data/app/components/lookbook/embed/component.html.erb +1 -1
- data/app/components/lookbook/inspector_panel/component.css +5 -0
- data/app/components/lookbook/inspector_panel/component.html.erb +6 -4
- data/app/components/lookbook/inspector_panel/component.rb +3 -3
- data/app/components/lookbook/nav/component.rb +1 -2
- data/app/components/lookbook/nav/item/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/component.rb +1 -1
- data/app/components/lookbook/tab_panels/panel/component.rb +2 -2
- data/app/components/lookbook/tag_component.rb +3 -3
- data/app/controllers/lookbook/application_controller.rb +1 -0
- data/app/controllers/lookbook/page_controller.rb +6 -1
- data/app/controllers/lookbook/previews_controller.rb +8 -16
- data/app/helpers/lookbook/preview_helper.rb +7 -2
- data/app/views/lookbook/index.html.erb +11 -24
- data/app/views/lookbook/previews/panels/_notes.html.erb +1 -1
- data/app/views/lookbook/previews/show.html.erb +2 -2
- data/lib/lookbook/code_formatter.rb +1 -1
- data/lib/lookbook/collection.rb +8 -3
- data/lib/lookbook/component.rb +2 -3
- data/lib/lookbook/config.rb +13 -10
- data/lib/lookbook/data.rb +1 -1
- data/lib/lookbook/engine.rb +13 -10
- data/lib/lookbook/entity.rb +1 -1
- data/lib/lookbook/hooks.rb +1 -1
- data/lib/lookbook/markdown.rb +1 -1
- data/lib/lookbook/page.rb +4 -5
- data/lib/lookbook/page_section.rb +2 -4
- data/lib/lookbook/panels.rb +1 -1
- data/lib/lookbook/preview.rb +9 -11
- data/lib/lookbook/preview_controller.rb +1 -1
- data/lib/lookbook/preview_example.rb +1 -1
- data/lib/lookbook/source_inspector.rb +14 -11
- data/lib/lookbook/store.rb +7 -3
- data/lib/lookbook/tag.rb +5 -1
- data/lib/lookbook/tags.rb +3 -3
- data/lib/lookbook/theme.rb +2 -2
- data/lib/lookbook/version.rb +1 -1
- data/lib/tasks/lookbook_tasks.rake +1 -2
- data/public/lookbook-assets/css/lookbook.css +19 -10
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/css/themes/blue.css +1 -0
- data/public/lookbook-assets/css/themes/blue.css.map +1 -1
- data/public/lookbook-assets/css/themes/indigo.css +1 -0
- data/public/lookbook-assets/css/themes/indigo.css.map +1 -1
- data/public/lookbook-assets/css/themes/zinc.css +1 -0
- data/public/lookbook-assets/css/themes/zinc.css.map +1 -1
- data/public/lookbook-assets/js/lookbook.js +84 -84
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +3 -2
| @@ -7701,7 +7701,17 @@ function $5439cede634b2921$var$toCamel(s) { | |
| 7701 7701 | 
             
            }
         | 
| 7702 7702 |  | 
| 7703 7703 |  | 
| 7704 | 
            -
            var $ | 
| 7704 | 
            +
            var $f959e58624110d32$exports = {};
         | 
| 7705 | 
            +
            var $99486586f6691564$exports = {};
         | 
| 7706 | 
            +
             | 
| 7707 | 
            +
            $parcel$defineInteropFlag($99486586f6691564$exports);
         | 
| 7708 | 
            +
             | 
| 7709 | 
            +
            $parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
         | 
| 7710 | 
            +
            function $99486586f6691564$export$2e2bcd8739ae039() {
         | 
| 7711 | 
            +
                return {};
         | 
| 7712 | 
            +
            }
         | 
| 7713 | 
            +
             | 
| 7714 | 
            +
             | 
| 7705 7715 | 
             
            var $cbd28b10fa9798c7$exports = {};
         | 
| 7706 7716 |  | 
| 7707 7717 | 
             
            $parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
         | 
| @@ -11354,72 +11364,6 @@ function $cbd28b10fa9798c7$export$2e2bcd8739ae039() { | |
| 11354 11364 | 
             
            }
         | 
| 11355 11365 |  | 
| 11356 11366 |  | 
| 11357 | 
            -
            var $99486586f6691564$exports = {};
         | 
| 11358 | 
            -
             | 
| 11359 | 
            -
            $parcel$defineInteropFlag($99486586f6691564$exports);
         | 
| 11360 | 
            -
             | 
| 11361 | 
            -
            $parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
         | 
| 11362 | 
            -
            function $99486586f6691564$export$2e2bcd8739ae039() {
         | 
| 11363 | 
            -
                return {};
         | 
| 11364 | 
            -
            }
         | 
| 11365 | 
            -
             | 
| 11366 | 
            -
             | 
| 11367 | 
            -
            var $47a1c62621be0c54$exports = {};
         | 
| 11368 | 
            -
             | 
| 11369 | 
            -
            $parcel$defineInteropFlag($47a1c62621be0c54$exports);
         | 
| 11370 | 
            -
             | 
| 11371 | 
            -
            $parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039);
         | 
| 11372 | 
            -
            var $122263eab94cad08$exports = {};
         | 
| 11373 | 
            -
             | 
| 11374 | 
            -
            $parcel$defineInteropFlag($122263eab94cad08$exports);
         | 
| 11375 | 
            -
             | 
| 11376 | 
            -
            $parcel$export($122263eab94cad08$exports, "initClipboard", () => $122263eab94cad08$export$c6684e6159b21de3);
         | 
| 11377 | 
            -
            $parcel$export($122263eab94cad08$exports, "default", () => $122263eab94cad08$export$2e2bcd8739ae039);
         | 
| 11378 | 
            -
             | 
| 11379 | 
            -
            function $122263eab94cad08$export$c6684e6159b21de3(context = {}) {
         | 
| 11380 | 
            -
                let copyTimeout = null;
         | 
| 11381 | 
            -
                return Object.assign(context, {
         | 
| 11382 | 
            -
                    copied: false,
         | 
| 11383 | 
            -
                    async copyToClipboard (target = null) {
         | 
| 11384 | 
            -
                        let targetEl;
         | 
| 11385 | 
            -
                        if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget;
         | 
| 11386 | 
            -
                        else if (typeof target === "string") targetEl = document.querySelector(target);
         | 
| 11387 | 
            -
                        if (!targetEl) {
         | 
| 11388 | 
            -
                            this.warn("Could not find copy target");
         | 
| 11389 | 
            -
                            return false;
         | 
| 11390 | 
            -
                        }
         | 
| 11391 | 
            -
                        const content = (0, $7ae6ae39c2ec9059$export$6cb344a21ca18aec)(targetEl.innerText.trim());
         | 
| 11392 | 
            -
                        await window.navigator.clipboard.writeText(content);
         | 
| 11393 | 
            -
                        this.copied = true;
         | 
| 11394 | 
            -
                        if (copyTimeout) clearTimeout(copyTimeout);
         | 
| 11395 | 
            -
                        copyTimeout = setTimeout(()=>{
         | 
| 11396 | 
            -
                            this.copied = false;
         | 
| 11397 | 
            -
                            this.onCopyComplete();
         | 
| 11398 | 
            -
                        }, 1000);
         | 
| 11399 | 
            -
                        return content;
         | 
| 11400 | 
            -
                    },
         | 
| 11401 | 
            -
                    onCopyComplete () {}
         | 
| 11402 | 
            -
                });
         | 
| 11403 | 
            -
            }
         | 
| 11404 | 
            -
            function $122263eab94cad08$export$2e2bcd8739ae039() {
         | 
| 11405 | 
            -
                return $122263eab94cad08$export$c6684e6159b21de3({});
         | 
| 11406 | 
            -
            }
         | 
| 11407 | 
            -
             | 
| 11408 | 
            -
             | 
| 11409 | 
            -
             | 
| 11410 | 
            -
            function $47a1c62621be0c54$export$2e2bcd8739ae039() {
         | 
| 11411 | 
            -
                const button = (0, $cbd28b10fa9798c7$export$2e2bcd8739ae039)();
         | 
| 11412 | 
            -
                return {
         | 
| 11413 | 
            -
                    ...button,
         | 
| 11414 | 
            -
                    copied: false,
         | 
| 11415 | 
            -
                    init () {
         | 
| 11416 | 
            -
                        button.init.bind(this)();
         | 
| 11417 | 
            -
                        (0, $122263eab94cad08$export$c6684e6159b21de3)(this);
         | 
| 11418 | 
            -
                    }
         | 
| 11419 | 
            -
                };
         | 
| 11420 | 
            -
            }
         | 
| 11421 | 
            -
             | 
| 11422 | 
            -
             | 
| 11423 11367 | 
             
            var $e398acaded942bbe$exports = {};
         | 
| 11424 11368 |  | 
| 11425 11369 | 
             
            $parcel$defineInteropFlag($e398acaded942bbe$exports);
         | 
| @@ -11478,18 +11422,6 @@ function $e9904a14dabf652d$export$2e2bcd8739ae039(store) { | |
| 11478 11422 | 
             
            }
         | 
| 11479 11423 |  | 
| 11480 11424 |  | 
| 11481 | 
            -
            var $36506012e0c6e9e3$exports = {};
         | 
| 11482 | 
            -
             | 
| 11483 | 
            -
            $parcel$defineInteropFlag($36506012e0c6e9e3$exports);
         | 
| 11484 | 
            -
             | 
| 11485 | 
            -
            $parcel$export($36506012e0c6e9e3$exports, "default", () => $36506012e0c6e9e3$export$2e2bcd8739ae039);
         | 
| 11486 | 
            -
            function $36506012e0c6e9e3$export$2e2bcd8739ae039(iconName) {
         | 
| 11487 | 
            -
                return {
         | 
| 11488 | 
            -
                    iconName: iconName
         | 
| 11489 | 
            -
                };
         | 
| 11490 | 
            -
            }
         | 
| 11491 | 
            -
             | 
| 11492 | 
            -
             | 
| 11493 11425 | 
             
            var $e1f51f020443edd4$exports = {};
         | 
| 11494 11426 |  | 
| 11495 11427 | 
             
            $parcel$defineInteropFlag($e1f51f020443edd4$exports);
         | 
| @@ -12355,6 +12287,74 @@ function $e1f51f020443edd4$export$2e2bcd8739ae039(id, embedStore) { | |
| 12355 12287 | 
             
            }
         | 
| 12356 12288 |  | 
| 12357 12289 |  | 
| 12290 | 
            +
            var $47a1c62621be0c54$exports = {};
         | 
| 12291 | 
            +
             | 
| 12292 | 
            +
            $parcel$defineInteropFlag($47a1c62621be0c54$exports);
         | 
| 12293 | 
            +
             | 
| 12294 | 
            +
            $parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039);
         | 
| 12295 | 
            +
            var $122263eab94cad08$exports = {};
         | 
| 12296 | 
            +
             | 
| 12297 | 
            +
            $parcel$defineInteropFlag($122263eab94cad08$exports);
         | 
| 12298 | 
            +
             | 
| 12299 | 
            +
            $parcel$export($122263eab94cad08$exports, "initClipboard", () => $122263eab94cad08$export$c6684e6159b21de3);
         | 
| 12300 | 
            +
            $parcel$export($122263eab94cad08$exports, "default", () => $122263eab94cad08$export$2e2bcd8739ae039);
         | 
| 12301 | 
            +
             | 
| 12302 | 
            +
            function $122263eab94cad08$export$c6684e6159b21de3(context = {}) {
         | 
| 12303 | 
            +
                let copyTimeout = null;
         | 
| 12304 | 
            +
                return Object.assign(context, {
         | 
| 12305 | 
            +
                    copied: false,
         | 
| 12306 | 
            +
                    async copyToClipboard (target = null) {
         | 
| 12307 | 
            +
                        let targetEl;
         | 
| 12308 | 
            +
                        if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget;
         | 
| 12309 | 
            +
                        else if (typeof target === "string") targetEl = document.querySelector(target);
         | 
| 12310 | 
            +
                        if (!targetEl) {
         | 
| 12311 | 
            +
                            this.warn("Could not find copy target");
         | 
| 12312 | 
            +
                            return false;
         | 
| 12313 | 
            +
                        }
         | 
| 12314 | 
            +
                        const content = (0, $7ae6ae39c2ec9059$export$6cb344a21ca18aec)(targetEl.innerHTML.trim());
         | 
| 12315 | 
            +
                        await window.navigator.clipboard.writeText(content);
         | 
| 12316 | 
            +
                        this.copied = true;
         | 
| 12317 | 
            +
                        if (copyTimeout) clearTimeout(copyTimeout);
         | 
| 12318 | 
            +
                        copyTimeout = setTimeout(()=>{
         | 
| 12319 | 
            +
                            this.copied = false;
         | 
| 12320 | 
            +
                            this.onCopyComplete();
         | 
| 12321 | 
            +
                        }, 1000);
         | 
| 12322 | 
            +
                        return content;
         | 
| 12323 | 
            +
                    },
         | 
| 12324 | 
            +
                    onCopyComplete () {}
         | 
| 12325 | 
            +
                });
         | 
| 12326 | 
            +
            }
         | 
| 12327 | 
            +
            function $122263eab94cad08$export$2e2bcd8739ae039() {
         | 
| 12328 | 
            +
                return $122263eab94cad08$export$c6684e6159b21de3({});
         | 
| 12329 | 
            +
            }
         | 
| 12330 | 
            +
             | 
| 12331 | 
            +
             | 
| 12332 | 
            +
             | 
| 12333 | 
            +
            function $47a1c62621be0c54$export$2e2bcd8739ae039() {
         | 
| 12334 | 
            +
                const button = (0, $cbd28b10fa9798c7$export$2e2bcd8739ae039)();
         | 
| 12335 | 
            +
                return {
         | 
| 12336 | 
            +
                    ...button,
         | 
| 12337 | 
            +
                    copied: false,
         | 
| 12338 | 
            +
                    init () {
         | 
| 12339 | 
            +
                        button.init.bind(this)();
         | 
| 12340 | 
            +
                        (0, $122263eab94cad08$export$c6684e6159b21de3)(this);
         | 
| 12341 | 
            +
                    }
         | 
| 12342 | 
            +
                };
         | 
| 12343 | 
            +
            }
         | 
| 12344 | 
            +
             | 
| 12345 | 
            +
             | 
| 12346 | 
            +
            var $36506012e0c6e9e3$exports = {};
         | 
| 12347 | 
            +
             | 
| 12348 | 
            +
            $parcel$defineInteropFlag($36506012e0c6e9e3$exports);
         | 
| 12349 | 
            +
             | 
| 12350 | 
            +
            $parcel$export($36506012e0c6e9e3$exports, "default", () => $36506012e0c6e9e3$export$2e2bcd8739ae039);
         | 
| 12351 | 
            +
            function $36506012e0c6e9e3$export$2e2bcd8739ae039(iconName) {
         | 
| 12352 | 
            +
                return {
         | 
| 12353 | 
            +
                    iconName: iconName
         | 
| 12354 | 
            +
                };
         | 
| 12355 | 
            +
            }
         | 
| 12356 | 
            +
             | 
| 12357 | 
            +
             | 
| 12358 12358 | 
             
            var $d92d9d5253f84566$exports = {};
         | 
| 12359 12359 |  | 
| 12360 12360 | 
             
            $parcel$defineInteropFlag($d92d9d5253f84566$exports);
         | 
| @@ -13210,14 +13210,14 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) { | |
| 13210 13210 | 
             
            }
         | 
| 13211 13211 |  | 
| 13212 13212 |  | 
| 13213 | 
            -
            $ | 
| 13214 | 
            -
                "button": $cbd28b10fa9798c7$exports,
         | 
| 13213 | 
            +
            $f959e58624110d32$exports = {
         | 
| 13215 13214 | 
             
                "code": $99486586f6691564$exports,
         | 
| 13216 | 
            -
                " | 
| 13215 | 
            +
                "button": $cbd28b10fa9798c7$exports,
         | 
| 13217 13216 | 
             
                "dimensions_display": $e398acaded942bbe$exports,
         | 
| 13218 13217 | 
             
                "filter": $e9904a14dabf652d$exports,
         | 
| 13219 | 
            -
                "icon": $36506012e0c6e9e3$exports,
         | 
| 13220 13218 | 
             
                "embed": $e1f51f020443edd4$exports,
         | 
| 13219 | 
            +
                "copy_button": $47a1c62621be0c54$exports,
         | 
| 13220 | 
            +
                "icon": $36506012e0c6e9e3$exports,
         | 
| 13221 13221 | 
             
                "nav": $d92d9d5253f84566$exports,
         | 
| 13222 13222 | 
             
                "params_editor": $b63b9c6d236b3f65$exports,
         | 
| 13223 13223 | 
             
                "split_layout": $506dabb2bf255b38$exports,
         | 
| @@ -13367,7 +13367,7 @@ const $d73574cc5e9b9e72$var$prefix = window.APP_NAME; | |
| 13367 13367 | 
             
            // Components
         | 
| 13368 13368 | 
             
            (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
         | 
| 13369 13369 | 
             
            [
         | 
| 13370 | 
            -
                $ | 
| 13370 | 
            +
                $f959e58624110d32$exports,
         | 
| 13371 13371 | 
             
                $e4eab7529959b73b$exports,
         | 
| 13372 13372 | 
             
                $4979d2d897a1c01f$exports
         | 
| 13373 13373 | 
             
            ].forEach((scripts)=>{
         |