@feedmepos/mf-miniprogram-v2 0.2.1-dev.3 → 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.
@@ -1,49 +1,46 @@
1
- import { defineComponent as T, openBlock as e, createElementBlock as s, createElementVNode as o, toDisplayString as i, createCommentVNode as g, ref as M, computed as y, onMounted as I, resolveComponent as h, createVNode as m, unref as u, Fragment as v, renderList as b, normalizeClass as A, createBlock as p, withCtx as R } from "vue";
2
- import { useRouter as z } from "vue-router";
3
- import { u as D, c as G, f as q, _ as f, t as K } from "./ModuleEmptyState.vue_vue_type_script_setup_true_lang-Dhv_xE17.js";
4
- import { _ as O } from "./AppTabs.vue_vue_type_script_setup_true_lang-DP7BBWtM.js";
5
- import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__name fm-typo-en-body-md-600 text-fm-color-typo-primary" }, H = { class: "card__version fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, J = { class: "card__description fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Q = { class: "card__tags" }, W = { class: "card__tag card__tag--tier fm-typo-en-body-sm-600" }, X = {
1
+ import { defineComponent as w, openBlock as e, createElementBlock as n, createElementVNode as o, toDisplayString as i, createCommentVNode as k, ref as M, computed as y, onMounted as I, resolveComponent as h, createVNode as m, unref as u, Fragment as v, renderList as b, normalizeClass as A, createBlock as p, withCtx as z } from "vue";
2
+ import { _ as D } from "./AppTabs.vue_vue_type_script_setup_true_lang-C-UOi7TE.js";
3
+ import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import { u as G, c as R, f as q, _ as f, t as K } from "./useModuleCatalog-CYsxGYLA.js";
5
+ const O = { class: "card" }, P = { class: "card__head" }, U = { class: "card__name fm-typo-en-body-md-600 text-fm-color-typo-primary" }, j = { class: "card__version fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, H = { class: "card__description fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, J = { class: "card__tags" }, Q = { class: "card__tag card__tag--tier fm-typo-en-body-sm-600" }, W = {
7
6
  key: 0,
8
7
  class: "card__tag card__tag--slot fm-typo-en-body-sm-400"
9
- }, Y = /* @__PURE__ */ T({
8
+ }, X = /* @__PURE__ */ w({
10
9
  __name: "ModuleCard",
11
10
  props: {
12
11
  entry: {}
13
12
  },
14
13
  setup(l) {
15
- return (n, c) => (e(), s("article", P, [
16
- o("header", U, [
17
- o("h3", j, i(l.entry.name), 1),
18
- o("span", H, i(l.entry.version), 1)
14
+ return (s, c) => (e(), n("article", O, [
15
+ o("header", P, [
16
+ o("h3", U, i(l.entry.name), 1),
17
+ o("span", j, i(l.entry.version), 1)
19
18
  ]),
20
- o("p", J, i(l.entry.description || l.entry.id), 1),
21
- o("footer", Q, [
22
- o("span", W, i(l.entry.category), 1),
23
- l.entry.slot ? (e(), s("span", X, i(l.entry.slot), 1)) : g("", !0)
19
+ o("p", H, i(l.entry.description || l.entry.id), 1),
20
+ o("footer", J, [
21
+ o("span", Q, i(l.entry.category), 1),
22
+ l.entry.slot ? (e(), n("span", W, i(l.entry.slot), 1)) : k("", !0)
24
23
  ])
25
24
  ]));
26
25
  }
27
- }), Z = /* @__PURE__ */ w(Y, [["__scopeId", "data-v-653174c0"]]), ee = { class: "shell" }, te = { class: "centre" }, oe = { class: "centre__inner" }, se = { class: "centre__head" }, ne = {
26
+ }), Y = /* @__PURE__ */ F(X, [["__scopeId", "data-v-653174c0"]]), Z = { class: "shell" }, ee = { class: "centre" }, te = { class: "centre__inner" }, oe = { class: "centre__head" }, ne = {
28
27
  key: 0,
29
28
  class: "centre__filters"
30
- }, ae = { class: "centre__facet-label fm-typo-en-body-sm-600 text-fm-color-typo-tertiary" }, le = { class: "centre__chips" }, re = ["aria-pressed", "onClick"], ie = {
29
+ }, se = { class: "centre__facet-label fm-typo-en-body-sm-600 text-fm-color-typo-tertiary" }, ae = { class: "centre__chips" }, le = ["aria-pressed", "onClick"], re = {
31
30
  key: 1,
32
31
  class: "centre__note fm-typo-en-body-md-400"
33
- }, ce = {
32
+ }, ie = {
34
33
  key: 6,
35
34
  class: "centre__grid"
36
- }, de = /* @__PURE__ */ T({
35
+ }, ce = /* @__PURE__ */ w({
37
36
  __name: "ModuleCenterView",
38
37
  setup(l) {
39
- z();
40
- const n = D(), c = M(""), d = M([]), F = y(() => G(n.entries.value ?? [])), k = y(() => q(n.entries.value ?? [], c.value, d.value)), V = y(() => c.value.trim().length > 0 || d.value.length > 0), C = y(() => {
38
+ const s = G(), c = M(""), d = M([]), T = y(() => R(s.entries.value ?? [])), g = y(() => q(s.entries.value ?? [], c.value, d.value)), V = y(() => c.value.trim().length > 0 || d.value.length > 0), C = y(() => {
41
39
  var r;
42
- return (((r = n.entries.value) == null ? void 0 : r.length) ?? 0) > 0;
40
+ return (((r = s.entries.value) == null ? void 0 : r.length) ?? 0) > 0;
43
41
  }), N = {
44
42
  tier: "Type",
45
- slot: "Slot",
46
- label: "Tag"
43
+ slot: "Slot"
47
44
  };
48
45
  function $(r) {
49
46
  return d.value.some((a) => a.kind === r.kind && a.value === r.value);
@@ -54,13 +51,13 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
54
51
  function x() {
55
52
  c.value = "", d.value = [];
56
53
  }
57
- return I(() => n.load()), (r, a) => {
54
+ return I(() => s.load()), (r, a) => {
58
55
  const L = h("FmButton"), E = h("FmTextField"), S = h("RouterLink");
59
- return e(), s("div", ee, [
60
- m(O, { active: "modules" }),
61
- o("div", te, [
62
- o("div", oe, [
63
- o("header", se, [
56
+ return e(), n("div", Z, [
57
+ m(D, { active: "modules" }),
58
+ o("div", ee, [
59
+ o("div", te, [
60
+ o("header", oe, [
64
61
  a[3] || (a[3] = o("div", null, [
65
62
  o("h2", { class: "centre__title fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Module library"),
66
63
  o("p", { class: "centre__subtitle fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Modules the agent can put on a page. Published from the platform, not from your app. ")
@@ -69,61 +66,61 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
69
66
  size: "md",
70
67
  variant: "tertiary",
71
68
  icon: "refresh",
72
- onClick: a[0] || (a[0] = (t) => u(n).load(!0))
69
+ onClick: a[0] || (a[0] = (t) => u(s).load(!0))
73
70
  })
74
71
  ]),
75
- C.value ? (e(), s("div", ne, [
72
+ C.value ? (e(), n("div", ne, [
76
73
  m(E, {
77
74
  modelValue: c.value,
78
75
  "onUpdate:modelValue": a[1] || (a[1] = (t) => c.value = t),
79
76
  label: "Search",
80
77
  placeholder: "name, slot, or label"
81
78
  }, null, 8, ["modelValue"]),
82
- (e(!0), s(v, null, b(F.value, (t) => (e(), s("div", {
79
+ (e(!0), n(v, null, b(T.value, (t) => (e(), n("div", {
83
80
  key: t.kind,
84
81
  class: "centre__facet"
85
82
  }, [
86
- o("span", ae, i(N[t.kind]), 1),
87
- o("div", le, [
88
- (e(!0), s(v, null, b(t.values, (_) => (e(), s("button", {
83
+ o("span", se, i(N[t.kind]), 1),
84
+ o("div", ae, [
85
+ (e(!0), n(v, null, b(t.values, (_) => (e(), n("button", {
89
86
  key: _,
90
87
  type: "button",
91
88
  class: A(["centre__chip fm-typo-en-body-sm-400", { "centre__chip--on": $({ kind: t.kind, value: _ }) }]),
92
89
  "aria-pressed": $({ kind: t.kind, value: _ }),
93
- onClick: (ue) => B({ kind: t.kind, value: _ })
94
- }, i(_), 11, re))), 128))
90
+ onClick: (de) => B({ kind: t.kind, value: _ })
91
+ }, i(_), 11, le))), 128))
95
92
  ])
96
93
  ]))), 128)),
97
- V.value ? (e(), s("button", {
94
+ V.value ? (e(), n("button", {
98
95
  key: 0,
99
96
  type: "button",
100
97
  class: "centre__clear fm-typo-en-body-sm-600",
101
98
  onClick: x
102
- }, " Clear filters ")) : g("", !0)
103
- ])) : g("", !0),
104
- u(n).entries.value === null ? (e(), s("p", ie, "Loading…")) : u(n).loadError.value ? (e(), p(f, {
99
+ }, " Clear filters ")) : k("", !0)
100
+ ])) : k("", !0),
101
+ u(s).entries.value === null ? (e(), n("p", re, "Loading…")) : u(s).loadError.value ? (e(), p(f, {
105
102
  key: 2,
106
103
  icon: "error_outline",
107
104
  tone: "error",
108
105
  title: "Could not load the module library",
109
- message: u(n).loadError.value,
106
+ message: u(s).loadError.value,
110
107
  "action-label": "Try again",
111
- onAction: a[2] || (a[2] = (t) => u(n).load(!0))
112
- }, null, 8, ["message"])) : u(n).unpublished.value ? (e(), p(f, {
108
+ onAction: a[2] || (a[2] = (t) => u(s).load(!0))
109
+ }, null, 8, ["message"])) : u(s).unpublished.value ? (e(), p(f, {
113
110
  key: 3,
114
111
  icon: "widgets",
115
112
  title: "No module library has been published yet",
116
113
  message: "Modules are published from the platform, separately from merging them. Once one is published it appears here, and every workspace started afterwards receives it."
117
- })) : C.value ? k.value.length ? (e(), s("ul", ce, [
118
- (e(!0), s(v, null, b(k.value, (t) => (e(), s("li", {
114
+ })) : C.value ? g.value.length ? (e(), n("ul", ie, [
115
+ (e(!0), n(v, null, b(g.value, (t) => (e(), n("li", {
119
116
  key: t.id
120
117
  }, [
121
118
  m(S, {
122
119
  class: "centre__link",
123
120
  to: { name: "miniprogram-v2-module-detail", params: { name: t.name } }
124
121
  }, {
125
- default: R(() => [
126
- m(Z, { entry: t }, null, 8, ["entry"])
122
+ default: z(() => [
123
+ m(Y, { entry: t }, null, 8, ["entry"])
127
124
  ]),
128
125
  _: 2
129
126
  }, 1032, ["to"])
@@ -145,7 +142,7 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
145
142
  ]);
146
143
  };
147
144
  }
148
- }), he = /* @__PURE__ */ w(de, [["__scopeId", "data-v-90fb25ab"]]);
145
+ }), pe = /* @__PURE__ */ F(ce, [["__scopeId", "data-v-349aeb50"]]);
149
146
  export {
150
- he as default
147
+ pe as default
151
148
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as C, ref as M, computed as u, watch as T, resolveComponent as k, openBlock as n, createElementBlock as l, createElementVNode as e, toDisplayString as i, createCommentVNode as _, Fragment as I, renderList as S, createVNode as f, onMounted as B, withCtx as L, unref as d, createBlock as v } from "vue";
2
2
  import { useRoute as N, useRouter as P } from "vue-router";
3
- import { m as A, i as F, u as V, _ as g } from "./ModuleEmptyState.vue_vue_type_script_setup_true_lang-Dhv_xE17.js";
4
- import { _ as R } from "./AppTabs.vue_vue_type_script_setup_true_lang-DP7BBWtM.js";
3
+ import { m as A, i as F, u as V, _ as g } from "./useModuleCatalog-CYsxGYLA.js";
4
+ import { _ as R } from "./AppTabs.vue_vue_type_script_setup_true_lang-C-UOi7TE.js";
5
5
  import { useDialog as j } from "@feedmepos/ui-library";
6
6
  import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "detail__name fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, O = { class: "detail__version fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Y = {
package/dist/app.js CHANGED
@@ -3,27 +3,27 @@ const n = [
3
3
  {
4
4
  path: "/",
5
5
  name: "miniprogram-v2-control",
6
- component: () => import("./ControlPlaneView-B61eRNvP.js")
6
+ component: () => import("./ControlPlaneView-CJvNqpGC.js")
7
7
  },
8
8
  {
9
9
  // The shared component library, not this merchant's workspace — which is
10
10
  // why it sits beside the control view rather than inside it.
11
11
  path: "/modules",
12
12
  name: "miniprogram-v2-module-center",
13
- component: () => import("./ModuleCenterView-D3PNaPqU.js")
13
+ component: () => import("./ModuleCenterView-CYZJ97HU.js")
14
14
  },
15
15
  {
16
16
  // Keyed by the module's directory name, which is what the catalog, the
17
17
  // delivered library directory and the block-swap skill all already use.
18
18
  path: "/modules/:name",
19
19
  name: "miniprogram-v2-module-detail",
20
- component: () => import("./ModuleDetailView-DCXsI6HI.js")
20
+ component: () => import("./ModuleDetailView-CZ_2C-zj.js")
21
21
  },
22
22
  {
23
23
  path: "/:pathMatch(.*)*",
24
24
  redirect: { name: "miniprogram-v2-control" }
25
25
  }
26
- ], t = {}, e = o(() => import("./App-CaNGbhK8.js")), r = o(() => import("./ControlPlaneView-B61eRNvP.js"));
26
+ ], t = {}, e = o(() => import("./App-CaNGbhK8.js")), r = o(() => import("./ControlPlaneView-CJvNqpGC.js"));
27
27
  export {
28
28
  e as FmApp,
29
29
  r as MiniprogramWorkspace,
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.2.1-dev.3",
3
+ "version": "0.2.1-dev.5",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",