@burdenoff/fe-libs 2026.805.5 → 2026.810.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSideNav.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSideNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GACd,EAAE,mBAAmB,2CAoHrB"}
1
+ {"version":3,"file":"ProductSideNav.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSideNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GACd,EAAE,mBAAmB,2CA2HrB"}
@@ -13,41 +13,43 @@ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
13
13
  import { useLocation as _, useNavigate as v } from "react-router";
14
14
  //#region src/chrome/ProductSideNav.tsx
15
15
  function y({ logo: y, appName: b, groupOrder: x, groupLabels: S, mobileActions: C, customHeader: w, homeAriaLabel: T, collapseLabel: E }) {
16
- let D = s(), O = T ?? D("nav.goToDashboard", "Go to dashboard"), k = E ?? D("nav.collapse", "Collapse"), A = v(), j = _(), { sidebarCollapsed: M, toggleSidebar: N } = r(), P = o(), F = e((e) => e.items), I = n(), L = i(), R = L?.simulation ?? null, z = I?.hasPermission, B = !!I && !I.isLoading && !I.error, V = p(() => {
16
+ let D = s(), O = T ?? D("nav.goToDashboard", "Go to dashboard"), k = E ?? D("nav.collapse", "Collapse"), A = v(), j = _(), { sidebarCollapsed: M, toggleSidebar: N } = r(), P = o(), F = e((e) => e.items), I = n(), L = i(), R = L?.simulation ?? null, z = I?.hasPermission, B = !!I && !I.isLoading && !I.error, V = !!I && !I.isLoading && !!I.error, H = p(() => {
17
17
  if (R) {
18
18
  let e = R.permissionStrings;
19
19
  return (n) => t(e, n);
20
20
  }
21
21
  if (B && z) return z;
22
+ if (V) return () => !1;
22
23
  }, [
23
24
  R,
24
25
  B,
26
+ V,
25
27
  z
26
- ]), H = L?.activeSurface ?? null, U = L?.overrides, W = p(() => {
28
+ ]), U = L?.activeSurface ?? null, W = L?.overrides, G = p(() => {
27
29
  let { items: e } = c(F.filter((e) => e.visible !== !1).sort((e, t) => (e.order ?? 999) - (t.order ?? 999)), {
28
- hasPermission: V,
29
- surfaceVisibleItems: H ? H.visibleItems : null,
30
- labelOverrides: H?.labelOverrides,
31
- overrides: R ? {} : U
30
+ hasPermission: H,
31
+ surfaceVisibleItems: U ? U.visibleItems : null,
32
+ labelOverrides: U?.labelOverrides,
33
+ overrides: R ? {} : W
32
34
  });
33
35
  return e;
34
36
  }, [
35
37
  F,
36
- V,
37
38
  H,
38
39
  U,
40
+ W,
39
41
  R
40
- ]), G = (e) => {
42
+ ]), K = (e) => {
41
43
  A(a(e, P));
42
- }, K = () => {
44
+ }, q = () => {
43
45
  A(a("/", P));
44
- }, q = /* @__PURE__ */ g("div", {
46
+ }, J = /* @__PURE__ */ g("div", {
45
47
  className: "flex items-center gap-icon-gap cursor-pointer",
46
- onClick: K,
48
+ onClick: q,
47
49
  role: "button",
48
50
  tabIndex: 0,
49
51
  onKeyDown: (e) => {
50
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), K());
52
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), q());
51
53
  },
52
54
  "aria-label": O,
53
55
  children: [typeof y == "string" ? /* @__PURE__ */ h("div", {
@@ -68,19 +70,19 @@ function y({ logo: y, appName: b, groupOrder: x, groupLabels: S, mobileActions:
68
70
  "data-tour": "sidenav",
69
71
  className: "h-full",
70
72
  children: [/* @__PURE__ */ h(l, {
71
- items: W,
73
+ items: G,
72
74
  currentPath: j.pathname,
73
75
  collapsed: M,
74
76
  groupOrder: x,
75
77
  groupLabels: S,
76
- onItemClick: G,
78
+ onItemClick: K,
77
79
  onToggleCollapse: N,
78
80
  collapseLabel: k,
79
81
  mobileActions: C,
80
- header: w ?? q,
82
+ header: w ?? J,
81
83
  footer: L ? /* @__PURE__ */ h(f, {}) : void 0,
82
84
  contextSearchParams: P
83
- }, L ? `${H?.id ?? "everything"}:${R?.roleId ?? ""}` : void 0), L && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(u, {
85
+ }, L ? `${U?.id ?? "everything"}:${R?.roleId ?? ""}` : void 0), L && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(u, {
84
86
  groupLabels: S,
85
87
  groupOrder: x
86
88
  }), /* @__PURE__ */ h(d, {})] })]
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { AuthMethodLike } from './types';
3
+ interface AuthMethodSelectorProps {
4
+ methods: AuthMethodLike[];
5
+ selectedKey: string | null;
6
+ onSelect: (key: string) => void;
7
+ disabled?: boolean;
8
+ idPrefix?: string;
9
+ }
10
+ export declare const AuthMethodSelector: FC<AuthMethodSelectorProps>;
11
+ export {};
12
+ //# sourceMappingURL=AuthMethodSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthMethodSelector.d.ts","sourceRoot":"","sources":["../../src/credentials/AuthMethodSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,uBAAuB;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA8E1D,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { AlertCircle as e } from "lucide-react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/credentials/AuthMethodSelector.tsx
4
+ var r = ({ methods: r, selectedKey: i, onSelect: a, disabled: o, idPrefix: s = "auth-method" }) => {
5
+ let c = r.filter((e) => e.isEnabled);
6
+ if (c.length <= 1) return null;
7
+ let l = c.find((e) => e.key === i) ?? null;
8
+ return /* @__PURE__ */ n("div", { children: [
9
+ /* @__PURE__ */ n("label", {
10
+ htmlFor: s,
11
+ className: "block text-sm font-medium text-text-primary mb-1.5",
12
+ children: ["Authentication Method ", /* @__PURE__ */ t("span", {
13
+ className: "text-status-error-text",
14
+ children: "*"
15
+ })]
16
+ }),
17
+ /* @__PURE__ */ n("select", {
18
+ id: s,
19
+ "aria-label": "Authentication Method",
20
+ value: l ? l.key : "",
21
+ onChange: (e) => a(e.target.value),
22
+ disabled: o,
23
+ className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50",
24
+ children: [!l && /* @__PURE__ */ t("option", {
25
+ value: "",
26
+ disabled: !0,
27
+ children: "Select an authentication method"
28
+ }), c.map((e) => /* @__PURE__ */ n("option", {
29
+ value: e.key,
30
+ disabled: !e.isConfigured,
31
+ children: [e.displayName, e.isConfigured ? "" : " — not configured"]
32
+ }, e.key))]
33
+ }),
34
+ l?.description && /* @__PURE__ */ t("p", {
35
+ className: "mt-1 text-xs text-text-secondary",
36
+ children: l.description
37
+ }),
38
+ l && !l.isConfigured && /* @__PURE__ */ n("div", {
39
+ className: "mt-2 flex items-start gap-2 px-3 py-2 rounded-md bg-status-warning-bg-subtle border border-border-default",
40
+ children: [/* @__PURE__ */ t(e, {
41
+ size: 14,
42
+ className: "text-status-warning-text flex-shrink-0 mt-0.5"
43
+ }), /* @__PURE__ */ t("span", {
44
+ className: "text-xs text-status-warning-text",
45
+ children: "This method has no credentials configured in this environment. Ask an administrator to add them, or pick another method."
46
+ })]
47
+ })
48
+ ] });
49
+ };
50
+ //#endregion
51
+ export { r as AuthMethodSelector };
@@ -0,0 +1,41 @@
1
+ import { FC } from 'react';
2
+ import { FormSchema } from './types';
3
+ /**
4
+ * Narrow an arbitrary JSON value to a renderable schema. Returns null when the
5
+ * value isn't a usable object schema, so callers can fall back rather than
6
+ * rendering an empty form.
7
+ */
8
+ export declare function parseFormSchema(raw: unknown): FormSchema | null;
9
+ /**
10
+ * Required fields that are visible and filled. Hidden fields are excluded on
11
+ * purpose — a `showIf` field the user never saw must not block submission.
12
+ */
13
+ export declare function isSchemaComplete(schema: FormSchema, values: Record<string, unknown>): boolean;
14
+ /**
15
+ * Seed values for a schema's declared defaults.
16
+ *
17
+ * A rendered control shows `property.default` as selected, but nothing was
18
+ * written to form state — so validation treated the visible default as missing
19
+ * and submit dropped it unless the user touched the control. The common
20
+ * "accept the default" path silently lost the value.
21
+ */
22
+ export declare function initialValuesFromSchema(schema: FormSchema | null): Record<string, unknown>;
23
+ /**
24
+ * Drop values whose field is currently hidden by `showIf`.
25
+ *
26
+ * Changing a controlling option hides a field but leaves whatever was typed in
27
+ * it in state; submitting that would store a credential the user can no longer
28
+ * see and did not intend to send.
29
+ */
30
+ export declare function visibleValues(schema: FormSchema | null, values: Record<string, unknown>): Record<string, unknown>;
31
+ interface SchemaFormProps {
32
+ schema: FormSchema;
33
+ values: Record<string, unknown>;
34
+ onChange: (values: Record<string, unknown>) => void;
35
+ disabled?: boolean;
36
+ /** Prefix for generated element ids so several forms can coexist on a page. */
37
+ idPrefix?: string;
38
+ }
39
+ export declare const SchemaForm: FC<SchemaFormProps>;
40
+ export {};
41
+ //# sourceMappingURL=SchemaForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaForm.d.ts","sourceRoot":"","sources":["../../src/credentials/SchemaForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAI/C,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,SAAS,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAmB/D;AAoCD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,OAAO,CAST;AAUD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAczB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB;AAgBD,UAAU,eAAe;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2B1C,CAAC"}
@@ -0,0 +1,232 @@
1
+ import { useState as e } from "react";
2
+ import { Eye as t, EyeOff as n, Info as r } from "lucide-react";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ //#region src/credentials/SchemaForm.tsx
5
+ function o(e) {
6
+ if (typeof e != "object" || !e || Array.isArray(e)) return null;
7
+ let t = e;
8
+ return typeof t.properties != "object" || t.properties === null || Array.isArray(t.properties) ? null : {
9
+ properties: t.properties,
10
+ required: Array.isArray(t.required) ? t.required.filter((e) => typeof e == "string") : []
11
+ };
12
+ }
13
+ function s(e, t, n, r = /* @__PURE__ */ new Set()) {
14
+ return e.showIf ? Object.entries(e.showIf).every(([e, i]) => {
15
+ if (n && !r.has(e)) {
16
+ let i = n.properties[e];
17
+ if (i && !s(i, t, n, new Set([...r, e]))) return !1;
18
+ }
19
+ let a = t[e];
20
+ return Array.isArray(i) ? i.includes(a) : a === i;
21
+ }) : !0;
22
+ }
23
+ function c(e, t) {
24
+ return e.required.every((n) => {
25
+ let r = e.properties[n];
26
+ if (r && !s(r, t, e)) return !0;
27
+ let i = t[n];
28
+ return typeof i == "string" ? i.trim().length > 0 : i != null;
29
+ });
30
+ }
31
+ function l(e) {
32
+ return e.map((e) => typeof e == "string" ? {
33
+ label: e,
34
+ value: e
35
+ } : e);
36
+ }
37
+ function u(e) {
38
+ if (!e) return {};
39
+ let t = {};
40
+ for (let [n, r] of Object.entries(e.properties)) {
41
+ if (r.default !== void 0) {
42
+ t[n] = r.default;
43
+ continue;
44
+ }
45
+ r.type === "boolean" && (t[n] = !1);
46
+ }
47
+ return t;
48
+ }
49
+ function d(e, t) {
50
+ if (!e) return t;
51
+ let n = {};
52
+ for (let [r, i] of Object.entries(t)) {
53
+ let a = e.properties[r];
54
+ a && !s(a, t, e) || (n[r] = i);
55
+ }
56
+ return n;
57
+ }
58
+ var f = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("-webkit-text-security", "disc"), p = ({ schema: e, values: t, onChange: n, disabled: r, idPrefix: a = "schema" }) => {
59
+ let o = new Set(e.required);
60
+ return /* @__PURE__ */ i("div", {
61
+ className: "space-y-3",
62
+ children: Object.entries(e.properties).filter(([, n]) => s(n, t, e)).map(([e, s]) => /* @__PURE__ */ i(m, {
63
+ id: `${a}-${e}`,
64
+ name: e,
65
+ property: s,
66
+ value: t[e],
67
+ required: o.has(e),
68
+ disabled: r,
69
+ onChange: (r) => n({
70
+ ...t,
71
+ [e]: r
72
+ })
73
+ }, e))
74
+ });
75
+ }, m = ({ id: o, name: s, property: c, value: u, required: d, disabled: p, onChange: m }) => {
76
+ let [h, g] = e(!1), [_, v] = e(!1), y = c.title ?? s, b = c.placeholder ?? c.description ?? "";
77
+ if (c.type === "notice") return /* @__PURE__ */ a("div", {
78
+ className: "flex items-start gap-2 px-3 py-2 rounded-md bg-status-info-bg-subtle border border-border-default",
79
+ children: [/* @__PURE__ */ i(r, {
80
+ size: 14,
81
+ className: "text-status-info-text flex-shrink-0 mt-0.5"
82
+ }), /* @__PURE__ */ i("span", {
83
+ className: "text-xs text-status-info-text",
84
+ children: c.description ?? y
85
+ })]
86
+ });
87
+ let x = c.description ? /* @__PURE__ */ i("p", {
88
+ className: "mt-1 text-xs text-text-secondary",
89
+ children: c.description
90
+ }) : null, S = /* @__PURE__ */ a("label", {
91
+ htmlFor: o,
92
+ className: "block text-sm font-medium text-text-primary mb-1.5",
93
+ children: [
94
+ y,
95
+ " ",
96
+ d && /* @__PURE__ */ i("span", {
97
+ className: "text-status-error-text",
98
+ children: "*"
99
+ })
100
+ ]
101
+ }), C = "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50";
102
+ if (c.type === "boolean") {
103
+ let e = !!(u ?? c.default ?? !1);
104
+ return /* @__PURE__ */ a("div", {
105
+ className: "flex items-center gap-3",
106
+ children: [/* @__PURE__ */ i("button", {
107
+ type: "button",
108
+ role: "switch",
109
+ id: o,
110
+ "aria-checked": e,
111
+ "aria-label": y,
112
+ onClick: () => m(!e),
113
+ disabled: p,
114
+ className: `relative inline-flex h-5 w-9 items-center rounded-full transition-colors disabled:opacity-50 ${e ? "bg-primary" : "bg-bg-muted"}`,
115
+ children: /* @__PURE__ */ i("span", { className: `inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform ${e ? "translate-x-4.5" : "translate-x-0.5"}` })
116
+ }), /* @__PURE__ */ a("span", {
117
+ className: "text-sm font-medium text-text-primary",
118
+ children: [y, c.description && /* @__PURE__ */ a("span", {
119
+ className: "text-text-secondary font-normal ml-1",
120
+ children: ["— ", c.description]
121
+ })]
122
+ })]
123
+ });
124
+ }
125
+ if (c.enum && c.enum.length > 0) return /* @__PURE__ */ a("div", { children: [
126
+ S,
127
+ /* @__PURE__ */ a("select", {
128
+ id: o,
129
+ "aria-label": y,
130
+ value: String(u ?? c.default ?? ""),
131
+ onChange: (e) => m(e.target.value),
132
+ disabled: p,
133
+ className: C,
134
+ children: [/* @__PURE__ */ a("option", {
135
+ value: "",
136
+ children: ["Select ", y.toLowerCase()]
137
+ }), l(c.enum).map((e) => /* @__PURE__ */ i("option", {
138
+ value: e.value,
139
+ children: e.label
140
+ }, e.value))]
141
+ }),
142
+ x
143
+ ] });
144
+ if (c.type === "number") return /* @__PURE__ */ a("div", { children: [
145
+ S,
146
+ /* @__PURE__ */ i("input", {
147
+ id: o,
148
+ "aria-label": y,
149
+ type: "number",
150
+ value: u == null ? "" : String(u),
151
+ onChange: (e) => m(e.target.value === "" ? void 0 : Number(e.target.value)),
152
+ placeholder: b,
153
+ disabled: p,
154
+ className: C
155
+ }),
156
+ x
157
+ ] });
158
+ if (c.format === "textarea" || c.format === "json") {
159
+ let e = !!c.secret && !h, r = typeof u == "string" && u.length > 0;
160
+ return e && !f && r && !_ ? /* @__PURE__ */ a("div", { children: [
161
+ S,
162
+ /* @__PURE__ */ a("div", {
163
+ className: "flex items-center justify-between gap-2 px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
164
+ children: [/* @__PURE__ */ i("span", {
165
+ className: "text-sm font-mono text-text-secondary select-none",
166
+ children: "••••••••••••"
167
+ }), /* @__PURE__ */ a("button", {
168
+ type: "button",
169
+ onClick: () => g(!0),
170
+ disabled: p,
171
+ "aria-label": `Show ${y}`,
172
+ className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50",
173
+ children: [/* @__PURE__ */ i(t, { size: 14 }), " Reveal to edit"]
174
+ })]
175
+ }),
176
+ x
177
+ ] }) : /* @__PURE__ */ a("div", { children: [
178
+ S,
179
+ /* @__PURE__ */ a("div", {
180
+ className: "relative",
181
+ children: [/* @__PURE__ */ i("textarea", {
182
+ id: o,
183
+ "aria-label": y,
184
+ value: String(u ?? ""),
185
+ onChange: (e) => m(e.target.value),
186
+ onFocus: () => v(!0),
187
+ onBlur: () => v(!1),
188
+ placeholder: b,
189
+ disabled: p,
190
+ rows: 5,
191
+ autoComplete: "off",
192
+ spellCheck: !1,
193
+ style: e ? { WebkitTextSecurity: "disc" } : void 0,
194
+ className: `${C} font-mono ${c.secret ? "pr-10" : ""}`
195
+ }), c.secret && /* @__PURE__ */ i("button", {
196
+ type: "button",
197
+ onClick: () => g((e) => !e),
198
+ "aria-label": h ? `Hide ${y}` : `Show ${y}`,
199
+ className: "absolute right-2 top-2 text-text-secondary hover:text-text-primary",
200
+ children: i(h ? n : t, { size: 16 })
201
+ })]
202
+ }),
203
+ x
204
+ ] });
205
+ }
206
+ return /* @__PURE__ */ a("div", { children: [
207
+ S,
208
+ /* @__PURE__ */ a("div", {
209
+ className: "relative",
210
+ children: [/* @__PURE__ */ i("input", {
211
+ id: o,
212
+ "aria-label": y,
213
+ type: c.secret && !h ? "password" : "text",
214
+ value: String(u ?? ""),
215
+ onChange: (e) => m(e.target.value),
216
+ placeholder: b,
217
+ disabled: p,
218
+ autoComplete: "off",
219
+ className: `${C} ${c.secret ? "font-mono pr-10" : ""}`
220
+ }), c.secret && /* @__PURE__ */ i("button", {
221
+ type: "button",
222
+ onClick: () => g((e) => !e),
223
+ "aria-label": h ? `Hide ${y}` : `Show ${y}`,
224
+ className: "absolute right-2 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
225
+ children: i(h ? n : t, { size: 16 })
226
+ })]
227
+ }),
228
+ x
229
+ ] });
230
+ };
231
+ //#endregion
232
+ export { p as SchemaForm, u as initialValuesFromSchema, c as isSchemaComplete, o as parseFormSchema, d as visibleValues };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Credential form rendering, shared across every product that consumes
3
+ * wspace-integrations-svc.
4
+ *
5
+ * A provider's authentication methods, and the fields each one needs, are data
6
+ * the service sends down. This module is the single renderer for that data —
7
+ * so adding a provider, or a new way of authenticating against one, is a
8
+ * catalog change rather than React in each consuming app.
9
+ */
10
+ export { SchemaForm, parseFormSchema, isSchemaComplete, initialValuesFromSchema, visibleValues, } from './SchemaForm';
11
+ export { AuthMethodSelector } from './AuthMethodSelector';
12
+ export type { AuthMethodFlow, AuthMethodLike, FormSchema, SchemaProperty, } from './types';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,SAAS,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Shared credential-form types.
3
+ *
4
+ * These describe the *data* a service sends down to say what a credential form
5
+ * should look like. Keeping them here rather than in a product package is the
6
+ * point of this module: the integrations service is consumed by more than one
7
+ * product, and every consumer should render the same description the same way
8
+ * instead of maintaining its own copy of the renderer.
9
+ */
10
+ /** How the UI collects the credential for an auth method. */
11
+ export type AuthMethodFlow = "fields" | "oauth2" | "minted";
12
+ /**
13
+ * One property in a credential form schema.
14
+ *
15
+ * A superset of the JSON Schema subset the backend emits: `secret`, `format`,
16
+ * `showIf` and `placeholder` are ours, and are what let a form be fully
17
+ * described as data rather than partly as React.
18
+ */
19
+ export interface SchemaProperty {
20
+ type?: string;
21
+ title?: string;
22
+ description?: string;
23
+ placeholder?: string;
24
+ /** Render masked, with a reveal toggle, and never echo back into metadata. */
25
+ secret?: boolean;
26
+ /** `textarea` / `json` for multi-line values such as service-account keys. */
27
+ format?: string;
28
+ default?: string | number | boolean;
29
+ /** Bare strings, or `{label,value}` when the display text differs. */
30
+ enum?: Array<string | {
31
+ label: string;
32
+ value: string;
33
+ }>;
34
+ /** Show only while every named field holds one of the accepted values. */
35
+ showIf?: Record<string, unknown>;
36
+ }
37
+ export interface FormSchema {
38
+ type?: string;
39
+ properties: Record<string, SchemaProperty>;
40
+ required: string[];
41
+ }
42
+ /**
43
+ * One way of authenticating against a provider.
44
+ *
45
+ * Structural rather than tied to a generated GraphQL type, so a product can
46
+ * pass whatever its own client produced without importing this package's
47
+ * codegen output.
48
+ */
49
+ export interface AuthMethodLike {
50
+ key: string;
51
+ displayName: string;
52
+ description?: string | null;
53
+ flow: AuthMethodFlow | string;
54
+ configSchema?: Record<string, unknown> | null;
55
+ /** False when this environment lacks the credentials the method needs. */
56
+ isConfigured: boolean;
57
+ isEnabled: boolean;
58
+ displayOrder?: number;
59
+ }
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/credentials/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACpC,sEAAsE;IACtE,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9C,0EAA0E;IAC1E,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export * from './credentials/index'
2
+ export {}
@@ -0,0 +1,3 @@
1
+ import { SchemaForm as e, initialValuesFromSchema as t, isSchemaComplete as n, parseFormSchema as r, visibleValues as i } from "./credentials/SchemaForm.js";
2
+ import { AuthMethodSelector as a } from "./credentials/AuthMethodSelector.js";
3
+ export { a as AuthMethodSelector, e as SchemaForm, t as initialValuesFromSchema, n as isSchemaComplete, r as parseFormSchema, i as visibleValues };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.805.5",
3
+ "version": "2026.810.2",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,6 +45,10 @@
45
45
  "types": "./dist/form.d.ts",
46
46
  "import": "./dist/form.js"
47
47
  },
48
+ "./credentials": {
49
+ "types": "./dist/credentials.d.ts",
50
+ "import": "./dist/credentials.js"
51
+ },
48
52
  "./button": {
49
53
  "types": "./dist/button.d.ts",
50
54
  "import": "./dist/button.js"
@@ -280,7 +284,7 @@
280
284
  "lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
281
285
  "format": "prettier --config shared/config/prettier.config.mjs --write \"src/**/*.{ts,tsx}\" \"!src/config/*.config.ts\"",
282
286
  "type:check": "bash scripts/build-limits.sh tsc --noEmit",
283
- "test": "bun test scripts/graphql-schema-drift/__tests__",
287
+ "test": "bun test scripts/graphql-schema-drift/__tests__ src/credentials",
284
288
  "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run lint:sanity && bun run format && bun run type:check && bun run test && bun run build'",
285
289
  "switch:status": "bun scripts/deps-mode.ts status",
286
290
  "switch:remote": "bun scripts/deps-mode.ts remote",