lookbook 2.0.0.beta.2 → 2.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/lookbook/css/fonts.css +33 -0
  3. data/app/assets/lookbook/css/lookbook.css +7 -0
  4. data/app/assets/lookbook/css/themes/blue.css +4 -1
  5. data/app/assets/lookbook/css/themes/green.css +4 -1
  6. data/app/assets/lookbook/css/themes/indigo.css +4 -1
  7. data/app/assets/lookbook/css/themes/rose.css +4 -1
  8. data/app/assets/lookbook/css/themes/zinc.css +4 -1
  9. data/app/assets/lookbook/fonts/Inter-italic.var.woff2 +0 -0
  10. data/app/assets/lookbook/fonts/Inter-roman.var.woff2 +0 -0
  11. data/app/assets/lookbook/fonts/SourceCodeVariable-Italic.ttf.woff2 +0 -0
  12. data/app/assets/lookbook/fonts/SourceCodeVariable-Roman.ttf.woff2 +0 -0
  13. data/app/assets/lookbook/img/lucide-sprite.svg +869 -869
  14. data/app/assets/lookbook/js/lib/lookbook.js +12 -2
  15. data/app/components/lookbook/code/highlight_github.css +16 -17
  16. data/app/components/lookbook/dimensions_display/component.js +4 -7
  17. data/app/components/lookbook/file_source/component.html.erb +9 -0
  18. data/app/components/lookbook/file_source/component.rb +73 -0
  19. data/app/components/lookbook/header/component.html.erb +11 -8
  20. data/app/components/lookbook/icon/component.css +1 -1
  21. data/app/components/lookbook/icon/component.html.erb +1 -1
  22. data/app/components/lookbook/icon/component.rb +4 -1
  23. data/app/components/lookbook/logo/component.html.erb +6 -0
  24. data/app/components/lookbook/logo/component.rb +15 -0
  25. data/app/components/lookbook/message/component.css +33 -0
  26. data/app/components/lookbook/message/component.html.erb +26 -0
  27. data/app/components/lookbook/message/component.rb +13 -0
  28. data/app/components/lookbook/nav/entity/component.html.erb +2 -2
  29. data/app/components/lookbook/nav/entity/component.rb +1 -1
  30. data/app/components/lookbook/page_tabs/component.html.erb +2 -2
  31. data/app/components/lookbook/params/field/component.css +3 -3
  32. data/app/components/lookbook/prose/component.css +8 -1
  33. data/app/components/lookbook/prose/component.html.erb +6 -1
  34. data/app/components/lookbook/prose/component.rb +2 -2
  35. data/app/controllers/concerns/lookbook/targetable_concern.rb +2 -16
  36. data/app/controllers/lookbook/application_controller.rb +38 -14
  37. data/app/controllers/lookbook/embeds_controller.rb +3 -4
  38. data/app/controllers/lookbook/inspector_controller.rb +4 -12
  39. data/app/controllers/lookbook/pages_controller.rb +15 -27
  40. data/app/controllers/lookbook/preview_controller.rb +30 -2
  41. data/app/controllers/lookbook/previews_controller.rb +13 -15
  42. data/app/views/layouts/lookbook/application.html.erb +1 -0
  43. data/app/views/layouts/lookbook/skeleton.html.erb +2 -2
  44. data/app/views/lookbook/errors/default.html.erb +40 -0
  45. data/app/views/lookbook/errors/not_found.html.erb +10 -0
  46. data/app/views/lookbook/index.html.erb +29 -24
  47. data/app/views/lookbook/pages/show.html.erb +9 -8
  48. data/app/views/lookbook/partials/_blank_slate.html.erb +7 -0
  49. data/config/app.yml +8 -0
  50. data/config/routes.rb +2 -0
  51. data/lib/lookbook/engine.rb +12 -5
  52. data/lib/lookbook/entities/concerns/annotatable_entity.rb +26 -1
  53. data/lib/lookbook/entities/concerns/inspectable_entity.rb +17 -2
  54. data/lib/lookbook/entities/concerns/locatable_entity.rb +51 -7
  55. data/lib/lookbook/entities/concerns/navigable_entity.rb +14 -1
  56. data/lib/lookbook/entities/entity.rb +34 -12
  57. data/lib/lookbook/entities/page_entity.rb +68 -10
  58. data/lib/lookbook/entities/page_section_entity.rb +4 -0
  59. data/lib/lookbook/entities/preview_entity.rb +107 -17
  60. data/lib/lookbook/entities/renderable_entity.rb +47 -9
  61. data/lib/lookbook/entities/rendered_scenario_entity.rb +17 -6
  62. data/lib/lookbook/entities/scenario_entity.rb +77 -16
  63. data/lib/lookbook/entities/scenario_group_entity.rb +82 -9
  64. data/lib/lookbook/helpers/page_helper.rb +26 -1
  65. data/lib/lookbook/helpers/ui_elements_helper.rb +0 -24
  66. data/lib/lookbook/param.rb +1 -1
  67. data/lib/lookbook/services/markdown_renderer.rb +2 -4
  68. data/lib/lookbook/stores/config_store.rb +0 -12
  69. data/lib/lookbook/support/errors/config_error.rb +1 -1
  70. data/lib/lookbook/support/errors/error.rb +64 -0
  71. data/lib/lookbook/support/errors/parser_error.rb +1 -1
  72. data/lib/lookbook/support/errors/preview_template_error.rb +1 -1
  73. data/lib/lookbook/support/errors/routing_error.rb +7 -0
  74. data/lib/lookbook/support/errors/template_error.rb +7 -0
  75. data/lib/lookbook/version.rb +1 -1
  76. data/public/lookbook-assets/Inter-italic.var.69eb0fe1.woff2 +0 -0
  77. data/public/lookbook-assets/Inter-italic.var.736a7044.woff2 +0 -0
  78. data/public/lookbook-assets/Inter-roman.var.b695afbe.woff2 +0 -0
  79. data/public/lookbook-assets/Inter-roman.var.fbdd51d0.woff2 +0 -0
  80. data/public/lookbook-assets/SourceCodeVariable-Italic.cad97b83.otf +0 -0
  81. data/public/lookbook-assets/SourceCodeVariable-Italic.ttf.09b4354a.woff2 +0 -0
  82. data/public/lookbook-assets/SourceCodeVariable-Italic.ttf.fcd7e9f4.woff2 +0 -0
  83. data/public/lookbook-assets/SourceCodeVariable-Roman.185ddb17.otf +0 -0
  84. data/public/lookbook-assets/SourceCodeVariable-Roman.ttf.118e9f22.woff2 +0 -0
  85. data/public/lookbook-assets/SourceCodeVariable-Roman.ttf.91043609.woff2 +0 -0
  86. data/public/lookbook-assets/css/lookbook.css +417 -58
  87. data/public/lookbook-assets/css/lookbook.css.map +1 -1
  88. data/public/lookbook-assets/css/themes/blue.css +4 -1
  89. data/public/lookbook-assets/css/themes/blue.css.map +1 -1
  90. data/public/lookbook-assets/css/themes/green.css +4 -1
  91. data/public/lookbook-assets/css/themes/green.css.map +1 -1
  92. data/public/lookbook-assets/css/themes/indigo.css +4 -1
  93. data/public/lookbook-assets/css/themes/indigo.css.map +1 -1
  94. data/public/lookbook-assets/css/themes/rose.css +4 -1
  95. data/public/lookbook-assets/css/themes/rose.css.map +1 -1
  96. data/public/lookbook-assets/css/themes/zinc.css +4 -1
  97. data/public/lookbook-assets/css/themes/zinc.css.map +1 -1
  98. data/public/lookbook-assets/img/lucide-sprite.svg +869 -869
  99. data/public/lookbook-assets/js/index.js +173 -173
  100. data/public/lookbook-assets/js/index.js.map +1 -1
  101. data/public/lookbook-assets/js/lookbook-core.js +4 -2
  102. data/public/lookbook-assets/js/lookbook.js +4 -2
  103. metadata +31 -26
  104. data/app/views/layouts/lookbook/shell.html.erb +0 -25
  105. data/app/views/lookbook/404.html.erb +0 -15
  106. data/app/views/lookbook/error.html.erb +0 -46
  107. data/lib/lookbook/error.rb +0 -120
  108. data/lib/lookbook/support/errors/lookbook_error.rb +0 -21
  109. data/lib/tasks/lookbook_tasks.rake +0 -10
  110. data/public/lookbook-assets/css/app.css +0 -2341
  111. data/public/lookbook-assets/css/app.css.map +0 -11
  112. data/public/lookbook-assets/css/themes/zinc.css.map.91837.5 +0 -1
  113. data/public/lookbook-assets/feather-sprite.svg +0 -1
  114. data/public/lookbook-assets/js/app.js +0 -10862
  115. data/public/lookbook-assets/js/app.js.map +0 -2571
  116. data/public/lookbook-assets/js/embed.js +0 -1427
  117. data/public/lookbook-assets/js/embed.js.91837.6 +0 -0
  118. data/public/lookbook-assets/js/embed.js.map +0 -1
  119. data/public/lookbook-assets/js/lookbook-core.js.map +0 -1
  120. data/public/lookbook-assets/js/lookbook.js.map +0 -1
  121. data/public/lookbook-assets/lookbook-esm.js +0 -1427
  122. data/public/lookbook-assets/lookbook-esm.js.map +0 -1
  123. data/public/lookbook-assets/lookbook-global.js +0 -1427
  124. data/public/lookbook-assets/lookbook-global.js.map +0 -1
  125. data/public/lookbook-assets/lookbook.js +0 -1427
  126. data/public/lookbook-assets/lookbook.js.map +0 -1
