@korso/shepherd-ui 0.3.0 → 0.3.1

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.
@@ -108,7 +108,7 @@ export function Workspaces({ workspaces, selected, onChanged, onSelect, onMember
108
108
  // InviteResponse has no `link`; build the shareable join URL from the code.
109
109
  // Encode the code for path-safety (parity with client.ts path encoding).
110
110
  const joinLink = invite
111
- ? `${window.location.origin}/join/${encodeURIComponent(invite.code)}`
111
+ ? `${window.location.origin}/shepherd/join/${encodeURIComponent(invite.code)}`
112
112
  : null;
113
113
  return (_jsxs("section", { className: "shepherd-workspaces", "aria-labelledby": headingId, children: [_jsxs("div", { className: "card-head", children: [_jsx("h3", { id: headingId, children: "Workspace management" }), _jsx("p", { className: "card-sub", children: "Create a workspace to get started, or join an existing one with an invite code." })] }), _jsxs("div", { className: "card-body", children: [error && _jsx("p", { role: "alert", children: error }), workspaces.length > 1 && onSelect && (_jsxs("div", { className: "field switcher", children: [_jsx("label", { htmlFor: "ws-switcher", children: "Active workspace" }), _jsx("select", { id: "ws-switcher", value: selected?.id ?? "", onChange: (e) => onSelect(e.target.value), children: workspaces.map((w) => (_jsx("option", { value: w.id, children: w.name }, w.id))) })] })), _jsxs("div", { className: "field create", children: [_jsx("label", { htmlFor: "ws-name", children: "Workspace name" }), _jsx("p", { className: "helper", children: "Start a fresh workspace \u2014 you'll be its admin." }), _jsxs("div", { className: "field__row", children: [_jsx("input", { id: "ws-name", type: "text", placeholder: "e.g. Acme Engineering", value: name, onChange: (e) => setName(e.target.value) }), _jsx("button", { type: "button", onClick: () => void create(), disabled: busy, children: "Create workspace" })] })] }), _jsxs("div", { className: "field join", children: [_jsx("label", { htmlFor: "invite-code", children: "Invite code" }), _jsx("p", { className: "helper", children: "Paste an invite code someone shared to join their workspace." }), _jsxs("div", { className: "field__row", children: [_jsx("input", { id: "invite-code", type: "text", placeholder: "Invite code", value: code, onChange: (e) => setCode(e.target.value) }), _jsx("button", { type: "button", onClick: () => void join(), disabled: busy, children: "Join" })] })] }), isAdmin && selected && (_jsxs("div", { className: "admin", children: [_jsxs("div", { className: "invites", children: [_jsx("button", { type: "button", onClick: () => void createInvite(), disabled: busy, children: "Create invite" }), invite && (_jsxs("div", { className: "invite-result", children: [_jsxs("div", { className: "invite-result__row", children: [_jsx("code", { children: invite.code }), _jsx("span", { className: "invite-uses", children: invite.maxUses === null
114
114
  ? `${invite.useCount} uses`
package/dist/lib/index.js CHANGED
@@ -75,7 +75,7 @@ function K({
75
75
  $(() => {
76
76
  w(null), E(null);
77
77
  }, [t == null ? void 0 : t.id]);
78
- const j = o ? `${window.location.origin}/join/${encodeURIComponent(o.code)}` : null;
78
+ const j = o ? `${window.location.origin}/shepherd/join/${encodeURIComponent(o.code)}` : null;
79
79
  return /* @__PURE__ */ a("section", { className: "shepherd-workspaces", "aria-labelledby": C, children: [
80
80
  /* @__PURE__ */ a("div", { className: "card-head", children: [
81
81
  /* @__PURE__ */ e("h3", { id: C, children: "Workspace management" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korso/shepherd-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Auth-agnostic React UI library for the Shepherd wallboard (Dashboard, client, provider). Host injects auth; the library never reads tokens.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",