@sudobility/devops-components-rn 1.0.0 → 1.0.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.
Files changed (65) hide show
  1. package/dist/AlertDialog.d.ts.map +1 -1
  2. package/dist/ApiPlayground.d.ts.map +1 -1
  3. package/dist/ApiReference.d.ts.map +1 -1
  4. package/dist/AuditLog.d.ts +26 -4
  5. package/dist/AuditLog.d.ts.map +1 -1
  6. package/dist/BodyMetrics.d.ts.map +1 -1
  7. package/dist/BuildLog.d.ts +16 -5
  8. package/dist/BuildLog.d.ts.map +1 -1
  9. package/dist/ChangelogDisplay.d.ts.map +1 -1
  10. package/dist/CodePlayground.d.ts.map +1 -1
  11. package/dist/ConflictResolver.d.ts.map +1 -1
  12. package/dist/DealPipeline.d.ts.map +1 -1
  13. package/dist/DeploymentStatus.d.ts +11 -4
  14. package/dist/DeploymentStatus.d.ts.map +1 -1
  15. package/dist/DriverLog.d.ts.map +1 -1
  16. package/dist/MemoryUsage.d.ts.map +1 -1
  17. package/dist/MetricsGrid.d.ts +12 -19
  18. package/dist/MetricsGrid.d.ts.map +1 -1
  19. package/dist/PipelineView.d.ts +21 -5
  20. package/dist/PipelineView.d.ts.map +1 -1
  21. package/dist/RegressionTest.d.ts.map +1 -1
  22. package/dist/SystemStatusIndicator.d.ts +9 -8
  23. package/dist/SystemStatusIndicator.d.ts.map +1 -1
  24. package/dist/TestResult.d.ts.map +1 -1
  25. package/dist/TestRunner.d.ts.map +1 -1
  26. package/dist/WebhookLogger.d.ts.map +1 -1
  27. package/dist/WorkflowBuilder.d.ts.map +1 -1
  28. package/dist/WorkflowTemplate.d.ts.map +1 -1
  29. package/dist/XmlParser.d.ts.map +1 -1
  30. package/dist/index.cjs +1002 -0
  31. package/dist/index.cjs.map +1 -0
  32. package/dist/index.d.ts +6 -27
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.mjs +1002 -0
  35. package/dist/index.mjs.map +1 -0
  36. package/package.json +9 -10
  37. package/src/AlertDialog.tsx +21 -16
  38. package/src/ApiPlayground.tsx +7 -3
  39. package/src/ApiReference.tsx +6 -2
  40. package/src/AuditLog.tsx +244 -21
  41. package/src/BodyMetrics.tsx +6 -2
  42. package/src/BuildLog.tsx +132 -26
  43. package/src/ChangelogDisplay.tsx +6 -2
  44. package/src/CodePlayground.tsx +7 -3
  45. package/src/ConflictResolver.tsx +7 -3
  46. package/src/DealPipeline.tsx +6 -2
  47. package/src/DeploymentStatus.tsx +159 -25
  48. package/src/DriverLog.tsx +4 -2
  49. package/src/MemoryUsage.tsx +6 -2
  50. package/src/MetricsGrid.tsx +99 -94
  51. package/src/PipelineView.tsx +225 -26
  52. package/src/RegressionTest.tsx +6 -2
  53. package/src/SystemStatusIndicator.tsx +70 -47
  54. package/src/TestResult.tsx +6 -2
  55. package/src/TestRunner.tsx +7 -3
  56. package/src/WebhookLogger.tsx +6 -2
  57. package/src/WorkflowBuilder.tsx +7 -3
  58. package/src/WorkflowTemplate.tsx +7 -3
  59. package/src/XmlParser.tsx +4 -2
  60. package/src/index.ts +41 -30
  61. package/src/nativewind.d.ts +3 -0
  62. package/dist/index.cjs.js +0 -1593
  63. package/dist/index.cjs.js.map +0 -1
  64. package/dist/index.esm.js +0 -1593
  65. package/dist/index.esm.js.map +0 -1
