Update to Kirby 4.7.0
This commit is contained in:
parent
02a9ab387c
commit
ba25a9a198
509 changed files with 26604 additions and 14872 deletions
BIN
kirby/panel/dist/apple-touch-icon-dark.png
vendored
Normal file
BIN
kirby/panel/dist/apple-touch-icon-dark.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
1
kirby/panel/dist/css/style.css
vendored
1
kirby/panel/dist/css/style.css
vendored
File diff suppressed because one or more lines are too long
1
kirby/panel/dist/css/style.min.css
vendored
Normal file
1
kirby/panel/dist/css/style.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
kirby/panel/dist/favicon-dark.png
vendored
Normal file
BIN
kirby/panel/dist/favicon-dark.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 416 B |
1091
kirby/panel/dist/img/icons.svg
vendored
1091
kirby/panel/dist/img/icons.svg
vendored
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 102 KiB |
1
kirby/panel/dist/js/Docs.min.js
vendored
Normal file
1
kirby/panel/dist/js/Docs.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
kirby/panel/dist/js/DocsView.min.js
vendored
Normal file
1
kirby/panel/dist/js/DocsView.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
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)}),[]).exports;export{o as default};
|
1
kirby/panel/dist/js/Highlight.min.js
vendored
Normal file
1
kirby/panel/dist/js/Highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
kirby/panel/dist/js/IndexView.min.js
vendored
Normal file
1
kirby/panel/dist/js/IndexView.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
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)}),[]).exports;export{t as default};
|
1
kirby/panel/dist/js/PlaygroundView.min.js
vendored
Normal file
1
kirby/panel/dist/js/PlaygroundView.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
import{D as t}from"./Docs.min.js";import{n as e}from"./index.min.js";import"./vendor.min.js";const a=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)}),[]).exports;const o=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()])}),[]).exports;const s=e({},(function(){return(0,this._self._c)("div",{staticClass:"k-lab-examples"},[this._t("default")],2)}),[]).exports;const n=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)}),[]).exports;const i=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)}),[]).exports;const l=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)])])])])}),[]).exports;Vue.component("k-lab-docs",t),Vue.component("k-lab-docs-drawer",a),Vue.component("k-lab-example",o),Vue.component("k-lab-examples",s),Vue.component("k-lab-form",n),Vue.component("k-lab-output-dialog",i),Vue.component("k-lab-table-cell",l);const r=e({props:{compiler:Boolean,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}}),!1===t.compiler?e("k-box",{attrs:{theme:"info"}},[t._v(" The Vue template compiler must be enabled to show lab examples ")]):[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()]],2)}),[]).exports;export{r as default};
|
1
kirby/panel/dist/js/container-query-polyfill.modern.min.js
vendored
Normal file
1
kirby/panel/dist/js/container-query-polyfill.modern.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
kirby/panel/dist/js/index.js
vendored
1
kirby/panel/dist/js/index.js
vendored
File diff suppressed because one or more lines are too long
2
kirby/panel/dist/js/index.min.js
vendored
Normal file
2
kirby/panel/dist/js/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
138
kirby/panel/dist/js/plugins.js
vendored
138
kirby/panel/dist/js/plugins.js
vendored
|
@ -1,75 +1,91 @@
|
|||
window.panel = window.panel || {};
|
||||
window.panel = window.panel ?? {};
|
||||
window.panel.plugins = {
|
||||
components: {},
|
||||
created: [],
|
||||
icons: {},
|
||||
routes: [],
|
||||
use: [],
|
||||
views: {},
|
||||
thirdParty: {}
|
||||
components: {},
|
||||
created: [],
|
||||
icons: {},
|
||||
routes: [],
|
||||
textareaButtons: {},
|
||||
thirdParty: {},
|
||||
use: [],
|
||||
views: {},
|
||||
writerMarks: {},
|
||||
writerNodes: {}
|
||||
};
|
||||
|
||||
window.panel.plugin = function (plugin, parts) {
|
||||
// Blocks
|
||||
resolve(parts, "blocks", function (name, options) {
|
||||
if (typeof options === "string") {
|
||||
options = { template: options };
|
||||
}
|
||||
window.panel.plugin = function (plugin, extensions) {
|
||||
// Blocks
|
||||
resolve(extensions, "blocks", (name, options) => {
|
||||
if (typeof options === "string") {
|
||||
options = { template: options };
|
||||
}
|
||||
|
||||
window.panel.plugins.components[`k-block-type-${name}`] = {
|
||||
extends: "k-block-type",
|
||||
...options
|
||||
};
|
||||
});
|
||||
window.panel.plugins.components[`k-block-type-${name}`] = {
|
||||
extends: "k-block-type-default",
|
||||
...options
|
||||
};
|
||||
});
|
||||
|
||||
// Components
|
||||
resolve(parts, "components", function (name, options) {
|
||||
window.panel.plugins.components[name] = options;
|
||||
});
|
||||
// Components
|
||||
resolve(extensions, "components", (name, options) => {
|
||||
window.panel.plugins.components[name] = options;
|
||||
});
|
||||
|
||||
// Fields
|
||||
resolve(parts, "fields", function (name, options) {
|
||||
window.panel.plugins.components[`k-${name}-field`] = options;
|
||||
});
|
||||
// Fields
|
||||
resolve(extensions, "fields", (name, options) => {
|
||||
window.panel.plugins.components[`k-${name}-field`] = options;
|
||||
});
|
||||
|
||||
// Icons
|
||||
resolve(parts, "icons", function (name, options) {
|
||||
window.panel.plugins.icons[name] = options;
|
||||
});
|
||||
// Icons
|
||||
resolve(extensions, "icons", (name, options) => {
|
||||
window.panel.plugins.icons[name] = options;
|
||||
});
|
||||
|
||||
// Sections
|
||||
resolve(parts, "sections", function (name, options) {
|
||||
window.panel.plugins.components[`k-${name}-section`] = {
|
||||
...options,
|
||||
mixins: ["section", ...(options.mixins || [])]
|
||||
};
|
||||
});
|
||||
// Sections
|
||||
resolve(extensions, "sections", (name, options) => {
|
||||
window.panel.plugins.components[`k-${name}-section`] = {
|
||||
...options,
|
||||
mixins: ["section", ...(options.mixins ?? [])]
|
||||
};
|
||||
});
|
||||
|
||||
// `Vue.use`
|
||||
resolve(parts, "use", function (name, options) {
|
||||
window.panel.plugins.use.push(options);
|
||||
});
|
||||
// `Vue.use`
|
||||
resolve(extensions, "use", (name, options) => {
|
||||
window.panel.plugins.use.push(options);
|
||||
});
|
||||
|
||||
// Vue `created` callback
|
||||
if (parts["created"]) {
|
||||
window.panel.plugins.created.push(parts["created"]);
|
||||
}
|
||||
// Vue `created` callback
|
||||
if (extensions["created"]) {
|
||||
window.panel.plugins.created.push(extensions["created"]);
|
||||
}
|
||||
|
||||
// Login
|
||||
if (parts.login) {
|
||||
window.panel.plugins.login = parts.login;
|
||||
}
|
||||
// Login
|
||||
if (extensions.login) {
|
||||
window.panel.plugins.login = extensions.login;
|
||||
}
|
||||
|
||||
// Third-party plugins
|
||||
resolve(parts, "thirdParty", function (name, options) {
|
||||
window.panel.plugins.thirdParty[name] = options;
|
||||
});
|
||||
// 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;
|
||||
});
|
||||
};
|
||||
|
||||
function resolve(object, type, callback) {
|
||||
if (object[type]) {
|
||||
for (const [name, options] of Object.entries(object[type])) {
|
||||
callback(name, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
const resolve = (extensions, type, callback) => {
|
||||
for (const [name, options] of Object.entries(extensions[type] ?? {})) {
|
||||
callback(name, options);
|
||||
}
|
||||
};
|
||||
|
|
6
kirby/panel/dist/js/vendor.js
vendored
6
kirby/panel/dist/js/vendor.js
vendored
File diff suppressed because one or more lines are too long
16
kirby/panel/dist/js/vendor.min.js
vendored
Normal file
16
kirby/panel/dist/js/vendor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
kirby/panel/dist/js/vue.js
vendored
11
kirby/panel/dist/js/vue.js
vendored
File diff suppressed because one or more lines are too long
11
kirby/panel/dist/js/vue.min.js
vendored
Normal file
11
kirby/panel/dist/js/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
kirby/panel/dist/js/vue.runtime.min.js
vendored
Normal file
11
kirby/panel/dist/js/vue.runtime.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
kirby/panel/dist/js/vuedraggable.js
vendored
7
kirby/panel/dist/js/vuedraggable.js
vendored
File diff suppressed because one or more lines are too long
7
kirby/panel/dist/js/vuedraggable.min.js
vendored
Normal file
7
kirby/panel/dist/js/vuedraggable.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue