public/lookbook-assets/js/index.js in lookbook-2.0.0.beta.3 vs public/lookbook-assets/js/index.js in lookbook-2.0.0.beta.4
- old
+ new
@@ -11447,11 +11447,11 @@
this.height = Math.round(this.target.clientHeight);
this.createObserver();
}
},
createObserver () {
- if (this.target) this.observer = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(document.querySelector(targetSelector), ({ width: width , height: height })=>{
+ if (this.target) this.observer = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.target, ({ width: width , height: height })=>{
this.width = width;
this.height = height;
});
},
tearDown () {
@@ -12378,129 +12378,11 @@
"tabs": $0db07828cadc68e0$exports,
"viewport": $6d64716f0b34fdf4$exports
};
-var $f3e1e32f4a1bd6da$exports = {};
-var $6a9b69d9cc7f810f$exports = {};
-
-$parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
-
-$parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
-var $cdfeaa1e0e8d642c$exports = {};
-(function(global, factory) {
- $cdfeaa1e0e8d642c$exports = factory();
-})($cdfeaa1e0e8d642c$exports, function() {
- "use strict";
- /* eslint-disable no-var */ function assign(target) {
- for(var i = 1; i < arguments.length; i++){
- var source = arguments[i];
- for(var key in source)target[key] = source[key];
- }
- return target;
- }
- /* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {
- read: function(value) {
- if (value[0] === '"') value = value.slice(1, -1);
- return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
- },
- write: function(value) {
- return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
- }
- };
- /* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {
- function set(key, value, attributes) {
- if (typeof document === "undefined") return;
- attributes = assign({}, defaultAttributes, attributes);
- if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
- if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
- key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
- var stringifiedAttributes = "";
- for(var attributeName in attributes){
- if (!attributes[attributeName]) continue;
- stringifiedAttributes += "; " + attributeName;
- if (attributes[attributeName] === true) continue;
- // Considers RFC 6265 section 5.2:
- // ...
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
- // character:
- // Consume the characters of the unparsed-attributes up to,
- // not including, the first %x3B (";") character.
- // ...
- stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
- }
- return document.cookie = key + "=" + converter.write(value, key) + stringifiedAttributes;
- }
- function get(key) {
- if (typeof document === "undefined" || arguments.length && !key) return;
- // To prevent the for loop in the first place assign an empty array
- // in case there are no cookies at all.
- var cookies = document.cookie ? document.cookie.split("; ") : [];
- var jar = {};
- for(var i = 0; i < cookies.length; i++){
- var parts = cookies[i].split("=");
- var value = parts.slice(1).join("=");
- try {
- var foundKey = decodeURIComponent(parts[0]);
- jar[foundKey] = converter.read(value, foundKey);
- if (key === foundKey) break;
- } catch (e) {}
- }
- return key ? jar[key] : jar;
- }
- return Object.create({
- set: set,
- get: get,
- remove: function(key, attributes) {
- set(key, "", assign({}, attributes, {
- expires: -1
- }));
- },
- withAttributes: function(attributes) {
- return init(this.converter, assign({}, this.attributes, attributes));
- },
- withConverter: function(converter) {
- return init(assign({}, this.converter, converter), this.attributes);
- }
- }, {
- attributes: {
- value: Object.freeze(defaultAttributes)
- },
- converter: {
- value: Object.freeze(converter)
- }
- });
- }
- var api = init(defaultConverter, {
- path: "/"
- });
- /* eslint-enable no-var */ return api;
-});
-
-
-
-function $6a9b69d9cc7f810f$export$2e2bcd8739ae039({ name: name , value: value }) {
- return {
- name: name,
- value: value,
- init () {
- this.$watch("value", ()=>this.update());
- },
- update () {
- (0, (/*@__PURE__*/$parcel$interopDefault($cdfeaa1e0e8d642c$exports))).set(`lookbook-display-${name}`, this.value);
- const searchParams = new URLSearchParams(window.location.search);
- const display = searchParams.get("_display");
- const displayParams = display ? (0, $7ae6ae39c2ec9059$export$f720fd0ddbeb53d9)(display) : {};
- displayParams[this.name] = this.value;
- searchParams.set("_display", (0, $7ae6ae39c2ec9059$export$c788aab010beeaec)(displayParams));
- const path = location.href.replace(location.search, "");
- this.navigateTo(`${path}?${searchParams.toString()}`);
- }
- };
-}
-
-
+var $2af7656449ff0341$exports = {};
var $c299e36fa9e271bc$exports = {};
$parcel$defineInteropFlag($c299e36fa9e271bc$exports);
$parcel$export($c299e36fa9e271bc$exports, "default", () => $c299e36fa9e271bc$export$2e2bcd8739ae039);
@@ -13378,10 +13260,128 @@
}
};
}
+var $6a9b69d9cc7f810f$exports = {};
+
+$parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
+
+$parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
+var $cdfeaa1e0e8d642c$exports = {};
+(function(global, factory) {
+ $cdfeaa1e0e8d642c$exports = factory();
+})($cdfeaa1e0e8d642c$exports, function() {
+ "use strict";
+ /* eslint-disable no-var */ function assign(target) {
+ for(var i = 1; i < arguments.length; i++){
+ var source = arguments[i];
+ for(var key in source)target[key] = source[key];
+ }
+ return target;
+ }
+ /* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {
+ read: function(value) {
+ if (value[0] === '"') value = value.slice(1, -1);
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
+ },
+ write: function(value) {
+ return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
+ }
+ };
+ /* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {
+ function set(key, value, attributes) {
+ if (typeof document === "undefined") return;
+ attributes = assign({}, defaultAttributes, attributes);
+ if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
+ if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
+ key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
+ var stringifiedAttributes = "";
+ for(var attributeName in attributes){
+ if (!attributes[attributeName]) continue;
+ stringifiedAttributes += "; " + attributeName;
+ if (attributes[attributeName] === true) continue;
+ // Considers RFC 6265 section 5.2:
+ // ...
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
+ // character:
+ // Consume the characters of the unparsed-attributes up to,
+ // not including, the first %x3B (";") character.
+ // ...
+ stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
+ }
+ return document.cookie = key + "=" + converter.write(value, key) + stringifiedAttributes;
+ }
+ function get(key) {
+ if (typeof document === "undefined" || arguments.length && !key) return;
+ // To prevent the for loop in the first place assign an empty array
+ // in case there are no cookies at all.
+ var cookies = document.cookie ? document.cookie.split("; ") : [];
+ var jar = {};
+ for(var i = 0; i < cookies.length; i++){
+ var parts = cookies[i].split("=");
+ var value = parts.slice(1).join("=");
+ try {
+ var foundKey = decodeURIComponent(parts[0]);
+ jar[foundKey] = converter.read(value, foundKey);
+ if (key === foundKey) break;
+ } catch (e) {}
+ }
+ return key ? jar[key] : jar;
+ }
+ return Object.create({
+ set: set,
+ get: get,
+ remove: function(key, attributes) {
+ set(key, "", assign({}, attributes, {
+ expires: -1
+ }));
+ },
+ withAttributes: function(attributes) {
+ return init(this.converter, assign({}, this.attributes, attributes));
+ },
+ withConverter: function(converter) {
+ return init(assign({}, this.converter, converter), this.attributes);
+ }
+ }, {
+ attributes: {
+ value: Object.freeze(defaultAttributes)
+ },
+ converter: {
+ value: Object.freeze(converter)
+ }
+ });
+ }
+ var api = init(defaultConverter, {
+ path: "/"
+ });
+ /* eslint-enable no-var */ return api;
+});
+
+
+
+function $6a9b69d9cc7f810f$export$2e2bcd8739ae039({ name: name , value: value }) {
+ return {
+ name: name,
+ value: value,
+ init () {
+ this.$watch("value", ()=>this.update());
+ },
+ update () {
+ (0, (/*@__PURE__*/$parcel$interopDefault($cdfeaa1e0e8d642c$exports))).set(`lookbook-display-${name}`, this.value);
+ const searchParams = new URLSearchParams(window.location.search);
+ const display = searchParams.get("_display");
+ const displayParams = display ? (0, $7ae6ae39c2ec9059$export$f720fd0ddbeb53d9)(display) : {};
+ displayParams[this.name] = this.value;
+ searchParams.set("_display", (0, $7ae6ae39c2ec9059$export$c788aab010beeaec)(displayParams));
+ const path = location.href.replace(location.search, "");
+ this.navigateTo(`${path}?${searchParams.toString()}`);
+ }
+ };
+}
+
+
var $9b24cbeb3a465447$exports = {};
$parcel$defineInteropFlag($9b24cbeb3a465447$exports);
$parcel$export($9b24cbeb3a465447$exports, "default", () => $9b24cbeb3a465447$export$2e2bcd8739ae039);
@@ -13467,17 +13467,17 @@
}
};
}
-$f3e1e32f4a1bd6da$exports = {
- "display_options": {
- "field": $6a9b69d9cc7f810f$exports
- },
+$2af7656449ff0341$exports = {
"embed": {
"inspector": $c299e36fa9e271bc$exports
},
+ "display_options": {
+ "field": $6a9b69d9cc7f810f$exports
+ },
"nav": {
"item": $9b24cbeb3a465447$exports
},
"params": {
"editor": $1a7a7298eec5b755$exports,
@@ -13548,10 +13548,10 @@
}));
// Components
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
[
$77553f14666631eb$exports,
- $f3e1e32f4a1bd6da$exports,
+ $2af7656449ff0341$exports,
$6c10158820e535ef$exports
].forEach((scripts)=>{
const components = (0, $5439cede634b2921$export$4e811121b221213b)(scripts);
Object.keys(components).forEach((name)=>{
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data(`${name}Component`, components[name]);