@sudobility/devops-components-rn 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) 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.js → index.cjs} +634 -614
  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.esm.js → index.mjs} +637 -617
  35. package/dist/index.mjs.map +1 -0
  36. package/package.json +8 -15
  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.map +0 -1
  63. package/dist/index.esm.js.map +0 -1
@@ -931,663 +931,683 @@ function requireJsxRuntime() {
931
931
  return jsxRuntime.exports;
932
932
  }
933
933
  var jsxRuntimeExports = requireJsxRuntime();
934
- const variantClasses = {
935
- default: {
936
- iconBg: "bg-blue-100 dark:bg-blue-900/30",
937
- icon: "text-blue-600 dark:text-blue-400",
938
- button: "bg-blue-600 active:bg-blue-700"
939
- },
940
- danger: {
941
- iconBg: "bg-red-100 dark:bg-red-900/30",
942
- icon: "text-red-600 dark:text-red-400",
943
- button: "bg-red-600 active:bg-red-700"
934
+ const statusConfig$1 = {
935
+ operational: {
936
+ color: "bg-green-500",
937
+ darkColor: "dark:bg-green-400",
938
+ label: "Operational"
944
939
  },
945
- warning: {
946
- iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
947
- icon: "text-yellow-600 dark:text-yellow-400",
948
- button: "bg-yellow-600 active:bg-yellow-700"
940
+ degraded: {
941
+ color: "bg-yellow-500",
942
+ darkColor: "dark:bg-yellow-400",
943
+ label: "Degraded"
949
944
  },
950
- success: {
951
- iconBg: "bg-green-100 dark:bg-green-900/30",
952
- icon: "text-green-600 dark:text-green-400",
953
- button: "bg-green-600 active:bg-green-700"
945
+ "major-outage": {
946
+ color: "bg-red-500",
947
+ darkColor: "dark:bg-red-400",
948
+ label: "Major Outage"
954
949
  }
955
950
  };
956
- const variantIcons = {
957
- default: "ℹ️",
958
- danger: "⚠️",
959
- warning: "⚠️",
960
- success: "✓"
961
- };
962
- const AlertDialog = ({
963
- isOpen,
964
- onClose,
965
- title,
951
+ const SystemStatusIndicator = ({
952
+ status,
953
+ systemName,
966
954
  description,
967
- confirmLabel = "Confirm",
968
- cancelLabel = "Cancel",
969
- onConfirm,
970
- variant = "default",
971
- showCancel = true,
972
- confirmDisabled = false,
973
- loading = false,
974
- className,
975
- ...props
955
+ lastChecked,
956
+ onPress,
957
+ className
976
958
  }) => {
977
- const handleConfirm = () => {
978
- if (!confirmDisabled && !loading) {
979
- onConfirm();
980
- }
981
- };
982
- const styles = variantClasses[variant];
983
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
984
- reactNative.Modal,
985
- {
986
- visible: isOpen,
987
- transparent: true,
988
- animationType: "fade",
989
- onRequestClose: onClose,
990
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1 justify-center items-center bg-black/50 p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
959
+ const config = statusConfig$1[status];
960
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(componentsRn.Card, { className: componentsRn.cn("p-4", className), children: [
961
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center", children: [
962
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
991
963
  reactNative.View,
992
964
  {
993
965
  className: componentsRn.cn(
994
- "w-full max-w-md bg-white dark:bg-gray-900 rounded-lg shadow-xl",
995
- className
996
- ),
997
- ...props,
998
- children: [
999
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "p-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-start gap-4", children: [
1000
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1001
- reactNative.View,
1002
- {
1003
- className: componentsRn.cn(
1004
- "w-12 h-12 rounded-full items-center justify-center",
1005
- styles.iconBg
1006
- ),
1007
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: componentsRn.cn("text-xl", styles.icon), children: variantIcons[variant] })
1008
- }
1009
- ),
1010
- /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
1011
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: typeof title === "string" ? title : null }),
1012
- typeof title !== "string" && title,
1013
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm text-gray-600 dark:text-gray-400", children: typeof description === "string" ? description : null }),
1014
- typeof description !== "string" && description
1015
- ] })
1016
- ] }) }),
1017
- /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row gap-3 px-6 py-4 bg-gray-50 dark:bg-gray-800/50 rounded-b-lg", children: [
1018
- showCancel && /* @__PURE__ */ jsxRuntimeExports.jsx(
1019
- reactNative.Pressable,
1020
- {
1021
- onPress: onClose,
1022
- disabled: loading,
1023
- accessibilityRole: "button",
1024
- className: componentsRn.cn(
1025
- "flex-1 px-4 py-2 rounded-md border",
1026
- "bg-white dark:bg-gray-700",
1027
- "border-gray-300 dark:border-gray-600",
1028
- loading && "opacity-50"
1029
- ),
1030
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-center text-gray-700 dark:text-gray-300", children: cancelLabel })
1031
- }
1032
- ),
1033
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1034
- reactNative.Pressable,
1035
- {
1036
- onPress: handleConfirm,
1037
- disabled: confirmDisabled || loading,
1038
- accessibilityRole: "button",
1039
- className: componentsRn.cn(
1040
- "flex-1 px-4 py-2 rounded-md",
1041
- styles.button,
1042
- (confirmDisabled || loading) && "opacity-50"
1043
- ),
1044
- children: loading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center justify-center gap-2", children: [
1045
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color: "white" }),
1046
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-white", children: "Loading..." })
1047
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-center text-white", children: confirmLabel })
1048
- }
1049
- )
1050
- ] })
1051
- ]
966
+ "w-3 h-3 rounded-full mr-3",
967
+ config.color,
968
+ config.darkColor
969
+ )
1052
970
  }