package/dist/index.mjs ADDED
@@ -0,0 +1,1002 @@
1
+ import require$$0 from "react";
2
+ import { View, Text, Pressable, ScrollView } from "react-native";
3
+ import { Card, cn } from "@sudobility/components-rn";
4
+ var jsxRuntime = { exports: {} };
5
+ var reactJsxRuntime_production = {};
6
+ /**
7
+ * @license React
8
+ * react-jsx-runtime.production.js
9
+ *
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ var hasRequiredReactJsxRuntime_production;
16
+ function requireReactJsxRuntime_production() {
17
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
18
+ hasRequiredReactJsxRuntime_production = 1;
19
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
20
+ function jsxProd(type, config, maybeKey) {
21
+ var key = null;
22
+ void 0 !== maybeKey && (key = "" + maybeKey);
23
+ void 0 !== config.key && (key = "" + config.key);
24
+ if ("key" in config) {
25
+ maybeKey = {};
26
+ for (var propName in config)
27
+ "key" !== propName && (maybeKey[propName] = config[propName]);
28
+ } else maybeKey = config;
29
+ config = maybeKey.ref;
30
+ return {
31
+ $$typeof: REACT_ELEMENT_TYPE,
32
+ type,
33
+ key,
34
+ ref: void 0 !== config ? config : null,
35
+ props: maybeKey
36
+ };
37
+ }
38
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
39
+ reactJsxRuntime_production.jsx = jsxProd;
40
+ reactJsxRuntime_production.jsxs = jsxProd;
41
+ return reactJsxRuntime_production;
42
+ }
43
+ var reactJsxRuntime_development = {};
44
+ /**
45
+ * @license React
46
+ * react-jsx-runtime.development.js
47
+ *
48
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
49
+ *
50
+ * This source code is licensed under the MIT license found in the
51
+ * LICENSE file in the root directory of this source tree.
52
+ */
53
+ var hasRequiredReactJsxRuntime_development;
54
+ function requireReactJsxRuntime_development() {
55
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
56
+ hasRequiredReactJsxRuntime_development = 1;
57
+ "production" !== process.env.NODE_ENV && (function() {
58
+ function getComponentNameFromType(type) {
59
+ if (null == type) return null;
60
+ if ("function" === typeof type)
61
+ return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
62
+ if ("string" === typeof type) return type;
63
+ switch (type) {
64
+ case REACT_FRAGMENT_TYPE:
65
+ return "Fragment";
66
+ case REACT_PROFILER_TYPE:
67
+ return "Profiler";
68
+ case REACT_STRICT_MODE_TYPE:
69
+ return "StrictMode";
70
+ case REACT_SUSPENSE_TYPE:
71
+ return "Suspense";
72
+ case REACT_SUSPENSE_LIST_TYPE:
73
+ return "SuspenseList";
74
+ case REACT_ACTIVITY_TYPE:
75
+ return "Activity";
76
+ }
77
+ if ("object" === typeof type)
78
+ switch ("number" === typeof type.tag && console.error(
79
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
80
+ ), type.$$typeof) {
81
+ case REACT_PORTAL_TYPE:
82
+ return "Portal";
83
+ case REACT_CONTEXT_TYPE:
84
+ return type.displayName || "Context";
85
+ case REACT_CONSUMER_TYPE:
86
+ return (type._context.displayName || "Context") + ".Consumer";
87
+ case REACT_FORWARD_REF_TYPE:
88
+ var innerType = type.render;
89
+ type = type.displayName;
90
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
91
+ return type;
92
+ case REACT_MEMO_TYPE:
93
+ return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
94
+ case REACT_LAZY_TYPE:
95
+ innerType = type._payload;
96
+ type = type._init;
97
+ try {
98
+ return getComponentNameFromType(type(innerType));
99
+ } catch (x) {
100
+ }
101
+ }
102
+ return null;
103
+ }
104
+ function testStringCoercion(value) {
105
+ return "" + value;
106
+ }
107
+ function checkKeyStringCoercion(value) {
108
+ try {
109
+ testStringCoercion(value);
110
+ var JSCompiler_inline_result = false;
111
+ } catch (e) {
112
+ JSCompiler_inline_result = true;
113
+ }
114
+ if (JSCompiler_inline_result) {
115
+ JSCompiler_inline_result = console;
116
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
117
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
118
+ JSCompiler_temp_const.call(
119
+ JSCompiler_inline_result,
120
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
121
+ JSCompiler_inline_result$jscomp$0
122
+ );
123
+ return testStringCoercion(value);
124
+ }
125
+ }
126
+ function getTaskName(type) {
127
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
128
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
129
+ return "<...>";
130
+ try {
131
+ var name = getComponentNameFromType(type);
132
+ return name ? "<" + name + ">" : "<...>";
133
+ } catch (x) {
134
+ return "<...>";
135
+ }
136
+ }
137
+ function getOwner() {
138
+ var dispatcher = ReactSharedInternals.A;
139
+ return null === dispatcher ? null : dispatcher.getOwner();
140
+ }
141
+ function UnknownOwner() {
142
+ return Error("react-stack-top-frame");
143
+ }
144
+ function hasValidKey(config) {
145
+ if (hasOwnProperty.call(config, "key")) {
146
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
147
+ if (getter && getter.isReactWarning) return false;
148
+ }
149
+ return void 0 !== config.key;
150
+ }
151
+ function defineKeyPropWarningGetter(props, displayName) {
152
+ function warnAboutAccessingKey() {
153
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
154
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
155
+ displayName
156
+ ));
157
+ }
158
+ warnAboutAccessingKey.isReactWarning = true;
159
+ Object.defineProperty(props, "key", {
160
+ get: warnAboutAccessingKey,
161
+ configurable: true
162
+ });
163
+ }
164
+ function elementRefGetterWithDeprecationWarning() {
165
+ var componentName = getComponentNameFromType(this.type);
166
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
167
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
168
+ ));
169
+ componentName = this.props.ref;
170
+ return void 0 !== componentName ? componentName : null;
171
+ }
172
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
173
+ var refProp = props.ref;
174
+ type = {
175
+ $$typeof: REACT_ELEMENT_TYPE,
176
+ type,
177
+ key,
178
+ props,
179
+ _owner: owner
180
+ };
181
+ null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
182
+ enumerable: false,
183
+ get: elementRefGetterWithDeprecationWarning
184
+ }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
185
+ type._store = {};
186
+ Object.defineProperty(type._store, "validated", {
187
+ configurable: false,
188
+ enumerable: false,
189
+ writable: true,
190
+ value: 0
191
+ });
192
+ Object.defineProperty(type, "_debugInfo", {
193
+ configurable: false,
194
+ enumerable: false,
195
+ writable: true,
196
+ value: null
197
+ });
198
+ Object.defineProperty(type, "_debugStack", {
199
+ configurable: false,
200
+ enumerable: false,
201
+ writable: true,
202
+ value: debugStack
203
+ });
204
+ Object.defineProperty(type, "_debugTask", {
205
+ configurable: false,
206
+ enumerable: false,
207
+ writable: true,
208
+ value: debugTask
209
+ });
210
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
211
+ return type;
212
+ }
213
+ function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
214
+ var children = config.children;
215
+ if (void 0 !== children)
216
+ if (isStaticChildren)
217
+ if (isArrayImpl(children)) {
218
+ for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
219
+ validateChildKeys(children[isStaticChildren]);
220
+ Object.freeze && Object.freeze(children);
221
+ } else
222
+ console.error(
223
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
224
+ );
225
+ else validateChildKeys(children);
226
+ if (hasOwnProperty.call(config, "key")) {
227
+ children = getComponentNameFromType(type);
228
+ var keys = Object.keys(config).filter(function(k) {
229
+ return "key" !== k;
230
+ });
231
+ isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
232
+ didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
233
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
234
+ isStaticChildren,
235
+ children,
236
+ keys,
237
+ children
238
+ ), didWarnAboutKeySpread[children + isStaticChildren] = true);
239
+ }
240
+ children = null;
241
+ void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
242
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
243
+ if ("key" in config) {
244
+ maybeKey = {};
245
+ for (var propName in config)
246
+ "key" !== propName && (maybeKey[propName] = config[propName]);
247
+ } else maybeKey = config;
248
+ children && defineKeyPropWarningGetter(
249
+ maybeKey,
250
+ "function" === typeof type ? type.displayName || type.name || "Unknown" : type
251
+ );
252
+ return ReactElement(
253
+ type,
254
+ children,
255
+ maybeKey,
256
+ getOwner(),
257
+ debugStack,
258
+ debugTask
259
+ );
260
+ }
261
+ function validateChildKeys(node) {
262
+ isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
263
+ }
264
+ function isValidElement(object) {
265
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
266
+ }
267
+ var React = require$$0, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
268
+ return null;
269
+ };
270
+ React = {
271
+ react_stack_bottom_frame: function(callStackForError) {
272
+ return callStackForError();
273
+ }
274
+ };
275
+ var specialPropKeyWarningShown;
276
+ var didWarnAboutElementRef = {};
277
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
278
+ React,
279
+ UnknownOwner
280
+ )();
281
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
282
+ var didWarnAboutKeySpread = {};
283
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
284
+ reactJsxRuntime_development.jsx = function(type, config, maybeKey) {
285
+ var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
286
+ return jsxDEVImpl(
287
+ type,
288
+ config,
289
+ maybeKey,
290
+ false,
291
+ trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
292
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
293
+ );
294
+ };
295
+ reactJsxRuntime_development.jsxs = function(type, config, maybeKey) {
296
+ var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
297
+ return jsxDEVImpl(
298
+ type,
299
+ config,
300
+ maybeKey,
301
+ true,
302
+ trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
303
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
304
+ );
305
+ };
306
+ })();
307
+ return reactJsxRuntime_development;
308
+ }
309
+ var hasRequiredJsxRuntime;
310
+ function requireJsxRuntime() {
311
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
312
+ hasRequiredJsxRuntime = 1;
313
+ if (process.env.NODE_ENV === "production") {
314
+ jsxRuntime.exports = requireReactJsxRuntime_production();
315
+ } else {
316
+ jsxRuntime.exports = requireReactJsxRuntime_development();
317
+ }
318
+ return jsxRuntime.exports;
319
+ }
320
+ var jsxRuntimeExports = requireJsxRuntime();
321
+ const statusConfig$1 = {
322
+ operational: {
323
+ color: "bg-green-500",
324
+ darkColor: "dark:bg-green-400",
325
+ label: "Operational"
326
+ },
327
+ degraded: {
328
+ color: "bg-yellow-500",
329
+ darkColor: "dark:bg-yellow-400",
330
+ label: "Degraded"
331
+ },
332
+ "major-outage": {
333
+ color: "bg-red-500",
334
+ darkColor: "dark:bg-red-400",
335
+ label: "Major Outage"
336
+ }
337
+ };
338
+ const SystemStatusIndicator = ({
339
+ status,
340
+ systemName,
341
+ description,
342
+ lastChecked,
343
+ onPress,
344
+ className
345
+ }) => {
346
+ const config = statusConfig$1[status];
347
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: cn("p-4", className), children: [
348
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center", children: [
349
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
350
+ View,
351
+ {
352
+ className: cn(
353
+ "w-3 h-3 rounded-full mr-3",
354
+ config.color,
355
+ config.darkColor
356
+ )
357
+ }
358
+ ),
359
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1", children: [
360
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: systemName }),
361
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
362
+ Text,
363
+ {
364
+ className: cn(
365
+ "text-sm",
366
+ status === "operational" && "text-green-600 dark:text-green-400",
367
+ status === "degraded" && "text-yellow-600 dark:text-yellow-400",
368
+ status === "major-outage" && "text-red-600 dark:text-red-400"
369
+ ),
370
+ children: config.label
371
+ }
372
+ )
373
+ ] })
374
+ ] }),
375
+ description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: description }),
376
+ lastChecked && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "mt-2 text-xs text-gray-500 dark:text-gray-500", children: [
377
+ "Last checked: ",
378
+ lastChecked.toLocaleString()
379
+ ] })
380
+ ] });
381
+ if (onPress) {
382
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Pressable, { onPress, accessibilityRole: "button", children: content });
383
+ }
384
+ return content;
385
+ };
386
+ const stateConfig = {
387
+ pending: {
388
+ color: "text-gray-600 dark:text-gray-400",
389
+ bgColor: "bg-gray-100",
390
+ darkBgColor: "dark:bg-gray-800",
391
+ label: "Pending",
392
+ icon: "⏳"
393
+ },
394
+ building: {
395
+ color: "text-blue-600 dark:text-blue-400",
396
+ bgColor: "bg-blue-100",
397
+ darkBgColor: "dark:bg-blue-900",
398
+ label: "Building",
399
+ icon: "🔨"
400
+ },
401
+ deploying: {
402
+ color: "text-purple-600 dark:text-purple-400",
403
+ bgColor: "bg-purple-100",
404
+ darkBgColor: "dark:bg-purple-900",
405
+ label: "Deploying",
406
+ icon: "🚀"
407
+ },
408
+ success: {
409
+ color: "text-green-600 dark:text-green-400",
410
+ bgColor: "bg-green-100",
411
+ darkBgColor: "dark:bg-green-900",
412
+ label: "Success",
413
+ icon: "✓"
414
+ },
415
+ failed: {
416
+ color: "text-red-600 dark:text-red-400",
417
+ bgColor: "bg-red-100",
418
+ darkBgColor: "dark:bg-red-900",
419
+ label: "Failed",
420
+ icon: "✗"
421
+ },
422
+ cancelled: {
423
+ color: "text-orange-600 dark:text-orange-400",
424
+ bgColor: "bg-orange-100",
425
+ darkBgColor: "dark:bg-orange-900",
426
+ label: "Cancelled",
427
+ icon: "⊘"
428
+ }
429
+ };
430
+ const formatDuration$1 = (seconds) => {
431
+ if (seconds < 60) return `${seconds}s`;
432
+ const minutes = Math.floor(seconds / 60);
433
+ const remainingSeconds = seconds % 60;
434
+ if (minutes < 60) return `${minutes}m ${remainingSeconds}s`;
435
+ const hours = Math.floor(minutes / 60);
436
+ const remainingMinutes = minutes % 60;
437
+ return `${hours}h ${remainingMinutes}m`;
438
+ };
439
+ const DeploymentStatus = ({
440
+ state,
441
+ environment,
442
+ version,
443
+ timestamp,
444
+ commitHash,
445
+ commitMessage,
446
+ duration,
447
+ onPress,
448
+ className
449
+ }) => {
450
+ const config = stateConfig[state];
451
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: cn("p-4", className), children: [
452
+ /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row items-start justify-between", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1", children: [
453
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center", children: [
454
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
455
+ View,
456
+ {
457
+ className: cn(
458
+ "px-2 py-1 rounded-md mr-2",
459
+ config.bgColor,
460
+ config.darkBgColor
461
+ ),
462
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: cn("text-xs font-medium", config.color), children: [
463
+ config.icon,
464
+ " ",
465
+ config.label
466
+ ] })
467
+ }
468
+ ),
469
+ /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded-md", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-xs font-medium text-gray-700 dark:text-gray-300", children: environment }) })
470
+ ] }),
471
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "mt-2 text-base font-semibold text-gray-900 dark:text-gray-100", children: version }),
472
+ commitHash && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "mt-1 text-sm font-mono text-gray-600 dark:text-gray-400", children: commitHash.substring(0, 7) }),
473
+ commitMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(
474
+ Text,
475
+ {
476
+ className: "mt-1 text-sm text-gray-600 dark:text-gray-400",
477
+ numberOfLines: 2,
478
+ children: commitMessage
479
+ }
480
+ )
481
+ ] }) }),
482
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center justify-between mt-3 pt-3 border-t border-gray-200 dark:border-gray-700", children: [
483
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: timestamp.toLocaleString() }),
484
+ duration !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
485
+ "Duration: ",
486
+ formatDuration$1(duration)
487
+ ] })
488
+ ] })
489
+ ] });
490
+ if (onPress) {
491
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Pressable, { onPress, accessibilityRole: "button", children: content });
492
+ }
493
+ return content;
494
+ };
495
+ const levelConfig = {
496
+ info: {
497
+ color: "text-blue-600 dark:text-blue-400",
498
+ bgColor: "bg-blue-50",
499
+ darkBgColor: "dark:bg-blue-950",
500
+ prefix: "INFO"
501
+ },
502
+ warn: {
503
+ color: "text-yellow-600 dark:text-yellow-400",
504
+ bgColor: "bg-yellow-50",
505
+ darkBgColor: "dark:bg-yellow-950",
506
+ prefix: "WARN"
507
+ },
508
+ error: {
509
+ color: "text-red-600 dark:text-red-400",
510
+ bgColor: "bg-red-50",
511
+ darkBgColor: "dark:bg-red-950",
512
+ prefix: "ERROR"
513
+ },
514
+ debug: {
515
+ color: "text-gray-600 dark:text-gray-400",
516
+ bgColor: "bg-gray-50",
517
+ darkBgColor: "dark:bg-gray-900",
518
+ prefix: "DEBUG"
519
+ },
520
+ success: {
521
+ color: "text-green-600 dark:text-green-400",
522
+ bgColor: "bg-green-50",
523
+ darkBgColor: "dark:bg-green-950",
524
+ prefix: "SUCCESS"
525
+ }
526
+ };
527
+ const formatTime = (date) => {
528
+ return date.toLocaleTimeString("en-US", {
529
+ hour12: false,
530
+ hour: "2-digit",
531
+ minute: "2-digit",
532
+ second: "2-digit"
533
+ });
534
+ };
535
+ const BuildLog = ({
536
+ entries,
537
+ title,
538
+ maxHeight = 400,
539
+ showTimestamp = true,
540
+ showSource = false,
541
+ className
542
+ }) => {
543
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: cn("overflow-hidden", className), children: [
544
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: title }) }),
545
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
546
+ ScrollView,
547
+ {
548
+ style: { maxHeight },
549
+ className: "bg-gray-900 dark:bg-black",
550
+ showsVerticalScrollIndicator: true,
551
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "p-3", children: entries.map((entry) => {
552
+ const config = levelConfig[entry.level];
553
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
554
+ View,
555
+ {
556
+ className: cn(
557
+ "flex-row flex-wrap py-1 px-2 mb-1 rounded",
558
+ config.bgColor,
559
+ config.darkBgColor
560
+ ),
561
+ children: [
562
+ showTimestamp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "font-mono text-xs text-gray-500 dark:text-gray-500 mr-2", children: [
563
+ "[",
564
+ formatTime(entry.timestamp),
565
+ "]"
566
+ ] }),
567
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
568
+ Text,
569
+ {
570
+ className: cn(
571
+ "font-mono text-xs font-bold mr-2",
572
+ config.color
573
+ ),
574
+ children: [
575
+ "[",
576
+ config.prefix,
577
+ "]"
578
+ ]
579
+ }
580
+ ),
581
+ showSource && entry.source && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "font-mono text-xs text-gray-400 dark:text-gray-600 mr-2", children: [
582
+ "[",
583
+ entry.source,
584
+ "]"
585
+ ] }),
586
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "font-mono text-xs text-gray-200 dark:text-gray-300 flex-1", children: entry.message })
587
+ ]
588
+ },
589
+ entry.id
590
+ );
591
+ }) })
592
+ }
593
+ ),
594
+ /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-2 bg-gray-800 dark:bg-gray-950 border-t border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs text-gray-400 dark:text-gray-500", children: [
595
+ entries.length,
596
+ " log entries"
597
+ ] }) })
598
+ ] });
599
+ };
600
+ const formatChange = (change) => {
601
+ const sign = change >= 0 ? "+" : "";
602
+ return sign + change.toFixed(1) + "%";
603
+ };
604
+ const MetricsGrid = ({
605
+ metrics,
606
+ columns = 2,
607
+ onMetricPress,
608
+ className
609
+ }) => {
610
+ const columnWidthClass = {
611
+ 1: "w-full",
612
+ 2: "w-1/2",
613
+ 3: "w-1/3",
614
+ 4: "w-1/4"
615
+ }[columns];
616
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: cn("flex-row flex-wrap -m-1", className), children: metrics.map((metric) => {
617
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { className: "p-4 m-1 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-start justify-between", children: [
618
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1", children: [
619
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-sm text-gray-600 dark:text-gray-400 mb-1", children: metric.label }),
620
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-baseline", children: [
621
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-2xl font-bold text-gray-900 dark:text-gray-100", children: metric.value }),
622
+ metric.unit && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-sm text-gray-500 dark:text-gray-500 ml-1", children: metric.unit })
623
+ ] }),
624
+ metric.change !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center mt-2", children: [
625
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
626
+ View,
627
+ {
628
+ className: cn(
629
+ "px-1.5 py-0.5 rounded",
630
+ metric.change >= 0 ? "bg-green-100 dark:bg-green-900" : "bg-red-100 dark:bg-red-900"
631
+ ),
632
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
633
+ Text,
634
+ {
635
+ className: cn(
636
+ "text-xs font-medium",
637
+ metric.change >= 0 ? "text-green-700 dark:text-green-300" : "text-red-700 dark:text-red-300"
638
+ ),
639
+ children: formatChange(metric.change)
640
+ }
641
+ )
642
+ }
643
+ ),
644
+ metric.changeLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-xs text-gray-500 dark:text-gray-500 ml-2", children: metric.changeLabel })
645
+ ] })
646
+ ] }),
647
+ metric.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "ml-2", children: metric.icon })
648
+ ] }) });
649
+ if (onMetricPress) {
650
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: columnWidthClass, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
651
+ Pressable,
652
+ {
653
+ onPress: () => onMetricPress(metric),
654
+ accessibilityRole: "button",
655
+ accessibilityLabel: metric.label + ": " + metric.value + (metric.unit || ""),
656
+ children: content
657
+ }
658
+ ) }, metric.id);
659
+ }
660
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: columnWidthClass, children: content }, metric.id);
661
+ }) });
662
+ };
663
+ const actionConfig = {
664
+ create: {
665
+ color: "text-green-700 dark:text-green-300",
666
+ bgColor: "bg-green-100",
667
+ darkBgColor: "dark:bg-green-900",
668
+ icon: "+"
669
+ },
670
+ update: {
671
+ color: "text-blue-700 dark:text-blue-300",
672
+ bgColor: "bg-blue-100",
673
+ darkBgColor: "dark:bg-blue-900",
674
+ icon: "~"
675
+ },
676
+ delete: {
677
+ color: "text-red-700 dark:text-red-300",
678
+ bgColor: "bg-red-100",
679
+ darkBgColor: "dark:bg-red-900",
680
+ icon: "-"
681
+ },
682
+ login: {
683
+ color: "text-purple-700 dark:text-purple-300",
684
+ bgColor: "bg-purple-100",
685
+ darkBgColor: "dark:bg-purple-900",
686
+ icon: "→"
687
+ },
688
+ logout: {
689
+ color: "text-gray-700 dark:text-gray-300",
690
+ bgColor: "bg-gray-100",
691
+ darkBgColor: "dark:bg-gray-800",
692
+ icon: "←"
693
+ },
694
+ access: {
695
+ color: "text-cyan-700 dark:text-cyan-300",
696
+ bgColor: "bg-cyan-100",
697
+ darkBgColor: "dark:bg-cyan-900",
698
+ icon: "◉"
699
+ },
700
+ export: {
701
+ color: "text-orange-700 dark:text-orange-300",
702
+ bgColor: "bg-orange-100",
703
+ darkBgColor: "dark:bg-orange-900",
704
+ icon: "↑"
705
+ },
706
+ import: {
707
+ color: "text-teal-700 dark:text-teal-300",
708
+ bgColor: "bg-teal-100",
709
+ darkBgColor: "dark:bg-teal-900",
710
+ icon: "↓"
711
+ },
712
+ approve: {
713
+ color: "text-emerald-700 dark:text-emerald-300",
714
+ bgColor: "bg-emerald-100",
715
+ darkBgColor: "dark:bg-emerald-900",
716
+ icon: "✓"
717
+ },
718
+ reject: {
719
+ color: "text-rose-700 dark:text-rose-300",
720
+ bgColor: "bg-rose-100",
721
+ darkBgColor: "dark:bg-rose-900",
722
+ icon: "✗"
723
+ },
724
+ deploy: {
725
+ color: "text-indigo-700 dark:text-indigo-300",
726
+ bgColor: "bg-indigo-100",
727
+ darkBgColor: "dark:bg-indigo-900",
728
+ icon: "▲"
729
+ },
730
+ rollback: {
731
+ color: "text-amber-700 dark:text-amber-300",
732
+ bgColor: "bg-amber-100",
733
+ darkBgColor: "dark:bg-amber-900",
734
+ icon: "↺"
735
+ }
736
+ };
737
+ const formatTimestamp = (date) => {
738
+ const now = /* @__PURE__ */ new Date();
739
+ const diffMs = now.getTime() - date.getTime();
740
+ const diffMins = Math.floor(diffMs / 6e4);
741
+ const diffHours = Math.floor(diffMs / 36e5);
742
+ const diffDays = Math.floor(diffMs / 864e5);
743
+ if (diffMins < 1) return "Just now";
744
+ if (diffMins < 60) return `${diffMins}m ago`;
745
+ if (diffHours < 24) return `${diffHours}h ago`;
746
+ if (diffDays < 7) return `${diffDays}d ago`;
747
+ return date.toLocaleDateString();
748
+ };
749
+ const AuditLog = ({
750
+ entries,
751
+ title,
752
+ maxHeight = 500,
753
+ onEntryPress,
754
+ className
755
+ }) => {
756
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: cn("overflow-hidden", className), children: [
757
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: title }) }),
758
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollView, { style: { maxHeight }, showsVerticalScrollIndicator: true, children: entries.map((entry, index) => {
759
+ const config = actionConfig[entry.action];
760
+ const isLast = index === entries.length - 1;
761
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsx(
762
+ View,
763
+ {
764
+ className: cn(
765
+ "px-4 py-3",
766
+ !isLast && "border-b border-gray-100 dark:border-gray-800"
767
+ ),
768
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-start", children: [
769
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
770
+ View,
771
+ {
772
+ className: cn(
773
+ "w-8 h-8 rounded-full items-center justify-center mr-3",
774
+ config.bgColor,
775
+ config.darkBgColor
776
+ ),
777
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: cn("text-sm font-bold", config.color), children: config.icon })
778
+ }
779
+ ),
780
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-1", children: [
781
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center flex-wrap", children: [
782
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: entry.actor.name }),
783
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-sm text-gray-600 dark:text-gray-400 mx-1", children: [
784
+ entry.action,
785
+ "d"
786
+ ] }),
787
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: entry.resource.name })
788
+ ] }),
789
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center mt-1", children: [
790
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
791
+ View,
792
+ {
793
+ className: cn(
794
+ "px-1.5 py-0.5 rounded mr-2",
795
+ config.bgColor,
796
+ config.darkBgColor
797
+ ),
798
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
799
+ Text,
800
+ {
801
+ className: cn(
802
+ "text-xs font-medium uppercase",
803
+ config.color
804
+ ),
805
+ children: entry.action
806
+ }
807
+ )
808
+ }
809
+ ),
810
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: entry.resource.type })
811
+ ] }),
812
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center mt-2", children: [
813
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-xs text-gray-400 dark:text-gray-600", children: formatTimestamp(entry.timestamp) }),
814
+ entry.ipAddress && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs text-gray-400 dark:text-gray-600 ml-2", children: [
815
+ "IP: ",
816
+ entry.ipAddress
817
+ ] })
818
+ ] })
819
+ ] })
820
+ ] })
821
+ }
822
+ );
823
+ if (onEntryPress) {
824
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
825
+ Pressable,
826
+ {
827
+ onPress: () => onEntryPress(entry),
828
+ accessibilityRole: "button",
829
+ children: content
830
+ },
831
+ entry.id
832
+ );
833
+ }
834
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { children: content }, entry.id);
835
+ }) }),
836
+ /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-2 bg-gray-50 dark:bg-gray-900 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
837
+ "Showing ",
838
+ entries.length,
839
+ " audit entries"
840
+ ] }) })
841
+ ] });
842
+ };
843
+ const statusConfig = {
844
+ pending: {
845
+ color: "text-gray-600 dark:text-gray-400",
846
+ bgColor: "bg-gray-100",
847
+ darkBgColor: "dark:bg-gray-800",
848
+ borderColor: "border-gray-300 dark:border-gray-600",
849
+ icon: "○"
850
+ },
851
+ running: {
852
+ color: "text-blue-600 dark:text-blue-400",
853
+ bgColor: "bg-blue-100",
854
+ darkBgColor: "dark:bg-blue-900",
855
+ borderColor: "border-blue-400 dark:border-blue-500",
856
+ icon: "◐"
857
+ },
858
+ success: {
859
+ color: "text-green-600 dark:text-green-400",
860
+ bgColor: "bg-green-100",
861
+ darkBgColor: "dark:bg-green-900",
862
+ borderColor: "border-green-400 dark:border-green-500",
863
+ icon: "●"
864
+ },
865
+ failed: {
866
+ color: "text-red-600 dark:text-red-400",
867
+ bgColor: "bg-red-100",
868
+ darkBgColor: "dark:bg-red-900",
869
+ borderColor: "border-red-400 dark:border-red-500",
870
+ icon: "✗"
871
+ },
872
+ skipped: {
873
+ color: "text-gray-400 dark:text-gray-600",
874
+ bgColor: "bg-gray-50",
875
+ darkBgColor: "dark:bg-gray-900",
876
+ borderColor: "border-gray-200 dark:border-gray-700",
877
+ icon: "◌"
878
+ },
879
+ cancelled: {
880
+ color: "text-orange-600 dark:text-orange-400",
881
+ bgColor: "bg-orange-100",
882
+ darkBgColor: "dark:bg-orange-900",
883
+ borderColor: "border-orange-400 dark:border-orange-500",
884
+ icon: "⊘"
885
+ }
886
+ };
887
+ const formatDuration = (seconds) => {
888
+ if (seconds < 60) return `${seconds}s`;
889
+ const minutes = Math.floor(seconds / 60);
890
+ const remainingSeconds = seconds % 60;
891
+ return `${minutes}m ${remainingSeconds}s`;
892
+ };
893
+ const PipelineView = ({
894
+ stages,
895
+ pipelineName,
896
+ pipelineId,
897
+ onStagePress,
898
+ className
899
+ }) => {
900
+ const overallStatus = stages.some((s) => s.status === "failed") ? "failed" : stages.some((s) => s.status === "running") ? "running" : stages.every((s) => s.status === "success") ? "success" : stages.every((s) => s.status === "pending") ? "pending" : "running";
901
+ const overallConfig = statusConfig[overallStatus];
902
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: cn("overflow-hidden", className), children: [
903
+ (pipelineName || pipelineId) && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center justify-between", children: [
904
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { children: [
905
+ pipelineName && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: pipelineName }),
906
+ pipelineId && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs font-mono text-gray-500 dark:text-gray-500", children: [
907
+ "#",
908
+ pipelineId
909
+ ] })
910
+ ] }),
911
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
912
+ View,
913
+ {
914
+ className: cn(
915
+ "px-2 py-1 rounded-full",
916
+ overallConfig.bgColor,
917
+ overallConfig.darkBgColor
918
+ ),
919
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: cn("text-xs font-medium", overallConfig.color), children: [
920
+ overallConfig.icon,
921
+ " ",
922
+ overallStatus.charAt(0).toUpperCase() + overallStatus.slice(1)
923
+ ] })
924
+ }
925
+ )
926
+ ] }) }),
927
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
928
+ ScrollView,
929
+ {
930
+ horizontal: true,
931
+ showsHorizontalScrollIndicator: true,
932
+ contentContainerStyle: { padding: 16 },
933
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "flex-row items-center", children: stages.map((stage, index) => {
934
+ const config = statusConfig[stage.status];
935
+ const isLast = index === stages.length - 1;
936
+ const stageContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "items-center", children: [
937
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
938
+ View,
939
+ {
940
+ className: cn(
941
+ "w-24 p-3 rounded-lg border-2",
942
+ config.bgColor,
943
+ config.darkBgColor,
944
+ config.borderColor
945
+ ),
946
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "items-center", children: [
947
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: cn("text-lg", config.color), children: config.icon }),
948
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
949
+ Text,
950
+ {
951
+ className: "text-xs font-medium text-gray-900 dark:text-gray-100 mt-1 text-center",
952
+ numberOfLines: 2,
953
+ children: stage.name
954
+ }
955
+ ),
956
+ stage.duration !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "text-xs text-gray-500 dark:text-gray-500 mt-1", children: formatDuration(stage.duration) })
957
+ ] })
958
+ }
959
+ ),
960
+ stage.jobs && stage.jobs.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
961
+ stage.jobs.filter((j) => j.status === "success").length,
962
+ "/",
963
+ stage.jobs.length,
964
+ " jobs"
965
+ ] }) })
966
+ ] });
967
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "flex-row items-center", children: [
968
+ onStagePress ? /* @__PURE__ */ jsxRuntimeExports.jsx(
969
+ Pressable,
970
+ {
971
+ onPress: () => onStagePress(stage),
972
+ accessibilityRole: "button",
973
+ accessibilityLabel: `${stage.name} - ${stage.status}`,
974
+ children: stageContent
975
+ }
976
+ ) : stageContent,
977
+ !isLast && /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { className: "mx-2", children: [
978
+ /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "w-8 h-0.5 bg-gray-300 dark:bg-gray-600" }),
979
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: "absolute -top-2 left-2 text-gray-400 dark:text-gray-600", children: "→" })
980
+ ] })
981
+ ] }, stage.id);
982
+ }) })
983
+ }
984
+ ),
985
+ /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: "px-4 py-2 bg-gray-50 dark:bg-gray-900 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
986
+ stages.length,
987
+ " stages |",
988
+ " ",
989
+ stages.filter((s) => s.status === "success").length,
990
+ " completed"
991
+ ] }) })
992
+ ] });
993
+ };
994
+ export {
995
+ AuditLog,
996
+ BuildLog,
997
+ DeploymentStatus,
998
+ MetricsGrid,
999
+ PipelineView,
1000
+ SystemStatusIndicator
1001
+ };
1002
+ //# sourceMappingURL=index.mjs.map