@hanzo/ui 8.0.24 → 8.0.26
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/README.md +59 -0
- package/dist/ThemeToggleNext-AEDLHX5X.js +0 -1
- package/dist/ThemeToggleNext-N6ASYJ6J.cjs +0 -1
- package/dist/billing.cjs +0 -1
- package/dist/billing.js +0 -1
- package/dist/canvas.cjs +0 -1
- package/dist/canvas.js +0 -1
- package/dist/chunk-3NG33DV2.cjs +606 -0
- package/dist/chunk-3NG33DV2.cjs.map +1 -0
- package/dist/chunk-5CZOYONP.js +342 -0
- package/dist/chunk-5CZOYONP.js.map +1 -0
- package/dist/chunk-77AMCLN4.js +0 -1
- package/dist/chunk-7XDEUEWI.cjs +0 -1
- package/dist/{chunk-P2P6ST6J.js → chunk-7ZNK6JSS.js} +9 -395
- package/dist/chunk-7ZNK6JSS.js.map +1 -0
- package/dist/chunk-ARV3P4CE.cjs +0 -1
- package/dist/chunk-FVQXROBK.js +0 -1
- package/dist/chunk-GVCOAJLO.js +396 -0
- package/dist/chunk-GVCOAJLO.js.map +1 -0
- package/dist/chunk-GWNNLYX4.cjs +352 -0
- package/dist/chunk-GWNNLYX4.cjs.map +1 -0
- package/dist/chunk-MWBFAV3D.cjs +0 -1
- package/dist/{chunk-NBZDIMP3.cjs → chunk-ONVERVFG.cjs} +33 -439
- package/dist/chunk-ONVERVFG.cjs.map +1 -0
- package/dist/chunk-P2QU5MN5.js +554 -0
- package/dist/chunk-P2QU5MN5.js.map +1 -0
- package/dist/chunk-WHJR5S4L.cjs +417 -0
- package/dist/chunk-WHJR5S4L.cjs.map +1 -0
- package/dist/chunk-ZGTJCJ55.js +0 -1
- package/dist/dashboard.cjs +0 -1
- package/dist/dashboard.js +0 -1
- package/dist/data.cjs +0 -1
- package/dist/data.js +0 -1
- package/dist/framework/CollectionBuilder.d.ts +12 -0
- package/dist/framework/CollectionsBrowser.d.ts +26 -19
- package/dist/framework/DocTypeRecords.d.ts +31 -11
- package/dist/framework/MediaGrid.d.ts +42 -0
- package/dist/framework/RecordCards.d.ts +35 -0
- package/dist/framework/builder-logic.d.ts +76 -0
- package/dist/framework/client.d.ts +31 -44
- package/dist/framework/core.cjs +212 -0
- package/dist/framework/core.cjs.map +1 -0
- package/dist/framework/core.d.ts +6 -0
- package/dist/framework/core.js +3 -0
- package/dist/framework/core.js.map +1 -0
- package/dist/framework/data.d.ts +2 -2
- package/dist/framework/fields.d.ts +47 -4
- package/dist/framework/index.cjs +1339 -0
- package/dist/framework/index.cjs.map +1 -0
- package/dist/framework/index.d.ts +9 -23
- package/dist/framework/index.js +1118 -0
- package/dist/framework/index.js.map +1 -0
- package/dist/framework/media.d.ts +53 -0
- package/dist/framework/parts.d.ts +74 -0
- package/dist/framework/responsive.d.ts +41 -0
- package/dist/framework/types.d.ts +13 -7
- package/dist/gitops.cjs +0 -1
- package/dist/gitops.js +0 -1
- package/dist/gui-config.cjs +0 -1
- package/dist/gui-config.js +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -1
- package/dist/network.cjs +0 -1
- package/dist/network.js +0 -1
- package/dist/oss.cjs +0 -1
- package/dist/oss.js +0 -1
- package/dist/primitives/bases/data/index.cjs +0 -1
- package/dist/primitives/bases/data/index.js +0 -1
- package/dist/product/SelectMenu.d.ts +13 -1
- package/dist/product/index.cjs +2061 -337
- package/dist/product/index.cjs.map +1 -1
- package/dist/product/index.js +1909 -4
- package/dist/product/index.js.map +1 -1
- package/dist/product/social/api.cjs +0 -1
- package/dist/product/social/api.js +0 -1
- package/dist/product/social/index.cjs +17 -17
- package/dist/product/social/index.js +3 -3
- package/dist/telemetry.cjs +0 -1
- package/dist/telemetry.js +0 -1
- package/dist/usage.cjs +0 -1
- package/dist/usage.js +0 -1
- package/dist/wallet.cjs +0 -1
- package/dist/wallet.js +0 -1
- package/package.json +12 -18
- package/dist/chunk-2BM42AZR.cjs +0 -2301
- package/dist/chunk-2BM42AZR.cjs.map +0 -1
- package/dist/chunk-7P7R7FC5.js +0 -2231
- package/dist/chunk-7P7R7FC5.js.map +0 -1
- package/dist/chunk-NBZDIMP3.cjs.map +0 -1
- package/dist/chunk-P2P6ST6J.js.map +0 -1
- package/dist/framework/Loader.d.ts +0 -4
- package/dist/framework.cjs +0 -760
- package/dist/framework.cjs.map +0 -1
- package/dist/framework.d.ts +0 -1
- package/dist/framework.js +0 -730
- package/dist/framework.js.map +0 -1
- package/dist/styles/hanzo-motion.css +0 -188
|
@@ -1,77 +1,13 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
|
-
var chunk7XDEUEWI_cjs = require('./chunk-7XDEUEWI.cjs');
|
|
5
3
|
var chunkMWBFAV3D_cjs = require('./chunk-MWBFAV3D.cjs');
|
|
4
|
+
var chunkWHJR5S4L_cjs = require('./chunk-WHJR5S4L.cjs');
|
|
5
|
+
var chunk7XDEUEWI_cjs = require('./chunk-7XDEUEWI.cjs');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var gui = require('@hanzo/gui');
|
|
8
8
|
var lucideIcons2 = require('@hanzogui/lucide-icons-2');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
11
|
-
var HostCtx = react.createContext({});
|
|
12
|
-
var HostProvider = ({ actions, children }) => /* @__PURE__ */ jsxRuntime.jsx(HostCtx.Provider, { value: actions, children });
|
|
13
|
-
var useHost = () => react.useContext(HostCtx);
|
|
14
|
-
function classifyBackend(e) {
|
|
15
|
-
const status = typeof e?.status === "number" ? e.status : 0;
|
|
16
|
-
const message = e instanceof Error ? e.message : String(e);
|
|
17
|
-
if (status === 503) return { kind: "not-initialized", message };
|
|
18
|
-
if (status === 404 || status === 405) return { kind: "unavailable", message };
|
|
19
|
-
if (status === 501) return { kind: "not-implemented", message };
|
|
20
|
-
if (status === 402) return { kind: "billing", message };
|
|
21
|
-
if (status === 401) return { kind: "signin", message };
|
|
22
|
-
if (status === 403) return { kind: "access", message };
|
|
23
|
-
return { kind: "error", message };
|
|
24
|
-
}
|
|
25
|
-
function classifyRead(e) {
|
|
26
|
-
const s = classifyBackend(e);
|
|
27
|
-
return s.kind === "billing" ? null : s;
|
|
28
|
-
}
|
|
29
|
-
var TITLES = {
|
|
30
|
-
"not-initialized": "Backend not initialized",
|
|
31
|
-
unavailable: "Not available on this deployment yet",
|
|
32
|
-
"not-implemented": "Not yet available",
|
|
33
|
-
access: "Not enabled for your account",
|
|
34
|
-
signin: "Your session expired",
|
|
35
|
-
billing: "Add credits to continue",
|
|
36
|
-
error: "Could not reach the backend"
|
|
37
|
-
};
|
|
38
|
-
var BODIES = {
|
|
39
|
-
"not-initialized": "The /v1 route is mounted but its runtime (or the console API key it proxies to) is not configured on this deployment yet. Real data appears here once it is \u2014 no placeholder data is shown.",
|
|
40
|
-
unavailable: "This endpoint is not mounted at the gateway on this host yet. The view lights up automatically once the route is live.",
|
|
41
|
-
// 501 — a real, planned capability whose body ships in a later phase.
|
|
42
|
-
"not-implemented": "This capability is planned but not wired yet. The backend answers honestly rather than pretending it worked \u2014 nothing here is fabricated, and the view lights up automatically once it ships.",
|
|
43
|
-
// 403 for a SIGNED-IN user — never "sign in".
|
|
44
|
-
access: "You're signed in, but this isn't enabled for your organization on this deployment, or it's an admin-only surface. It appears here automatically once your account has access \u2014 nothing is fabricated.",
|
|
45
|
-
// 401 — the session itself lapsed; re-auth returns to this exact page.
|
|
46
|
-
signin: "Your session has expired or isn\u2019t recognized here. Sign in again to continue where you left off.",
|
|
47
|
-
// Empty → the card shows the backend's own message (the honest "Insufficient
|
|
48
|
-
// balance. Please add credits…" from the gateway billing gate).
|
|
49
|
-
billing: "",
|
|
50
|
-
error: ""
|
|
51
|
-
};
|
|
52
|
-
function BackendStateCard({
|
|
53
|
-
state,
|
|
54
|
-
onRetry,
|
|
55
|
-
hint
|
|
56
|
-
}) {
|
|
57
|
-
const { signIn, addCredits } = useHost();
|
|
58
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(gui.Card, { borderWidth: 1, borderColor: "$borderColor", p: "$4", gap: "$2", maxWidth: 640, children: [
|
|
59
|
-
/* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", items: "center", children: [
|
|
60
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.TriangleAlert, { size: 16 }),
|
|
61
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$4", fontWeight: "700", children: TITLES[state.kind] })
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color11", children: BODIES[state.kind] || state.message }),
|
|
64
|
-
hint ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color10", children: hint }) : null,
|
|
65
|
-
state.kind === "signin" && signIn ? /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", theme: "light", self: "flex-start", onPress: signIn, children: "Sign in again" }) : state.kind === "billing" && addCredits ? (
|
|
66
|
-
// 402 — the org has no funded balance. Offer a top-up CTA (and keep Retry so
|
|
67
|
-
// a returning, funded caller can reload in place).
|
|
68
|
-
/* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", items: "center", flexWrap: "wrap", children: [
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", theme: "light", self: "flex-start", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.CreditCard, { size: 14 }), onPress: addCredits, children: "Add credits" }),
|
|
70
|
-
onRetry ? /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", self: "flex-start", onPress: onRetry, children: "Retry" }) : null
|
|
71
|
-
] })
|
|
72
|
-
) : onRetry ? /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", self: "flex-start", onPress: onRetry, children: "Retry" }) : null
|
|
73
|
-
] });
|
|
74
|
-
}
|
|
75
11
|
function SkeletonRows({ columns, count = 6 }) {
|
|
76
12
|
return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { children: Array.from({ length: count }).map((_, r) => /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { py: "$2.5", px: "$3", gap: "$3", borderTopWidth: 1, borderColor: "$borderColor", items: "center", children: columns.map((c, i) => /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { width: c.width, flex: c.width ? void 0 : 1, minW: c.width ? void 0 : FLEX_MIN_COL_W, items: c.align === "right" ? "flex-end" : "flex-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
13
|
"div",
|
|
@@ -193,328 +129,6 @@ function DataTable({
|
|
|
193
129
|
] });
|
|
194
130
|
}
|
|
195
131
|
var FLEX_MIN_COL_W = 120;
|
|
196
|
-
function isHexColor(v) {
|
|
197
|
-
return typeof v === "string" && /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(v.trim());
|
|
198
|
-
}
|
|
199
|
-
function resolveAccent(theme) {
|
|
200
|
-
if (!theme || !theme.isEnabled) return null;
|
|
201
|
-
const hex = (theme.colorPrimary ?? "").trim();
|
|
202
|
-
return isHexColor(hex) ? hex : null;
|
|
203
|
-
}
|
|
204
|
-
function expandHex(hex) {
|
|
205
|
-
const h = hex.trim().toLowerCase();
|
|
206
|
-
if (h.length === 4) return `#${h[1]}${h[1]}${h[2]}${h[2]}${h[3]}${h[3]}`;
|
|
207
|
-
return h;
|
|
208
|
-
}
|
|
209
|
-
function contrastText(hex) {
|
|
210
|
-
if (!isHexColor(hex)) return "#ffffff";
|
|
211
|
-
const h = expandHex(hex);
|
|
212
|
-
const r = parseInt(h.slice(1, 3), 16) / 255;
|
|
213
|
-
const g = parseInt(h.slice(3, 5), 16) / 255;
|
|
214
|
-
const b = parseInt(h.slice(5, 7), 16) / 255;
|
|
215
|
-
const lin = (c) => c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
216
|
-
const luminance = 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
|
|
217
|
-
return luminance > 0.5 ? "#000000" : "#ffffff";
|
|
218
|
-
}
|
|
219
|
-
function accentFor(theme) {
|
|
220
|
-
const hex = resolveAccent(theme);
|
|
221
|
-
return { accent: hex, contrast: hex ? contrastText(hex) : "#ffffff" };
|
|
222
|
-
}
|
|
223
|
-
var DEFAULT = { accent: null, contrast: "#ffffff" };
|
|
224
|
-
var current = DEFAULT;
|
|
225
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
226
|
-
function setOrgAccent(theme) {
|
|
227
|
-
const next = accentFor(theme);
|
|
228
|
-
if (next.accent === current.accent) return;
|
|
229
|
-
current = next.accent ? next : DEFAULT;
|
|
230
|
-
for (const l of listeners) l();
|
|
231
|
-
}
|
|
232
|
-
function subscribe(cb) {
|
|
233
|
-
listeners.add(cb);
|
|
234
|
-
return () => {
|
|
235
|
-
listeners.delete(cb);
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
function useAccent() {
|
|
239
|
-
return react.useSyncExternalStore(
|
|
240
|
-
subscribe,
|
|
241
|
-
() => current,
|
|
242
|
-
() => DEFAULT
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
function PrimaryButton({ onPress, ...rest }) {
|
|
246
|
-
const { accent, contrast } = useAccent();
|
|
247
|
-
const track = chunk7XDEUEWI_cjs.useEmit();
|
|
248
|
-
const press = (e) => {
|
|
249
|
-
track({
|
|
250
|
-
component: "PrimaryButton",
|
|
251
|
-
action: "click",
|
|
252
|
-
id: chunk7XDEUEWI_cjs.labelOf(rest.children) ?? rest["aria-label"]
|
|
253
|
-
});
|
|
254
|
-
onPress?.(e);
|
|
255
|
-
};
|
|
256
|
-
const handler = press;
|
|
257
|
-
if (accent) {
|
|
258
|
-
return /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { style: { backgroundColor: accent, color: contrast, borderColor: accent }, onPress: handler, ...rest });
|
|
259
|
-
}
|
|
260
|
-
return /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { theme: "light", onPress: handler, ...rest });
|
|
261
|
-
}
|
|
262
|
-
function openHref(href) {
|
|
263
|
-
if (typeof window !== "undefined") window.open(href, "_blank", "noopener");
|
|
264
|
-
}
|
|
265
|
-
function EmptyState({
|
|
266
|
-
icon: Icon,
|
|
267
|
-
title,
|
|
268
|
-
description,
|
|
269
|
-
bullets,
|
|
270
|
-
primary,
|
|
271
|
-
secondary
|
|
272
|
-
}) {
|
|
273
|
-
const track = chunk7XDEUEWI_cjs.useEmit();
|
|
274
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
275
|
-
gui.Card,
|
|
276
|
-
{
|
|
277
|
-
borderWidth: 1,
|
|
278
|
-
borderColor: "$borderColor",
|
|
279
|
-
borderStyle: "dashed",
|
|
280
|
-
p: "$6",
|
|
281
|
-
gap: "$4",
|
|
282
|
-
items: "center",
|
|
283
|
-
maxWidth: 640,
|
|
284
|
-
self: "center",
|
|
285
|
-
width: "100%",
|
|
286
|
-
children: [
|
|
287
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
288
|
-
gui.YStack,
|
|
289
|
-
{
|
|
290
|
-
width: 48,
|
|
291
|
-
height: 48,
|
|
292
|
-
items: "center",
|
|
293
|
-
justify: "center",
|
|
294
|
-
rounded: "$4",
|
|
295
|
-
bg: "$color3",
|
|
296
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 24 })
|
|
297
|
-
}
|
|
298
|
-
),
|
|
299
|
-
/* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$2", items: "center", maxW: 480, children: [
|
|
300
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$6", fontWeight: "500", text: "center", letterSpacing: -0.3, children: title }),
|
|
301
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color11", text: "center", children: description })
|
|
302
|
-
] }),
|
|
303
|
-
bullets && bullets.length ? /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$2", self: "stretch", maxW: 420, mx: "auto", children: bullets.map((b) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", items: "flex-start", children: [
|
|
304
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { pt: "$1", children: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Check, { size: 14, color: "$color10" }) }),
|
|
305
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color11", flex: 1, children: b })
|
|
306
|
-
] }, b)) }) : null,
|
|
307
|
-
primary || secondary ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", items: "center", flexWrap: "wrap", justify: "center", children: [
|
|
308
|
-
primary ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
309
|
-
PrimaryButton,
|
|
310
|
-
{
|
|
311
|
-
icon: primary.icon,
|
|
312
|
-
iconAfter: primary.href ? /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.ExternalLink, { size: 15 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.ArrowRight, { size: 15 }),
|
|
313
|
-
onPress: () => {
|
|
314
|
-
track({ component: "EmptyState", action: "click", id: title, value: primary.label });
|
|
315
|
-
if (primary.href) openHref(primary.href);
|
|
316
|
-
else primary.onPress?.();
|
|
317
|
-
},
|
|
318
|
-
children: primary.label
|
|
319
|
-
}
|
|
320
|
-
) : null,
|
|
321
|
-
secondary ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
322
|
-
gui.Button,
|
|
323
|
-
{
|
|
324
|
-
chromeless: true,
|
|
325
|
-
icon: secondary.icon,
|
|
326
|
-
iconAfter: secondary.href ? /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.ExternalLink, { size: 14 }) : void 0,
|
|
327
|
-
onPress: () => {
|
|
328
|
-
track({ component: "EmptyState", action: "click", id: title, value: secondary.label });
|
|
329
|
-
if (secondary.href) openHref(secondary.href);
|
|
330
|
-
else secondary.onPress?.();
|
|
331
|
-
},
|
|
332
|
-
children: secondary.label
|
|
333
|
-
}
|
|
334
|
-
) : null
|
|
335
|
-
] }) : null
|
|
336
|
-
]
|
|
337
|
-
}
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
var FieldNameContext = react.createContext(void 0);
|
|
341
|
-
function useFieldTrack(component) {
|
|
342
|
-
const track = chunk7XDEUEWI_cjs.useEmit();
|
|
343
|
-
const name = react.useContext(FieldNameContext);
|
|
344
|
-
return (e) => track({ component, id: name, ...e });
|
|
345
|
-
}
|
|
346
|
-
function FieldRow({ label, children }) {
|
|
347
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FieldNameContext.Provider, { value: label, children: /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$3", items: "flex-start", flexWrap: "wrap", children: [
|
|
348
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Label, { width: "100%", pt: "$2", color: "$color11", fontSize: "$3", $md: { width: 180 }, children: label }),
|
|
349
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { flex: 1, minW: 0, $md: { minW: 240 }, children })
|
|
350
|
-
] }) });
|
|
351
|
-
}
|
|
352
|
-
function FieldText({
|
|
353
|
-
value,
|
|
354
|
-
onChange,
|
|
355
|
-
disabled,
|
|
356
|
-
secure,
|
|
357
|
-
placeholder
|
|
358
|
-
}) {
|
|
359
|
-
const track = useFieldTrack("FieldText");
|
|
360
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
361
|
-
gui.Input,
|
|
362
|
-
{
|
|
363
|
-
value,
|
|
364
|
-
onChangeText: (v) => {
|
|
365
|
-
track({ action: "change", value: secure ? 0 : chunk7XDEUEWI_cjs.textSize(v) });
|
|
366
|
-
onChange(v);
|
|
367
|
-
},
|
|
368
|
-
disabled,
|
|
369
|
-
secureTextEntry: secure,
|
|
370
|
-
placeholder,
|
|
371
|
-
autoCapitalize: "none"
|
|
372
|
-
}
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
function FieldTextArea({
|
|
376
|
-
value,
|
|
377
|
-
onChange,
|
|
378
|
-
disabled,
|
|
379
|
-
rows = 6
|
|
380
|
-
}) {
|
|
381
|
-
const track = useFieldTrack("FieldTextArea");
|
|
382
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
383
|
-
gui.TextArea,
|
|
384
|
-
{
|
|
385
|
-
value,
|
|
386
|
-
onChangeText: (v) => {
|
|
387
|
-
track({ action: "change", value: chunk7XDEUEWI_cjs.textSize(v) });
|
|
388
|
-
onChange(v);
|
|
389
|
-
},
|
|
390
|
-
disabled,
|
|
391
|
-
numberOfLines: rows
|
|
392
|
-
}
|
|
393
|
-
);
|
|
394
|
-
}
|
|
395
|
-
function FieldSwitch({
|
|
396
|
-
checked,
|
|
397
|
-
onChange,
|
|
398
|
-
disabled
|
|
399
|
-
}) {
|
|
400
|
-
const track = useFieldTrack("FieldSwitch");
|
|
401
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
402
|
-
gui.Switch,
|
|
403
|
-
{
|
|
404
|
-
checked,
|
|
405
|
-
onCheckedChange: (v) => {
|
|
406
|
-
track({ action: "change", value: v });
|
|
407
|
-
onChange(v);
|
|
408
|
-
},
|
|
409
|
-
disabled,
|
|
410
|
-
size: "$3",
|
|
411
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(gui.Switch.Thumb, {})
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
var CHEVRON = `data:image/svg+xml,${encodeURIComponent(
|
|
416
|
-
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#9a9a9a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>'
|
|
417
|
-
)}`;
|
|
418
|
-
function selectStyle(disabled) {
|
|
419
|
-
return {
|
|
420
|
-
width: "100%",
|
|
421
|
-
boxSizing: "border-box",
|
|
422
|
-
appearance: "none",
|
|
423
|
-
WebkitAppearance: "none",
|
|
424
|
-
MozAppearance: "none",
|
|
425
|
-
background: `var(--background) url("${CHEVRON}") no-repeat right 10px center`,
|
|
426
|
-
color: "var(--color12)",
|
|
427
|
-
border: "1px solid var(--borderColor)",
|
|
428
|
-
borderRadius: 9,
|
|
429
|
-
padding: "9px 34px 9px 12px",
|
|
430
|
-
fontSize: 14,
|
|
431
|
-
lineHeight: "20px",
|
|
432
|
-
fontFamily: "inherit",
|
|
433
|
-
height: 40,
|
|
434
|
-
outline: "none",
|
|
435
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
436
|
-
opacity: disabled ? 0.5 : 1
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
var OPTION_STYLE = { background: "var(--color2)", color: "var(--color12)" };
|
|
440
|
-
function FieldSelect({
|
|
441
|
-
value,
|
|
442
|
-
options,
|
|
443
|
-
onChange,
|
|
444
|
-
disabled,
|
|
445
|
-
placeholder = "Select\u2026"
|
|
446
|
-
}) {
|
|
447
|
-
const track = useFieldTrack("FieldSelect");
|
|
448
|
-
const showPlaceholder = value === "" || !options.includes(value);
|
|
449
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
450
|
-
"select",
|
|
451
|
-
{
|
|
452
|
-
value: showPlaceholder ? "" : value,
|
|
453
|
-
onChange: (e) => {
|
|
454
|
-
track({ action: "change", value: e.currentTarget.value });
|
|
455
|
-
onChange(e.currentTarget.value);
|
|
456
|
-
},
|
|
457
|
-
disabled,
|
|
458
|
-
"aria-label": placeholder,
|
|
459
|
-
style: selectStyle(disabled),
|
|
460
|
-
children: [
|
|
461
|
-
showPlaceholder ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, style: OPTION_STYLE, children: placeholder }) : null,
|
|
462
|
-
options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt, style: OPTION_STYLE, children: opt }, opt))
|
|
463
|
-
]
|
|
464
|
-
}
|
|
465
|
-
);
|
|
466
|
-
}
|
|
467
|
-
function FieldSlider({
|
|
468
|
-
value,
|
|
469
|
-
min,
|
|
470
|
-
max,
|
|
471
|
-
step,
|
|
472
|
-
onChange,
|
|
473
|
-
disabled
|
|
474
|
-
}) {
|
|
475
|
-
const track = useFieldTrack("FieldSlider");
|
|
476
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$3", items: "center", children: [
|
|
477
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { width: 56, fontSize: "$3", color: "$color11", children: value }),
|
|
478
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
479
|
-
gui.Slider,
|
|
480
|
-
{
|
|
481
|
-
flex: 1,
|
|
482
|
-
min,
|
|
483
|
-
max,
|
|
484
|
-
step,
|
|
485
|
-
value: [value],
|
|
486
|
-
onValueChange: (v) => {
|
|
487
|
-
track({ action: "change", value: v[0] ?? min });
|
|
488
|
-
onChange(v[0] ?? min);
|
|
489
|
-
},
|
|
490
|
-
disabled,
|
|
491
|
-
children: [
|
|
492
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Slider.Track, { children: /* @__PURE__ */ jsxRuntime.jsx(gui.Slider.TrackActive, {}) }),
|
|
493
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Slider.Thumb, { index: 0, circular: true })
|
|
494
|
-
]
|
|
495
|
-
}
|
|
496
|
-
)
|
|
497
|
-
] });
|
|
498
|
-
}
|
|
499
|
-
function PageHeader({
|
|
500
|
-
title,
|
|
501
|
-
subtitle,
|
|
502
|
-
actions
|
|
503
|
-
}) {
|
|
504
|
-
return (
|
|
505
|
-
// flexWrap lets the actions drop below the title on narrow screens; flex={1}
|
|
506
|
-
// minW={0} lets the title column shrink so a long subtitle WRAPS instead of
|
|
507
|
-
// running off the viewport (a flex child defaults to min-width:auto = content
|
|
508
|
-
// width, which would overflow on mobile).
|
|
509
|
-
/* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { justify: "space-between", items: "flex-start", gap: "$3", flexWrap: "wrap", children: [
|
|
510
|
-
/* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$1", flex: 1, minW: 200, children: [
|
|
511
|
-
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$7", fontWeight: "500", letterSpacing: -0.4, children: title }),
|
|
512
|
-
subtitle ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color11", children: subtitle }) : null
|
|
513
|
-
] }),
|
|
514
|
-
actions ? /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { gap: "$2", items: "center", flexWrap: "wrap", width: "100%", $md: { width: "auto", justify: "flex-end" }, children: actions }) : null
|
|
515
|
-
] })
|
|
516
|
-
);
|
|
517
|
-
}
|
|
518
132
|
var toneOf = (status) => {
|
|
519
133
|
const s = status.toLowerCase();
|
|
520
134
|
if (s === "green") return "green";
|
|
@@ -729,7 +343,7 @@ function PostAgenda({ posts, onOpen }) {
|
|
|
729
343
|
}, [posts]);
|
|
730
344
|
if (days.length === 0) {
|
|
731
345
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
732
|
-
EmptyState,
|
|
346
|
+
chunkWHJR5S4L_cjs.EmptyState,
|
|
733
347
|
{
|
|
734
348
|
icon: lucideIcons2.Calendar,
|
|
735
349
|
title: "Nothing on the calendar",
|
|
@@ -816,10 +430,10 @@ function PostComposer({
|
|
|
816
430
|
}
|
|
817
431
|
};
|
|
818
432
|
return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$3", p: "$4", children: [
|
|
819
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Content", children: /* @__PURE__ */ jsxRuntime.jsx(FieldTextArea, { value: content, onChange: setContent, disabled: saving }) }),
|
|
820
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Channel", children: /* @__PURE__ */ jsxRuntime.jsx(FieldSelect, { value: channel, options: channels, onChange: setChannel, disabled: saving }) }),
|
|
821
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "When", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
822
|
-
FieldSelect,
|
|
433
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Content", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldTextArea, { value: content, onChange: setContent, disabled: saving }) }),
|
|
434
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Channel", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldSelect, { value: channel, options: channels, onChange: setChannel, disabled: saving }) }),
|
|
435
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "When", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
436
|
+
chunkWHJR5S4L_cjs.FieldSelect,
|
|
823
437
|
{
|
|
824
438
|
value: mode,
|
|
825
439
|
options: [...COMPOSE_MODES],
|
|
@@ -827,8 +441,8 @@ function PostComposer({
|
|
|
827
441
|
disabled: saving
|
|
828
442
|
}
|
|
829
443
|
) }),
|
|
830
|
-
mode === "schedule" ? /* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Schedule at", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
831
|
-
FieldText,
|
|
444
|
+
mode === "schedule" ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Schedule at", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
445
|
+
chunkWHJR5S4L_cjs.FieldText,
|
|
832
446
|
{
|
|
833
447
|
value: scheduleAt,
|
|
834
448
|
onChange: setScheduleAt,
|
|
@@ -846,7 +460,7 @@ function PostComposer({
|
|
|
846
460
|
] })
|
|
847
461
|
] }) : null,
|
|
848
462
|
error ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$red10", children: error }) : null,
|
|
849
|
-
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onPress: submit, disabled: saving, children: saving ? "Working\u2026" : COMPOSE_LABEL[mode] })
|
|
463
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.PrimaryButton, { onPress: submit, disabled: saving, children: saving ? "Working\u2026" : COMPOSE_LABEL[mode] })
|
|
850
464
|
] });
|
|
851
465
|
}
|
|
852
466
|
function ProviderReadinessList({ providers }) {
|
|
@@ -939,21 +553,21 @@ function PostDetail({ api, post, onChanged }) {
|
|
|
939
553
|
await api.posts.publish(post.id);
|
|
940
554
|
onChanged();
|
|
941
555
|
} catch (e) {
|
|
942
|
-
setError(classifyBackend(e).message || "Publish failed.");
|
|
556
|
+
setError(chunkWHJR5S4L_cjs.classifyBackend(e).message || "Publish failed.");
|
|
943
557
|
} finally {
|
|
944
558
|
setPublishing(false);
|
|
945
559
|
}
|
|
946
560
|
};
|
|
947
561
|
return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$3", p: "$4", children: [
|
|
948
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Content", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", children: post.content || "\u2014" }) }),
|
|
949
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Channel", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", children: post.channel }) }),
|
|
950
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Status", children: /* @__PURE__ */ jsxRuntime.jsx(StatusTag, { status: post.status }) }),
|
|
951
|
-
post.scheduleAt > 0 ? /* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Scheduled", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", children: formatPostTime(post.scheduleAt) }) }) : null,
|
|
952
|
-
post.media.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Media", children: /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$1", children: post.media.map((m) => /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: m }, m)) }) }) : null,
|
|
953
|
-
post.externalId ? /* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "External id", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", className: "hz-tnum", children: post.externalId }) }) : null,
|
|
954
|
-
post.error ? /* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Last error", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$red10", children: post.error }) }) : null,
|
|
562
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Content", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", children: post.content || "\u2014" }) }),
|
|
563
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Channel", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", children: post.channel }) }),
|
|
564
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Status", children: /* @__PURE__ */ jsxRuntime.jsx(StatusTag, { status: post.status }) }),
|
|
565
|
+
post.scheduleAt > 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Scheduled", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", children: formatPostTime(post.scheduleAt) }) }) : null,
|
|
566
|
+
post.media.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Media", children: /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$1", children: post.media.map((m) => /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: m }, m)) }) }) : null,
|
|
567
|
+
post.externalId ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "External id", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", className: "hz-tnum", children: post.externalId }) }) : null,
|
|
568
|
+
post.error ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Last error", children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$red10", children: post.error }) }) : null,
|
|
955
569
|
error ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$red10", children: error }) : null,
|
|
956
|
-
canPublish ? /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onPress: publish, disabled: publishing, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Send, { size: 16 }), children: publishing ? "Publishing\u2026" : "Publish now" }) : null
|
|
570
|
+
canPublish ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.PrimaryButton, { onPress: publish, disabled: publishing, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Send, { size: 16 }), children: publishing ? "Publishing\u2026" : "Publish now" }) : null
|
|
957
571
|
] });
|
|
958
572
|
}
|
|
959
573
|
function ConnectAccount({
|
|
@@ -972,7 +586,7 @@ function ConnectAccount({
|
|
|
972
586
|
await api.accounts.create({ provider, handle: handle.trim(), status: "connected" });
|
|
973
587
|
onCreated();
|
|
974
588
|
} catch (e) {
|
|
975
|
-
setError(classifyBackend(e).message || "Failed to connect account.");
|
|
589
|
+
setError(chunkWHJR5S4L_cjs.classifyBackend(e).message || "Failed to connect account.");
|
|
976
590
|
} finally {
|
|
977
591
|
setSaving(false);
|
|
978
592
|
}
|
|
@@ -980,10 +594,10 @@ function ConnectAccount({
|
|
|
980
594
|
return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$4", p: "$4", children: [
|
|
981
595
|
/* @__PURE__ */ jsxRuntime.jsx(ProviderReadinessList, { providers }),
|
|
982
596
|
/* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$3", children: [
|
|
983
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Network", children: /* @__PURE__ */ jsxRuntime.jsx(FieldSelect, { value: provider, options: [...chunkMWBFAV3D_cjs.PROVIDERS], onChange: setProvider, disabled: saving }) }),
|
|
984
|
-
/* @__PURE__ */ jsxRuntime.jsx(FieldRow, { label: "Handle", children: /* @__PURE__ */ jsxRuntime.jsx(FieldText, { value: handle, onChange: setHandle, placeholder: "@hanzo", disabled: saving }) }),
|
|
597
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Network", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldSelect, { value: provider, options: [...chunkMWBFAV3D_cjs.PROVIDERS], onChange: setProvider, disabled: saving }) }),
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldRow, { label: "Handle", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.FieldText, { value: handle, onChange: setHandle, placeholder: "@hanzo", disabled: saving }) }),
|
|
985
599
|
error ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$red10", children: error }) : null,
|
|
986
|
-
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onPress: submit, disabled: saving, children: saving ? "Connecting\u2026" : "Connect account" })
|
|
600
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.PrimaryButton, { onPress: submit, disabled: saving, children: saving ? "Connecting\u2026" : "Connect account" })
|
|
987
601
|
] })
|
|
988
602
|
] });
|
|
989
603
|
}
|
|
@@ -1008,7 +622,7 @@ function SocialResource({
|
|
|
1008
622
|
]);
|
|
1009
623
|
setState({ phase: "ready", data: { summary, posts: posts2, accounts: accounts2, providers: providers2 } });
|
|
1010
624
|
} catch (e) {
|
|
1011
|
-
setState({ phase: "error", error: classifyBackend(e) });
|
|
625
|
+
setState({ phase: "error", error: chunkWHJR5S4L_cjs.classifyBackend(e) });
|
|
1012
626
|
}
|
|
1013
627
|
}, [api]);
|
|
1014
628
|
react.useEffect(() => {
|
|
@@ -1023,7 +637,7 @@ function SocialResource({
|
|
|
1023
637
|
const created = await api.posts.create(draft);
|
|
1024
638
|
if (mode === "now" && created.status === "failed") return created.error || "Publish failed.";
|
|
1025
639
|
} catch (e) {
|
|
1026
|
-
return classifyBackend(e).message || "Failed to create post.";
|
|
640
|
+
return chunkWHJR5S4L_cjs.classifyBackend(e).message || "Failed to create post.";
|
|
1027
641
|
}
|
|
1028
642
|
setComposing(false);
|
|
1029
643
|
void load();
|
|
@@ -1031,21 +645,21 @@ function SocialResource({
|
|
|
1031
645
|
};
|
|
1032
646
|
return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$4", p: "$4", children: [
|
|
1033
647
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1034
|
-
PageHeader,
|
|
648
|
+
chunkWHJR5S4L_cjs.PageHeader,
|
|
1035
649
|
{
|
|
1036
650
|
title,
|
|
1037
651
|
subtitle,
|
|
1038
652
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1039
|
-
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onPress: () => setComposing(true), icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Plus, { size: 16 }), children: "New post" }),
|
|
1040
|
-
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onPress: () => setConnecting(true), icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Link2, { size: 16 }), children: "Connect account" }),
|
|
1041
|
-
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onPress: () => void load(), icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.RefreshCw, { size: 16 }), children: "Refresh" })
|
|
653
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.PrimaryButton, { onPress: () => setComposing(true), icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Plus, { size: 16 }), children: "New post" }),
|
|
654
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.PrimaryButton, { onPress: () => setConnecting(true), icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Link2, { size: 16 }), children: "Connect account" }),
|
|
655
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.PrimaryButton, { onPress: () => void load(), icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.RefreshCw, { size: 16 }), children: "Refresh" })
|
|
1042
656
|
] })
|
|
1043
657
|
}
|
|
1044
658
|
),
|
|
1045
|
-
state.phase === "error" ? /* @__PURE__ */ jsxRuntime.jsx(BackendStateCard, { state: state.error, onRetry: () => void load() }) : empty ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$4", children: [
|
|
659
|
+
state.phase === "error" ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.BackendStateCard, { state: state.error, onRetry: () => void load() }) : empty ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$4", children: [
|
|
1046
660
|
state.phase === "ready" ? /* @__PURE__ */ jsxRuntime.jsx(SocialSummaryBar, { summary: state.data.summary }) : null,
|
|
1047
661
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
-
EmptyState,
|
|
662
|
+
chunkWHJR5S4L_cjs.EmptyState,
|
|
1049
663
|
{
|
|
1050
664
|
icon: lucideIcons2.Share2,
|
|
1051
665
|
title: "No posts or accounts yet",
|
|
@@ -1213,44 +827,24 @@ function PostCard({
|
|
|
1213
827
|
] });
|
|
1214
828
|
}
|
|
1215
829
|
|
|
1216
|
-
exports.BackendStateCard = BackendStateCard;
|
|
1217
830
|
exports.COMPOSE_MODES = COMPOSE_MODES;
|
|
1218
831
|
exports.CampaignCard = CampaignCard;
|
|
1219
832
|
exports.ChannelBadge = ChannelBadge;
|
|
1220
833
|
exports.DataTable = DataTable;
|
|
1221
|
-
exports.EmptyState = EmptyState;
|
|
1222
|
-
exports.FieldRow = FieldRow;
|
|
1223
|
-
exports.FieldSelect = FieldSelect;
|
|
1224
|
-
exports.FieldSlider = FieldSlider;
|
|
1225
|
-
exports.FieldSwitch = FieldSwitch;
|
|
1226
|
-
exports.FieldText = FieldText;
|
|
1227
|
-
exports.FieldTextArea = FieldTextArea;
|
|
1228
|
-
exports.HostProvider = HostProvider;
|
|
1229
834
|
exports.LG = LG;
|
|
1230
|
-
exports.PageHeader = PageHeader;
|
|
1231
835
|
exports.PostAgenda = PostAgenda;
|
|
1232
836
|
exports.PostCard = PostCard;
|
|
1233
837
|
exports.PostComposer = PostComposer;
|
|
1234
|
-
exports.PrimaryButton = PrimaryButton;
|
|
1235
838
|
exports.ProviderReadinessList = ProviderReadinessList;
|
|
1236
839
|
exports.SlideOver = SlideOver;
|
|
1237
840
|
exports.SocialResource = SocialResource;
|
|
1238
841
|
exports.SocialSummaryBar = SocialSummaryBar;
|
|
1239
842
|
exports.StatusTag = StatusTag;
|
|
1240
843
|
exports.ViewToggle = ViewToggle;
|
|
1241
|
-
exports.accentFor = accentFor;
|
|
1242
844
|
exports.asColor = asColor;
|
|
1243
|
-
exports.classifyBackend = classifyBackend;
|
|
1244
|
-
exports.classifyRead = classifyRead;
|
|
1245
|
-
exports.contrastText = contrastText;
|
|
1246
845
|
exports.formatPostTime = formatPostTime;
|
|
1247
|
-
exports.isHexColor = isHexColor;
|
|
1248
846
|
exports.parsePostTime = parsePostTime;
|
|
1249
847
|
exports.postDayBucket = postDayBucket;
|
|
1250
848
|
exports.postPreview = postPreview;
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
exports.useAccent = useAccent;
|
|
1254
|
-
exports.useHost = useHost;
|
|
1255
|
-
//# sourceMappingURL=chunk-NBZDIMP3.cjs.map
|
|
1256
|
-
//# sourceMappingURL=chunk-NBZDIMP3.cjs.map
|
|
849
|
+
//# sourceMappingURL=chunk-ONVERVFG.cjs.map
|
|
850
|
+
//# sourceMappingURL=chunk-ONVERVFG.cjs.map
|