@@ -7831,7 +7831,7 @@ function $5439cede634b2921$var$toCamel(s) {
7831
7831
  }
7832
7832
 
7833
7833
 
7834
- var $69e9934f1d83bbc4$exports = {};
7834
+ var $77553f14666631eb$exports = {};
7835
7835
  var $cbd28b10fa9798c7$exports = {};
7836
7836
 
7837
7837
  $parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
@@ -11449,7 +11449,7 @@ function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
11449
11449
  }
11450
11450
  },
11451
11451
  createObserver () {
11452
- if (this.target) this.observer = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(document.querySelector(targetSelector), ({ width: width , height: height })=>{
11452
+ if (this.target) this.observer = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.target, ({ width: width , height: height })=>{
11453
11453
  this.width = width;
11454
11454
  this.height = height;
11455
11455
  });
@@ -11523,6 +11523,50 @@ function $36506012e0c6e9e3$export$2e2bcd8739ae039(iconName) {
11523
11523
  }
11524
11524
 
11525
11525
 
11526
+ var $d92d9d5253f84566$exports = {};
11527
+
11528
+ $parcel$defineInteropFlag($d92d9d5253f84566$exports);
11529
+
11530
+ $parcel$export($d92d9d5253f84566$exports, "default", () => $d92d9d5253f84566$export$2e2bcd8739ae039);
11531
+ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
11532
+ return {
11533
+ empty: false,
11534
+ children: [],
11535
+ init () {
11536
+ this.children = this.$refs.items ? Array.from(this.$refs.items.children) : [];
11537
+ },
11538
+ isOpen (id) {
11539
+ return store.open.includes(id);
11540
+ },
11541
+ setOpen (id) {
11542
+ store.open.push(id);
11543
+ },
11544
+ setClosed (id) {
11545
+ const index = store.open.indexOf(id);
11546
+ if (index > -1) store.open.splice(index, 1);
11547
+ },
11548
+ closeAll () {
11549
+ store.open.length = 0;
11550
+ },
11551
+ toggleOpen (id) {
11552
+ this.isOpen(id) ? this.setClosed(id) : this.setOpen(id);
11553
+ },
11554
+ async filter (text) {
11555
+ this.debug(`Filter text: ${text}`);
11556
+ await this.$nextTick();
11557
+ const filteredStates = await Promise.all(this.children.map(async (child)=>{
11558
+ const data = Alpine.$data(child);
11559
+ await data.filter(text);
11560
+ return data.filteredOut;
11561
+ }));
11562
+ const matchedChildCount = filteredStates.filter((s)=>!s).length;
11563
+ this.empty = matchedChildCount === 0;
11564
+ this.debug(`Children matching filter: ${matchedChildCount}/${this.children.length}`);
11565
+ }
11566
+ };
11567
+ }
11568
+
11569
+
11526
11570
  var $506dabb2bf255b38$exports = {};
11527
11571
 
11528
11572
  $parcel$defineInteropFlag($506dabb2bf255b38$exports);
@@ -12100,50 +12144,6 @@ function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
12100
12144
  }