1053
- ) })
1054
- }
1055
- );
1056
- };
1057
- const ApiPlayground = ({
1058
- className,
1059
- children,
1060
- disabled = false,
1061
- onPress,
1062
- ...props
1063
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1064
- reactNative.Pressable,
1065
- {
1066
- onPress: disabled ? void 0 : onPress,
1067
- disabled,
1068
- accessibilityRole: "button",
1069
- accessibilityLabel: "API Playground",
1070
- className: componentsRn.cn(
1071
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1072
- disabled && "opacity-50",
1073
- className
1074
- ),
1075
- ...props,
1076
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "ApiPlayground Component" })
1077
- }
1078
- );
1079
- const ApiReference = ({
1080
- className,
1081
- children,
1082
- disabled,
1083
- ...props
1084
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1085
- reactNative.View,
1086
- {
1087
- className: componentsRn.cn(
1088
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1089
- disabled && "opacity-50",
1090
- className
1091
- ),
1092
- accessibilityLabel: "API Reference",
1093
- ...props,
1094
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "ApiReference Component" })
1095
- }
1096
- );
1097
- const AuditLog = ({
1098
- className,
1099
- children,
1100
- disabled,
1101
- ...props
1102
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1103
- reactNative.View,
1104
- {
1105
- className: componentsRn.cn(
1106
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1107
- disabled && "opacity-50",
1108
- className
1109
- ),
1110
- accessibilityLabel: "Audit Log",
1111
- ...props,
1112
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "AuditLog Component" })
1113
- }
1114
- );
1115
- const BodyMetrics = ({
1116
- className,
1117
- children,
1118
- disabled,
1119
- ...props
1120
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1121
- reactNative.View,
1122
- {
1123
- className: componentsRn.cn(
1124
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1125
- disabled && "opacity-50",
1126
- className
1127
- ),
1128
- accessibilityLabel: "Body Metrics",
1129
- ...props,
1130
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "BodyMetrics Component" })
1131
- }
1132
- );
1133
- const BuildLog = ({
1134
- className,
1135
- children,
1136
- disabled = false,
1137
- onPress,
1138
- ...props
1139
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1140
- reactNative.Pressable,
1141
- {
1142
- onPress: disabled ? void 0 : onPress,
1143
- disabled,
1144
- accessibilityRole: "button",
1145
- accessibilityLabel: "Build Log",
1146
- className: componentsRn.cn(
1147
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1148
- disabled && "opacity-50",
1149
- className
1150
- ),
1151
- ...props,
1152
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "BuildLog Component" })
1153
- }
1154
- );
1155
- const ChangelogDisplay = ({
1156
- className,
1157
- children,
1158
- disabled,
1159
- ...props
1160
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1161
- reactNative.View,
1162
- {
1163
- className: componentsRn.cn(
1164
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1165
- disabled && "opacity-50",
1166
- className
1167
- ),
1168
- accessibilityLabel: "Changelog Display",
1169
- ...props,
1170
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "ChangelogDisplay Component" })
1171
- }
1172
- );
1173
- const CodePlayground = ({
1174
- className,
1175
- children,
1176
- disabled = false,
1177
- onPress,
1178
- ...props
1179
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1180
- reactNative.Pressable,
1181
- {
1182
- onPress: disabled ? void 0 : onPress,
1183
- disabled,
1184
- accessibilityRole: "button",
1185
- accessibilityLabel: "Code Playground",
1186
- className: componentsRn.cn(
1187
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1188
- disabled && "opacity-50",
1189
- className
1190
- ),
1191
- ...props,
1192
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "CodePlayground Component" })
1193
- }
1194
- );
1195
- const ConflictResolver = ({
1196
- className,
1197
- children,
1198
- disabled = false,
1199
- onPress,
1200
- ...props
1201
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1202
- reactNative.Pressable,
1203
- {
1204
- onPress: disabled ? void 0 : onPress,
1205
- disabled,
1206
- accessibilityRole: "button",
1207
- accessibilityLabel: "Conflict Resolver",
1208
- className: componentsRn.cn(
1209
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1210
- disabled && "opacity-50",
1211
- className
1212
- ),
1213
- ...props,
1214
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "ConflictResolver Component" })
971
+ ),
972
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
973
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: systemName }),
974
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
975
+ reactNative.Text,
976
+ {
977
+ className: componentsRn.cn(
978
+ "text-sm",
979
+ status === "operational" && "text-green-600 dark:text-green-400",
980
+ status === "degraded" && "text-yellow-600 dark:text-yellow-400",
981
+ status === "major-outage" && "text-red-600 dark:text-red-400"
982
+ ),
983
+ children: config.label
984
+ }
985
+ )
986
+ ] })
987
+ ] }),
988
+ description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: description }),
989
+ lastChecked && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "mt-2 text-xs text-gray-500 dark:text-gray-500", children: [
990
+ "Last checked: ",
991
+ lastChecked.toLocaleString()
992
+ ] })
993
+ ] });
994
+ if (onPress) {
995
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Pressable, { onPress, accessibilityRole: "button", children: content });
1215
996
  }
