From d099276842237fc5f21aa9e94437bd0abf1ed15b Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Thu, 21 Mar 2024 09:10:58 +0100 Subject: [PATCH] chore: release v1.0.1 --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- index.js | 2 +- package.json | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 04bfa06..50b7f73 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "johannschopplich/kirby-serp-preview", "description": "Kirby Panel plugin for search engine result page previews", "type": "kirby-plugin", - "version": "1.0.0", + "version": "1.0.1", "keywords": [ "google", "kirby", diff --git a/composer.lock b/composer.lock index e4b4f61..e3aed68 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4d93bae6f6f7937f9f9753056a2ad538", + "content-hash": "8e88dee8b56db69c8ba79441e4aaf2de", "packages": [ { "name": "getkirby/composer-installer", @@ -169,16 +169,16 @@ }, { "name": "composer/pcre", - "version": "3.1.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace" + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace", - "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace", + "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", "shasum": "" }, "require": { @@ -220,7 +220,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.2" + "source": "https://github.com/composer/pcre/tree/3.1.3" }, "funding": [ { @@ -236,7 +236,7 @@ "type": "tidelift" } ], - "time": "2024-03-07T15:38:35+00:00" + "time": "2024-03-19T10:26:25+00:00" }, { "name": "composer/semver", @@ -458,16 +458,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.51.0", + "version": "v3.52.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "127fa74f010da99053e3f5b62672615b72dd6efd" + "reference": "6e77207f0d851862ceeb6da63e6e22c01b1587bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/127fa74f010da99053e3f5b62672615b72dd6efd", - "reference": "127fa74f010da99053e3f5b62672615b72dd6efd", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/6e77207f0d851862ceeb6da63e6e22c01b1587bc", + "reference": "6e77207f0d851862ceeb6da63e6e22c01b1587bc", "shasum": "" }, "require": { @@ -538,7 +538,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.51.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.52.1" }, "funding": [ { @@ -546,7 +546,7 @@ "type": "github" } ], - "time": "2024-02-28T19:50:06+00:00" + "time": "2024-03-19T21:02:43+00:00" }, { "name": "getkirby/cms", diff --git a/index.js b/index.js index 26daa26..3ed187a 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -(function(){"use strict";const b=/\/$|\/\?|\/#/,x=/^\.?\//;function y(o="",s){return s?b.test(o):o.endsWith("/")}function T(o="",s){if(!s)return o.endsWith("/")?o:o+"/";if(y(o,!0))return o||"/";let t=o,n="";const a=o.indexOf("#");if(a>=0&&(t=o.slice(0,a),n=o.slice(a),!t))return n;const[f,...u]=t.split("?");return f+"/"+(u.length>0?`?${u.join("?")}`:"")+n}function $(o){return o&&o!=="/"}function E(o,...s){let t=o||"";for(const n of s.filter(a=>$(a)))if(t){const a=n.replace(x,"");t=T(t)+a}else t=n;return t}const e=window.Vue;function C(){return window.panel}function P(){return C().api}function A(){const o=P();return{load:({parent:t,name:n})=>o.get(`${t}/sections/${n}`)}}function L(){var s;return((s=e.getCurrentInstance())==null?void 0:s.proxy).$store}const w=e.computed;e.customRef,e.defineAsyncComponent,e.defineComponent,e.effectScope,e.getCurrentInstance,e.getCurrentScope,e.h,e.inject,e.isProxy,e.isReactive,e.isReadonly,e.isRef,e.isShallow,e.markRaw,e.nextTick,e.onActivated,e.onBeforeMount,e.onBeforeUnmount,e.onBeforeUpdate,e.onDeactivated,e.onErrorCaptured,e.onMounted,e.onRenderTracked,e.onRenderTriggered,e.onScopeDispose,e.onServerPrefetch,e.onUnmounted,e.onUpdated,e.provide,e.proxyRefs,e.reactive,e.readonly;const c=e.ref;e.shallowReactive,e.shallowReadonly,e.shallowRef,e.toRaw,e.toRef,e.toRefs,e.triggerRef,e.unref,e.useAttrs,e.useCssModule,e.useCssVars,e.useListeners,e.useSlots;const N=e.watch;e.watchEffect,e.watchPostEffect,e.watchSyncEffect;const j={blueprint:String,lock:[Boolean,Object],help:String,name:String,parent:String,timestamp:Number};function I(o,s,t,n,a,f,u,h){var i=typeof o=="function"?o.options:o;s&&(i.render=s,i.staticRenderFns=t,i._compiled=!0),n&&(i.functional=!0),f&&(i._scopeId="data-v-"+f);var p;if(u?(p=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),a&&a.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(u)},i._ssrRegister=p):a&&(p=h?function(){a.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:a),p)if(i.functional){i._injectStyles=p;var k=i.render;i.render=function(v,_){return p.call(_),k(v,_)}}else{var d=i.beforeCreate;i.beforeCreate=d?[].concat(d,p):[p]}return{exports:o,options:i}}const g={...j},O=Object.assign({inheritAttrs:!1},{__name:"SerpPreview",props:g,setup(o){const s=o,t=C(),n=L(),{load:a}=A(),f=c(),u=c(),h=c(),i=c(),p=c(),k=c(),d=c(),l=c(),v=c(),_=c(),m=c(""),R=w(()=>n.getters["content/values"]()),G=w(()=>m.value?new URL(m.value).pathname:""),M=w(()=>(l.value?R.value[l.value]:void 0)||v.value);N(()=>t.language.code,async()=>{S();const r=await t.api.get(t.view.path,{select:"previewUrl"});m.value=r.previewUrl},{immediate:!0});async function S(){const r=await a({parent:s.parent,name:s.name});f.value=U(r.label)||"SERP Preview",u.value=r.faviconUrl,h.value=r.siteTitle,i.value=r.siteUrl,p.value=r.titleSeparator,k.value=r.titleContentKey,d.value=r.defaultTitle,l.value=r.descriptionContentKey,v.value=r.defaultDescription,_.value=r.searchConsoleUrl}function U(r){return!r||typeof r=="string"?r:r[t.translation.code]??Object.values(r)[0]}return{__sfc:!0,propsDefinition:g,props:s,panel:t,store:n,load:a,label:f,faviconUrl:u,siteTitle:h,siteUrl:i,titleSeparator:p,titleContentKey:k,defaultTitle:d,descriptionContentKey:l,defaultDescription:v,searchConsoleUrl:_,previewUrl:m,currentContent:R,path:G,description:M,loadSectionProps:S,t:U,joinURL:E}}});var D=function(){var s=this,t=s._self._c,n=s._self._setupProxy;return t("k-section",{attrs:{label:n.label}},[t("div",{staticClass:"ksp-overflow-hidden ksp-rounded-[var(--input-rounded)] ksp-bg-[var(--input-color-back)] ksp-p-4"},[t("div",{staticClass:"ksp-mb-2 ksp-flex ksp-items-center ksp-gap-3"},[n.faviconUrl?t("figure",{staticClass:"ksp-inline-flex ksp-aspect-square ksp-h-[26px] ksp-w-[26px] ksp-items-center ksp-justify-center ksp-rounded-full ksp-border ksp-border-solid ksp-border-[#ecedef] ksp-bg-[#f1f3f4]"},[t("img",{staticClass:"ksp-block ksp-h-[18px] ksp-w-[18px]",attrs:{src:n.faviconUrl,alt:""}})]):s._e(),t("div",{staticClass:"ksp-flex ksp-flex-col"},[t("span",{staticClass:"ksp-text-sm ksp-text-[#4d5156]"},[s._v(s._s(n.siteTitle))]),t("span",{staticClass:"ksp-line-clamp-1 ksp-text-xs ksp-text-[#4d5156]"},[s._v(s._s(n.joinURL(n.siteUrl,n.path)))])])]),t("h3",{staticClass:"ksp-line-clamp-1 ksp-text-xl ksp-text-[#1a0dab]"},[s._v(" "+s._s(n.currentContent[n.titleContentKey]||n.defaultTitle||[n.panel.view.title,n.titleSeparator,n.siteTitle].join(" "))+" ")]),t("p",{directives:[{name:"show",rawName:"v-show",value:n.description,expression:"description"}],staticClass:"ksp-mt-1 ksp-line-clamp-2 ksp-text-sm ksp-text-[#4d5156]"},[s._v(" "+s._s(n.description)+" ")])]),t("k-button-group",{directives:[{name:"show",rawName:"v-show",value:n.searchConsoleUrl,expression:"searchConsoleUrl"}],staticClass:"ksp-mt-2 ksp-w-full"},[t("k-button",{attrs:{link:n.searchConsoleUrl,icon:"open",target:"_blank"}},[s._v(" Google Search Console ")])],1)],1)},K=[],V=I(O,D,K,!1,null,null,null,null);const B=V.exports;window.panel.plugin("johannschopplich/serp-preview",{sections:{"serp-preview":B}})})(); +(function(){"use strict";const U=/\/$|\/\?|\/#/,x=/^\.?\//;function y(o="",s){return s?U.test(o):o.endsWith("/")}function T(o="",s){if(!s)return o.endsWith("/")?o:o+"/";if(y(o,!0))return o||"/";let t=o,n="";const a=o.indexOf("#");if(a>=0&&(t=o.slice(0,a),n=o.slice(a),!t))return n;const[f,...u]=t.split("?");return f+"/"+(u.length>0?`?${u.join("?")}`:"")+n}function $(o){return o&&o!=="/"}function j(o,...s){let t=o||"";for(const n of s.filter(a=>$(a)))if(t){const a=n.replace(x,"");t=T(t)+a}else t=n;return t}const e=window.Vue;function C(){return window.panel}function A(){return C().api}function E(){const o=A();return{load:({parent:t,name:n})=>o.get(`${t}/sections/${n}`)}}function L(){var s;return((s=e.getCurrentInstance())==null?void 0:s.proxy).$store}const w=e.computed;e.customRef,e.defineAsyncComponent,e.defineComponent,e.effectScope,e.getCurrentInstance,e.getCurrentScope,e.h,e.inject,e.isProxy,e.isReactive,e.isReadonly,e.isRef,e.isShallow,e.markRaw,e.nextTick,e.onActivated,e.onBeforeMount,e.onBeforeUnmount,e.onBeforeUpdate,e.onDeactivated,e.onErrorCaptured,e.onMounted,e.onRenderTracked,e.onRenderTriggered,e.onScopeDispose,e.onServerPrefetch,e.onUnmounted,e.onUpdated,e.provide,e.proxyRefs,e.reactive,e.readonly;const c=e.ref;e.shallowReactive,e.shallowReadonly,e.shallowRef,e.toRaw,e.toRef,e.toRefs,e.triggerRef,e.unref,e.useAttrs,e.useCssModule,e.useCssVars,e.useListeners,e.useSlots;const N=e.watch;e.watchEffect,e.watchPostEffect,e.watchSyncEffect;const P={blueprint:String,lock:[Boolean,Object],help:String,name:String,parent:String,timestamp:Number};function I(o,s,t,n,a,f,u,h){var i=typeof o=="function"?o.options:o;s&&(i.render=s,i.staticRenderFns=t,i._compiled=!0),n&&(i.functional=!0),f&&(i._scopeId="data-v-"+f);var p;if(u?(p=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),a&&a.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(u)},i._ssrRegister=p):a&&(p=h?function(){a.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:a),p)if(i.functional){i._injectStyles=p;var k=i.render;i.render=function(v,_){return p.call(_),k(v,_)}}else{var d=i.beforeCreate;i.beforeCreate=d?[].concat(d,p):[p]}return{exports:o,options:i}}const g={...P},O=Object.assign({inheritAttrs:!1},{__name:"SerpPreview",props:g,setup(o){const s=o,t=C(),n=L(),{load:a}=E(),f=c(),u=c(),h=c(),i=c(),p=c(),k=c(),d=c(),l=c(),v=c(),_=c(),m=c(""),R=w(()=>n.getters["content/values"]()),G=w(()=>m.value?new URL(m.value).pathname:""),M=w(()=>(l.value?R.value[l.value]:void 0)||v.value);N(()=>t.language.code,async()=>{S();const r=await t.api.get(t.view.path,{select:"previewUrl"});m.value=r.previewUrl},{immediate:!0});async function S(){const r=await a({parent:s.parent,name:s.name});f.value=b(r.label)||t.t("johannschopplich.serp-preview.label"),u.value=r.faviconUrl,h.value=r.siteTitle,i.value=r.siteUrl,p.value=r.titleSeparator,k.value=r.titleContentKey,d.value=r.defaultTitle,l.value=r.descriptionContentKey,v.value=r.defaultDescription,_.value=r.searchConsoleUrl}function b(r){return!r||typeof r=="string"?r:r[t.translation.code]??Object.values(r)[0]}return{__sfc:!0,propsDefinition:g,props:s,panel:t,store:n,load:a,label:f,faviconUrl:u,siteTitle:h,siteUrl:i,titleSeparator:p,titleContentKey:k,defaultTitle:d,descriptionContentKey:l,defaultDescription:v,searchConsoleUrl:_,previewUrl:m,currentContent:R,path:G,description:M,loadSectionProps:S,t:b,joinURL:j}}});var D=function(){var s=this,t=s._self._c,n=s._self._setupProxy;return t("k-section",{attrs:{label:n.label}},[t("div",{staticClass:"ksp-overflow-hidden ksp-rounded-[var(--input-rounded)] ksp-bg-[var(--input-color-back)] ksp-p-4"},[t("div",{staticClass:"ksp-mb-2 ksp-flex ksp-items-center ksp-gap-3"},[n.faviconUrl?t("figure",{staticClass:"ksp-inline-flex ksp-aspect-square ksp-h-[26px] ksp-w-[26px] ksp-items-center ksp-justify-center ksp-rounded-full ksp-border ksp-border-solid ksp-border-[#ecedef] ksp-bg-[#f1f3f4]"},[t("img",{staticClass:"ksp-block ksp-h-[18px] ksp-w-[18px]",attrs:{src:n.faviconUrl,alt:""}})]):s._e(),t("div",{staticClass:"ksp-flex ksp-flex-col"},[t("span",{staticClass:"ksp-text-sm ksp-text-[#4d5156]"},[s._v(s._s(n.siteTitle))]),t("span",{staticClass:"ksp-line-clamp-1 ksp-text-xs ksp-text-[#4d5156]"},[s._v(s._s(n.joinURL(n.siteUrl,n.path)))])])]),t("h3",{staticClass:"ksp-line-clamp-1 ksp-text-xl ksp-text-[#1a0dab]"},[s._v(" "+s._s(n.currentContent[n.titleContentKey]||n.defaultTitle||[n.panel.view.title,n.titleSeparator,n.siteTitle].join(" "))+" ")]),t("p",{directives:[{name:"show",rawName:"v-show",value:n.description,expression:"description"}],staticClass:"ksp-mt-1 ksp-line-clamp-2 ksp-text-sm ksp-text-[#4d5156]"},[s._v(" "+s._s(n.description)+" ")])]),t("k-button-group",{directives:[{name:"show",rawName:"v-show",value:n.searchConsoleUrl,expression:"searchConsoleUrl"}],staticClass:"ksp-mt-2 ksp-w-full"},[t("k-button",{attrs:{link:n.searchConsoleUrl,icon:"open",target:"_blank"}},[s._v(" Google Search Console ")])],1)],1)},K=[],V=I(O,D,K,!1,null,null,null,null);const B=V.exports;window.panel.plugin("johannschopplich/serp-preview",{sections:{"serp-preview":B}})})(); diff --git a/package.json b/package.json index 34db682..e4c07eb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "kirby-serp-preview", "type": "module", - "version": "1.0.0", + "version": "1.0.1", "private": true, "packageManager": "pnpm@8.15.4", "scripts": {