1
0

downgrade to kirby v3

This commit is contained in:
Philip Wagner
2024-09-01 10:47:15 +02:00
parent a4b2aece7b
commit af86acb7a1
1085 changed files with 54743 additions and 65042 deletions

View File

@@ -1,2 +0,0 @@
src/components/Text/Highlight.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

1
kirby/panel/dist/css/style.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{D as t}from"./Docs.min.js";import{n as s}from"./index.min.js";import"./vendor.min.js";const o=s({components:{"k-lab-docs":t},props:{component:String,docs:Object,lab:String},mounted(){},methods:{reloadDocs(){this.$panel.view.refresh()}}},(function(){var t=this,s=t._self._c;return s("k-panel-inside",{staticClass:"k-lab-docs-view"},[s("k-header",[t._v(" "+t._s(t.component)+" "),t.docs.github||t.lab?s("k-button-group",{attrs:{slot:"buttons"},slot:"buttons"},[t.lab?s("k-button",{attrs:{icon:"lab",text:"Lab examples",size:"sm",variant:"filled",link:"/lab/"+t.lab}}):t._e(),t.docs.github?s("k-button",{attrs:{icon:"github",size:"sm",variant:"filled",link:t.docs.github,target:"_blank"}}):t._e()],1):t._e()],1),s("k-lab-docs",t._b({},"k-lab-docs",t.docs,!1))],1)}),[],!1,null,null,null,null).exports;export{o as default};

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{n as e}from"./index.min.js";import"./vendor.min.js";const t=e({props:{categories:Array,info:String,tab:String}},(function(){var e=this,t=e._self._c;return t("k-panel-inside",{staticClass:"k-lab-index-view"},[t("k-header",[e._v("Lab")]),t("k-tabs",{attrs:{tab:e.tab,tabs:[{name:"examples",label:"Examples",link:"/lab"},{name:"docs",label:"Docs",link:"/lab/docs"}]}}),e.info?t("k-box",{attrs:{icon:"question",theme:"info",text:e.info,html:!0}}):e._e(),e._l(e.categories,(function(e){return t("k-section",{key:e.name,attrs:{headline:e.name}},[t("k-collection",{attrs:{items:e.examples,empty:{icon:e.icon,text:"Add examples to "+e.path}}})],1)}))],2)}),[],!1,null,null,null,null).exports;export{t as default};

View File