1216
- );
1217
- const DealPipeline = ({
1218
- className,
1219
- children,
1220
- disabled,
1221
- ...props
1222
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1223
- reactNative.View,
1224
- {
1225
- className: componentsRn.cn(
1226
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1227
- disabled && "opacity-50",
1228
- className
1229
- ),
1230
- accessibilityLabel: "Deal Pipeline",
1231
- ...props,
1232
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "DealPipeline Component" })
997
+ return content;
998
+ };
999
+ const stateConfig = {
1000
+ pending: {
1001
+ color: "text-gray-600 dark:text-gray-400",
1002
+ bgColor: "bg-gray-100",
1003
+ darkBgColor: "dark:bg-gray-800",
1004
+ label: "Pending",
1005
+ icon: "⏳"
1006
+ },
1007
+ building: {
1008
+ color: "text-blue-600 dark:text-blue-400",
1009
+ bgColor: "bg-blue-100",
1010
+ darkBgColor: "dark:bg-blue-900",
1011
+ label: "Building",
1012
+ icon: "🔨"
1013
+ },
1014
+ deploying: {
1015
+ color: "text-purple-600 dark:text-purple-400",
1016
+ bgColor: "bg-purple-100",
1017
+ darkBgColor: "dark:bg-purple-900",
1018
+ label: "Deploying",
1019
+ icon: "🚀"
1020
+ },
1021
+ success: {
1022
+ color: "text-green-600 dark:text-green-400",
1023
+ bgColor: "bg-green-100",
1024
+ darkBgColor: "dark:bg-green-900",
1025
+ label: "Success",
1026
+ icon: "✓"
1027
+ },
1028
+ failed: {
1029
+ color: "text-red-600 dark:text-red-400",
1030
+ bgColor: "bg-red-100",
1031
+ darkBgColor: "dark:bg-red-900",
1032
+ label: "Failed",
1033
+ icon: "✗"
1034
+ },
1035
+ cancelled: {
1036
+ color: "text-orange-600 dark:text-orange-400",
1037
+ bgColor: "bg-orange-100",
1038
+ darkBgColor: "dark:bg-orange-900",
1039
+ label: "Cancelled",
1040
+ icon: "⊘"
1233
1041
  }
1234
- );
1042
+ };
1043
+ const formatDuration$1 = (seconds) => {
1044
+ if (seconds < 60) return `${seconds}s`;
1045
+ const minutes = Math.floor(seconds / 60);
1046
+ const remainingSeconds = seconds % 60;
1047
+ if (minutes < 60) return `${minutes}m ${remainingSeconds}s`;
1048
+ const hours = Math.floor(minutes / 60);
1049
+ const remainingMinutes = minutes % 60;
1050
+ return `${hours}h ${remainingMinutes}m`;
1051
+ };
1235
1052
  const DeploymentStatus = ({
1236
- className,
1237
- children,
1238
- disabled = false,
1053
+ state,
1054
+ environment,
1055
+ version,
1056
+ timestamp,
1057
+ commitHash,
1058
+ commitMessage,
1059
+ duration,
1239
1060
  onPress,
1240
- ...props
1241
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1242
- reactNative.Pressable,
1243
- {
1244
- onPress: disabled ? void 0 : onPress,
1245
- disabled,
1246
- accessibilityRole: "button",
1247
- accessibilityLabel: "Deployment Status",
1248
- className: componentsRn.cn(
1249
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1250
- disabled && "opacity-50",
1251
- className
1252
- ),
1253
- ...props,
1254
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "DeploymentStatus Component" })
1255
- }
1256
- );
1257
- const DriverLog = ({
1258
- className,
1259
- children,
1260
- disabled,
1261
- ...props
1262
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1263
- reactNative.View,
1264
- {
1265
- className: componentsRn.cn(
1266
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1267
- disabled && "opacity-50",
1268
- className
1269
- ),
1270
- accessibilityLabel: "Driver Log",
1271
- ...props,
1272
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "DriverLog Component" })
1273
- }
1274
- );
1275
- const MemoryUsage = ({
1276
- className,
1277
- children,
1278
- disabled,
1279
- ...props
1280
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1281
- reactNative.View,
1282
- {
1283
- className: componentsRn.cn(
1284
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1285
- disabled && "opacity-50",
1286
- className
1287
- ),
1288
- accessibilityLabel: "Memory Usage",
1289
- ...props,
1290
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "MemoryUsage Component" })
1291
- }
1292
- );
1293
- const colorClasses = {
1294
- blue: "text-blue-600 dark:text-blue-400",
1295
- green: "text-green-600 dark:text-green-400",
1296
- purple: "text-purple-600 dark:text-purple-400",
1297
- orange: "text-orange-600 dark:text-orange-400",
1298
- pink: "text-pink-600 dark:text-pink-400",
1299
- gray: "text-gray-600 dark:text-gray-400"
1300
- };
1301
- const MetricCard = ({ metric }) => {
1302
- const colorClass = metric.color ? colorClasses[metric.color] : colorClasses.blue;
1303
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 items-center mb-4 mx-2", children: [
1304
- metric.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: componentsRn.cn("mb-4", colorClass), children: metric.icon }),
1305
- /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "gap-2 items-center", children: [
1306
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: componentsRn.cn("text-3xl font-bold", colorClass), children: metric.value }),
1307
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-600 dark:text-gray-400 font-medium", children: metric.label }),
1308
- metric.trend && /* @__PURE__ */ jsxRuntimeExports.jsxs(
1061
+ className
1062
+ }) => {
1063
+ const config = stateConfig[state];
1064
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(componentsRn.Card, { className: componentsRn.cn("p-4", className), children: [
1065
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row items-start justify-between", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
1066
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center", children: [
1067
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1068
+ reactNative.View,
1069
+ {
1070
+ className: componentsRn.cn(
1071
+ "px-2 py-1 rounded-md mr-2",
1072
+ config.bgColor,
1073
+ config.darkBgColor
1074
+ ),
1075
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: componentsRn.cn("text-xs font-medium", config.color), children: [
1076
+ config.icon,
1077
+ " ",
1078
+ config.label
1079
+ ] })
1080
+ }
1081
+ ),
1082
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded-md", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs font-medium text-gray-700 dark:text-gray-300", children: environment }) })
1083
+ ] }),
1084
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "mt-2 text-base font-semibold text-gray-900 dark:text-gray-100", children: version }),
1085
+ commitHash && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "mt-1 text-sm font-mono text-gray-600 dark:text-gray-400", children: commitHash.substring(0, 7) }),
1086
+ commitMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(
1309
1087
  reactNative.Text,
1310
1088
  {
1311
- className: componentsRn.cn(
1312
- "text-sm font-semibold",
1313
- metric.trend.direction === "up" ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"
1314
- ),
1315
- children: [
1316
- metric.trend.direction === "up" ? "↑" : "↓",
1317
- " ",
1318
- metric.trend.value
1319
- ]
1089
+ className: "mt-1 text-sm text-gray-600 dark:text-gray-400",
1090
+ numberOfLines: 2,
1091
+ children: commitMessage
1320
1092
  }
1321
1093
  )
