@feedmepos/mf-miniprogram-v2 0.2.2-dev.2 → 0.2.2-dev.21
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/App-BdvPLQMC.js +213 -0
- package/dist/AppTemplatePicker-CNJ6kIJk.js +237 -0
- package/dist/BrandFontPicker-kQKWf1hL.js +241 -0
- package/dist/BrandKitView-RaUWE69b.js +249 -0
- package/dist/{ControlPlaneView-DmhLvgWt.js → ControlPlaneView-l_gDDBtb.js} +8854 -8140
- package/dist/EcosystemView-CBEL5PT2.js +186 -0
- package/dist/{LegacyWorkspaceEntry-7DvIosoj.js → LegacyWorkspaceEntry-lEMtmdIe.js} +1 -1
- package/dist/MobileProjectsView-BruZHfdq.js +312 -0
- package/dist/{ModuleCenterView-Dqp-2hbL.js → ModuleCenterView-DI6Pakkr.js} +34 -34
- package/dist/{ModuleDetailView-cpQ_UfS9.js → ModuleDetailView-DteTTb-3.js} +49 -49
- package/dist/{PagesView-BHo_fnWa.js → PagesView-BYzldeqE.js} +1 -1
- package/dist/{PortalSettingsView-CkW-avwg.js → PortalSettingsView-Bl4z9cFG.js} +4 -4
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +30 -0
- package/dist/TemplateCenterView-DNjVytwE.js +364 -0
- package/dist/{WorkspaceEntryView-ZdXuMQoJ.js → WorkspaceEntryView-BIumdrty.js} +1 -1
- package/dist/app.js +27 -10
- package/dist/{controlPlane-wUT1G_Gr.js → controlPlane-sXaC6pAh.js} +9 -9
- package/dist/{index-BDHUHtRw.js → index-CIJWcl_6.js} +25 -15
- package/dist/package.json +2 -1
- package/dist/{portalContext-CTVzkJV7.js → portalContext-BFTX5VVx.js} +2 -2
- package/dist/routes-D6BQSP4i.js +81 -0
- package/dist/style.css +1 -1
- package/dist/templatePickerFlag-BIYWgnaS.js +59 -0
- package/dist/useBrandKit-CkdPQRE-.js +1020 -0
- package/dist/{useModuleCatalog-CD5N246F.js → useModuleCatalog-Bk-gRmBb.js} +3 -3
- package/package.json +2 -1
- package/dist/App-D7vZDj-a.js +0 -213
- package/dist/BrandKitView-B8t8RkHr.js +0 -221
- package/dist/EcosystemView--S4hk_t4.js +0 -232
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +0 -26
- package/dist/localPreference-DneUpUrQ.js +0 -34
- package/dist/routes-L0ady_Wy.js +0 -53
- package/dist/useBrandKit-CpyR2j6m.js +0 -924
package/dist/app.js
CHANGED
|
@@ -1,39 +1,45 @@
|
|
|
1
1
|
import { defineAsyncComponent as t } from "vue";
|
|
2
2
|
const o = [
|
|
3
|
+
{
|
|
4
|
+
path: "/platforms/mobile",
|
|
5
|
+
name: "miniprogram-v2-mobile-projects",
|
|
6
|
+
meta: { title: "Mobile" },
|
|
7
|
+
component: () => import("./MobileProjectsView-BruZHfdq.js")
|
|
8
|
+
},
|
|
3
9
|
{
|
|
4
10
|
path: "/",
|
|
5
11
|
name: "miniprogram-v2-ecosystem",
|
|
6
12
|
meta: { title: "Ecosystem" },
|
|
7
13
|
beforeEnter: (e) => ["workspace", "releases", "sessions"].includes(String(e.query.view)) ? { name: "miniprogram-v2-control", query: e.query } : !0,
|
|
8
|
-
component: () => import("./EcosystemView
|
|
14
|
+
component: () => import("./EcosystemView-CBEL5PT2.js")
|
|
9
15
|
},
|
|
10
16
|
{
|
|
11
17
|
path: "/workspace",
|
|
12
18
|
name: "miniprogram-v2-control",
|
|
13
|
-
component: () => import("./WorkspaceEntryView-
|
|
19
|
+
component: () => import("./WorkspaceEntryView-BIumdrty.js")
|
|
14
20
|
},
|
|
15
21
|
{
|
|
16
22
|
path: "/p/:projectId/:view(workspace|releases|sessions)?",
|
|
17
23
|
name: "miniprogram-v2-project",
|
|
18
|
-
component: () => import("./ControlPlaneView-
|
|
24
|
+
component: () => import("./ControlPlaneView-l_gDDBtb.js")
|
|
19
25
|
},
|
|
20
26
|
{
|
|
21
27
|
path: "/brand-kit",
|
|
22
28
|
name: "miniprogram-v2-brand-kit",
|
|
23
29
|
meta: { title: "Brand Kit" },
|
|
24
|
-
component: () => import("./BrandKitView-
|
|
30
|
+
component: () => import("./BrandKitView-RaUWE69b.js")
|
|
25
31
|
},
|
|
26
32
|
{
|
|
27
33
|
path: "/pages",
|
|
28
34
|
name: "miniprogram-v2-pages",
|
|
29
35
|
meta: { title: "Pages" },
|
|
30
|
-
component: () => import("./PagesView-
|
|
36
|
+
component: () => import("./PagesView-BYzldeqE.js")
|
|
31
37
|
},
|
|
32
38
|
{
|
|
33
39
|
path: "/settings",
|
|
34
40
|
name: "miniprogram-v2-settings",
|
|
35
41
|
meta: { title: "Settings" },
|
|
36
|
-
component: () => import("./PortalSettingsView-
|
|
42
|
+
component: () => import("./PortalSettingsView-Bl4z9cFG.js")
|
|
37
43
|
},
|
|
38
44
|
...["tablet", "kiosk"].map((e) => ({
|
|
39
45
|
path: `/platforms/${e}`,
|
|
@@ -47,7 +53,7 @@ const o = [
|
|
|
47
53
|
path: "/modules",
|
|
48
54
|
name: "miniprogram-v2-module-center",
|
|
49
55
|
meta: { title: "Module library" },
|
|
50
|
-
component: () => import("./ModuleCenterView-
|
|
56
|
+
component: () => import("./ModuleCenterView-DI6Pakkr.js")
|
|
51
57
|
},
|
|
52
58
|
{
|
|
53
59
|
// Keyed by the module's directory name, which is what the catalog, the
|
|
@@ -55,16 +61,27 @@ const o = [
|
|
|
55
61
|
path: "/modules/:name",
|
|
56
62
|
name: "miniprogram-v2-module-detail",
|
|
57
63
|
meta: { title: "Module library" },
|
|
58
|
-
component: () => import("./ModuleDetailView-
|
|
64
|
+
component: () => import("./ModuleDetailView-DteTTb-3.js")
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
// Internal-only: linked from the main nav (App.vue), but only once
|
|
68
|
+
// `useIsPlatformAdmin()` resolves true — a non-admin who still guesses the
|
|
69
|
+
// URL is caught by the `beforeEach` guard in `./index.ts`, which checks
|
|
70
|
+
// `meta.requiresAdmin` and sends them to the same place an unmatched URL
|
|
71
|
+
// goes, below.
|
|
72
|
+
path: "/internal/template-center",
|
|
73
|
+
name: "miniprogram-v2-template-center",
|
|
74
|
+
meta: { title: "Template library", requiresAdmin: !0 },
|
|
75
|
+
component: () => import("./TemplateCenterView-DNjVytwE.js")
|
|
59
76
|
},
|
|
60
77
|
{
|
|
61
78
|
path: "/:pathMatch(.*)*",
|
|
62
79
|
redirect: (e) => ({ name: "miniprogram-v2-ecosystem", query: e.query, params: {} })
|
|
63
80
|
}
|
|
64
|
-
], r = {}, a = t(() => import("./App-
|
|
81
|
+
], r = {}, a = t(() => import("./App-BdvPLQMC.js")), i = t(() => import("./LegacyWorkspaceEntry-lEMtmdIe.js"));
|
|
65
82
|
export {
|
|
66
83
|
a as FmApp,
|
|
67
|
-
|
|
84
|
+
i as MiniprogramWorkspace,
|
|
68
85
|
r as i18nMessages,
|
|
69
86
|
o as routes
|
|
70
87
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as f, e as d, D as m } from "./index-
|
|
1
|
+
import { a as f, e as d, D as m } from "./index-CIJWcl_6.js";
|
|
2
2
|
import { useCoreStore as a, FeedMeAuth as p } from "@feedmepos/mf-common";
|
|
3
3
|
const h = [
|
|
4
4
|
"AE",
|
|
@@ -126,15 +126,15 @@ async function I(e, n = {}) {
|
|
|
126
126
|
}
|
|
127
127
|
export {
|
|
128
128
|
T as C,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
$ as a,
|
|
130
|
+
x as b,
|
|
131
|
+
b as c,
|
|
132
|
+
P as d,
|
|
133
133
|
F as e,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
y as f,
|
|
135
|
+
E as g,
|
|
136
|
+
u as h,
|
|
137
|
+
C as i,
|
|
138
138
|
D as j,
|
|
139
139
|
k,
|
|
140
140
|
i as l,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c = "69cde0740c0106001ca83dff", s = "0000000074656d706c617465", t = {
|
|
2
2
|
dev: {
|
|
3
3
|
env: "dev",
|
|
4
4
|
liveDomain: "feedmedev.vip",
|
|
@@ -18,29 +18,39 @@ const a = "69cde0740c0106001ca83dff", i = {
|
|
|
18
18
|
v1Origin: "https://brand.feedme.vip"
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function o(e) {
|
|
22
22
|
return e === "dev" || e === "prod";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
if (!
|
|
24
|
+
function v(e) {
|
|
25
|
+
if (!o(e))
|
|
26
26
|
throw new Error(`MINIPROGRAM_ENV must be 'dev' or 'prod', got ${JSON.stringify(e)}`);
|
|
27
|
-
return
|
|
27
|
+
return t[e];
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function f(e) {
|
|
30
30
|
const r = e.toLowerCase().replace(/^fmmf:/, "");
|
|
31
31
|
return r === "prod" || r === "production" ? "prod" : "dev";
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
function
|
|
35
|
-
return
|
|
33
|
+
const a = /^[a-f0-9]{24}$/;
|
|
34
|
+
function d(e) {
|
|
35
|
+
return a.test(e);
|
|
36
|
+
}
|
|
37
|
+
function g(e = crypto.randomUUID()) {
|
|
38
|
+
const r = m("prj", e, 24);
|
|
39
|
+
return r.length === 27 ? r : r.padEnd(27, "0");
|
|
36
40
|
}
|
|
37
|
-
function
|
|
38
|
-
if (!
|
|
41
|
+
function u(e) {
|
|
42
|
+
if (!d(e)) throw new Error(`Invalid business id: ${e}`);
|
|
39
43
|
return `prj${e}`;
|
|
40
44
|
}
|
|
45
|
+
function m(e, r, n) {
|
|
46
|
+
const i = r.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replaceAll("-", "").slice(0, n);
|
|
47
|
+
return `${e}${i || Date.now().toString(36)}`;
|
|
48
|
+
}
|
|
41
49
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
c as D,
|
|
51
|
+
s as T,
|
|
52
|
+
v as a,
|
|
53
|
+
f as e,
|
|
54
|
+
u as l,
|
|
55
|
+
g as m
|
|
46
56
|
};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-miniprogram-v2",
|
|
3
|
-
"version": "0.2.2-dev.
|
|
3
|
+
"version": "0.2.2-dev.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"vue-router": "^4.6.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
+
"@tanstack/vue-table": "8.21.3",
|
|
55
56
|
"@tsconfig/node20": "^20.1.6",
|
|
56
57
|
"@types/node": "^24.13.2",
|
|
57
58
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as b } from "./routes-
|
|
1
|
+
import { a as b } from "./routes-D6BQSP4i.js";
|
|
2
2
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
3
|
-
import {
|
|
3
|
+
import { c as g, e as h } from "./controlPlane-sXaC6pAh.js";
|
|
4
4
|
import { provide as y, computed as f, ref as c, watch as C, onScopeDispose as w, inject as x } from "vue";
|
|
5
5
|
function P() {
|
|
6
6
|
const e = d(), r = f(() => {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const t = (e, s) => `/api/businesses/${e}/projects/${s}`, r = {
|
|
2
|
+
projects: (e) => `/api/businesses/${e}/projects`,
|
|
3
|
+
portalContext: (e) => `/api/businesses/${e}/portal-context`,
|
|
4
|
+
project: (e, s) => t(e, s),
|
|
5
|
+
provision: (e, s) => `${t(e, s)}/provision`,
|
|
6
|
+
refreshSlug: (e, s) => `${t(e, s)}/refresh-slug`,
|
|
7
|
+
sessions: (e, s) => `${t(e, s)}/sessions`,
|
|
8
|
+
session: (e, s, i) => `${t(e, s)}/sessions/${i}`,
|
|
9
|
+
messages: (e, s, i) => `${r.session(e, s, i)}/messages`,
|
|
10
|
+
startStatus: (e, s, i) => `${r.session(e, s, i)}/start-status`,
|
|
11
|
+
changes: (e, s, i, a = !1) => `${r.session(e, s, i)}/changes${a ? "?refresh=1" : ""}`,
|
|
12
|
+
checkpoints: (e, s, i) => `${r.session(e, s, i)}/checkpoints`,
|
|
13
|
+
aiBillingPreflight: (e, s, i) => `${r.session(e, s, i)}/ai-billing/preflight`,
|
|
14
|
+
restoreCheckpoint: (e, s, i, a) => `${r.checkpoints(e, s, i)}/${a}/restore`,
|
|
15
|
+
previewBridgeTicket: (e, s, i) => `${r.session(e, s, i)}/preview-bridge/ticket`,
|
|
16
|
+
previewBridgeSocket: (e, s, i) => `${r.session(e, s, i)}/preview-bridge/socket`,
|
|
17
|
+
uploads: (e, s, i, a = "") => `${r.session(e, s, i)}/uploads${a ? `?${a}` : ""}`,
|
|
18
|
+
archive: (e, s, i) => `${r.session(e, s, i)}/archive`,
|
|
19
|
+
commit: (e, s, i) => `${r.session(e, s, i)}/commit`,
|
|
20
|
+
resume: (e, s, i) => `${r.session(e, s, i)}/resume`,
|
|
21
|
+
restartPreview: (e, s, i) => `${r.session(e, s, i)}/restart-preview`,
|
|
22
|
+
fork: (e, s, i) => `${r.session(e, s, i)}/fork`,
|
|
23
|
+
flushEvents: (e, s, i) => `${r.session(e, s, i)}/events/flush`,
|
|
24
|
+
revertTurn: (e, s, i) => `${r.session(e, s, i)}/turns/revert`,
|
|
25
|
+
unrevertTurn: (e, s, i) => `${r.session(e, s, i)}/turns/unrevert`,
|
|
26
|
+
releases: (e, s) => `${t(e, s)}/releases`,
|
|
27
|
+
/** Internal-admin only. Extracts a new restaurant style out of a session's
|
|
28
|
+
* verified checkpoint and, once confirmed, opens a PR against this repo. */
|
|
29
|
+
publishAsTemplate: (e, s) => `${t(e, s)}/publish-as-template`,
|
|
30
|
+
publishRelease: (e, s, i) => `${r.releases(e, s)}/${i}/publish`,
|
|
31
|
+
releasePreviewUrl: (e, s, i) => `${r.releases(e, s)}/${i}/preview-url`,
|
|
32
|
+
rollbackToRelease: (e, s, i) => `${t(e, s)}/rollback-to-release/${i}`,
|
|
33
|
+
rollbackToV1: (e, s) => `${t(e, s)}/rollback-to-v1`,
|
|
34
|
+
start: (e, s, i) => {
|
|
35
|
+
const a = new URLSearchParams();
|
|
36
|
+
e && a.set("businessId", e), s && a.set("projectId", s), i && a.set("sessionId", i);
|
|
37
|
+
const o = a.toString();
|
|
38
|
+
return `/api/start${o ? `?${o}` : ""}`;
|
|
39
|
+
},
|
|
40
|
+
opencode: (e = "") => `/api/opencode${e ? `/${e.replace(/^\/+/, "")}` : ""}`,
|
|
41
|
+
/** The shared component library's catalog. Deliberately not under a
|
|
42
|
+
* business/project path: the library belongs to no business, and the
|
|
43
|
+
* module centre is not inside a workspace. */
|
|
44
|
+
componentLibraryCatalog: () => "/api/component-library/catalog",
|
|
45
|
+
/** The self-contained preview document the module centre frames. Fetched with
|
|
46
|
+
* the portal's bearer and assigned to an iframe's `srcdoc`, never used as an
|
|
47
|
+
* `<iframe src>` — a navigation request carries no Authorization header,
|
|
48
|
+
* which is what a signed URL would otherwise exist to work around. */
|
|
49
|
+
componentLibraryPreview: () => "/api/component-library/preview",
|
|
50
|
+
/** The application templates this environment can provision, for the portal's
|
|
51
|
+
* picker. Not under a business/project path: the answer is a property of
|
|
52
|
+
* the environment, and it is needed BEFORE a project exists. */
|
|
53
|
+
appTemplates: () => "/api/app-templates",
|
|
54
|
+
/** Whether the caller is an internal admin — for the portal to decide whether to
|
|
55
|
+
* show internal-only entry points such as the Template Center. The real
|
|
56
|
+
* enforcement is on every admin route itself; this is a UI convenience. */
|
|
57
|
+
adminWhoami: () => "/api/admin/whoami",
|
|
58
|
+
/** Template Center: fork an existing physical template directory into a
|
|
59
|
+
* brand-new one, as a PR against this repo (see `template-fork.ts`). Not
|
|
60
|
+
* project-scoped — a physical template belongs to no business. */
|
|
61
|
+
forkAppTemplate: () => "/api/admin/app-templates/fork",
|
|
62
|
+
/** Template Center: physical templates whose "create template" PR is still
|
|
63
|
+
* open — read live from GitHub, not a stored list, so a row disappears the
|
|
64
|
+
* moment its PR merges or is closed. */
|
|
65
|
+
pendingTemplateForks: () => "/api/admin/app-templates/pending-forks",
|
|
66
|
+
/** Template Center: merge a pending template fork's PR directly from the
|
|
67
|
+
* "In review" list, without leaving the portal. Refuses to act on
|
|
68
|
+
* anything that is not itself a pending template-fork PR. */
|
|
69
|
+
mergePendingTemplateFork: (e) => `/api/admin/app-templates/pending-forks/${e}/merge`,
|
|
70
|
+
/** Template Center: close a pending template fork's PR without merging and
|
|
71
|
+
* delete its branch — the "In review" list's reject action. */
|
|
72
|
+
rejectPendingTemplateFork: (e) => `/api/admin/app-templates/pending-forks/${e}/reject`,
|
|
73
|
+
/** Template Center: find-or-create the template-editing project a
|
|
74
|
+
* physical template edits through — the same chat/preview/checkpoint
|
|
75
|
+
* workspace a merchant project gets, pointed at `templates/<id>/` in this
|
|
76
|
+
* repo instead. Internal-admin only. */
|
|
77
|
+
appTemplateEditingProject: (e) => `/api/admin/app-templates/${e}/editing-project`
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
r as a
|
|
81
|
+
};
|