@feedmepos/mf-miniprogram-v2 0.2.2-dev.18 → 0.2.2-dev.19

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.
Files changed (26) hide show
  1. package/dist/{App-CR0BBDaq.js → App-Dj20Jl8B.js} +2 -2
  2. package/dist/{AppTemplatePicker-C0lZyhK2.js → AppTemplatePicker-CNJ6kIJk.js} +149 -96
  3. package/dist/{ControlPlaneView-DcLcw3-S.js → ControlPlaneView-DZ-hNfCQ.js} +7280 -7468
  4. package/dist/{EcosystemView-sb7DUkNL.js → EcosystemView-B359jaNI.js} +4 -4
  5. package/dist/MobileProjectsView-lV5bkuns.js +312 -0
  6. package/dist/{ModuleCenterView-CQrJ9pyE.js → ModuleCenterView-DyMr3iWV.js} +1 -1
  7. package/dist/{ModuleDetailView-CpBktRqD.js → ModuleDetailView-BeXK89Cs.js} +1 -1
  8. package/dist/{PagesView-DTGhet9j.js → PagesView-VqFkmYxN.js} +2 -2
  9. package/dist/{PlatformUnavailableView-j0_2YBKm.js → PlatformUnavailableView-C1RltAIw.js} +1 -1
  10. package/dist/{PortalSettingsView-BrO2Yt65.js → PortalSettingsView-BmmMJ5Zm.js} +2 -2
  11. package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +30 -0
  12. package/dist/WorkspaceEntryView-BTYo51RE.js +21 -0
  13. package/dist/app.js +11 -20
  14. package/dist/package.json +2 -1
  15. package/dist/{portalContext-DCwZcTKL.js → portalContext-C4HL_0kl.js} +1 -1
  16. package/dist/portalNavigation-DKCfwTH8.js +28 -0
  17. package/dist/routes-Boz_WlNM.js +54 -0
  18. package/dist/style.css +1 -1
  19. package/dist/{useModuleCatalog-CVi8031k.js → useModuleCatalog-DqECds3F.js} +1 -1
  20. package/package.json +2 -1
  21. package/dist/MobileProjectsView-BZw9pWnK.js +0 -296
  22. package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +0 -26
  23. package/dist/TemplateCenterView-B_Yvaeza.js +0 -299
  24. package/dist/WorkspaceEntryView-hNqYjBTr.js +0 -21
  25. package/dist/portalNavigation-DOF4Ah49.js +0 -28
  26. package/dist/routes-DXQSkGM7.js +0 -66