1094
+ ] }) }),
1095
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center justify-between mt-3 pt-3 border-t border-gray-200 dark:border-gray-700", children: [
1096
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: timestamp.toLocaleString() }),
1097
+ duration !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
1098
+ "Duration: ",
1099
+ formatDuration$1(duration)
1100
+ ] })
1322
1101
  ] })
1323
1102
  ] });
1103
+ if (onPress) {
1104
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Pressable, { onPress, accessibilityRole: "button", children: content });
1105
+ }
1106
+ return content;
1324
1107
  };
1325
- const MetricsGrid = ({
1108
+ const levelConfig = {
1109
+ info: {
1110
+ color: "text-blue-600 dark:text-blue-400",
1111
+ bgColor: "bg-blue-50",
1112
+ darkBgColor: "dark:bg-blue-950",
1113
+ prefix: "INFO"
1114
+ },
1115
+ warn: {
1116
+ color: "text-yellow-600 dark:text-yellow-400",
1117
+ bgColor: "bg-yellow-50",
1118
+ darkBgColor: "dark:bg-yellow-950",
1119
+ prefix: "WARN"
1120
+ },
1121
+ error: {
1122
+ color: "text-red-600 dark:text-red-400",
1123
+ bgColor: "bg-red-50",
1124
+ darkBgColor: "dark:bg-red-950",
1125
+ prefix: "ERROR"
1126
+ },
1127
+ debug: {
1128
+ color: "text-gray-600 dark:text-gray-400",
1129
+ bgColor: "bg-gray-50",
1130
+ darkBgColor: "dark:bg-gray-900",
1131
+ prefix: "DEBUG"
1132
+ },
1133
+ success: {
1134
+ color: "text-green-600 dark:text-green-400",
1135
+ bgColor: "bg-green-50",
1136
+ darkBgColor: "dark:bg-green-950",
1137
+ prefix: "SUCCESS"
1138
+ }
1139
+ };
1140
+ const formatTime = (date) => {
1141
+ return date.toLocaleTimeString("en-US", {
1142
+ hour12: false,
1143
+ hour: "2-digit",
1144
+ minute: "2-digit",
1145
+ second: "2-digit"
1146
+ });
1147
+ };
1148
+ const BuildLog = ({
1149
+ entries,
1326
1150
  title,
1327
- description,
1328
- metrics,
1329
- columns = 2,
1330
- className,
1331
- ...props
1151
+ maxHeight = 400,
1152
+ showTimestamp = true,
1153
+ showSource = false,
1154
+ className
1332
1155
  }) => {
1333
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: componentsRn.cn("py-8 px-4", className), ...props, children: [
1334
- (title || description) && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "items-center mb-8", children: [
1335
- title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-2xl font-bold text-gray-900 dark:text-white mb-4 text-center", children: title }),
1336
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-lg text-gray-600 dark:text-gray-300 text-center max-w-lg", children: description })
1337
- ] }),
1156
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(componentsRn.Card, { className: componentsRn.cn("overflow-hidden", className), children: [
1157
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: title }) }),
1338
1158
  /* @__PURE__ */ jsxRuntimeExports.jsx(
1339
- reactNative.FlatList,
1159
+ reactNative.ScrollView,
1340
1160
  {
1341
- data: metrics,
1342
- keyExtractor: (_, index) => index.toString(),
1343
- numColumns: columns > 2 ? 2 : columns,
1344
- renderItem: ({ item }) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCard, { metric: item }) }),
1345
- scrollEnabled: false
1161
+ style: { maxHeight },
1162
+ className: "bg-gray-900 dark:bg-black",
1163
+ showsVerticalScrollIndicator: true,
1164
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "p-3", children: entries.map((entry) => {
1165
+ const config = levelConfig[entry.level];
1166
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1167
+ reactNative.View,
1168
+ {
1169
+ className: componentsRn.cn(
1170
+ "flex-row flex-wrap py-1 px-2 mb-1 rounded",
1171
+ config.bgColor,
1172
+ config.darkBgColor
1173
+ ),
1174
+ children: [
1175
+ showTimestamp && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "font-mono text-xs text-gray-500 dark:text-gray-500 mr-2", children: [
1176
+ "[",
1177
+ formatTime(entry.timestamp),
1178
+ "]"
1179
+ ] }),
1180
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
1181
+ reactNative.Text,
1182
+ {
1183
+ className: componentsRn.cn(
1184
+ "font-mono text-xs font-bold mr-2",
1185
+ config.color
1186
+ ),
1187
+ children: [
1188
+ "[",
1189
+ config.prefix,
1190
+ "]"
1191
+ ]
1192
+ }
1193
+ ),
1194
+ showSource && entry.source && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "font-mono text-xs text-gray-400 dark:text-gray-600 mr-2", children: [
1195
+ "[",
1196
+ entry.source,
1197
+ "]"
1198
+ ] }),
1199
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "font-mono text-xs text-gray-200 dark:text-gray-300 flex-1", children: entry.message })
1200
+ ]
1201
+ },
1202
+ entry.id
1203
+ );
1204
+ }) })
1346
1205
  }
1347
- )
1206
+ ),
1207
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-4 py-2 bg-gray-800 dark:bg-gray-950 border-t border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-xs text-gray-400 dark:text-gray-500", children: [
1208
+ entries.length,
1209
+ " log entries"
1210
+ ] }) })
1348
1211
  ] });
1349
1212
  };
