@feedmepos/mf-miniprogram-v2 0.2.1-dev.4 → 0.2.1-dev.5
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/{ControlPlaneView-DIgQAp50.js → ControlPlaneView-CJvNqpGC.js} +3524 -3487
- package/dist/{ModuleCenterView-COiId-oS.js → ModuleCenterView-CYZJ97HU.js} +48 -51
- package/dist/{ModuleDetailView-DMJyx_U4.js → ModuleDetailView-CZ_2C-zj.js} +1 -1
- package/dist/app.js +4 -4
- package/dist/package.json +1 -1
- package/dist/style.css +1 -1
- package/dist/{ModuleEmptyState.vue_vue_type_script_setup_true_lang-BLo_cDbw.js → useModuleCatalog-CYsxGYLA.js} +57 -58
- package/package.json +1 -1
|
@@ -1,20 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent as x, resolveComponent as p, openBlock as u, createElementBlock as h, createVNode as E, createElementVNode as P, normalizeClass as F, toDisplayString as v, createCommentVNode as g, createBlock as L, shallowReadonly as r, ref as s } from "vue";
|
|
2
2
|
import { h as M, g as w, e as y, p as $ } from "./AppTabs.vue_vue_type_script_setup_true_lang-C-UOi7TE.js";
|
|
3
|
-
const
|
|
3
|
+
const I = { class: "flex min-h-0 flex-1 flex-col items-center justify-center gap-8 p-24 text-center" }, T = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "m-0 max-w-[46ch] fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
|
|
6
|
+
}, V = /* @__PURE__ */ x({
|
|
7
|
+
__name: "ModuleEmptyState",
|
|
8
|
+
props: {
|
|
9
|
+
icon: {},
|
|
10
|
+
title: {},
|
|
11
|
+
message: {},
|
|
12
|
+
actionLabel: {},
|
|
13
|
+
tone: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["action"],
|
|
16
|
+
setup(e) {
|
|
17
|
+
return (t, o) => {
|
|
18
|
+
const n = p("FmIcon"), l = p("FmButton");
|
|
19
|
+
return u(), h("div", I, [
|
|
20
|
+
E(n, {
|
|
21
|
+
name: e.icon,
|
|
22
|
+
size: "xl",
|
|
23
|
+
color: e.tone === "error" ? "typo-warning" : "neutral-gray-300"
|
|
24
|
+
}, null, 8, ["name", "color"]),
|
|
25
|
+
P("p", {
|
|
26
|
+
class: F(["m-0 fm-typo-en-body-md-600", e.tone === "error" ? "text-fm-color-typo-warning" : "text-fm-color-typo-secondary"])
|
|
27
|
+
}, v(e.title), 3),
|
|
28
|
+
e.message ? (u(), h("p", T, v(e.message), 1)) : g("", !0),
|
|
29
|
+
e.actionLabel ? (u(), L(l, {
|
|
30
|
+
key: 1,
|
|
31
|
+
size: "md",
|
|
32
|
+
variant: "secondary",
|
|
33
|
+
label: e.actionLabel,
|
|
34
|
+
onClick: o[0] || (o[0] = (c) => t.$emit("action"))
|
|
35
|
+
}, null, 8, ["label"])) : g("", !0)
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}), b = ["tier", "slot"];
|
|
4
40
|
function C(e, t) {
|
|
5
|
-
return t === "tier" ? [e.category] :
|
|
41
|
+
return t === "tier" ? [e.category] : e.slot ? [e.slot] : [];
|
|
6
42
|
}
|
|
7
|
-
function
|
|
43
|
+
function j(e) {
|
|
8
44
|
return b.map((t) => ({
|
|
9
45
|
kind: t,
|
|
10
46
|
values: [...new Set(e.flatMap((o) => C(o, t)))].sort((o, n) => o.localeCompare(n))
|
|
11
47
|
})).filter((t) => t.values.length > 0);
|
|
12
48
|
}
|
|
13
|
-
function
|
|
49
|
+
function z(e, t) {
|
|
14
50
|
const o = e.filter((n) => !(n.kind === t.kind && n.value === t.value));
|
|
15
51
|
return o.length === e.length ? [...e, t] : o;
|
|
16
52
|
}
|
|
17
|
-
function
|
|
53
|
+
function B(e, t) {
|
|
18
54
|
return b.every((o) => {
|
|
19
55
|
const n = t.filter((c) => c.kind === o);
|
|
20
56
|
if (!n.length) return !0;
|
|
@@ -22,22 +58,22 @@ function I(e, t) {
|
|
|
22
58
|
return n.some((c) => l.includes(c.value));
|
|
23
59
|
});
|
|
24
60
|
}
|
|
25
|
-
function
|
|
61
|
+
function R(e, t, o = []) {
|
|
26
62
|
const n = t.trim().toLowerCase();
|
|
27
|
-
return e.filter((l) =>
|
|
63
|
+
return e.filter((l) => B(l, o) ? n ? [l.name, l.description ?? "", l.slot ?? "", ...l.labels ?? []].join(" ").toLowerCase().includes(n) : !0 : !1);
|
|
28
64
|
}
|
|
29
|
-
function
|
|
65
|
+
function G(e) {
|
|
30
66
|
const t = e.slot ? ` It is published to fill the ${e.slot} slot.` : "";
|
|
31
67
|
return `Use the block-swap skill. Put the library module ${e.id} on the page, replacing whatever currently fills its slot.${t} Its source is already in this workspace at src/components/library/${e.name}/. Copy that directory to src/components/blocks/${e.name}/ and point the view there — the library directory is delivered per workspace and is not committed, so a view importing from it builds in the workspace and fails the release build. Tell me which page you changed.`;
|
|
32
68
|
}
|
|
33
|
-
function
|
|
69
|
+
function O(e, t) {
|
|
34
70
|
if (!e.includes("</head>")) return e;
|
|
35
71
|
const o = JSON.stringify(t).replace(/</g, "\\u003c");
|
|
36
72
|
return e.replace("</head>", `<script>window.__FM_PREVIEW_MODULE__=${o}<\/script></head>`);
|
|
37
73
|
}
|
|
38
74
|
const i = s(null), m = s(null), d = s(!1), k = s(null), f = s(null);
|
|
39
75
|
let a = null;
|
|
40
|
-
async function
|
|
76
|
+
async function D() {
|
|
41
77
|
m.value = null, d.value = !1;
|
|
42
78
|
try {
|
|
43
79
|
const e = await M(w.componentLibraryCatalog());
|
|
@@ -47,7 +83,7 @@ async function T() {
|
|
|
47
83
|
i.value = [], t.includes("no component library has been published") ? d.value = !0 : m.value = t || "Could not load the module library.";
|
|
48
84
|
}
|
|
49
85
|
}
|
|
50
|
-
async function
|
|
86
|
+
async function N() {
|
|
51
87
|
f.value = null;
|
|
52
88
|
try {
|
|
53
89
|
k.value = await $(w.componentLibraryPreview());
|
|
@@ -55,9 +91,9 @@ async function B() {
|
|
|
55
91
|
f.value = y(e) || "Could not load the preview document.";
|
|
56
92
|
}
|
|
57
93
|
}
|
|
58
|
-
function
|
|
94
|
+
function U() {
|
|
59
95
|
function e(o = !1) {
|
|
60
|
-
return !o && (i.value !== null || a) ? a ?? Promise.resolve() : (a = Promise.all([
|
|
96
|
+
return !o && (i.value !== null || a) ? a ?? Promise.resolve() : (a = Promise.all([D(), N()]).then(() => {
|
|
61
97
|
}).finally(() => {
|
|
62
98
|
a = null;
|
|
63
99
|
}), a);
|
|
@@ -76,49 +112,12 @@ function O() {
|
|
|
76
112
|
find: t
|
|
77
113
|
};
|
|
78
114
|
}
|
|
79
|
-
const D = { class: "flex min-h-0 flex-1 flex-col items-center justify-center gap-8 p-24 text-center" }, N = {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: "m-0 max-w-[46ch] fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
|
|
82
|
-
}, U = /* @__PURE__ */ x({
|
|
83
|
-
__name: "ModuleEmptyState",
|
|
84
|
-
props: {
|
|
85
|
-
icon: {},
|
|
86
|
-
title: {},
|
|
87
|
-
message: {},
|
|
88
|
-
actionLabel: {},
|
|
89
|
-
tone: {}
|
|
90
|
-
},
|
|
91
|
-
emits: ["action"],
|
|
92
|
-
setup(e) {
|
|
93
|
-
return (t, o) => {
|
|
94
|
-
const n = p("FmIcon"), l = p("FmButton");
|
|
95
|
-
return u(), h("div", D, [
|
|
96
|
-
E(n, {
|
|
97
|
-
name: e.icon,
|
|
98
|
-
size: "xl",
|
|
99
|
-
color: e.tone === "error" ? "typo-warning" : "neutral-gray-300"
|
|
100
|
-
}, null, 8, ["name", "color"]),
|
|
101
|
-
P("p", {
|
|
102
|
-
class: F(["m-0 fm-typo-en-body-md-600", e.tone === "error" ? "text-fm-color-typo-warning" : "text-fm-color-typo-secondary"])
|
|
103
|
-
}, v(e.title), 3),
|
|
104
|
-
e.message ? (u(), h("p", N, v(e.message), 1)) : g("", !0),
|
|
105
|
-
e.actionLabel ? (u(), L(l, {
|
|
106
|
-
key: 1,
|
|
107
|
-
size: "md",
|
|
108
|
-
variant: "secondary",
|
|
109
|
-
label: e.actionLabel,
|
|
110
|
-
onClick: o[0] || (o[0] = (c) => t.$emit("action"))
|
|
111
|
-
}, null, 8, ["label"])) : g("", !0)
|
|
112
|
-
]);
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
115
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
V as _,
|
|
117
|
+
j as c,
|
|
118
|
+
R as f,
|
|
119
|
+
O as i,
|
|
120
|
+
G as m,
|
|
121
|
+
z as t,
|
|
122
|
+
U as u
|
|
124
123
|
};
|