@@ -1 +0,0 @@
import{D as t}from"./Docs.min.js";import{n as e}from"./index.min.js";import"./vendor.min.js";const n=e({props:{docs:Object},emits:["cancel"],computed:{options(){const t=[{icon:"expand",link:"lab/docs/"+this.docs.component}];return this.docs.github&&t.unshift({icon:"github",link:this.docs.github,target:"_blank"}),t}}},(function(){var t=this,e=t._self._c;return e("k-drawer",t._b({ref:"drawer",staticClass:"k-form-drawer",attrs:{options:t.options},on:{submit:function(e){return t.$emit("cancel")}}},"k-drawer",t.$attrs,!1),[e("k-lab-docs",t._b({},"k-lab-docs",t.docs,!1))],1)}),[],!1,null,null,null,null).exports;const l=e({props:{code:{type:Boolean,default:!0},label:String,flex:Boolean},data:()=>({mode:"preview"}),computed:{component(){return window.UiExamples[this.label]}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-lab-example",attrs:{"data-flex":t.flex,tabindex:"0"}},[e("header",{staticClass:"k-lab-example-header"},[e("h3",{staticClass:"k-lab-example-label"},[t._v(t._s(t.label))]),t.code?e("k-button-group",{staticClass:"k-lab-example-inspector",attrs:{layout:"collapsed"}},[e("k-button",{attrs:{theme:"preview"===t.mode?"info":null,icon:"preview",size:"xs",title:"Preview"},on:{click:function(e){t.mode="preview"}}}),e("k-button",{attrs:{theme:"inspect"===t.mode?"info":null,icon:"code",size:"xs",title:"Vue code"},on:{click:function(e){t.mode="inspect"}}})],1):t._e()],1),"preview"===t.mode?e("div",{staticClass:"k-lab-example-canvas"},[t._t("default")],2):t._e(),"inspect"===t.mode?e("div",{staticClass:"k-lab-example-code"},[e("k-code",{attrs:{language:"html"}},[t._v(t._s(t.component))])],1):t._e()])}),[],!1,null,null,null,null).exports;const a=e({},(function(){return(0,this._self._c)("div",{staticClass:"k-lab-examples"},[this._t("default")],2)}),[],!1,null,null,null,null).exports;const o=e({methods:{submit(t){const e=Object.fromEntries(new FormData(t));this.$panel.dialog.open({component:"k-lab-output-dialog",props:{code:JSON.stringify(e,null,2)}})}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"k-lab-form",on:{submit:function(e){return e.preventDefault(),t.submit(e.target)}}},[t._t("default"),e("footer",[e("k-button",{attrs:{type:"submit",icon:"check",theme:"positive",variant:"filled"}},[t._v(" Submit ")])],1)],2)}),[],!1,null,null,null,null).exports;const s=e({props:{code:String,language:{default:"js",type:String}},emits:["cancel"]},(function(){var t=this,e=t._self._c;return e("k-dialog",t._b({attrs:{size:"large","cancel-button":!1,"submit-button":!1},on:{cancel:function(e){return t.$emit("cancel")}}},"k-dialog",t.$attrs,!1),[e("k-code",{attrs:{language:t.language}},[t._v(t._s(t.code))])],1)}),[],!1,null,null,null,null).exports;const i=e({},(function(){var t=this._self._c;return t("div",{staticClass:"k-table"},[t("table",[t("tbody",[t("tr",[t("td",{staticClass:"k-table-cell",attrs:{"data-mobile":"true"}},[this._t("default")],2)])])])])}),[],!1,null,null,null,null).exports;Vue.component("k-lab-docs",t),Vue.component("k-lab-docs-drawer",n),Vue.component("k-lab-example",l),Vue.component("k-lab-examples",a),Vue.component("k-lab-form",o),Vue.component("k-lab-output-dialog",s),Vue.component("k-lab-table-cell",i);const r=e({props:{docs:String,examples:[Object,Array],file:String,github:String,props:[Object,Array],styles:String,tab:String,tabs:{type:Array,default:()=>[]},template:String,title:String},data:()=>({component:null}),watch:{tab:{handler(){this.createComponent()},immediate:!0}},mounted(){this.$panel.view.path.replace(/lab\//,"")},methods:{async createComponent(){if(!this.file)return;const{default:t}=await import(this.$panel.url(this.file)+"?cache="+Date.now());t.template=this.template,this.component={...t},window.UiExamples=this.examples},openDocs(){this.$panel.drawer.open(`lab/docs/${this.docs}`)},async reloadComponent(){await this.$panel.view.refresh(),this.createComponent()},reloadDocs(){this.$panel.drawer.isOpen&&this.$panel.drawer.refresh()}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-lab-playground-view",attrs:{"data-has-tabs":t.tabs.length>1}},[e("k-header",{scopedSlots:t._u([{key:"buttons",fn:function(){return[t.docs||t.github?e("k-button-group",[t.docs?e("k-button",{attrs:{text:t.docs,icon:"book",size:"sm",variant:"filled"},on:{click:t.openDocs}}):t._e(),t.github?e("k-button",{attrs:{link:t.github,icon:"github",size:"sm",target:"_blank",variant:"filled"}}):t._e()],1):t._e()]},proxy:!0}])},[t._v(" "+t._s(t.title)+" ")]),e("k-tabs",{attrs:{tab:t.tab,tabs:t.tabs}}),t.component?e(t.component,t._b({tag:"component"},"component",t.props,!1)):t._e(),t.styles?e("style",{tag:"component",domProps:{innerHTML:t._s(t.styles)}}):t._e()],1)}),[],!1,null,null,null,null).exports;export{r as default};

File diff suppressed because one or more lines are too long