1350
- const PipelineView = ({
1351
- className,
1352
- children,
1353
- disabled = false,
1354
- onPress,
1355
- ...props
1356
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1357
- reactNative.Pressable,
1358
- {
1359
- onPress: disabled ? void 0 : onPress,
1360
- disabled,
1361
- accessibilityRole: "button",
1362
- accessibilityLabel: "Pipeline View",
1363
- className: componentsRn.cn(
1364
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1365
- disabled && "opacity-50",
1366
- className
1367
- ),
1368
- ...props,
1369
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "PipelineView Component" })
1370
- }
1371
- );
1372
- const RegressionTest = ({
1373
- className,
1374
- children,
1375
- disabled,
1376
- ...props
1377
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1378
- reactNative.View,
1379
- {
1380
- className: componentsRn.cn(
1381
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1382
- disabled && "opacity-50",
1383
- className
1384
- ),
1385
- accessibilityLabel: "Regression Test",
1386
- ...props,
1387
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "RegressionTest Component" })
1388
- }
1389
- );
1390
- const statusConfig = {
1391
- operational: {
1392
- color: "bg-green-500",
1393
- textColor: "text-green-700 dark:text-green-400",
1394
- label: "Operational"
1395
- },
1396
- degraded: {
1397
- color: "bg-yellow-500",
1398
- textColor: "text-yellow-700 dark:text-yellow-400",
1399
- label: "Degraded Performance"
1400
- },
1401
- partial: {
1402
- color: "bg-orange-500",
1403
- textColor: "text-orange-700 dark:text-orange-400",
1404
- label: "Partial Outage"
1405
- },
1406
- major: {
1407
- color: "bg-red-500",
1408
- textColor: "text-red-700 dark:text-red-400",
1409
- label: "Major Outage"
1410
- },
1411
- maintenance: {
1412
- color: "bg-blue-500",
1413
- textColor: "text-blue-700 dark:text-blue-400",
1414
- label: "Under Maintenance"
1415
- }
1213
+ const formatChange = (change) => {
1214
+ const sign = change >= 0 ? "+" : "";
1215
+ return sign + change.toFixed(1) + "%";
1416
1216
  };
1417
- const SystemStatusIndicator = ({
1418
- status,
1419
- label,
1420
- showPulse = true,
1421
- className,
1422
- ...props
1217
+ const MetricsGrid = ({
1218
+ metrics,
1219
+ columns = 2,
1220
+ onMetricPress,
1221
+ className
1423
1222
  }) => {
1424
- const config = statusConfig[status];
1425
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1426
- reactNative.View,
1427
- {
1428
- className: componentsRn.cn("flex-row items-center gap-2", className),
1429
- accessibilityRole: "text",
1430
- accessibilityLabel: `System status: ${label || config.label}`,
1431
- ...props,
1432
- children: [
1433
- /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "relative", children: [
1434
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: componentsRn.cn("w-3 h-3 rounded-full", config.color) }),
1435
- showPulse && status === "operational" && /* @__PURE__ */ jsxRuntimeExports.jsx(
1223
+ const columnWidthClass = {
1224
+ 1: "w-full",
1225
+ 2: "w-1/2",
1226
+ 3: "w-1/3",
1227
+ 4: "w-1/4"
1228
+ }[columns];
1229
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: componentsRn.cn("flex-row flex-wrap -m-1", className), children: metrics.map((metric) => {
1230
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsx(componentsRn.Card, { className: "p-4 m-1 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-start justify-between", children: [
1231
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
1232
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm text-gray-600 dark:text-gray-400 mb-1", children: metric.label }),
1233
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-baseline", children: [
1234
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-2xl font-bold text-gray-900 dark:text-gray-100", children: metric.value }),
1235
+ metric.unit && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm text-gray-500 dark:text-gray-500 ml-1", children: metric.unit })
1236
+ ] }),
1237
+ metric.change !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center mt-2", children: [
1238
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1436
1239
  reactNative.View,
1437
1240
  {
1438
1241
  className: componentsRn.cn(
1439
- "absolute inset-0 rounded-full opacity-75",
1440
- config.color
1242
+ "px-1.5 py-0.5 rounded",
1243
+ metric.change >= 0 ? "bg-green-100 dark:bg-green-900" : "bg-red-100 dark:bg-red-900"
1244
+ ),
1245
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1246
+ reactNative.Text,
1247
+ {
1248
+ className: componentsRn.cn(
1249
+ "text-xs font-medium",
1250
+ metric.change >= 0 ? "text-green-700 dark:text-green-300" : "text-red-700 dark:text-red-300"
1251
+ ),
1252
+ children: formatChange(metric.change)
1253
+ }
1441
1254
  )
1442
1255
  }
1443
- )
1444
- ] }),
1445
- /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: componentsRn.cn("text-sm font-medium", config.textColor), children: label || config.label })
1446
- ]
1256
+ ),
1257
+ metric.changeLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500 ml-2", children: metric.changeLabel })
1258
+ ] })
1259
+ ] }),
1260
+ metric.icon && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "ml-2", children: metric.icon })
1261
+ ] }) });
1262
+ if (onMetricPress) {
1263
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: columnWidthClass, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1264
+ reactNative.Pressable,
1265
+ {
1266
+ onPress: () => onMetricPress(metric),
1267
+ accessibilityRole: "button",
1268
+ accessibilityLabel: metric.label + ": " + metric.value + (metric.unit || ""),
1269
+ children: content
1270
+ }
1271
+ ) }, metric.id);
1447
1272
  }
1448
- );
1273
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: columnWidthClass, children: content }, metric.id);
1274
+ }) });
1449
1275
  };