12101
12145
 
12102
12146
 
12103
- var $d92d9d5253f84566$exports = {};
12104
-
12105
- $parcel$defineInteropFlag($d92d9d5253f84566$exports);
12106
-
12107
- $parcel$export($d92d9d5253f84566$exports, "default", () => $d92d9d5253f84566$export$2e2bcd8739ae039);
12108
- function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
12109
- return {
12110
- empty: false,
12111
- children: [],
12112
- init () {
12113
- this.children = this.$refs.items ? Array.from(this.$refs.items.children) : [];
12114
- },
12115
- isOpen (id) {
12116
- return store.open.includes(id);
12117
- },
12118
- setOpen (id) {
12119
- store.open.push(id);
12120
- },
12121
- setClosed (id) {
12122
- const index = store.open.indexOf(id);
12123
- if (index > -1) store.open.splice(index, 1);
12124
- },
12125
- closeAll () {
12126
- store.open.length = 0;
12127
- },
12128
- toggleOpen (id) {
12129
- this.isOpen(id) ? this.setClosed(id) : this.setOpen(id);
12130
- },
12131
- async filter (text) {
12132
- this.debug(`Filter text: ${text}`);
12133
- await this.$nextTick();
12134
- const filteredStates = await Promise.all(this.children.map(async (child)=>{
12135
- const data = Alpine.$data(child);
12136
- await data.filter(text);
12137
- return data.filteredOut;
12138
- }));
12139
- const matchedChildCount = filteredStates.filter((s)=>!s).length;
12140
- this.empty = matchedChildCount === 0;
12141
- this.debug(`Children matching filter: ${matchedChildCount}/${this.children.length}`);
12142
- }
12143
- };
12144
- }
12145
-
12146
-
12147
12147
  var $0db07828cadc68e0$exports = {};
12148
12148
 
12149
12149
  $parcel$defineInteropFlag($0db07828cadc68e0$exports);
@@ -12364,7 +12364,7 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
12364
12364
  }
12365
12365
 
12366
12366
 
12367
- $69e9934f1d83bbc4$exports = {
12367
+ $77553f14666631eb$exports = {
12368
12368
  "button": $cbd28b10fa9798c7$exports,
12369
12369
  "code": $99486586f6691564$exports,
12370
12370
  "copy_button": $47a1c62621be0c54$exports,
@@ -12372,133 +12372,15 @@ $69e9934f1d83bbc4$exports = {
12372
12372
  "embed_code_dropdown": $216ef7001f59f21d$exports,
12373
12373
  "filter": $e9904a14dabf652d$exports,
12374
12374
  "icon": $36506012e0c6e9e3$exports,
12375
+ "nav": $d92d9d5253f84566$exports,
12375
12376
  "split_layout": $506dabb2bf255b38$exports,
12376
12377
  "tab_panels": $a87dacf5139b5e2f$exports,
12377
- "nav": $d92d9d5253f84566$exports,
12378
12378
  "tabs": $0db07828cadc68e0$exports,
12379
12379
  "viewport": $6d64716f0b34fdf4$exports
12380
12380
  };
12381
12381
 
12382
12382
 
12383
- var $f3e1e32f4a1bd6da$exports = {};
12384
- var $6a9b69d9cc7f810f$exports = {};
12385
-
12386
- $parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
12387
-
12388
- $parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
12389
- var $cdfeaa1e0e8d642c$exports = {};
12390
- (function(global, factory) {
12391
- $cdfeaa1e0e8d642c$exports = factory();
12392
- })($cdfeaa1e0e8d642c$exports, function() {
12393
- "use strict";
12394
- /* eslint-disable no-var */ function assign(target) {
12395
- for(var i = 1; i < arguments.length; i++){
12396
- var source = arguments[i];
12397
- for(var key in source)target[key] = source[key];
12398
- }
12399
- return target;
12400
- }
12401
- /* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {
12402
- read: function(value) {
12403
- if (value[0] === '"') value = value.slice(1, -1);
12404
- return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
12405
- },
12406
- write: function(value) {
12407
- return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
12408
- }
12409
- };
12410
- /* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {
12411
- function set(key, value, attributes) {
12412
- if (typeof document === "undefined") return;
12413
- attributes = assign({}, defaultAttributes, attributes);
12414
- if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
12415
- if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
12416
- key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
12417
- var stringifiedAttributes = "";
12418
- for(var attributeName in attributes){
12419
- if (!attributes[attributeName]) continue;
12420
- stringifiedAttributes += "; " + attributeName;
12421
- if (attributes[attributeName] === true) continue;
12422
- // Considers RFC 6265 section 5.2:
12423
- // ...
12424
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
12425
- // character:
12426
- // Consume the characters of the unparsed-attributes up to,
12427
- // not including, the first %x3B (";") character.
12428
- // ...
12429
- stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
12430
- }
12431
- return document.cookie = key + "=" + converter.write(value, key) + stringifiedAttributes;
12432
- }
12433
- function get(key) {
12434
- if (typeof document === "undefined" || arguments.length && !key) return;
12435
- // To prevent the for loop in the first place assign an empty array
12436
- // in case there are no cookies at all.
12437
- var cookies = document.cookie ? document.cookie.split("; ") : [];
12438
- var jar = {};
12439
- for(var i = 0; i < cookies.length; i++){
12440
- var parts = cookies[i].split("=");
12441
- var value = parts.slice(1).join("=");
12442
- try {
12443
- var foundKey = decodeURIComponent(parts[0]);
12444
- jar[foundKey] = converter.read(value, foundKey);
12445
- if (key === foundKey) break;
12446
- } catch (e) {}
12447
- }
12448
- return key ? jar[key] : jar;
12449
- }
12450
- return Object.create({
12451
- set: set,
12452
- get: get,
12453
- remove: function(key, attributes) {
12454
- set(key, "", assign({}, attributes, {
12455
- expires: -1
12456
- }));
12457
- },
12458
- withAttributes: function(attributes) {
12459
- return init(this.converter, assign({}, this.attributes, attributes));
12460
- },
12461
- withConverter: function(converter) {
12462
- return init(assign({}, this.converter, converter), this.attributes);
12463
- }
12464
- }, {
12465
- attributes: {
12466
- value: Object.freeze(defaultAttributes)
12467
- },
12468
- converter: {
12469
- value: Object.freeze(converter)
12470
- }
12471
- });
12472
- }
12473
- var api = init(defaultConverter, {
12474
- path: "/"
12475
- });
12476
- /* eslint-enable no-var */ return api;
12477
- });
12478
-
12479
-
12480
-
12481
- function $6a9b69d9cc7f810f$export$2e2bcd8739ae039({ name: name , value: value }) {
12482
- return {
12483
- name: name,
12484
- value: value,
12485
- init () {
12486
- this.$watch("value", ()=>this.update());
12487
- },
12488
- update () {
12489
- (0, (/*@__PURE__*/$parcel$interopDefault($cdfeaa1e0e8d642c$exports))).set(`lookbook-display-${name}`, this.value);
12490
- const searchParams = new URLSearchParams(window.location.search);
12491
- const display = searchParams.get("_display");
12492
- const displayParams = display ? (0, $7ae6ae39c2ec9059$export$f720fd0ddbeb53d9)(display) : {};
12493
- displayParams[this.name] = this.value;
12494
- searchParams.set("_display", (0, $7ae6ae39c2ec9059$export$c788aab010beeaec)(displayParams));
12495
- const path = location.href.replace(location.search, "");
12496
- this.navigateTo(`${path}?${searchParams.toString()}`);
12497
- }
12498
- };
12499
- }
12500
-
12501
-
12383
+ var $2af7656449ff0341$exports = {};
12502
12384
  var $c299e36fa9e271bc$exports = {};
12503
12385
 
12504
12386
  $parcel$defineInteropFlag($c299e36fa9e271bc$exports);
@@ -13380,6 +13262,124 @@ function $c299e36fa9e271bc$export$2e2bcd8739ae039(id, embedStore) {
13380
13262
  }
13381
13263
 
13382
13264
 
13265
+ var $6a9b69d9cc7f810f$exports = {};
13266
+
13267
+ $parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
13268
+
13269
+ $parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
13270
+ var $cdfeaa1e0e8d642c$exports = {};
13271
+ (function(global, factory) {
13272
+ $cdfeaa1e0e8d642c$exports = factory();
13273
+ })($cdfeaa1e0e8d642c$exports, function() {
13274
+ "use strict";
13275
+ /* eslint-disable no-var */ function assign(target) {
13276
+ for(var i = 1; i < arguments.length; i++){
13277
+ var source = arguments[i];
13278
+ for(var key in source)target[key] = source[key];
13279
+ }
13280
+ return target;
13281
+ }
13282
+ /* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {
13283
+ read: function(value) {
13284
+ if (value[0] === '"') value = value.slice(1, -1);
13285
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
13286
+ },
13287
+ write: function(value) {
13288
+ return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
13289
+ }
13290
+ };
13291
+ /* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {
13292
+ function set(key, value, attributes) {
13293
+ if (typeof document === "undefined") return;
13294
+ attributes = assign({}, defaultAttributes, attributes);
13295
+ if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
13296
+ if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
13297
+ key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
13298
+ var stringifiedAttributes = "";
13299
+ for(var attributeName in attributes){
13300
+ if (!attributes[attributeName]) continue;
13301
+ stringifiedAttributes += "; " + attributeName;
13302
+ if (attributes[attributeName] === true) continue;
13303
+ // Considers RFC 6265 section 5.2:
13304
+ // ...
13305
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
13306
+ // character:
13307
+ // Consume the characters of the unparsed-attributes up to,
13308
+ // not including, the first %x3B (";") character.
13309
+ // ...
13310
+ stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
13311
+ }
13312
+ return document.cookie = key + "=" + converter.write(value, key) + stringifiedAttributes;
13313
+ }
13314
+ function get(key) {
13315
+ if (typeof document === "undefined" || arguments.length && !key) return;
13316
+ // To prevent the for loop in the first place assign an empty array
13317
+ // in case there are no cookies at all.
13318
+ var cookies = document.cookie ? document.cookie.split("; ") : [];
13319
+ var jar = {};
13320
+ for(var i = 0; i < cookies.length; i++){
13321
+ var parts = cookies[i].split("=");
13322
+ var value = parts.slice(1).join("=");
13323
+ try {
13324
+ var foundKey = decodeURIComponent(parts[0]);
13325
+ jar[foundKey] = converter.read(value, foundKey);
13326
+ if (key === foundKey) break;
13327
+ } catch (e) {}
13328
+ }
13329
+ return key ? jar[key] : jar;
13330
+ }
13331
+ return Object.create({
13332
+ set: set,
13333
+ get: get,
13334
+ remove: function(key, attributes) {
13335
+ set(key, "", assign({}, attributes, {
13336
+ expires: -1
13337
+ }));
13338
+ },
13339
+ withAttributes: function(attributes) {
13340
+ return init(this.converter, assign({}, this.attributes, attributes));
13341
+ },
13342
+ withConverter: function(converter) {
13343
+ return init(assign({}, this.converter, converter), this.attributes);
13344
+ }
13345
+ }, {
13346
+ attributes: {
13347
+ value: Object.freeze(defaultAttributes)
13348
+ },
13349
+ converter: {
13350
+ value: Object.freeze(converter)
13351
+ }
13352
+ });
13353
+ }
13354
+ var api = init(defaultConverter, {
13355
+ path: "/"
13356
+ });
13357
+ /* eslint-enable no-var */ return api;
13358
+ });
13359
+
13360
+
13361
+
13362
+ function $6a9b69d9cc7f810f$export$2e2bcd8739ae039({ name: name , value: value }) {
13363
+ return {
13364
+ name: name,
13365
+ value: value,
13366
+ init () {
13367
+ this.$watch("value", ()=>this.update());
13368
+ },
13369
+ update () {
13370
+ (0, (/*@__PURE__*/$parcel$interopDefault($cdfeaa1e0e8d642c$exports))).set(`lookbook-display-${name}`, this.value);
13371
+ const searchParams = new URLSearchParams(window.location.search);
13372
+ const display = searchParams.get("_display");
13373
+ const displayParams = display ? (0, $7ae6ae39c2ec9059$export$f720fd0ddbeb53d9)(display) : {};
13374
+ displayParams[this.name] = this.value;
13375
+ searchParams.set("_display", (0, $7ae6ae39c2ec9059$export$c788aab010beeaec)(displayParams));
13376
+ const path = location.href.replace(location.search, "");
13377
+ this.navigateTo(`${path}?${searchParams.toString()}`);
13378
+ }
13379
+ };
13380
+ }
13381
+
13382
+
13383
13383
  var $9b24cbeb3a465447$exports = {};
13384
13384
 
13385
13385
  $parcel$defineInteropFlag($9b24cbeb3a465447$exports);
@@ -13469,13 +13469,13 @@ function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
13469
13469
  }
13470
13470
 
13471
13471
 
13472
- $f3e1e32f4a1bd6da$exports = {
13473
- "display_options": {
13474
- "field": $6a9b69d9cc7f810f$exports
13475
- },
13472
+ $2af7656449ff0341$exports = {
13476
13473
  "embed": {
13477
13474
  "inspector": $c299e36fa9e271bc$exports
13478
13475
  },
13476
+ "display_options": {
13477
+ "field": $6a9b69d9cc7f810f$exports
13478
+ },
13479
13479
  "nav": {
13480
13480
  "item": $9b24cbeb3a465447$exports
13481
13481
  },
@@ -13549,8 +13549,8 @@ const $939f2ad3cd685486$var$prefix = window.APP_NAME;
13549
13549
  // Components
13550
13550
  (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
13551
13551
  [
13552
- $69e9934f1d83bbc4$exports,
13553
- $f3e1e32f4a1bd6da$exports,
13552
+ $77553f14666631eb$exports,
13553
+ $2af7656449ff0341$exports,
13554
13554
  $6c10158820e535ef$exports
13555
13555
  ].forEach((scripts)=>{
13556
13556
  const components = (0, $5439cede634b2921$export$4e811121b221213b)(scripts);