1
kirby/panel/dist/js/index.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,91 +1,75 @@
window.panel = window.panel ?? {};
window.panel = window.panel || {};
window.panel.plugins = {
components: {},
created: [],
icons: {},
routes: [],
textareaButtons: {},
thirdParty: {},
use: [],
views: {},
writerMarks: {},
writerNodes: {}
components: {},
created: [],
icons: {},
routes: [],
use: [],
views: {},
thirdParty: {}
};
window.panel.plugin = function (plugin, extensions) {
// Blocks
resolve(extensions, "blocks", (name, options) => {
if (typeof options === "string") {
options = { template: options };
}
window.panel.plugin = function (plugin, parts) {
// Blocks
resolve(parts, "blocks", function (name, options) {
if (typeof options === "string") {
options = { template: options };
}
window.panel.plugins.components[`k-block-type-${name}`] = {
extends: "k-block-type-default",
...options
};
});
window.panel.plugins.components[`k-block-type-${name}`] = {
extends: "k-block-type",
...options
};
});
// Components
resolve(extensions, "components", (name, options) => {
window.panel.plugins.components[name] = options;
});
// Components
resolve(parts, "components", function (name, options) {
window.panel.plugins.components[name] = options;
});
// Fields
resolve(extensions, "fields", (name, options) => {
window.panel.plugins.components[`k-${name}-field`] = options;
});
// Fields
resolve(parts, "fields", function (name, options) {
window.panel.plugins.components[`k-${name}-field`] = options;
});
// Icons
resolve(extensions, "icons", (name, options) => {
window.panel.plugins.icons[name] = options;
});
// Icons
resolve(parts, "icons", function (name, options) {
window.panel.plugins.icons[name] = options;
});
// Sections
resolve(extensions, "sections", (name, options) => {
window.panel.plugins.components[`k-${name}-section`] = {
...options,
mixins: ["section", ...(options.mixins ?? [])]
};
});
// Sections
resolve(parts, "sections", function (name, options) {
window.panel.plugins.components[`k-${name}-section`] = {
...options,
mixins: ["section", ...(options.mixins || [])]
};
});
// `Vue.use`
resolve(extensions, "use", (name, options) => {
window.panel.plugins.use.push(options);
});
// `Vue.use`
resolve(parts, "use", function (name, options) {
window.panel.plugins.use.push(options);
});
// Vue `created` callback
if (extensions["created"]) {
window.panel.plugins.created.push(extensions["created"]);
}
// Vue `created` callback
if (parts["created"]) {
window.panel.plugins.created.push(parts["created"]);
}
// Login
if (extensions.login) {
window.panel.plugins.login = extensions.login;
}
// Login
if (parts.login) {
window.panel.plugins.login = parts.login;
}
// Textarea custom toolbar buttons
resolve(extensions, "textareaButtons", (name, options) => {
window.panel.plugins.textareaButtons[name] = options;
});
// Third-party plugins
resolve(extensions, "thirdParty", (name, options) => {
window.panel.plugins.thirdParty[name] = options;
});
// Writer custom marks
resolve(extensions, "writerMarks", (name, options) => {
window.panel.plugins.writerMarks[name] = options;
});
// Writer custom nodes
resolve(extensions, "writerNodes", function (name, options) {
window.panel.plugins.writerNodes[name] = options;
});
// Third-party plugins
resolve(parts, "thirdParty", function (name, options) {
window.panel.plugins.thirdParty[name] = options;
});
};
const resolve = (extensions, type, callback) => {
for (const [name, options] of Object.entries(extensions[type] ?? {})) {
callback(name, options);
}
};
function resolve(object, type, callback) {
if (object[type]) {
for (const [name, options] of Object.entries(object[type])) {
callback(name, options);
}
}
}

12
kirby/panel/dist/js/vendor.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
kirby/panel/dist/js/vuedraggable.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,28 +0,0 @@
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import vue from "eslint-plugin-vue";
export default [
js.configs.recommended,
...vue.configs["flat/vue2-recommended"],
prettier,
{
rules: {
"vue/attributes-order": "error",
"vue/component-definition-name-casing": "off",
"vue/html-closing-bracket-newline": [
"error",
{
singleline: "never",
multiline: "always"
}
],
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/require-prop-types": "error"
},
languageOptions: {
ecmaVersion: 2022
}
}
];