1450
- const TestResult = ({
1451
- className,
1452
- children,
1453
- disabled,
1454
- ...props
1455
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1456
- reactNative.View,
1457
- {
1458
- className: componentsRn.cn(
1459
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1460
- disabled && "opacity-50",
1461
- className
1462
- ),
1463
- accessibilityLabel: "Test Result",
1464
- ...props,
1465
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "TestResult Component" })
1466
- }
1467
- );
1468
- const TestRunner = ({
1469
- className,
1470
- children,
1471
- disabled = false,
1472
- onPress,
1473
- ...props
1474
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1475
- reactNative.Pressable,
1476
- {
1477
- onPress: disabled ? void 0 : onPress,
1478
- disabled,
1479
- accessibilityRole: "button",
1480
- accessibilityLabel: "Test Runner",
1481
- className: componentsRn.cn(
1482
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1483
- disabled && "opacity-50",
1484
- className
1485
- ),
1486
- ...props,
1487
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "TestRunner Component" })
1488
- }
1489
- );
1490
- const WebhookLogger = ({
1491
- className,
1492
- children,
1493
- disabled,
1494
- ...props
1495
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1496
- reactNative.View,
1497
- {
1498
- className: componentsRn.cn(
1499
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1500
- disabled && "opacity-50",
1501
- className
1502
- ),
1503
- accessibilityLabel: "Webhook Logger",
1504
- ...props,
1505
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "WebhookLogger Component" })
1506
- }
1507
- );
1508
- const WorkflowBuilder = ({
1509
- className,
1510
- children,
1511
- disabled = false,
1512
- onPress,
1513
- ...props
1514
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1515
- reactNative.Pressable,
1516
- {
1517
- onPress: disabled ? void 0 : onPress,
1518
- disabled,
1519
- accessibilityRole: "button",
1520
- accessibilityLabel: "Workflow Builder",
1521
- className: componentsRn.cn(
1522
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1523
- disabled && "opacity-50",
1524
- className
1525
- ),
1526
- ...props,
1527
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "WorkflowBuilder Component" })
1276
+ const actionConfig = {
1277
+ create: {
1278
+ color: "text-green-700 dark:text-green-300",
1279
+ bgColor: "bg-green-100",
1280
+ darkBgColor: "dark:bg-green-900",
1281
+ icon: "+"
1282
+ },
1283
+ update: {
1284
+ color: "text-blue-700 dark:text-blue-300",
1285
+ bgColor: "bg-blue-100",
1286
+ darkBgColor: "dark:bg-blue-900",
1287
+ icon: "~"
1288
+ },
1289
+ delete: {
1290
+ color: "text-red-700 dark:text-red-300",
1291
+ bgColor: "bg-red-100",
1292
+ darkBgColor: "dark:bg-red-900",
1293
+ icon: "-"
1294
+ },
1295
+ login: {
1296
+ color: "text-purple-700 dark:text-purple-300",
1297
+ bgColor: "bg-purple-100",
1298
+ darkBgColor: "dark:bg-purple-900",
1299
+ icon: "→"
1300
+ },
1301
+ logout: {
1302
+ color: "text-gray-700 dark:text-gray-300",
1303
+ bgColor: "bg-gray-100",
1304
+ darkBgColor: "dark:bg-gray-800",
1305
+ icon: ""
1306
+ },
1307
+ access: {
1308
+ color: "text-cyan-700 dark:text-cyan-300",
1309
+ bgColor: "bg-cyan-100",
1310
+ darkBgColor: "dark:bg-cyan-900",
1311
+ icon: "◉"
1312
+ },
1313
+ export: {
1314
+ color: "text-orange-700 dark:text-orange-300",
1315
+ bgColor: "bg-orange-100",
1316
+ darkBgColor: "dark:bg-orange-900",
1317
+ icon: "↑"
1318
+ },
1319
+ import: {
1320
+ color: "text-teal-700 dark:text-teal-300",
1321
+ bgColor: "bg-teal-100",
1322
+ darkBgColor: "dark:bg-teal-900",
1323
+ icon: "↓"
1324
+ },
1325
+ approve: {
1326
+ color: "text-emerald-700 dark:text-emerald-300",
1327
+ bgColor: "bg-emerald-100",
1328
+ darkBgColor: "dark:bg-emerald-900",
1329
+ icon: ""
1330
+ },
1331
+ reject: {
1332
+ color: "text-rose-700 dark:text-rose-300",
1333
+ bgColor: "bg-rose-100",
1334
+ darkBgColor: "dark:bg-rose-900",
1335
+ icon: "✗"
1336
+ },
1337
+ deploy: {
1338
+ color: "text-indigo-700 dark:text-indigo-300",
1339
+ bgColor: "bg-indigo-100",
1340
+ darkBgColor: "dark:bg-indigo-900",
1341
+ icon: "▲"
1342
+ },
1343
+ rollback: {
1344
+ color: "text-amber-700 dark:text-amber-300",
1345
+ bgColor: "bg-amber-100",
1346
+ darkBgColor: "dark:bg-amber-900",
1347
+ icon: "↺"
1528
1348
  }
1529
- );
1530
- const WorkflowTemplate = ({
1531
- className,
1532
- children,
1533
- disabled = false,
1534
- onPress,
1535
- ...props
1536
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1537
- reactNative.Pressable,
1538
- {
1539
- onPress: disabled ? void 0 : onPress,
1540
- disabled,
1541
- accessibilityRole: "button",
1542
- accessibilityLabel: "Workflow Template",
1543
- className: componentsRn.cn(
1544
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1545
- disabled && "opacity-50",
1546
- className
1547
- ),
1548
- ...props,
1549
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "WorkflowTemplate Component" })
1349
+ };
1350
+ const formatTimestamp = (date) => {
1351
+ const now = /* @__PURE__ */ new Date();
1352
+ const diffMs = now.getTime() - date.getTime();
1353
+ const diffMins = Math.floor(diffMs / 6e4);
1354
+ const diffHours = Math.floor(diffMs / 36e5);
1355
+ const diffDays = Math.floor(diffMs / 864e5);
1356
+ if (diffMins < 1) return "Just now";
1357
+ if (diffMins < 60) return `${diffMins}m ago`;
1358
+ if (diffHours < 24) return `${diffHours}h ago`;
1359
+ if (diffDays < 7) return `${diffDays}d ago`;
1360
+ return date.toLocaleDateString();
1361
+ };
1362
+ const AuditLog = ({
1363
+ entries,
1364
+ title,
1365
+ maxHeight = 500,
1366
+ onEntryPress,
1367
+ className
1368
+ }) => {
1369
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(componentsRn.Card, { className: componentsRn.cn("overflow-hidden", className), children: [
1370
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: title }) }),
1371
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.ScrollView, { style: { maxHeight }, showsVerticalScrollIndicator: true, children: entries.map((entry, index) => {
1372
+ const config = actionConfig[entry.action];
1373
+ const isLast = index === entries.length - 1;
1374
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsx(
1375
+ reactNative.View,
1376
+ {
1377
+ className: componentsRn.cn(
1378
+ "px-4 py-3",
1379
+ !isLast && "border-b border-gray-100 dark:border-gray-800"
1380
+ ),
1381
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-start", children: [
1382
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1383
+ reactNative.View,
1384
+ {
1385
+ className: componentsRn.cn(
1386
+ "w-8 h-8 rounded-full items-center justify-center mr-3",
1387
+ config.bgColor,
1388
+ config.darkBgColor
1389
+ ),
1390
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: componentsRn.cn("text-sm font-bold", config.color), children: config.icon })
1391
+ }
1392
+ ),
1393
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-1", children: [
1394
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center flex-wrap", children: [
1395
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: entry.actor.name }),
1396
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-sm text-gray-600 dark:text-gray-400 mx-1", children: [
1397
+ entry.action,
1398
+ "d"
1399
+ ] }),
1400
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: entry.resource.name })
1401
+ ] }),
1402
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center mt-1", children: [
1403
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1404
+ reactNative.View,
1405
+ {
1406
+ className: componentsRn.cn(
1407
+ "px-1.5 py-0.5 rounded mr-2",
1408
+ config.bgColor,
1409
+ config.darkBgColor
1410
+ ),
1411
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1412
+ reactNative.Text,
1413
+ {
1414
+ className: componentsRn.cn(
1415
+ "text-xs font-medium uppercase",
1416
+ config.color
1417
+ ),
1418
+ children: entry.action
1419
+ }
1420
+ )
1421
+ }
1422
+ ),
1423
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: entry.resource.type })
1424
+ ] }),
1425
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center mt-2", children: [
1426
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-400 dark:text-gray-600", children: formatTimestamp(entry.timestamp) }),
1427
+ entry.ipAddress && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-xs text-gray-400 dark:text-gray-600 ml-2", children: [
1428
+ "IP: ",
1429
+ entry.ipAddress
1430
+ ] })
1431
+ ] })
1432
+ ] })
1433
+ ] })
1434
+ }
1435
+ );
1436
+ if (onEntryPress) {
1437
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1438
+ reactNative.Pressable,
1439
+ {
1440
+ onPress: () => onEntryPress(entry),
1441
+ accessibilityRole: "button",
1442
+ children: content
1443
+ },
1444
+ entry.id
1445
+ );
1446
+ }
1447
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { children: content }, entry.id);
1448
+ }) }),
1449
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.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(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
1450
+ "Showing ",
1451
+ entries.length,
1452
+ " audit entries"
1453
+ ] }) })
1454
+ ] });
1455
+ };
1456
+ const statusConfig = {
1457
+ pending: {
1458
+ color: "text-gray-600 dark:text-gray-400",
1459
+ bgColor: "bg-gray-100",
1460
+ darkBgColor: "dark:bg-gray-800",
1461
+ borderColor: "border-gray-300 dark:border-gray-600",
1462
+ icon: "○"
1463
+ },
1464
+ running: {
1465
+ color: "text-blue-600 dark:text-blue-400",
1466
+ bgColor: "bg-blue-100",
1467
+ darkBgColor: "dark:bg-blue-900",
1468
+ borderColor: "border-blue-400 dark:border-blue-500",
1469
+ icon: "◐"
1470
+ },
1471
+ success: {
1472
+ color: "text-green-600 dark:text-green-400",
1473
+ bgColor: "bg-green-100",
1474
+ darkBgColor: "dark:bg-green-900",
1475
+ borderColor: "border-green-400 dark:border-green-500",
1476
+ icon: "●"
1477
+ },
1478
+ failed: {
1479
+ color: "text-red-600 dark:text-red-400",
1480
+ bgColor: "bg-red-100",
1481
+ darkBgColor: "dark:bg-red-900",
1482
+ borderColor: "border-red-400 dark:border-red-500",
1483
+ icon: "✗"
1484
+ },
1485
+ skipped: {
1486
+ color: "text-gray-400 dark:text-gray-600",
1487
+ bgColor: "bg-gray-50",
1488
+ darkBgColor: "dark:bg-gray-900",
1489
+ borderColor: "border-gray-200 dark:border-gray-700",
1490
+ icon: "◌"
1491
+ },
1492
+ cancelled: {
1493
+ color: "text-orange-600 dark:text-orange-400",
1494
+ bgColor: "bg-orange-100",
1495
+ darkBgColor: "dark:bg-orange-900",
1496
+ borderColor: "border-orange-400 dark:border-orange-500",
1497
+ icon: "⊘"
1550
1498
  }
1551
- );
1552
- const XmlParser = ({
1553
- className,
1554
- children,
1555
- disabled,
1556
- ...props
1557
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1558
- reactNative.View,
1559
- {
1560
- className: componentsRn.cn(
1561
- "p-4 rounded-lg border bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700",
1562
- disabled && "opacity-50",
1563
- className
1499
+ };
1500
+ const formatDuration = (seconds) => {
1501
+ if (seconds < 60) return `${seconds}s`;
1502
+ const minutes = Math.floor(seconds / 60);
1503
+ const remainingSeconds = seconds % 60;
1504
+ return `${minutes}m ${remainingSeconds}s`;
1505
+ };
1506
+ const PipelineView = ({
1507
+ stages,
1508
+ pipelineName,
1509
+ pipelineId,
1510
+ onStagePress,
1511
+ className
1512
+ }) => {
1513
+ 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";
1514
+ const overallConfig = statusConfig[overallStatus];
1515
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(componentsRn.Card, { className: componentsRn.cn("overflow-hidden", className), children: [
1516
+ (pipelineName || pipelineId) && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center justify-between", children: [
1517
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { children: [
1518
+ pipelineName && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: pipelineName }),
1519
+ pipelineId && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-xs font-mono text-gray-500 dark:text-gray-500", children: [
1520
+ "#",
1521
+ pipelineId
1522
+ ] })
1523
+ ] }),
1524
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1525
+ reactNative.View,
1526
+ {
1527
+ className: componentsRn.cn(
1528
+ "px-2 py-1 rounded-full",
1529
+ overallConfig.bgColor,
1530
+ overallConfig.darkBgColor
1531
+ ),
1532
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: componentsRn.cn("text-xs font-medium", overallConfig.color), children: [
1533
+ overallConfig.icon,
1534
+ " ",
1535
+ overallStatus.charAt(0).toUpperCase() + overallStatus.slice(1)
1536
+ ] })
1537
+ }
1538
+ )
1539
+ ] }) }),
1540
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1541
+ reactNative.ScrollView,
1542
+ {
1543
+ horizontal: true,
1544
+ showsHorizontalScrollIndicator: true,
1545
+ contentContainerStyle: { padding: 16 },
1546
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row items-center", children: stages.map((stage, index) => {
1547
+ const config = statusConfig[stage.status];
1548
+ const isLast = index === stages.length - 1;
1549
+ const stageContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "items-center", children: [
1550
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1551
+ reactNative.View,
1552
+ {
1553
+ className: componentsRn.cn(
1554
+ "w-24 p-3 rounded-lg border-2",
1555
+ config.bgColor,
1556
+ config.darkBgColor,
1557
+ config.borderColor
1558
+ ),
1559
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "items-center", children: [
1560
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: componentsRn.cn("text-lg", config.color), children: config.icon }),
1561
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1562
+ reactNative.Text,
1563
+ {
1564
+ className: "text-xs font-medium text-gray-900 dark:text-gray-100 mt-1 text-center",
1565
+ numberOfLines: 2,
1566
+ children: stage.name
1567
+ }
1568
+ ),
1569
+ stage.duration !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500 mt-1", children: formatDuration(stage.duration) })
1570
+ ] })
1571
+ }
1572
+ ),
1573
+ stage.jobs && stage.jobs.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
1574
+ stage.jobs.filter((j) => j.status === "success").length,
1575
+ "/",
1576
+ stage.jobs.length,
1577
+ " jobs"
1578
+ ] }) })
1579
+ ] });
1580
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "flex-row items-center", children: [
1581
+ onStagePress ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1582
+ reactNative.Pressable,
1583
+ {
1584
+ onPress: () => onStagePress(stage),
1585
+ accessibilityRole: "button",
1586
+ accessibilityLabel: `${stage.name} - ${stage.status}`,
1587
+ children: stageContent
1588
+ }
1589
+ ) : stageContent,
1590
+ !isLast && /* @__PURE__ */ jsxRuntimeExports.jsxs(reactNative.View, { className: "mx-2", children: [
1591
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "w-8 h-0.5 bg-gray-300 dark:bg-gray-600" }),
1592
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "absolute -top-2 left-2 text-gray-400 dark:text-gray-600", children: "→" })
1593
+ ] })
1594
+ ] }, stage.id);
1595
+ }) })
1596
+ }
1564
1597
  ),
