@phtngyn/cms 0.2.0-beta.6 → 0.2.0-beta.8
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/CHANGELOG.md +1 -0
- package/README.md +7 -4
- package/package.json +1 -1
- package/src/ApplicationTypes.d.ts +1 -1
- package/src/{Configuration-JQ1qyaU0.js → Configuration-CMweD9bn.js} +3 -3
- package/src/{Configuration-JQ1qyaU0.js.map → Configuration-CMweD9bn.js.map} +1 -1
- package/src/Configuration.d.ts +1 -1
- package/src/Content.js +4 -4
- package/src/Content.js.map +1 -1
- package/src/{DocumentEngine-j6Vi7nQo.js → DocumentEngine-tYtwbBjr.js} +7 -7
- package/src/DocumentEngine-tYtwbBjr.js.map +1 -0
- package/src/{HttpPaths-c9nLZ9H2.js → HttpPaths-Be3vshPJ.js} +2 -3
- package/src/HttpPaths-Be3vshPJ.js.map +1 -0
- package/src/{I18n-zbqpWxki.d.ts → I18n-wxswIRyY.d.ts} +3 -2
- package/src/I18n.d.ts +1 -1
- package/src/Module.js +2 -13
- package/src/Module.js.map +1 -1
- package/src/{S3MediaObjects-BRuPQbxl.js → S3MediaObjects-BXfjaZOu.js} +20 -6
- package/src/S3MediaObjects-BXfjaZOu.js.map +1 -0
- package/src/cli.js +3 -3
- package/src/{dev-lifecycle-CExksm2R.js → dev-lifecycle-3I_pozUl.js} +8 -8
- package/src/dev-lifecycle-3I_pozUl.js.map +1 -0
- package/src/{installation-BoG8E3nJ.js → installation-DxqSSVbH.js} +11 -22
- package/src/installation-DxqSSVbH.js.map +1 -0
- package/src/internal/authoring-catalog.js +1 -1
- package/src/internal/authoring-metadata.js +1 -1
- package/src/internal/configuration.js +1 -1
- package/src/internal/dev-lifecycle.js +1 -1
- package/src/internal/document-model.js +3 -3
- package/src/internal/document-model.js.map +1 -1
- package/src/internal/i18n.js +2 -2
- package/src/internal/i18n.js.map +1 -1
- package/src/internal/studio-app.js +3 -3
- package/src/internal/studio-app.js.map +1 -1
- package/src/{metadata-UzZmjwxM.js → metadata-DN9_K6Yl.js} +87 -7
- package/src/metadata-DN9_K6Yl.js.map +1 -0
- package/src/runtime/delivery/plugin.js +7 -2
- package/src/runtime/delivery/plugin.js.map +1 -1
- package/src/runtime/delivery/useDocument.js +1 -1
- package/src/runtime/delivery/useDocumentQuery.js +1 -1
- package/src/runtime/forms/useCmsForm.js +1 -1
- package/src/runtime/i18n/translator.js +10 -3
- package/src/runtime/i18n/translator.js.map +1 -1
- package/src/runtime/i18n/useCmsI18n.d.ts +1 -1
- package/src/runtime/installation.js +1 -1
- package/src/runtime/plugin.js +1 -1
- package/src/runtime/preview/controller.js +3 -2
- package/src/runtime/preview/controller.js.map +1 -1
- package/src/runtime/preview/crypto.js +16 -0
- package/src/runtime/preview/crypto.js.map +1 -0
- package/src/runtime/preview/plugin.client.js +1 -1
- package/src/runtime/preview/store.js +1 -1
- package/src/runtime/sitemap.js +1 -1
- package/src/runtime/studio-app.js +1 -1
- package/src/runtime/studio-app.js.map +1 -1
- package/src/runtime/studio-document.js +46 -0
- package/src/runtime/studio-document.js.map +1 -0
- package/src/runtime/studio-entry.js +5 -22
- package/src/runtime/studio-entry.js.map +1 -1
- package/src/runtime/studio-navigation.js +2 -2
- package/src/runtime/studio-navigation.js.map +1 -1
- package/src/{store-PKKB8xa2.js → store-X1e1o_MF.js} +2 -2
- package/src/{store-PKKB8xa2.js.map → store-X1e1o_MF.js.map} +1 -1
- package/studio/{CreateDocumentDialog-DqvusuGU.js → CreateDocumentDialog-C4_JBo1w.js} +90 -90
- package/studio/{SelectMenu-BgikeouH.js → SelectMenu-wXqxymUw.js} +8626 -8496
- package/studio/host.js +4244 -4151
- package/src/DocumentEngine-j6Vi7nQo.js.map +0 -1
- package/src/HttpPaths-c9nLZ9H2.js.map +0 -1
- package/src/S3MediaObjects-BRuPQbxl.js.map +0 -1
- package/src/dev-lifecycle-CExksm2R.js.map +0 -1
- package/src/installation-BoG8E3nJ.js.map +0 -1
- package/src/metadata-UzZmjwxM.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { $ as e, Bt as t, Dt as n, Et as r, It as i, Nt as a, Pt as o, Q as s, Y as c, at as l, cn as u, dn as d, en as f, et as p, ht as m, mt as h, nt as g, on as _, q as ee, st as v, tt as y, wt as b } from "./editor-P2rB7Csp.js";
|
|
2
|
-
import { Ai as x,
|
|
2
|
+
import { Ai as x, Ar as te, F as ne, I as re, L as ie, Mr as S, Nr as C, O as w, P as T, Pa as E, fa as D, j as ae, ji as O, jr as k, ki as A, n as j, or as M, r as oe, sr as se, t as N, yr as ce, z as le } from "./SelectMenu-wXqxymUw.js";
|
|
3
3
|
//#region virtual:nuxt-ui-templates/ui/collapsible.ts
|
|
4
|
-
var
|
|
4
|
+
var P = { slots: {
|
|
5
5
|
root: "",
|
|
6
6
|
content: "data-[state=open]:animate-[collapsible-down_200ms_var(--ease-out)] data-[state=closed]:animate-[collapsible-up_200ms_var(--ease-out)] data-[state=closed]:overflow-hidden"
|
|
7
|
-
} },
|
|
7
|
+
} }, ue = {
|
|
8
8
|
__name: "Collapsible",
|
|
9
9
|
props: {
|
|
10
10
|
as: {
|
|
@@ -39,21 +39,21 @@ var N = { slots: {
|
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:open"],
|
|
41
41
|
setup(e, { emit: r }) {
|
|
42
|
-
let i = e, a = r, c = o(), d =
|
|
43
|
-
extend:
|
|
42
|
+
let i = e, a = r, c = o(), d = C("collapsible", i), f = D(), h = S(E(d, "as", "defaultOpen", "open", "disabled", "unmountOnHide"), a), g = s(() => k({
|
|
43
|
+
extend: P,
|
|
44
44
|
...f.ui?.collapsible || {}
|
|
45
45
|
})());
|
|
46
|
-
return (e, r) => (b(), p(_(
|
|
46
|
+
return (e, r) => (b(), p(_(O), m(_(h), {
|
|
47
47
|
"data-slot": "root",
|
|
48
48
|
class: g.value.root({ class: [_(d).ui?.root, _(d).class] })
|
|
49
49
|
}), {
|
|
50
|
-
default: t(({ open: r }) => [c.default ? (b(), p(_(
|
|
50
|
+
default: t(({ open: r }) => [c.default ? (b(), p(_(A), {
|
|
51
51
|
key: 0,
|
|
52
52
|
"as-child": ""
|
|
53
53
|
}, {
|
|
54
54
|
default: t(() => [n(e.$slots, "default", { open: r })]),
|
|
55
55
|
_: 2
|
|
56
|
-
}, 1024)) : y("", !0), l(_(
|
|
56
|
+
}, 1024)) : y("", !0), l(_(x), {
|
|
57
57
|
"data-slot": "content",
|
|
58
58
|
class: u(g.value.content({ class: _(d).ui?.content }))
|
|
59
59
|
}, {
|
|
@@ -63,19 +63,19 @@ var N = { slots: {
|
|
|
63
63
|
_: 3
|
|
64
64
|
}, 16, ["class"]));
|
|
65
65
|
}
|
|
66
|
-
},
|
|
66
|
+
}, de = { key: 2 }, fe = { class: "grid grid-flow-col auto-cols-fr overflow-x-auto rounded-md border border-default" }, pe = ["aria-pressed", "onClick"], me = { class: "block truncate" }, F = { key: 3 }, I = {
|
|
67
67
|
key: 4,
|
|
68
68
|
class: "overflow-hidden rounded-md border border-default bg-elevated/20"
|
|
69
|
-
},
|
|
69
|
+
}, L = {
|
|
70
70
|
type: "button",
|
|
71
71
|
class: "group flex w-full min-w-0 items-center gap-3 px-3 py-2.5 text-left transition-[background-color,transform] duration-150 ease-out hover:bg-elevated/50 active:scale-[0.99] motion-reduce:transition-none"
|
|
72
|
-
},
|
|
72
|
+
}, R = { class: "min-w-0 flex-1" }, he = { class: "block truncate text-xs text-muted" }, ge = { class: "shrink-0 text-xs font-medium text-muted group-hover:text-highlighted" }, _e = { class: "grid gap-4 border-t border-default px-3 py-3 sm:grid-cols-2" }, ve = {
|
|
73
73
|
key: 5,
|
|
74
74
|
class: "-mt-2 text-xs text-error"
|
|
75
|
-
},
|
|
75
|
+
}, ye = {
|
|
76
76
|
key: 6,
|
|
77
77
|
class: "-mt-2 text-xs text-error"
|
|
78
|
-
},
|
|
78
|
+
}, be = { class: "flex w-full justify-end gap-2" }, z = "__top_level__", B = /* @__PURE__ */ v({
|
|
79
79
|
__name: "CreateDocumentDialog",
|
|
80
80
|
props: /*@__PURE__*/ h({
|
|
81
81
|
catalog: {},
|
|
@@ -86,10 +86,10 @@ var N = { slots: {
|
|
|
86
86
|
}),
|
|
87
87
|
emits: /*@__PURE__*/ h(["close"], ["update:open"]),
|
|
88
88
|
setup(n, { emit: o }) {
|
|
89
|
-
let m = o, h = a(n, "open"), v =
|
|
89
|
+
let m = o, h = a(n, "open"), v = T(), x = v.bootstrap.documents, S = x.types.filter((e) => e.canCreate), C = (x.locales?.locales ?? []).map((e) => ({
|
|
90
90
|
label: $(e),
|
|
91
91
|
value: String(e)
|
|
92
|
-
})),
|
|
92
|
+
})), E = f(""), D = f(!1), O = f(""), k = f(""), A = f(!1), P = f(""), B = f(z), V = f(x.locales?.defaultLocale ?? ""), H = f(!1), U = s(() => {
|
|
93
93
|
let e = S.map((e) => ({
|
|
94
94
|
collection: e.collection,
|
|
95
95
|
key: `entry:${e.collection}`,
|
|
@@ -98,14 +98,14 @@ var N = { slots: {
|
|
|
98
98
|
type: e,
|
|
99
99
|
urlHint: e.routes.entry.replace(/:[a-z][\w.]*\*?/giu, "…")
|
|
100
100
|
}));
|
|
101
|
-
return [...S.filter((e) => !n.catalog.entries.value.some((t) => t.document.collection === e.collection && t.document.locale === (
|
|
102
|
-
let t =
|
|
101
|
+
return [...S.filter((e) => !n.catalog.entries.value.some((t) => t.document.collection === e.collection && t.document.locale === (V.value || void 0) && t.document.placement.kind === "home")).flatMap((e) => {
|
|
102
|
+
let t = j(x, {
|
|
103
103
|
collection: e.collection,
|
|
104
|
-
locale:
|
|
104
|
+
locale: V.value || void 0,
|
|
105
105
|
placement: { kind: "home" },
|
|
106
106
|
title: "Home"
|
|
107
107
|
});
|
|
108
|
-
return
|
|
108
|
+
return M(t) || n.catalog.entries.value.some((e) => e.document.path === t.success.path) ? [] : [{
|
|
109
109
|
collection: e.collection,
|
|
110
110
|
key: `home:${e.collection}`,
|
|
111
111
|
kind: "home",
|
|
@@ -114,39 +114,39 @@ var N = { slots: {
|
|
|
114
114
|
urlHint: t.success.path
|
|
115
115
|
}];
|
|
116
116
|
}), ...e];
|
|
117
|
-
}),
|
|
118
|
-
let e = [
|
|
119
|
-
return C.length && e.unshift($(
|
|
120
|
-
}),
|
|
121
|
-
if (
|
|
122
|
-
let e =
|
|
117
|
+
}), W = s(() => U.value.find((e) => e.key === P.value)), G = s(() => n.catalog.entries.value.find((e) => e.document.collection === W.value?.collection && e.document.locale === (V.value || void 0) && e.document.placement.kind === "home")), xe = s(() => U.value.length > 1 ? "Choose a page type and add a title." : "Add a title to get started."), Se = s(() => W.value?.kind === "home" ? "Homepage" : B.value === z || B.value === G.value?.document.id ? "Top level" : n.catalog.byId(B.value)?.document.title ?? "Selected location"), Ce = s(() => {
|
|
118
|
+
let e = [Se.value];
|
|
119
|
+
return C.length && e.unshift($(V.value)), e.join(" · ");
|
|
120
|
+
}), K = s(() => {
|
|
121
|
+
if (W.value?.kind === "home") return { kind: "home" };
|
|
122
|
+
let e = B.value === z ? G.value?.document.id : B.value;
|
|
123
123
|
return e ? {
|
|
124
124
|
kind: "entry",
|
|
125
125
|
parentDocumentId: e,
|
|
126
|
-
slug:
|
|
126
|
+
slug: k.value
|
|
127
127
|
} : void 0;
|
|
128
|
-
}),
|
|
129
|
-
let e =
|
|
130
|
-
if (!e || !t || e.kind === "entry" && !
|
|
128
|
+
}), q = s(() => {
|
|
129
|
+
let e = W.value, t = K.value;
|
|
130
|
+
if (!e || !t || e.kind === "entry" && !k.value.trim()) return;
|
|
131
131
|
let r = {
|
|
132
132
|
collection: e.collection,
|
|
133
133
|
placement: t,
|
|
134
|
-
title:
|
|
134
|
+
title: O.value || "Untitled"
|
|
135
135
|
}, i = r.placement.kind === "entry" ? n.catalog.byId(r.placement.parentDocumentId)?.document.path : void 0;
|
|
136
|
-
return
|
|
136
|
+
return j(x, V.value ? {
|
|
137
137
|
...r,
|
|
138
|
-
locale:
|
|
138
|
+
locale: V.value
|
|
139
139
|
} : r, i);
|
|
140
|
-
}), q = s(() => {
|
|
141
|
-
let e = K.value;
|
|
142
|
-
return e && M(e) ? e.success : void 0;
|
|
143
140
|
}), J = s(() => {
|
|
144
|
-
let e =
|
|
145
|
-
return e &&
|
|
146
|
-
}), Y = s(() =>
|
|
147
|
-
let e =
|
|
141
|
+
let e = q.value;
|
|
142
|
+
return e && se(e) ? e.success : void 0;
|
|
143
|
+
}), Y = s(() => {
|
|
144
|
+
let e = q.value;
|
|
145
|
+
return e && M(e) ? e.failure : "";
|
|
146
|
+
}), X = s(() => J.value && n.catalog.entries.value.some((e) => e.document.path === J.value?.path)), we = s(() => {
|
|
147
|
+
let e = W.value;
|
|
148
148
|
if (!e || e.kind === "home" || !e.type.hierarchy) return [];
|
|
149
|
-
let t = n.catalog.entries.value.flatMap((t) => t.document.collection !== e.collection || t.document.locale !== (
|
|
149
|
+
let t = n.catalog.entries.value.flatMap((t) => t.document.collection !== e.collection || t.document.locale !== (V.value || void 0) || t.document.placement.kind === "home" ? [] : [{
|
|
150
150
|
description: String(t.document.path),
|
|
151
151
|
label: t.document.title,
|
|
152
152
|
value: String(t.document.id)
|
|
@@ -158,42 +158,42 @@ var N = { slots: {
|
|
|
158
158
|
}), [{
|
|
159
159
|
description: "Add this page directly below the homepage.",
|
|
160
160
|
label: "Top level",
|
|
161
|
-
value:
|
|
161
|
+
value: z
|
|
162
162
|
}, ...t];
|
|
163
|
-
}), Z = s(() => !!
|
|
164
|
-
i(
|
|
165
|
-
|
|
166
|
-
}), i(
|
|
167
|
-
|
|
163
|
+
}), Z = s(() => !!O.value.trim() && !!W.value && !!J.value && !X.value);
|
|
164
|
+
i(O, (e) => {
|
|
165
|
+
A.value || (k.value = oe(e));
|
|
166
|
+
}), i(P, () => B.value = z, { flush: "sync" }), i(V, () => {
|
|
167
|
+
B.value = z, W.value || (P.value = Q());
|
|
168
168
|
}, { flush: "sync" }), i(h, (e) => {
|
|
169
|
-
e && (
|
|
169
|
+
e && (E.value = "", O.value = "", k.value = "", A.value = !1, H.value = !1, V.value = n.context?.locale ?? x.locales?.defaultLocale ?? "", P.value = n.context?.collection ? `entry:${n.context.collection}` : Q(), B.value = n.context?.parent === G.value?.document.id ? z : n.context?.parent || z, n.context?.slug && (k.value = n.context.slug, A.value = !0));
|
|
170
170
|
}, { immediate: !0 });
|
|
171
171
|
async function Te() {
|
|
172
|
-
let e =
|
|
173
|
-
if (Z.value && e && t && !
|
|
174
|
-
|
|
172
|
+
let e = W.value, t = K.value;
|
|
173
|
+
if (Z.value && e && t && !D.value) {
|
|
174
|
+
D.value = !0, E.value = "";
|
|
175
175
|
try {
|
|
176
176
|
let r = {
|
|
177
177
|
collection: e.collection,
|
|
178
178
|
placement: t,
|
|
179
|
-
title:
|
|
180
|
-
}, i = await v.gateway.documents.create(
|
|
179
|
+
title: O.value
|
|
180
|
+
}, i = await v.gateway.documents.create(V.value ? {
|
|
181
181
|
...r,
|
|
182
|
-
locale:
|
|
182
|
+
locale: V.value
|
|
183
183
|
} : r);
|
|
184
184
|
await n.catalog.refresh(!0);
|
|
185
185
|
let a = n.catalog.byId(i.documentId);
|
|
186
186
|
if (!a) throw Error("The page was created but could not be opened.");
|
|
187
187
|
m("close", a.document.id);
|
|
188
188
|
} catch (e) {
|
|
189
|
-
|
|
189
|
+
E.value = le(e);
|
|
190
190
|
} finally {
|
|
191
|
-
|
|
191
|
+
D.value = !1;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
function Q() {
|
|
196
|
-
return
|
|
196
|
+
return U.value[0]?.key ?? "";
|
|
197
197
|
}
|
|
198
198
|
function $(e) {
|
|
199
199
|
try {
|
|
@@ -203,12 +203,12 @@ var N = { slots: {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
return (n, i) => {
|
|
206
|
-
let a =
|
|
207
|
-
return b(), p(
|
|
206
|
+
let a = ie, o = ne, s = re, f = te, m = w, v = N, x = ue, S = ce, T = ae;
|
|
207
|
+
return b(), p(T, {
|
|
208
208
|
open: h.value,
|
|
209
209
|
"onUpdate:open": i[7] ||= (e) => h.value = e,
|
|
210
210
|
title: "Create page",
|
|
211
|
-
description:
|
|
211
|
+
description: xe.value,
|
|
212
212
|
ui: { content: "max-w-lg" }
|
|
213
213
|
}, {
|
|
214
214
|
body: t(() => [e("form", {
|
|
@@ -216,66 +216,66 @@ var N = { slots: {
|
|
|
216
216
|
class: "space-y-4",
|
|
217
217
|
onSubmit: ee(Te, ["prevent"])
|
|
218
218
|
}, [
|
|
219
|
-
|
|
219
|
+
E.value ? (b(), p(a, {
|
|
220
220
|
key: 0,
|
|
221
|
-
description:
|
|
221
|
+
description: E.value,
|
|
222
222
|
color: "error",
|
|
223
223
|
variant: "subtle"
|
|
224
224
|
}, null, 8, ["description"])) : y("", !0),
|
|
225
|
-
|
|
225
|
+
U.value.length ? U.value.length > 1 ? (b(), g("fieldset", de, [i[8] ||= e("legend", { class: "mb-2 text-sm font-medium text-highlighted" }, "Page type", -1), e("div", fe, [(b(!0), g(c, null, r(U.value, (t) => (b(), g("button", {
|
|
226
226
|
key: t.key,
|
|
227
227
|
type: "button",
|
|
228
|
-
"aria-pressed": t.key ===
|
|
229
|
-
class: u(["min-w-28 border-l border-default px-3 py-2 text-center text-sm transition-[color,background-color,transform] duration-150 ease-out first:border-l-0 active:scale-[0.98] motion-reduce:transition-none", t.key ===
|
|
230
|
-
onClick: (e) =>
|
|
231
|
-
}, [e("span",
|
|
228
|
+
"aria-pressed": t.key === P.value,
|
|
229
|
+
class: u(["min-w-28 border-l border-default px-3 py-2 text-center text-sm transition-[color,background-color,transform] duration-150 ease-out first:border-l-0 active:scale-[0.98] motion-reduce:transition-none", t.key === P.value ? "bg-muted font-medium text-highlighted" : "bg-default text-muted hover:bg-muted/50 hover:text-highlighted"]),
|
|
230
|
+
onClick: (e) => P.value = t.key
|
|
231
|
+
}, [e("span", me, d(t.label), 1)], 10, pe))), 128))])])) : y("", !0) : (b(), p(a, {
|
|
232
232
|
key: 1,
|
|
233
233
|
title: "Document creation is not configured",
|
|
234
234
|
description: "A developer needs to make at least one collection creatable in Studio.",
|
|
235
235
|
color: "warning",
|
|
236
236
|
variant: "subtle"
|
|
237
237
|
})),
|
|
238
|
-
|
|
238
|
+
W.value ? (b(), g("div", F, [l(s, {
|
|
239
239
|
label: "Title",
|
|
240
240
|
required: ""
|
|
241
241
|
}, {
|
|
242
242
|
default: t(() => [l(o, {
|
|
243
|
-
modelValue:
|
|
244
|
-
"onUpdate:modelValue": i[0] ||= (e) =>
|
|
243
|
+
modelValue: O.value,
|
|
244
|
+
"onUpdate:modelValue": i[0] ||= (e) => O.value = e,
|
|
245
245
|
autofocus: "",
|
|
246
246
|
placeholder: "About us",
|
|
247
247
|
class: "w-full"
|
|
248
248
|
}, null, 8, ["modelValue"])]),
|
|
249
249
|
_: 1
|
|
250
250
|
})])) : y("", !0),
|
|
251
|
-
|
|
252
|
-
open:
|
|
253
|
-
"onUpdate:open": i[5] ||= (e) =>
|
|
251
|
+
W.value ? (b(), g("div", I, [l(x, {
|
|
252
|
+
open: H.value,
|
|
253
|
+
"onUpdate:open": i[5] ||= (e) => H.value = e
|
|
254
254
|
}, {
|
|
255
|
-
content: t(() => [e("div",
|
|
255
|
+
content: t(() => [e("div", _e, [
|
|
256
256
|
_(C).length ? (b(), p(s, {
|
|
257
257
|
key: 0,
|
|
258
258
|
label: "Language"
|
|
259
259
|
}, {
|
|
260
260
|
default: t(() => [l(m, {
|
|
261
|
-
modelValue:
|
|
262
|
-
"onUpdate:modelValue": i[1] ||= (e) =>
|
|
261
|
+
modelValue: V.value,
|
|
262
|
+
"onUpdate:modelValue": i[1] ||= (e) => V.value = e,
|
|
263
263
|
items: _(C),
|
|
264
264
|
"value-key": "value",
|
|
265
265
|
class: "w-full"
|
|
266
266
|
}, null, 8, ["modelValue", "items"])]),
|
|
267
267
|
_: 1
|
|
268
268
|
})) : y("", !0),
|
|
269
|
-
|
|
269
|
+
W.value.kind === "entry" && W.value.type.hierarchy ? (b(), p(s, {
|
|
270
270
|
key: 1,
|
|
271
271
|
label: "Location",
|
|
272
272
|
class: u(_(C).length ? "" : "sm:col-span-2")
|
|
273
273
|
}, {
|
|
274
274
|
default: t(() => [l(v, {
|
|
275
|
-
modelValue:
|
|
276
|
-
"onUpdate:modelValue": i[2] ||= (e) =>
|
|
275
|
+
modelValue: B.value,
|
|
276
|
+
"onUpdate:modelValue": i[2] ||= (e) => B.value = e,
|
|
277
277
|
"aria-label": "Location",
|
|
278
|
-
items:
|
|
278
|
+
items: we.value,
|
|
279
279
|
"value-key": "value",
|
|
280
280
|
"filter-fields": ["label", "description"],
|
|
281
281
|
"search-input": { placeholder: "Search pages…" },
|
|
@@ -283,7 +283,7 @@ var N = { slots: {
|
|
|
283
283
|
}, null, 8, ["modelValue", "items"])]),
|
|
284
284
|
_: 1
|
|
285
285
|
}, 8, ["class"])) : y("", !0),
|
|
286
|
-
|
|
286
|
+
W.value.kind === "entry" ? (b(), p(s, {
|
|
287
287
|
key: 2,
|
|
288
288
|
label: "Page address",
|
|
289
289
|
description: "The final part of this page's web address.",
|
|
@@ -291,27 +291,27 @@ var N = { slots: {
|
|
|
291
291
|
required: ""
|
|
292
292
|
}, {
|
|
293
293
|
default: t(() => [l(o, {
|
|
294
|
-
modelValue:
|
|
295
|
-
"onUpdate:modelValue": [i[3] ||= (e) =>
|
|
294
|
+
modelValue: k.value,
|
|
295
|
+
"onUpdate:modelValue": [i[3] ||= (e) => k.value = e, i[4] ||= (e) => A.value = !0],
|
|
296
296
|
placeholder: "about-us",
|
|
297
297
|
class: "w-full"
|
|
298
298
|
}, null, 8, ["modelValue"])]),
|
|
299
299
|
_: 1
|
|
300
300
|
})) : y("", !0)
|
|
301
301
|
])]),
|
|
302
|
-
default: t(() => [e("button",
|
|
303
|
-
e("span",
|
|
304
|
-
e("span",
|
|
302
|
+
default: t(() => [e("button", L, [
|
|
303
|
+
e("span", R, [e("span", he, d(Ce.value), 1), e("span", { class: u(["mt-0.5 block truncate font-mono text-xs", X.value || Y.value ? "text-error" : "text-highlighted"]) }, d(J.value?.path || W.value.urlHint), 3)]),
|
|
304
|
+
e("span", ge, d(H.value ? "Done" : "Edit details"), 1),
|
|
305
305
|
l(f, {
|
|
306
306
|
name: "i-lucide-chevron-down",
|
|
307
|
-
class: u(["size-3.5 shrink-0 text-dimmed transition-transform duration-150 ease-out motion-reduce:transition-none",
|
|
307
|
+
class: u(["size-3.5 shrink-0 text-dimmed transition-transform duration-150 ease-out motion-reduce:transition-none", H.value ? "rotate-180" : ""])
|
|
308
308
|
}, null, 8, ["class"])
|
|
309
309
|
])]),
|
|
310
310
|
_: 1
|
|
311
311
|
}, 8, ["open"])])) : y("", !0),
|
|
312
|
-
|
|
312
|
+
X.value ? (b(), g("p", ve, "This page address is already in use.")) : Y.value ? (b(), g("p", ye, d(Y.value), 1)) : y("", !0)
|
|
313
313
|
], 32)]),
|
|
314
|
-
footer: t(() => [e("div",
|
|
314
|
+
footer: t(() => [e("div", be, [l(S, {
|
|
315
315
|
color: "neutral",
|
|
316
316
|
variant: "ghost",
|
|
317
317
|
label: "Cancel",
|
|
@@ -323,7 +323,7 @@ var N = { slots: {
|
|
|
323
323
|
color: "neutral",
|
|
324
324
|
label: "Create page",
|
|
325
325
|
class: "transition-transform duration-150 ease-out active:scale-[0.97] motion-reduce:transition-none",
|
|
326
|
-
loading:
|
|
326
|
+
loading: D.value,
|
|
327
327
|
disabled: !Z.value
|
|
328
328
|
}, null, 8, ["loading", "disabled"])])]),
|
|
329
329
|
_: 1
|
|
@@ -332,4 +332,4 @@ var N = { slots: {
|
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
//#endregion
|
|
335
|
-
export {
|
|
335
|
+
export { B as default };
|