@feedmepos/mf-miniprogram-v2 0.2.2-dev.9 → 0.2.2

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 (38) hide show
  1. package/dist/App-KzUdmcX4.js +214 -0
  2. package/dist/{AppTemplatePicker-eKlQ0c54.js → AppTemplatePicker-CNJ6kIJk.js} +158 -105
  3. package/dist/BrandFontPicker-Bd30BHsN.js +241 -0
  4. package/dist/BrandKitView-z2Pu8wAQ.js +249 -0
  5. package/dist/{ControlPlaneView-DGDA8EFh.js → ControlPlaneView-Bd_Fl_3b.js} +7751 -7323
  6. package/dist/{EcosystemView-Cx-3k7lB.js → EcosystemView-BDXgMQN_.js} +7 -7
  7. package/dist/{LegacyWorkspaceEntry-opz_kWz9.js → LegacyWorkspaceEntry-CADRpDkg.js} +2 -2
  8. package/dist/MobileProjectsView-CvCPtFAF.js +313 -0
  9. package/dist/{ModuleCenterView-DEShxy_e.js → ModuleCenterView-B08oZqQw.js} +34 -34
  10. package/dist/{ModuleDetailView-BSndm4ov.js → ModuleDetailView-lROTkaR7.js} +49 -49
  11. package/dist/{PagesView-CegMd6GC.js → PagesView-DOG8RSen.js} +2 -2
  12. package/dist/{PlatformUnavailableView-j0_2YBKm.js → PlatformUnavailableView-C1RltAIw.js} +1 -1
  13. package/dist/{PortalSettingsView-DFz6FUd9.js → PortalSettingsView-BK6kRgtf.js} +7 -7
  14. package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +30 -0
  15. package/dist/TemplateCenterView-niXTXw9y.js +426 -0
  16. package/dist/WorkspaceEntryView-DzR8DQC5.js +21 -0
  17. package/dist/adminAccess-CDxAuQ-M.js +48 -0
  18. package/dist/app.js +22 -11
  19. package/dist/{controlPlane-CoEgf9BA.js → controlPlane-DT3t_ftg.js} +11 -11
  20. package/dist/{index-D5qXvcfE.js → index-CIJWcl_6.js} +10 -9
  21. package/dist/package.json +2 -1
  22. package/dist/{portalContext-C4HL_0kl.js → portalContext-B2pXdNtB.js} +2 -2
  23. package/dist/portalNavigation-DKCfwTH8.js +28 -0
  24. package/dist/routes-CeuodIgg.js +95 -0
  25. package/dist/style.css +1 -1
  26. package/dist/templatePickerFlag-CosY_15R.js +13 -0
  27. package/dist/{useBrandKit-BlKlqpo2.js → useBrandKit-CKN2zLC8.js} +3 -3
  28. package/dist/{useModuleCatalog-CkNuZzNM.js → useModuleCatalog-B9HXHA-e.js} +3 -3
  29. package/package.json +2 -1
  30. package/dist/App-BtDqnBq4.js +0 -193
  31. package/dist/BrandFontPicker-CyLbp5nr.js +0 -240
  32. package/dist/BrandKitView-CaxS1T-W.js +0 -217
  33. package/dist/MobileProjectsView-DEQ6q6Si.js +0 -279
  34. package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +0 -26
  35. package/dist/WorkspaceEntryView-e2EUnq9A.js +0 -21
  36. package/dist/localPreference-DneUpUrQ.js +0 -34
  37. package/dist/portalNavigation-DOF4Ah49.js +0 -28
  38. package/dist/routes-Boz_WlNM.js +0 -54
@@ -1,4 +1,4 @@
1
- const c = "69cde0740c0106001ca83dff", t = {
1
+ const c = "69cde0740c0106001ca83dff", s = "0000000074656d706c617465", t = {
2
2
  dev: {
3
3
  env: "dev",
4
4
  liveDomain: "feedmedev.vip",
@@ -21,12 +21,12 @@ const c = "69cde0740c0106001ca83dff", t = {
21
21
  function o(e) {
22
22
  return e === "dev" || e === "prod";
23
23
  }
24
- function s(e) {
24
+ function v(e) {
25
25
  if (!o(e))
26
26
  throw new Error(`MINIPROGRAM_ENV must be 'dev' or 'prod', got ${JSON.stringify(e)}`);
27
27
  return t[e];
28
28
  }
29
- function v(e) {
29
+ function f(e) {
30
30
  const r = e.toLowerCase().replace(/^fmmf:/, "");
31
31
  return r === "prod" || r === "production" ? "prod" : "dev";
32
32
  }
@@ -34,11 +34,11 @@ const a = /^[a-f0-9]{24}$/;
34
34
  function d(e) {
35
35
  return a.test(e);
36
36
  }
37
- function f(e = crypto.randomUUID()) {
37
+ function g(e = crypto.randomUUID()) {
38
38
  const r = m("prj", e, 24);
39
39
  return r.length === 27 ? r : r.padEnd(27, "0");
40
40
  }
41
- function g(e) {
41
+ function u(e) {
42
42
  if (!d(e)) throw new Error(`Invalid business id: ${e}`);
43
43
  return `prj${e}`;
44
44
  }
@@ -48,8 +48,9 @@ function m(e, r, n) {
48
48
  }
49
49
  export {
50
50
  c as D,
51
- s as a,
52
- v as e,
53
- g as l,
54
- f as m
51
+ s as T,
52
+ v as a,
53
+ f as e,
54
+ u as l,
55
+ g as m
55
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.9",
3
+ "version": "0.2.2",
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-Boz_WlNM.js";
1
+ import { a as b } from "./routes-CeuodIgg.js";
2
2
  import { useCoreStore as d } from "@feedmepos/mf-common";
3
- import { c as g, e as h } from "./controlPlane-CoEgf9BA.js";
3
+ import { c as g, e as h } from "./controlPlane-DT3t_ftg.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,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,95 @@
1
+ const t = (e, s) => `/api/businesses/${e}/projects/${s}`, p = {
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, a) => `${t(e, s)}/sessions/${a}`,
9
+ messages: (e, s, a) => `${p.session(e, s, a)}/messages`,
10
+ startStatus: (e, s, a) => `${p.session(e, s, a)}/start-status`,
11
+ changes: (e, s, a, i = !1) => `${p.session(e, s, a)}/changes${i ? "?refresh=1" : ""}`,
12
+ checkpoints: (e, s, a) => `${p.session(e, s, a)}/checkpoints`,
13
+ aiBillingPreflight: (e, s, a) => `${p.session(e, s, a)}/ai-billing/preflight`,
14
+ restoreCheckpoint: (e, s, a, i) => `${p.checkpoints(e, s, a)}/${i}/restore`,
15
+ previewBridgeTicket: (e, s, a) => `${p.session(e, s, a)}/preview-bridge/ticket`,
16
+ previewBridgeSocket: (e, s, a) => `${p.session(e, s, a)}/preview-bridge/socket`,
17
+ uploads: (e, s, a, i = "") => `${p.session(e, s, a)}/uploads${i ? `?${i}` : ""}`,
18
+ archive: (e, s, a) => `${p.session(e, s, a)}/archive`,
19
+ commit: (e, s, a) => `${p.session(e, s, a)}/commit`,
20
+ resume: (e, s, a) => `${p.session(e, s, a)}/resume`,
21
+ restartPreview: (e, s, a) => `${p.session(e, s, a)}/restart-preview`,
22
+ fork: (e, s, a) => `${p.session(e, s, a)}/fork`,
23
+ flushEvents: (e, s, a) => `${p.session(e, s, a)}/events/flush`,
24
+ revertTurn: (e, s, a) => `${p.session(e, s, a)}/turns/revert`,
25
+ unrevertTurn: (e, s, a) => `${p.session(e, s, a)}/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, a) => `${p.releases(e, s)}/${a}/publish`,
31
+ releasePreviewUrl: (e, s, a) => `${p.releases(e, s)}/${a}/preview-url`,
32
+ rollbackToRelease: (e, s, a) => `${t(e, s)}/rollback-to-release/${a}`,
33
+ rollbackToV1: (e, s) => `${t(e, s)}/rollback-to-v1`,
34
+ start: (e, s, a) => {
35
+ const i = new URLSearchParams();
36
+ e && i.set("businessId", e), s && i.set("projectId", s), a && i.set("sessionId", a);
37
+ const r = i.toString();
38
+ return `/api/start${r ? `?${r}` : ""}`;
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: delete an existing physical template directory, as a PR
63
+ * against this repo. Refused for the default template or one any project
64
+ * still references — see the endpoint's own doc comment. */
65
+ deleteAppTemplate: (e) => `/api/admin/app-templates/${e}/delete`,
66
+ /** Template Center admin list: every physical template's live registry
67
+ * row, drafts included — unlike `appTemplates()` (merchant-facing,
68
+ * published + environment-filtered only). */
69
+ appTemplateRegistry: () => "/api/admin/app-templates",
70
+ /** Template Center: flip a template's registry row to published, so the
71
+ * merchant-facing picker starts offering it — no redeploy involved. */
72
+ publishAppTemplate: (e) => `/api/admin/app-templates/${e}/publish`,
73
+ /** Template Center: flip a template's registry row back to draft. Refused
74
+ * for the default template — there must always be one to fall back to. */
75
+ unpublishAppTemplate: (e) => `/api/admin/app-templates/${e}/unpublish`,
76
+ /** Template Center: physical templates whose "create template" or "delete
77
+ * template" PR is still open — read live from GitHub, not a stored list,
78
+ * so a row disappears the moment its PR merges or is closed. */
79
+ pendingTemplateChanges: () => "/api/admin/app-templates/pending-changes",
80
+ /** Template Center: merge a pending template change's PR directly from the
81
+ * "In review" list, without leaving the portal. Refuses to act on
82
+ * anything that is not itself a pending template create/delete PR. */
83
+ mergePendingTemplateChange: (e) => `/api/admin/app-templates/pending-changes/${e}/merge`,
84
+ /** Template Center: close a pending template change's PR without merging
85
+ * and delete its branch — the "In review" list's reject action. */
86
+ rejectPendingTemplateChange: (e) => `/api/admin/app-templates/pending-changes/${e}/reject`,
87
+ /** Template Center: find-or-create the template-editing project a
88
+ * physical template edits through — the same chat/preview/checkpoint
89
+ * workspace a merchant project gets, pointed at `templates/<id>/` in this
90
+ * repo instead. Internal-admin only. */
91
+ appTemplateEditingProject: (e) => `/api/admin/app-templates/${e}/editing-project`
92
+ };
93
+ export {
94
+ p as a
95
+ };