@kyro-cms/core 0.12.71 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -76
- package/dist/{WebhookService-DQyM9fVo.d.ts → WebhookService-BLi5Rz2m.d.ts} +1 -1
- package/dist/{WebhookService-bo1NrgBW.d.cts → WebhookService-BOJMgjBm.d.cts} +1 -1
- package/dist/WebhookService-BcuD8tnn.d.cts +143 -0
- package/dist/WebhookService-CFe6Zd0_.d.cts +143 -0
- package/dist/WebhookService-CGxHtw7E.d.cts +143 -0
- package/dist/WebhookService-CNC1lYz7.d.ts +143 -0
- package/dist/WebhookService-CVXmjbtQ.d.cts +143 -0
- package/dist/WebhookService-D5PSI5t6.d.cts +143 -0
- package/dist/WebhookService-DPCCn_12.d.ts +143 -0
- package/dist/WebhookService-Dk1lzSrG.d.cts +143 -0
- package/dist/WebhookService-Dncnbgm9.d.cts +143 -0
- package/dist/WebhookService-I6hdue2Y.d.ts +143 -0
- package/dist/WebhookService-KnQ2UDlW.d.ts +143 -0
- package/dist/WebhookService-UY5p89Bj.d.ts +143 -0
- package/dist/WebhookService-YZXBCRXA.d.ts +143 -0
- package/dist/WebhookService-fk0FGRlk.d.ts +143 -0
- package/dist/WebhookService-vsFnWrOh.d.ts +143 -0
- package/dist/WebhookService-zrDmAx7L.d.cts +143 -0
- package/dist/api-handler-graphql.cjs +1 -1
- package/dist/api-handler-graphql.js +1 -1
- package/dist/api-handler-trpc.cjs +1 -1
- package/dist/api-handler-trpc.js +1 -1
- package/dist/api-handler.cjs +1 -1
- package/dist/api-handler.js +1 -1
- package/dist/{base-urWvrsX8.d.cts → base-B--L0lCn.d.cts} +1 -1
- package/dist/base-B-i-tjm1.d.ts +218 -0
- package/dist/base-B-siit_y.d.cts +218 -0
- package/dist/base-B8SyZI4D.d.ts +218 -0
- package/dist/base-BCgFt3Yx.d.ts +218 -0
- package/dist/base-BHRGJ40F.d.cts +218 -0
- package/dist/base-BVoDPNjJ.d.cts +218 -0
- package/dist/base-BaOJ5uWd.d.cts +218 -0
- package/dist/base-BfPaVEAE.d.cts +218 -0
- package/dist/base-BxrX5EPU.d.cts +218 -0
- package/dist/base-CAb9EYQs.d.ts +218 -0
- package/dist/base-CcZIEll-.d.ts +218 -0
- package/dist/base-CyG7aF1e.d.cts +218 -0
- package/dist/{base-BcfNgOqZ.d.ts → base-DOImeJ-F.d.ts} +1 -1
- package/dist/base-DbnwE42-.d.cts +218 -0
- package/dist/base-NyiSsD-n.d.ts +218 -0
- package/dist/base-OYfoYPYP.d.ts +218 -0
- package/dist/base-xflndGDO.d.ts +218 -0
- package/dist/bootstrap-QQ6D3OYG.js +1 -0
- package/dist/bootstrap-QVKSKXJF.cjs +1 -0
- package/dist/bootstrap-RILR44UM.cjs +1 -0
- package/dist/bootstrap-ZRRUPRUR.js +1 -0
- package/dist/chunk-262YP5XA.cjs +1 -0
- package/dist/chunk-2FSOHXOU.cjs +56 -0
- package/dist/chunk-2OS5Y4LE.cjs +1 -0
- package/dist/chunk-2PXXQKN3.cjs +3 -0
- package/dist/{chunk-K6ZW5M6S.cjs → chunk-355R4LS5.cjs} +3 -3
- package/dist/chunk-35IVNLMA.js +122 -0
- package/dist/{chunk-FSWDDVLA.js → chunk-3GXLOYM3.js} +1 -1
- package/dist/chunk-3KZXF4US.js +2 -0
- package/dist/{chunk-H7PC2ENZ.cjs → chunk-3LAWUINR.cjs} +1 -1
- package/dist/chunk-3O3AVMWM.cjs +1 -0
- package/dist/chunk-3U6MKWET.cjs +120 -0
- package/dist/chunk-4BMWWGJN.js +384 -0
- package/dist/chunk-5A7E7N4B.cjs +431 -0
- package/dist/chunk-6DD4J7LI.js +2 -0
- package/dist/chunk-6GGPY7U2.js +4 -0
- package/dist/chunk-6MNLRAKM.cjs +121 -0
- package/dist/chunk-6NBZDW53.js +133 -0
- package/dist/{chunk-2HATK4C5.js → chunk-73Y63IPP.js} +4 -4
- package/dist/chunk-7K6ZUNJM.js +4 -0
- package/dist/chunk-7NKNSRCB.cjs +448 -0
- package/dist/chunk-A3IOQOV6.js +2 -0
- package/dist/chunk-A3XVL6ED.cjs +3 -0
- package/dist/{chunk-LKQHIOPW.cjs → chunk-APDQ6ZTG.cjs} +1 -1
- package/dist/chunk-ATI2UZ7U.js +2 -0
- package/dist/chunk-B4AC23SG.js +122 -0
- package/dist/chunk-BD6XHMMM.cjs +2 -0
- package/dist/chunk-CH4TZZI5.js +449 -0
- package/dist/{chunk-26KFM3P6.js → chunk-CNHUCCQJ.js} +1 -1
- package/dist/chunk-CRP6PSCE.js +2 -0
- package/dist/chunk-DI6TCZSE.js +122 -0
- package/dist/chunk-DORUYZQV.cjs +1 -0
- package/dist/chunk-E4H3ZZ7U.js +4 -0
- package/dist/chunk-EFKEVWAD.js +4 -0
- package/dist/chunk-EI7FRSNY.js +57 -0
- package/dist/chunk-EON4XLKQ.cjs +1 -0
- package/dist/chunk-EUQAOYEO.cjs +121 -0
- package/dist/chunk-EVAUBT7H.js +57 -0
- package/dist/chunk-EYHD7HZE.cjs +1 -0
- package/dist/chunk-EYYIPA5N.js +432 -0
- package/dist/chunk-F2O4QO5N.cjs +383 -0
- package/dist/chunk-FBWLSWZ4.js +122 -0
- package/dist/chunk-FDKU7HJX.js +2 -0
- package/dist/chunk-FGN6IMPY.cjs +3 -0
- package/dist/chunk-FK2BG4HU.js +3 -0
- package/dist/chunk-GV2IB4WQ.cjs +56 -0
- package/dist/chunk-GWIZT2P5.js +57 -0
- package/dist/chunk-H3FJ54KB.cjs +121 -0
- package/dist/chunk-HY3EAWB2.js +4 -0
- package/dist/chunk-I6UJVO2P.js +57 -0
- package/dist/chunk-IQSF6XRV.js +57 -0
- package/dist/chunk-IXGDTAES.js +4 -0
- package/dist/chunk-JA44K75G.js +2 -0
- package/dist/chunk-JZ7Z6WC2.cjs +3 -0
- package/dist/chunk-K5XGP57D.cjs +19 -0
- package/dist/chunk-KEITOXIP.js +2 -0
- package/dist/chunk-LPFRMQFQ.js +121 -0
- package/dist/chunk-LYU44UNN.cjs +56 -0
- package/dist/chunk-MDLJTZLV.cjs +1 -0
- package/dist/chunk-MFNN5DYG.cjs +1 -0
- package/dist/chunk-MJAODEFC.cjs +121 -0
- package/dist/chunk-MYHNTJLR.cjs +56 -0
- package/dist/chunk-N2YHO2WI.cjs +3 -0
- package/dist/chunk-N4FXLQE3.cjs +132 -0
- package/dist/chunk-NPBXLPOP.js +3 -0
- package/dist/chunk-ON5XJEPO.cjs +3 -0
- package/dist/chunk-OT2Z4XBD.cjs +1 -0
- package/dist/chunk-PFTBTWSC.cjs +1 -0
- package/dist/chunk-PTPVFLET.js +20 -0
- package/dist/chunk-PZDLPRJF.js +4 -0
- package/dist/chunk-Q5TFO66G.cjs +1 -0
- package/dist/chunk-QUTYCUST.js +4 -0
- package/dist/chunk-REKKBAQX.cjs +56 -0
- package/dist/chunk-REQ622YC.js +3 -0
- package/dist/chunk-RTNQP6BV.js +2 -0
- package/dist/chunk-RUJW47ZJ.js +2 -0
- package/dist/chunk-RXYCFZJC.cjs +121 -0
- package/dist/chunk-RYHOWZLK.js +2 -0
- package/dist/chunk-S2MZNEBQ.cjs +1 -0
- package/dist/chunk-S73YERS2.js +57 -0
- package/dist/chunk-SBNMXQNO.cjs +2 -0
- package/dist/chunk-SMQ6736Y.js +57 -0
- package/dist/chunk-T3DJ3UTP.cjs +121 -0
- package/dist/chunk-TJZO7ZSX.cjs +3 -0
- package/dist/chunk-TKUNRCRH.js +4 -0
- package/dist/chunk-TQLCOMKC.js +4 -0
- package/dist/chunk-TRXYDWGE.cjs +1 -0
- package/dist/chunk-TS55CUNJ.js +57 -0
- package/dist/chunk-UFBJ3WOZ.js +2 -0
- package/dist/chunk-UQRVQUVR.js +2 -0
- package/dist/chunk-UW5W35NP.js +122 -0
- package/dist/chunk-VI7WCO2J.cjs +3 -0
- package/dist/chunk-W2GPP6RB.js +122 -0
- package/dist/chunk-WHOA7YJU.cjs +1 -0
- package/dist/chunk-WNRUPL26.js +2 -0
- package/dist/chunk-WXT2XW7T.js +13 -0
- package/dist/chunk-XFYSADHV.cjs +2 -0
- package/dist/chunk-XIAJQLGS.js +2 -0
- package/dist/chunk-XK6UB77Q.js +4 -0
- package/dist/chunk-Y2VHO66Q.cjs +3 -0
- package/dist/chunk-Y5O2OD7J.cjs +3 -0
- package/dist/chunk-YARB43JG.cjs +56 -0
- package/dist/chunk-YLCEMVYY.cjs +56 -0
- package/dist/chunk-YSOM57GK.cjs +3 -0
- package/dist/chunk-Z3UVDGYS.cjs +56 -0
- package/dist/chunk-ZTLGK6R4.cjs +12 -0
- package/dist/chunk-ZUBJ6RLQ.cjs +1 -0
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/client.cjs +10 -10
- package/dist/client.d.cts +1265 -0
- package/dist/client.d.ts +1265 -0
- package/dist/client.js +10 -10
- package/dist/drizzle/index.cjs +1 -1
- package/dist/drizzle/index.d.cts +3 -3
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/fields/index.cjs +1 -1
- package/dist/fields/index.d.cts +2 -2
- package/dist/fields/index.d.ts +2 -2
- package/dist/fields/index.js +1 -1
- package/dist/graphql/index.d.cts +3 -3
- package/dist/graphql/index.d.ts +3 -3
- package/dist/index-8Ino7vKq.d.ts +105 -0
- package/dist/{index-d1m_oup7.d.cts → index-B9BFNOHd.d.cts} +1 -1
- package/dist/index-BMcYFpTv.d.cts +105 -0
- package/dist/index-BttsFZDa.d.ts +105 -0
- package/dist/index-ByOM1Y5x.d.ts +105 -0
- package/dist/index-C6xmtRio.d.cts +105 -0
- package/dist/index-CTI3K_uq.d.cts +105 -0
- package/dist/index-CTL4zv_u.d.ts +105 -0
- package/dist/index-CaDbioSg.d.ts +105 -0
- package/dist/index-CxA9uOv0.d.ts +105 -0
- package/dist/{index-4cH-BjtP.d.ts → index-D6AXbuPI.d.ts} +1 -1
- package/dist/index-DF0KDBaM.d.cts +105 -0
- package/dist/index-DG4Xu7gA.d.cts +105 -0
- package/dist/index-DS3DpJli.d.cts +105 -0
- package/dist/index-NGnJpSgf.d.ts +105 -0
- package/dist/index-Zrg3sZ6R.d.cts +105 -0
- package/dist/index-eHex8Iwj.d.ts +105 -0
- package/dist/index-rm7uyOK1.d.cts +105 -0
- package/dist/index.cjs +32 -32
- package/dist/index.d.cts +73 -11
- package/dist/index.d.ts +73 -11
- package/dist/index.js +32 -32
- package/dist/lib-A2D63VXD.cjs +1 -0
- package/dist/lib-JQD2JAOO.js +2 -0
- package/dist/local-KR3AIGVA.cjs +1 -0
- package/dist/local-T7GISZBL.js +1 -0
- package/dist/mongo-auth-adapter-GR2CFFEA.js +1 -0
- package/dist/mongo-auth-adapter-UOO2LZUJ.cjs +1 -0
- package/dist/mongodb/index.cjs +1 -1
- package/dist/mongodb/index.d.cts +4 -3
- package/dist/mongodb/index.d.ts +4 -3
- package/dist/mongodb/index.js +1 -1
- package/dist/nodemailer-transport-3VWVUBM5.cjs +1 -0
- package/dist/nodemailer-transport-7RHATUKL.js +1 -0
- package/dist/nodemailer-transport-CHO2WKIY.js +1 -0
- package/dist/nodemailer-transport-ED2IXNGW.cjs +1 -0
- package/dist/rest/index.cjs +1 -1
- package/dist/rest/index.d.cts +4 -4
- package/dist/rest/index.d.ts +4 -4
- package/dist/rest/index.js +1 -1
- package/dist/templates/index.cjs +1 -1
- package/dist/templates/index.d.cts +2 -2
- package/dist/templates/index.d.ts +2 -2
- package/dist/templates/index.js +1 -1
- package/dist/trpc/index.cjs +1 -1
- package/dist/trpc/index.d.cts +3 -3
- package/dist/trpc/index.d.ts +3 -3
- package/dist/trpc/index.js +1 -1
- package/dist/types-6ShQp2EM.d.cts +839 -0
- package/dist/types-B5Qz1svz.d.cts +822 -0
- package/dist/types-B9oXBEKI.d.cts +330 -0
- package/dist/types-B9oXBEKI.d.ts +330 -0
- package/dist/types-BCOhfwHC.d.ts +839 -0
- package/dist/types-BRDBNacn.d.ts +839 -0
- package/dist/types-Bii0bhUV.d.cts +329 -0
- package/dist/types-Bii0bhUV.d.ts +329 -0
- package/dist/{types-BADIMVGF.d.ts → types-Bt2_ycUO.d.ts} +36 -1
- package/dist/types-C4wXHImf.d.ts +822 -0
- package/dist/types-C8yIAV6K.d.cts +839 -0
- package/dist/types-CORUQhY-.d.ts +839 -0
- package/dist/types-Cdssrcbz.d.cts +839 -0
- package/dist/types-CjGqxBd3.d.cts +330 -0
- package/dist/types-CjGqxBd3.d.ts +330 -0
- package/dist/types-DBGR-eQl.d.cts +839 -0
- package/dist/types-DCWgPFmi.d.cts +822 -0
- package/dist/types-DROqAsr0.d.cts +330 -0
- package/dist/types-DROqAsr0.d.ts +330 -0
- package/dist/{types-YAVR0H9Z.d.cts → types-DsF64Wrc.d.cts} +36 -1
- package/dist/types-DxaK39ix.d.cts +330 -0
- package/dist/types-DxaK39ix.d.ts +330 -0
- package/dist/types-IeKFn7Ky.d.ts +839 -0
- package/dist/types-QglJ7PwT.d.cts +839 -0
- package/dist/types-ZrjEVWfi.d.ts +811 -0
- package/dist/types-dEy5JxvN.d.ts +822 -0
- package/dist/types-tVJc9YbX.d.cts +811 -0
- package/dist/types-zt5qIvje.d.ts +839 -0
- package/dist/ws/index.cjs +1 -1
- package/dist/ws/index.d.cts +121 -1
- package/dist/ws/index.d.ts +121 -1
- package/dist/ws/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-5M3FKE2V.js +0 -2
- package/dist/chunk-WCFHS7EZ.cjs +0 -1
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {generateHTML}from'@tiptap/html';import
|
|
1
|
+
import {generateHTML}from'@tiptap/html';import M from'@tiptap/starter-kit';import N from'@tiptap/extension-link';import V from'@tiptap/extension-image';import _ from'@tiptap/extension-text-align';import H from'@tiptap/extension-underline';import q from'@tiptap/extension-highlight';import G from'@tiptap/extension-task-list';import U from'@tiptap/extension-task-item';import {TextStyle}from'@tiptap/extension-text-style';import Y from'@tiptap/extension-color';var I=["text","number","checkbox","date","email","password","textarea","select","radio","color","icon"],P=["richtext","json","code","upload","image","markdown","embedding"],L=["relationship","array","group","blocks"],$=["row","collapsible","tabs"],j=[...I,...P,...L,...$];var J=`
|
|
2
2
|
.kyro-richtext {
|
|
3
3
|
color: inherit;
|
|
4
4
|
line-height: 1.7;
|
|
@@ -87,23 +87,23 @@ import {generateHTML}from'@tiptap/html';import V from'@tiptap/starter-kit';impor
|
|
|
87
87
|
border-radius: 0.25rem;
|
|
88
88
|
padding: 0.125rem 0.25rem;
|
|
89
89
|
}
|
|
90
|
-
`.trim(),
|
|
91
|
-
`);return this.css.push(`${
|
|
90
|
+
`.trim(),K=[M,N.configure({openOnClick:false}),V,_.configure({types:["heading","paragraph"]}),H,q.configure({multicolor:true}),G,U.configure({nested:true}),TextStyle,Y];function W(r){if(typeof r!="object"||r===null)return "";try{return `<div class="kyro-richtext">${generateHTML(r,K)}</div>`}catch(n){return console.error("Failed to render rich text:",n),""}}var k=class{constructor(n){this.config=n;}config;css=[];addRule(n,e){let o=Object.entries(e).map(([t,i])=>` ${t}: ${i};`).join(`
|
|
91
|
+
`);return this.css.push(`${n} {
|
|
92
92
|
${o}
|
|
93
|
-
}`),this}addMediaQuery(
|
|
93
|
+
}`),this}addMediaQuery(n,e){return this.css.push(`@media (min-width: ${n}) {
|
|
94
94
|
${e.join(`
|
|
95
95
|
`)}
|
|
96
96
|
}`),this}generate(){return this.css.join(`
|
|
97
97
|
|
|
98
|
-
`)}};function
|
|
99
|
-
${
|
|
98
|
+
`)}};function Q(r){return {theme:{extend:{colors:r.colors||{},fontFamily:r.fonts||{},spacing:r.spacing||{},borderRadius:r.borderRadius||{},boxShadow:r.shadows||{},screens:r.breakpoints||{}}}}}var h={colors:{primary:"#3b82f6",secondary:"#6366f1",accent:"#ec4899",background:"#ffffff",surface:"#f9fafb",text:"#111827",textMuted:"#6b7280",border:"#e5e7eb",error:"#ef4444",warning:"#f59e0b",success:"#10b981",info:"#3b82f6"},fonts:{sans:"system-ui, -apple-system, sans-serif",serif:"Georgia, serif",mono:"Menlo, monospace"},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},borderRadius:{sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1)"}},X={colors:{primary:"#60a5fa",secondary:"#818cf8",accent:"#f472b6",background:"#111827",surface:"#1f2937",text:"#f9fafb",textMuted:"#9ca3af",border:"#374151",error:"#f87171",warning:"#fbbf24",success:"#34d399",info:"#60a5fa"},fonts:h.fonts,spacing:h.spacing,borderRadius:h.borderRadius,shadows:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.3)",md:"0 4px 6px -1px rgb(0 0 0 / 0.4)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.5)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.6)"}},Z={colors:{primary:"#FF6B35",secondary:"#1A1A2E",accent:"#16C79A",background:"#FFFFFF",surface:"#F8F9FA",text:"#1A1A2E",textMuted:"#6B7280",border:"#E5E7EB",error:"#EF4444",warning:"#F59E0B",success:"#16C79A",info:"#3B82F6"},fonts:{sans:'"Inter", "Satoshi", system-ui, sans-serif',serif:'"Playfair Display", Georgia, serif',mono:'"JetBrains Mono", monospace'},spacing:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"3rem","4xl":"4rem"},borderRadius:{sm:"0",md:"0",lg:"0",xl:"0",full:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px rgba(0,0,0,0.07)",lg:"0 10px 15px rgba(0,0,0,0.1)",xl:"0 20px 25px rgba(0,0,0,0.15)"}};function w(r){let n=[];if(r.colors)for(let[e,o]of Object.entries(r.colors))n.push(` --color-${e}: ${o};`);if(r.fonts)for(let[e,o]of Object.entries(r.fonts))n.push(` --font-${e}: ${o};`);if(r.spacing)for(let[e,o]of Object.entries(r.spacing))n.push(` --spacing-${e}: ${o};`);if(r.borderRadius)for(let[e,o]of Object.entries(r.borderRadius))n.push(` --radius-${e}: ${o};`);if(r.shadows)for(let[e,o]of Object.entries(r.shadows))n.push(` --shadow-${e}: ${o};`);return `:root {
|
|
99
|
+
${n.join(`
|
|
100
100
|
`)}
|
|
101
|
-
}`}function
|
|
101
|
+
}`}function ee(r){let n=w(r.theme||h),e=[];if(r.componentOverrides)for(let[o,t]of Object.entries(r.componentOverrides)){let i=Object.entries(t).map(([a,f])=>` ${a}: ${f};`).join(`
|
|
102
102
|
`);e.push(`${o} {
|
|
103
|
-
${
|
|
103
|
+
${i}
|
|
104
104
|
}`);}return `
|
|
105
|
-
${
|
|
105
|
+
${n}
|
|
106
106
|
${r.customStyles||""}
|
|
107
107
|
${e.join(`
|
|
108
108
|
`)}
|
|
109
|
-
`}var
|
|
109
|
+
`}var re={text:{wrapper:{marginBottom:"var(--spacing-md)"},label:{display:"block",marginBottom:"var(--spacing-xs)",fontWeight:"500",color:"var(--color-text)"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",fontSize:"0.875rem"},error:{color:"var(--color-error)",fontSize:"0.75rem",marginTop:"var(--spacing-xs)"}},number:{wrapper:{marginBottom:"var(--spacing-md)"},label:{display:"block",marginBottom:"var(--spacing-xs)",fontWeight:"500"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)"}},checkbox:{wrapper:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},input:{width:"1rem",height:"1rem"},label:{cursor:"pointer"}},select:{wrapper:{marginBottom:"var(--spacing-md)"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",backgroundColor:"white"}}};function te(r){return {ipAddress:r.headers.get("x-forwarded-for")?.split(",")[0]?.trim()||r.headers.get("x-real-ip")||"unknown",userAgent:r.headers.get("user-agent")||"unknown"}}var v=new Set(["type","admin","label","singularLabel","labelPlural","relationTo","required","hasMany","defaultValue","validate","options","dynamicOptions","filterOptions","hooks","min","max","minLength","maxLength","minRows","maxRows","minDate","maxDate","step","integer","variant","pattern","format","fields","tabs","blocks"]);function C(r){return typeof r!="object"||r===null||Array.isArray(r)?false:Object.keys(r).some(n=>v.has(n))}function F(r,n=""){let e={};for(let[o,t]of Object.entries(r)){let i=n?`${n}.${o}`:o;t&&typeof t=="object"&&!Array.isArray(t)&&!C(t)?Object.assign(e,F(t,i)):e[i]=t;}return e}function y(r,n,e,o=true){let t=n.split(".");if(t.length===0)return false;let i=t[0],a=t.slice(1).join("."),f=i.match(/^(?:tab|tabs)\[(.+?)\]$/i);if(f){let s=f[1].toLowerCase();for(let u of r)if(u.type==="tabs"&&u.tabs&&Array.isArray(u.tabs)){for(let l of u.tabs)if((l.label||l.name||"").toLowerCase()===s&&l.fields&&Array.isArray(l.fields))return y(l.fields,a,e,o)}return false}for(let s of r){if(s.name===i)if(a){if(s.fields&&Array.isArray(s.fields))return y(s.fields,a,e,true);if(s.type==="tabs"&&s.tabs&&Array.isArray(s.tabs)){for(let l of s.tabs)if(l.fields&&Array.isArray(l.fields)&&y(l.fields,a,e,true))return true;return false}if(s.type==="blocks"&&s.blocks&&Array.isArray(s.blocks)){let l=a.split(".")[0],g=a.split(".").slice(1).join(".");if(!g)return false;for(let d of s.blocks)if(d.slug===l&&d.fields&&Array.isArray(d.fields))return y(d.fields,g,e,true);return false}return s.type==="array"&&s.fields&&Array.isArray(s.fields)?y(s.fields,a,e,true):false}else return Object.assign(s,e),true;if(s.type==="blocks"&&s.blocks&&Array.isArray(s.blocks)){if(i==="blocks"&&a){let l=a.split(".")[0],g=a.split(".").slice(1).join(".");for(let d of s.blocks)if(d.slug===l&&d.fields&&Array.isArray(d.fields)&&y(d.fields,g,e,true))return true}for(let l of s.blocks)if(l.slug===i&&l.fields&&Array.isArray(l.fields)&&y(l.fields,a,e,true))return true}if(!s.name||s.type==="tabs"||s.type==="row"||s.type==="collapsible"){if(s.fields&&Array.isArray(s.fields)&&y(s.fields,n,e,false))return true;if(s.type==="tabs"&&s.tabs&&Array.isArray(s.tabs)){for(let l of s.tabs)if(l.fields&&Array.isArray(l.fields)&&y(l.fields,n,e,false))return true}}}return o&&!a&&e&&e.type?(r.push({name:i,...e}),true):false}function T(r,n){if(!n)return;let e=Array.isArray(n)?n:Object.entries(n).map(([t,i])=>({slug:i?.slug||t,...i}));function o(t){for(let i of t){if(i.type==="blocks"){Array.isArray(i.blocks)||(i.blocks=[]);for(let a of e){let f=i.blocks.findIndex(s=>s.slug===a.slug);f>=0?i.blocks[f]={...i.blocks[f],...a}:i.blocks.push(a);}return true}if(i.fields&&Array.isArray(i.fields)&&o(i.fields))return true;if(i.type==="tabs"&&i.tabs&&Array.isArray(i.tabs)){for(let a of i.tabs)if(a.fields&&Array.isArray(a.fields)&&o(a.fields))return true}}return false}o(r);}function A(r,n){if(!n)return;let e=Array.isArray(n)?n:Object.entries(n).map(([t,i])=>({label:i?.label||t,...Array.isArray(i)?{fields:i}:i})),o=r.find(t=>t.type==="tabs");if(o&&Array.isArray(o.tabs))for(let t of e){let i=o.tabs.find(a=>(a.label||a.name||"").toLowerCase()===(t.label||t.name||"").toLowerCase());i?(t.fields&&Array.isArray(t.fields)&&(Array.isArray(i.fields)||(i.fields=[]),i.fields.push(...t.fields)),Object.assign(i,t)):o.tabs.push(t);}else {let t=[...r];r.length=0,r.push({type:"tabs",tabs:[{label:"General",fields:t},...e]});}}function ie(r,n){if(n)for(let e of r){let o=n[e.slug];if(o){let{fields:t,blocks:i,tabs:a,labels:f,label:s,singularLabel:u,labelPlural:l,hidden:g,timestamps:d,versions:b,seo:c,access:p,hooks:m,admin:x,...R}=o;if(s&&(e.label=s),u&&(e.singularLabel=u),l&&(e.labelPlural=l),f&&(f.singular&&(e.singularLabel=f.singular),f.plural&&(e.labelPlural=f.plural)),d!==void 0&&(e.timestamps=d),b!==void 0&&(e.versions={...e.versions,...b}),c!==void 0&&(e.seo=c),p&&(e.access={...e.access,...p}),m&&(e.hooks={...e.hooks,...m}),(x||R)&&(e.admin={...e.admin,...x,...R}),i&&T(e.fields,i),a&&A(e.fields,a),t){let B=F(t);for(let[O,D]of Object.entries(B))y(e.fields,O,D);}}}}function ne(r,n){if(n)for(let e of r){let o=n[e.slug];if(o){let{fields:t,blocks:i,tabs:a,label:f,hidden:s,versions:u,access:l,hooks:g,admin:d,...b}=o;if(f&&(e.label=f),u!==void 0&&(e.versions={...e.versions,...u}),l&&(e.access={...e.access,...l}),g&&(e.hooks={...e.hooks,...g}),(d||b)&&(e.admin={...e.admin,...d,...b}),i&&T(e.fields,i),a&&A(e.fields,a),t){let c=F(t);for(let[p,m]of Object.entries(c))y(e.fields,p,m);}}}}function se(r,n={}){let{idField:e="id",parentField:o="parent",slugField:t="slug",slugPrefix:i=true,basePath:a="",maxDepth:f=10}=n,s=new Map,u=[];for(let g of r){let d=g[e];d!=null&&s.set(d,{doc:g,id:d,slug:g[t],depth:0,path:"",fullPath:"",children:[]});}for(let g of r){let d=g[e],b=s.get(d);if(!b)continue;let c=g[o];c&&typeof c=="object"&&(c=c[e]||c.id||c._id),c&&s.has(c)?s.get(c).children.push(b):u.push(b);}function l(g,d,b){if(!(d>f))for(let c of g){c.depth=d;let p=c.slug||String(c.id),m="";i?m=b?`${b}/${p}`:a?`${a.replace(/\/$/,"")}/${p}`:`/${p}`:m=a?`${a.replace(/\/$/,"")}/${p}`:`/${p}`,c.path=m,c.fullPath=m,c.children.length>0&&l(c.children,d+1,c.path);}}return l(u,0,""),u}function S(r,n,e={}){let o,t;Array.isArray(r)?(o=r,t=n):(t=r,o=n);let{idField:i="id",parentField:a="parent",labelField:f="title",slugField:s="slug",basePath:u=""}=e,l=new Map;for(let p of o){let m=p[i];m!=null&&l.set(m,p);}let g=[],d=t,b=new Set;for(;d!==void 0&&l.has(d)&&!b.has(d);){b.add(d);let p=l.get(d),m=p[f]||p.name||p.label||p[s]||String(d);g.unshift({id:d,label:m,slug:p[s]});let x=p[a];x&&typeof x=="object"&&(x=x[i]||x.id||x._id),d=x;}let c=u?u.replace(/\/$/,""):"";return g.map(p=>{let m=p.slug||String(p.id);return c=`${c}/${m}`,{...p,path:c}})}function oe(r,n,e={}){let o=S(r,n,e);return o[o.length-1]?.path||(e.basePath?e.basePath:"/")}function ae(r){let n=[];function e(o){for(let t of o)n.push({doc:t.doc,id:t.id,depth:t.depth,path:t.path,fullPath:t.fullPath,hasChildren:t.children.length>0}),t.children.length>0&&e(t.children);}return e(r),n}export{j as ALL_FIELD_TYPES,k as CSSGenerator,v as FIELD_DEFINITION_KEYS,T as applyBlocksOverrides,ie as applyCollectionOverrides,ne as applyGlobalOverrides,A as applyTabsOverrides,se as buildDocumentTree,ee as createAdminStyling,te as createAuditContext,X as defaultDarkTheme,re as defaultFieldStyling,h as defaultLightTheme,Z as ecommerce2026Theme,ae as flattenDocumentTree,F as flattenFieldOverrides,w as generateCSSVariables,Q as generateTailwindConfig,S as getBreadcrumbs,oe as getNestedPath,C as isFieldOverrideDefinition,W as renderRichText,J as richTextStyles,y as updateFieldByPath};
|
package/dist/drizzle/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkN4FXLQE3_cjs=require('../chunk-N4FXLQE3.cjs');require('../chunk-7ACHOBWY.cjs');var chunkTCFL3UWT_cjs=require('../chunk-TCFL3UWT.cjs'),chunkXBQ6HV3T_cjs=require('../chunk-XBQ6HV3T.cjs');require('../chunk-7JWQ2PZP.cjs'),require('../chunk-RVBSJ4UQ.cjs'),require('../chunk-GNOSG3PK.cjs'),require('../chunk-LY7N3UHH.cjs'),require('../chunk-BAVN7VDR.cjs'),require('../chunk-NGNJSUGL.cjs'),require('../chunk-BCEE4NBZ.cjs'),require('../chunk-VRZC4TTF.cjs'),require('../chunk-VQ53TFYA.cjs'),require('../chunk-F4ITQ6XQ.cjs'),require('../chunk-HTYVI2HK.cjs'),require('../chunk-ZUBJ6RLQ.cjs'),require('../chunk-7WMMKGEO.cjs'),require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"DrizzleAdapter",{enumerable:true,get:function(){return chunkN4FXLQE3_cjs.c}});Object.defineProperty(exports,"collectionToDrizzleSchema",{enumerable:true,get:function(){return chunkN4FXLQE3_cjs.b}});Object.defineProperty(exports,"createDrizzleAdapter",{enumerable:true,get:function(){return chunkN4FXLQE3_cjs.d}});Object.defineProperty(exports,"fieldToDrizzleType",{enumerable:true,get:function(){return chunkN4FXLQE3_cjs.a}});Object.defineProperty(exports,"createDatabase",{enumerable:true,get:function(){return chunkTCFL3UWT_cjs.b}});Object.defineProperty(exports,"runMigrations",{enumerable:true,get:function(){return chunkTCFL3UWT_cjs.c}});Object.defineProperty(exports,"seedDefaultRoles",{enumerable:true,get:function(){return chunkTCFL3UWT_cjs.d}});Object.defineProperty(exports,"PostgresAuthAdapter",{enumerable:true,get:function(){return chunkXBQ6HV3T_cjs.a}});
|
package/dist/drizzle/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-
|
|
2
|
-
import { C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs } from '../types-
|
|
1
|
+
import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-BaOJ5uWd.cjs';
|
|
2
|
+
import { C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs } from '../types-QglJ7PwT.cjs';
|
|
3
3
|
import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
4
|
-
import { F as Field } from '../types-
|
|
4
|
+
import { F as Field } from '../types-DxaK39ix.cjs';
|
|
5
5
|
|
|
6
6
|
declare function fieldToDrizzleType(field: Field, dialect?: 'postgres' | 'sqlite'): string;
|
|
7
7
|
declare function collectionToDrizzleSchema(collection: CollectionConfig, dialect?: 'postgres' | 'sqlite'): string;
|
package/dist/drizzle/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-
|
|
2
|
-
import { C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs } from '../types-
|
|
1
|
+
import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-OYfoYPYP.js';
|
|
2
|
+
import { C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs } from '../types-BCOhfwHC.js';
|
|
3
3
|
import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
4
|
-
import { F as Field } from '../types-
|
|
4
|
+
import { F as Field } from '../types-DxaK39ix.js';
|
|
5
5
|
|
|
6
6
|
declare function fieldToDrizzleType(field: Field, dialect?: 'postgres' | 'sqlite'): string;
|
|
7
7
|
declare function collectionToDrizzleSchema(collection: CollectionConfig, dialect?: 'postgres' | 'sqlite'): string;
|
package/dist/drizzle/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as DrizzleAdapter,b as collectionToDrizzleSchema,d as createDrizzleAdapter,a as fieldToDrizzleType}from'../chunk-
|
|
1
|
+
export{c as DrizzleAdapter,b as collectionToDrizzleSchema,d as createDrizzleAdapter,a as fieldToDrizzleType}from'../chunk-6NBZDW53.js';import'../chunk-JV4HJBXW.js';export{b as createDatabase,c as runMigrations,d as seedDefaultRoles}from'../chunk-ZAKYTBEN.js';export{a as PostgresAuthAdapter}from'../chunk-ZWDBPEXL.js';import'../chunk-47CXBWMA.js';import'../chunk-3TAUNYEM.js';import'../chunk-N5POANYV.js';import'../chunk-2HA6EKXX.js';import'../chunk-FLMUMPDE.js';import'../chunk-EML5FDUU.js';import'../chunk-HRAY65XH.js';import'../chunk-3NSZZCOJ.js';import'../chunk-SLMIYECU.js';import'../chunk-P6JITOFF.js';import'../chunk-7NH7H3WA.js';import'../chunk-JA44K75G.js';import'../chunk-TBHNE4VV.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
package/dist/fields/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkF2O4QO5N_cjs=require('../chunk-F2O4QO5N.cjs'),chunkKMFLHGD5_cjs=require('../chunk-KMFLHGD5.cjs');require('../chunk-73D2PNHD.cjs'),require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"ALL_FIELD_TYPES",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.r}});Object.defineProperty(exports,"COMPLEX_FIELD_TYPES",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.o}});Object.defineProperty(exports,"LAYOUT_FIELD_TYPES",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.q}});Object.defineProperty(exports,"PRIMITIVE_FIELD_TYPES",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.n}});Object.defineProperty(exports,"RELATIONAL_FIELD_TYPES",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.p}});Object.defineProperty(exports,"createRelationshipFieldConfig",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.s}});Object.defineProperty(exports,"isArrayField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.d}});Object.defineProperty(exports,"isBlocksField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.f}});Object.defineProperty(exports,"isEmbeddingField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.m}});Object.defineProperty(exports,"isGroupField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.e}});Object.defineProperty(exports,"isIconField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.l}});Object.defineProperty(exports,"isImageField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.h}});Object.defineProperty(exports,"isLayoutField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.k}});Object.defineProperty(exports,"isNumberField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.b}});Object.defineProperty(exports,"isRelationshipField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.c}});Object.defineProperty(exports,"isRichTextField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.i}});Object.defineProperty(exports,"isSelectField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.j}});Object.defineProperty(exports,"isTextField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.a}});Object.defineProperty(exports,"isUploadField",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.g}});Object.defineProperty(exports,"normalizeRichTextValue",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.u}});Object.defineProperty(exports,"renderRichText",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.v}});Object.defineProperty(exports,"richTextStyles",{enumerable:true,get:function(){return chunkF2O4QO5N_cjs.t}});Object.defineProperty(exports,"generateSEOFields",{enumerable:true,get:function(){return chunkKMFLHGD5_cjs.a}});
|
package/dist/fields/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field } from '../types-
|
|
2
|
-
export { A as ALL_FIELD_TYPES, a as ActionField, b as ArrayField, B as BaseField, c as Block, d as BlockAdmin, e as BlockImage, f as BlocksField, g as ButtonField, C as COMPLEX_FIELD_TYPES, h as CheckboxField, i as CodeField, j as CollapsibleField, k as ColorField, D as DateField, l as DeclarativeCondition, E as EmailField, m as
|
|
1
|
+
import { F as Field } from '../types-DxaK39ix.cjs';
|
|
2
|
+
export { A as ALL_FIELD_TYPES, a as ActionField, b as ArrayField, B as BaseField, c as Block, d as BlockAdmin, e as BlockImage, f as BlocksField, g as ButtonField, C as COMPLEX_FIELD_TYPES, h as CheckboxField, i as CodeField, j as CollapsibleField, k as ColorField, D as DateField, l as DeclarativeCondition, E as EmailField, m as EmbeddingField, n as FieldAccess, o as FieldAdmin, p as FieldType, G as GroupField, H as Hook, I as IconField, q as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, r as ListField, M as MarkdownField, N as NumberField, P as PRIMITIVE_FIELD_TYPES, s as PasswordField, R as RELATIONAL_FIELD_TYPES, t as RadioField, u as RelationshipField, v as RichTextBlock, w as RichTextField, x as RowField, S as SecretField, y as SelectField, T as TabsField, z as TextField, K as TextFieldVariant, O as TextareaField, U as UploadField, V as ValidateOptions, Q as createRelationshipFieldConfig, W as isArrayField, X as isBlocksField, Y as isEmbeddingField, Z as isGroupField, _ as isIconField, $ as isImageField, a0 as isLayoutField, a1 as isNumberField, a2 as isRelationshipField, a3 as isRichTextField, a4 as isSelectField, a5 as isTextField, a6 as isUploadField } from '../types-DxaK39ix.cjs';
|
|
3
3
|
export { n as normalizeRichTextValue, r as renderRichText, a as richTextStyles } from '../richtext-DrhORshE.cjs';
|
|
4
4
|
|
|
5
5
|
declare function generateSEOFields(): Field;
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field } from '../types-
|
|
2
|
-
export { A as ALL_FIELD_TYPES, a as ActionField, b as ArrayField, B as BaseField, c as Block, d as BlockAdmin, e as BlockImage, f as BlocksField, g as ButtonField, C as COMPLEX_FIELD_TYPES, h as CheckboxField, i as CodeField, j as CollapsibleField, k as ColorField, D as DateField, l as DeclarativeCondition, E as EmailField, m as
|
|
1
|
+
import { F as Field } from '../types-DxaK39ix.js';
|
|
2
|
+
export { A as ALL_FIELD_TYPES, a as ActionField, b as ArrayField, B as BaseField, c as Block, d as BlockAdmin, e as BlockImage, f as BlocksField, g as ButtonField, C as COMPLEX_FIELD_TYPES, h as CheckboxField, i as CodeField, j as CollapsibleField, k as ColorField, D as DateField, l as DeclarativeCondition, E as EmailField, m as EmbeddingField, n as FieldAccess, o as FieldAdmin, p as FieldType, G as GroupField, H as Hook, I as IconField, q as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, r as ListField, M as MarkdownField, N as NumberField, P as PRIMITIVE_FIELD_TYPES, s as PasswordField, R as RELATIONAL_FIELD_TYPES, t as RadioField, u as RelationshipField, v as RichTextBlock, w as RichTextField, x as RowField, S as SecretField, y as SelectField, T as TabsField, z as TextField, K as TextFieldVariant, O as TextareaField, U as UploadField, V as ValidateOptions, Q as createRelationshipFieldConfig, W as isArrayField, X as isBlocksField, Y as isEmbeddingField, Z as isGroupField, _ as isIconField, $ as isImageField, a0 as isLayoutField, a1 as isNumberField, a2 as isRelationshipField, a3 as isRichTextField, a4 as isSelectField, a5 as isTextField, a6 as isUploadField } from '../types-DxaK39ix.js';
|
|
3
3
|
export { n as normalizeRichTextValue, r as renderRichText, a as richTextStyles } from '../richtext-DrhORshE.js';
|
|
4
4
|
|
|
5
5
|
declare function generateSEOFields(): Field;
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{r as ALL_FIELD_TYPES,o as COMPLEX_FIELD_TYPES,q as LAYOUT_FIELD_TYPES,n as PRIMITIVE_FIELD_TYPES,p as RELATIONAL_FIELD_TYPES,s as createRelationshipFieldConfig,d as isArrayField,f as isBlocksField,m as isEmbeddingField,e as isGroupField,l as isIconField,h as isImageField,k as isLayoutField,b as isNumberField,c as isRelationshipField,i as isRichTextField,j as isSelectField,a as isTextField,g as isUploadField,u as normalizeRichTextValue,v as renderRichText,t as richTextStyles}from'../chunk-4BMWWGJN.js';export{a as generateSEOFields}from'../chunk-D6SDGHY6.js';import'../chunk-7MNDQU6K.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
package/dist/graphql/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
2
|
export { printSchema } from 'graphql';
|
|
3
|
-
import { B as BaseAdapter, i as User, R as Request } from '../types-
|
|
4
|
-
import { R as Registry } from '../index-
|
|
5
|
-
import '../types-
|
|
3
|
+
import { B as BaseAdapter, i as User, R as Request } from '../types-QglJ7PwT.cjs';
|
|
4
|
+
import { R as Registry } from '../index-Zrg3sZ6R.cjs';
|
|
5
|
+
import '../types-DxaK39ix.cjs';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
8
8
|
interface LoaderOptions {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
2
|
export { printSchema } from 'graphql';
|
|
3
|
-
import { B as BaseAdapter, i as User, R as Request } from '../types-
|
|
4
|
-
import { R as Registry } from '../index-
|
|
5
|
-
import '../types-
|
|
3
|
+
import { B as BaseAdapter, i as User, R as Request } from '../types-BCOhfwHC.js';
|
|
4
|
+
import { R as Registry } from '../index-NGnJpSgf.js';
|
|
5
|
+
import '../types-DxaK39ix.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
8
8
|
interface LoaderOptions {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-CORUQhY-.js';
|
|
2
|
+
import { F as Field } from './types-DROqAsr0.js';
|
|
3
|
+
import { ZodTypeAny } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface StorageProviderRegistration {
|
|
6
|
+
type: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
pluginName?: string;
|
|
9
|
+
configFields: Field[];
|
|
10
|
+
configKey?: string;
|
|
11
|
+
extractConfig: (storageConfig: StorageConfig, configKey: string) => any;
|
|
12
|
+
extractRawConfig: (config: any) => any;
|
|
13
|
+
factory: (config: any) => StorageProvider;
|
|
14
|
+
}
|
|
15
|
+
declare class StorageProviderRegistry {
|
|
16
|
+
private providers;
|
|
17
|
+
private providerToPlugin;
|
|
18
|
+
private disabledPlugins;
|
|
19
|
+
constructor();
|
|
20
|
+
private registerLocal;
|
|
21
|
+
private registerImgix;
|
|
22
|
+
private registerBunny;
|
|
23
|
+
private registerCloudflareR2;
|
|
24
|
+
private registerCloudflareS3;
|
|
25
|
+
register(registration: StorageProviderRegistration): void;
|
|
26
|
+
unregister(type: string): void;
|
|
27
|
+
get(type: string): StorageProviderRegistration | undefined;
|
|
28
|
+
getAll(): StorageProviderRegistration[];
|
|
29
|
+
getAllAvailable(isPluginEnabled?: (name: string) => boolean): StorageProviderRegistration[];
|
|
30
|
+
has(type: string): boolean;
|
|
31
|
+
resolve(type: string, storageConfig: StorageConfig): Promise<StorageProvider>;
|
|
32
|
+
resolveWithConfig(type: string, config: any): Promise<StorageProvider>;
|
|
33
|
+
getProviderPluginName(type: string): string | undefined;
|
|
34
|
+
getAllPluginNames(): string[];
|
|
35
|
+
setPluginEnabled(name: string, enabled: boolean): void;
|
|
36
|
+
isPluginEnabled(name: string): boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class Registry {
|
|
40
|
+
storageProviders: StorageProviderRegistry;
|
|
41
|
+
private collections;
|
|
42
|
+
private globals;
|
|
43
|
+
private plugins;
|
|
44
|
+
private schemaCache;
|
|
45
|
+
private initialized;
|
|
46
|
+
addCollection(config: CollectionConfig): void;
|
|
47
|
+
addCollections(configs: CollectionConfig[]): void;
|
|
48
|
+
getCollection(slug: string): CollectionConfig | undefined;
|
|
49
|
+
getCollections(): CollectionConfig[];
|
|
50
|
+
getCollectionSlugs(): string[];
|
|
51
|
+
hasCollection(slug: string): boolean;
|
|
52
|
+
removeCollection(slug: string): boolean;
|
|
53
|
+
addGlobal(config: GlobalConfig): void;
|
|
54
|
+
/**
|
|
55
|
+
* Add a global after the registry is already initialized.
|
|
56
|
+
* Only for internal use (e.g. storage settings form built at startup).
|
|
57
|
+
*/
|
|
58
|
+
addGlobalPostInit(config: GlobalConfig): void;
|
|
59
|
+
private _addGlobalUnsafe;
|
|
60
|
+
addGlobals(configs: GlobalConfig[]): void;
|
|
61
|
+
getGlobal(slug: string): GlobalConfig | undefined;
|
|
62
|
+
getGlobals(): GlobalConfig[];
|
|
63
|
+
getGlobalSlugs(): string[];
|
|
64
|
+
hasGlobal(slug: string): boolean;
|
|
65
|
+
removeGlobal(slug: string): boolean;
|
|
66
|
+
addPlugin(plugin: KyroPlugin): void;
|
|
67
|
+
getPlugins(): KyroPlugin[];
|
|
68
|
+
getZodSchema(slug: string): ZodTypeAny;
|
|
69
|
+
getCreateZodSchema(slug: string): ZodTypeAny;
|
|
70
|
+
getUpdateZodSchema(slug: string): ZodTypeAny;
|
|
71
|
+
getWhereZodSchema(slug: string): ZodTypeAny;
|
|
72
|
+
getFieldZodSchema(field: Field): ZodTypeAny;
|
|
73
|
+
private clearSchemaCache;
|
|
74
|
+
private applyFieldDefaults;
|
|
75
|
+
getFields(slug: string): Field[];
|
|
76
|
+
getFieldMap(slug: string): Map<string, Field>;
|
|
77
|
+
getVisibleFields(slug: string): Field[];
|
|
78
|
+
validate(): void;
|
|
79
|
+
init(kyroInstance?: any): Promise<void>;
|
|
80
|
+
isInitialized(): boolean;
|
|
81
|
+
getPaginationDefaults(slug: string): {
|
|
82
|
+
defaultLimit: number;
|
|
83
|
+
limits: number[];
|
|
84
|
+
};
|
|
85
|
+
getDefaultSort(slug: string): string;
|
|
86
|
+
getDefaultColumns(slug: string): string[];
|
|
87
|
+
getAdminTitle(slug: string): string;
|
|
88
|
+
getAdminLabel(slug: string): string;
|
|
89
|
+
getAdminGroup(slug: string): string | undefined;
|
|
90
|
+
getStats(): {
|
|
91
|
+
collections: number;
|
|
92
|
+
globals: number;
|
|
93
|
+
plugins: number;
|
|
94
|
+
fields: number;
|
|
95
|
+
};
|
|
96
|
+
toJSON(): {
|
|
97
|
+
collections: CollectionConfig[];
|
|
98
|
+
globals: GlobalConfig[];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
declare function getRegistry(): Registry;
|
|
102
|
+
declare function resetRegistry(): void;
|
|
103
|
+
declare function createRegistry(): Registry;
|
|
104
|
+
|
|
105
|
+
export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-
|
|
1
|
+
import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-DsF64Wrc.cjs';
|
|
2
2
|
import { F as Field } from './types-DlGSbh7I.cjs';
|
|
3
3
|
import { ZodTypeAny } from 'zod';
|
|
4
4
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-B5Qz1svz.cjs';
|
|
2
|
+
import { F as Field } from './types-DROqAsr0.cjs';
|
|
3
|
+
import { ZodTypeAny } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface StorageProviderRegistration {
|
|
6
|
+
type: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
pluginName?: string;
|
|
9
|
+
configFields: Field[];
|
|
10
|
+
configKey?: string;
|
|
11
|
+
extractConfig: (storageConfig: StorageConfig, configKey: string) => any;
|
|
12
|
+
extractRawConfig: (config: any) => any;
|
|
13
|
+
factory: (config: any) => StorageProvider;
|
|
14
|
+
}
|
|
15
|
+
declare class StorageProviderRegistry {
|
|
16
|
+
private providers;
|
|
17
|
+
private providerToPlugin;
|
|
18
|
+
private disabledPlugins;
|
|
19
|
+
constructor();
|
|
20
|
+
private registerLocal;
|
|
21
|
+
private registerImgix;
|
|
22
|
+
private registerBunny;
|
|
23
|
+
private registerCloudflareR2;
|
|
24
|
+
private registerCloudflareS3;
|
|
25
|
+
register(registration: StorageProviderRegistration): void;
|
|
26
|
+
unregister(type: string): void;
|
|
27
|
+
get(type: string): StorageProviderRegistration | undefined;
|
|
28
|
+
getAll(): StorageProviderRegistration[];
|
|
29
|
+
getAllAvailable(isPluginEnabled?: (name: string) => boolean): StorageProviderRegistration[];
|
|
30
|
+
has(type: string): boolean;
|
|
31
|
+
resolve(type: string, storageConfig: StorageConfig): Promise<StorageProvider>;
|
|
32
|
+
resolveWithConfig(type: string, config: any): Promise<StorageProvider>;
|
|
33
|
+
getProviderPluginName(type: string): string | undefined;
|
|
34
|
+
getAllPluginNames(): string[];
|
|
35
|
+
setPluginEnabled(name: string, enabled: boolean): void;
|
|
36
|
+
isPluginEnabled(name: string): boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class Registry {
|
|
40
|
+
storageProviders: StorageProviderRegistry;
|
|
41
|
+
private collections;
|
|
42
|
+
private globals;
|
|
43
|
+
private plugins;
|
|
44
|
+
private schemaCache;
|
|
45
|
+
private initialized;
|
|
46
|
+
addCollection(config: CollectionConfig): void;
|
|
47
|
+
addCollections(configs: CollectionConfig[]): void;
|
|
48
|
+
getCollection(slug: string): CollectionConfig | undefined;
|
|
49
|
+
getCollections(): CollectionConfig[];
|
|
50
|
+
getCollectionSlugs(): string[];
|
|
51
|
+
hasCollection(slug: string): boolean;
|
|
52
|
+
removeCollection(slug: string): boolean;
|
|
53
|
+
addGlobal(config: GlobalConfig): void;
|
|
54
|
+
/**
|
|
55
|
+
* Add a global after the registry is already initialized.
|
|
56
|
+
* Only for internal use (e.g. storage settings form built at startup).
|
|
57
|
+
*/
|
|
58
|
+
addGlobalPostInit(config: GlobalConfig): void;
|
|
59
|
+
private _addGlobalUnsafe;
|
|
60
|
+
addGlobals(configs: GlobalConfig[]): void;
|
|
61
|
+
getGlobal(slug: string): GlobalConfig | undefined;
|
|
62
|
+
getGlobals(): GlobalConfig[];
|
|
63
|
+
getGlobalSlugs(): string[];
|
|
64
|
+
hasGlobal(slug: string): boolean;
|
|
65
|
+
removeGlobal(slug: string): boolean;
|
|
66
|
+
addPlugin(plugin: KyroPlugin): void;
|
|
67
|
+
getPlugins(): KyroPlugin[];
|
|
68
|
+
getZodSchema(slug: string): ZodTypeAny;
|
|
69
|
+
getCreateZodSchema(slug: string): ZodTypeAny;
|
|
70
|
+
getUpdateZodSchema(slug: string): ZodTypeAny;
|
|
71
|
+
getWhereZodSchema(slug: string): ZodTypeAny;
|
|
72
|
+
getFieldZodSchema(field: Field): ZodTypeAny;
|
|
73
|
+
private clearSchemaCache;
|
|
74
|
+
private applyFieldDefaults;
|
|
75
|
+
getFields(slug: string): Field[];
|
|
76
|
+
getFieldMap(slug: string): Map<string, Field>;
|
|
77
|
+
getVisibleFields(slug: string): Field[];
|
|
78
|
+
validate(): void;
|
|
79
|
+
init(kyroInstance?: any): Promise<void>;
|
|
80
|
+
isInitialized(): boolean;
|
|
81
|
+
getPaginationDefaults(slug: string): {
|
|
82
|
+
defaultLimit: number;
|
|
83
|
+
limits: number[];
|
|
84
|
+
};
|
|
85
|
+
getDefaultSort(slug: string): string;
|
|
86
|
+
getDefaultColumns(slug: string): string[];
|
|
87
|
+
getAdminTitle(slug: string): string;
|
|
88
|
+
getAdminLabel(slug: string): string;
|
|
89
|
+
getAdminGroup(slug: string): string | undefined;
|
|
90
|
+
getStats(): {
|
|
91
|
+
collections: number;
|
|
92
|
+
globals: number;
|
|
93
|
+
plugins: number;
|
|
94
|
+
fields: number;
|
|
95
|
+
};
|
|
96
|
+
toJSON(): {
|
|
97
|
+
collections: CollectionConfig[];
|
|
98
|
+
globals: GlobalConfig[];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
declare function getRegistry(): Registry;
|
|
102
|
+
declare function resetRegistry(): void;
|
|
103
|
+
declare function createRegistry(): Registry;
|
|
104
|
+
|
|
105
|
+
export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { S as StorageConfig, a as StorageProvider, C as CollectionConfig, G as GlobalConfig, K as KyroPlugin } from './types-dEy5JxvN.js';
|
|
2
|
+
import { F as Field } from './types-Bii0bhUV.js';
|
|
3
|
+
import { ZodTypeAny } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface StorageProviderRegistration {
|
|
6
|
+
type: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
pluginName?: string;
|
|
9
|
+
configFields: Field[];
|
|
10
|
+
configKey?: string;
|
|
11
|
+
extractConfig: (storageConfig: StorageConfig, configKey: string) => any;
|
|
12
|
+
extractRawConfig: (config: any) => any;
|
|
13
|
+
factory: (config: any) => StorageProvider;
|
|
14
|
+
}
|
|
15
|
+
declare class StorageProviderRegistry {
|
|
16
|
+
private providers;
|
|
17
|
+
private providerToPlugin;
|
|
18
|
+
private disabledPlugins;
|
|
19
|
+
constructor();
|
|
20
|
+
private registerLocal;
|
|
21
|
+
private registerImgix;
|
|
22
|
+
private registerBunny;
|
|
23
|
+
private registerCloudflareR2;
|
|
24
|
+
private registerCloudflareS3;
|
|
25
|
+
register(registration: StorageProviderRegistration): void;
|
|
26
|
+
unregister(type: string): void;
|
|
27
|
+
get(type: string): StorageProviderRegistration | undefined;
|
|
28
|
+
getAll(): StorageProviderRegistration[];
|
|
29
|
+
getAllAvailable(isPluginEnabled?: (name: string) => boolean): StorageProviderRegistration[];
|
|
30
|
+
has(type: string): boolean;
|
|
31
|
+
resolve(type: string, storageConfig: StorageConfig): Promise<StorageProvider>;
|
|
32
|
+
resolveWithConfig(type: string, config: any): Promise<StorageProvider>;
|
|
33
|
+
getProviderPluginName(type: string): string | undefined;
|
|
34
|
+
getAllPluginNames(): string[];
|
|
35
|
+
setPluginEnabled(name: string, enabled: boolean): void;
|
|
36
|
+
isPluginEnabled(name: string): boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class Registry {
|
|
40
|
+
storageProviders: StorageProviderRegistry;
|
|
41
|
+
private collections;
|
|
42
|
+
private globals;
|
|
43
|
+
private plugins;
|
|
44
|
+
private schemaCache;
|
|
45
|
+
private initialized;
|
|
46
|
+
addCollection(config: CollectionConfig): void;
|
|
47
|
+
addCollections(configs: CollectionConfig[]): void;
|
|
48
|
+
getCollection(slug: string): CollectionConfig | undefined;
|
|
49
|
+
getCollections(): CollectionConfig[];
|
|
50
|
+
getCollectionSlugs(): string[];
|
|
51
|
+
hasCollection(slug: string): boolean;
|
|
52
|
+
removeCollection(slug: string): boolean;
|
|
53
|
+
addGlobal(config: GlobalConfig): void;
|
|
54
|
+
/**
|
|
55
|
+
* Add a global after the registry is already initialized.
|
|
56
|
+
* Only for internal use (e.g. storage settings form built at startup).
|
|
57
|
+
*/
|
|
58
|
+
addGlobalPostInit(config: GlobalConfig): void;
|
|
59
|
+
private _addGlobalUnsafe;
|
|
60
|
+
addGlobals(configs: GlobalConfig[]): void;
|
|
61
|
+
getGlobal(slug: string): GlobalConfig | undefined;
|
|
62
|
+
getGlobals(): GlobalConfig[];
|
|
63
|
+
getGlobalSlugs(): string[];
|
|
64
|
+
hasGlobal(slug: string): boolean;
|
|
65
|
+
removeGlobal(slug: string): boolean;
|
|
66
|
+
addPlugin(plugin: KyroPlugin): void;
|
|
67
|
+
getPlugins(): KyroPlugin[];
|
|
68
|
+
getZodSchema(slug: string): ZodTypeAny;
|
|
69
|
+
getCreateZodSchema(slug: string): ZodTypeAny;
|
|
70
|
+
getUpdateZodSchema(slug: string): ZodTypeAny;
|
|
71
|
+
getWhereZodSchema(slug: string): ZodTypeAny;
|
|
72
|
+
getFieldZodSchema(field: Field): ZodTypeAny;
|
|
73
|
+
private clearSchemaCache;
|
|
74
|
+
private applyFieldDefaults;
|
|
75
|
+
getFields(slug: string): Field[];
|
|
76
|
+
getFieldMap(slug: string): Map<string, Field>;
|
|
77
|
+
getVisibleFields(slug: string): Field[];
|
|
78
|
+
validate(): void;
|
|
79
|
+
init(kyroInstance?: any): Promise<void>;
|
|
80
|
+
isInitialized(): boolean;
|
|
81
|
+
getPaginationDefaults(slug: string): {
|
|
82
|
+
defaultLimit: number;
|
|
83
|
+
limits: number[];
|
|
84
|
+
};
|
|
85
|
+
getDefaultSort(slug: string): string;
|
|
86
|
+
getDefaultColumns(slug: string): string[];
|
|
87
|
+
getAdminTitle(slug: string): string;
|
|
88
|
+
getAdminLabel(slug: string): string;
|
|
89
|
+
getAdminGroup(slug: string): string | undefined;
|
|
90
|
+
getStats(): {
|
|
91
|
+
collections: number;
|
|
92
|
+
globals: number;
|
|
93
|
+
plugins: number;
|
|
94
|
+
fields: number;
|
|
95
|
+
};
|
|
96
|
+
toJSON(): {
|
|
97
|
+
collections: CollectionConfig[];
|
|
98
|
+
globals: GlobalConfig[];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
declare function getRegistry(): Registry;
|
|
102
|
+
declare function resetRegistry(): void;
|
|
103
|
+
declare function createRegistry(): Registry;
|
|
104
|
+
|
|
105
|
+
export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
|