@@ -0,0 +1,30 @@
1
+ import { defineComponent as p, computed as a, openBlock as c, createElementBlock as l, normalizeClass as m, renderSlot as i } from "vue";
2
+ const d = /* @__PURE__ */ p({
3
+ __name: "StatusBadge",
4
+ props: {
5
+ variant: { default: "neutral" },
6
+ size: { default: "md" }
7
+ },
8
+ setup(e) {
9
+ const o = e, t = {
10
+ success: "bg-fm-color-system-success-100 text-fm-color-typo-success",
11
+ warning: "bg-fm-color-system-warning-100 text-fm-color-typo-warning",
12
+ error: "bg-fm-color-system-error-100 text-fm-color-typo-error",
13
+ info: "bg-fm-color-system-info-100 text-fm-color-typo-info",
14
+ neutral: "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary",
15
+ primary: "bg-fm-color-primary text-fm-color-typo-white"
16
+ }, r = {
17
+ xs: "rounded-[4px] px-[4px] py-[2px] text-[10px] leading-[14px] font-medium tracking-[0.2px]",
18
+ sm: "rounded-[4px] px-[6px] py-[4px] text-[12px] leading-[16px] font-medium tracking-[0.24px]",
19
+ md: "rounded-full px-8 py-2 leading-[16px]"
20
+ }, n = a(() => r[o.size]);
21
+ return (s, x) => (c(), l("span", {
22
+ class: m(["inline-flex shrink-0 items-center gap-4", [t[e.variant], n.value]])
23
+ }, [
24
+ i(s.$slots, "default")
25
+ ], 2));
26
+ }
27
+ });
28
+ export {
29
+ d as _
30
+ };
@@ -0,0 +1,21 @@
1
+ import { defineComponent as s, watchEffect as a, openBlock as n, createElementBlock as p } from "vue";
2
+ import { useRoute as u, useRouter as i } from "vue-router";
3
+ import { u as l } from "./portalContext-C4HL_0kl.js";
4
+ import { w as m, a as f } from "./portalNavigation-DKCfwTH8.js";
5
+ const _ = {
6
+ class: "portal-loading",
7
+ role: "status"
8
+ }, h = /* @__PURE__ */ s({
9
+ __name: "WorkspaceEntryView",
10
+ setup(w) {
11
+ const r = l(), t = u(), c = i();
12
+ return a(() => {
13
+ var e;
14
+ const o = (e = r.context.value) == null ? void 0 : e.projectId;
15
+ o && c.replace(m(o, f(t.query.view), t.query));
16
+ }), (o, e) => (n(), p("p", _, "Opening your workspace…"));
17
+ }
18
+ });
19
+ export {
20
+ h as default
21
+ };
package/dist/app.js CHANGED
@@ -4,24 +4,24 @@ const o = [
4
4
  path: "/platforms/mobile",
5
5
  name: "miniprogram-v2-mobile-projects",
6
6
  meta: { title: "Mobile" },
7
- component: () => import("./MobileProjectsView-BZw9pWnK.js")
7
+ component: () => import("./MobileProjectsView-lV5bkuns.js")
8
8
  },
9
9
  {
10
10
  path: "/",
11
11
  name: "miniprogram-v2-ecosystem",
12
12
  meta: { title: "Ecosystem" },
13
13
  beforeEnter: (e) => ["workspace", "releases", "sessions"].includes(String(e.query.view)) ? { name: "miniprogram-v2-control", query: e.query } : !0,
14
- component: () => import("./EcosystemView-sb7DUkNL.js")
14
+ component: () => import("./EcosystemView-B359jaNI.js")
15
15
  },
16
16
  {
17
17
  path: "/workspace",
18
18
  name: "miniprogram-v2-control",
19
- component: () => import("./WorkspaceEntryView-hNqYjBTr.js")
19
+ component: () => import("./WorkspaceEntryView-BTYo51RE.js")
20
20
  },
21
21
  {
22
22
  path: "/p/:projectId/:view(workspace|releases|sessions)?",
23
23
  name: "miniprogram-v2-project",
24
- component: () => import("./ControlPlaneView-DcLcw3-S.js")
24
+ component: () => import("./ControlPlaneView-DZ-hNfCQ.js")
25
25
  },