1565
- accessibilityLabel: "XML Parser",
1566
- ...props,
1567
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-gray-900 dark:text-white", children: "XmlParser Component" })
1568
- }
1569
- );
1570
- exports.AlertDialog = AlertDialog;
1571
- exports.ApiPlayground = ApiPlayground;
1572
- exports.ApiReference = ApiReference;
1598
+ /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.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(reactNative.Text, { className: "text-xs text-gray-500 dark:text-gray-500", children: [
1599
+ stages.length,
1600
+ " stages |",
1601
+ " ",
1602
+ stages.filter((s) => s.status === "success").length,
1603
+ " completed"
1604
+ ] }) })
1605
+ ] });
1606
+ };
1573
1607
  exports.AuditLog = AuditLog;
1574
- exports.BodyMetrics = BodyMetrics;
1575
1608
  exports.BuildLog = BuildLog;
1576
- exports.ChangelogDisplay = ChangelogDisplay;
1577
- exports.CodePlayground = CodePlayground;
1578
- exports.ConflictResolver = ConflictResolver;
1579
- exports.DealPipeline = DealPipeline;
1580
1609
  exports.DeploymentStatus = DeploymentStatus;
1581
- exports.DriverLog = DriverLog;
1582
- exports.MemoryUsage = MemoryUsage;
1583
1610
  exports.MetricsGrid = MetricsGrid;
1584
1611
  exports.PipelineView = PipelineView;
1585
- exports.RegressionTest = RegressionTest;
1586
1612
  exports.SystemStatusIndicator = SystemStatusIndicator;
1587
- exports.TestResult = TestResult;
1588
- exports.TestRunner = TestRunner;
1589
- exports.WebhookLogger = WebhookLogger;
1590
- exports.WorkflowBuilder = WorkflowBuilder;
1591
- exports.WorkflowTemplate = WorkflowTemplate;
1592
- exports.XmlParser = XmlParser;
1593
- //# sourceMappingURL=index.cjs.js.map
1613
+ //# sourceMappingURL=index.cjs.map