lookbook 1.0.1 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/lookbook/base_component.rb +10 -2
- data/app/components/lookbook/copy_button/component.rb +1 -1
- data/app/components/lookbook/dimensions_display/component.rb +1 -4
- data/app/components/lookbook/embed/component.html.erb +5 -5
- data/app/components/lookbook/embed/component.rb +2 -2
- data/app/components/lookbook/icon/component.html.erb +1 -1
- data/app/components/lookbook/icon/component.rb +1 -5
- data/app/components/lookbook/nav/item/component.rb +2 -2
- data/app/components/lookbook/params_editor/field/component.rb +1 -1
- data/app/controllers/lookbook/previews_controller.rb +20 -18
- data/app/helpers/lookbook/component_helper.rb +2 -1
- data/app/views/lookbook/previews/show.html.erb +2 -2
- data/config/routes.rb +1 -1
- data/lib/lookbook/component.rb +4 -0
- data/lib/lookbook/engine.rb +72 -51
- data/lib/lookbook/page.rb +4 -4
- data/lib/lookbook/preview.rb +6 -2
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/js/lookbook.js +88 -88
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +2 -2
@@ -7701,7 +7701,7 @@ function $5439cede634b2921$var$toCamel(s) {
|
|
7701
7701
|
}
|
7702
7702
|
|
7703
7703
|
|
7704
|
-
var $
|
7704
|
+
var $d865a31e17cd1079$exports = {};
|
7705
7705
|
var $cbd28b10fa9798c7$exports = {};
|
7706
7706
|
|
7707
7707
|
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
|
@@ -11364,62 +11364,6 @@ function $99486586f6691564$export$2e2bcd8739ae039() {
|
|
11364
11364
|
}
|
11365
11365
|
|
11366
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.innerHTML.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);
|
@@ -12343,6 +12287,62 @@ function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
|
12343
12287
|
}
|
12344
12288
|
|
12345
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
12346
|
var $36506012e0c6e9e3$exports = {};
|
12347
12347
|
|
12348
12348
|
$parcel$defineInteropFlag($36506012e0c6e9e3$exports);
|
@@ -12964,33 +12964,6 @@ function $506dabb2bf255b38$var$sizeSplits(sizes) {
|
|
12964
12964
|
}
|
12965
12965
|
|
12966
12966
|
|
12967
|
-
var $a87dacf5139b5e2f$exports = {};
|
12968
|
-
|
12969
|
-
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
12970
|
-
|
12971
|
-
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
12972
|
-
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
12973
|
-
return {
|
12974
|
-
get store () {
|
12975
|
-
return store || this;
|
12976
|
-
},
|
12977
|
-
get id () {
|
12978
|
-
return this.$root.id;
|
12979
|
-
},
|
12980
|
-
get panels () {
|
12981
|
-
return Array.from(this.$refs.panels.children);
|
12982
|
-
},
|
12983
|
-
isActive (el) {
|
12984
|
-
return this.store.activeTab === this._getRef(el);
|
12985
|
-
},
|
12986
|
-
// protected
|
12987
|
-
_getRef (el) {
|
12988
|
-
return el.getAttribute("x-ref");
|
12989
|
-
}
|
12990
|
-
};
|
12991
|
-
}
|
12992
|
-
|
12993
|
-
|
12994
12967
|
var $0db07828cadc68e0$exports = {};
|
12995
12968
|
|
12996
12969
|
$parcel$defineInteropFlag($0db07828cadc68e0$exports);
|
@@ -13083,6 +13056,33 @@ function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
|
|
13083
13056
|
}
|
13084
13057
|
|
13085
13058
|
|
13059
|
+
var $a87dacf5139b5e2f$exports = {};
|
13060
|
+
|
13061
|
+
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
13062
|
+
|
13063
|
+
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
13064
|
+
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
13065
|
+
return {
|
13066
|
+
get store () {
|
13067
|
+
return store || this;
|
13068
|
+
},
|
13069
|
+
get id () {
|
13070
|
+
return this.$root.id;
|
13071
|
+
},
|
13072
|
+
get panels () {
|
13073
|
+
return Array.from(this.$refs.panels.children);
|
13074
|
+
},
|
13075
|
+
isActive (el) {
|
13076
|
+
return this.store.activeTab === this._getRef(el);
|
13077
|
+
},
|
13078
|
+
// protected
|
13079
|
+
_getRef (el) {
|
13080
|
+
return el.getAttribute("x-ref");
|
13081
|
+
}
|
13082
|
+
};
|
13083
|
+
}
|
13084
|
+
|
13085
|
+
|
13086
13086
|
var $6d64716f0b34fdf4$exports = {};
|
13087
13087
|
|
13088
13088
|
$parcel$defineInteropFlag($6d64716f0b34fdf4$exports);
|
@@ -13210,19 +13210,19 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
13210
13210
|
}
|
13211
13211
|
|
13212
13212
|
|
13213
|
-
$
|
13213
|
+
$d865a31e17cd1079$exports = {
|
13214
13214
|
"button": $cbd28b10fa9798c7$exports,
|
13215
13215
|
"code": $99486586f6691564$exports,
|
13216
|
-
"copy_button": $47a1c62621be0c54$exports,
|
13217
13216
|
"dimensions_display": $e398acaded942bbe$exports,
|
13218
13217
|
"embed": $e1f51f020443edd4$exports,
|
13219
13218
|
"filter": $e9904a14dabf652d$exports,
|
13219
|
+
"copy_button": $47a1c62621be0c54$exports,
|
13220
13220
|
"icon": $36506012e0c6e9e3$exports,
|
13221
13221
|
"nav": $d92d9d5253f84566$exports,
|
13222
13222
|
"params_editor": $b63b9c6d236b3f65$exports,
|
13223
13223
|
"split_layout": $506dabb2bf255b38$exports,
|
13224
|
-
"tab_panels": $a87dacf5139b5e2f$exports,
|
13225
13224
|
"tabs": $0db07828cadc68e0$exports,
|
13225
|
+
"tab_panels": $a87dacf5139b5e2f$exports,
|
13226
13226
|
"viewport": $6d64716f0b34fdf4$exports
|
13227
13227
|
};
|
13228
13228
|
|
@@ -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
|
+
$d865a31e17cd1079$exports,
|
13371
13371
|
$e4eab7529959b73b$exports,
|
13372
13372
|
$4979d2d897a1c01f$exports
|
13373
13373
|
].forEach((scripts)=>{
|