26
26
  {
27
27
  path: "/brand-kit",
@@ -33,19 +33,19 @@ const o = [
33
33
  path: "/pages",
34
34
  name: "miniprogram-v2-pages",
35
35
  meta: { title: "Pages" },
36
- component: () => import("./PagesView-DTGhet9j.js")
36
+ component: () => import("./PagesView-VqFkmYxN.js")
37
37
  },
38
38
  {
39
39
  path: "/settings",
40
40
  name: "miniprogram-v2-settings",
41
41
  meta: { title: "Settings" },
42
- component: () => import("./PortalSettingsView-BrO2Yt65.js")
42
+ component: () => import("./PortalSettingsView-BmmMJ5Zm.js")
43
43
  },
44
44
  ...["tablet", "kiosk"].map((e) => ({
45
45
  path: `/platforms/${e}`,
46
46
  name: `miniprogram-v2-${e}`,
47
47
  meta: { title: e === "tablet" ? "Tablet" : "Kiosk", kind: e },
48
- component: () => import("./PlatformUnavailableView-j0_2YBKm.js")
48
+ component: () => import("./PlatformUnavailableView-C1RltAIw.js")
49
49
  })),
50
50
  {
51
51
  // The shared component library, not this merchant's workspace — which is
@@ -53,7 +53,7 @@ const o = [
53
53
  path: "/modules",
54
54
  name: "miniprogram-v2-module-center",
55
55
  meta: { title: "Module library" },
56
- component: () => import("./ModuleCenterView-CQrJ9pyE.js")
56
+ component: () => import("./ModuleCenterView-DyMr3iWV.js")
57
57
  },
58
58
  {
59
59
  // Keyed by the module's directory name, which is what the catalog, the
@@ -61,25 +61,16 @@ const o = [
61
61
  path: "/modules/:name",
62
62
  name: "miniprogram-v2-module-detail",
63
63
  meta: { title: "Module library" },
64
- component: () => import("./ModuleDetailView-CpBktRqD.js")
65
- },
66
- {
67
- // Internal-only: no nav entry links here, reached by typing the URL. The
68
- // `beforeEach` guard in `./index.ts` checks `meta.requiresAdmin` and sends a
69
- // non-admin to the same place an unmatched URL goes, below.
70
- path: "/internal/template-center",
71
- name: "miniprogram-v2-template-center",
72
- meta: { title: "Template Center", requiresAdmin: !0 },
73
- component: () => import("./TemplateCenterView-B_Yvaeza.js")
64
+ component: () => import("./ModuleDetailView-BeXK89Cs.js")
74
65
  },
75
66
  {
76
67
  path: "/:pathMatch(.*)*",
77
68
  redirect: (e) => ({ name: "miniprogram-v2-ecosystem", query: e.query, params: {} })
78
69
  }
79
- ], r = {}, a = t(() => import("./App-CR0BBDaq.js")), n = t(() => import("./LegacyWorkspaceEntry-opz_kWz9.js"));
70
+ ], r = {}, a = t(() => import("./App-Dj20Jl8B.js")), i = t(() => import("./LegacyWorkspaceEntry-opz_kWz9.js"));
80
71
  export {
81
72
  a as FmApp,
82
- n as MiniprogramWorkspace,
73
+ i as MiniprogramWorkspace,
83
74
  r as i18nMessages,
84
75
  o as routes
85
76
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.2.2-dev.18",
3
+ "version": "0.2.2-dev.19",
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,4 +1,4 @@
1
- import { a as b } from "./routes-DXQSkGM7.js";
1
+ import { a as b } from "./routes-Boz_WlNM.js";
2
2
  import { useCoreStore as d } from "@feedmepos/mf-common";
3
3
  import { c as g, e as h } from "./controlPlane-CoEgf9BA.js";
4
4
  import { provide as y, computed as f, ref as c, watch as C, onScopeDispose as w, inject as x } from "vue";
@@ -0,0 +1,28 @@
1
+ function a(r) {
2
+ return r === "releases" || r === "sessions" ? r : "workspace";
3
+ }
4
+ function o(r) {
5
+ const { view: s, ...e } = r;
6
+ return e;
7
+ }
8
+ function c(r, s, e) {
9
+ return {
10
+ name: "miniprogram-v2-project",
11
+ params: { projectId: r, view: s === "workspace" ? void 0 : s },
12
+ query: o(e)
13
+ };
14
+ }
15
+ function i(r, s = "settings") {
16
+ const e = new URLSearchParams();
17
+ for (const n of ["businessId", "country", "restaurantId"]) {
18
+ const t = r[n];
19
+ typeof t == "string" && e.set(n, t);
20
+ }
21
+ return `/brand/${s}${e.size ? `?${e}` : ""}`;
22
+ }
23
+ export {
24
+ a,
25
+ i as l,
26
+ o as p,
27
+ c as w
28
+ };
@@ -0,0 +1,54 @@
1
+ const t = (e, s) => `/api/businesses/${e}/projects/${s}`, i = {
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, r) => `${t(e, s)}/sessions/${r}`,
9
+ messages: (e, s, r) => `${i.session(e, s, r)}/messages`,
10
+ startStatus: (e, s, r) => `${i.session(e, s, r)}/start-status`,
11
+ changes: (e, s, r, o = !1) => `${i.session(e, s, r)}/changes${o ? "?refresh=1" : ""}`,
12
+ checkpoints: (e, s, r) => `${i.session(e, s, r)}/checkpoints`,
13
+ aiBillingPreflight: (e, s, r) => `${i.session(e, s, r)}/ai-billing/preflight`,
14
+ restoreCheckpoint: (e, s, r, o) => `${i.checkpoints(e, s, r)}/${o}/restore`,
15
+ previewBridgeTicket: (e, s, r) => `${i.session(e, s, r)}/preview-bridge/ticket`,
16
+ previewBridgeSocket: (e, s, r) => `${i.session(e, s, r)}/preview-bridge/socket`,
17
+ uploads: (e, s, r, o = "") => `${i.session(e, s, r)}/uploads${o ? `?${o}` : ""}`,
18
+ archive: (e, s, r) => `${i.session(e, s, r)}/archive`,
19
+ commit: (e, s, r) => `${i.session(e, s, r)}/commit`,
20
+ resume: (e, s, r) => `${i.session(e, s, r)}/resume`,
21
+ restartPreview: (e, s, r) => `${i.session(e, s, r)}/restart-preview`,
22
+ fork: (e, s, r) => `${i.session(e, s, r)}/fork`,
23
+ flushEvents: (e, s, r) => `${i.session(e, s, r)}/events/flush`,
24
+ revertTurn: (e, s, r) => `${i.session(e, s, r)}/turns/revert`,
25
+ unrevertTurn: (e, s, r) => `${i.session(e, s, r)}/turns/unrevert`,
26
+ releases: (e, s) => `${t(e, s)}/releases`,
27
+ publishRelease: (e, s, r) => `${i.releases(e, s)}/${r}/publish`,
28
+ releasePreviewUrl: (e, s, r) => `${i.releases(e, s)}/${r}/preview-url`,
29
+ rollbackToRelease: (e, s, r) => `${t(e, s)}/rollback-to-release/${r}`,
30
+ rollbackToV1: (e, s) => `${t(e, s)}/rollback-to-v1`,
31
+ start: (e, s, r) => {
32
+ const o = new URLSearchParams();
33
+ e && o.set("businessId", e), s && o.set("projectId", s), r && o.set("sessionId", r);
34
+ const a = o.toString();
35
+ return `/api/start${a ? `?${a}` : ""}`;
36
+ },
37
+ opencode: (e = "") => `/api/opencode${e ? `/${e.replace(/^\/+/, "")}` : ""}`,
38
+ /** The shared component library's catalog. Deliberately not under a
39
+ * business/project path: the library belongs to no business, and the
40
+ * module centre is not inside a workspace. */
41
+ componentLibraryCatalog: () => "/api/component-library/catalog",
42
+ /** The self-contained preview document the module centre frames. Fetched with
43
+ * the portal's bearer and assigned to an iframe's `srcdoc`, never used as an
44
+ * `<iframe src>` — a navigation request carries no Authorization header,
45
+ * which is what a signed URL would otherwise exist to work around. */
46
+ componentLibraryPreview: () => "/api/component-library/preview",
47
+ /** The application templates this environment can provision, for the portal's
48
+ * picker. Not under a business/project path: the answer is a property of
49
+ * the environment, and it is needed BEFORE a project exists. */
50
+ appTemplates: () => "/api/app-templates"
51
+ };
52
+ export {
53
+ i as a
54
+ };