lookbook 1.0.0.rc.1 → 1.0.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/lookbook/js/components/clipboard.js +1 -1
- data/app/components/lookbook/embed/component.html.erb +1 -1
- data/app/controllers/lookbook/application_controller.rb +1 -0
- data/lib/lookbook/preview_controller.rb +1 -1
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/js/lookbook.js +81 -81
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03c7bc590a271bc1db49e9636c5c6a274ec45f9a449aaf811695e74c4de52aaa
|
4
|
+
data.tar.gz: a23446857053cf0789adf7ac0644ea3fe8968a8a7fee7c25e2f688ff5e15b7b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1eac6af6a1e73ef6c44aa637ca1552bba495d3f07a402ff2bb60d79606c391aaa4a54eeed8e44896273007cb9261cffe57d40b135951b94ea57919be9581d44
|
7
|
+
data.tar.gz: 70fd860db9aa315acd81b182188f3b7f53a38098f33a57bd7b4d8839437de932bc93462a5d00acd30195790157f8af70e7f8313778663bf784ffb3d8fb9437a1
|
@@ -19,7 +19,7 @@ function initClipboard(context = {}) {
|
|
19
19
|
return false;
|
20
20
|
}
|
21
21
|
|
22
|
-
const content = decodeEntities(targetEl.
|
22
|
+
const content = decodeEntities(targetEl.innerHTML.trim());
|
23
23
|
|
24
24
|
await window.navigator.clipboard.writeText(content);
|
25
25
|
this.copied = true;
|
@@ -13,7 +13,7 @@
|
|
13
13
|
href: lookbook_inspect_path(@example.path, @params),
|
14
14
|
tooltip: "View in Inspector" %>
|
15
15
|
<% group.button icon: :external_link,
|
16
|
-
href:
|
16
|
+
href: lookbook_preview_path(@example.path, @params),
|
17
17
|
tooltip: "Open in new window",
|
18
18
|
target: "_blank" %>
|
19
19
|
<% end %>
|
@@ -14,7 +14,7 @@ module Lookbook
|
|
14
14
|
render html: render_to_string(template, **opts)
|
15
15
|
end
|
16
16
|
|
17
|
-
def render_in_layout_to_string(template, locals,
|
17
|
+
def render_in_layout_to_string(template, locals, opts = {})
|
18
18
|
append_view_path Lookbook::Engine.root.join("app/views")
|
19
19
|
html = render_to_string(template, locals: locals, **determine_layout(opts[:layout]))
|
20
20
|
if opts[:append_html].present?
|
data/lib/lookbook/version.rb
CHANGED
@@ -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,16 +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
11367
|
var $e398acaded942bbe$exports = {};
|
11368
11368
|
|
11369
11369
|
$parcel$defineInteropFlag($e398acaded942bbe$exports);
|
@@ -11397,57 +11397,26 @@ function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
|
|
11397
11397
|
}
|
11398
11398
|
|
11399
11399
|
|
11400
|
-
var $
|
11401
|
-
|
11402
|
-
$parcel$defineInteropFlag($47a1c62621be0c54$exports);
|
11403
|
-
|
11404
|
-
$parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039);
|
11405
|
-
var $122263eab94cad08$exports = {};
|
11406
|
-
|
11407
|
-
$parcel$defineInteropFlag($122263eab94cad08$exports);
|
11408
|
-
|
11409
|
-
$parcel$export($122263eab94cad08$exports, "initClipboard", () => $122263eab94cad08$export$c6684e6159b21de3);
|
11410
|
-
$parcel$export($122263eab94cad08$exports, "default", () => $122263eab94cad08$export$2e2bcd8739ae039);
|
11411
|
-
|
11412
|
-
function $122263eab94cad08$export$c6684e6159b21de3(context = {}) {
|
11413
|
-
let copyTimeout = null;
|
11414
|
-
return Object.assign(context, {
|
11415
|
-
copied: false,
|
11416
|
-
async copyToClipboard (target = null) {
|
11417
|
-
let targetEl;
|
11418
|
-
if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget;
|
11419
|
-
else if (typeof target === "string") targetEl = document.querySelector(target);
|
11420
|
-
if (!targetEl) {
|
11421
|
-
this.warn("Could not find copy target");
|
11422
|
-
return false;
|
11423
|
-
}
|
11424
|
-
const content = (0, $7ae6ae39c2ec9059$export$6cb344a21ca18aec)(targetEl.innerText.trim());
|
11425
|
-
await window.navigator.clipboard.writeText(content);
|
11426
|
-
this.copied = true;
|
11427
|
-
if (copyTimeout) clearTimeout(copyTimeout);
|
11428
|
-
copyTimeout = setTimeout(()=>{
|
11429
|
-
this.copied = false;
|
11430
|
-
this.onCopyComplete();
|
11431
|
-
}, 1000);
|
11432
|
-
return content;
|
11433
|
-
},
|
11434
|
-
onCopyComplete () {}
|
11435
|
-
});
|
11436
|
-
}
|
11437
|
-
function $122263eab94cad08$export$2e2bcd8739ae039() {
|
11438
|
-
return $122263eab94cad08$export$c6684e6159b21de3({});
|
11439
|
-
}
|
11440
|
-
|
11400
|
+
var $e9904a14dabf652d$exports = {};
|
11441
11401
|
|
11402
|
+
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
11442
11403
|
|
11443
|
-
|
11444
|
-
|
11404
|
+
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
11405
|
+
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
11445
11406
|
return {
|
11446
|
-
|
11447
|
-
|
11448
|
-
|
11449
|
-
|
11450
|
-
|
11407
|
+
focussed: false,
|
11408
|
+
get active () {
|
11409
|
+
return store.active;
|
11410
|
+
},
|
11411
|
+
get text () {
|
11412
|
+
return store.text;
|
11413
|
+
},
|
11414
|
+
clear () {
|
11415
|
+
if (store.raw === "") this.$refs.input.blur();
|
11416
|
+
else store.raw = "";
|
11417
|
+
},
|
11418
|
+
focus () {
|
11419
|
+
this.$refs.input.focus();
|
11451
11420
|
}
|
11452
11421
|
};
|
11453
11422
|
}
|
@@ -12318,26 +12287,57 @@ function $e1f51f020443edd4$export$2e2bcd8739ae039(id, embedStore) {
|
|
12318
12287
|
}
|
12319
12288
|
|
12320
12289
|
|
12321
|
-
var $
|
12290
|
+
var $47a1c62621be0c54$exports = {};
|
12322
12291
|
|
12323
|
-
$parcel$defineInteropFlag($
|
12292
|
+
$parcel$defineInteropFlag($47a1c62621be0c54$exports);
|
12324
12293
|
|
12325
|
-
$parcel$export($
|
12326
|
-
|
12327
|
-
|
12328
|
-
|
12329
|
-
|
12330
|
-
|
12331
|
-
|
12332
|
-
|
12333
|
-
|
12334
|
-
|
12335
|
-
|
12336
|
-
|
12337
|
-
|
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;
|
12338
12323
|
},
|
12339
|
-
|
12340
|
-
|
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
12341
|
}
|
12342
12342
|
};
|
12343
12343
|
}
|
@@ -13210,13 +13210,13 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
13210
13210
|
}
|
13211
13211
|
|
13212
13212
|
|
13213
|
-
$
|
13214
|
-
"button": $cbd28b10fa9798c7$exports,
|
13213
|
+
$f959e58624110d32$exports = {
|
13215
13214
|
"code": $99486586f6691564$exports,
|
13215
|
+
"button": $cbd28b10fa9798c7$exports,
|
13216
13216
|
"dimensions_display": $e398acaded942bbe$exports,
|
13217
|
-
"copy_button": $47a1c62621be0c54$exports,
|
13218
|
-
"embed": $e1f51f020443edd4$exports,
|
13219
13217
|
"filter": $e9904a14dabf652d$exports,
|
13218
|
+
"embed": $e1f51f020443edd4$exports,
|
13219
|
+
"copy_button": $47a1c62621be0c54$exports,
|
13220
13220
|
"icon": $36506012e0c6e9e3$exports,
|
13221
13221
|
"nav": $d92d9d5253f84566$exports,
|
13222
13222
|
"params_editor": $b63b9c6d236b3f65$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)=>{
|