@tightrope-dev/link-component 0.1.2 → 0.1.4

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsx as i, jsxs as k, Fragment as Re } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as k, Fragment as Pe } from "react/jsx-runtime";
2
2
  import * as _ from "react";
3
- import { forwardRef as ve, createElement as ne, useState as V, useEffect as Pe } from "react";
3
+ import { forwardRef as xe, createElement as ne, useState as V, useEffect as je } from "react";
4
4
  import "react-dom";
5
5
  function de(e, t) {
6
6
  if (typeof e == "function")
@@ -25,8 +25,8 @@ function Me(...e) {
25
25
  }
26
26
  // @__NO_SIDE_EFFECTS__
27
27
  function ye(e) {
28
- const t = /* @__PURE__ */ je(e), r = _.forwardRef((o, n) => {
29
- const { children: s, ...l } = o, a = _.Children.toArray(s), u = a.find(Ee);
28
+ const t = /* @__PURE__ */ $e(e), r = _.forwardRef((o, n) => {
29
+ const { children: s, ...l } = o, a = _.Children.toArray(s), u = a.find(Ve);
30
30
  if (u) {
31
31
  const d = u.props.children, b = a.map((w) => w === u ? _.Children.count(d) > 1 ? _.Children.only(null) : _.isValidElement(d) ? d.props.children : null : w);
32
32
  return /* @__PURE__ */ i(t, { ...l, ref: n, children: _.isValidElement(d) ? _.cloneElement(d, void 0, b) : null });
@@ -35,24 +35,24 @@ function ye(e) {
35
35
  });
36
36
  return r.displayName = `${e}.Slot`, r;
37
37
  }
38
- var xe = /* @__PURE__ */ ye("Slot");
38
+ var we = /* @__PURE__ */ ye("Slot");
39
39
  // @__NO_SIDE_EFFECTS__
40
- function je(e) {
40
+ function $e(e) {
41
41
  const t = _.forwardRef((r, o) => {
42
42
  const { children: n, ...s } = r;
43
43
  if (_.isValidElement(n)) {
44
- const l = Le(n), a = Ve(s, n.props);
44
+ const l = Ge(n), a = Le(s, n.props);
45
45
  return n.type !== _.Fragment && (a.ref = o ? Me(o, l) : l), _.cloneElement(n, a);
46
46
  }
47
47
  return _.Children.count(n) > 1 ? _.Children.only(null) : null;
48
48
  });
49
49
  return t.displayName = `${e}.SlotClone`, t;
50
50
  }
51
- var $e = Symbol("radix.slottable");
52
- function Ee(e) {
53
- return _.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === $e;
51
+ var Ee = Symbol("radix.slottable");
52
+ function Ve(e) {
53
+ return _.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ee;
54
54
  }
55
- function Ve(e, t) {
55
+ function Le(e, t) {
56
56
  const r = { ...t };
57
57
  for (const o in t) {
58
58
  const n = e[o], s = t[o];
@@ -63,25 +63,25 @@ function Ve(e, t) {
63
63
  }
64
64
  return { ...e, ...r };
65
65
  }
66
- function Le(e) {
66
+ function Ge(e) {
67
67
  var o, n;
68
68
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
69
69
  return r ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
70
70
  }
71
- function we(e) {
71
+ function Ce(e) {
72
72
  var t, r, o = "";
73
73
  if (typeof e == "string" || typeof e == "number") o += e;
74
74
  else if (typeof e == "object") if (Array.isArray(e)) {
75
75
  var n = e.length;
76
- for (t = 0; t < n; t++) e[t] && (r = we(e[t])) && (o && (o += " "), o += r);
76
+ for (t = 0; t < n; t++) e[t] && (r = Ce(e[t])) && (o && (o += " "), o += r);
77
77
  } else for (r in e) e[r] && (o && (o += " "), o += r);
78
78
  return o;
79
79
  }
80
- function Ce() {
81
- for (var e, t, r = 0, o = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = we(e)) && (o && (o += " "), o += t);
80
+ function ke() {
81
+ for (var e, t, r = 0, o = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = Ce(e)) && (o && (o += " "), o += t);
82
82
  return o;
83
83
  }
84
- const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, ae = (e, t) => (r) => {
84
+ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = ke, ae = (e, t) => (r) => {
85
85
  var o;
86
86
  if ((t == null ? void 0 : t.variants) == null) return pe(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
87
87
  const { variants: n, defaultVariants: s } = t, l = Object.keys(n).map((d) => {
@@ -110,26 +110,26 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
110
110
  ] : d;
111
111
  }, []);
112
112
  return pe(e, l, u, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
113
- }, ie = "-", Ge = (e) => {
114
- const t = Oe(e), {
113
+ }, ie = "-", Te = (e) => {
114
+ const t = We(e), {
115
115
  conflictingClassGroups: r,
116
116
  conflictingClassGroupModifiers: o
117
117
  } = e;
118
118
  return {
119
119
  getClassGroupId: (l) => {
120
120
  const a = l.split(ie);
121
- return a[0] === "" && a.length !== 1 && a.shift(), ke(a, t) || Te(l);
121
+ return a[0] === "" && a.length !== 1 && a.shift(), Ne(a, t) || Oe(l);
122
122
  },
123
123
  getConflictingClassGroupIds: (l, a) => {
124
124
  const u = r[l] || [];
125
125
  return a && o[l] ? [...u, ...o[l]] : u;
126
126
  }
127
127
  };
128
- }, ke = (e, t) => {
128
+ }, Ne = (e, t) => {
129
129
  var l;
130
130
  if (e.length === 0)
131
131
  return t.classGroupId;
132
- const r = e[0], o = t.nextPart.get(r), n = o ? ke(e.slice(1), o) : void 0;
132
+ const r = e[0], o = t.nextPart.get(r), n = o ? Ne(e.slice(1), o) : void 0;
133
133
  if (n)
134
134
  return n;
135
135
  if (t.validators.length === 0)
@@ -138,13 +138,13 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
138
138
  return (l = t.validators.find(({
139
139
  validator: a
140
140
  }) => a(s))) == null ? void 0 : l.classGroupId;
141
- }, ge = /^\[(.+)\]$/, Te = (e) => {
141
+ }, ge = /^\[(.+)\]$/, Oe = (e) => {
142
142
  if (ge.test(e)) {
143
143
  const t = ge.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
144
144
  if (r)
145
145
  return "arbitrary.." + r;
146
146
  }
147
- }, Oe = (e) => {
147
+ }, We = (e) => {
148
148
  const {
149
149
  theme: t,
150
150
  prefix: r
@@ -152,7 +152,7 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
152
152
  nextPart: /* @__PURE__ */ new Map(),
153
153
  validators: []
154
154
  };
155
- return Fe(Object.entries(e.classGroups), r).forEach(([s, l]) => {
155
+ return Be(Object.entries(e.classGroups), r).forEach(([s, l]) => {
156
156
  se(l, o, s, t);
157
157
  }), o;
158
158
  }, se = (e, t, r, o) => {
@@ -163,7 +163,7 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
163
163
  return;
164
164
  }
165
165
  if (typeof n == "function") {
166
- if (We(n)) {
166
+ if (Fe(n)) {
167
167
  se(n(o), t, r, o);
168
168
  return;
169
169
  }
@@ -185,10 +185,10 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
185
185
  validators: []
186
186
  }), r = r.nextPart.get(o);
187
187
  }), r;
188
- }, We = (e) => e.isThemeGetter, Fe = (e, t) => t ? e.map(([r, o]) => {
188
+ }, Fe = (e) => e.isThemeGetter, Be = (e, t) => t ? e.map(([r, o]) => {
189
189
  const n = o.map((s) => typeof s == "string" ? t + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([l, a]) => [t + l, a])) : s);
190
190
  return [r, n];
191
- }) : e, Be = (e) => {
191
+ }) : e, Ue = (e) => {
192
192
  if (e < 1)
193
193
  return {
194
194
  get: () => {
@@ -212,7 +212,7 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
212
212
  r.has(s) ? r.set(s, l) : n(s, l);
213
213
  }
214
214
  };
215
- }, Ne = "!", Ue = (e) => {
215
+ }, _e = "!", qe = (e) => {
216
216
  const {
217
217
  separator: t,
218
218
  experimentalParseClassName: r
@@ -233,7 +233,7 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
233
233
  }
234
234
  g === "[" ? d++ : g === "]" && d--;
235
235
  }
236
- const C = u.length === 0 ? a : a.substring(b), A = C.startsWith(Ne), z = A ? C.substring(1) : C, m = w && w > b ? w - b : void 0;
236
+ const C = u.length === 0 ? a : a.substring(b), A = C.startsWith(_e), z = A ? C.substring(1) : C, m = w && w > b ? w - b : void 0;
237
237
  return {
238
238
  modifiers: u,
239
239
  hasImportantModifier: A,
@@ -245,7 +245,7 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
245
245
  className: a,
246
246
  parseClassName: l
247
247
  }) : l;
248
- }, qe = (e) => {
248
+ }, He = (e) => {
249
249
  if (e.length <= 1)
250
250
  return e;
251
251
  const t = [];
@@ -253,16 +253,16 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
253
253
  return e.forEach((o) => {
254
254
  o[0] === "[" ? (t.push(...r.sort(), o), r = []) : r.push(o);
255
255
  }), t.push(...r.sort()), t;
256
- }, He = (e) => ({
257
- cache: Be(e.cacheSize),
258
- parseClassName: Ue(e),
259
- ...Ge(e)
260
- }), Ze = /\s+/, De = (e, t) => {
256
+ }, Ze = (e) => ({
257
+ cache: Ue(e.cacheSize),
258
+ parseClassName: qe(e),
259
+ ...Te(e)
260
+ }), De = /\s+/, Je = (e, t) => {
261
261
  const {
262
262
  parseClassName: r,
263
263
  getClassGroupId: o,
264
264
  getConflictingClassGroupIds: n
265
- } = t, s = [], l = e.trim().split(Ze);
265
+ } = t, s = [], l = e.trim().split(De);
266
266
  let a = "";
267
267
  for (let u = l.length - 1; u >= 0; u -= 1) {
268
268
  const d = l[u], {
@@ -283,7 +283,7 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
283
283
  }
284
284
  z = !1;
285
285
  }
286
- const f = qe(b).join(":"), g = w ? f + Ne : f, N = g + m;
286
+ const f = He(b).join(":"), g = w ? f + _e : f, N = g + m;
287
287
  if (s.includes(N))
288
288
  continue;
289
289
  s.push(N);
@@ -296,77 +296,77 @@ const ue = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, pe = Ce, a
296
296
  }
297
297
  return a;
298
298
  };
299
- function Je() {
299
+ function Ke() {
300
300
  let e = 0, t, r, o = "";
301
301
  for (; e < arguments.length; )
302
- (t = arguments[e++]) && (r = _e(t)) && (o && (o += " "), o += r);
302
+ (t = arguments[e++]) && (r = Se(t)) && (o && (o += " "), o += r);
303
303
  return o;
304
304
  }
305
- const _e = (e) => {
305
+ const Se = (e) => {
306
306
  if (typeof e == "string")
307
307
  return e;
308
308
  let t, r = "";
309
309
  for (let o = 0; o < e.length; o++)
310
- e[o] && (t = _e(e[o])) && (r && (r += " "), r += t);
310
+ e[o] && (t = Se(e[o])) && (r && (r += " "), r += t);
311
311
  return r;
312
312
  };
313
- function Ke(e, ...t) {
313
+ function Xe(e, ...t) {
314
314
  let r, o, n, s = l;
315
315
  function l(u) {
316
316
  const d = t.reduce((b, w) => w(b), e());
317
- return r = He(d), o = r.cache.get, n = r.cache.set, s = a, a(u);
317
+ return r = Ze(d), o = r.cache.get, n = r.cache.set, s = a, a(u);
318
318
  }
319
319
  function a(u) {
320
320
  const d = o(u);
321
321
  if (d)
322
322
  return d;
323
- const b = De(u, r);
323
+ const b = Je(u, r);
324
324
  return n(u, b), b;
325
325
  }
326
326
  return function() {
327
- return s(Je.apply(null, arguments));
327
+ return s(Ke.apply(null, arguments));
328
328
  };
329
329
  }
330
- const y = (e) => {
330
+ const x = (e) => {
331
331
  const t = (r) => r[e] || [];
332
332
  return t.isThemeGetter = !0, t;
333
- }, Se = /^\[(?:([a-z-]+):)?(.+)\]$/i, Xe = /^\d+\/\d+$/, Qe = /* @__PURE__ */ new Set(["px", "full", "screen"]), Ye = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, et = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, tt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, rt = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ot = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, j = (e) => F(e) || Qe.has(e) || Xe.test(e), L = (e) => B(e, "length", ut), F = (e) => !!e && !Number.isNaN(Number(e)), Q = (e) => B(e, "number", F), Z = (e) => !!e && Number.isInteger(Number(e)), nt = (e) => e.endsWith("%") && F(e.slice(0, -1)), c = (e) => Se.test(e), G = (e) => Ye.test(e), st = /* @__PURE__ */ new Set(["length", "size", "percentage"]), at = (e) => B(e, st, ze), it = (e) => B(e, "position", ze), lt = /* @__PURE__ */ new Set(["image", "url"]), ct = (e) => B(e, lt, gt), dt = (e) => B(e, "", pt), D = () => !0, B = (e, t, r) => {
334
- const o = Se.exec(e);
333
+ }, ze = /^\[(?:([a-z-]+):)?(.+)\]$/i, Qe = /^\d+\/\d+$/, Ye = /* @__PURE__ */ new Set(["px", "full", "screen"]), et = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tt = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, ot = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, nt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, M = (e) => F(e) || Ye.has(e) || Qe.test(e), L = (e) => B(e, "length", pt), F = (e) => !!e && !Number.isNaN(Number(e)), Q = (e) => B(e, "number", F), Z = (e) => !!e && Number.isInteger(Number(e)), st = (e) => e.endsWith("%") && F(e.slice(0, -1)), c = (e) => ze.test(e), G = (e) => et.test(e), at = /* @__PURE__ */ new Set(["length", "size", "percentage"]), it = (e) => B(e, at, Ae), lt = (e) => B(e, "position", Ae), ct = /* @__PURE__ */ new Set(["image", "url"]), dt = (e) => B(e, ct, mt), ut = (e) => B(e, "", gt), D = () => !0, B = (e, t, r) => {
334
+ const o = ze.exec(e);
335
335
  return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : r(o[2]) : !1;
336
- }, ut = (e) => (
336
+ }, pt = (e) => (
337
337
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
338
338
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
339
339
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
340
- et.test(e) && !tt.test(e)
341
- ), ze = () => !1, pt = (e) => rt.test(e), gt = (e) => ot.test(e), mt = () => {
342
- const e = y("colors"), t = y("spacing"), r = y("blur"), o = y("brightness"), n = y("borderColor"), s = y("borderRadius"), l = y("borderSpacing"), a = y("borderWidth"), u = y("contrast"), d = y("grayscale"), b = y("hueRotate"), w = y("invert"), C = y("gap"), A = y("gradientColorStops"), z = y("gradientColorStopPositions"), m = y("inset"), f = y("margin"), g = y("opacity"), N = y("padding"), $ = y("saturate"), R = y("scale"), T = y("sepia"), P = y("skew"), J = y("space"), K = y("translate"), O = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], U = () => ["auto", c, t], h = () => [c, t], q = () => ["", j, L], p = () => ["auto", F, c], x = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], v = () => ["solid", "dashed", "dotted", "double", "none"], S = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], H = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], E = () => ["", "0", c], ce = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [F, c];
340
+ tt.test(e) && !rt.test(e)
341
+ ), Ae = () => !1, gt = (e) => ot.test(e), mt = (e) => nt.test(e), ft = () => {
342
+ const e = x("colors"), t = x("spacing"), r = x("blur"), o = x("brightness"), n = x("borderColor"), s = x("borderRadius"), l = x("borderSpacing"), a = x("borderWidth"), u = x("contrast"), d = x("grayscale"), b = x("hueRotate"), w = x("invert"), C = x("gap"), A = x("gradientColorStops"), z = x("gradientColorStopPositions"), m = x("inset"), f = x("margin"), g = x("opacity"), N = x("padding"), $ = x("saturate"), R = x("scale"), T = x("sepia"), P = x("skew"), J = x("space"), K = x("translate"), O = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], U = () => ["auto", c, t], h = () => [c, t], q = () => ["", M, L], p = () => ["auto", F, c], y = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], v = () => ["solid", "dashed", "dotted", "double", "none"], S = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], H = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], E = () => ["", "0", c], ce = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], j = () => [F, c];
343
343
  return {
344
344
  cacheSize: 500,
345
345
  separator: ":",
346
346
  theme: {
347
347
  colors: [D],
348
- spacing: [j, L],
348
+ spacing: [M, L],
349
349
  blur: ["none", "", G, c],
350
- brightness: M(),
350
+ brightness: j(),
351
351
  borderColor: [e],
352
352
  borderRadius: ["none", "", "full", G, c],
353
353
  borderSpacing: h(),
354
354
  borderWidth: q(),
355
- contrast: M(),
355
+ contrast: j(),
356
356
  grayscale: E(),
357
- hueRotate: M(),
357
+ hueRotate: j(),
358
358
  invert: E(),
359
359
  gap: h(),
360
360
  gradientColorStops: [e],
361
- gradientColorStopPositions: [nt, L],
361
+ gradientColorStopPositions: [st, L],
362
362
  inset: U(),
363
363
  margin: U(),
364
- opacity: M(),
364
+ opacity: j(),
365
365
  padding: h(),
366
- saturate: M(),
367
- scale: M(),
366
+ saturate: j(),
367
+ scale: j(),
368
368
  sepia: E(),
369
- skew: M(),
369
+ skew: j(),
370
370
  space: h(),
371
371
  translate: h()
372
372
  },
@@ -462,7 +462,7 @@ const y = (e) => {
462
462
  * @see https://tailwindcss.com/docs/object-position
463
463
  */
464
464
  "object-position": [{
465
- object: [...x(), c]
465
+ object: [...y(), c]
466
466
  }],
467
467
  /**
468
468
  * Overflow
@@ -1085,7 +1085,7 @@ const y = (e) => {
1085
1085
  * @see https://tailwindcss.com/docs/line-height
1086
1086
  */
1087
1087
  leading: [{
1088
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", j, c]
1088
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", M, c]
1089
1089
  }],
1090
1090
  /**
1091
1091
  * List Style Image
@@ -1161,14 +1161,14 @@ const y = (e) => {
1161
1161
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1162
1162
  */
1163
1163
  "text-decoration-thickness": [{
1164
- decoration: ["auto", "from-font", j, L]
1164
+ decoration: ["auto", "from-font", M, L]
1165
1165
  }],
1166
1166
  /**
1167
1167
  * Text Underline Offset
1168
1168
  * @see https://tailwindcss.com/docs/text-underline-offset
1169
1169
  */
1170
1170
  "underline-offset": [{
1171
- "underline-offset": ["auto", j, c]
1171
+ "underline-offset": ["auto", M, c]
1172
1172
  }],
1173
1173
  /**
1174
1174
  * Text Decoration Color
@@ -1271,7 +1271,7 @@ const y = (e) => {
1271
1271
  * @see https://tailwindcss.com/docs/background-position
1272
1272
  */
1273
1273
  "bg-position": [{
1274
- bg: [...x(), it]
1274
+ bg: [...y(), lt]
1275
1275
  }],
1276
1276
  /**
1277
1277
  * Background Repeat
@@ -1287,7 +1287,7 @@ const y = (e) => {
1287
1287
  * @see https://tailwindcss.com/docs/background-size
1288
1288
  */
1289
1289
  "bg-size": [{
1290
- bg: ["auto", "cover", "contain", at]
1290
+ bg: ["auto", "cover", "contain", it]
1291
1291
  }],
1292
1292
  /**
1293
1293
  * Background Image
@@ -1296,7 +1296,7 @@ const y = (e) => {
1296
1296
  "bg-image": [{
1297
1297
  bg: ["none", {
1298
1298
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1299
- }, ct]
1299
+ }, dt]
1300
1300
  }],
1301
1301
  /**
1302
1302
  * Background Color
@@ -1650,14 +1650,14 @@ const y = (e) => {
1650
1650
  * @see https://tailwindcss.com/docs/outline-offset
1651
1651
  */
1652
1652
  "outline-offset": [{
1653
- "outline-offset": [j, c]
1653
+ "outline-offset": [M, c]
1654
1654
  }],
1655
1655
  /**
1656
1656
  * Outline Width
1657
1657
  * @see https://tailwindcss.com/docs/outline-width
1658
1658
  */
1659
1659
  "outline-w": [{
1660
- outline: [j, L]
1660
+ outline: [M, L]
1661
1661
  }],
1662
1662
  /**
1663
1663
  * Outline Color
@@ -1697,7 +1697,7 @@ const y = (e) => {
1697
1697
  * @see https://tailwindcss.com/docs/ring-offset-width
1698
1698
  */
1699
1699
  "ring-offset-w": [{
1700
- "ring-offset": [j, L]
1700
+ "ring-offset": [M, L]
1701
1701
  }],
1702
1702
  /**
1703
1703
  * Ring Offset Color
@@ -1712,7 +1712,7 @@ const y = (e) => {
1712
1712
  * @see https://tailwindcss.com/docs/box-shadow
1713
1713
  */
1714
1714
  shadow: [{
1715
- shadow: ["", "inner", "none", G, dt]
1715
+ shadow: ["", "inner", "none", G, ut]
1716
1716
  }],
1717
1717
  /**
1718
1718
  * Box Shadow Color
@@ -1941,7 +1941,7 @@ const y = (e) => {
1941
1941
  * @see https://tailwindcss.com/docs/transition-duration
1942
1942
  */
1943
1943
  duration: [{
1944
- duration: M()
1944
+ duration: j()
1945
1945
  }],
1946
1946
  /**
1947
1947
  * Transition Timing Function
@@ -1955,7 +1955,7 @@ const y = (e) => {
1955
1955
  * @see https://tailwindcss.com/docs/transition-delay
1956
1956
  */
1957
1957
  delay: [{
1958
- delay: M()
1958
+ delay: j()
1959
1959
  }],
1960
1960
  /**
1961
1961
  * Animation
@@ -2292,7 +2292,7 @@ const y = (e) => {
2292
2292
  * @see https://tailwindcss.com/docs/stroke-width
2293
2293
  */
2294
2294
  "stroke-w": [{
2295
- stroke: [j, L, Q]
2295
+ stroke: [M, L, Q]
2296
2296
  }],
2297
2297
  /**
2298
2298
  * Stroke
@@ -2367,11 +2367,11 @@ const y = (e) => {
2367
2367
  "font-size": ["leading"]
2368
2368
  }
2369
2369
  };
2370
- }, ft = /* @__PURE__ */ Ke(mt);
2370
+ }, bt = /* @__PURE__ */ Xe(ft);
2371
2371
  function I(...e) {
2372
- return ft(Ce(e));
2372
+ return bt(ke(e));
2373
2373
  }
2374
- const bt = ae(
2374
+ const ht = ae(
2375
2375
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
2376
2376
  {
2377
2377
  variants: {
@@ -2404,10 +2404,10 @@ function fe({
2404
2404
  ...n
2405
2405
  }) {
2406
2406
  return /* @__PURE__ */ i(
2407
- o ? xe : "button",
2407
+ o ? we : "button",
2408
2408
  {
2409
2409
  "data-slot": "button",
2410
- className: I(bt({ variant: t, size: r, className: e })),
2410
+ className: I(ht({ variant: t, size: r, className: e })),
2411
2411
  ...n
2412
2412
  }
2413
2413
  );
@@ -2427,7 +2427,7 @@ const X = _.forwardRef(
2427
2427
  )
2428
2428
  );
2429
2429
  X.displayName = "Input";
2430
- var ht = [
2430
+ var vt = [
2431
2431
  "a",
2432
2432
  "button",
2433
2433
  "div",
@@ -2445,14 +2445,14 @@ var ht = [
2445
2445
  "span",
2446
2446
  "svg",
2447
2447
  "ul"
2448
- ], vt = ht.reduce((e, t) => {
2448
+ ], xt = vt.reduce((e, t) => {
2449
2449
  const r = /* @__PURE__ */ ye(`Primitive.${t}`), o = _.forwardRef((n, s) => {
2450
2450
  const { asChild: l, ...a } = n, u = l ? r : t;
2451
2451
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ i(u, { ...a, ref: s });
2452
2452
  });
2453
2453
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
2454
- }, {}), yt = "Label", Ae = _.forwardRef((e, t) => /* @__PURE__ */ i(
2455
- vt.label,
2454
+ }, {}), yt = "Label", Ie = _.forwardRef((e, t) => /* @__PURE__ */ i(
2455
+ xt.label,
2456
2456
  {
2457
2457
  ...e,
2458
2458
  ref: t,
@@ -2462,14 +2462,14 @@ var ht = [
2462
2462
  }
2463
2463
  }
2464
2464
  ));
2465
- Ae.displayName = yt;
2466
- var xt = Ae;
2465
+ Ie.displayName = yt;
2466
+ var wt = Ie;
2467
2467
  function Y({
2468
2468
  className: e,
2469
2469
  ...t
2470
2470
  }) {
2471
2471
  return /* @__PURE__ */ i(
2472
- xt,
2472
+ wt,
2473
2473
  {
2474
2474
  "data-slot": "label",
2475
2475
  className: I(
@@ -2480,7 +2480,7 @@ function Y({
2480
2480
  }
2481
2481
  );
2482
2482
  }
2483
- function wt({ className: e, ...t }) {
2483
+ function Ct({ className: e, ...t }) {
2484
2484
  return /* @__PURE__ */ i(
2485
2485
  "div",
2486
2486
  {
@@ -2493,7 +2493,7 @@ function wt({ className: e, ...t }) {
2493
2493
  }
2494
2494
  );
2495
2495
  }
2496
- function Ct({ className: e, ...t }) {
2496
+ function kt({ className: e, ...t }) {
2497
2497
  return /* @__PURE__ */ i(
2498
2498
  "div",
2499
2499
  {
@@ -2506,7 +2506,7 @@ function Ct({ className: e, ...t }) {
2506
2506
  }
2507
2507
  );
2508
2508
  }
2509
- function kt({ className: e, ...t }) {
2509
+ function Nt({ className: e, ...t }) {
2510
2510
  return /* @__PURE__ */ i(
2511
2511
  "div",
2512
2512
  {
@@ -2516,7 +2516,7 @@ function kt({ className: e, ...t }) {
2516
2516
  }
2517
2517
  );
2518
2518
  }
2519
- function Nt({ className: e, ...t }) {
2519
+ function _t({ className: e, ...t }) {
2520
2520
  return /* @__PURE__ */ i(
2521
2521
  "div",
2522
2522
  {
@@ -2526,7 +2526,7 @@ function Nt({ className: e, ...t }) {
2526
2526
  }
2527
2527
  );
2528
2528
  }
2529
- function _t({ className: e, ...t }) {
2529
+ function St({ className: e, ...t }) {
2530
2530
  return /* @__PURE__ */ i(
2531
2531
  "div",
2532
2532
  {
@@ -2536,7 +2536,7 @@ function _t({ className: e, ...t }) {
2536
2536
  }
2537
2537
  );
2538
2538
  }
2539
- const St = ae(
2539
+ const zt = ae(
2540
2540
  "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
2541
2541
  {
2542
2542
  variants: {
@@ -2552,22 +2552,22 @@ const St = ae(
2552
2552
  }
2553
2553
  }
2554
2554
  );
2555
- function zt({
2555
+ function At({
2556
2556
  className: e,
2557
2557
  variant: t,
2558
2558
  asChild: r = !1,
2559
2559
  ...o
2560
2560
  }) {
2561
2561
  return /* @__PURE__ */ i(
2562
- r ? xe : "span",
2562
+ r ? we : "span",
2563
2563
  {
2564
2564
  "data-slot": "badge",
2565
- className: I(St({ variant: t }), e),
2565
+ className: I(zt({ variant: t }), e),
2566
2566
  ...o
2567
2567
  }
2568
2568
  );
2569
2569
  }
2570
- const At = ae(
2570
+ const It = ae(
2571
2571
  "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
2572
2572
  {
2573
2573
  variants: {
@@ -2591,7 +2591,7 @@ function ee({
2591
2591
  {
2592
2592
  "data-slot": "alert",
2593
2593
  role: "alert",
2594
- className: I(At({ variant: t }), e),
2594
+ className: I(It({ variant: t }), e),
2595
2595
  ...r
2596
2596
  }
2597
2597
  );
@@ -2618,13 +2618,13 @@ function te({
2618
2618
  * This source code is licensed under the ISC license.
2619
2619
  * See the LICENSE file in the root directory of this source tree.
2620
2620
  */
2621
- const It = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Rt = (e) => e.replace(
2621
+ const Rt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Pt = (e) => e.replace(
2622
2622
  /^([A-Z])|[\s-_]+(\w)/g,
2623
2623
  (t, r, o) => o ? o.toUpperCase() : r.toLowerCase()
2624
2624
  ), be = (e) => {
2625
- const t = Rt(e);
2625
+ const t = Pt(e);
2626
2626
  return t.charAt(0).toUpperCase() + t.slice(1);
2627
- }, Ie = (...e) => e.filter((t, r, o) => !!t && t.trim() !== "" && o.indexOf(t) === r).join(" ").trim(), Pt = (e) => {
2627
+ }, Re = (...e) => e.filter((t, r, o) => !!t && t.trim() !== "" && o.indexOf(t) === r).join(" ").trim(), jt = (e) => {
2628
2628
  for (const t in e)
2629
2629
  if (t.startsWith("aria-") || t === "role" || t === "title")
2630
2630
  return !0;
@@ -2652,7 +2652,7 @@ var Mt = {
2652
2652
  * This source code is licensed under the ISC license.
2653
2653
  * See the LICENSE file in the root directory of this source tree.
2654
2654
  */
2655
- const jt = ve(
2655
+ const $t = xe(
2656
2656
  ({
2657
2657
  color: e = "currentColor",
2658
2658
  size: t = 24,
@@ -2671,8 +2671,8 @@ const jt = ve(
2671
2671
  height: t,
2672
2672
  stroke: e,
2673
2673
  strokeWidth: o ? Number(r) * 24 / Number(t) : r,
2674
- className: Ie("lucide", n),
2675
- ...!s && !Pt(a) && { "aria-hidden": "true" },
2674
+ className: Re("lucide", n),
2675
+ ...!s && !jt(a) && { "aria-hidden": "true" },
2676
2676
  ...a
2677
2677
  },
2678
2678
  [
@@ -2688,12 +2688,12 @@ const jt = ve(
2688
2688
  * See the LICENSE file in the root directory of this source tree.
2689
2689
  */
2690
2690
  const le = (e, t) => {
2691
- const r = ve(
2692
- ({ className: o, ...n }, s) => ne(jt, {
2691
+ const r = xe(
2692
+ ({ className: o, ...n }, s) => ne($t, {
2693
2693
  ref: s,
2694
2694
  iconNode: t,
2695
- className: Ie(
2696
- `lucide-${It(be(e))}`,
2695
+ className: Re(
2696
+ `lucide-${Rt(be(e))}`,
2697
2697
  `lucide-${e}`,
2698
2698
  o
2699
2699
  ),
@@ -2708,29 +2708,32 @@ const le = (e, t) => {
2708
2708
  * This source code is licensed under the ISC license.
2709
2709
  * See the LICENSE file in the root directory of this source tree.
2710
2710
  */
2711
- const $t = [
2711
+ const Et = [
2712
2712
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
2713
2713
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
2714
- ], re = le("circle-check-big", $t);
2714
+ ], re = le("circle-check-big", Et);
2715
2715
  /**
2716
2716
  * @license lucide-react v0.537.0 - ISC
2717
2717
  *
2718
2718
  * This source code is licensed under the ISC license.
2719
2719
  * See the LICENSE file in the root directory of this source tree.
2720
2720
  */
2721
- const Et = [
2721
+ const Vt = [
2722
2722
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
2723
2723
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
2724
2724
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
2725
- ], oe = le("circle-x", Et);
2725
+ ], oe = le("circle-x", Vt);
2726
2726
  /**
2727
2727
  * @license lucide-react v0.537.0 - ISC
2728
2728
  *
2729
2729
  * This source code is licensed under the ISC license.
2730
2730
  * See the LICENSE file in the root directory of this source tree.
2731
2731
  */
2732
- const Vt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], he = le("loader-circle", Vt);
2733
- function Ot({
2732
+ const Lt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], he = le("loader-circle", Lt), Gt = "_linkContainer_1iste_4", Tt = "_dark_1iste_29", ve = {
2733
+ linkContainer: Gt,
2734
+ dark: Tt
2735
+ };
2736
+ function Bt({
2734
2737
  linkToken: e,
2735
2738
  apiBaseUrl: t = "https://api.tightrope.dev",
2736
2739
  onSuccess: r,
@@ -2749,16 +2752,16 @@ function Ot({
2749
2752
  password: "",
2750
2753
  auth_params: {}
2751
2754
  }), [$, R] = V(!1), [T, P] = V(null), [J, K] = V(!1);
2752
- Pe(() => {
2755
+ je(() => {
2753
2756
  (async () => {
2754
2757
  try {
2755
- const x = `${t}/integration_methods`, v = await fetch(x);
2758
+ const y = `${t}/integration_methods`, v = await fetch(y);
2756
2759
  if (!v.ok)
2757
2760
  throw new Error(`Failed to fetch integrations: ${v.status}`);
2758
2761
  const S = await v.json();
2759
2762
  S && S.integration_methods && Array.isArray(S.integration_methods) ? b(S.integration_methods) : z("Invalid data format received");
2760
- } catch (x) {
2761
- console.error("Error fetching integrations:", x);
2763
+ } catch (y) {
2764
+ console.error("Error fetching integrations:", y);
2762
2765
  const v = "Failed to load integrations";
2763
2766
  z(v), o == null || o(v);
2764
2767
  } finally {
@@ -2769,10 +2772,10 @@ function Ot({
2769
2772
  const O = (p) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(p), W = () => {
2770
2773
  if (!m) return null;
2771
2774
  for (const p of d) {
2772
- const x = p.auth_methods.find(
2775
+ const y = p.auth_methods.find(
2773
2776
  (v) => v.id === m
2774
2777
  );
2775
- if (x) return x;
2778
+ if (y) return y;
2776
2779
  }
2777
2780
  return null;
2778
2781
  }, U = async (p) => {
@@ -2780,9 +2783,9 @@ function Ot({
2780
2783
  P("Please fill in all fields");
2781
2784
  return;
2782
2785
  }
2783
- const x = W();
2784
- if (x != null && x.auth_params) {
2785
- for (const v of x.auth_params)
2786
+ const y = W();
2787
+ if (y != null && y.auth_params) {
2788
+ for (const v of y.auth_params)
2786
2789
  if (!g.auth_params[v]) {
2787
2790
  const S = `Please fill in the required field: ${v}`;
2788
2791
  P(S);
@@ -2822,181 +2825,197 @@ function Ot({
2822
2825
  R(!1);
2823
2826
  }
2824
2827
  };
2825
- return /* @__PURE__ */ i("div", { className: `${n === "dark" ? "dark" : ""} ${s}`, children: /* @__PURE__ */ k(wt, { className: "w-full max-w-2xl mx-auto shadow-lg border-2", children: [
2826
- /* @__PURE__ */ k(Ct, { className: "space-y-3 pb-8", children: [
2827
- /* @__PURE__ */ k("div", { className: "space-y-1", children: [
2828
- /* @__PURE__ */ i(kt, { className: "text-2xl font-bold tracking-tight", children: a }),
2829
- u && /* @__PURE__ */ i(Nt, { className: "text-base", children: u })
2830
- ] }),
2831
- l && e && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 pt-2", children: /* @__PURE__ */ k(
2832
- zt,
2833
- {
2834
- variant: O(e) ? "secondary" : "destructive",
2835
- children: [
2836
- O(e) ? /* @__PURE__ */ i(re, { className: "h-3 w-3 mr-1" }) : /* @__PURE__ */ i(oe, { className: "h-3 w-3 mr-1" }),
2837
- O(e) ? "Valid Token" : "Invalid Token"
2838
- ]
2839
- }
2840
- ) })
2841
- ] }),
2842
- /* @__PURE__ */ k(_t, { className: "space-y-8 pb-8", children: [
2843
- J && /* @__PURE__ */ k(ee, { className: "border-green-200 bg-green-50 dark:bg-green-950 dark:border-green-800", children: [
2844
- /* @__PURE__ */ i(re, { className: "h-5 w-5 text-green-600 dark:text-green-400" }),
2845
- /* @__PURE__ */ i(te, { className: "text-green-800 dark:text-green-200 font-medium", children: "Credentials submitted successfully!" })
2846
- ] }),
2847
- /* @__PURE__ */ i("div", { children: w ? /* @__PURE__ */ k("div", { className: "text-center py-12", children: [
2848
- /* @__PURE__ */ i(he, { className: "h-10 w-10 animate-spin mx-auto mb-4 text-primary" }),
2849
- /* @__PURE__ */ i("p", { className: "text-muted-foreground text-lg", children: "Loading integrations..." })
2850
- ] }) : A ? /* @__PURE__ */ k(ee, { variant: "destructive", children: [
2851
- /* @__PURE__ */ i(oe, { className: "h-4 w-4" }),
2852
- /* @__PURE__ */ i(te, { children: A })
2853
- ] }) : Array.isArray(d) ? d.length === 0 ? /* @__PURE__ */ i("div", { className: "text-center py-12", children: /* @__PURE__ */ i("p", { className: "text-muted-foreground", children: "No integrations available" }) }) : /* @__PURE__ */ k("div", { className: "space-y-4", children: [
2854
- /* @__PURE__ */ i("div", { className: "text-sm font-medium text-muted-foreground mb-4", children: "Select an integration to connect" }),
2855
- /* @__PURE__ */ i("div", { className: "grid grid-cols-1 gap-3", children: d.map((p) => /* @__PURE__ */ i("div", { className: "space-y-2", children: p.auth_methods.map((x) => /* @__PURE__ */ i(
2856
- "button",
2857
- {
2858
- type: "button",
2859
- onClick: () => f(x.id),
2860
- className: `w-full p-4 rounded-lg border-2 transition-all duration-200 text-left ${m === x.id ? "border-primary bg-primary/5 shadow-md" : "border-border hover:border-primary/50 hover:bg-accent"}`,
2861
- children: /* @__PURE__ */ k("div", { className: "flex items-center gap-4", children: [
2862
- p.provider_logo_url ? /* @__PURE__ */ i(
2863
- "img",
2864
- {
2865
- src: p.provider_logo_url,
2866
- alt: `${p.provider} logo`,
2867
- className: "w-12 h-12 object-contain flex-shrink-0",
2868
- onError: (v) => {
2869
- console.error(
2870
- "Failed to load logo for",
2871
- p.provider,
2872
- ":",
2873
- p.provider_logo_url
2874
- ), v.currentTarget.style.display = "none";
2875
- }
2876
- }
2877
- ) : /* @__PURE__ */ i("div", { className: "w-12 h-12 bg-muted rounded-lg flex items-center justify-center text-muted-foreground font-semibold text-lg flex-shrink-0", children: p.provider.charAt(0).toUpperCase() }),
2878
- /* @__PURE__ */ k("div", { className: "flex-1 min-w-0", children: [
2879
- /* @__PURE__ */ i("div", { className: "font-semibold text-base", children: p.provider }),
2880
- /* @__PURE__ */ i("div", { className: "text-sm text-muted-foreground", children: x.display_name })
2881
- ] }),
2882
- m === x.id && /* @__PURE__ */ i(re, { className: "h-5 w-5 text-primary flex-shrink-0" })
2883
- ] })
2884
- },
2885
- x.id
2886
- )) }, p.provider)) })
2887
- ] }) : /* @__PURE__ */ i("div", { className: "text-center py-12", children: /* @__PURE__ */ i("p", { className: "text-muted-foreground", children: "Invalid data format" }) }) }),
2888
- m && /* @__PURE__ */ k("div", { className: "space-y-6 pt-6 border-t-2 animate-in fade-in-50 slide-in-from-top-4 duration-300", children: [
2889
- /* @__PURE__ */ k("div", { className: "flex items-center gap-3", children: [
2890
- /* @__PURE__ */ i("div", { className: "h-1 flex-1 bg-primary rounded-full" }),
2891
- /* @__PURE__ */ i("span", { className: "text-sm font-medium text-muted-foreground", children: "Enter Credentials" }),
2892
- /* @__PURE__ */ i("div", { className: "h-1 flex-1 bg-primary rounded-full" })
2893
- ] }),
2894
- /* @__PURE__ */ k("form", { onSubmit: U, className: "space-y-5", children: [
2895
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2896
- /* @__PURE__ */ i(Y, { htmlFor: "username", className: "text-base font-medium", children: "Username" }),
2897
- /* @__PURE__ */ i(
2898
- X,
2899
- {
2900
- type: "text",
2901
- id: "username",
2902
- value: g.username,
2903
- onChange: (p) => N({
2904
- ...g,
2905
- username: p.target.value
2906
- }),
2907
- placeholder: "Enter your username",
2908
- className: "h-11 text-base",
2909
- required: !0
2910
- }
2911
- )
2828
+ return /* @__PURE__ */ i(
2829
+ "div",
2830
+ {
2831
+ className: `${ve.linkContainer} ${n === "dark" ? ve.dark : ""} ${s}`,
2832
+ children: /* @__PURE__ */ k(Ct, { className: "w-full mx-auto shadow-xl border-2 bg-card", children: [
2833
+ /* @__PURE__ */ i(kt, { className: "pb-8", children: /* @__PURE__ */ k("div", { className: "flex items-center justify-between", children: [
2834
+ /* @__PURE__ */ k("div", { className: "space-y-1", children: [
2835
+ /* @__PURE__ */ i(Nt, { className: "text-2xl font-bold tracking-tight", children: a }),
2836
+ u && /* @__PURE__ */ i(_t, { className: "text-base", children: u })
2912
2837
  ] }),
2913
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2914
- /* @__PURE__ */ i(Y, { htmlFor: "password", className: "text-base font-medium", children: "Password" }),
2915
- /* @__PURE__ */ i(
2916
- X,
2917
- {
2918
- type: "password",
2919
- id: "password",
2920
- value: g.password,
2921
- onChange: (p) => N({
2922
- ...g,
2923
- password: p.target.value
2924
- }),
2925
- placeholder: "Enter your password",
2926
- className: "h-11 text-base",
2927
- required: !0
2928
- }
2929
- )
2838
+ l && e && /* @__PURE__ */ k(
2839
+ At,
2840
+ {
2841
+ variant: O(e) ? "secondary" : "destructive",
2842
+ children: [
2843
+ O(e) ? /* @__PURE__ */ i(re, { className: "h-3 w-3 mr-1" }) : /* @__PURE__ */ i(oe, { className: "h-3 w-3 mr-1" }),
2844
+ O(e) ? "Valid Token" : "Invalid Token"
2845
+ ]
2846
+ }
2847
+ )
2848
+ ] }) }),
2849
+ /* @__PURE__ */ k(St, { className: "space-y-8 pb-8", children: [
2850
+ J && /* @__PURE__ */ k(ee, { className: "border-green-200 bg-green-50 dark:bg-green-950 dark:border-green-800", children: [
2851
+ /* @__PURE__ */ i(re, { className: "h-5 w-5 text-green-600 dark:text-green-400" }),
2852
+ /* @__PURE__ */ i(te, { className: "text-green-800 dark:text-green-200 font-medium", children: "Credentials submitted successfully!" })
2930
2853
  ] }),
2931
- (q = (h = W()) == null ? void 0 : h.auth_params) == null ? void 0 : q.map((p) => /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2932
- /* @__PURE__ */ i(
2933
- Y,
2934
- {
2935
- htmlFor: p,
2936
- className: "text-base font-medium",
2937
- children: p
2938
- }
2939
- ),
2940
- /* @__PURE__ */ i(
2941
- X,
2942
- {
2943
- type: "text",
2944
- id: p,
2945
- value: g.auth_params[p] || "",
2946
- onChange: (x) => N({
2947
- ...g,
2948
- auth_params: {
2949
- ...g.auth_params,
2950
- [p]: x.target.value
2951
- }
2952
- }),
2953
- placeholder: `Enter ${p}`,
2954
- className: "h-11 text-base",
2955
- required: !0
2956
- }
2957
- )
2958
- ] }, p)),
2959
- T && /* @__PURE__ */ k(ee, { variant: "destructive", children: [
2854
+ /* @__PURE__ */ i("div", { children: w ? /* @__PURE__ */ k("div", { className: "text-center py-12", children: [
2855
+ /* @__PURE__ */ i(he, { className: "h-10 w-10 animate-spin mx-auto mb-4 text-primary" }),
2856
+ /* @__PURE__ */ i("p", { className: "text-muted-foreground text-lg", children: "Loading integrations..." })
2857
+ ] }) : A ? /* @__PURE__ */ k(ee, { variant: "destructive", children: [
2960
2858
  /* @__PURE__ */ i(oe, { className: "h-4 w-4" }),
2961
- /* @__PURE__ */ i(te, { children: T })
2962
- ] }),
2963
- /* @__PURE__ */ k("div", { className: "flex gap-3 pt-4", children: [
2964
- /* @__PURE__ */ i(
2965
- fe,
2966
- {
2967
- type: "submit",
2968
- disabled: $,
2969
- className: "flex-1 h-11 text-base font-semibold",
2970
- size: "lg",
2971
- children: $ ? /* @__PURE__ */ k(Re, { children: [
2972
- /* @__PURE__ */ i(he, { className: "mr-2 h-5 w-5 animate-spin" }),
2973
- "Submitting..."
2974
- ] }) : "Submit Credentials"
2975
- }
2976
- ),
2977
- /* @__PURE__ */ i(
2978
- fe,
2979
- {
2980
- type: "button",
2981
- variant: "outline",
2982
- className: "h-11",
2983
- onClick: () => {
2984
- f(null), N({
2985
- username: "",
2986
- password: "",
2987
- auth_params: {}
2988
- }), P(null);
2859
+ /* @__PURE__ */ i(te, { children: A })
2860
+ ] }) : Array.isArray(d) ? d.length === 0 ? /* @__PURE__ */ i("div", { className: "text-center py-12", children: /* @__PURE__ */ i("p", { className: "text-muted-foreground", children: "No integrations available" }) }) : /* @__PURE__ */ k("div", { className: "space-y-4", children: [
2861
+ /* @__PURE__ */ i("div", { className: "text-sm font-medium text-muted-foreground mb-4", children: "Select an integration to connect" }),
2862
+ /* @__PURE__ */ i("div", { className: "grid grid-cols-4 lg:grid-cols-4 md:grid-cols-2 sm:grid-cols-1 gap-3", children: d.map(
2863
+ (p) => p.auth_methods.map((y) => /* @__PURE__ */ i(
2864
+ "button",
2865
+ {
2866
+ type: "button",
2867
+ onClick: () => f(y.id),
2868
+ className: `p-4 rounded-lg border-2 transition-all duration-200 text-left ${m === y.id ? "border-primary bg-primary/5 shadow-md" : "border-border hover:border-primary/50 hover:bg-accent"}`,
2869
+ children: /* @__PURE__ */ k("div", { className: "flex flex-col items-center gap-3 text-center", children: [
2870
+ /* @__PURE__ */ i("div", { className: "w-12 h-12 flex items-center justify-center flex-shrink-0", children: p.provider_logo_url ? /* @__PURE__ */ i(
2871
+ "img",
2872
+ {
2873
+ src: p.provider_logo_url,
2874
+ alt: `${p.provider} logo`,
2875
+ className: "max-w-full max-h-full w-auto h-auto object-contain",
2876
+ style: { maxWidth: "48px", maxHeight: "48px" },
2877
+ onError: (v) => {
2878
+ console.error(
2879
+ "Failed to load logo for",
2880
+ p.provider,
2881
+ ":",
2882
+ p.provider_logo_url
2883
+ ), v.currentTarget.style.display = "none";
2884
+ }
2885
+ }
2886
+ ) : /* @__PURE__ */ i("div", { className: "w-full h-full bg-muted rounded-lg flex items-center justify-center text-muted-foreground font-semibold text-xl", children: p.provider.charAt(0).toUpperCase() }) }),
2887
+ /* @__PURE__ */ k("div", { children: [
2888
+ /* @__PURE__ */ i("div", { className: "font-semibold text-base", children: p.provider }),
2889
+ /* @__PURE__ */ i("div", { className: "text-sm text-muted-foreground", children: y.display_name })
2890
+ ] }),
2891
+ m === y.id && /* @__PURE__ */ i(re, { className: "h-5 w-5 text-primary" })
2892
+ ] })
2989
2893
  },
2990
- children: "Cancel"
2894
+ y.id
2895
+ ))
2896
+ ) })
2897
+ ] }) : /* @__PURE__ */ i("div", { className: "text-center py-12", children: /* @__PURE__ */ i("p", { className: "text-muted-foreground", children: "Invalid data format" }) }) }),
2898
+ m && /* @__PURE__ */ k("div", { className: "space-y-8 pt-8 border-t-2 animate-in fade-in-50 slide-in-from-top-4 duration-300", children: [
2899
+ /* @__PURE__ */ k("div", { className: "flex items-center gap-3 py-2", children: [
2900
+ /* @__PURE__ */ i("div", { className: "h-1 flex-1 bg-primary rounded-full" }),
2901
+ /* @__PURE__ */ i("span", { className: "text-sm font-medium text-muted-foreground", children: "Enter Credentials" }),
2902
+ /* @__PURE__ */ i("div", { className: "h-1 flex-1 bg-primary rounded-full" })
2903
+ ] }),
2904
+ /* @__PURE__ */ k(
2905
+ "form",
2906
+ {
2907
+ onSubmit: U,
2908
+ className: "flex flex-col gap-4 ",
2909
+ children: [
2910
+ /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2911
+ /* @__PURE__ */ i(Y, { htmlFor: "username", className: "text-base font-medium", children: "Username" }),
2912
+ /* @__PURE__ */ i(
2913
+ X,
2914
+ {
2915
+ type: "text",
2916
+ id: "username",
2917
+ value: g.username,
2918
+ onChange: (p) => N({
2919
+ ...g,
2920
+ username: p.target.value
2921
+ }),
2922
+ placeholder: "Enter your username",
2923
+ className: "h-11 text-base",
2924
+ required: !0
2925
+ }
2926
+ )
2927
+ ] }),
2928
+ /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2929
+ /* @__PURE__ */ i(Y, { htmlFor: "password", className: "text-base font-medium", children: "Password" }),
2930
+ /* @__PURE__ */ i(
2931
+ X,
2932
+ {
2933
+ type: "password",
2934
+ id: "password",
2935
+ value: g.password,
2936
+ onChange: (p) => N({
2937
+ ...g,
2938
+ password: p.target.value
2939
+ }),
2940
+ placeholder: "Enter your password",
2941
+ className: "h-11 text-base",
2942
+ required: !0
2943
+ }
2944
+ )
2945
+ ] }),
2946
+ (q = (h = W()) == null ? void 0 : h.auth_params) == null ? void 0 : q.map((p) => /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2947
+ /* @__PURE__ */ i(
2948
+ Y,
2949
+ {
2950
+ htmlFor: p,
2951
+ className: "text-base font-medium",
2952
+ children: p
2953
+ }
2954
+ ),
2955
+ /* @__PURE__ */ i(
2956
+ X,
2957
+ {
2958
+ type: "text",
2959
+ id: p,
2960
+ value: g.auth_params[p] || "",
2961
+ onChange: (y) => N({
2962
+ ...g,
2963
+ auth_params: {
2964
+ ...g.auth_params,
2965
+ [p]: y.target.value
2966
+ }
2967
+ }),
2968
+ placeholder: `Enter ${p}`,
2969
+ className: "h-11 text-base",
2970
+ required: !0
2971
+ }
2972
+ )
2973
+ ] }, p)),
2974
+ T && /* @__PURE__ */ k(ee, { variant: "destructive", children: [
2975
+ /* @__PURE__ */ i(oe, { className: "h-4 w-4" }),
2976
+ /* @__PURE__ */ i(te, { children: T })
2977
+ ] }),
2978
+ /* @__PURE__ */ k("div", { className: "flex gap-3 pt-6", children: [
2979
+ /* @__PURE__ */ i(
2980
+ fe,
2981
+ {
2982
+ type: "submit",
2983
+ disabled: $,
2984
+ className: "flex-1 h-11 text-base font-semibold",
2985
+ size: "lg",
2986
+ children: $ ? /* @__PURE__ */ k(Pe, { children: [
2987
+ /* @__PURE__ */ i(he, { className: "mr-2 h-5 w-5 animate-spin" }),
2988
+ "Submitting..."
2989
+ ] }) : "Submit Credentials"
2990
+ }
2991
+ ),
2992
+ /* @__PURE__ */ i(
2993
+ fe,
2994
+ {
2995
+ type: "button",
2996
+ variant: "outline",
2997
+ className: "h-11",
2998
+ onClick: () => {
2999
+ f(null), N({
3000
+ username: "",
3001
+ password: "",
3002
+ auth_params: {}
3003
+ }), P(null);
3004
+ },
3005
+ children: "Cancel"
3006
+ }
3007
+ )
3008
+ ] })
3009
+ ]
2991
3010
  }
2992
3011
  )
2993
3012
  ] })
2994
3013
  ] })
2995
3014
  ] })
2996
- ] })
2997
- ] }) });
3015
+ }
3016
+ );
2998
3017
  }
2999
3018
  export {
3000
- Ot as Link
3019
+ Bt as Link
3001
3020
  };
3002
3021
  //# sourceMappingURL=index.js.map