@micacms/editor-ui 0.2.0 → 0.2.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/dist/assets/ChangesView-vaAxTqsV.js +7 -0
- package/dist/assets/ChangesView-vaAxTqsV.js.map +1 -0
- package/dist/assets/{CollectionView-CIccDFfw.js → CollectionView-D9WLbqSZ.js} +2 -2
- package/dist/assets/{CollectionView-CIccDFfw.js.map → CollectionView-D9WLbqSZ.js.map} +1 -1
- package/dist/assets/{ConfirmDialog.vue_vue_type_script_setup_true_lang-Fml6E0E6.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-XwTu9vH_.js} +2 -2
- package/dist/assets/{ConfirmDialog.vue_vue_type_script_setup_true_lang-Fml6E0E6.js.map → ConfirmDialog.vue_vue_type_script_setup_true_lang-XwTu9vH_.js.map} +1 -1
- package/dist/assets/{DashboardView-4pZUadIz.js → DashboardView-BltT4kYe.js} +2 -2
- package/dist/assets/{DashboardView-4pZUadIz.js.map → DashboardView-BltT4kYe.js.map} +1 -1
- package/dist/assets/{EntryView-CQi6YXUu.js → EntryView-CJe3KppU.js} +2 -2
- package/dist/assets/{EntryView-CQi6YXUu.js.map → EntryView-CJe3KppU.js.map} +1 -1
- package/dist/assets/{LoginView-Dv13IpFY.js → LoginView-Cif8mF1w.js} +2 -2
- package/dist/assets/{LoginView-Dv13IpFY.js.map → LoginView-Cif8mF1w.js.map} +1 -1
- package/dist/assets/{MediaView-Dt4yoGnD.js → MediaView-Cqqm7JtP.js} +2 -2
- package/dist/assets/{MediaView-Dt4yoGnD.js.map → MediaView-Cqqm7JtP.js.map} +1 -1
- package/dist/assets/{NotFoundView-Cc_VGwBY.js → NotFoundView-B5GK2_TR.js} +2 -2
- package/dist/assets/{NotFoundView-Cc_VGwBY.js.map → NotFoundView-B5GK2_TR.js.map} +1 -1
- package/dist/assets/{ObjectField-Da0UtKTb.js → ObjectField-Bk9_hysq.js} +2 -2
- package/dist/assets/{ObjectField-Da0UtKTb.js.map → ObjectField-Bk9_hysq.js.map} +1 -1
- package/dist/assets/{PageHeader.vue_vue_type_script_setup_true_lang-COWZEHDz.js → PageHeader.vue_vue_type_script_setup_true_lang-B10dWbKQ.js} +2 -2
- package/dist/assets/{PageHeader.vue_vue_type_script_setup_true_lang-COWZEHDz.js.map → PageHeader.vue_vue_type_script_setup_true_lang-B10dWbKQ.js.map} +1 -1
- package/dist/assets/{RepeaterField-DJDdoQm6.js → RepeaterField-B0caC5tW.js} +2 -2
- package/dist/assets/{RepeaterField-DJDdoQm6.js.map → RepeaterField-B0caC5tW.js.map} +1 -1
- package/dist/assets/{SingletonView-Co8aaJIy.js → SingletonView-BQnE2LGb.js} +2 -2
- package/dist/assets/{SingletonView-Co8aaJIy.js.map → SingletonView-BQnE2LGb.js.map} +1 -1
- package/dist/assets/{SystemView-CUIAxj3j.js → SystemView-Ca_luUZE.js} +2 -2
- package/dist/assets/{SystemView-CUIAxj3j.js.map → SystemView-Ca_luUZE.js.map} +1 -1
- package/dist/assets/{arrow-right-DwawkdlZ.js → arrow-right-CRc1EdYX.js} +2 -2
- package/dist/assets/{arrow-right-DwawkdlZ.js.map → arrow-right-CRc1EdYX.js.map} +1 -1
- package/dist/assets/{arrow-up-C8oJjG99.js → arrow-up-Bvv-t4E4.js} +2 -2
- package/dist/assets/{arrow-up-C8oJjG99.js.map → arrow-up-Bvv-t4E4.js.map} +1 -1
- package/dist/assets/{chevron-down-BaA7Bc4y.js → chevron-down-D6etqIvD.js} +2 -2
- package/dist/assets/{chevron-down-BaA7Bc4y.js.map → chevron-down-D6etqIvD.js.map} +1 -1
- package/dist/assets/{index-CDFABwhE.js → index-ByBMMOql.js} +3 -3
- package/dist/assets/{index-CDFABwhE.js.map → index-ByBMMOql.js.map} +1 -1
- package/dist/assets/{plus-BSdnG3GG.js → plus-BqgcP5r8.js} +2 -2
- package/dist/assets/{plus-BSdnG3GG.js.map → plus-BqgcP5r8.js.map} +1 -1
- package/dist/assets/{useField-BEdDcExS.js → useField-Dc-2hvX0.js} +2 -2
- package/dist/assets/{useField-BEdDcExS.js.map → useField-Dc-2hvX0.js.map} +1 -1
- package/dist/assets/{useUnsavedChanges-F3fdXjIL.js → useUnsavedChanges-5Jic8gaT.js} +33 -33
- package/dist/assets/useUnsavedChanges-5Jic8gaT.js.map +1 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/ChangesView-CyQiOMWc.js +0 -7
- package/dist/assets/ChangesView-CyQiOMWc.js.map +0 -1
- package/dist/assets/useUnsavedChanges-F3fdXjIL.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{D as e}from"./index-
|
|
1
|
+
import{D as e}from"./index-ByBMMOql.js";/**
|
|
2
2
|
* @license @lucide/vue v1.37.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],t=e("plus",o);export{t as P};
|
|
7
|
-
//# sourceMappingURL=plus-
|
|
7
|
+
//# sourceMappingURL=plus-BqgcP5r8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plus-
|
|
1
|
+
{"version":3,"file":"plus-BqgcP5r8.js","sources":["../../../../common/temp/node_modules/.pnpm/@lucide+vue@1.37.0_vue@3.5.42_typescript@5.9.3_/node_modules/@lucide/vue/dist/esm/icons/plus.mjs"],"sourcesContent":["/**\n * @license @lucide/vue v1.37.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }]\n];\nconst Plus = createLucideIcon(\"plus\", __iconNode);\n\nexport { __iconNode, Plus as default };\n//# sourceMappingURL=plus.mjs.map\n"],"names":["__iconNode","Plus","createLucideIcon"],"mappings":"wCAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,CAC3C,EACMC,EAAOC,EAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as l}from"./index-
|
|
2
|
-
//# sourceMappingURL=useField-
|
|
1
|
+
import{g as l}from"./index-ByBMMOql.js";let f=0;function g(e){const n=`field-${++f}`,s=`${n}-hint`,o=`${n}-error`,i=l(()=>e.field.label??p(h(e.path))),r=l(()=>{var a;const t=(a=e.issues)==null?void 0:a.find(d=>d.path===e.path);return(t==null?void 0:t.message)??null}),u=l(()=>{const t=[e.field.description?s:null,r.value?o:null].filter(Boolean);return t.length>0?t.join(" "):void 0});return{inputId:n,label:i,error:r,describedBy:u,hintId:s,errorId:o}}function h(e){return e.split(".").at(-1)??e}function p(e){const n=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ");return n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()}const c={full:"col-span-12",half:"col-span-12 sm:col-span-6",third:"col-span-12 sm:col-span-4"};function $(e){return c[e.width??"full"]??c.full}export{p as h,g as u,$ as w};
|
|
2
|
+
//# sourceMappingURL=useField-Dc-2hvX0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useField-
|
|
1
|
+
{"version":3,"file":"useField-Dc-2hvX0.js","sources":["../../src/composables/useField.ts"],"sourcesContent":["/**\n * Shared plumbing for every field component: a stable input id, the label to\n * show, and the server-side issue that belongs to this exact path.\n */\n\nimport { computed, type ComputedRef } from \"vue\";\n\nimport type { AnyField, FieldIssue } from \"@micacms/core\";\n\nlet sequence = 0;\n\nexport interface FieldProps {\n field: AnyField;\n /** Dotted path, e.g. `seo.metaTitle` or `facts.2.label`. */\n path: string;\n /** Flat issue list for the whole form; each field picks out its own. */\n issues?: FieldIssue[];\n disabled?: boolean;\n}\n\nexport interface UseField {\n inputId: string;\n label: ComputedRef<string>;\n error: ComputedRef<string | null>;\n describedBy: ComputedRef<string | undefined>;\n hintId: string;\n errorId: string;\n}\n\nexport function useField(props: FieldProps): UseField {\n const inputId = `field-${++sequence}`;\n const hintId = `${inputId}-hint`;\n const errorId = `${inputId}-error`;\n\n const label = computed(() => props.field.label ?? humanise(lastSegment(props.path)));\n\n const error = computed(() => {\n const match = props.issues?.find((issue) => issue.path === props.path);\n return match?.message ?? null;\n });\n\n const describedBy = computed(() => {\n const parts = [props.field.description ? hintId : null, error.value ? errorId : null].filter(\n Boolean,\n );\n return parts.length > 0 ? parts.join(\" \") : undefined;\n });\n\n return { inputId, label, error, describedBy, hintId, errorId };\n}\n\nfunction lastSegment(path: string): string {\n return path.split(\".\").at(-1) ?? path;\n}\n\n/** `metaTitle` → `Meta title`, used when a field declares no label. */\nexport function humanise(key: string): string {\n const spaced = key.replace(/([a-z0-9])([A-Z])/g, \"$1 $2\").replace(/[_-]+/g, \" \");\n return spaced.charAt(0).toUpperCase() + spaced.slice(1).toLowerCase();\n}\n\nconst WIDTHS: Record<string, string> = {\n full: \"col-span-12\",\n half: \"col-span-12 sm:col-span-6\",\n third: \"col-span-12 sm:col-span-4\",\n};\n\nexport function widthClass(field: AnyField): string {\n return WIDTHS[field.width ?? \"full\"] ?? WIDTHS.full!;\n}\n"],"names":["sequence","useField","props","inputId","hintId","errorId","label","computed","humanise","lastSegment","error","match","_a","issue","describedBy","parts","path","key","spaced","WIDTHS","widthClass","field"],"mappings":"wCASA,IAAIA,EAAW,EAoBR,SAASC,EAASC,EAA6B,CACpD,MAAMC,EAAU,SAAS,EAAEH,CAAQ,GAC7BI,EAAS,GAAGD,CAAO,QACnBE,EAAU,GAAGF,CAAO,SAEpBG,EAAQC,EAAS,IAAML,EAAM,MAAM,OAASM,EAASC,EAAYP,EAAM,IAAI,CAAC,CAAC,EAE7EQ,EAAQH,EAAS,IAAM,OAC3B,MAAMI,GAAQC,EAAAV,EAAM,SAAN,YAAAU,EAAc,KAAMC,GAAUA,EAAM,OAASX,EAAM,MACjE,OAAOS,GAAA,YAAAA,EAAO,UAAW,IAC3B,CAAC,EAEKG,EAAcP,EAAS,IAAM,CACjC,MAAMQ,EAAQ,CAACb,EAAM,MAAM,YAAcE,EAAS,KAAMM,EAAM,MAAQL,EAAU,IAAI,EAAE,OACpF,OAAA,EAEF,OAAOU,EAAM,OAAS,EAAIA,EAAM,KAAK,GAAG,EAAI,MAC9C,CAAC,EAED,MAAO,CAAE,QAAAZ,EAAS,MAAAG,EAAO,MAAAI,EAAO,YAAAI,EAAa,OAAAV,EAAQ,QAAAC,CAAA,CACvD,CAEA,SAASI,EAAYO,EAAsB,CACzC,OAAOA,EAAK,MAAM,GAAG,EAAE,GAAG,EAAE,GAAKA,CACnC,CAGO,SAASR,EAASS,EAAqB,CAC5C,MAAMC,EAASD,EAAI,QAAQ,qBAAsB,OAAO,EAAE,QAAQ,SAAU,GAAG,EAC/E,OAAOC,EAAO,OAAO,CAAC,EAAE,cAAgBA,EAAO,MAAM,CAAC,EAAE,YAAA,CAC1D,CAEA,MAAMC,EAAiC,CACrC,KAAM,cACN,KAAM,4BACN,MAAO,2BACT,EAEO,SAASC,EAAWC,EAAyB,CAClD,OAAOF,EAAOE,EAAM,OAAS,MAAM,GAAKF,EAAO,IACjD"}
|