lookbook 2.3.2 → 2.3.3
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/config/app.yml +1 -0
- data/lib/lookbook/engine.rb +31 -3
- data/lib/lookbook/reloaders.rb +6 -2
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/js/index.js +190 -190
- data/public/lookbook-assets/js/index.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: 8f4897497b8455a94621cbfc3f7013877ceab7b06e3f8733e98882ffc097749f
|
4
|
+
data.tar.gz: 18c342cb1fb8297326c219b88810d7ba1968900b887bbbd091735679632a25c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37337c5f998adef832658bc1a97ab1b422ecb53b93dfe3e61be2c48720e023b87faa6237897ea1546de4b9019827c61afa99efb213c536fcd3fdc8a068076a37
|
7
|
+
data.tar.gz: 6150a32ebab648f5e194ddf79ef0188bf0fa798a5ad270cbdf2f81212571c7bb60b0f186a2d8e572a1dcc9f891baa4928cf4d926e14fedb22ed0e205adee3eb7
|
data/config/app.yml
CHANGED
data/lib/lookbook/engine.rb
CHANGED
@@ -71,10 +71,12 @@ module Lookbook
|
|
71
71
|
if Engine.reloading?
|
72
72
|
reloaders.add(:previews, Engine.preview_watch_paths, opts.listen_extensions, &Engine.method(:load_previews))
|
73
73
|
reloaders.add(:pages, Engine.page_watch_paths, opts.page_extensions, &Engine.method(:load_pages))
|
74
|
-
reloaders.execute
|
74
|
+
reloaders.execute unless opts.lazy_load_previews_and_pages
|
75
75
|
else
|
76
|
-
|
77
|
-
|
76
|
+
unless opts.lazy_load_previews_and_pages
|
77
|
+
Engine.load_previews
|
78
|
+
Engine.load_pages
|
79
|
+
end
|
78
80
|
end
|
79
81
|
|
80
82
|
Engine.run_hooks(:after_initialize)
|
@@ -196,10 +198,34 @@ module Lookbook
|
|
196
198
|
|
197
199
|
def pages
|
198
200
|
@_pages ||= PageCollection.new
|
201
|
+
|
202
|
+
if opts.lazy_load_previews_and_pages && !@_loaded_pages
|
203
|
+
@_loaded_pages = true
|
204
|
+
|
205
|
+
if reloading?
|
206
|
+
reloaders.execute(:pages)
|
207
|
+
else
|
208
|
+
load_pages
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
@_pages
|
199
213
|
end
|
200
214
|
|
201
215
|
def previews
|
202
216
|
@_previews ||= PreviewCollection.new
|
217
|
+
|
218
|
+
if opts.lazy_load_previews_and_pages && !@_loaded_previews
|
219
|
+
@_loaded_previews = true
|
220
|
+
|
221
|
+
if reloading?
|
222
|
+
reloaders.execute(:previews)
|
223
|
+
else
|
224
|
+
load_previews
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
@_previews
|
203
229
|
end
|
204
230
|
|
205
231
|
def preview_controller
|
@@ -208,6 +234,7 @@ module Lookbook
|
|
208
234
|
end
|
209
235
|
|
210
236
|
def load_previews(changes = nil)
|
237
|
+
puts "----------------------------- LOADING PREVIEWS"
|
211
238
|
changed_files = [*changes[:added], *changes[:modified]] if changes
|
212
239
|
parser.parse(changed_files) do |code_objects|
|
213
240
|
previews.load(code_objects.all(:class), changes)
|
@@ -218,6 +245,7 @@ module Lookbook
|
|
218
245
|
end
|
219
246
|
|
220
247
|
def load_pages(changes = nil)
|
248
|
+
puts "----------------------------- LOADING PAGES"
|
221
249
|
pages.load(Engine.page_paths, changes)
|
222
250
|
rescue => e
|
223
251
|
Lookbook.logger.error(e)
|
data/lib/lookbook/reloaders.rb
CHANGED
@@ -16,10 +16,14 @@ module Lookbook
|
|
16
16
|
Rails.application.reloaders << reloader
|
17
17
|
Rails.application.reloader.to_run { reloader.execute_if_updated }
|
18
18
|
end
|
19
|
+
|
20
|
+
reloader
|
19
21
|
end
|
20
22
|
|
21
|
-
def execute
|
22
|
-
reloaders.each
|
23
|
+
def execute(name = nil)
|
24
|
+
reloaders.each do |reloader|
|
25
|
+
reloader.execute if name.nil? || name == reloader.name
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
def register_changes(changes)
|
data/lib/lookbook/version.rb
CHANGED
@@ -8026,7 +8026,7 @@ function $12b7aa006b8a97e1$var$toCamel(s) {
|
|
8026
8026
|
}
|
8027
8027
|
|
8028
8028
|
|
8029
|
-
var $
|
8029
|
+
var $e3fb13b1820aa7c3$exports = {};
|
8030
8030
|
var $cbd28b10fa9798c7$exports = {};
|
8031
8031
|
|
8032
8032
|
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
|
@@ -11555,6 +11555,39 @@ function $99486586f6691564$export$2e2bcd8739ae039() {
|
|
11555
11555
|
}
|
11556
11556
|
|
11557
11557
|
|
11558
|
+
var $e398acaded942bbe$exports = {};
|
11559
|
+
|
11560
|
+
$parcel$defineInteropFlag($e398acaded942bbe$exports);
|
11561
|
+
|
11562
|
+
$parcel$export($e398acaded942bbe$exports, "default", () => $e398acaded942bbe$export$2e2bcd8739ae039);
|
11563
|
+
|
11564
|
+
function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
|
11565
|
+
return {
|
11566
|
+
width: 0,
|
11567
|
+
height: 0,
|
11568
|
+
resizing: false,
|
11569
|
+
target: null,
|
11570
|
+
init () {
|
11571
|
+
this.target = document.querySelector(targetSelector);
|
11572
|
+
if (this.target) {
|
11573
|
+
this.width = Math.round(this.target.clientWidth);
|
11574
|
+
this.height = Math.round(this.target.clientHeight);
|
11575
|
+
this.createObserver();
|
11576
|
+
}
|
11577
|
+
},
|
11578
|
+
createObserver () {
|
11579
|
+
if (this.target) this.observer = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.target, ({ width: width, height: height })=>{
|
11580
|
+
this.width = width;
|
11581
|
+
this.height = height;
|
11582
|
+
});
|
11583
|
+
},
|
11584
|
+
tearDown () {
|
11585
|
+
if (this.observer) this.observer.disconnect();
|
11586
|
+
}
|
11587
|
+
};
|
11588
|
+
}
|
11589
|
+
|
11590
|
+
|
11558
11591
|
var $47a1c62621be0c54$exports = {};
|
11559
11592
|
|
11560
11593
|
$parcel$defineInteropFlag($47a1c62621be0c54$exports);
|
@@ -11611,39 +11644,6 @@ function $47a1c62621be0c54$export$2e2bcd8739ae039() {
|
|
11611
11644
|
}
|
11612
11645
|
|
11613
11646
|
|
11614
|
-
var $e398acaded942bbe$exports = {};
|
11615
|
-
|
11616
|
-
$parcel$defineInteropFlag($e398acaded942bbe$exports);
|
11617
|
-
|
11618
|
-
$parcel$export($e398acaded942bbe$exports, "default", () => $e398acaded942bbe$export$2e2bcd8739ae039);
|
11619
|
-
|
11620
|
-
function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
|
11621
|
-
return {
|
11622
|
-
width: 0,
|
11623
|
-
height: 0,
|
11624
|
-
resizing: false,
|
11625
|
-
target: null,
|
11626
|
-
init () {
|
11627
|
-
this.target = document.querySelector(targetSelector);
|
11628
|
-
if (this.target) {
|
11629
|
-
this.width = Math.round(this.target.clientWidth);
|
11630
|
-
this.height = Math.round(this.target.clientHeight);
|
11631
|
-
this.createObserver();
|
11632
|
-
}
|
11633
|
-
},
|
11634
|
-
createObserver () {
|
11635
|
-
if (this.target) this.observer = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.target, ({ width: width, height: height })=>{
|
11636
|
-
this.width = width;
|
11637
|
-
this.height = height;
|
11638
|
-
});
|
11639
|
-
},
|
11640
|
-
tearDown () {
|
11641
|
-
if (this.observer) this.observer.disconnect();
|
11642
|
-
}
|
11643
|
-
};
|
11644
|
-
}
|
11645
|
-
|
11646
|
-
|
11647
11647
|
var $216ef7001f59f21d$exports = {};
|
11648
11648
|
|
11649
11649
|
$parcel$defineInteropFlag($216ef7001f59f21d$exports);
|
@@ -12273,33 +12273,6 @@ function $506dabb2bf255b38$var$sizeSplits(sizes) {
|
|
12273
12273
|
}
|
12274
12274
|
|
12275
12275
|
|
12276
|
-
var $a87dacf5139b5e2f$exports = {};
|
12277
|
-
|
12278
|
-
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
12279
|
-
|
12280
|
-
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
12281
|
-
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
12282
|
-
return {
|
12283
|
-
get store () {
|
12284
|
-
return store || this;
|
12285
|
-
},
|
12286
|
-
get id () {
|
12287
|
-
return this.$root.id;
|
12288
|
-
},
|
12289
|
-
get panels () {
|
12290
|
-
return Array.from(this.$refs.panels.children);
|
12291
|
-
},
|
12292
|
-
isActive (el) {
|
12293
|
-
return this.store.activeTab === this._getRef(el);
|
12294
|
-
},
|
12295
|
-
// protected
|
12296
|
-
_getRef (el) {
|
12297
|
-
return el.getAttribute("x-ref");
|
12298
|
-
}
|
12299
|
-
};
|
12300
|
-
}
|
12301
|
-
|
12302
|
-
|
12303
12276
|
var $0db07828cadc68e0$exports = {};
|
12304
12277
|
|
12305
12278
|
$parcel$defineInteropFlag($0db07828cadc68e0$exports);
|
@@ -12520,140 +12493,49 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
12520
12493
|
}
|
12521
12494
|
|
12522
12495
|
|
12523
|
-
$
|
12496
|
+
var $a87dacf5139b5e2f$exports = {};
|
12497
|
+
|
12498
|
+
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
12499
|
+
|
12500
|
+
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
12501
|
+
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
12502
|
+
return {
|
12503
|
+
get store () {
|
12504
|
+
return store || this;
|
12505
|
+
},
|
12506
|
+
get id () {
|
12507
|
+
return this.$root.id;
|
12508
|
+
},
|
12509
|
+
get panels () {
|
12510
|
+
return Array.from(this.$refs.panels.children);
|
12511
|
+
},
|
12512
|
+
isActive (el) {
|
12513
|
+
return this.store.activeTab === this._getRef(el);
|
12514
|
+
},
|
12515
|
+
// protected
|
12516
|
+
_getRef (el) {
|
12517
|
+
return el.getAttribute("x-ref");
|
12518
|
+
}
|
12519
|
+
};
|
12520
|
+
}
|
12521
|
+
|
12522
|
+
|
12523
|
+
$e3fb13b1820aa7c3$exports = {
|
12524
12524
|
"button": $cbd28b10fa9798c7$exports,
|
12525
12525
|
"code": $99486586f6691564$exports,
|
12526
|
-
"copy_button": $47a1c62621be0c54$exports,
|
12527
12526
|
"dimensions_display": $e398acaded942bbe$exports,
|
12527
|
+
"copy_button": $47a1c62621be0c54$exports,
|
12528
12528
|
"embed_code_dropdown": $216ef7001f59f21d$exports,
|
12529
12529
|
"filter": $e9904a14dabf652d$exports,
|
12530
12530
|
"nav": $d92d9d5253f84566$exports,
|
12531
12531
|
"split_layout": $506dabb2bf255b38$exports,
|
12532
|
-
"tab_panels": $a87dacf5139b5e2f$exports,
|
12533
12532
|
"tabs": $0db07828cadc68e0$exports,
|
12534
|
-
"viewport": $6d64716f0b34fdf4$exports
|
12533
|
+
"viewport": $6d64716f0b34fdf4$exports,
|
12534
|
+
"tab_panels": $a87dacf5139b5e2f$exports
|
12535
12535
|
};
|
12536
12536
|
|
12537
12537
|
|
12538
|
-
var $
|
12539
|
-
var $6a9b69d9cc7f810f$exports = {};
|
12540
|
-
|
12541
|
-
$parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
|
12542
|
-
|
12543
|
-
$parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
|
12544
|
-
var $cdfeaa1e0e8d642c$exports = {};
|
12545
|
-
(function(global, factory) {
|
12546
|
-
$cdfeaa1e0e8d642c$exports = factory();
|
12547
|
-
})($cdfeaa1e0e8d642c$exports, function() {
|
12548
|
-
"use strict";
|
12549
|
-
/* eslint-disable no-var */ function assign(target) {
|
12550
|
-
for(var i = 1; i < arguments.length; i++){
|
12551
|
-
var source = arguments[i];
|
12552
|
-
for(var key in source)target[key] = source[key];
|
12553
|
-
}
|
12554
|
-
return target;
|
12555
|
-
}
|
12556
|
-
/* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {
|
12557
|
-
read: function(value) {
|
12558
|
-
if (value[0] === '"') value = value.slice(1, -1);
|
12559
|
-
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
12560
|
-
},
|
12561
|
-
write: function(value) {
|
12562
|
-
return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
12563
|
-
}
|
12564
|
-
};
|
12565
|
-
/* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {
|
12566
|
-
function set(name, value, attributes) {
|
12567
|
-
if (typeof document === "undefined") return;
|
12568
|
-
attributes = assign({}, defaultAttributes, attributes);
|
12569
|
-
if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
12570
|
-
if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
|
12571
|
-
name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
12572
|
-
var stringifiedAttributes = "";
|
12573
|
-
for(var attributeName in attributes){
|
12574
|
-
if (!attributes[attributeName]) continue;
|
12575
|
-
stringifiedAttributes += "; " + attributeName;
|
12576
|
-
if (attributes[attributeName] === true) continue;
|
12577
|
-
// Considers RFC 6265 section 5.2:
|
12578
|
-
// ...
|
12579
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
12580
|
-
// character:
|
12581
|
-
// Consume the characters of the unparsed-attributes up to,
|
12582
|
-
// not including, the first %x3B (";") character.
|
12583
|
-
// ...
|
12584
|
-
stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
|
12585
|
-
}
|
12586
|
-
return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
|
12587
|
-
}
|
12588
|
-
function get(name) {
|
12589
|
-
if (typeof document === "undefined" || arguments.length && !name) return;
|
12590
|
-
// To prevent the for loop in the first place assign an empty array
|
12591
|
-
// in case there are no cookies at all.
|
12592
|
-
var cookies = document.cookie ? document.cookie.split("; ") : [];
|
12593
|
-
var jar = {};
|
12594
|
-
for(var i = 0; i < cookies.length; i++){
|
12595
|
-
var parts = cookies[i].split("=");
|
12596
|
-
var value = parts.slice(1).join("=");
|
12597
|
-
try {
|
12598
|
-
var found = decodeURIComponent(parts[0]);
|
12599
|
-
jar[found] = converter.read(value, found);
|
12600
|
-
if (name === found) break;
|
12601
|
-
} catch (e) {}
|
12602
|
-
}
|
12603
|
-
return name ? jar[name] : jar;
|
12604
|
-
}
|
12605
|
-
return Object.create({
|
12606
|
-
set: set,
|
12607
|
-
get: get,
|
12608
|
-
remove: function(name, attributes) {
|
12609
|
-
set(name, "", assign({}, attributes, {
|
12610
|
-
expires: -1
|
12611
|
-
}));
|
12612
|
-
},
|
12613
|
-
withAttributes: function(attributes) {
|
12614
|
-
return init(this.converter, assign({}, this.attributes, attributes));
|
12615
|
-
},
|
12616
|
-
withConverter: function(converter) {
|
12617
|
-
return init(assign({}, this.converter, converter), this.attributes);
|
12618
|
-
}
|
12619
|
-
}, {
|
12620
|
-
attributes: {
|
12621
|
-
value: Object.freeze(defaultAttributes)
|
12622
|
-
},
|
12623
|
-
converter: {
|
12624
|
-
value: Object.freeze(converter)
|
12625
|
-
}
|
12626
|
-
});
|
12627
|
-
}
|
12628
|
-
var api = init(defaultConverter, {
|
12629
|
-
path: "/"
|
12630
|
-
});
|
12631
|
-
/* eslint-enable no-var */ return api;
|
12632
|
-
});
|
12633
|
-
|
12634
|
-
|
12635
|
-
|
12636
|
-
function $6a9b69d9cc7f810f$export$2e2bcd8739ae039({ name: name, value: value }) {
|
12637
|
-
return {
|
12638
|
-
name: name,
|
12639
|
-
value: value,
|
12640
|
-
init () {
|
12641
|
-
this.$watch("value", ()=>this.update());
|
12642
|
-
},
|
12643
|
-
update () {
|
12644
|
-
(0, (/*@__PURE__*/$parcel$interopDefault($cdfeaa1e0e8d642c$exports))).set(`lookbook-display-${name}`, this.value);
|
12645
|
-
const searchParams = new URLSearchParams(window.location.search);
|
12646
|
-
const display = searchParams.get("_display");
|
12647
|
-
const displayParams = display ? (0, $fb8f79f7dd40b68f$export$f720fd0ddbeb53d9)(display) : {};
|
12648
|
-
displayParams[this.name] = this.value;
|
12649
|
-
searchParams.set("_display", (0, $fb8f79f7dd40b68f$export$c788aab010beeaec)(displayParams));
|
12650
|
-
const path = location.href.replace(location.search, "");
|
12651
|
-
this.navigateTo(`${path}?${searchParams.toString()}`);
|
12652
|
-
}
|
12653
|
-
};
|
12654
|
-
}
|
12655
|
-
|
12656
|
-
|
12538
|
+
var $9a68326211e66205$exports = {};
|
12657
12539
|
var $c299e36fa9e271bc$exports = {};
|
12658
12540
|
|
12659
12541
|
$parcel$defineInteropFlag($c299e36fa9e271bc$exports);
|
@@ -13546,6 +13428,124 @@ function $c299e36fa9e271bc$export$2e2bcd8739ae039(id, embedStore) {
|
|
13546
13428
|
}
|
13547
13429
|
|
13548
13430
|
|
13431
|
+
var $6a9b69d9cc7f810f$exports = {};
|
13432
|
+
|
13433
|
+
$parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
|
13434
|
+
|
13435
|
+
$parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
|
13436
|
+
var $cdfeaa1e0e8d642c$exports = {};
|
13437
|
+
(function(global, factory) {
|
13438
|
+
$cdfeaa1e0e8d642c$exports = factory();
|
13439
|
+
})($cdfeaa1e0e8d642c$exports, function() {
|
13440
|
+
"use strict";
|
13441
|
+
/* eslint-disable no-var */ function assign(target) {
|
13442
|
+
for(var i = 1; i < arguments.length; i++){
|
13443
|
+
var source = arguments[i];
|
13444
|
+
for(var key in source)target[key] = source[key];
|
13445
|
+
}
|
13446
|
+
return target;
|
13447
|
+
}
|
13448
|
+
/* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {
|
13449
|
+
read: function(value) {
|
13450
|
+
if (value[0] === '"') value = value.slice(1, -1);
|
13451
|
+
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
13452
|
+
},
|
13453
|
+
write: function(value) {
|
13454
|
+
return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
13455
|
+
}
|
13456
|
+
};
|
13457
|
+
/* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {
|
13458
|
+
function set(name, value, attributes) {
|
13459
|
+
if (typeof document === "undefined") return;
|
13460
|
+
attributes = assign({}, defaultAttributes, attributes);
|
13461
|
+
if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
13462
|
+
if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
|
13463
|
+
name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
13464
|
+
var stringifiedAttributes = "";
|
13465
|
+
for(var attributeName in attributes){
|
13466
|
+
if (!attributes[attributeName]) continue;
|
13467
|
+
stringifiedAttributes += "; " + attributeName;
|
13468
|
+
if (attributes[attributeName] === true) continue;
|
13469
|
+
// Considers RFC 6265 section 5.2:
|
13470
|
+
// ...
|
13471
|
+
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
13472
|
+
// character:
|
13473
|
+
// Consume the characters of the unparsed-attributes up to,
|
13474
|
+
// not including, the first %x3B (";") character.
|
13475
|
+
// ...
|
13476
|
+
stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
|
13477
|
+
}
|
13478
|
+
return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
|
13479
|
+
}
|
13480
|
+
function get(name) {
|
13481
|
+
if (typeof document === "undefined" || arguments.length && !name) return;
|
13482
|
+
// To prevent the for loop in the first place assign an empty array
|
13483
|
+
// in case there are no cookies at all.
|
13484
|
+
var cookies = document.cookie ? document.cookie.split("; ") : [];
|
13485
|
+
var jar = {};
|
13486
|
+
for(var i = 0; i < cookies.length; i++){
|
13487
|
+
var parts = cookies[i].split("=");
|
13488
|
+
var value = parts.slice(1).join("=");
|
13489
|
+
try {
|
13490
|
+
var found = decodeURIComponent(parts[0]);
|
13491
|
+
jar[found] = converter.read(value, found);
|
13492
|
+
if (name === found) break;
|
13493
|
+
} catch (e) {}
|
13494
|
+
}
|
13495
|
+
return name ? jar[name] : jar;
|
13496
|
+
}
|
13497
|
+
return Object.create({
|
13498
|
+
set: set,
|
13499
|
+
get: get,
|
13500
|
+
remove: function(name, attributes) {
|
13501
|
+
set(name, "", assign({}, attributes, {
|
13502
|
+
expires: -1
|
13503
|
+
}));
|
13504
|
+
},
|
13505
|
+
withAttributes: function(attributes) {
|
13506
|
+
return init(this.converter, assign({}, this.attributes, attributes));
|
13507
|
+
},
|
13508
|
+
withConverter: function(converter) {
|
13509
|
+
return init(assign({}, this.converter, converter), this.attributes);
|
13510
|
+
}
|
13511
|
+
}, {
|
13512
|
+
attributes: {
|
13513
|
+
value: Object.freeze(defaultAttributes)
|
13514
|
+
},
|
13515
|
+
converter: {
|
13516
|
+
value: Object.freeze(converter)
|
13517
|
+
}
|
13518
|
+
});
|
13519
|
+
}
|
13520
|
+
var api = init(defaultConverter, {
|
13521
|
+
path: "/"
|
13522
|
+
});
|
13523
|
+
/* eslint-enable no-var */ return api;
|
13524
|
+
});
|
13525
|
+
|
13526
|
+
|
13527
|
+
|
13528
|
+
function $6a9b69d9cc7f810f$export$2e2bcd8739ae039({ name: name, value: value }) {
|
13529
|
+
return {
|
13530
|
+
name: name,
|
13531
|
+
value: value,
|
13532
|
+
init () {
|
13533
|
+
this.$watch("value", ()=>this.update());
|
13534
|
+
},
|
13535
|
+
update () {
|
13536
|
+
(0, (/*@__PURE__*/$parcel$interopDefault($cdfeaa1e0e8d642c$exports))).set(`lookbook-display-${name}`, this.value);
|
13537
|
+
const searchParams = new URLSearchParams(window.location.search);
|
13538
|
+
const display = searchParams.get("_display");
|
13539
|
+
const displayParams = display ? (0, $fb8f79f7dd40b68f$export$f720fd0ddbeb53d9)(display) : {};
|
13540
|
+
displayParams[this.name] = this.value;
|
13541
|
+
searchParams.set("_display", (0, $fb8f79f7dd40b68f$export$c788aab010beeaec)(displayParams));
|
13542
|
+
const path = location.href.replace(location.search, "");
|
13543
|
+
this.navigateTo(`${path}?${searchParams.toString()}`);
|
13544
|
+
}
|
13545
|
+
};
|
13546
|
+
}
|
13547
|
+
|
13548
|
+
|
13549
13549
|
var $9b24cbeb3a465447$exports = {};
|
13550
13550
|
|
13551
13551
|
$parcel$defineInteropFlag($9b24cbeb3a465447$exports);
|
@@ -13635,13 +13635,13 @@ function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
|
|
13635
13635
|
}
|
13636
13636
|
|
13637
13637
|
|
13638
|
-
$
|
13639
|
-
"display_options": {
|
13640
|
-
"field": $6a9b69d9cc7f810f$exports
|
13641
|
-
},
|
13638
|
+
$9a68326211e66205$exports = {
|
13642
13639
|
"embed": {
|
13643
13640
|
"inspector": $c299e36fa9e271bc$exports
|
13644
13641
|
},
|
13642
|
+
"display_options": {
|
13643
|
+
"field": $6a9b69d9cc7f810f$exports
|
13644
|
+
},
|
13645
13645
|
"nav": {
|
13646
13646
|
"item": $9b24cbeb3a465447$exports
|
13647
13647
|
},
|
@@ -13715,8 +13715,8 @@ const $22969b543678f572$var$prefix = window.APP_NAME;
|
|
13715
13715
|
// Components
|
13716
13716
|
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039));
|
13717
13717
|
[
|
13718
|
-
$
|
13719
|
-
$
|
13718
|
+
$e3fb13b1820aa7c3$exports,
|
13719
|
+
$9a68326211e66205$exports,
|
13720
13720
|
$d56e5cced44001d2$exports
|
13721
13721
|
].forEach((scripts)=>{
|
13722
13722
|
const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts);
|