lookbook 2.3.3 → 2.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f4897497b8455a94621cbfc3f7013877ceab7b06e3f8733e98882ffc097749f
4
- data.tar.gz: 18c342cb1fb8297326c219b88810d7ba1968900b887bbbd091735679632a25c6
3
+ metadata.gz: 699b3598051a4b9f584d5c0bb703142b16988603b8cc2c99dcd0d2dee5191aa9
4
+ data.tar.gz: f6893f9ffb913df5b41fe54db42f8491d2169c8ba2b4de66ba8c13eac5cce8a6
5
5
  SHA512:
6
- metadata.gz: 37337c5f998adef832658bc1a97ab1b422ecb53b93dfe3e61be2c48720e023b87faa6237897ea1546de4b9019827c61afa99efb213c536fcd3fdc8a068076a37
7
- data.tar.gz: 6150a32ebab648f5e194ddf79ef0188bf0fa798a5ad270cbdf2f81212571c7bb60b0f186a2d8e572a1dcc9f891baa4928cf4d926e14fedb22ed0e205adee3eb7
6
+ metadata.gz: bcca11383c011dd7044d2291f8d39f806624e73281c5df0f60ea5face46e2171222cd9d7d6222fe4a9da5275452ac5f8a8ff95ea3edc0af064232e64e96eb378
7
+ data.tar.gz: 732624f41ad1a0cbd895a27348cc0cf10373fb823c5f0f36618c9cb1c464ce03baa962754c9c63078c56c681a0aca9be084ffcd5fb7f7bca6897788d50c2b22b
@@ -234,7 +234,6 @@ module Lookbook
234
234
  end
235
235
 
236
236
  def load_previews(changes = nil)
237
- puts "----------------------------- LOADING PREVIEWS"
238
237
  changed_files = [*changes[:added], *changes[:modified]] if changes
239
238
  parser.parse(changed_files) do |code_objects|
240
239
  previews.load(code_objects.all(:class), changes)
@@ -245,7 +244,6 @@ module Lookbook
245
244
  end
246
245
 
247
246
  def load_pages(changes = nil)
248
- puts "----------------------------- LOADING PAGES"
249
247
  pages.load(Engine.page_paths, changes)
250
248
  rescue => e
251
249
  Lookbook.logger.error(e)
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "2.3.3"
2
+ VERSION = "2.3.4"
3
3
  end
@@ -8026,7 +8026,7 @@ function $12b7aa006b8a97e1$var$toCamel(s) {
8026
8026
  }
8027
8027
 
8028
8028
 
8029
- var $e3fb13b1820aa7c3$exports = {};
8029
+ var $c9dfaeb25bf110ce$exports = {};
8030
8030
  var $cbd28b10fa9798c7$exports = {};
8031
8031
 
8032
8032
  $parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
@@ -11555,39 +11555,6 @@ 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
-
11591
11558
  var $47a1c62621be0c54$exports = {};
11592
11559
 
11593
11560
  $parcel$defineInteropFlag($47a1c62621be0c54$exports);
@@ -11644,6 +11611,39 @@ function $47a1c62621be0c54$export$2e2bcd8739ae039() {
11644
11611
  }
11645
11612
 
11646
11613
 
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,6 +12273,33 @@ 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
+
12276
12303
  var $0db07828cadc68e0$exports = {};
12277
12304
 
12278
12305
  $parcel$defineInteropFlag($0db07828cadc68e0$exports);
@@ -12493,49 +12520,140 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
12493
12520
  }
12494
12521
 
12495
12522
 
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 = {
12523
+ $c9dfaeb25bf110ce$exports = {
12524
12524
  "button": $cbd28b10fa9798c7$exports,
12525
12525
  "code": $99486586f6691564$exports,
12526
- "dimensions_display": $e398acaded942bbe$exports,
12527
12526
  "copy_button": $47a1c62621be0c54$exports,
12527
+ "dimensions_display": $e398acaded942bbe$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,
12532
12533
  "tabs": $0db07828cadc68e0$exports,
12533
- "viewport": $6d64716f0b34fdf4$exports,
12534
- "tab_panels": $a87dacf5139b5e2f$exports
12534
+ "viewport": $6d64716f0b34fdf4$exports
12535
12535
  };
12536
12536
 
12537
12537
 
12538
- var $9a68326211e66205$exports = {};
12538
+ var $3821a3a183a9a321$exports = {};
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
+
12539
12657
  var $c299e36fa9e271bc$exports = {};
12540
12658
 
12541
12659
  $parcel$defineInteropFlag($c299e36fa9e271bc$exports);
@@ -13428,124 +13546,6 @@ function $c299e36fa9e271bc$export$2e2bcd8739ae039(id, embedStore) {
13428
13546
  }
13429
13547
 
13430
13548
 
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);
@@ -13603,6 +13603,20 @@ function $9b24cbeb3a465447$export$2e2bcd8739ae039({ id: id, matchers: matchers }
13603
13603
  }
13604
13604
 
13605
13605
 
13606
+ var $e773f8ef556b41ff$exports = {};
13607
+
13608
+ $parcel$defineInteropFlag($e773f8ef556b41ff$exports);
13609
+
13610
+ $parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
13611
+ function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
13612
+ return {
13613
+ get isNarrowLayout () {
13614
+ return this.narrow || false;
13615
+ }
13616
+ };
13617
+ }
13618
+
13619
+
13606
13620
  var $1a7a7298eec5b755$exports = {};
13607
13621
 
13608
13622
  $parcel$defineInteropFlag($1a7a7298eec5b755$exports);
@@ -13621,33 +13635,19 @@ function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
13621
13635
  }
13622
13636
 
13623
13637
 
13624
- var $e773f8ef556b41ff$exports = {};
13625
-
13626
- $parcel$defineInteropFlag($e773f8ef556b41ff$exports);
13627
-
13628
- $parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
13629
- function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
13630
- return {
13631
- get isNarrowLayout () {
13632
- return this.narrow || false;
13633
- }
13634
- };
13635
- }
13636
-
13637
-
13638
- $9a68326211e66205$exports = {
13639
- "embed": {
13640
- "inspector": $c299e36fa9e271bc$exports
13641
- },
13638
+ $3821a3a183a9a321$exports = {
13642
13639
  "display_options": {
13643
13640
  "field": $6a9b69d9cc7f810f$exports
13644
13641
  },
13642
+ "embed": {
13643
+ "inspector": $c299e36fa9e271bc$exports
13644
+ },
13645
13645
  "nav": {
13646
13646
  "item": $9b24cbeb3a465447$exports
13647
13647
  },
13648
13648
  "params": {
13649
- "editor": $1a7a7298eec5b755$exports,
13650
- "field": $e773f8ef556b41ff$exports
13649
+ "field": $e773f8ef556b41ff$exports,
13650
+ "editor": $1a7a7298eec5b755$exports
13651
13651
  }
13652
13652
  };
13653
13653
 
@@ -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
- $e3fb13b1820aa7c3$exports,
13719
- $9a68326211e66205$exports,
13718
+ $c9dfaeb25bf110ce$exports,
13719
+ $3821a3a183a9a321$exports,
13720
13720
  $d56e5cced44001d2$exports
13721
13721
  ].forEach((scripts)=>{
13722
13722
  const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts);