@burdenoff/microfe-store 2026.626.2 → 2026.703.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.
@@ -3,20 +3,20 @@ import { formatPrice as t } from "../utils/index.js";
3
3
  import { nativeCopyText as n, nativeImpact as r, nativeNotify as i } from "../utils/nativeBridge.js";
4
4
  import { useEffect as a, useState as o } from "react";
5
5
  import { ArrowRight as s, CheckCircle2 as c, Copy as l, Download as u, KeyRound as d, Receipt as f } from "lucide-react";
6
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
- import { useNavigate as h, useParams as g } from "react-router-dom";
8
- import { graphqlFetch as _ } from "@burdenoff/fe-libs/shared/graphql";
6
+ import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql";
7
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
+ import { useNavigate as g, useParams as _ } from "react-router-dom";
9
9
  import { EmphasisPanel as v, NextSteps as y } from "@burdenoff/fe-libs/ui";
10
10
  //#region src/pages/OrderConfirmationPage.tsx
11
11
  var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n id\n status\n total\n currency\n purchasedAt\n lineItems\n context\n }\n myEntitlements {\n id\n productId\n licenseKey\n expiresAt\n features\n product {\n id\n name\n slug\n icon\n manifest\n }\n }\n }\n", x = () => {
12
- let x = h(), { basePath: S, authToken: C } = e(), { orderId: w } = g(), [T, E] = o(null), [D, O] = o([]), [k, A] = o(!0), [j, M] = o(null), [N, P] = o(null);
12
+ let x = g(), { basePath: S, authToken: C } = e(), { orderId: w } = _(), [T, E] = o(null), [D, O] = o([]), [k, A] = o(!0), [j, M] = o(null), [N, P] = o(null);
13
13
  a(() => {
14
14
  if (!w) return;
15
15
  let e = !1;
16
16
  return (async () => {
17
17
  A(!0), M(null);
18
18
  try {
19
- let t = await _({
19
+ let t = await p({
20
20
  gateway: "global",
21
21
  query: b,
22
22
  variables: { id: w },
@@ -48,18 +48,18 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
48
48
  let n = new URLSearchParams();
49
49
  n.set("install", e), t && n.set("licenseKey", t), window.location.href = `/vibecontrols/agents?${n.toString()}`;
50
50
  };
51
- return /* @__PURE__ */ m("main", {
51
+ return /* @__PURE__ */ h("main", {
52
52
  className: "mx-auto max-w-3xl p-6",
53
53
  children: [
54
- /* @__PURE__ */ m(v, {
54
+ /* @__PURE__ */ h(v, {
55
55
  className: "rounded-2xl p-6 text-center",
56
56
  children: [
57
- /* @__PURE__ */ p(c, { className: "mx-auto size-12 text-status-success-text" }),
58
- /* @__PURE__ */ p("h1", {
57
+ /* @__PURE__ */ m(c, { className: "mx-auto size-12 text-status-success-text" }),
58
+ /* @__PURE__ */ m("h1", {
59
59
  className: "mt-3 text-2xl font-bold text-text-primary",
60
60
  children: "Order placed successfully"
61
61
  }),
62
- T && /* @__PURE__ */ m("p", {
62
+ T && /* @__PURE__ */ h("p", {
63
63
  className: "mt-1 text-sm tabular-nums text-text-secondary",
64
64
  children: [
65
65
  "Total: ",
@@ -67,93 +67,93 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
67
67
  T.purchasedAt && ` • ${new Date(T.purchasedAt).toLocaleString()}`
68
68
  ]
69
69
  }),
70
- w && /* @__PURE__ */ m("div", {
70
+ w && /* @__PURE__ */ h("div", {
71
71
  className: "mx-auto mt-4 max-w-sm rounded-lg border border-border-seam bg-surface-default px-4 py-2 text-left",
72
- children: [/* @__PURE__ */ p("p", {
72
+ children: [/* @__PURE__ */ m("p", {
73
73
  className: "text-xs uppercase tracking-wide text-text-tertiary",
74
74
  children: "Order ID"
75
- }), /* @__PURE__ */ p("p", {
75
+ }), /* @__PURE__ */ m("p", {
76
76
  className: "mt-0.5 break-all font-mono text-xs text-text-primary",
77
77
  children: w
78
78
  })]
79
79
  })
80
80
  ]
81
81
  }),
82
- j && /* @__PURE__ */ p("div", {
82
+ j && /* @__PURE__ */ m("div", {
83
83
  role: "alert",
84
84
  className: "mt-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
85
85
  children: j
86
86
  }),
87
- k ? /* @__PURE__ */ p("output", {
87
+ k ? /* @__PURE__ */ m("output", {
88
88
  className: "mt-6 block py-12 text-center text-text-secondary",
89
89
  children: "Loading licenses…"
90
- }) : D.length > 0 ? /* @__PURE__ */ m("div", {
90
+ }) : D.length > 0 ? /* @__PURE__ */ h("div", {
91
91
  className: "mt-6",
92
- children: [/* @__PURE__ */ m("h2", {
92
+ children: [/* @__PURE__ */ h("h2", {
93
93
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
94
94
  children: [
95
- /* @__PURE__ */ p(d, { className: "size-4" }),
95
+ /* @__PURE__ */ m(d, { className: "size-4" }),
96
96
  "Your licenses (",
97
97
  D.length,
98
98
  ")"
99
99
  ]
100
- }), /* @__PURE__ */ p("ul", {
100
+ }), /* @__PURE__ */ m("ul", {
101
101
  className: "space-y-3",
102
- children: D.map((e) => /* @__PURE__ */ p("li", {
102
+ children: D.map((e) => /* @__PURE__ */ m("li", {
103
103
  className: "rounded-lg border border-border-seam bg-surface-raised p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
104
- children: /* @__PURE__ */ m("div", {
104
+ children: /* @__PURE__ */ h("div", {
105
105
  className: "flex items-start gap-3",
106
106
  children: [
107
- e.product?.icon ? /* @__PURE__ */ p("img", {
107
+ e.product?.icon ? /* @__PURE__ */ m("img", {
108
108
  src: e.product.icon,
109
109
  alt: "",
110
110
  className: "size-12 flex-shrink-0 rounded-md object-cover"
111
- }) : /* @__PURE__ */ p("div", {
111
+ }) : /* @__PURE__ */ m("div", {
112
112
  className: "flex size-12 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
113
113
  children: e.product?.name.slice(0, 2).toUpperCase() ?? "?"
114
114
  }),
115
- /* @__PURE__ */ m("div", {
115
+ /* @__PURE__ */ h("div", {
116
116
  className: "min-w-0 flex-1",
117
117
  children: [
118
- /* @__PURE__ */ p("h3", {
118
+ /* @__PURE__ */ m("h3", {
119
119
  className: "text-base font-semibold text-text-primary",
120
120
  children: e.product?.name ?? "Unknown product"
121
121
  }),
122
- e.expiresAt && /* @__PURE__ */ m("p", {
122
+ e.expiresAt && /* @__PURE__ */ h("p", {
123
123
  className: "text-xs text-text-secondary",
124
124
  children: ["Expires: ", new Date(e.expiresAt).toLocaleDateString()]
125
125
  }),
126
- e.licenseKey && /* @__PURE__ */ m("div", {
126
+ e.licenseKey && /* @__PURE__ */ h("div", {
127
127
  className: "mt-2 flex items-center gap-2",
128
- children: [/* @__PURE__ */ p("code", {
128
+ children: [/* @__PURE__ */ m("code", {
129
129
  className: "flex-1 truncate rounded bg-surface-muted px-2 py-1 font-mono text-[11px] text-text-primary",
130
130
  children: e.licenseKey
131
- }), /* @__PURE__ */ p("button", {
131
+ }), /* @__PURE__ */ m("button", {
132
132
  type: "button",
133
133
  onClick: () => void F(e.licenseKey),
134
134
  className: "rounded-md border border-border-default bg-surface-default p-1 text-text-primary hover:bg-surface-hover",
135
135
  title: "Copy license key",
136
- children: /* @__PURE__ */ p(l, { className: "size-3.5" })
136
+ children: /* @__PURE__ */ m(l, { className: "size-3.5" })
137
137
  })]
138
138
  }),
139
- N === e.licenseKey && /* @__PURE__ */ p("p", {
139
+ N === e.licenseKey && /* @__PURE__ */ m("p", {
140
140
  className: "mt-1 text-xs text-status-success-text",
141
141
  children: "Copied to clipboard"
142
142
  })
143
143
  ]
144
144
  }),
145
- /* @__PURE__ */ m("button", {
145
+ /* @__PURE__ */ h("button", {
146
146
  type: "button",
147
147
  onClick: () => I(e.productId, e.licenseKey),
148
148
  className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-semibold text-action-primary-text hover:opacity-90",
149
- children: [/* @__PURE__ */ p(u, { className: "size-3.5" }), "Install to workspace"]
149
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), "Install to workspace"]
150
150
  })
151
151
  ]
152
152
  })
153
153
  }, e.id))
154
154
  })]
155
155
  }) : null,
156
- !k && /* @__PURE__ */ p(y, {
156
+ !k && /* @__PURE__ */ m(y, {
157
157
  className: "mt-6",
158
158
  storageKey: "store-order-confirmation",
159
159
  title: "What's next?",
@@ -162,7 +162,7 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
162
162
  id: "install",
163
163
  label: "Install what you bought",
164
164
  description: "Add each purchased app to a workspace using its license.",
165
- icon: /* @__PURE__ */ p(u, { className: "size-4" }),
165
+ icon: /* @__PURE__ */ m(u, { className: "size-4" }),
166
166
  onClick: () => {
167
167
  let e = D[0];
168
168
  e && I(e.productId, e.licenseKey);
@@ -173,30 +173,30 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
173
173
  id: "orders",
174
174
  label: "Keep this receipt",
175
175
  description: "Find this order any time under My Orders.",
176
- icon: /* @__PURE__ */ p(f, { className: "size-4" }),
176
+ icon: /* @__PURE__ */ m(f, { className: "size-4" }),
177
177
  onClick: () => x(`${S}/orders`)
178
178
  },
179
179
  {
180
180
  id: "shop",
181
181
  label: "Discover more",
182
182
  description: "Browse the marketplace for more apps and tools.",
183
- icon: /* @__PURE__ */ p(s, { className: "size-4" }),
183
+ icon: /* @__PURE__ */ m(s, { className: "size-4" }),
184
184
  onClick: () => x(`${S}/marketplace`)
185
185
  }
186
186
  ]
187
187
  }),
188
- /* @__PURE__ */ m("div", {
188
+ /* @__PURE__ */ h("div", {
189
189
  className: "mt-6 flex flex-col gap-2 sm:flex-row sm:justify-center",
190
- children: [/* @__PURE__ */ m("button", {
190
+ children: [/* @__PURE__ */ h("button", {
191
191
  type: "button",
192
192
  onClick: () => x(`${S}/orders`),
193
193
  className: "cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text",
194
- children: [/* @__PURE__ */ p(f, { className: "size-4" }), "View My Orders"]
195
- }), /* @__PURE__ */ m("button", {
194
+ children: [/* @__PURE__ */ m(f, { className: "size-4" }), "View My Orders"]
195
+ }), /* @__PURE__ */ h("button", {
196
196
  type: "button",
197
197
  onClick: () => x(`${S}/marketplace`),
198
198
  className: "cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg border border-border-default px-4 py-2 text-sm font-semibold text-text-primary hover:bg-surface-hover",
199
- children: ["Continue Shopping", /* @__PURE__ */ p(s, { className: "size-4" })]
199
+ children: ["Continue Shopping", /* @__PURE__ */ m(s, { className: "size-4" })]
200
200
  })]
201
201
  })
202
202
  ]
@@ -1,9 +1,9 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
2
  import { useOrderStatusUpdatedSubscription as t } from "../generated/global-operations.js";
3
3
  import { formatPrice as n } from "../utils/index.js";
4
- import { useInstallations as r } from "../hooks/useInstallations.js";
5
- import { useOrders as i } from "../hooks/useOrders.js";
6
- import { InstallAppModal as a } from "../components/InstallAppModal.js";
4
+ import { InstallAppModal as r } from "../components/InstallAppModal.js";
5
+ import { useInstallations as i } from "../hooks/useInstallations.js";
6
+ import { useOrders as a } from "../hooks/useOrders.js";
7
7
  import { useMemo as o, useState as s } from "react";
8
8
  import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
9
  import { ArrowLeft as l, CheckCircle as u, Clock as d, Download as f, Loader2 as p, Package as m, RefreshCw as h, ShoppingBag as g, XCircle as _ } from "lucide-react";
@@ -184,7 +184,7 @@ var T = (e) => {
184
184
  ]
185
185
  });
186
186
  }, O = () => {
187
- let n = x(), { basePath: u } = e(), { t: d } = c(), { orders: f, loading: h, error: v, refetchOrders: S, hasMore: T, loadMore: E } = i(), { installations: O, refetch: k } = r();
187
+ let n = x(), { basePath: u } = e(), { t: d } = c(), { orders: f, loading: h, error: v, refetchOrders: S, hasMore: T, loadMore: E } = a(), { installations: O, refetch: k } = i();
188
188
  t({
189
189
  onData: () => {
190
190
  S();
@@ -335,7 +335,7 @@ var T = (e) => {
335
335
  })]
336
336
  })]
337
337
  }),
338
- P && /* @__PURE__ */ y(a, {
338
+ P && /* @__PURE__ */ y(r, {
339
339
  isOpen: A,
340
340
  onClose: V,
341
341
  app: P,