public/lookbook-assets/js/index.js in lookbook-2.0.0.rc.2 vs public/lookbook-assets/js/index.js in lookbook-2.0.0.rc.3

- old
+ new

@@ -7813,53 +7813,11 @@ return $1.toUpperCase().replace("-", "").replace("_", ""); }); } -var $57df4ec1d6bb80f5$exports = {}; -var $47a1c62621be0c54$exports = {}; - -$parcel$defineInteropFlag($47a1c62621be0c54$exports); - -$parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039); -var $4e31c85e11272811$exports = {}; - -$parcel$defineInteropFlag($4e31c85e11272811$exports); - -$parcel$export($4e31c85e11272811$exports, "initClipboard", () => $4e31c85e11272811$export$c6684e6159b21de3); -$parcel$export($4e31c85e11272811$exports, "default", () => $4e31c85e11272811$export$2e2bcd8739ae039); - -function $4e31c85e11272811$export$c6684e6159b21de3(context = {}) { - let copyTimeout = null; - return Object.assign(context, { - copied: false, - async copyToClipboard (target = null) { - let targetEl; - if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget; - else if (typeof target === "string") targetEl = document.querySelector(target); - if (!targetEl) { - this.warn("Could not find copy target"); - return false; - } - const content = (0, $fb8f79f7dd40b68f$export$6cb344a21ca18aec)(targetEl.innerHTML.trim()); - await window.navigator.clipboard.writeText(content); - this.copied = true; - if (copyTimeout) clearTimeout(copyTimeout); - copyTimeout = setTimeout(()=>{ - this.copied = false; - this.onCopyComplete(); - }, 1000); - return content; - }, - onCopyComplete () {} - }); -} -function $4e31c85e11272811$export$2e2bcd8739ae039() { - return $4e31c85e11272811$export$c6684e6159b21de3({}); -} - - +var $52abf2efa3492135$exports = {}; var $cbd28b10fa9798c7$exports = {}; $parcel$defineInteropFlag($cbd28b10fa9798c7$exports); $parcel$export($cbd28b10fa9798c7$exports, "default", () => $cbd28b10fa9798c7$export$2e2bcd8739ae039); @@ -11386,10 +11344,63 @@ _spinning: false }; } +var $99486586f6691564$exports = {}; + +$parcel$defineInteropFlag($99486586f6691564$exports); + +$parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039); +function $99486586f6691564$export$2e2bcd8739ae039() { + return {}; +} + + +var $47a1c62621be0c54$exports = {}; + +$parcel$defineInteropFlag($47a1c62621be0c54$exports); + +$parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039); +var $4e31c85e11272811$exports = {}; + +$parcel$defineInteropFlag($4e31c85e11272811$exports); + +$parcel$export($4e31c85e11272811$exports, "initClipboard", () => $4e31c85e11272811$export$c6684e6159b21de3); +$parcel$export($4e31c85e11272811$exports, "default", () => $4e31c85e11272811$export$2e2bcd8739ae039); + +function $4e31c85e11272811$export$c6684e6159b21de3(context = {}) { + let copyTimeout = null; + return Object.assign(context, { + copied: false, + async copyToClipboard (target = null) { + let targetEl; + if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget; + else if (typeof target === "string") targetEl = document.querySelector(target); + if (!targetEl) { + this.warn("Could not find copy target"); + return false; + } + const content = (0, $fb8f79f7dd40b68f$export$6cb344a21ca18aec)(targetEl.innerHTML.trim()); + await window.navigator.clipboard.writeText(content); + this.copied = true; + if (copyTimeout) clearTimeout(copyTimeout); + copyTimeout = setTimeout(()=>{ + this.copied = false; + this.onCopyComplete(); + }, 1000); + return content; + }, + onCopyComplete () {} + }); +} +function $4e31c85e11272811$export$2e2bcd8739ae039() { + return $4e31c85e11272811$export$c6684e6159b21de3({}); +} + + + function $47a1c62621be0c54$export$2e2bcd8739ae039() { const button = (0, $cbd28b10fa9798c7$export$2e2bcd8739ae039)(); return { ...button, copied: false, @@ -11399,21 +11410,10 @@ } }; } - -var $99486586f6691564$exports = {}; - -$parcel$defineInteropFlag($99486586f6691564$exports); - -$parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039); -function $99486586f6691564$export$2e2bcd8739ae039() { - return {}; -} - - var $e398acaded942bbe$exports = {}; $parcel$defineInteropFlag($e398acaded942bbe$exports); $parcel$export($e398acaded942bbe$exports, "default", () => $e398acaded942bbe$export$2e2bcd8739ae039); @@ -12334,14 +12334,14 @@ } }; } -$57df4ec1d6bb80f5$exports = { - "copy_button": $47a1c62621be0c54$exports, +$52abf2efa3492135$exports = { "button": $cbd28b10fa9798c7$exports, "code": $99486586f6691564$exports, + "copy_button": $47a1c62621be0c54$exports, "dimensions_display": $e398acaded942bbe$exports, "embed_code_dropdown": $216ef7001f59f21d$exports, "filter": $e9904a14dabf652d$exports, "nav": $d92d9d5253f84566$exports, "split_layout": $506dabb2bf255b38$exports, @@ -12349,11 +12349,11 @@ "tabs": $0db07828cadc68e0$exports, "viewport": $6d64716f0b34fdf4$exports }; -var $3b154185c6273749$exports = {}; +var $f3e1e32f4a1bd6da$exports = {}; var $6a9b69d9cc7f810f$exports = {}; $parcel$defineInteropFlag($6a9b69d9cc7f810f$exports); $parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039); @@ -12377,16 +12377,16 @@ 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) { + function set(name, 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); + name = encodeURIComponent(name).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; @@ -12397,34 +12397,34 @@ // 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; + return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes; } - function get(key) { - if (typeof document === "undefined" || arguments.length && !key) return; + function get(name) { + if (typeof document === "undefined" || arguments.length && !name) 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; + var found = decodeURIComponent(parts[0]); + jar[found] = converter.read(value, found); + if (name === found) break; } catch (e) {} } - return key ? jar[key] : jar; + return name ? jar[name] : jar; } return Object.create({ set: set, get: get, - remove: function(key, attributes) { - set(key, "", assign({}, attributes, { + remove: function(name, attributes) { + set(name, "", assign({}, attributes, { expires: -1 })); }, withAttributes: function(attributes) { return init(this.converter, assign({}, this.attributes, attributes)); @@ -13407,24 +13407,10 @@ } }; } -var $e773f8ef556b41ff$exports = {}; - -$parcel$defineInteropFlag($e773f8ef556b41ff$exports); - -$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039); -function $e773f8ef556b41ff$export$2e2bcd8739ae039() { - return { - get isNarrowLayout () { - return this.narrow || false; - } - }; -} - - var $1a7a7298eec5b755$exports = {}; $parcel$defineInteropFlag($1a7a7298eec5b755$exports); $parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039); @@ -13439,23 +13425,37 @@ } }; } -$3b154185c6273749$exports = { +var $e773f8ef556b41ff$exports = {}; + +$parcel$defineInteropFlag($e773f8ef556b41ff$exports); + +$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039); +function $e773f8ef556b41ff$export$2e2bcd8739ae039() { + return { + get isNarrowLayout () { + return this.narrow || false; + } + }; +} + + +$f3e1e32f4a1bd6da$exports = { "display_options": { "field": $6a9b69d9cc7f810f$exports }, "embed": { "inspector": $c299e36fa9e271bc$exports }, "nav": { "item": $9b24cbeb3a465447$exports }, "params": { - "field": $e773f8ef556b41ff$exports, - "editor": $1a7a7298eec5b755$exports + "editor": $1a7a7298eec5b755$exports, + "field": $e773f8ef556b41ff$exports } }; var $338da9a25bc5c332$exports = {}; @@ -13519,11 +13519,11 @@ prefix: $22969b543678f572$var$prefix })); // Components (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039)); [ - $57df4ec1d6bb80f5$exports, - $3b154185c6273749$exports, + $52abf2efa3492135$exports, + $f3e1e32f4a1bd6da$exports, $338da9a25bc5c332$exports ].forEach((scripts)=>{ const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts); Object.keys(components).forEach((name)=>{ (0, $caa9439642c6336c$export$2e2bcd8739ae039).data(`${name}Component`, components[name]);